From 9aa397ba6896fc31268522ef26da3f0a126cb69e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 14 Aug 2010 16:47:18 +0000 Subject: Start bitmap opacity support in GTK front end. Still needs bitmap_test_opaque() implemented to be complete. svn path=/trunk/netsurf/; revision=10706 --- gtk/gtk_bitmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/gtk_bitmap.c b/gtk/gtk_bitmap.c index 0fc0414e9..1e9f6b40e 100644 --- a/gtk/gtk_bitmap.c +++ b/gtk/gtk_bitmap.c @@ -39,6 +39,7 @@ struct bitmap { GdkPixbuf *pretile_x; GdkPixbuf *pretile_y; GdkPixbuf *pretile_xy; + bool opaque; }; #define MIN_PRETILE_WIDTH 256 @@ -66,6 +67,7 @@ void *bitmap_create(int width, int height, unsigned int state) */ gdk_pixbuf_fill(bmp->primary, 0); bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL; + bmp->opaque = (state & BITMAP_OPAQUE) != 0; return bmp; } @@ -80,7 +82,7 @@ void bitmap_set_opaque(void *vbitmap, bool opaque) { struct bitmap *bitmap = (struct bitmap *)vbitmap; assert(bitmap); -/* todo: set bitmap as opaque */ + bitmap->opaque = opaque; } @@ -94,7 +96,7 @@ bool bitmap_test_opaque(void *vbitmap) { struct bitmap *bitmap = (struct bitmap *)vbitmap; assert(bitmap); -/* todo: test if bitmap as opaque */ +/* todo: test if bitmap is opaque */ return false; } @@ -108,8 +110,7 @@ bool bitmap_get_opaque(void *vbitmap) { struct bitmap *bitmap = (struct bitmap *)vbitmap; assert(bitmap); -/* todo: get whether bitmap is opaque */ - return false; + return bitmap->opaque; } -- cgit v1.2.3