summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2007-07-18 17:58:35 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2007-07-18 17:58:35 +0000
commit04292695be1ab1964dcc1636a9dff522c760fda9 (patch)
tree068437817cb3432566af22978d62ee295fcd27fc /content
parent59f358eb0f44ff1cb82cfe72b967577d8ddf5a2f (diff)
downloadnetsurf-04292695be1ab1964dcc1636a9dff522c760fda9.tar.gz
netsurf-04292695be1ab1964dcc1636a9dff522c760fda9.tar.bz2
Initial work on RSVG image handler. Still a lot to do.
svn path=/trunk/netsurf/; revision=3433
Diffstat (limited to 'content')
-rw-r--r--content/content.c9
-rw-r--r--content/content.h6
-rw-r--r--content/content_type.h2
3 files changed, 15 insertions, 2 deletions
diff --git a/content/content.c b/content/content.c
index 1a675c3c4..ee20e7d04 100644
--- a/content/content.c
+++ b/content/content.c
@@ -46,6 +46,9 @@
#ifdef WITH_NS_SVG
#include "image/svg.h"
#endif
+#ifdef WITH_RSVG
+#include "image/rsvg.h"
+#endif
#ifdef WITH_SPRITE
#include "riscos/sprite.h"
#endif
@@ -136,7 +139,7 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_MNG
{"image/png", CONTENT_PNG},
#endif
-#ifdef WITH_NS_SVG
+#if defined(WITH_NS_SVG) || defined (WITH_RSVG)
{"image/svg", CONTENT_SVG},
{"image/svg+xml", CONTENT_SVG},
#endif
@@ -310,6 +313,10 @@ static const struct handler_entry handler_map[] = {
{svg_create, 0, svg_convert,
0, svg_destroy, 0, svg_redraw, 0, 0, 0, false},
#endif
+#ifdef WITH_RSVG
+ {rsvg_create, 0, rsvg_convert,
+ 0, rsvg_destroy, 0, rsvg_redraw, 0, 0, 0, false},
+#endif
{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 8cec5a3e7..57334fba5 100644
--- a/content/content.h
+++ b/content/content.h
@@ -49,6 +49,9 @@
#ifdef WITH_NS_SVG
#include "image/svg.h"
#endif
+#ifdef WITH_RSVG
+#include "image/rsvg.h"
+#endif
struct bitmap;
@@ -171,6 +174,9 @@ struct content {
#ifdef WITH_NS_SVG
struct content_svg_data svg;
#endif
+#ifdef WITH_RSVG
+ struct content_rsvg_data rsvg;
+#endif
} 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 844a5723b..4b073293e 100644
--- a/content/content_type.h
+++ b/content/content_type.h
@@ -53,7 +53,7 @@ typedef enum {
#ifdef WITH_ARTWORKS
CONTENT_ARTWORKS,
#endif
-#ifdef WITH_NS_SVG
+#if defined(WITH_NS_SVG) || defined(WITH_RSVG)
CONTENT_SVG,
#endif
/* these must be the last two */