summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-02-26 02:25:19 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-02-26 02:25:19 +0000
commit60ea34ad48f604c96f228d8f7942c5527e8a5b15 (patch)
tree81afbe5a766c42b7cc1b3036be990c8fcda299c5 /content
parentda4a9313f1260531ec3dde07b32c122f120f695c (diff)
downloadnetsurf-60ea34ad48f604c96f228d8f7942c5527e8a5b15.tar.gz
netsurf-60ea34ad48f604c96f228d8f7942c5527e8a5b15.tar.bz2
[project @ 2006-02-26 02:25:19 by rjw]
Add support for ICO files. svn path=/import/netsurf/; revision=2096
Diffstat (limited to 'content')
-rw-r--r--content/content.c14
-rw-r--r--content/content.h2
-rw-r--r--content/content_type.h1
3 files changed, 17 insertions, 0 deletions
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,