summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2007-07-18 14:49:26 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2007-07-18 14:49:26 +0000
commit59f358eb0f44ff1cb82cfe72b967577d8ddf5a2f (patch)
treee9ec7b82a370e453bfd742527746882989f7e57b /content
parentb70141c17d943c8469e45bcfa794121533e58c6c (diff)
downloadnetsurf-59f358eb0f44ff1cb82cfe72b967577d8ddf5a2f.tar.gz
netsurf-59f358eb0f44ff1cb82cfe72b967577d8ddf5a2f.tar.bz2
Wrap internal SVG renderer with appropriate #ifdef WITH_NS_SVG
svn path=/trunk/netsurf/; revision=3432
Diffstat (limited to 'content')
-rw-r--r--content/content.c6
-rw-r--r--content/content.h4
-rw-r--r--content/content_type.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index 2e5bd5086..1a675c3c4 100644
--- a/content/content.c
+++ b/content/content.c
@@ -43,7 +43,9 @@
#include "image/bmp.h"
#include "image/ico.h"
#endif
+#ifdef WITH_NS_SVG
#include "image/svg.h"
+#endif
#ifdef WITH_SPRITE
#include "riscos/sprite.h"
#endif
@@ -134,8 +136,10 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_MNG
{"image/png", CONTENT_PNG},
#endif
+#ifdef WITH_NS_SVG
{"image/svg", CONTENT_SVG},
{"image/svg+xml", CONTENT_SVG},
+#endif
#ifdef WITH_BMP
{"image/x-bitmap", CONTENT_BMP},
{"image/x-bmp", CONTENT_BMP},
@@ -302,8 +306,10 @@ static const struct handler_entry handler_map[] = {
{0, 0, artworks_convert,
0, artworks_destroy, 0, artworks_redraw, 0, 0, 0, false},
#endif
+#ifdef WITH_NS_SVG
{svg_create, 0, svg_convert,
0, svg_destroy, 0, svg_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 7d543d49a..8cec5a3e7 100644
--- a/content/content.h
+++ b/content/content.h
@@ -46,7 +46,9 @@
#ifdef WITH_ARTWORKS
#include "riscos/artworks.h"
#endif
+#ifdef WITH_NS_SVG
#include "image/svg.h"
+#endif
struct bitmap;
@@ -166,7 +168,9 @@ struct content {
#ifdef WITH_ARTWORKS
struct content_artworks_data artworks;
#endif
+#ifdef WITH_NS_SVG
struct content_svg_data svg;
+#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 949712c45..844a5723b 100644
--- a/content/content_type.h
+++ b/content/content_type.h
@@ -53,7 +53,9 @@ typedef enum {
#ifdef WITH_ARTWORKS
CONTENT_ARTWORKS,
#endif
+#ifdef WITH_NS_SVG
CONTENT_SVG,
+#endif
/* these must be the last two */
CONTENT_OTHER,
CONTENT_UNKNOWN /**< content-type not received yet */