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 --- frontends/amiga/arexx.c | 4 ++-- frontends/amiga/bitmap.c | 5 +++-- frontends/amiga/clipboard.c | 2 +- frontends/amiga/ctxmenu.c | 4 ++-- frontends/amiga/download.c | 4 ++-- frontends/amiga/drag.c | 4 ++-- frontends/amiga/dt_anim.c | 4 +++- frontends/amiga/dt_picture.c | 3 ++- frontends/amiga/dt_sound.c | 20 ++++++++++------- frontends/amiga/file.c | 6 ++---- frontends/amiga/filetype.c | 15 +++++++------ frontends/amiga/filetype.h | 6 ++++-- frontends/amiga/gui.c | 29 +++++++++++++------------ frontends/amiga/gui_options.c | 1 + frontends/amiga/icon.c | 5 +++-- frontends/amiga/iff_dr2d.c | 3 ++- frontends/amiga/menu.c | 6 +++--- frontends/amiga/plugin_hack.c | 17 ++++++++------- frontends/amiga/print.c | 7 +++--- frontends/amiga/tree.c | 4 ++-- frontends/atari/ctxmenu.c | 5 +++-- frontends/atari/gui.c | 10 ++++----- frontends/beos/bitmap.cpp | 4 ++-- frontends/cocoa/bitmap.m | 2 +- frontends/framebuffer/bitmap.c | 2 +- frontends/gtk/bitmap.c | 4 ++-- frontends/gtk/scaffolding.c | 5 ++++- frontends/gtk/viewsource.c | 3 ++- frontends/gtk/window.c | 14 ++++++------ frontends/riscos/bitmap.c | 2 +- frontends/riscos/content-handlers/artworks.c | 4 +++- frontends/riscos/content-handlers/draw.c | 4 +++- frontends/riscos/content-handlers/sprite.c | 4 +++- frontends/riscos/filetype.c | 8 +++---- frontends/riscos/filetype.h | 2 +- frontends/riscos/gui.c | 8 +++---- frontends/riscos/gui/url_bar.c | 10 ++++----- frontends/riscos/print.c | 14 ++++++------ frontends/riscos/save.c | 32 ++++++++++++++-------------- frontends/riscos/save_draw.c | 5 ++--- frontends/riscos/search.c | 5 ++--- frontends/riscos/theme_install.c | 2 +- frontends/riscos/url_suggest.c | 5 ++--- frontends/riscos/window.c | 14 +++++------- frontends/windows/bitmap.c | 2 +- 45 files changed, 168 insertions(+), 151 deletions(-) (limited to 'frontends') diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c index 6f2ca0c1b..14c0ad770 100644 --- a/frontends/amiga/arexx.c +++ b/frontends/amiga/arexx.c @@ -32,7 +32,7 @@ #include "utils/log.h" #include "utils/nsoption.h" #include "utils/nsurl.h" -#include "content/hlcache.h" +#include "netsurf/content.h" #include "netsurf/browser_window.h" #include "desktop/version.h" @@ -331,7 +331,7 @@ STATIC VOID rx_save(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu if((fh = FOpen((char *)cmd->ac_ArgList[0], MODE_NEWFILE, 0))) { - hlcache_handle *h = browser_window_get_content(gw->bw); + struct hlcache_handle *h = browser_window_get_content(gw->bw); if((source_data = content_get_source_data(h, &source_size))) FWrite(fh, source_data, 1, source_size); diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c index 8d1815298..badd37438 100644 --- a/frontends/amiga/bitmap.c +++ b/frontends/amiga/bitmap.c @@ -19,6 +19,7 @@ #include "amiga/os3support.h" #include +#include #include #ifdef __amigaos4__ #include @@ -46,8 +47,8 @@ #include "utils/nsoption.h" #include "utils/nsurl.h" #include "utils/messages.h" -#include "content/hlcache.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" #include "amiga/gui.h" #include "amiga/bitmap.h" @@ -596,7 +597,7 @@ void ami_bitmap_fini(void) pool_bitmap = NULL; } -static nserror bitmap_render(struct bitmap *bitmap, hlcache_handle *content) +static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content) { #ifdef __amigaos4__ struct redraw_context ctx = { diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c index 3a96456c6..1b87f5b57 100644 --- a/frontends/amiga/clipboard.c +++ b/frontends/amiga/clipboard.c @@ -30,7 +30,7 @@ #include "utils/nsoption.h" #include "utils/utf8.h" #include "utils/nsurl.h" -#include "content/hlcache.h" +#include "netsurf/content.h" #include "netsurf/browser_window.h" #include "netsurf/plotters.h" #include "desktop/textinput.h" diff --git a/frontends/amiga/ctxmenu.c b/frontends/amiga/ctxmenu.c index f9c873cff..a68819298 100644 --- a/frontends/amiga/ctxmenu.c +++ b/frontends/amiga/ctxmenu.c @@ -40,10 +40,10 @@ #include "utils/messages.h" #include "utils/nsoption.h" #include "utils/nsurl.h" -#include "content/hlcache.h" +#include "netsurf/content.h" #include "netsurf/browser_window.h" -#include "desktop/browser_history.h" #include "netsurf/mouse.h" +#include "desktop/browser_history.h" #include "desktop/searchweb.h" #include "desktop/textinput.h" diff --git a/frontends/amiga/download.c b/frontends/amiga/download.c index b9fecf362..93536f494 100644 --- a/frontends/amiga/download.c +++ b/frontends/amiga/download.c @@ -48,13 +48,13 @@ #include "utils/utils.h" #include "utils/nsoption.h" #include "utils/string.h" -#include "desktop/download.h" -#include "desktop/save_complete.h" #include "netsurf/browser_window.h" #include "netsurf/mouse.h" #include "netsurf/window.h" #include "netsurf/download.h" #include "content/handlers/image/ico.h" +#include "desktop/download.h" +#include "desktop/save_complete.h" #include "amiga/gui.h" #include "amiga/download.h" diff --git a/frontends/amiga/drag.c b/frontends/amiga/drag.c index b653be815..92617dd13 100644 --- a/frontends/amiga/drag.c +++ b/frontends/amiga/drag.c @@ -34,8 +34,8 @@ #include "utils/messages.h" #include "utils/utils.h" #include "utils/nsoption.h" -#include "content/hlcache.h" #include "netsurf/mouse.h" +#include "netsurf/content.h" #include "amiga/bitmap.h" #include "amiga/clipboard.h" @@ -178,7 +178,7 @@ void ami_drag_save(struct Window *win) case GUI_SAVE_OBJECT_NATIVE: { - hlcache_handle *c = drag_save_data; + struct hlcache_handle *c = drag_save_data; AddPart(path, content_get_title(c), 1024); ami_file_save(AMINS_SAVE_IFF, path, win, c, NULL, NULL); diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c index 04f1ce27d..19467882a 100644 --- a/frontends/amiga/dt_anim.c +++ b/frontends/amiga/dt_anim.c @@ -37,9 +37,11 @@ #include "utils/log.h" #include "utils/messages.h" -#include "content/content_protected.h" #include "netsurf/plotters.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/content_protected.h" +#include "content/llcache.h" #include "amiga/bitmap.h" #include "amiga/filetype.h" diff --git a/frontends/amiga/dt_picture.c b/frontends/amiga/dt_picture.c index 49dde5e67..e7f1c9724 100644 --- a/frontends/amiga/dt_picture.c +++ b/frontends/amiga/dt_picture.c @@ -33,9 +33,10 @@ #include "utils/log.h" #include "utils/messages.h" -#include "content/content_protected.h" #include "netsurf/plotters.h" #include "netsurf/bitmap.h" +#include "content/llcache.h" +#include "content/content_protected.h" #include "content/handlers/image/image_cache.h" #include "amiga/bitmap.h" diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c index 04486c1fb..55fc60d61 100644 --- a/frontends/amiga/dt_sound.c +++ b/frontends/amiga/dt_sound.c @@ -23,20 +23,24 @@ #ifdef WITH_AMIGA_DATATYPES #include "amiga/os3support.h" -#include "amiga/filetype.h" -#include "amiga/datatypes.h" -#include "content/content_protected.h" -#include "netsurf/plotters.h" -#include "render/box.h" -#include "utils/log.h" -#include "utils/messages.h" - #include #include #include #include #include +#include "utils/log.h" +#include "utils/messages.h" +#include "netsurf/plotters.h" +#include "netsurf/content.h" +#include "render/box.h" +#include "content/llcache.h" +#include "content/content_protected.h" + +#include "amiga/filetype.h" +#include "amiga/datatypes.h" + + typedef struct amiga_dt_sound_content { struct content base; diff --git a/frontends/amiga/file.c b/frontends/amiga/file.c index 595a981f9..1bba30eb3 100644 --- a/frontends/amiga/file.c +++ b/frontends/amiga/file.c @@ -26,14 +26,12 @@ #include "utils/nsoption.h" #include "utils/file.h" #include "utils/messages.h" -#include "content/hlcache.h" -#include "content/content.h" -#include "content/fetch.h" +#include "utils/nsurl.h" #include "netsurf/browser_window.h" +#include "netsurf/content.h" #include "desktop/save_complete.h" #include "desktop/save_pdf.h" #include "desktop/save_text.h" -#include "netsurf/window.h" #include "amiga/gui.h" #include "amiga/bitmap.h" diff --git a/frontends/amiga/filetype.c b/frontends/amiga/filetype.c index d598f530c..05f130e66 100644 --- a/frontends/amiga/filetype.c +++ b/frontends/amiga/filetype.c @@ -20,19 +20,20 @@ #include #include -#include "amiga/filetype.h" -#include "amiga/misc.h" -#include "amiga/object.h" -#include "content/fetch.h" -#include "content/content.h" -#include "utils/log.h" -#include "utils/utils.h" #include #include #include #include #include +#include "netsurf/content.h" +#include "utils/log.h" +#include "utils/utils.h" + +#include "amiga/filetype.h" +#include "amiga/misc.h" +#include "amiga/object.h" + /** * filetype -- determine the MIME type of a local file */ diff --git a/frontends/amiga/filetype.h b/frontends/amiga/filetype.h index fc27b1df2..52fdf9cb5 100644 --- a/frontends/amiga/filetype.h +++ b/frontends/amiga/filetype.h @@ -18,12 +18,14 @@ #ifndef AMIGA_FILETYPE_H #define AMIGA_FILETYPE_H + #include #include -#include "content/content_type.h" -#include "utils/errors.h" #include +#include "netsurf/content_type.h" +#include "utils/errors.h" + struct hlcache_handle; struct ami_mime_entry; diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index f285d9669..9bd1cd4d0 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -86,6 +86,7 @@ /* newlib includes */ #include #include +#include /* NetSurf core includes */ #include "utils/log.h" @@ -95,26 +96,24 @@ #include "utils/utils.h" #include "utils/nsurl.h" #include "utils/file.h" -#include "content/hlcache.h" +#include "netsurf/window.h" +#include "netsurf/fetch.h" +#include "netsurf/misc.h" +#include "netsurf/mouse.h" +#include "netsurf/netsurf.h" +#include "netsurf/content.h" +#include "netsurf/browser_window.h" #include "content/backing_store.h" #include "content/fetchers.h" -#include "content/fetchers/resource.h" #include "content/urldb.h" -#include "content/handlers/image/ico.h" #include "desktop/browser_history.h" -#include "netsurf/browser_window.h" #include "desktop/hotlist.h" -#include "netsurf/mouse.h" -#include "netsurf/netsurf.h" #include "desktop/version.h" #include "desktop/save_complete.h" #include "desktop/scrollbar.h" #include "desktop/searchweb.h" #include "desktop/textinput.h" #include "desktop/tree.h" -#include "netsurf/window.h" -#include "netsurf/fetch.h" -#include "netsurf/misc.h" /* NetSurf Amiga platform includes */ #include "amiga/gui.h" @@ -848,12 +847,14 @@ static struct RDArgs *ami_gui_commandline(int *argc, char **argv, int *nargc, ch if((args = ReadArgs(template, rarray, NULL))) { if(rarray[A_URL]) { - LOG("URL %s specified on command line", rarray[A_URL]); + LOG("URL %s specified on command line", + (char *)rarray[A_URL]); temp_homepage_url = ami_to_utf8_easy((char *)rarray[A_URL]); } if(rarray[A_USERSDIR]) { - LOG("USERSDIR %s specified on command line", rarray[A_USERSDIR]); + LOG("USERSDIR %s specified on command line", + (char *)rarray[A_USERSDIR]); users_dir = ASPrintf("%s", rarray[A_USERSDIR]); } @@ -1751,7 +1752,7 @@ static void ami_gui_scroller_update(struct gui_window_2 *gwin) /** * function to add retrieved favicon to gui */ -static void gui_window_set_icon(struct gui_window *g, hlcache_handle *icon) +static void gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon) { struct BitMap *bm = NULL; struct IBox *bbox; @@ -5216,7 +5217,7 @@ static void gui_window_remove_caret(struct gui_window *g) static void gui_window_new_content(struct gui_window *g) { - hlcache_handle *c; + struct hlcache_handle *c; if(g && g->shared && g->bw && browser_window_has_content(g->bw)) c = browser_window_get_content(g->bw); @@ -5399,7 +5400,7 @@ void ami_gui_splash_close(Object *win_obj) DisposeObject(win_obj); } -static void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl, +static void gui_file_gadget_open(struct gui_window *g, struct hlcache_handle *hl, struct form_control *gadget) { LOG("File open dialog request for %p/%p", g, gadget); diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c index 340af4b27..4e6914c6a 100755 --- a/frontends/amiga/gui_options.c +++ b/frontends/amiga/gui_options.c @@ -78,6 +78,7 @@ #include "amiga/selectmenu.h" #include "amiga/theme.h" #include "amiga/utf8.h" +#include "amiga/plotters.h" enum { diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c index f19797676..9e441d8d7 100644 --- a/frontends/amiga/icon.c +++ b/frontends/amiga/icon.c @@ -43,6 +43,7 @@ #include "utils/file.h" #include "netsurf/plotters.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" #include "content/content_protected.h" #include "amiga/os3support.h" @@ -66,7 +67,7 @@ typedef struct amiga_icon_content { static nserror amiga_icon_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); static bool amiga_icon_convert(struct content *c); static void amiga_icon_destroy(struct content *c); @@ -104,7 +105,7 @@ CONTENT_FACTORY_REGISTER_TYPES(amiga_icon, amiga_icon_types, nserror amiga_icon_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) { amiga_icon_content *ai_content; diff --git a/frontends/amiga/iff_dr2d.c b/frontends/amiga/iff_dr2d.c index d4e3b220c..966d2a6e3 100644 --- a/frontends/amiga/iff_dr2d.c +++ b/frontends/amiga/iff_dr2d.c @@ -26,10 +26,11 @@ #include #ifndef AMIGA_DR2D_STANDALONE +#include "utils/nsurl.h" +#include "netsurf/content.h" #include "amiga/os3support.h" #include "amiga/iff_dr2d.h" #include "amiga/misc.h" -#include "content/hlcache.h" #else #include "os3support.h" #include "iff_dr2d.h" diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c index e1017cd1f..636951ea3 100644 --- a/frontends/amiga/menu.c +++ b/frontends/amiga/menu.c @@ -47,11 +47,11 @@ #include "utils/log.h" #include "utils/utils.h" #include "utils/nsurl.h" -#include "content/hlcache.h" -#include "desktop/hotlist.h" #include "netsurf/browser_window.h" #include "netsurf/mouse.h" #include "netsurf/window.h" +#include "netsurf/content.h" +#include "desktop/hotlist.h" #include "desktop/textinput.h" #include "desktop/version.h" @@ -1076,7 +1076,7 @@ void ami_menu_update_checked(struct gui_window_2 *gwin) ResetMenuStrip(gwin->win, menustrip); } -void ami_menu_update_disabled(struct gui_window *g, hlcache_handle *c) +void ami_menu_update_disabled(struct gui_window *g, struct hlcache_handle *c) { struct Window *win = g->shared->win; diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c index 19fa66cd5..7fe78b9b0 100644 --- a/frontends/amiga/plugin_hack.c +++ b/frontends/amiga/plugin_hack.c @@ -23,19 +23,20 @@ #include "amiga/os3support.h" #include +#include +#include +#include +#include +#include "utils/log.h" +#include "utils/messages.h" +#include "netsurf/plotters.h" +#include "netsurf/content.h" #include "amiga/filetype.h" #include "amiga/plugin_hack.h" #include "content/content_protected.h" -#include "content/hlcache.h" -#include "netsurf/plotters.h" -#include "utils/log.h" -#include "utils/messages.h" +#include "content/llcache.h" -#include -#include -#include -#include typedef struct amiga_plugin_hack_content { struct content base; diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c index 007245c73..56d25703e 100644 --- a/frontends/amiga/print.c +++ b/frontends/amiga/print.c @@ -49,13 +49,14 @@ #include "utils/nsoption.h" #include "utils/messages.h" #include "utils/utils.h" +#include "utils/nsurl.h" #include "netsurf/plotters.h" -#include "desktop/printer.h" -#include "desktop/print.h" #include "netsurf/layout.h" #include "netsurf/mouse.h" #include "netsurf/window.h" -#include "content/hlcache.h" +#include "netsurf/content.h" +#include "desktop/printer.h" +#include "desktop/print.h" #include "amiga/plotters.h" #include "amiga/font.h" diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c index 7f7140c3a..7a6f8b3b5 100644 --- a/frontends/amiga/tree.c +++ b/frontends/amiga/tree.c @@ -53,13 +53,13 @@ #include "utils/nsoption.h" #include "utils/utils.h" #include "utils/messages.h" +#include "netsurf/browser_window.h" +#include "netsurf/window.h" #include "content/urldb.h" #include "content/llcache.h" -#include "netsurf/browser_window.h" #include "desktop/cookie_manager.h" #include "desktop/global_history.h" #include "desktop/hotlist.h" -#include "netsurf/window.h" #include "desktop/sslcert_viewer.h" #include "amiga/gui.h" diff --git a/frontends/atari/ctxmenu.c b/frontends/atari/ctxmenu.c index e7420351e..f3f5f6dbb 100644 --- a/frontends/atari/ctxmenu.c +++ b/frontends/atari/ctxmenu.c @@ -19,9 +19,10 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/nsoption.h" +#include "utils/nsurl.h" #include "netsurf/browser_window.h" +#include "netsurf/content.h" #include "desktop/textinput.h" -#include "content/hlcache.h" #include "atari/gui.h" #include "atari/misc.h" @@ -50,7 +51,7 @@ struct s_context_info ctxinfo; static struct s_context_info * get_context_info( struct gui_window * gw, short mx, short my ) { - hlcache_handle *h; + struct hlcache_handle *h; GRECT area; struct browser_window * bw = gw->browser->bw; int sx, sy; diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c index 24caa7c51..16cc3193f 100644 --- a/frontends/atari/gui.c +++ b/frontends/atari/gui.c @@ -29,11 +29,6 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/corestrings.h" -#include "content/urldb.h" -#include "content/content.h" -#include "content/backing_store.h" -#include "content/hlcache.h" -#include "desktop/treeview.h" #include "netsurf/browser_window.h" #include "netsurf/layout.h" #include "netsurf/window.h" @@ -41,6 +36,11 @@ #include "netsurf/fetch.h" #include "netsurf/misc.h" #include "netsurf/netsurf.h" +#include "netsurf/content.h" +#include "content/urldb.h" +#include "content/backing_store.h" +#include "content/hlcache.h" +#include "desktop/treeview.h" #include "atari/gemtk/gemtk.h" #include "atari/gui.h" diff --git a/frontends/beos/bitmap.cpp b/frontends/beos/bitmap.cpp index 4ce40750c..1b73967c5 100644 --- a/frontends/beos/bitmap.cpp +++ b/frontends/beos/bitmap.cpp @@ -38,11 +38,11 @@ extern "C" { #include "utils/log.h" -#include "content/content.h" -#include "content/urldb.h" #include "netsurf/plotters.h" #include "netsurf/browser_window.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" +#include "content/urldb.h" } #include "beos/bitmap.h" diff --git a/frontends/cocoa/bitmap.m b/frontends/cocoa/bitmap.m index dd9e33fbe..3e37cdff3 100644 --- a/frontends/cocoa/bitmap.m +++ b/frontends/cocoa/bitmap.m @@ -27,7 +27,7 @@ #import "netsurf/plotters.h" #import "netsurf/bitmap.h" #import "content/urldb.h" -#import "content/content.h" +#import "netsurf/content.h" #import "cocoa/plotter.h" #import "cocoa/bitmap.h" diff --git a/frontends/framebuffer/bitmap.c b/frontends/framebuffer/bitmap.c index dbe5647e3..027e0122b 100644 --- a/frontends/framebuffer/bitmap.c +++ b/frontends/framebuffer/bitmap.c @@ -32,7 +32,7 @@ #include "utils/utils.h" #include "netsurf/bitmap.h" #include "netsurf/plotters.h" -#include "content/content.h" +#include "netsurf/content.h" #include "framebuffer/gui.h" #include "framebuffer/fbtk.h" diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c index 1def140b8..b42814295 100644 --- a/frontends/gtk/bitmap.c +++ b/frontends/gtk/bitmap.c @@ -31,8 +31,8 @@ #include #include "utils/utils.h" -#include "utils/log.h" -#include "content/content.h" +#include "utils/errors.h" +#include "netsurf/content.h" #include "netsurf/bitmap.h" #include "netsurf/plotters.h" diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c index 38dfd2125..dc0595a37 100644 --- a/frontends/gtk/scaffolding.c +++ b/frontends/gtk/scaffolding.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -33,6 +34,8 @@ #include "utils/log.h" #include "utils/nsoption.h" #include "utils/file.h" +#include "utils/nsurl.h" +#include "netsurf/content.h" #include "desktop/browser_history.h" #include "netsurf/browser_window.h" #include "desktop/hotlist.h" @@ -46,7 +49,7 @@ #include "desktop/save_text.h" #include "desktop/searchweb.h" #include "desktop/textinput.h" -#include "content/hlcache.h" +#include "desktop/search.h" #include "gtk/compat.h" #include "gtk/warn.h" diff --git a/frontends/gtk/viewsource.c b/frontends/gtk/viewsource.c index b0907a3a5..acf81018d 100644 --- a/frontends/gtk/viewsource.c +++ b/frontends/gtk/viewsource.c @@ -17,6 +17,7 @@ */ #include +#include #include #include "utils/utils.h" @@ -24,7 +25,7 @@ #include "utils/nsurl.h" #include "utils/messages.h" #include "netsurf/browser_window.h" -#include "content/content.h" +#include "netsurf/content.h" #include "gtk/viewdata.h" #include "gtk/viewsource.h" diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c index dd713cb28..a98d529c2 100644 --- a/frontends/gtk/window.c +++ b/frontends/gtk/window.c @@ -36,17 +36,17 @@ #include "utils/utf8.h" #include "utils/utils.h" #include "utils/nsoption.h" -#include "content/hlcache.h" -#include "gtk/window.h" -#include "gtk/selection.h" +#include "netsurf/content.h" #include "netsurf/browser_window.h" #include "netsurf/mouse.h" -#include "desktop/searchweb.h" -#include "desktop/textinput.h" #include "netsurf/window.h" #include "netsurf/plotters.h" +#include "desktop/searchweb.h" +#include "desktop/textinput.h" #include "render/form.h" +#include "gtk/window.h" +#include "gtk/selection.h" #include "gtk/warn.h" #include "gtk/compat.h" #include "gtk/gui.h" @@ -947,7 +947,7 @@ static void gui_window_destroy(struct gui_window *g) * \param gw gtk gui window to set favicon on. * \param icon A handle to the new favicon content. */ -static void gui_window_set_icon(struct gui_window *gw, hlcache_handle *icon) +static void gui_window_set_icon(struct gui_window *gw, struct hlcache_handle *icon) { struct bitmap *icon_bitmap = NULL; @@ -1277,7 +1277,7 @@ static void gui_window_create_form_select_menu(struct gui_window *g, static void gui_window_file_gadget_open(struct gui_window *g, - hlcache_handle *hl, + struct hlcache_handle *hl, struct form_control *gadget) { GtkWidget *dialog; diff --git a/frontends/riscos/bitmap.c b/frontends/riscos/bitmap.c index e0fd38ba8..1a3524633 100644 --- a/frontends/riscos/bitmap.c +++ b/frontends/riscos/bitmap.c @@ -44,8 +44,8 @@ #include "utils/log.h" #include "utils/messages.h" #include "netsurf/plotters.h" -#include "content/content.h" #include "netsurf/bitmap.h" +#include "netsurf/content.h" #include "riscos/gui.h" #include "riscos/image.h" diff --git a/frontends/riscos/content-handlers/artworks.c b/frontends/riscos/content-handlers/artworks.c index 517a6ff16..f70b10ac7 100644 --- a/frontends/riscos/content-handlers/artworks.c +++ b/frontends/riscos/content-handlers/artworks.c @@ -36,8 +36,10 @@ #include "utils/log.h" #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 "content/llcache.h" #include "riscos/content-handlers/artworks.h" #include "riscos/gui.h" diff --git a/frontends/riscos/content-handlers/draw.c b/frontends/riscos/content-handlers/draw.c index 0b1b07215..9dff75736 100644 --- a/frontends/riscos/content-handlers/draw.c +++ b/frontends/riscos/content-handlers/draw.c @@ -33,8 +33,10 @@ #include "utils/log.h" #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 "content/llcache.h" #include "riscos/content-handlers/draw.h" #include "riscos/gui.h" diff --git a/frontends/riscos/content-handlers/sprite.c b/frontends/riscos/content-handlers/sprite.c index 3ef48c889..ed06110ec 100644 --- a/frontends/riscos/content-handlers/sprite.c +++ b/frontends/riscos/content-handlers/sprite.c @@ -32,8 +32,10 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/utils.h" -#include "content/content_protected.h" #include "netsurf/plotters.h" +#include "netsurf/content.h" +#include "content/llcache.h" +#include "content/content_protected.h" #include "riscos/gui.h" #include "riscos/image.h" diff --git a/frontends/riscos/filetype.c b/frontends/riscos/filetype.c index 99a44ae30..75ff41414 100644 --- a/frontends/riscos/filetype.c +++ b/frontends/riscos/filetype.c @@ -24,9 +24,7 @@ #include "utils/config.h" #include "utils/log.h" -#include "content/content.h" -#include "content/fetch.h" -#include "content/hlcache.h" +#include "netsurf/content.h" #include "riscos/filetype.h" #include "riscos/gui.h" @@ -232,7 +230,7 @@ int cmp_type(const void *x, const void *y) } /* exported interface documented in riscos/filetype.h */ -int ro_content_filetype(hlcache_handle *c) +int ro_content_filetype(struct hlcache_handle *c) { lwc_string *mime_type; int file_type; @@ -252,7 +250,7 @@ int ro_content_filetype(hlcache_handle *c) /* exported interface documented in riscos/filetype.h */ -int ro_content_native_type(hlcache_handle *c) +int ro_content_native_type(struct hlcache_handle *c) { switch (ro_content_filetype(c)) { case FILETYPE_JPEG: /* jpeg */ diff --git a/frontends/riscos/filetype.h b/frontends/riscos/filetype.h index 3ba613033..4c45e7bd0 100644 --- a/frontends/riscos/filetype.h +++ b/frontends/riscos/filetype.h @@ -23,7 +23,7 @@ #ifndef _NETSURF_RISCOS_FILETYPE_H_ #define _NETSURF_RISCOS_FILETYPE_H_ -#include "content/content_type.h" +#include "netsurf/content_type.h" #ifndef FILETYPE_ACORN_URI #define FILETYPE_ACORN_URI 0xf91 diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c index e0e8e4e3b..2e8f4333f 100644 --- a/frontends/riscos/gui.c +++ b/frontends/riscos/gui.c @@ -49,12 +49,12 @@ #include "utils/corestrings.h" #include "netsurf/fetch.h" #include "netsurf/misc.h" -#include "desktop/save_complete.h" -#include "desktop/treeview.h" +#include "netsurf/content.h" #include "netsurf/netsurf.h" #include "netsurf/browser_window.h" +#include "desktop/save_complete.h" +#include "desktop/treeview.h" #include "content/urldb.h" -#include "content/hlcache.h" #include "content/backing_store.h" #include "riscos/gui.h" @@ -1935,7 +1935,7 @@ static void ro_gui_view_source_bounce(wimp_message *message) /** * Send the source of a content to a text editor. */ -void ro_gui_view_source(hlcache_handle *c) +void ro_gui_view_source(struct hlcache_handle *c) { os_error *error; char *temp_name; diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c index 80a7b4a40..547c4608d 100644 --- a/frontends/riscos/gui/url_bar.c +++ b/frontends/riscos/gui/url_bar.c @@ -17,8 +17,9 @@ * along with this program. If not, see . */ -/** \file - * URL bars (implementation). +/** + * \file + * RISC OS URL bar implementation. */ #include @@ -35,15 +36,14 @@ #include "utils/messages.h" #include "utils/utf8.h" #include "utils/utils.h" -#include "content/hlcache.h" -#include "content/content.h" #include "netsurf/browser_window.h" #include "netsurf/plotters.h" +#include "netsurf/content.h" +#include "content/hlcache.h" #include "riscos/gui.h" #include "riscos/hotlist.h" #include "riscos/gui/url_bar.h" -#include "riscos/theme.h" #include "riscos/url_suggest.h" #include "riscos/wimp.h" #include "riscos/wimp_event.h" diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c index da16664ac..dfdd24ce9 100644 --- a/frontends/riscos/print.c +++ b/frontends/riscos/print.c @@ -36,10 +36,10 @@ #include "utils/messages.h" #include "utils/utils.h" #include "utils/nsoption.h" -#include "content/content.h" -#include "content/hlcache.h" #include "netsurf/browser_window.h" #include "netsurf/plotters.h" +#include "netsurf/content.h" +#include "content/content.h" #include "riscos/gui.h" #include "riscos/dialog.h" @@ -101,10 +101,10 @@ void gui_window_redraw_window(struct gui_window *g); static bool ro_gui_print_click(wimp_pointer *pointer); static bool ro_gui_print_apply(wimp_w w); static void print_update_sheets_shaded_state(bool on); -static void print_send_printsave(hlcache_handle *h); +static void print_send_printsave(struct hlcache_handle *h); static bool print_send_printtypeknown(wimp_message *m); static bool print_document(struct gui_window *g, const char *filename); -static const char *print_declare_fonts(hlcache_handle *h); +static const char *print_declare_fonts(struct hlcache_handle *h); static bool print_fonts_plot_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style); static bool print_fonts_plot_line(int x0, int y0, int x1, int y1, const plot_style_t *style); static bool print_fonts_plot_polygon(const int *p, unsigned int n, const plot_style_t *style); @@ -312,7 +312,7 @@ void print_update_sheets_shaded_state(bool on) * \param h handle to content to print. */ -void print_send_printsave(hlcache_handle *h) +void print_send_printsave(struct hlcache_handle *h) { wimp_full_message_data_xfer m; os_error *e; @@ -546,7 +546,7 @@ bool print_document(struct gui_window *g, const char *filename) int left, right, top, bottom, width, height; int saved_width, saved_height; int yscroll = 0, sheets = print_max_sheets; - hlcache_handle *h = browser_window_get_content(g->bw); + struct hlcache_handle *h = browser_window_get_content(g->bw); const char *error_message; pdriver_features features; os_fw fhandle, old_job = 0; @@ -788,7 +788,7 @@ error: * \return 0 on success, error message on error */ -const char *print_declare_fonts(hlcache_handle *h) +const char *print_declare_fonts(struct hlcache_handle *h) { unsigned int i; struct rect clip; diff --git a/frontends/riscos/save.c b/frontends/riscos/save.c index 325dbbb79..a028fcd09 100644 --- a/frontends/riscos/save.c +++ b/frontends/riscos/save.c @@ -40,8 +40,8 @@ #include "utils/log.h" #include "utils/messages.h" #include "utils/utf8.h" -#include "content/content.h" -#include "content/hlcache.h" +#include "utils/nsurl.h" +#include "netsurf/content.h" #include "netsurf/browser_window.h" #include "desktop/hotlist.h" #include "desktop/global_history.h" @@ -81,7 +81,7 @@ now since we could have multiple saves outstanding */ static gui_save_type gui_save_current_type; -static hlcache_handle *gui_save_content = NULL; +static struct hlcache_handle *gui_save_content = NULL; static char *gui_save_selection = NULL; static const char *gui_save_url = NULL; static const char *gui_save_title = NULL; @@ -105,17 +105,17 @@ static size_t save_dir_len; typedef enum { LINK_ACORN, LINK_ANT, LINK_TEXT } link_format; -static bool ro_gui_save_complete(hlcache_handle *h, char *path); -static bool ro_gui_save_content(hlcache_handle *h, char *path, bool force_overwrite); +static bool ro_gui_save_complete(struct hlcache_handle *h, char *path); +static bool ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite); static void ro_gui_save_done(void); static void ro_gui_save_bounced(wimp_message *message); -static bool ro_gui_save_object_native(hlcache_handle *h, char *path); +static bool ro_gui_save_object_native(struct hlcache_handle *h, char *path); static bool ro_gui_save_link(const char *url, const char *title, link_format format, char *path); -static void ro_gui_save_set_state(hlcache_handle *h, gui_save_type save_type, +static void ro_gui_save_set_state(struct hlcache_handle *h, gui_save_type save_type, const nsurl *url, char *leaf_buf, size_t leaf_len, char *icon_buf, size_t icon_len); static void ro_gui_save_drag_end(wimp_dragged *drag, void *data); -static bool ro_gui_save_create_thumbnail(hlcache_handle *h, const char *name); +static bool ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name); static void ro_gui_save_overwrite_confirmed(query_id, enum query_response res, void *p); static void ro_gui_save_overwrite_cancelled(query_id, enum query_response res, void *p); @@ -247,7 +247,7 @@ void ro_gui_saveas_quit(void) * \param title title (if any), when saving links */ -void ro_gui_save_prepare(gui_save_type save_type, hlcache_handle *h, +void ro_gui_save_prepare(gui_save_type save_type, struct hlcache_handle *h, char *s, const nsurl *url, const char *title) { char name_buf[FILENAME_MAX]; @@ -364,7 +364,7 @@ bool ro_gui_save_ok(wimp_w w) * \param g gui window */ -void gui_drag_save_object(struct gui_window *g, hlcache_handle *c, +void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c, gui_save_type save_type) { wimp_pointer pointer; @@ -741,7 +741,7 @@ void ro_gui_save_bounced(wimp_message *message) void ro_gui_save_datasave_ack(wimp_message *message) { char *path = message->data.data_xfer.file_name; - hlcache_handle *h = gui_save_content; + struct hlcache_handle *h = gui_save_content; bool force_overwrite; switch (gui_save_current_type) { @@ -793,7 +793,7 @@ void ro_gui_save_datasave_ack(wimp_message *message) * or (ii) deferred awaiting user confirmation */ -bool ro_gui_save_content(hlcache_handle *h, char *path, bool force_overwrite) +bool ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite) { os_error *error; const char *source_data; @@ -1008,7 +1008,7 @@ static void ro_gui_save_set_file_type(const char *path, lwc_string *mime_type) * \return true on success, false on error and error reported */ -bool ro_gui_save_complete(hlcache_handle *h, char *path) +bool ro_gui_save_complete(struct hlcache_handle *h, char *path) { void *spr = ((byte *) saveas_area) + saveas_area->first; osspriteop_header *sprite = (osspriteop_header *) spr; @@ -1093,7 +1093,7 @@ bool ro_gui_save_complete(hlcache_handle *h, char *path) return save_complete(h, path, ro_gui_save_set_file_type); } -bool ro_gui_save_object_native(hlcache_handle *h, char *path) +bool ro_gui_save_object_native(struct hlcache_handle *h, char *path) { int file_type = ro_content_filetype(h); @@ -1200,7 +1200,7 @@ bool ro_gui_save_link(const char *url, const char *title, link_format format, * \param icon_len size of buffer to receive icon name. */ -void ro_gui_save_set_state(hlcache_handle *h, gui_save_type save_type, +void ro_gui_save_set_state(struct hlcache_handle *h, gui_save_type save_type, const nsurl *url, char *leaf_buf, size_t leaf_len, char *icon_buf, size_t icon_len) { @@ -1338,7 +1338,7 @@ void ro_gui_save_set_state(hlcache_handle *h, gui_save_type save_type, * \return true iff successful */ -bool ro_gui_save_create_thumbnail(hlcache_handle *h, const char *name) +bool ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name) { osspriteop_header *sprite_header; struct bitmap *bitmap; diff --git a/frontends/riscos/save_draw.c b/frontends/riscos/save_draw.c index 7ba2c942b..705551f7b 100644 --- a/frontends/riscos/save_draw.c +++ b/frontends/riscos/save_draw.c @@ -32,9 +32,8 @@ #include "utils/log.h" #include "utils/utils.h" -#include "content/content.h" -#include "content/hlcache.h" #include "netsurf/plotters.h" +#include "netsurf/content.h" #include "riscos/bitmap.h" #include "riscos/gui.h" @@ -87,7 +86,7 @@ static int ro_save_draw_height; * \return true on success, false on error and error reported */ -bool save_as_draw(hlcache_handle *h, const char *path) +bool save_as_draw(struct hlcache_handle *h, const char *path) { pencil_code code; char *drawfile_buffer; diff --git a/frontends/riscos/search.c b/frontends/riscos/search.c index 544630e2e..9ed898e50 100644 --- a/frontends/riscos/search.c +++ b/frontends/riscos/search.c @@ -31,10 +31,9 @@ #include "utils/log.h" #include "utils/messages.h" -#include "content/content.h" -#include "content/hlcache.h" #include "netsurf/browser_window.h" #include "netsurf/search.h" +#include "netsurf/content.h" #include "desktop/search.h" #include "riscos/gui.h" @@ -269,7 +268,7 @@ bool ro_gui_search_prepare_menu(void) */ static bool ro_gui_search_bw_searchable(struct browser_window *bw) { - hlcache_handle *h; + struct hlcache_handle *h; assert(bw != NULL); diff --git a/frontends/riscos/theme_install.c b/frontends/riscos/theme_install.c index 3448e742f..fee126a86 100644 --- a/frontends/riscos/theme_install.c +++ b/frontends/riscos/theme_install.c @@ -28,7 +28,7 @@ #include "utils/nsoption.h" #include "utils/log.h" #include "utils/messages.h" -#include "content/content.h" +#include "netsurf/content.h" #include "content/hlcache.h" #include "desktop/theme.h" diff --git a/frontends/riscos/url_suggest.c b/frontends/riscos/url_suggest.c index 3f6b6b54d..ef1fcc71e 100644 --- a/frontends/riscos/url_suggest.c +++ b/frontends/riscos/url_suggest.c @@ -23,14 +23,13 @@ #include #include #include +#include -#include "oslib/wimp.h" -#include "content/content_type.h" +#include "utils/messages.h" #include "content/urldb.h" #include "riscos/menus.h" #include "riscos/url_suggest.h" -#include "utils/messages.h" struct url_suggest_item { const char *url; /*< The URL being stored. */ diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c index e99ed31e3..cbd743f65 100644 --- a/frontends/riscos/window.c +++ b/frontends/riscos/window.c @@ -43,7 +43,6 @@ #include #include -#include "utils/config.h" #include "utils/nsoption.h" #include "utils/log.h" #include "utils/talloc.h" @@ -52,20 +51,17 @@ #include "utils/utils.h" #include "utils/messages.h" #include "utils/string.h" -#include "content/content.h" +#include "netsurf/content.h" +#include "netsurf/browser_window.h" +#include "netsurf/plotters.h" +#include "netsurf/window.h" +#include "netsurf/bitmap.h" #include "content/hlcache.h" #include "content/urldb.h" #include "desktop/browser_history.h" -#include "netsurf/browser_window.h" #include "desktop/cookie_manager.h" #include "desktop/scrollbar.h" -#include "desktop/frames.h" -#include "netsurf/mouse.h" -#include "netsurf/plotters.h" #include "desktop/textinput.h" -#include "desktop/tree.h" -#include "netsurf/window.h" -#include "netsurf/bitmap.h" #include "render/form.h" #include "riscos/bitmap.h" diff --git a/frontends/windows/bitmap.c b/frontends/windows/bitmap.c index 936b28ec5..f60dab613 100644 --- a/frontends/windows/bitmap.c +++ b/frontends/windows/bitmap.c @@ -32,7 +32,7 @@ #include "utils/log.h" #include "netsurf/bitmap.h" #include "netsurf/plotters.h" -#include "content/content.h" +#include "netsurf/content.h" #include "windows/plot.h" #include "windows/bitmap.h" -- cgit v1.2.3