NetSurf
Macros | Functions | Variables
gui.c File Reference
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <signal.h>
#include <unixlib/local.h>
#include <fpu_control.h>
#include <oslib/help.h>
#include <oslib/uri.h>
#include <oslib/inetsuite.h>
#include <oslib/pdriver.h>
#include <oslib/osfile.h>
#include <oslib/hourglass.h>
#include <oslib/osgbpb.h>
#include <oslib/osbyte.h>
#include <oslib/osmodule.h>
#include <oslib/osfscontrol.h>
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/file.h"
#include "utils/filename.h"
#include "utils/url.h"
#include "utils/corestrings.h"
#include "netsurf/fetch.h"
#include "netsurf/misc.h"
#include "netsurf/content.h"
#include "netsurf/netsurf.h"
#include "netsurf/browser_window.h"
#include "netsurf/cookie_db.h"
#include "netsurf/url_db.h"
#include "desktop/save_complete.h"
#include "desktop/hotlist.h"
#include "content/backing_store.h"
#include "riscos/gui.h"
#include "riscos/bitmap.h"
#include "riscos/wimputils.h"
#include "riscos/hotlist.h"
#include "riscos/buffer.h"
#include "riscos/textselection.h"
#include "riscos/print.h"
#include "riscos/save.h"
#include "riscos/dialog.h"
#include "riscos/wimp.h"
#include "riscos/message.h"
#include "riscos/help.h"
#include "riscos/query.h"
#include "riscos/window.h"
#include "riscos/toolbar.h"
#include "riscos/corewindow.h"
#include "riscos/iconbar.h"
#include "riscos/local_history.h"
#include "riscos/global_history.h"
#include "riscos/cookies.h"
#include "riscos/pageinfo.h"
#include "riscos/wimp_event.h"
#include "riscos/uri.h"
#include "riscos/url_protocol.h"
#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"
Include dependency graph for gui.c:

Go to the source code of this file.

Macros

#define CHOICES_PREFIX   "<Choices$Write>.WWW.NetSurf."
 
#define DIR_SEP   ('.')
 

Functions

static nsurlgui_get_resource_url (const char *path)
 Callback to translate resource to full url for RISC OS. More...
 
static nserror set_colour_from_wimp (struct nsoption_s *opts, wimp_colour wimp, enum nsoption_e option, colour def_colour)
 Set colour option from wimp. More...
 
static nserror set_defaults (struct nsoption_s *defaults)
 Set option defaults for riscos frontend. More...
 
static void ro_gui_create_dirs (void)
 Create intermediate directories for Choices and User Data files. More...
 
static void ro_gui_cleanup (void)
 Ensures the gui exits cleanly. More...
 
static void ro_gui_signal (int sig)
 Handles a signal. More...
 
static bool ro_gui_uri_file_parse_line (FILE *fp, char *b)
 Read a "line" from an Acorn URI file. More...
 
static char * ro_gui_uri_file_parse (const char *file_name, char **uri_title)
 Parse an Acorn URI file. More...
 
static char * ro_gui_url_file_parse (const char *file_name)
 Parse an ANT URL file. More...
 
static char * ro_gui_ieurl_file_parse (const char *file_name)
 Parse an IEURL file. More...
 
static void ro_msg_dataopen (wimp_message *message)
 Handle Message_DataOpen (double-click on file in the Filer). More...
 
static void ro_msg_dataload (wimp_message *message)
 Handle Message_DataLoad (file dragged in). More...
 
static void ro_msg_terminate_filename (wimp_full_message_data_xfer *message)
 Ensure that the filename in a data transfer message is NULL terminated (some applications, especially BASIC programs use CR) More...
 
static void ro_msg_datasave (wimp_message *message)
 Handle Message_DataSave. More...
 
static void ro_msg_datasave_ack (wimp_message *message)
 Handle Message_DataSaveAck. More...
 
static void ro_msg_prequit (wimp_message *message)
 Handle PreQuit message. More...
 
static void ro_msg_save_desktop (wimp_message *message)
 Handle SaveDesktop message. More...
 
static void ro_msg_window_info (wimp_message *message)
 Handle WindowInfo message (part of the iconising protocol) More...
 
static void ro_gui_get_screen_properties (void)
 Get screen properties following a mode change. More...
 
static void ro_gui_check_resolvers (void)
 Warn the user if Inet$Resolvers is not set. More...
 
static bool ro_gui__os_alpha_sprites_supported (void)
 Determine whether the OS version supports alpha channels. More...
 
static nserror gui_init (int argc, char **argv)
 Initialise the RISC OS specific GUI. More...
 
const char * ro_gui_default_language (void)
 Determine the default language to use. More...
 
static nserror ro_path_to_nsurl (const char *path, struct nsurl **url_out)
 Create a nsurl from a RISC OS pathname. More...
 
static nserror ro_nsurl_to_path (struct nsurl *url, char **path_out)
 Create a path from a nsurl using posix file handling. More...
 
static bool nslog_stream_configure (FILE *fptr)
 Ensures output logging stream is correctly configured. More...
 
static void gui_quit (void)
 Close down the gui (RISC OS). More...
 
static void ro_gui_close_window_request (wimp_close *close)
 Handle Close_Window_Request events. More...
 
static void ro_gui_keypress_cb (void *pw)
 Handle key press paste callback. More...
 
static void ro_gui_keypress (wimp_key *key)
 Handle gui keypress. More...
 
static void ro_gui_user_message (wimp_event_no event, wimp_message *message)
 Handle the three User_Message events. More...
 
static void ro_gui_handle_event (wimp_event_no event, wimp_block *block)
 Process a Wimp_Poll event. More...
 
static void riscos_poll (void)
 Poll the RISC OS wimp for events. More...
 
void ro_gui_open_window_request (wimp_open *open)
 Handle Open_Window_Request events. More...
 
static void ro_gui_view_source_bounce (wimp_message *message)
 source bounce callback. More...
 
void ro_gui_view_source (struct hlcache_handle *c)
 Send the source of a content to a text editor. More...
 
static nserror gui_launch_url (struct nsurl *url)
 Broadcast an URL that we can't handle. More...
 
static void ro_gui_choose_language (void)
 Choose the language to use. More...
 
nserror ro_warn_user (const char *warning, const char *detail)
 Display a warning for a serious problem (eg memory exhaustion). More...
 
void die (const char *const error)
 Display an error and exit. More...
 
bool ro_gui_prequit (void)
 Test whether it's okay to shutdown, prompting the user if not. More...
 
static nserror riscos_mkpath (char **str, size_t *size, size_t nelm, va_list ap)
 Generate a riscos path from one or more component elemnts. More...
 
static nserror riscos_basename (const char *path, char **str, size_t *size)
 Get the basename of a file using posix path handling. More...
 
static nserror riscos_mkdir_all (const char *fname)
 Ensure that all directory elements needed to store a filename exist. More...
 
void ro_gui_screen_size (int *width, int *height)
 Find screen size in OS units. More...
 
void ro_gui_dump_browser_window (struct browser_window *bw)
 Send the debug dump of a content to a text editor. More...
 
