summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-06-10 11:53:28 +0100
committerVincent Sanders <vince@kyllikki.org>2016-06-10 11:53:28 +0100
commit3153335fdecc9b5d3e7a55d4416790504f9d96c3 (patch)
treea331d2d583c162f6c2921dbc665d96f75f64402b
parent8fdf262683dab03fb01941f74cfa698b1f9d6834 (diff)
downloadnetsurf-3153335fdecc9b5d3e7a55d4416790504f9d96c3.tar.gz
netsurf-3153335fdecc9b5d3e7a55d4416790504f9d96c3.tar.bz2
remove unecessary risc os frontend usage of content headers
-rw-r--r--frontends/riscos/401login.c3
-rw-r--r--frontends/riscos/cookies.c1
-rw-r--r--frontends/riscos/global_history.c6
-rw-r--r--frontends/riscos/gui/url_bar.c17
-rw-r--r--frontends/riscos/hotlist.c13
-rw-r--r--frontends/riscos/menus.c4
-rw-r--r--frontends/riscos/save_pdf.c8
-rw-r--r--frontends/riscos/sslcert.c4
-rw-r--r--frontends/riscos/textselection.c1
-rw-r--r--frontends/riscos/theme.c1
-rw-r--r--frontends/riscos/theme_install.c8
-rw-r--r--frontends/riscos/toolbar.c1
-rw-r--r--frontends/riscos/treeview.c1
-rw-r--r--frontends/riscos/window.c25
14 files changed, 43 insertions, 50 deletions
diff --git a/frontends/riscos/401login.c b/frontends/riscos/401login.c
index 476d631a2..35402ec53 100644
--- a/frontends/riscos/401login.c
+++ b/frontends/riscos/401login.c
@@ -25,8 +25,7 @@
#include "utils/log.h"
#include "utils/messages.h"
-#include "content/content.h"
-#include "content/hlcache.h"
+#include "utils/nsurl.h"
#include "content/urldb.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 93c9f39cf..d5eab9958 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -33,7 +33,6 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
-#include "content/urldb.h"
#include "desktop/cookie_manager.h"
#include "desktop/tree.h"
#include "desktop/textinput.h"
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index 88c071c23..edef331f2 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -17,8 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Global history (implementation).
+/**
+ * \file
+ * Global history implementation for RISC OS.
*/
#include <assert.h>
@@ -30,7 +31,6 @@
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
-#include "content/urldb.h"
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/log.h"
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index 547c4608d..30a72db10 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -20,6 +20,9 @@
/**
* \file
* RISC OS URL bar implementation.
+ *
+ * The treeview resources are retrived from resource url necessitating
+ * the use of the hlcache content interface.
*/
#include <alloca.h>
@@ -36,6 +39,7 @@
#include "utils/messages.h"
#include "utils/utf8.h"
#include "utils/utils.h"
+#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
#include "netsurf/content.h"
@@ -104,28 +108,31 @@ static char suggest_icon[] = "gright";
static char suggest_validation[] = "R5;Sgright,pgright";
static char null_text_string[] = "";
+/** Treeview content resource data */
struct url_bar_resource {
const char *url;
struct hlcache_handle *c;
int height;
bool ready;
-}; /**< Treeview content resource data */
+};
+
enum url_bar_resource_id {
URLBAR_RES_HOTLIST_ADD = 0,
URLBAR_RES_HOTLIST_REMOVE,
URLBAR_RES_LAST
};
+
+/** Treeview content resources */
static struct url_bar_resource url_bar_res[URLBAR_RES_LAST] = {
{ "resource:icons/hotlist-add.png", NULL, 0, false },
{ "resource:icons/hotlist-rmv.png", NULL, 0, false }
-}; /**< Treeview content resources */
+};
static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set);
/* This is an exported interface documented in url_bar.h */
-
struct url_bar *ro_gui_url_bar_create(struct theme_descriptor *theme)
{
struct url_bar *url_bar;
@@ -1233,8 +1240,8 @@ bool ro_gui_url_bar_set_site_favicon(struct url_bar *url_bar,
bool ro_gui_url_bar_set_content_favicon(struct url_bar *url_bar,
struct gui_window *g)
{
- int type = 0;
- char sprite[URLBAR_FAVICON_NAME_LENGTH];
+ int type = 0;
+ char sprite[URLBAR_FAVICON_NAME_LENGTH];
struct hlcache_handle *h;
if (url_bar == NULL || g == NULL)
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index d4acbc687..1f5fc21d7 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -17,8 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Hotlist (implementation).
+/**
+ * \file
+ * Hotlist implementation for RISC OS.
*/
#include <ctype.h>
@@ -27,15 +28,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#include "oslib/osfile.h"
-#include "oslib/osmodule.h"
-#include "oslib/wimp.h"
+#include <oslib/osfile.h>
+#include <oslib/osmodule.h>
+#include <oslib/wimp.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
-#include "content/content.h"
-#include "content/hlcache.h"
#include "content/urldb.h"
#include "desktop/hotlist.h"
#include "desktop/tree.h"
diff --git a/frontends/riscos/menus.c b/frontends/riscos/menus.c
index 0b1ac1a2b..9807079d5 100644
--- a/frontends/riscos/menus.c
+++ b/frontends/riscos/menus.c
@@ -27,6 +27,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
+#include <stddef.h>
#include "oslib/os.h"
#include "oslib/osbyte.h"
#include "oslib/osgbpb.h"
@@ -36,9 +37,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utf8.h"
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "content/urldb.h"
#include "desktop/cookie_manager.h"
#include "desktop/textinput.h"
diff --git a/frontends/riscos/save_pdf.c b/frontends/riscos/save_pdf.c
index 3d6395629..c4262083d 100644
--- a/frontends/riscos/save_pdf.c
+++ b/frontends/riscos/save_pdf.c
@@ -25,14 +25,14 @@
#include <stdbool.h>
#include "oslib/osfile.h"
-#include "content/content.h"
-#include "content/hlcache.h"
+
+#include "utils/log.h"
+#include "utils/config.h"
#include "desktop/print.h"
#include "desktop/save_pdf/font_haru.h"
#include "desktop/save_pdf/pdf_plotters.h"
+
#include "riscos/save_pdf.h"
-#include "utils/log.h"
-#include "utils/config.h"
/**
* Export a content as a PDF file.
diff --git a/frontends/riscos/sslcert.c b/frontends/riscos/sslcert.c
index 7ab909dfa..c7b8db431 100644
--- a/frontends/riscos/sslcert.c
+++ b/frontends/riscos/sslcert.c
@@ -30,10 +30,6 @@
#include "oslib/wimp.h"
#include "utils/log.h"
-#include "content/content.h"
-#include "content/hlcache.h"
-#include "content/fetch.h"
-#include "content/urldb.h"
#include "desktop/sslcert_viewer.h"
#include "desktop/tree.h"
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index 81274484a..e4d498de3 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -31,7 +31,6 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "content/hlcache.h"
#include "netsurf/clipboard.h"
#include "netsurf/window.h"
#include "desktop/textinput.h"
diff --git a/frontends/riscos/theme.c b/frontends/riscos/theme.c
index 714b9e5a1..6e56fbca0 100644
--- a/frontends/riscos/theme.c
+++ b/frontends/riscos/theme.c
@@ -39,7 +39,6 @@
#include "utils/nsoption.h"
#include "utils/log.h"
-#include "content/content.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/theme_install.c b/frontends/riscos/theme_install.c
index fee126a86..43ecb4687 100644
--- a/frontends/riscos/theme_install.c
+++ b/frontends/riscos/theme_install.c
@@ -39,13 +39,13 @@
#include "riscos/wimp_event.h"
-static hlcache_handle *theme_install_content = NULL;
+static struct hlcache_handle *theme_install_content = NULL;
static struct theme_descriptor theme_install_descriptor;
wimp_w dialog_theme_install;
static void theme_install_close(wimp_w w);
-static nserror theme_install_callback(hlcache_handle *handle,
+static nserror theme_install_callback(struct hlcache_handle *handle,
const hlcache_event *event, void *pw);
static bool theme_install_read(const char *source_data,
unsigned long source_size);
@@ -55,7 +55,7 @@ static bool theme_install_read(const char *source_data,
* Handle a CONTENT_THEME that has started loading.
*/
-void theme_install_start(hlcache_handle *c)
+void theme_install_start(struct hlcache_handle *c)
{
assert(c != NULL);
assert(content_get_type(c) == CONTENT_THEME);
@@ -83,7 +83,7 @@ void theme_install_start(hlcache_handle *c)
* Callback for fetchcache() for theme install fetches.
*/
-nserror theme_install_callback(hlcache_handle *handle,
+nserror theme_install_callback(struct hlcache_handle *handle,
const hlcache_event *event, void *pw)
{
switch (event->type) {
diff --git a/frontends/riscos/toolbar.c b/frontends/riscos/toolbar.c
index 2f758f59f..23f64ad66 100644
--- a/frontends/riscos/toolbar.c
+++ b/frontends/riscos/toolbar.c
@@ -40,7 +40,6 @@
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "content/content.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/treeview.c b/frontends/riscos/treeview.c
index 1cae801db..a675283a5 100644
--- a/frontends/riscos/treeview.c
+++ b/frontends/riscos/treeview.c
@@ -39,7 +39,6 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "content/urldb.h"
#include "netsurf/plotters.h"
#include "desktop/textinput.h"
#include "desktop/tree.h"
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index cbd743f65..35efefb0b 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -56,7 +56,6 @@
#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 "desktop/cookie_manager.h"
@@ -120,10 +119,10 @@ static void ro_gui_window_scroll_action(struct gui_window *g,
static void ro_gui_window_toolbar_click(void *data,
toolbar_action_type action_type, union toolbar_action action);
-static bool ro_gui_window_content_export_types(hlcache_handle *h,
+static bool ro_gui_window_content_export_types(struct hlcache_handle *h,
bool *export_draw, bool *export_sprite);
static void ro_gui_window_prepare_pageinfo(struct gui_window *g);
-static void ro_gui_window_prepare_objectinfo(hlcache_handle *object,
+static void ro_gui_window_prepare_objectinfo(struct hlcache_handle *object,
nsurl *target_url);
static void ro_gui_window_launch_url(struct gui_window *g, const char *url);
@@ -186,9 +185,9 @@ static wimp_menu *ro_gui_browser_window_menu = NULL;
/** Menu of options for form select controls. */
static wimp_menu *gui_form_select_menu = NULL;
/** Main content object under menu, or 0 if none. */
-static hlcache_handle *current_menu_main = 0;
+static struct hlcache_handle *current_menu_main = 0;
/** Object under menu, or 0 if no object. */
-static hlcache_handle *current_menu_object = 0;
+static struct hlcache_handle *current_menu_object = 0;
/** URL of link under menu, or 0 if no link. */
static nsurl *current_menu_url = 0;
@@ -1094,7 +1093,7 @@ static void gui_window_stop_throbber(struct gui_window *g)
* set favicon
*/
-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)
{
if (g == NULL || g->toolbar == NULL)
return;
@@ -2388,7 +2387,7 @@ void ro_gui_window_menu_warning(wimp_w w, wimp_i i, wimp_menu *menu,
wimp_selection *selection, menu_action action)
{
struct gui_window *g;
- hlcache_handle *h;
+ struct hlcache_handle *h;
struct toolbar *toolbar;
bool export;
@@ -2594,7 +2593,7 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
{
struct gui_window *g;
struct browser_window *bw;
- hlcache_handle *h;
+ struct hlcache_handle *h;
struct toolbar *toolbar;
wimp_window_state state;
nsurl *url;
@@ -3356,7 +3355,7 @@ void ro_gui_window_iconise(struct gui_window *g,
struct bitmap *bitmap;
osspriteop_area *area;
int width = 34, height = 34;
- hlcache_handle *h;
+ struct hlcache_handle *h;
os_error *error;
int len, id;
@@ -3727,7 +3726,7 @@ bool ro_gui_window_check_menu(wimp_menu *menu)
* \return true if valid data is returned; else false.
*/
-bool ro_gui_window_content_export_types(hlcache_handle *h,
+bool ro_gui_window_content_export_types(struct hlcache_handle *h,
bool *export_draw, bool *export_sprite)
{
bool found_type = false;
@@ -3768,7 +3767,7 @@ bool ro_gui_window_content_export_types(hlcache_handle *h,
void ro_gui_window_prepare_pageinfo(struct gui_window *g)
{
- hlcache_handle *h = browser_window_get_content(g->bw);
+ struct hlcache_handle *h = browser_window_get_content(g->bw);
char icon_buf[20] = "file_xxx";
char enc_buf[40];
const char *icon = icon_buf;
@@ -3823,7 +3822,7 @@ void ro_gui_window_prepare_pageinfo(struct gui_window *g)
* \param *target_url corresponding url, if any
*/
-void ro_gui_window_prepare_objectinfo(hlcache_handle *object, nsurl *target_url)
+void ro_gui_window_prepare_objectinfo(struct hlcache_handle *object, nsurl *target_url)
{
char icon_buf[20] = "file_xxx";
const char *url;
@@ -3974,7 +3973,7 @@ void ro_gui_window_action_local_history(struct gui_window *g)
void ro_gui_window_action_save(struct gui_window *g, gui_save_type save_type)
{
- hlcache_handle *h;
+ struct hlcache_handle *h;
if (g == NULL || g->bw == NULL || !browser_window_has_content(g->bw))
return;