From 60ea34ad48f604c96f228d8f7942c5527e8a5b15 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sun, 26 Feb 2006 02:25:19 +0000 Subject: [project @ 2006-02-26 02:25:19 by rjw] Add support for ICO files. svn path=/import/netsurf/; revision=2096 --- content/content.c | 14 ++++++++++++++ content/content.h | 2 ++ content/content_type.h | 1 + 3 files changed, 17 insertions(+) (limited to 'content') diff --git a/content/content.c b/content/content.c index f18f401cf..e29990461 100644 --- a/content/content.c +++ b/content/content.c @@ -38,6 +38,7 @@ #endif #ifdef WITH_BMP #include "netsurf/image/bmp.h" +#include "netsurf/image/ico.h" #endif #ifdef WITH_SPRITE #include "netsurf/riscos/sprite.h" @@ -78,12 +79,16 @@ static const struct mime_entry mime_map[] = { {"application/drawfile", CONTENT_DRAW}, #endif #ifdef WITH_BMP + {"application/ico", CONTENT_ICO}, {"application/preview", CONTENT_BMP}, {"application/x-bmp", CONTENT_BMP}, #endif #ifdef WITH_DRAW {"application/x-drawfile", CONTENT_DRAW}, #endif +#ifdef WITH_BMP + {"application/x-ico", CONTENT_ICO}, +#endif #ifdef WITH_THEME_INSTALL {"application/x-netsurf-theme", CONTENT_THEME}, #endif @@ -103,6 +108,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_GIF {"image/gif", CONTENT_GIF}, #endif +#ifdef WITH_BMP + {"image/ico", CONTENT_ICO}, +#endif #ifdef WITH_MNG {"image/jng", CONTENT_JNG}, #endif @@ -128,6 +136,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_DRAW {"image/x-drawfile", CONTENT_DRAW}, #endif +#ifdef WITH_BMP + {"image/x-icon", CONTENT_ICO}, +#endif #ifdef WITH_MNG {"image/x-jng", CONTENT_JNG}, {"image/x-mng", CONTENT_MNG}, @@ -165,6 +176,7 @@ const char *content_type_name[] = { #endif #ifdef WITH_BMP "BMP", + "ICO", #endif #ifdef WITH_MNG "PNG", @@ -245,6 +257,8 @@ static const struct handler_entry handler_map[] = { #ifdef WITH_BMP {nsbmp_create, 0, nsbmp_convert, 0, nsbmp_destroy, 0, nsbmp_redraw, nsbmp_redraw_tiled, 0, 0, false}, + {nsico_create, 0, nsico_convert, 0, nsico_destroy, 0, + nsico_redraw, nsico_redraw_tiled, 0, 0, false}, #endif #ifdef WITH_MNG {nsmng_create, nsmng_process_data, nsmng_convert, diff --git a/content/content.h b/content/content.h index 52a22e5ef..ec050a7be 100644 --- a/content/content.h +++ b/content/content.h @@ -117,6 +117,7 @@ #endif #ifdef WITH_BMP #include "netsurf/image/bmp.h" +#include "netsurf/image/ico.h" #endif #ifdef WITH_PLUGIN #include "netsurf/riscos/plugin.h" @@ -235,6 +236,7 @@ struct content { #endif #ifdef WITH_BMP struct content_bmp_data bmp; + struct content_ico_data ico; #endif #ifdef WITH_MNG struct content_mng_data mng; diff --git a/content/content_type.h b/content/content_type.h index ef184ce7c..b8b891514 100644 --- a/content/content_type.h +++ b/content/content_type.h @@ -30,6 +30,7 @@ typedef enum { #endif #ifdef WITH_BMP CONTENT_BMP, + CONTENT_ICO, #endif #ifdef WITH_MNG CONTENT_PNG, -- cgit v1.2.3