diff options
author | Benjamin Otte <otte@redhat.com> | 2010-08-26 13:46:34 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:29 +0200 |
commit | 332652f702c3cd31a4bdccc709bef6922028185e (patch) | |
tree | ed0858cbe6b46ec909ce053741c4f805c741030f /tests/gtkoffscreenbox.c | |
parent | ebdf26e1d8b864e2f61b64840f4ee2d445d34009 (diff) | |
download | gtk+-332652f702c3cd31a4bdccc709bef6922028185e.tar.gz |
API: Change offscreen windows to use a cairo_surface_t
This requires changes to all the offscreen surface getters that used to
return a GdkPixmap before.
Diffstat (limited to 'tests/gtkoffscreenbox.c')
-rw-r--r-- | tests/gtkoffscreenbox.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c index eee514b748..cd70c3e4aa 100644 --- a/tests/gtkoffscreenbox.c +++ b/tests/gtkoffscreenbox.c @@ -598,19 +598,19 @@ gtk_offscreen_box_expose (GtkWidget *widget, window = gtk_widget_get_window (widget); if (event->window == window) { - GdkPixmap *pixmap; + cairo_surface_t *surface; GtkAllocation child_area; cairo_t *cr; int start_y = 0; if (offscreen_box->child1 && gtk_widget_get_visible (offscreen_box->child1)) { - pixmap = gdk_offscreen_window_get_pixmap (offscreen_box->offscreen_window1); + surface = gdk_offscreen_window_get_surface (offscreen_box->offscreen_window1); gtk_widget_get_allocation (offscreen_box->child1, &child_area); cr = gdk_cairo_create (window); - gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0); + cairo_set_source_surface (cr, surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); @@ -622,7 +622,7 @@ gtk_offscreen_box_expose (GtkWidget *widget, { gint w, h; - pixmap = gdk_offscreen_window_get_pixmap (offscreen_box->offscreen_window2); + surface = gdk_offscreen_window_get_surface (offscreen_box->offscreen_window2); gtk_widget_get_allocation (offscreen_box->child2, &child_area); cr = gdk_cairo_create (window); @@ -634,12 +634,12 @@ gtk_offscreen_box_expose (GtkWidget *widget, cairo_translate (cr, -child_area.width / 2, -child_area.height / 2); /* clip */ - gdk_drawable_get_size (pixmap, &w, &h); + gdk_drawable_get_size (offscreen_box->offscreen_window2, &w, &h); cairo_rectangle (cr, 0, 0, w, h); cairo_clip (cr); /* paint */ - gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0); + cairo_set_source_surface (cr, surface, 0, 0); cairo_paint (cr); cairo_destroy (cr); |