static char * get_cachepath (void)
 
int main (int argc, char **argv)
 Normal entry point from RISC OS. More...
 

Variables

bool riscos_done = false
 
bool ro_plot_patterned_lines
 One version of the A9home OS is incapable of drawing patterned lines. More...
 
int os_version = 0
 
bool os_alpha_sprite_supported = false
 
const char *const __dynamic_da_name = "NetSurf"
 For UnixLib. More...
 
int __dynamic_da_max_size = 128 * 1024 * 1024
 For UnixLib. More...
 
int __feature_imagefs_is_file = 1
 For UnixLib. More...
 
int __riscosify_control
 
int __dynamic_num
 
const char * NETSURF_DIR
 
static const char * task_name = "NetSurf"
 
ro_gui_drag_type gui_current_drag_type
 
wimp_t task_handle
 RISC OS wimp task handle. More...
 
static clock_t gui_last_poll
 Time of last wimp_poll. More...
 
osspriteop_area * gui_sprites
 Sprite area containing pointer and hotlist sprites. More...
 
static ns_wimp_message_list task_messages
 Accepted wimp user messages. More...
 
struct {
   int   width
 
   int   height
 
screen_info
 
static struct gui_file_table riscos_file_table
 
static struct gui_fetch_table riscos_fetch_table
 
static struct gui_misc_table riscos_misc_table
 

Macro Definition Documentation

◆ CHOICES_PREFIX

#define CHOICES_PREFIX   "<Choices$Write>.WWW.NetSurf."

Definition at line 113 of file gui.c.

◆ DIR_SEP

#define DIR_SEP   ('.')

Definition at line 120 of file gui.c.

Function Documentation

◆ die()

void die ( const char *const  error)

Display an error and exit.

Cause an abnormal program termination.

Should only be used during initialisation.

Definition at line 2119 of file gui.c.

References messages_get(), and NSLOG.

Referenced by gui_init(), main(), ro_gui_choose_language(), and ro_gui_create_dirs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cachepath()

static char * get_cachepath ( void  )
static

Definition at line 2404 of file gui.c.

References netsurf_mkpath(), NSERROR_OK, and NSLOG.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gui_get_resource_url()

static nsurl * gui_get_resource_url ( const char *  path)
static

Callback to translate resource to full url for RISC OS.

Transforms a resource: path into a full URL. The returned URL is used as the target for a redirect. The caller takes ownership of the returned nsurl including unrefing it when finished with it.

Parameters
pathThe path of the resource to locate.
Returns
A string containing the full URL of the target object or NULL if no suitable resource can be found.

Definition at line 176 of file gui.c.

References nsurl_create(), path(), ro_gui_default_language(), and SLEN.

Here is the call graph for this function:

◆ gui_init()

static nserror gui_init ( int  argc,
char **  argv 
)
static

Initialise the RISC OS specific GUI.

Parameters
argcThe number of command line arguments.
argvThe string vector of command line arguments.

Definition at line 1123 of file gui.c.

References base, browser_window_create(), BW_CREATE_HISTORY, die(), filename_initialise(), gui_sprites, hotlist_init(), hotlist_save(), NETSURF_DIR, netsurf_path_to_nsurl(), NSERROR_BAD_PARAMETER, NSERROR_OK, nsfont_init(), NSLOG, nsoption_bool, nsoption_charp, nsurl_create(), nsurl_unref(), os_alpha_sprite_supported, os_version, path(), PTR_WIMP_MESSAGE_LIST, ro_gui__os_alpha_sprites_supported(), ro_gui_check_resolvers(), ro_gui_cleanup(), ro_gui_create_dirs(), ro_gui_dialog_init(), ro_gui_download_init(), ro_gui_get_screen_properties(), ro_gui_iconbar_initialise(), ro_gui_interactive_help_request(), ro_gui_load_sprite_file(), ro_gui_menu_init(), ro_gui_query_init(), ro_gui_selection_drag_claim(), ro_gui_selection_dragging(), ro_gui_signal(), ro_gui_theme_initialise(), ro_gui_url_bar_init(), ro_gui_url_file_parse(), ro_gui_wimp_get_desktop_font(), ro_gui_window_initialise(), ro_message_register_route(), ro_msg_dataopen(), ro_msg_datasave(), ro_msg_datasave_ack(), ro_msg_prequit(), ro_msg_save_desktop(), ro_msg_window_info(), ro_plot_patterned_lines, ro_toolbar_init(), save_complete_init(), task_handle, task_messages, task_name, urldb_load(), and urldb_load_cookies().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gui_launch_url()

static nserror gui_launch_url ( struct nsurl url)
static

Broadcast an URL that we can't handle.

Definition at line 2034 of file gui.c.

References NSERROR_OK, nsurl_access(), and ro_url_broadcast().

Here is the call graph for this function:

◆ gui_quit()

static void gui_quit ( void  )
static

Close down the gui (RISC OS).

Definition at line 1600 of file gui.c.

References gui_sprites, nsoption_charp, ro_gui_cookies_finalise(), ro_gui_global_history_finalise(), ro_gui_hotlist_finalise(), ro_gui_local_history_finalise(), ro_gui_pageinfo_finalise(), ro_gui_saveas_quit(), ro_gui_url_bar_fini(), ro_gui_window_quit(), task_handle, urldb_save(), and urldb_save_cookies().

Here is the call graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

◆ nslog_stream_configure()

static bool nslog_stream_configure ( FILE *  fptr)
static

Ensures output logging stream is correctly configured.

Definition at line 1588 of file gui.c.

Referenced by main().

Here is the caller graph for this function:

◆ riscos_basename()

static nserror riscos_basename ( const char *  path,
char **  str,
size_t *  size 
)
static

Get the basename of a file using posix path handling.

This gets the last element of a path and returns it. The returned element has all forward slashes translated into riscos directory separators.

Parameters
[in]pathThe path to extract the name from.
[in,out]strPointer to string pointer if this is NULL enough storage will be allocated for the path element.
[in,out]sizeThe size of the space available if str not NULL on input and set to the total output length on output.
Returns
NSERROR_OK and the complete path is written to str or error code on faliure.
Todo:
check this leafname translation is actually required

Definition at line 2275 of file gui.c.

References DIR_SEP, NSERROR_BAD_PARAMETER, NSERROR_NOMEM, NSERROR_OK, and path().

Here is the call graph for this function:

◆ riscos_mkdir_all()

static nserror riscos_mkdir_all ( const char *  fname)
static

Ensure that all directory elements needed to store a filename exist.

Given a path of x.y.z directories x and x.y will be created.

Parameters
fnameThe filename to ensure the path to exists.
Returns
NSERROR_OK on success or error code on failure.

Definition at line 2321 of file gui.c.

References NSERROR_OK.

◆ riscos_mkpath()

static nserror riscos_mkpath ( char **  str,
size_t *  size,
size_t  nelm,
va_list  ap 
)
static

Generate a riscos path from one or more component elemnts.

Constructs a complete path element from passed components. The second (and subsequent) components have a slash substituted for all riscos directory separators.

If a string is allocated it must be freed by the caller.

Parameters
[in,out]strpointer to string pointer if this is NULL enough storage will be allocated for the complete path.
[in,out]sizeThe size of the space available if str not NULL on input and if not NULL set to the total output length on output.
[in]nelmThe number of elements.
[in]apThe elements of the path as string pointers.
Returns
NSERROR_OK and the complete path is written to str or error code on faliure.

Definition at line 2170 of file gui.c.

References DIR_SEP, NSERROR_BAD_PARAMETER, NSERROR_NOMEM, NSERROR_NOSPACE, and NSERROR_OK.

◆ riscos_poll()

static void riscos_poll ( void  )
static

Poll the RISC OS wimp for events.

Definition at line 1853 of file gui.c.

References gui_last_poll, ro_gui_handle_event(), ro_gui_window_update_boxes(), ro_mouse_poll_interval(), sched_active, sched_time, and schedule_run().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui__os_alpha_sprites_supported()

static bool ro_gui__os_alpha_sprites_supported ( void  )
static

Determine whether the OS version supports alpha channels.

Returns
true iff alpha channels are supported, false otherwise.

Definition at line 1099 of file gui.c.

References alpha_SPRITE_MODE, and NSLOG.

Referenced by gui_init().

Here is the caller graph for this function:

◆ ro_gui_check_resolvers()

static void ro_gui_check_resolvers ( void  )
static

Warn the user if Inet$Resolvers is not set.

Definition at line 1082 of file gui.c.

References NSLOG, and ro_warn_user().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_choose_language()

static void ro_gui_choose_language ( void  )
static

Choose the language to use.

Definition at line 2045 of file gui.c.

References die(), is_dir(), nsoption_charp, nsoption_set_charp, nsoption_setnull_charp, path(), and ro_gui_default_language().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_cleanup()

static void ro_gui_cleanup ( void  )
static

Ensures the gui exits cleanly.

Definition at line 386 of file gui.c.

References ro_gui_buffer_close().

Referenced by gui_init(), and ro_gui_signal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_close_window_request()

static void ro_gui_close_window_request ( wimp_close *  close)
static

Handle Close_Window_Request events.

Definition at line 1622 of file gui.c.

References ro_gui_alt_pressed(), ro_gui_dialog_close(), ro_gui_wimp_event_close_window(), and ro_gui_window_close_all.

Referenced by ro_gui_handle_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_create_dirs()

static void ro_gui_create_dirs ( void  )
static

Create intermediate directories for Choices and User Data files.

Definition at line 350 of file gui.c.

References die(), hotlist_save(), netsurf_mkdir_all(), nsoption_charp, and path().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_default_language()

const char * ro_gui_default_language ( void  )

Determine the default language to use.

RISC OS has no standard way of determining which language the user prefers. We have to guess from the 'Country' setting.

Definition at line 1384 of file gui.c.

References is_dir(), NSLOG, and path().

Referenced by gui_get_resource_url(), ro_gui_choose_language(), and ro_gui_options_language_default().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_dump_browser_window()

void ro_gui_dump_browser_window ( struct browser_window bw)

Send the debug dump of a content to a text editor.

Definition at line 2353 of file gui.c.

References browser_window_debug_dump(), CONTENT_DEBUG_RENDER, NSLOG, and ro_warn_user().

Referenced by ro_gui_window_handle_local_keypress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_get_screen_properties()

static void ro_gui_get_screen_properties ( void  )
static

Get screen properties following a mode change.

Definition at line 1053 of file gui.c.

References NSLOG, PTR_OS_VDU_VAR_LIST, ro_warn_user(), and screen_info.

Referenced by gui_init(), and ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_handle_event()

static void ro_gui_handle_event ( wimp_event_no  event,
wimp_block *  block 
)
static

Process a Wimp_Poll event.

Parameters
eventwimp event number
blockparameter block

Definition at line 1788 of file gui.c.

References ro_gui_close_window_request(), ro_gui_keypress(), ro_gui_menu_selection(), ro_gui_open_window_request(), ro_gui_scroll(), ro_gui_throb(), ro_gui_user_message(), ro_gui_wimp_event_mouse_click(), ro_gui_wimp_event_pointer_entering_window(), ro_gui_wimp_event_redraw_window(), ro_gui_wimp_event_scroll_window(), ro_mouse_drag_end(), ro_mouse_pointer_leaving_window(), and ro_mouse_poll().

Referenced by riscos_poll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_ieurl_file_parse()

static char * ro_gui_ieurl_file_parse ( const char *  file_name)
static

Parse an IEURL file.

Parameters
file_namefile to read
Returns
URL from file, or 0 on error and error reported

Definition at line 629 of file gui.c.

References line(), NSLOG, and ro_warn_user().

Referenced by ro_msg_dataload(), and ro_msg_dataopen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_keypress()

static void ro_gui_keypress ( wimp_key *  key)
static

Handle gui keypress.

Definition at line 1657 of file gui.c.

References gui_current_drag_type, GUI_DRAG_DOWNLOAD_SAVE, GUI_DRAG_NONE, GUI_DRAG_SAVE, NSLOG, ro_gui_drag_box_cancel(), ro_gui_keypress_cb(), ro_gui_selection_prepare_paste(), ro_gui_wimp_event_keypress(), and ro_warn_user().

Referenced by ro_gui_handle_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_keypress_cb()

static void ro_gui_keypress_cb ( void *  pw)
static

Handle key press paste callback.

Definition at line 1637 of file gui.c.

References NSLOG, ro_gui_wimp_event_keypress(), and ro_warn_user().

Referenced by ro_gui_keypress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_open_window_request()

void ro_gui_open_window_request ( wimp_open *  open)

Handle Open_Window_Request events.

Definition at line 1901 of file gui.c.

References NSLOG, ro_gui_wimp_event_open_window(), and ro_warn_user().

Referenced by ro_gui_dialog_open(), ro_gui_dialog_open_centre_parent(), ro_gui_dialog_open_top(), ro_gui_dialog_open_xy(), and ro_gui_handle_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_prequit()

bool ro_gui_prequit ( void  )

Test whether it's okay to shutdown, prompting the user if not.

Returns
true iff it's okay to shutdown immediately

Definition at line 2145 of file gui.c.

References ro_gui_download_prequit().

Referenced by ro_gui_download_close_confirmed(), ro_gui_iconbar_menu_select(), and ro_msg_prequit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_screen_size()

void ro_gui_screen_size ( int *  width,
int *  height 
)

Find screen size in OS units.

Definition at line 2343 of file gui.c.

References height, screen_info, and width.

Referenced by gui_window_create(), gui_window_set_extent(), ro_gui_configure_open_window(), ro_gui_dialog_open(), ro_gui_dialog_open_centre_parent(), ro_gui_dialog_open_top(), and ro_gui_window_menu_select().

Here is the caller graph for this function:

◆ ro_gui_signal()

static void ro_gui_signal ( int  sig)
static

Handles a signal.

Definition at line 398 of file gui.c.

References __dynamic_num, NSLOG, nsoption_dump(), and ro_gui_cleanup().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_uri_file_parse()

static char * ro_gui_uri_file_parse ( const char *  file_name,
char **  uri_title 
)
static

Parse an Acorn URI file.

Parameters
file_namefile to read
uri_titlepointer to receive title data, or NULL for no data
Returns
URL from file, or 0 on error and error reported

Definition at line 518 of file gui.c.

References line(), NSLOG, ro_gui_uri_file_parse_line(), and ro_warn_user().

Referenced by ro_msg_dataload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_uri_file_parse_line()

static bool ro_gui_uri_file_parse_line ( FILE *  fp,
char *  b 
)
static

Read a "line" from an Acorn URI file.

Parameters
fpfile pointer to read from
bbuffer for line, size 400 bytes
Returns
true on success, false on EOF

Definition at line 472 of file gui.c.

Referenced by ro_gui_uri_file_parse().

Here is the caller graph for this function:

◆ ro_gui_url_file_parse()

static char * ro_gui_url_file_parse ( const char *  file_name)
static

Parse an ANT URL file.

Parameters
file_namefile to read
Returns
URL from file, or 0 on error and error reported

Definition at line 583 of file gui.c.

References line(), messages_get(), NSLOG, and ro_warn_user().

Referenced by gui_init(), ro_msg_dataload(), and ro_msg_dataopen().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_user_message()

static void ro_gui_user_message ( wimp_event_no  event,
wimp_message *  message 
)
static

Handle the three User_Message events.

Definition at line 1693 of file gui.c.

References message_HOTLIST_CHANGED, riscos_done, ro_gui_get_screen_properties(), ro_gui_hotlist_add_cleanup(), ro_gui_menu_message_deleted(), ro_gui_menu_warning(), ro_gui_selection_claim_entity(), ro_gui_selection_data_request(), ro_gui_selection_prepare_paste_dataload(), ro_gui_wimp_get_desktop_font(), ro_message_handle_message(), ro_msg_dataload(), ro_msg_terminate_filename(), ro_print_cleanup(), ro_print_current_window, ro_print_dataload_bounce(), ro_print_error(), ro_print_save_bounce(), ro_print_type_odd(), ro_uri_bounce(), ro_uri_message_received(), ro_url_bounce(), and ro_url_message_received().

Referenced by ro_gui_handle_event().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_view_source()

void ro_gui_view_source ( struct hlcache_handle c)

Send the source of a content to a text editor.

Definition at line 1942 of file gui.c.

References content_get_source_data(), filename_request(), hlcache_handle_get_url(), netsurf_nsurl_to_path(), NSERROR_OK, NSLOG, ro_content_filetype(), ro_gui_view_source_bounce(), ro_message_send_message(), ro_warn_user(), and TEMP_FILENAME_PREFIX.

Referenced by ro_gui_window_handle_local_keypress(), and ro_gui_window_menu_select().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_view_source_bounce()

static void ro_gui_view_source_bounce ( wimp_message *  message)
static

source bounce callback.

Definition at line 1921 of file gui.c.

References NSLOG, and ro_warn_user().

Referenced by ro_gui_view_source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_dataload()

static void ro_msg_dataload ( wimp_message *  message)
static

Handle Message_DataLoad (file dragged in).

Definition at line 756 of file gui.c.

References browser_window_create(), browser_window_navigate(), gui_window::bw, BW_CREATE_HISTORY, BW_NAVIGATE_HISTORY, FILETYPE_ACORN_URI, FILETYPE_ANT_URL, FILETYPE_ARTWORKS, FILETYPE_BMP, FILETYPE_CSS, FILETYPE_GIF, FILETYPE_HTML, FILETYPE_ICO, FILETYPE_IEURL, FILETYPE_JNG, FILETYPE_JPEG, FILETYPE_MNG, FILETYPE_PNG, FILETYPE_SVG, FILETYPE_WEBP, messages_get_errorcode(), netsurf_path_to_nsurl(), NSERROR_OK, NSLOG, nsurl_create(), nsurl_unref(), ro_gui_ieurl_file_parse(), ro_gui_toolbar_dataload(), ro_gui_toolbar_lookup(), ro_gui_uri_file_parse(), ro_gui_url_file_parse(), ro_gui_window_dataload(), ro_gui_window_lookup(), ro_warn_user(), gui_window::title, and gui_window::url.

Referenced by ro_gui_user_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_dataopen()

static void ro_msg_dataopen ( wimp_message *  message)
static

Handle Message_DataOpen (double-click on file in the Filer).

Parameters
messageThe wimp message to open.

Definition at line 677 of file gui.c.

References browser_window_create(), BW_CREATE_HISTORY, messages_get_errorcode(), netsurf_path_to_nsurl(), NSERROR_OK, NSLOG, nsoption_charp, nsurl_create(), nsurl_unref(), ro_gui_ieurl_file_parse(), ro_gui_url_file_parse(), and ro_warn_user().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_datasave()

static void ro_msg_datasave ( wimp_message *  message)
static

Handle Message_DataSave.

Definition at line 885 of file gui.c.

References FILETYPE_ACORN_URI, FILETYPE_ANT_URL, FILETYPE_ARTWORKS, FILETYPE_BMP, FILETYPE_CSS, FILETYPE_GIF, FILETYPE_HTML, FILETYPE_ICO, FILETYPE_IEURL, FILETYPE_JNG, FILETYPE_JPEG, FILETYPE_MNG, FILETYPE_PNG, FILETYPE_SVG, FILETYPE_WEBP, NSLOG, ro_gui_selection_prepare_paste_datasave(), ro_msg_terminate_filename(), and ro_warn_user().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_datasave_ack()

static void ro_msg_datasave_ack ( wimp_message *  message)
static

Handle Message_DataSaveAck.

Definition at line 941 of file gui.c.

References gui_current_drag_type, GUI_DRAG_DOWNLOAD_SAVE, GUI_DRAG_NONE, GUI_DRAG_SAVE, ro_gui_download_datasave_ack(), ro_gui_save_datasave_ack(), ro_msg_terminate_filename(), and ro_print_ack().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_prequit()

static void ro_msg_prequit ( wimp_message *  message)
static

Handle PreQuit message.

Parameters
messagePreQuit message from Wimp

Definition at line 971 of file gui.c.

References NSLOG, ro_gui_prequit(), and ro_warn_user().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_save_desktop()

static void ro_msg_save_desktop ( wimp_message *  message)
static

Handle SaveDesktop message.

Parameters
messageSaveDesktop message from Wimp.

Definition at line 994 of file gui.c.

References NETSURF_DIR, NSLOG, and ro_warn_user().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_msg_terminate_filename()

static void ro_msg_terminate_filename ( wimp_full_message_data_xfer *  message)
static

Ensure that the filename in a data transfer message is NULL terminated (some applications, especially BASIC programs use CR)

Parameters
messagemessage to be corrected

Definition at line 869 of file gui.c.

Referenced by ro_gui_user_message(), ro_msg_datasave(), and ro_msg_datasave_ack().

Here is the caller graph for this function:

◆ ro_msg_window_info()

static void ro_msg_window_info ( wimp_message *  message)
static

Handle WindowInfo message (part of the iconising protocol)

Parameters
messageWindowInfo message from the Iconiser

Definition at line 1030 of file gui.c.

References nsoption_bool, ro_gui_dialog_close_persistent(), ro_gui_window_iconise(), and ro_gui_window_lookup().

Referenced by gui_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_nsurl_to_path()

static nserror ro_nsurl_to_path ( struct nsurl url,
char **  path_out 
)
static

Create a path from a nsurl using posix file handling.

Parameters
[in]urlThe url to encode.
[out]path_outA string containing the result path which should be freed by the caller.
Returns
NSERROR_OK and the path is written to path or error code on faliure.

Definition at line 1523 of file gui.c.

References NSERROR_BAD_PARAMETER, NSERROR_NOMEM, NSERROR_OK, nsurl_get_component(), NSURL_PATH, NSURL_SCHEME, path(), and url_unescape().

Here is the call graph for this function:

◆ ro_path_to_nsurl()

static nserror ro_path_to_nsurl ( const char *  path,
struct nsurl **  url_out 
)
static

Create a nsurl from a RISC OS pathname.

Perform the necessary operations on a path to generate a nsurl.

Parameters
[in]pathThe RISC OS pathname to convert.
[out]url_outpointer to recive the nsurl, The returned url must be unreferenced by the caller.
Returns
NSERROR_OK and the url is placed in url or error code on faliure.

Definition at line 1432 of file gui.c.

References FILE_SCHEME_PREFIX, FILE_SCHEME_PREFIX_LEN, NSERROR_BAD_PARAMETER, NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, NSLOG, nsurl_create(), path(), ro_warn_user(), and url_escape().

Here is the call graph for this function:

◆ ro_warn_user()

nserror ro_warn_user ( const char *  warning,
const char *  detail 
)

Display a warning for a serious problem (eg memory exhaustion).

Parameters
warningmessage key for warning message
detailadditional message, or 0

Definition at line 2077 of file gui.c.

References dialog_warning, ICON_WARNING_HELP, ICON_WARNING_MESSAGE, messages_get(), NSERROR_OK, NSLOG, ro_gui_dialog_open(), and ro_gui_set_icon_string().

Referenced by download_ro_filetype(), fetch_filetype(), fetch_mimetype(), gui_download_window_create(), gui_download_window_data(), gui_download_window_done(), gui_download_window_error(), gui_drag_save_object(), gui_drag_save_selection(), gui_set_clipboard(), gui_start_selection(), gui_window_create(), gui_window_create_form_select_menu(), gui_window_destroy(), gui_window_drag_start(), gui_window_get_scroll(), gui_window_place_caret(), gui_window_remove_caret(), gui_window_scroll_start(), gui_window_set_extent(), gui_window_set_pointer(), gui_window_set_scroll(), gui_window_update_extent(), image_redraw_os(), main(), print_document(), print_send_printsave(), print_send_printtypeknown(), query_user_xy(), riscos_bitmap_save(), ro_cookie_init(), ro_cw_drag_end(), ro_cw_drag_start(), ro_filetype_from_unix_path(), ro_global_history_init(), ro_gui_button_bar_drag_end(), ro_gui_button_bar_get_config(), ro_gui_button_bar_icon_resize(), ro_gui_button_bar_icon_update(), ro_gui_check_resolvers(), ro_gui_configure_open_window(), ro_gui_dialog_close(), ro_gui_dialog_open(), ro_gui_dialog_open_at_pointer(), ro_gui_dialog_open_centre_parent(), ro_gui_dialog_open_top(), ro_gui_dialog_open_xy(), ro_gui_dialog_openurl_apply(), ro_gui_download_click(), ro_gui_download_drag_end(), ro_gui_download_keypress(), ro_gui_download_move(), ro_gui_download_save(), ro_gui_download_send_dataload(), ro_gui_download_update_status(), ro_gui_download_window_destroy(), ro_gui_download_window_hide_caret(), ro_gui_drag_box_cancel(), ro_gui_drag_icon(), ro_gui_drag_save_link(), ro_gui_dump_browser_window(), ro_gui_force_redraw_icon(), ro_gui_get_icon_selected_state(), ro_gui_get_icon_string(), ro_gui_get_screen_properties(), ro_gui_hotlist_present(), ro_gui_iconbar_click(), ro_gui_iconbar_menu_select(), ro_gui_ieurl_file_parse(), ro_gui_interactive_help_available(), ro_gui_interactive_help_broadcast(), ro_gui_interactive_help_request(), ro_gui_interactive_help_start(), ro_gui_keypress(), ro_gui_keypress_cb(), ro_gui_load_sprite_file(), ro_gui_menu_create(), ro_gui_menu_destroy(), ro_gui_menu_get_checksum(), ro_gui_menu_refresh(), ro_gui_menu_selection(), ro_gui_menu_warning(), ro_gui_open_window_request(), ro_gui_options_fonts_init_menu(), ro_gui_options_image_redraw(), ro_gui_options_language_ok(), ro_gui_options_theme_finalise(), ro_gui_options_theme_load(), ro_gui_popup_menu(), ro_gui_query_close(), ro_gui_query_window_bring_to_front(), ro_gui_save_clipboard(), ro_gui_save_complete(), ro_gui_save_content(), ro_gui_save_done(), ro_gui_save_drag_end(), ro_gui_save_link(), ro_gui_save_object_native(), ro_gui_save_ok(), ro_gui_save_set_state(), ro_gui_saveas_create(), ro_gui_saveas_quit(), ro_gui_search_add_recent(), ro_gui_selection_drag_end(), ro_gui_set_caret_first(), ro_gui_set_icon_button_type(), ro_gui_set_icon_deleted_state(), ro_gui_set_icon_selected_state(), ro_gui_set_icon_shaded_state(), ro_gui_set_icon_sprite(), ro_gui_set_icon_string(), ro_gui_set_window_title(), ro_gui_theme_add_descriptor(), ro_gui_theme_get_available_in_dir(), ro_gui_theme_install_apply(), ro_gui_theme_open(), ro_gui_throbber_icon_resize(), ro_gui_throbber_icon_update(), ro_gui_toolbar_dataload(), ro_gui_uri_file_parse(), ro_gui_url_bar_get_url_extent(), ro_gui_url_bar_icon_resize(), ro_gui_url_bar_icon_update(), ro_gui_url_bar_menu_select(), ro_gui_url_bar_set_url(), ro_gui_url_bar_take_caret(), ro_gui_url_complete_click(), ro_gui_url_complete_close(), ro_gui_url_complete_keypress(), ro_gui_url_complete_redraw(), ro_gui_url_complete_resize(), ro_gui_url_file_parse(), ro_gui_user_redraw(), ro_gui_view_source(), ro_gui_view_source_bounce(), ro_gui_wimp_cache_furniture_sizes(), ro_gui_wimp_check_window_furniture(), ro_gui_wimp_desktop_font(), ro_gui_wimp_event_menu_selection(), ro_gui_wimp_event_mouse_click(), ro_gui_wimp_event_prepare_gright_menu(), ro_gui_wimp_get_sprite_dimensions(), ro_gui_wimp_read_eig_factors(), ro_gui_wimp_sprite_exists(), ro_gui_wimp_update_window_furniture(), ro_gui_window_action_home(), ro_gui_window_action_local_history(), ro_gui_window_action_new_window(), ro_gui_window_close(), ro_gui_window_dataload(), ro_gui_window_handle_local_keypress(), ro_gui_window_iconise(), ro_gui_window_import_text(), ro_gui_window_invalidate_area(), ro_gui_window_launch_url(), ro_gui_window_menu_select(), ro_gui_window_open(), ro_gui_window_prepare_form_select_menu(), ro_gui_window_redraw(), ro_gui_window_scroll_action(), ro_gui_window_scroll_end(), ro_gui_window_to_window_pos(), ro_gui_window_toolbar_click(), ro_gui_window_update_boxes(), ro_hotlist_init(), ro_local_history_init(), ro_local_history_open(), ro_local_history_tooltip(), ro_message_send_message(), ro_message_send_message_to_window(), ro_mouse_drag_end(), ro_mouse_poll(), ro_msg_dataload(), ro_msg_dataopen(), ro_msg_datasave(), ro_msg_prequit(), ro_msg_save_desktop(), ro_pageinfo_init(), ro_pageinfo_open(), ro_path_to_nsurl(), ro_print_ack(), ro_print_error(), ro_toolbar_attach(), ro_toolbar_click(), ro_toolbar_create(), ro_toolbar_get_help_suffix(), ro_toolbar_process(), ro_toolbar_rebuild(), ro_toolbar_redraw(), ro_uri_message_received(), ro_url_broadcast(), ro_url_load(), ro_url_message_received(), theme_install_callback(), and theme_install_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_colour_from_wimp()

static nserror set_colour_from_wimp ( struct nsoption_s opts,
wimp_colour  wimp,
enum nsoption_e  option,
colour  def_colour 
)
static

Set colour option from wimp.

Parameters
optsThe netsurf options.
wimpwimp colour value
optionthe netsurf option enum.
def_colourThe default colour value to use.
Returns
NSERROR_OK on success or error code.

Definition at line 251 of file gui.c.

References nsoption_s::c, NSERROR_OK, NSLOG, and nsoption_s::value.

Referenced by set_defaults().

Here is the caller graph for this function:

◆ set_defaults()

static nserror set_defaults ( struct nsoption_s defaults)
static

Set option defaults for riscos frontend.

Parameters
defaultsThe option table to update.
Returns
error status.
Todo:
The wimp_COLOUR_... values here map the colour definitions to parts of the RISC OS desktop palette. In places this is fairly arbitrary, and could probably do with re-checking.

Definition at line 286 of file gui.c.

References CHOICES_PREFIX, defaults, NSERROR_BAD_PARAMETER, NSERROR_OK, NSLOG, nsoption_charp, nsoption_set_int, nsoption_set_uint, nsoption_setnull_charp, and set_colour_from_wimp().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ __dynamic_da_max_size

int __dynamic_da_max_size = 128 * 1024 * 1024

For UnixLib.

Definition at line 101 of file gui.c.

◆ __dynamic_da_name

const char* const __dynamic_da_name = "NetSurf"

For UnixLib.

Definition at line 100 of file gui.c.

◆ __dynamic_num

int __dynamic_num
extern

Referenced by ro_gui_signal().

◆ __feature_imagefs_is_file

int __feature_imagefs_is_file = 1

For UnixLib.

Definition at line 102 of file gui.c.

◆ __riscosify_control

int __riscosify_control
Initial value:
= __RISCOSIFY_NO_SUFFIX |
__RISCOSIFY_NO_REVERSE_SUFFIX

Definition at line 104 of file gui.c.

◆ gui_current_drag_type

ro_gui_drag_type gui_current_drag_type

◆ gui_last_poll

clock_t gui_last_poll
static

Time of last wimp_poll.

Definition at line 117 of file gui.c.

Referenced by riscos_poll().

◆ gui_sprites

osspriteop_area* gui_sprites

Sprite area containing pointer and hotlist sprites.

Definition at line 118 of file gui.c.

Referenced by gui_init(), gui_quit(), gui_window_set_pointer(), ro_gui_dialog_create(), and ro_gui_dialog_open_url_init().

◆ height

int height

Definition at line 161 of file gui.c.

Referenced by ami_bitmap(), ami_bitmap_get_generic(), ami_bitmap_get_mask(), ami_bitmap_get_native(), ami_bitmap_get_palettemapped(), ami_bitmap_get_truecolour(), ami_bitmap_tile(), ami_cw_get_window_dimensions(), ami_cw_redraw_rect(), ami_cw_update_size(), ami_cw_window_size(), ami_do_redraw(), ami_do_redraw_tiled(), ami_gadget_hit(), ami_gui_event(), ami_gui_scroll_internal(), ami_history_local_present(), ami_init_mouse_pointers(), ami_pageinfo_open(), ami_plot_ra_alloc(), ami_plot_ra_get_size(), ami_print(), ami_rtg_allocbitmap(), ami_rtg_writepixelarray(), ami_set_screen_defaults(), amiga_bitmap_create(), amiga_icon_convertcolouricon32(), amiga_icon_superimpose_favicon(), amiga_icon_superimpose_favicon_internal(), amiga_plugin_hack_reformat(), atari_treeview_get_window_dimensions(), atari_treeview_update_size(), bitmap(), bitmap__format_convert(), bitmap__format_convert_from_pma(), bitmap__format_convert_to_pma(), bitmap_create(), bitmap_format_convert(), bitmap_get_height(), bitmap_render(), bitmap_scale(), bitmap_test_opaque(), box_bounds(), browser_window_callback(), browser_window_content_ready(), browser_window_get_dimensions(), browser_window_get_extents(), browser_window_place_caret(), browser_window_redraw(), browser_window_reformat(), browser_window_resize_frames(), browser_window_resolve_frame_dimension(), browser_window_set_dimensions(), calc_row_pointers(), colorshift_pixbuf(), content__reformat(), content__request_redraw(), content_reformat(), content_request_redraw(), content_scaled_redraw(), convert_alpha(), coords_from_range(), cw_helper_scroll_visible(), draw_icon(), fb_cw_get_window_dimensions(), fb_local_history_present(), fb_pan(), fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_window(), fbtk_create_writable_text(), fbtk_get_caret(), fbtk_reposition_hscroll(), fbtk_reposition_vscroll(), fbtk_set_caret(), fbtk_set_pos_and_size(), fbtk_widget_new(), form_clip_inside_select_menu(), form_redraw_select_menu(), form_select_get_dimensions(), form_select_menu_callback(), framebuffer_initialise(), framebuffer_plot_bitmap(), framebuffer_resize(), gif_bitmap_create(), gui_resize(), gui_window_create(), gui_window_get_dimensions(), gui_window_place_caret(), gui_window_scroll_start(), gui_window_set_extent(), gui_window_set_scroll(), gui_window_update_extent(), html_object_callback(), html_redraw_background(), html_redraw_box(), html_redraw_checkbox(), html_redraw_file(), html_redraw_inline_background(), html_redraw_radio(), html_reformat(), html_set_focus(), image_bitmap_plot(), image_redraw(), image_redraw_os(), info_callback(), knockout_plot_bitmap(), layout_absolute(), layout_apply_minmax_height(), layout_block_add_scrollbar(), layout_block_find_dimensions(), layout_document(), layout_find_dimensions(), layout_float_find_dimensions(), layout_get_object_dimensions(), layout_line(), layout_minmax_block(), layout_minmax_line(), local_history_get_size(), monkey_plot_bitmap(), mouse_action_select_menu(), nsbeos_bitmap_generate_pretile(), nsbeos_bitmap_get_pretile_xy(), nsbeos_bitmap_get_pretile_y(), nsbeos_plot_bbitmap(), nsbeos_plot_bitmap(), nsbeos_rgba_to_bgra(), nsbeos_window_resize_event(), nsbmp_bitmap_create(), nsgdk_pixbuf_get_from_surface(), nsgtk_cw_get_window_dimensions(), nsgtk_cw_update_size(), nsgtk_icon_size_lookup_for_settings(), nsgtk_local_history_present(), nsgtk_plot_bitmap(), nsgtk_print_plot_bitmap(), nsgtk_print_plot_pixbuf(), nsico_bitmap_create(), nsw32_cw_get_window_dimensions(), nsw32_cw_update_size(), nsw32_local_history_present(), nsws_drawable_hscroll(), nsws_drawable_vscroll(), nsws_window_create(), page_info_get_size(), page_info_mouse_action(), plot_alpha_bitmap(), plot_bitmap(), plot_block(), png_cache_convert(), print_document(), print_set_up(), resize_browser_widget(), resize_normal_browser_window(), riscos_bitmap_create(), riscos_bitmap_save(), ro_cw_get_window_dimensions(), ro_cw_update_size(), ro_gui_button_bar_get_dims(), ro_gui_button_bar_place_buttons(), ro_gui_button_bar_rebuild(), ro_gui_configure_open_window(), ro_gui_configure_show(), ro_gui_dialog_open_top(), ro_gui_progress_bar_calculate(), ro_gui_progress_bar_update(), ro_gui_screen_size(), ro_gui_theme_get_throbber_data(), ro_gui_throbber_get_dims(), ro_gui_url_bar_get_dims(), ro_gui_url_complete_keypress(), ro_gui_wimp_get_sprite_dimensions(), ro_gui_window_iconise(), ro_gui_window_open(), ro_local_history_open(), ro_pageinfo_open(), ro_plot_bitmap(), ro_toolbar_refresh_widget_dimensions(), rsvg__get_demensions(), scheduled_reformat(), sexy_icon_entry_button_release(), svg_redraw_internal(), svg_reformat(), text_draw(), text_redraw(), textarea_get_dimensions(), textarea_set_caret_internal(), textarea_set_dimensions(), textarea_set_layout(), textplain_reformat(), treeview__create_textarea(), treeview__cw_get_window_dimensions(), treeview__cw_update_size(), treeview__search(), treeview_edit_node_at_point(), treeview_get_height(), treeview_insert_node(), treeview_move_selection(), treeview_node_mouse_action_cb(), treeview_node_selection_walk_cb(), treeview_redraw_search(), treeview_redraw_tree(), urlbar_dimensions(), webp_convert(), widget_scroll_y(), win32_bitmap_create(), win32_window_get_dimensions(), win32_window_place_caret(), win32_window_set_scroll(), and window_set_content_size().

◆ NETSURF_DIR

const char* NETSURF_DIR

Definition at line 110 of file gui.c.

Referenced by gui_init(), ro_gui_options_image_initialise(), and ro_msg_save_desktop().

◆ os_alpha_sprite_supported

bool os_alpha_sprite_supported = false

Definition at line 98 of file gui.c.

Referenced by gui_init(), and image_redraw().

◆ os_version

int os_version = 0

◆ riscos_done

bool riscos_done = false

◆ riscos_fetch_table

struct gui_fetch_table riscos_fetch_table
static
Initial value:
= {
.filetype = fetch_filetype,
.get_resource_url = gui_get_resource_url,
.mimetype = fetch_mimetype,
}
const char * fetch_filetype(const char *unix_path)
Determine the MIME type of a local file.
Definition: filetype.c:58
char * fetch_mimetype(const char *ro_path)
Find a MIME type for a local file.
Definition: filetype.c:154
static nsurl * gui_get_resource_url(const char *path)
Callback to translate resource to full url for RISC OS.
Definition: gui.c:176

Definition at line 2388 of file gui.c.

Referenced by main().

◆ riscos_file_table

struct gui_file_table riscos_file_table
static
Initial value:
= {
.mkpath = riscos_mkpath,
.basename = riscos_basename,
.nsurl_to_path = ro_nsurl_to_path,
.path_to_nsurl = ro_path_to_nsurl,
.mkdir_all = riscos_mkdir_all,
}
static nserror riscos_mkpath(char **str, size_t *size, size_t nelm, va_list ap)
Generate a riscos path from one or more component elemnts.
Definition: gui.c:2170
static nserror ro_nsurl_to_path(struct nsurl *url, char **path_out)
Create a path from a nsurl using posix file handling.
Definition: gui.c:1523
static nserror ro_path_to_nsurl(const char *path, struct nsurl **url_out)
Create a nsurl from a RISC OS pathname.
Definition: gui.c:1432
static nserror riscos_mkdir_all(const char *fname)
Ensure that all directory elements needed to store a filename exist.
Definition: gui.c:2321
static nserror riscos_basename(const char *path, char **str, size_t *size)
Get the basename of a file using posix path handling.
Definition: gui.c:2275

Definition at line 2380 of file gui.c.

Referenced by main().

◆ riscos_misc_table

struct gui_misc_table riscos_misc_table
static
Initial value:
= {
.schedule = riscos_schedule,
.quit = gui_quit,
.launch_url = gui_launch_url,
.present_cookies = ro_gui_cookies_present,
}
nserror ro_gui_cookies_present(const char *search_term)
make the cookie window visible.
Definition: cookies.c:449
static nserror gui_launch_url(struct nsurl *url)
Broadcast an URL that we can't handle.
Definition: gui.c:2034
static void gui_quit(void)
Close down the gui (RISC OS).
Definition: gui.c:1600
nserror riscos_schedule(int t, void(*callback)(void *p), void *p)
Schedule a callback.
Definition: schedule.c:93

Definition at line 2395 of file gui.c.

Referenced by main().

◆ ro_plot_patterned_lines

bool ro_plot_patterned_lines
extern

One version of the A9home OS is incapable of drawing patterned lines.

Definition at line 45 of file plotters.c.

Referenced by gui_init(), and ro_plot_draw_path().

◆ 

struct { ... } screen_info

◆ task_handle

wimp_t task_handle

RISC OS wimp task handle.

Definition at line 116 of file gui.c.

Referenced by gui_init(), gui_quit(), ro_gui_selection_claim_entity(), and ro_uri_launch().

◆ task_messages

ns_wimp_message_list task_messages
static

Accepted wimp user messages.

Definition at line 125 of file gui.c.

Referenced by gui_init().

◆ task_name

const char* task_name = "NetSurf"
static

Definition at line 112 of file gui.c.

Referenced by gui_init().

◆ width

int width

Definition at line 160 of file gui.c.

Referenced by ami_bitmap(), ami_bitmap_get_generic(), ami_bitmap_get_mask(), ami_bitmap_get_native(), ami_bitmap_get_palettemapped(), ami_bitmap_get_truecolour(), ami_bitmap_tile(), ami_cw_get_window_dimensions(), ami_cw_redraw_rect(), ami_cw_update_size(), ami_cw_window_size(), ami_do_redraw(), ami_do_redraw_tiled(), ami_font_width(), ami_gadget_hit(), ami_gui_event(), ami_gui_scroll_internal(), ami_history_local_present(), ami_init_mouse_pointers(), ami_pageinfo_open(), ami_plot_ra_alloc(), ami_plot_ra_get_size(), ami_rtg_allocbitmap(), ami_rtg_writepixelarray(), ami_set_screen_defaults(), amiga_bitmap_create(), amiga_bm_nsfont_width(), amiga_icon_convertcolouricon32(), amiga_icon_superimpose_favicon(), amiga_icon_superimpose_favicon_internal(), amiga_nsfont_width(), amiga_plugin_hack_reformat(), atari_font_width(), atari_treeview_get_window_dimensions(), atari_treeview_update_size(), beos_font_width(), bitmap(), bitmap__format_convert(), bitmap__format_convert_from_pma(), bitmap__format_convert_to_pma(), bitmap_create(), bitmap_format_convert(), bitmap_get_width(), bitmap_render(), bitmap_scale(), bitmap_test_opaque(), box_bounds(), browser_window_callback(), browser_window_content_ready(), browser_window_get_dimensions(), browser_window_get_extents(), browser_window_redraw(), browser_window_reformat(), browser_window_resolve_frame_dimension(), browser_window_set_dimensions(), colorshift_pixbuf(), content__reformat(), content__request_redraw(), content_reformat(), content_request_redraw(), content_scaled_redraw(), convert_alpha(), coords_from_range(), cw_helper_scroll_visible(), draw_icon(), fb_cw_get_window_dimensions(), fb_font_position(), fb_font_split(), fb_font_width(), fb_local_history_present(), fb_pan(), fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_window(), fbtk_create_writable_text(), fbtk_reposition_hscroll(), fbtk_reposition_vscroll(), fbtk_set_pos_and_size(), fbtk_widget_new(), form_clip_inside_select_menu(), form_redraw_select_menu(), form_select_get_dimensions(), form_select_menu_callback(), framebuffer_initialise(), framebuffer_plot_bitmap(), framebuffer_resize(), get_icon_width(), gif_bitmap_create(), gui_resize(), gui_window_create(), gui_window_get_dimensions(), gui_window_scroll_start(), gui_window_set_extent(), gui_window_set_scroll(), gui_window_update_extent(), html_object_callback(), html_redraw_background(), html_redraw_box(), html_redraw_checkbox(), html_redraw_file(), html_redraw_inline_background(), html_redraw_radio(), html_reformat(), image_bitmap_plot(), image_redraw(), image_redraw_os(), info_callback(), knockout_plot_bitmap(), layout_absolute(), layout_block_context(), layout_block_find_dimensions(), layout_document(), layout_find_dimensions(), layout_float(), layout_float_find_dimensions(), layout_get_object_dimensions(), layout_inline_container(), layout_line(), layout_minmax_block(), layout_minmax_line(), layout_minmax_table(), layout_solve_width(), layout_table(), layout_text_indent(), local_history_get_size(), monkey_plot_bitmap(), mouse_action_select_menu(), nsbeos_bitmap_generate_pretile(), nsbeos_bitmap_get_pretile_x(), nsbeos_bitmap_get_pretile_xy(), nsbeos_plot_bbitmap(), nsbeos_plot_bitmap(), nsbeos_rgba_to_bgra(), nsbeos_window_resize_event(), nsbmp_bitmap_create(), nsfont_width(), nsgdk_pixbuf_get_from_surface(), nsgtk_cw_get_window_dimensions(), nsgtk_cw_update_size(), nsgtk_icon_size_lookup_for_settings(), nsgtk_local_history_present(), nsgtk_plot_bitmap(), nsgtk_print_plot_bitmap(), nsgtk_print_plot_pixbuf(), nsgtk_set_line_width(), nsico_bitmap_create(), nsjpeg__decode_cmyk(), nsjpeg__decode_rgb(), nsw32_cw_get_window_dimensions(), nsw32_cw_update_size(), nsw32_local_history_present(), nsws_drawable_hscroll(), nsws_drawable_vscroll(), nsws_window_create(), page_info_get_size(), place_float_below(), plot_alpha_bitmap(), plot_bitmap(), plot_block(), png_cache_convert(), print_document(), query_user_xy(), resize_browser_widget(), resize_normal_browser_window(), riscos_bitmap_create(), riscos_bitmap_save(), ro_cw_get_window_dimensions(), ro_cw_update_size(), ro_font_width(), ro_gui_button_bar_get_dims(), ro_gui_configure_open_window(), ro_gui_configure_show(), ro_gui_dialog_open_top(), ro_gui_download_update_status(), ro_gui_progress_bar_calculate(), ro_gui_progress_bar_update(), ro_gui_screen_size(), ro_gui_status_bar_create(), ro_gui_theme_get_throbber_data(), ro_gui_throbber_get_dims(), ro_gui_url_bar_get_dims(), ro_gui_wimp_get_sprite_dimensions(), ro_gui_window_iconise(), ro_gui_window_open(), ro_local_history_open(), ro_local_history_tooltip(), ro_pageinfo_open(), ro_plot_bitmap(), ro_plot_draw_path(), ro_toolbar_process(), ro_toolbar_refresh_widget_dimensions(), rsvg__get_demensions(), scheduled_reformat(), sexy_icon_entry_button_release(), sexy_icon_entry_expose(), svg_redraw_internal(), svg_reformat(), table_calculate_column_types(), table_used_border_for_cell(), textarea_get_dimensions(), textarea_set_caret_internal(), textarea_set_dimensions(), textarea_set_layout(), textplain_offset_from_coords(), textplain_redraw(), textplain_reformat(), toolbar_customisation_create_toolbox(), treeview__create_textarea(), treeview__cw_get_window_dimensions(), treeview__cw_update_size(), treeview_edit_node_at_point(), urlbar_dimensions(), webp_convert(), widget_scroll_x(), win32_bitmap_create(), win32_font_width(), win32_window_get_dimensions(), win32_window_set_scroll(), and window_set_content_size().