diff options
author | Vincent Sanders <vince@kyllikki.org> | 2020-05-13 19:03:14 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2020-05-13 19:03:14 +0100 |
commit | 3a7fc30a5f1c0945c021abf185274e88f72e7080 (patch) | |
tree | 2bb5252d22b799cc01ef1ee1858fdcb5473095bf /frontends/amiga/icon.c | |
parent | 95e0a24fac2abc4cddaa91bf44304ebc3d776b17 (diff) | |
download | netsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.gz netsurf-3a7fc30a5f1c0945c021abf185274e88f72e7080.tar.bz2 |
implement content opacity check through the function table
Diffstat (limited to 'frontends/amiga/icon.c')
-rw-r--r-- | frontends/amiga/icon.c | 13 |
1 files changed, 13 insertions, 0 deletions
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, }; |