summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.c40
-rw-r--r--content/content.h6
-rw-r--r--content/content_type.h3
3 files changed, 49 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index ff65f7bfd..f18f401cf 100644
--- a/content/content.c
+++ b/content/content.c
@@ -36,6 +36,9 @@
#ifdef WITH_GIF
#include "netsurf/image/gif.h"
#endif
+#ifdef WITH_BMP
+#include "netsurf/image/bmp.h"
+#endif
#ifdef WITH_SPRITE
#include "netsurf/riscos/sprite.h"
#endif
@@ -68,17 +71,32 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_ARTWORKS
{"application/artworks", CONTENT_ARTWORKS},
#endif
+#ifdef WITH_BMP
+ {"application/bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"application/drawfile", CONTENT_DRAW},
+#endif
+#ifdef WITH_BMP
+ {"application/preview", CONTENT_BMP},
+ {"application/x-bmp", CONTENT_BMP},
+#endif
+#ifdef WITH_DRAW
{"application/x-drawfile", CONTENT_DRAW},
#endif
#ifdef WITH_THEME_INSTALL
{"application/x-netsurf-theme", CONTENT_THEME},
#endif
+#ifdef WITH_BMP
+ {"application/x-win-bitmap", CONTENT_BMP},
+#endif
{"application/xhtml+xml", CONTENT_HTML},
#ifdef WITH_ARTWORKS
{"image/artworks", CONTENT_ARTWORKS},
#endif
+#ifdef WITH_BMP
+ {"image/bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"image/drawfile", CONTENT_DRAW},
#endif
@@ -94,12 +112,19 @@ static const struct mime_entry mime_map[] = {
#ifdef WITH_MNG
{"image/mng", CONTENT_MNG},
#endif
+#ifdef WITH_BMP
+ {"image/ms-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_JPEG
{"image/pjpeg", CONTENT_JPEG},
#endif
#ifdef WITH_MNG
{"image/png", CONTENT_PNG},
#endif
+#ifdef WITH_BMP
+ {"image/x-bitmap", CONTENT_BMP},
+ {"image/x-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_DRAW
{"image/x-drawfile", CONTENT_DRAW},
#endif
@@ -107,9 +132,17 @@ static const struct mime_entry mime_map[] = {
{"image/x-jng", CONTENT_JNG},
{"image/x-mng", CONTENT_MNG},
#endif
+#ifdef WITH_BMP
+ {"image/x-ms-bmp", CONTENT_BMP},
+#endif
#ifdef WITH_SPRITE
{"image/x-riscos-sprite", CONTENT_SPRITE},
#endif
+#ifdef WITH_BMP
+ {"image/x-win-bitmap", CONTENT_BMP},
+ {"image/x-windows-bmp", CONTENT_BMP},
+ {"image/x-xbitmap", CONTENT_BMP},
+#endif
{"text/css", CONTENT_CSS},
{"text/html", CONTENT_HTML},
{"text/plain", CONTENT_TEXTPLAIN},
@@ -130,6 +163,9 @@ const char *content_type_name[] = {
#ifdef WITH_GIF
"GIF",
#endif
+#ifdef WITH_BMP
+ "BMP",
+#endif
#ifdef WITH_MNG
"PNG",
"JNG",
@@ -206,6 +242,10 @@ static const struct handler_entry handler_map[] = {
{nsgif_create, 0, nsgif_convert, 0, nsgif_destroy, 0,
nsgif_redraw, nsgif_redraw_tiled, 0, 0, false},
#endif
+#ifdef WITH_BMP
+ {nsbmp_create, 0, nsbmp_convert, 0, nsbmp_destroy, 0,
+ nsbmp_redraw, nsbmp_redraw_tiled, 0, 0, false},
+#endif
#ifdef WITH_MNG
{nsmng_create, nsmng_process_data, nsmng_convert,
0, nsmng_destroy, 0, nsmng_redraw, nsmng_redraw_tiled,
diff --git a/content/content.h b/content/content.h
index 21c4f399c..52a22e5ef 100644
--- a/content/content.h
+++ b/content/content.h
@@ -115,6 +115,9 @@
#ifdef WITH_GIF
#include "netsurf/image/gif.h"
#endif
+#ifdef WITH_BMP
+#include "netsurf/image/bmp.h"
+#endif
#ifdef WITH_PLUGIN
#include "netsurf/riscos/plugin.h"
#endif
@@ -230,6 +233,9 @@ struct content {
#ifdef WITH_GIF
struct content_gif_data gif;
#endif
+#ifdef WITH_BMP
+ struct content_bmp_data bmp;
+#endif
#ifdef WITH_MNG
struct content_mng_data mng;
#endif
diff --git a/content/content_type.h b/content/content_type.h
index 4760b9f9f..ef184ce7c 100644
--- a/content/content_type.h
+++ b/content/content_type.h
@@ -28,6 +28,9 @@ typedef enum {
#ifdef WITH_GIF
CONTENT_GIF,
#endif
+#ifdef WITH_BMP
+ CONTENT_BMP,
+#endif
#ifdef WITH_MNG
CONTENT_PNG,
CONTENT_JNG,