cleanup RISC OS frontend header usage

This commit is contained in:
Vincent Sanders 2014-06-05 15:14:49 +01:00
parent f1c2dde13b
commit 54fcb66d87
24 changed files with 182 additions and 166 deletions

View File

@ -78,13 +78,14 @@ typedef enum browser_mouse_state {
} browser_mouse_state;
typedef enum { GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
GUI_POINTER_MENU, GUI_POINTER_UP, GUI_POINTER_DOWN,
GUI_POINTER_LEFT, GUI_POINTER_RIGHT, GUI_POINTER_RU,
GUI_POINTER_LD, GUI_POINTER_LU, GUI_POINTER_RD,
GUI_POINTER_CROSS, GUI_POINTER_MOVE, GUI_POINTER_WAIT,
GUI_POINTER_HELP, GUI_POINTER_NO_DROP, GUI_POINTER_NOT_ALLOWED,
GUI_POINTER_PROGRESS } gui_pointer_shape;
typedef enum gui_pointer_shape {
GUI_POINTER_DEFAULT, GUI_POINTER_POINT, GUI_POINTER_CARET,
GUI_POINTER_MENU, GUI_POINTER_UP, GUI_POINTER_DOWN,
GUI_POINTER_LEFT, GUI_POINTER_RIGHT, GUI_POINTER_RU,
GUI_POINTER_LD, GUI_POINTER_LU, GUI_POINTER_RD,
GUI_POINTER_CROSS, GUI_POINTER_MOVE, GUI_POINTER_WAIT,
GUI_POINTER_HELP, GUI_POINTER_NO_DROP, GUI_POINTER_NOT_ALLOWED,
GUI_POINTER_PROGRESS } gui_pointer_shape;
/** Mouse pointer type */
typedef enum {

View File

@ -19,19 +19,22 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "swis.h"
#include "oslib/colourtrans.h"
#include "oslib/os.h"
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
#include "oslib/wimpreadsysinfo.h"
#include <swis.h>
#include <oslib/colourtrans.h>
#include <oslib/os.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <oslib/wimpreadsysinfo.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "riscos/buffer.h"
#include "riscos/gui.h"
#include "utils/nsoption.h"
#include "riscos/tinct.h"
#include "riscos/wimp.h"
#include "riscos/wimputils.h"
#include "utils/log.h"
#define BUFFER_EXCLUSIVE_USER_REDRAW "Only support pure user redraw (faster)"
//#define BUFFER_EMULATE_32BPP "Redirect to a 32bpp sprite and plot with Tinct"

View File

@ -25,18 +25,20 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "oslib/os.h"
#include "oslib/osbyte.h"
#include "oslib/territory.h"
#include "oslib/wimp.h"
#include <oslib/os.h>
#include <oslib/osbyte.h>
#include <oslib/territory.h>
#include <oslib/wimp.h>
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "riscos/dialog.h"
#include "riscos/configure.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/configure/configure.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#define CONFIGURE_ICON_PADDING_H 32
#define CONFIGURE_ICON_PADDING_V 32

View File

@ -17,18 +17,20 @@
*/
#include <stdbool.h>
#include "css/css.h"
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "desktop/plot_style.h"
#include "css/css.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
#include "riscos/font.h"
#include "riscos/menus.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/configure.h"
#include "riscos/configure/configure.h"
#include "utils/messages.h"
#include "utils/utils.h"
#define FONT_SANS_FIELD 3

View File

@ -17,15 +17,16 @@
*/
#include <stdbool.h>
#include "utils/nsoption.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
#include "utils/nsoption.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/configure.h"
#include "riscos/configure/configure.h"
#define INTERFACE_STRIP_EXTNS_OPTION 2
#define INTERFACE_CONFIRM_OVWR_OPTION 3
#define INTERFACE_URL_COMPLETE_OPTION 6

View File

@ -22,19 +22,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "utils/config.h"
#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "oslib/colourtrans.h"
#include "oslib/osfile.h"
#include "oslib/osgbpb.h"
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
#include "rufl.h"
#include "utils/config.h"
#include <oslib/colourtrans.h>
#include <oslib/osfile.h>
#include <oslib/osgbpb.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/url.h"
#include "utils/utils.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "render/font.h"
#include "riscos/configure.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
@ -42,7 +50,6 @@
#include "riscos/gui.h"
#include "riscos/hotlist.h"
#include "riscos/menus.h"
#include "utils/nsoption.h"
#include "riscos/save.h"
#include "riscos/sslcert.h"
#include "riscos/toolbar.h"
@ -51,10 +58,6 @@
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/url.h"
#include "utils/utils.h"
#define ICON_ZOOM_VALUE 1
#define ICON_ZOOM_DEC 2

View File

@ -23,6 +23,8 @@
#ifndef _NETSURF_RISCOS_FILETYPE_H_
#define _NETSURF_RISCOS_FILETYPE_H_
#include "content/content_type.h"
#ifndef FILETYPE_ACORN_URI
#define FILETYPE_ACORN_URI 0xf91
#endif

View File

@ -17,25 +17,29 @@
*/
/** \file
* Font handling (RISC OS implementation).
* RISC OS implementation of Font handling.
*
* The RUfl is used handle and render fonts.
* The RUfl is used to handle and render fonts.
*/
#include "utils/config.h"
#include <assert.h>
#include <string.h>
#include "oslib/wimp.h"
#include "oslib/wimpreadsysinfo.h"
#include "rufl.h"
#include <oslib/wimp.h>
#include <oslib/wimpreadsysinfo.h>
#include "css/css.h"
#include "css/utils.h"
#include "render/font.h"
#include "riscos/gui.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/font.h"
static void nsfont_check_option(char **option, const char *family,
const char *fallback);
static int nsfont_list_cmp(const void *keyval, const void *datum);

View File

@ -51,6 +51,7 @@
#include "desktop/save_complete.h"
#include "desktop/treeview.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "content/urldb.h"
#include "content/hlcache.h"
#include "content/backing_store.h"
@ -78,6 +79,7 @@
#include "riscos/mouse.h"
#include "riscos/ucstables.h"
#include "riscos/filetype.h"
#include "riscos/font.h"
#include "riscos/content-handlers/artworks.h"
#include "riscos/content-handlers/draw.h"
#include "riscos/content-handlers/sprite.h"

View File

@ -21,15 +21,7 @@
#ifndef _NETSURF_RISCOS_GUI_H_
#define _NETSURF_RISCOS_GUI_H_
#include <stdbool.h>
#include <stdlib.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <rufl.h>
#include "desktop/browser.h"
#include "content/content_type.h"
#include "utils/config.h"
#define RISCOS5 0xAA
@ -53,6 +45,10 @@ struct node;
struct history;
struct css_style;
struct ssl_cert_info;
struct nsurl;
struct hlcache_handle;
enum gui_pointer_shape;
extern wimp_t task_handle; /**< RISC OS wimp task handle. */
@ -76,12 +72,6 @@ typedef enum { GUI_DRAG_NONE, GUI_DRAG_DOWNLOAD_SAVE, GUI_DRAG_SAVE }
extern ro_gui_drag_type gui_current_drag_type;
/** desktop font, size and style being used */
extern char ro_gui_desktop_font_family[];
extern int ro_gui_desktop_font_size;
extern rufl_style ro_gui_desktop_font_style;
/** RISC OS data for a browser window. */
struct gui_window {
/** Associated platform-independent browser window data. */
@ -133,7 +123,7 @@ extern struct gui_download_table *riscos_download_table;
/* in 401login.c */
void ro_gui_401login_init(void);
void gui_401login_open(nsurl *url, const char *realm,
void gui_401login_open(struct nsurl *url, const char *realm,
nserror (*cb)(bool proceed, void *pw), void *cbpw);
/* in window.c */
@ -156,14 +146,14 @@ bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y,
os_coord *pos);
bool ro_gui_window_to_screen_pos(struct gui_window *g, int x, int y,
os_coord *pos);
browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
enum browser_mouse_state ro_gui_mouse_click_state(wimp_mouse_state buttons,
wimp_icon_flags type);
browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons,
enum browser_mouse_state ro_gui_mouse_drag_state(wimp_mouse_state buttons,
wimp_icon_flags type);
bool ro_gui_shift_pressed(void);
bool ro_gui_ctrl_pressed(void);
bool ro_gui_alt_pressed(void);
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape);
void gui_window_set_pointer(struct gui_window *g, enum gui_pointer_shape shape);
void gui_create_form_select_menu(struct browser_window *bw, struct form_control *control);
/* in history.c */
@ -200,17 +190,6 @@ struct gui_search_table *riscos_search_table;
void ro_gui_print_init(void);
void ro_gui_print_prepare(struct gui_window *g);
/* in font.c */
void nsfont_init(void);
bool nsfont_exists(const char *font_family);
const char *nsfont_fallback_font(void);
bool nsfont_paint(const plot_font_style_t *fstyle, const char *string,
size_t length, int x, int y);
void nsfont_read_style(const plot_font_style_t *fstyle,
const char **font_family, unsigned int *font_size,
rufl_style *font_style);
void ro_gui_wimp_get_desktop_font(void);
/* in plotters.c */
extern const struct plotter_table ro_plotters;
extern int ro_plot_origin_x;
@ -220,7 +199,7 @@ extern int ro_plot_origin_y;
bool ro_gui_theme_install_apply(wimp_w w);
/* in sslcert.c */
void gui_cert_verify(nsurl *url,
void gui_cert_verify(struct nsurl *url,
const struct ssl_cert_info *certs, unsigned long num,
nserror (*cb)(bool proceed, void *pw), void *cbpw);

View File

@ -26,18 +26,20 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "oslib/dragasprite.h"
#include "oslib/os.h"
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
#include <oslib/dragasprite.h>
#include <oslib/os.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <oslib/wimpspriteop.h>
#include "utils/log.h"
#include "utils/utils.h"
#include "riscos/gui/button_bar.h"
#include "riscos/gui.h"
#include "riscos/mouse.h"
#include "riscos/theme.h"
#include "riscos/wimp.h"
#include "utils/log.h"
#include "utils/utils.h"
#define BUTTONBAR_SPRITE_NAME_LENGTH 12
#define BUTTONBAR_VALIDATION_LENGTH 40

View File

@ -31,10 +31,12 @@
#include "desktop/plotters.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "riscos/font.h"
#include "riscos/gui/progress_bar.h"
#include "riscos/gui/status_bar.h"

View File

@ -37,6 +37,7 @@
#include "utils/utils.h"
#include "content/hlcache.h"
#include "content/content.h"
#include "desktop/browser.h"
#include "riscos/gui.h"
#include "riscos/hotlist.h"

View File

@ -20,32 +20,25 @@
* Interactive help (implementation).
*/
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include "oslib/help.h"
#include "oslib/os.h"
#include "oslib/taskmanager.h"
#include "oslib/wimp.h"
#include "desktop/tree.h"
#include "riscos/cookies.h"
#include "riscos/global_history.h"
#include "riscos/gui.h"
#include "riscos/hotlist.h"
#include "riscos/help.h"
#include "riscos/iconbar.h"
#include "riscos/menus.h"
#include "utils/nsoption.h"
#include "riscos/treeview.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/window.h"
#include "utils/messages.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "riscos/ucstables.h"
#include <oslib/wimp.h>
#include <oslib/taskmanager.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/utf8.h"
#include "riscos/treeview.h"
#include "riscos/help.h"
#include "riscos/wimp_event.h"
#include "riscos/hotlist.h"
#include "riscos/global_history.h"
#include "riscos/cookies.h"
#include "riscos/wimp.h"
#include "riscos/iconbar.h"
#include "riscos/window.h"
#include "riscos/ucstables.h"
/* Recognised help keys
====================

View File

@ -36,6 +36,8 @@
#include "riscos/menus.h"
struct nsurl;
void ro_gui_hotlist_preinitialise(void);
void ro_gui_hotlist_postinitialise(void);
void ro_gui_hotlist_destroy(void);
@ -43,9 +45,9 @@ void ro_gui_hotlist_open(void);
void ro_gui_hotlist_save(void);
bool ro_gui_hotlist_check_window(wimp_w window);
bool ro_gui_hotlist_check_menu(wimp_menu *menu);
void ro_gui_hotlist_add_page(nsurl *url);
void ro_gui_hotlist_add_page(struct nsurl *url);
void ro_gui_hotlist_add_cleanup(void);
void ro_gui_hotlist_remove_page(nsurl *url);
bool ro_gui_hotlist_has_page(nsurl *url);
void ro_gui_hotlist_remove_page(struct nsurl *url);
bool ro_gui_hotlist_has_page(struct nsurl *url);
#endif

View File

@ -28,23 +28,24 @@
#include <string.h>
#include <time.h>
#include <features.h>
#include <oslib/os.h>
#include <oslib/osbyte.h>
#include <oslib/wimp.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "oslib/os.h"
#include "oslib/osbyte.h"
#include "oslib/wimp.h"
#include "riscos/configure.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
#include "riscos/hotlist.h"
#include "riscos/iconbar.h"
#include "desktop/netsurf.h"
#include "desktop/browser.h"
#include "utils/nsoption.h"
#include "riscos/wimp_event.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
static bool ro_gui_iconbar_click(wimp_pointer *pointer);

View File

@ -17,16 +17,17 @@
*/
#include <stdbool.h>
#include "swis.h"
#include "oslib/colourtrans.h"
#include "oslib/osspriteop.h"
#include "riscos/image.h"
#include "riscos/gui.h"
#include <swis.h>
#include <oslib/colourtrans.h>
#include <oslib/osspriteop.h>
#include "utils/nsoption.h"
#include "riscos/tinct.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "riscos/image.h"
#include "riscos/gui.h"
#include "riscos/tinct.h"
static bool image_redraw_tinct(osspriteop_id header, int x, int y,
int req_width, int req_height, int width, int height,

View File

@ -25,13 +25,16 @@
#include "oslib/colourtrans.h"
#include "oslib/draw.h"
#include "oslib/os.h"
#include "utils/log.h"
#include "desktop/plotters.h"
#include "render/font.h"
#include "riscos/bitmap.h"
#include "riscos/image.h"
#include "riscos/gui.h"
#include "riscos/font.h"
#include "riscos/oslib_pre7.h"
#include "utils/log.h"
static bool ro_plot_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style);

View File

@ -21,29 +21,32 @@
#include <assert.h>
#include <string.h>
#include "swis.h"
#include "oslib/font.h"
#include "oslib/hourglass.h"
#include "oslib/osfile.h"
#include "oslib/osfind.h"
#include "oslib/pdriver.h"
#include "oslib/wimp.h"
#include "rufl.h"
#include <swis.h>
#include <oslib/font.h>
#include <oslib/hourglass.h>
#include <oslib/osfile.h>
#include <oslib/osfind.h>
#include <oslib/pdriver.h>
#include <oslib/wimp.h>
#include <rufl.h>
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "content/content.h"
#include "content/hlcache.h"
#include "desktop/browser_private.h"
#include "utils/nsoption.h"
#include "desktop/plotters.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
#include "riscos/print.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "riscos/filetype.h"
#include "riscos/font.h"
#define ICON_PRINT_TO_BOTTOM 1

View File

@ -18,17 +18,17 @@
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "riscos/dialog.h"
#include "riscos/query.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "riscos/ucstables.h"
#define ICON_QUERY_MESSAGE 0

View File

@ -26,18 +26,21 @@
#include <assert.h>
#include <limits.h>
#include "oslib/draw.h"
#include "oslib/osfile.h"
#include "pencil.h"
#include "content/content.h"
#include "content/hlcache.h"
#include "desktop/plotters.h"
#include "riscos/bitmap.h"
#include "riscos/gui.h"
#include "riscos/save_draw.h"
#include <oslib/draw.h>
#include <oslib/osfile.h>
#include <pencil.h>
#include "utils/log.h"
#include "utils/types.h"
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
#include "desktop/plotters.h"
#include "riscos/bitmap.h"
#include "riscos/gui.h"
#include "riscos/save_draw.h"
#include "riscos/font.h"
static bool ro_save_draw_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style);
static bool ro_save_draw_line(int x0, int y0, int x1, int y1, const plot_style_t *style);

View File

@ -24,13 +24,17 @@
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "swis.h"
#include "oslib/colourtrans.h"
#include "oslib/osbyte.h"
#include "oslib/serviceinternational.h"
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
#include "rufl.h"
#include <swis.h>
#include <oslib/colourtrans.h>
#include <oslib/osbyte.h>
#include <oslib/serviceinternational.h>
#include <oslib/wimp.h>
#include <oslib/wimpspriteop.h>
#include "utils/log.h"
#include "utils/utf8.h"
#include "desktop/browser.h"
#include "riscos/gui.h"
#include "riscos/oslib_pre7.h"
#include "riscos/textarea.h"
@ -38,8 +42,6 @@
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "utils/log.h"
#include "utils/utf8.h"
#define MARGIN_LEFT 8
#define MARGIN_RIGHT 8

View File

@ -32,6 +32,7 @@
#include "content/hlcache.h"
#include "desktop/gui.h"
#include "desktop/textinput.h"
#include "desktop/browser.h"
#include "riscos/gui.h"
#include "riscos/menus.h"

View File

@ -25,19 +25,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "oslib/wimp.h"
#include "content/urldb.h"
#include <oslib/wimp.h>
#include "utils/log.h"
#include "utils/nsoption.h"
#include "utils/utils.h"
#include "content/urldb.h"
#include "desktop/browser.h"
#include "riscos/global_history.h"
#include "riscos/gui.h"
#include "riscos/mouse.h"
#include "utils/nsoption.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "utils/utils.h"
#include "riscos/filetype.h"
#define MAXIMUM_VISIBLE_LINES 7