summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/content.c5
-rw-r--r--content/content.h2
-rw-r--r--content/content_type.h1
-rw-r--r--makefile2
4 files changed, 9 insertions, 1 deletions
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 */
diff --git a/makefile b/makefile
index 1fb2ebaf0..f5f1f4dc3 100644
--- a/makefile
+++ b/makefile
@@ -30,7 +30,7 @@ OBJECTS_COMMON += filename.o hashtable.o messages.o talloc.o \
OBJECTS_COMMON += knockout.o options.o tree.o version.o # desktop/
OBJECTS_IMAGE = bmp.o bmpread.o gif.o gifread.o ico.o jpeg.o \
- mng.o # image/
+ mng.o svg.o # image/
OBJECTS_RISCOS = $(OBJECTS_COMMON) $(OBJECTS_IMAGE)
OBJECTS_RISCOS += browser.o frames.o history_core.o netsurf.o \