From 835d033e7b0c37883c05ab0c66086d089ababd26 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 30 Oct 2010 14:23:38 +0000 Subject: Amiga icon loader. Treeviews will now use the user's icons for content types. svn path=/trunk/netsurf/; revision=10925 --- content/content.c | 14 ++++++++++++++ content/content_protected.h | 6 ++++++ content/content_type.h | 3 +++ 3 files changed, 23 insertions(+) (limited to 'content') diff --git a/content/content.c b/content/content.c index 9a8336287..36b39b3ca 100644 --- a/content/content.c +++ b/content/content.c @@ -80,6 +80,9 @@ #ifdef WITH_WEBP #include "image/webp.h" #endif +#ifdef WITH_AMIGA_ICON +#include "amiga/icon.h" +#endif #include "utils/http.h" #include "utils/log.h" #include "utils/messages.h" @@ -159,6 +162,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_WEBP {"image/webp", CONTENT_WEBP}, #endif +#ifdef WITH_AMIGA_ICON + {"image/x-amiga-icon", CONTENT_AMIGA_ICON}, +#endif #ifdef WITH_ARTWORKS {"image/x-artworks", CONTENT_ARTWORKS}, #endif @@ -239,6 +245,9 @@ const char * const content_type_name[] = { #endif #ifdef WITH_WEBP "WEBP", +#endif +#ifdef WITH_AMIGA_ICON + "AMIGA_ICON", #endif "OTHER", "UNKNOWN" @@ -373,6 +382,11 @@ static const struct handler_entry handler_map[] = { {0, 0, webp_convert, 0, webp_destroy, 0, 0, 0, webp_redraw, 0, 0, 0, webp_clone, false}, +#endif +#ifdef WITH_WEBP + {0, 0, amiga_icon_convert, + 0, amiga_icon_destroy, 0, 0, 0, amiga_icon_redraw, 0, + 0, 0, amiga_icon_clone, false}, #endif {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false} }; diff --git a/content/content_protected.h b/content/content_protected.h index 6d8d50dc7..9541eb428 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -78,6 +78,9 @@ #ifdef WITH_WEBP #include "image/webp.h" #endif +#ifdef WITH_AMIGA_ICON +#include "amiga/icon.h" +#endif struct bitmap; @@ -152,6 +155,9 @@ struct content { #endif #ifdef WITH_WEBP struct content_webp_data webp; +#endif +#ifdef WITH_AMIGA_ICON + struct content_amiga_icon_data amiga_icon; #endif } data; diff --git a/content/content_type.h b/content/content_type.h index bcb2cc170..9703c5616 100644 --- a/content/content_type.h +++ b/content/content_type.h @@ -70,6 +70,9 @@ typedef enum { #endif #ifdef WITH_WEBP CONTENT_WEBP, +#endif +#ifdef WITH_AMIGA_ICON + CONTENT_AMIGA_ICON, #endif /* these must be the last two */ CONTENT_OTHER, -- cgit v1.2.3