remove unecessary risc os frontend usage of content headers

This commit is contained in:
Vincent Sanders 2016-06-10 11:53:28 +01:00
parent 8fdf262683
commit 3153335fde
14 changed files with 43 additions and 50 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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"

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -39,7 +39,6 @@
#include "utils/nsoption.h"
#include "utils/log.h"
#include "content/content.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"

View File

@ -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) {

View File

@ -40,7 +40,6 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "content/content.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"

View File

@ -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"

View File

@ -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;