Index: gdkcairo.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/gdkcairo.c,v
retrieving revision 1.5
diff -U5 -r1.5 gdkcairo.c
--- gdkcairo.c	23 Jun 2005 13:49:06 -0000	1.5
+++ gdkcairo.c	2 Dec 2005 08:37:35 -0000
@@ -121,10 +121,39 @@
 		     boxes[i].x2 - boxes[i].x1,
 		     boxes[i].y2 - boxes[i].y1);
 }
 
 /**
+ * gdk_cairo_set_source_drawable:
+ * @cr: a #Cairo context
+ * @drawable: a #GdkDrawable
+ * @pixbuf_x: X coordinate of location to place upper left corner of @drawable
+ * @pixbuf_y: Y coordinate of location to place upper left corner of @drawable
+ *
+ * Sets the given drawable as the source pattern for the Cairo context.
+ *
+ **/
+void
+gdk_cairo_set_source_drawable (cairo_t     *cr,
+			       GdkDrawable *drawable,
+			       double	    drawable_x,
+			       double	    drawable_y)
+{
+  cairo_surface_t *surface;
+    
+  g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
+
+  surface = _gdk_drawable_ref_cairo_surface (drawable);
+
+  cairo_set_source_surface (cr,
+			    surface,
+			    drawable_x,
+			    drawable_y); 
+}
+
+
+/**
  * gdk_cairo_set_source_pixbuf:
  * @cr: a #Cairo context
  * @pixbuf: a #GdkPixbuf
  * @pixbuf_x: X coordinate of location to place upper left corner of @pixbuf
  * @pixbuf_y: Y coordinate of location to place upper left corner of @pixbuf
