From 76a68d7dd02f3819e4e60cd9febfd45e20821e14 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 6 Jun 2016 08:59:23 +0100 Subject: Update content to split public and internal API --- content/handlers/image/bmp.c | 6 ++++-- content/handlers/image/gif.c | 6 ++++-- content/handlers/image/ico.c | 4 +++- content/handlers/image/image.c | 4 ++-- content/handlers/image/image.h | 2 ++ content/handlers/image/image_cache.c | 5 +++-- content/handlers/image/image_cache.h | 1 + content/handlers/image/jpeg.c | 3 ++- content/handlers/image/nssprite.c | 8 +++++--- content/handlers/image/png.c | 15 ++++++++++----- content/handlers/image/svg.c | 5 +++-- 11 files changed, 39 insertions(+), 20 deletions(-) (limited to 'content/handlers/image') diff --git a/content/handlers/image/bmp.c b/content/handlers/image/bmp.c index 114a551a6..8f787de37 100644 --- a/content/handlers/image/bmp.c +++ b/content/handlers/image/bmp.c @@ -28,10 +28,12 @@ #include "utils/utils.h" #include "utils/messages.h" -#include "content/content_protected.h" -#include "desktop/gui_internal.h" #include "netsurf/plotters.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/llcache.h" +#include "content/content_protected.h" +#include "desktop/gui_internal.h" #include "bmp.h" diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c index 93970f96d..2a8ce3d20 100644 --- a/content/handlers/image/gif.c +++ b/content/handlers/image/gif.c @@ -39,10 +39,12 @@ #include "utils/utils.h" #include "utils/messages.h" #include "utils/nsoption.h" -#include "content/content_protected.h" #include "netsurf/misc.h" -#include "desktop/gui_internal.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/llcache.h" +#include "content/content_protected.h" +#include "desktop/gui_internal.h" #include "image.h" #include "gif.h" diff --git a/content/handlers/image/ico.c b/content/handlers/image/ico.c index 5ea29bfab..7b1e1271c 100644 --- a/content/handlers/image/ico.c +++ b/content/handlers/image/ico.c @@ -27,9 +27,11 @@ #include "utils/utils.h" #include "utils/log.h" #include "utils/messages.h" +#include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/llcache.h" #include "content/content_protected.h" #include "desktop/gui_internal.h" -#include "netsurf/bitmap.h" #include "image.h" #include "ico.h" diff --git a/content/handlers/image/image.c b/content/handlers/image/image.c index da5eea117..0b1ddc0e0 100644 --- a/content/handlers/image/image.c +++ b/content/handlers/image/image.c @@ -22,10 +22,10 @@ #include "utils/utils.h" #include "utils/log.h" #include "utils/messages.h" -#include "content/content.h" #include "netsurf/plotters.h" -#include "desktop/gui_internal.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "desktop/gui_internal.h" #include "bmp.h" #include "gif.h" diff --git a/content/handlers/image/image.h b/content/handlers/image/image.h index eb9482583..dac586c34 100644 --- a/content/handlers/image/image.h +++ b/content/handlers/image/image.h @@ -25,6 +25,8 @@ #include "utils/errors.h" +struct content_redraw_data; + /** Initialise the content handlers for image types. */ nserror image_init(void); diff --git a/content/handlers/image/image_cache.c b/content/handlers/image/image_cache.c index 4c008b7a9..dcb01dd87 100644 --- a/content/handlers/image/image_cache.c +++ b/content/handlers/image/image_cache.c @@ -25,10 +25,11 @@ #include "utils/utils.h" #include "utils/log.h" -#include "content/content_protected.h" #include "netsurf/misc.h" -#include "desktop/gui_internal.h" #include "netsurf/bitmap.h" +#include "content/llcache.h" +#include "content/content_protected.h" +#include "desktop/gui_internal.h" #include "image_cache.h" #include "image.h" diff --git a/content/handlers/image/image_cache.h b/content/handlers/image/image_cache.h index 2f1a5caee..d57a3a956 100644 --- a/content/handlers/image/image_cache.h +++ b/content/handlers/image/image_cache.h @@ -38,6 +38,7 @@ #define NETSURF_IMAGE_IMAGE_CACHE_H_ #include "utils/errors.h" +#include "netsurf/content_type.h" struct content_redraw_data; struct redraw_context; diff --git a/content/handlers/image/jpeg.c b/content/handlers/image/jpeg.c index 179b8fc5b..e3af00f9f 100644 --- a/content/handlers/image/jpeg.c +++ b/content/handlers/image/jpeg.c @@ -30,9 +30,10 @@ #include "utils/utils.h" #include "utils/log.h" #include "utils/messages.h" +#include "netsurf/bitmap.h" +#include "content/llcache.h" #include "content/content_protected.h" #include "desktop/gui_internal.h" -#include "netsurf/bitmap.h" #include "image_cache.h" diff --git a/content/handlers/image/nssprite.c b/content/handlers/image/nssprite.c index 8912f8356..9c4717fd6 100644 --- a/content/handlers/image/nssprite.c +++ b/content/handlers/image/nssprite.c @@ -28,10 +28,12 @@ #include "utils/utils.h" #include "utils/log.h" #include "utils/messages.h" -#include "content/content_protected.h" -#include "desktop/gui_internal.h" #include "netsurf/plotters.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/llcache.h" +#include "content/content_protected.h" +#include "desktop/gui_internal.h" #include "nssprite.h" @@ -62,7 +64,7 @@ typedef struct nssprite_content { static nserror nssprite_create(const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, - llcache_handle *llcache, const char *fallback_charset, + struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c) { nssprite_content *sprite; diff --git a/content/handlers/image/png.c b/content/handlers/image/png.c index 04083d8a4..45f415a6b 100644 --- a/content/handlers/image/png.c +++ b/content/handlers/image/png.c @@ -25,9 +25,10 @@ #include "utils/utils.h" #include "utils/log.h" #include "utils/messages.h" +#include "netsurf/bitmap.h" +#include "content/llcache.h" #include "content/content_protected.h" #include "desktop/gui_internal.h" -#include "netsurf/bitmap.h" #include "image_cache.h" #include "png.h" @@ -277,10 +278,14 @@ static nserror nspng_create_png_data(nspng_content *png_c) return NSERROR_OK; } -static nserror nspng_create(const content_handler *handler, - lwc_string *imime_type, const struct http_parameter *params, - llcache_handle *llcache, const char *fallback_charset, - bool quirks, struct content **c) +static nserror +nspng_create(const content_handler *handler, + lwc_string *imime_type, + const struct http_parameter *params, + struct llcache_handle *llcache, + const char *fallback_charset, + bool quirks, + struct content **c) { nspng_content *png_c; nserror error; diff --git a/content/handlers/image/svg.c b/content/handlers/image/svg.c index 82c85ac4c..b4532646c 100644 --- a/content/handlers/image/svg.c +++ b/content/handlers/image/svg.c @@ -29,8 +29,9 @@ #include "utils/messages.h" #include "utils/utils.h" -#include "content/content_protected.h" #include "netsurf/plotters.h" +#include "netsurf/content.h" +#include "content/content_protected.h" #include "svg.h" @@ -71,7 +72,7 @@ no_memory: static nserror svg_create(const content_handler *handler, lwc_string *imime_type, const struct http_parameter *params, - llcache_handle *llcache, const char *fallback_charset, + struct llcache_handle *llcache, const char *fallback_charset, bool quirks, struct content **c) { svg_content *svg; -- cgit v1.2.3