From afc9517fbd11f536457b1bec8a279e3198d9d659 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 13 Jul 2007 03:54:47 +0000 Subject: Add CONTENT_SVG to content handling. svn path=/trunk/netsurf/; revision=3406 --- content/content.c | 5 +++++ content/content.h | 2 ++ content/content_type.h | 1 + 3 files changed, 8 insertions(+) (limited to 'content') diff --git a/content/content.c b/content/content.c index 53c72d81c..2e5bd5086 100644 --- a/content/content.c +++ b/content/content.c @@ -43,6 +43,7 @@ #include "image/bmp.h" #include "image/ico.h" #endif +#include "image/svg.h" #ifdef WITH_SPRITE #include "riscos/sprite.h" #endif @@ -133,6 +134,8 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_MNG {"image/png", CONTENT_PNG}, #endif + {"image/svg", CONTENT_SVG}, + {"image/svg+xml", CONTENT_SVG}, #ifdef WITH_BMP {"image/x-bitmap", CONTENT_BMP}, {"image/x-bmp", CONTENT_BMP}, @@ -299,6 +302,8 @@ static const struct handler_entry handler_map[] = { {0, 0, artworks_convert, 0, artworks_destroy, 0, artworks_redraw, 0, 0, 0, false}, #endif + {svg_create, 0, svg_convert, + 0, svg_destroy, 0, svg_redraw, 0, 0, 0, false}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false} }; #define HANDLER_MAP_COUNT (sizeof(handler_map) / sizeof(handler_map[0])) diff --git a/content/content.h b/content/content.h index 8c6235342..7d543d49a 100644 --- a/content/content.h +++ b/content/content.h @@ -46,6 +46,7 @@ #ifdef WITH_ARTWORKS #include "riscos/artworks.h" #endif +#include "image/svg.h" struct bitmap; @@ -165,6 +166,7 @@ struct content { #ifdef WITH_ARTWORKS struct content_artworks_data artworks; #endif + struct content_svg_data svg; } data; /**< URL for refresh request, in standard form as from url_join. */ diff --git a/content/content_type.h b/content/content_type.h index b86254a52..949712c45 100644 --- a/content/content_type.h +++ b/content/content_type.h @@ -53,6 +53,7 @@ typedef enum { #ifdef WITH_ARTWORKS CONTENT_ARTWORKS, #endif + CONTENT_SVG, /* these must be the last two */ CONTENT_OTHER, CONTENT_UNKNOWN /**< content-type not received yet */ -- cgit v1.2.3