diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-08-14 16:47:18 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-08-14 16:47:18 +0000 |
commit | 9aa397ba6896fc31268522ef26da3f0a126cb69e (patch) | |
tree | 834b3f38bb58ce3c7377eef97a034b57289f844f | |
parent | 30880797c774b59c51c8d45dbee1f08230569de5 (diff) | |
download | netsurf-9aa397ba6896fc31268522ef26da3f0a126cb69e.tar.gz netsurf-9aa397ba6896fc31268522ef26da3f0a126cb69e.tar.bz2 |
Start bitmap opacity support in GTK front end. Still needs bitmap_test_opaque() implemented to be complete.
svn path=/trunk/netsurf/; revision=10706
-rw-r--r-- | gtk/gtk_bitmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |