From 3a7fc30a5f1c0945c021abf185274e88f72e7080 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 13 May 2020 19:03:14 +0100 Subject: implement content opacity check through the function table --- frontends/amiga/icon.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'frontends') diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c index 353ba9196..001874c86 100644 --- a/frontends/amiga/icon.c +++ b/frontends/amiga/icon.c @@ -48,6 +48,7 @@ #include "content/content.h" #include "content/content_protected.h" #include "content/content_factory.h" +#include "desktop/gui_internal.h" #include "amiga/os3support.h" #include "amiga/bitmap.h" @@ -87,6 +88,17 @@ static void *amiga_icon_get_internal(const struct content *c, void *context) return icon_c->bitmap; } +static bool amiga_icon_is_opaque(struct content *c) +{ + amiga_icon_content *icon_c = (amiga_icon_content *)c; + + if (icon_c->bitmap != NULL) { + return guit->bitmap->get_opaque(icon_c->bitmap); + } + + return false; +} + static const content_handler amiga_icon_content_handler = { .create = amiga_icon_create, .data_complete = amiga_icon_convert, @@ -95,6 +107,7 @@ static const content_handler amiga_icon_content_handler = { .clone = amiga_icon_clone, .get_internal = amiga_icon_get_internal, .type = amiga_icon_content_type, + .is_opaque = amiga_icon_is_opaque, .no_share = false, }; -- cgit v1.2.3