NetSurf
Data Structures | Macros | Functions | Variables
window.c File Reference

Implementation of RISC OS browser window handling. More...

#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <string.h>
#include <limits.h>
#include <oslib/colourtrans.h>
#include <oslib/osbyte.h>
#include <oslib/osfile.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <oslib/wimpspriteop.h>
#include <nsutils/time.h>
#include "netsurf/inttypes.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/talloc.h"
#include "utils/file.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
#include "netsurf/plotters.h"
#include "netsurf/window.h"
#include "netsurf/bitmap.h"
#include "netsurf/url_db.h"
#include "netsurf/form.h"
#include "netsurf/keypress.h"
#include "desktop/browser_history.h"
#include "desktop/cookie_manager.h"
#include "desktop/searchweb.h"
#include "riscos/bitmap.h"
#include "riscos/buffer.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
#include "riscos/local_history.h"
#include "riscos/global_history.h"
#include "riscos/pageinfo.h"
#include "riscos/gui.h"
#include "riscos/gui/status_bar.h"
#include "riscos/help.h"
#include "riscos/hotlist.h"
#include "riscos/menus.h"
#include "riscos/mouse.h"
#include "riscos/oslib_pre7.h"
#include "riscos/save.h"
#include "riscos/content-handlers/sprite.h"
#include "riscos/textselection.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/url_suggest.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
#include "riscos/window.h"
#include "riscos/ucstables.h"
#include "riscos/filetype.h"
Include dependency graph for window.c:

Go to the source code of this file.

Data Structures

struct  ro_gui_pointer_entry
 An entry in ro_gui_pointer_table. More...
 
struct  update_box
 

Macros

#define wimp_KEY_END   wimp_KEY_COPY
 
#define wimp_WINDOW_GIVE_SHADED_ICON_INFO   ((wimp_extra_window_flags) 0x10u)
 
#define SCROLL_VISIBLE_PADDING   32
 
#define SCROLL_TOP   INT_MIN
 
#define SCROLL_PAGE_UP   (INT_MIN + 1)
 
#define SCROLL_PAGE_DOWN   (INT_MAX - 1)
 
#define SCROLL_BOTTOM   INT_MAX
 
#define SCALE_SNAP_TO_SIZE   (sizeof scale_snap_to) / (sizeof(float))
 
#define MARGIN   4
 

Functions

static void gui_window_place_caret (struct gui_window *g, int x, int y, int height, const struct rect *clip)
 Place the caret in a browser window. More...
 
static void gui_window_set_extent (struct gui_window *g, int width, int height)
 Updates a windows extent. More...
 
static void ro_gui_window_open (wimp_open *open)
 Open a window. More...
 
static void gui_window_update_extent (struct gui_window *g)
 Update the extent of the inside of a browser window to that of the current content. More...
 
static void ro_gui_window_update_theme (void *data, bool ok)
 Update a window and its toolbar. More...
 
static void ro_gui_window_update_toolbar (void *data)
 Update a window to reflect a change in toolbar size: used as a callback by the toolbar module when a toolbar height changes. More...
 
static void ro_gui_window_update_toolbar_buttons (struct gui_window *g)
 Update the toolbar buttons for a given browser window to reflect the current state of its contents. More...
 
static void ro_gui_window_action_add_bookmark (struct gui_window *g)
 Add a hotlist entry for a browser window. More...
 
static void ro_gui_window_action_remove_bookmark (struct gui_window *g)
 Remove a hotlist entry for a browser window. More...
 
static void ro_gui_window_action_local_history (struct gui_window *gw)
 Open a local history pane for a browser window. More...
 
static void ro_gui_window_action_home (struct gui_window *g)
 Perform a Navigate Home action on a browser window. More...
 
static void ro_gui_window_action_search (struct gui_window *g)
 Open a text search dialogue for a browser window. More...
 
static void ro_gui_window_action_zoom (struct gui_window *g)
 Open a zoom dialogue for a browser window. More...
 
static void ro_gui_window_action_save (struct gui_window *g, gui_save_type save_type)
 Open a save dialogue for a browser window contents. More...
 
static void ro_gui_window_action_print (struct gui_window *g)
 Open a print dialogue for a browser window. More...
 
static void ro_gui_window_prepare_pageinfo (struct gui_window *g)
 Prepare the page info window for use. More...
 
static void ro_gui_window_action_page_info (struct gui_window *g)
 Open a page info box for a browser window. More...
 
static void ro_gui_window_toolbar_click (void *data, toolbar_action_type action_type, union toolbar_action action)
 Process Mouse_Click events in a toolbar's button bar. More...
 
static void ro_gui_window_launch_url (struct gui_window *g, const char *url_s)
 Launch a new url in the given window. More...
 
static void ro_gui_window_action_new_window (struct gui_window *g)
 Open a new browser window. More...
 
static void ro_gui_window_scroll_action (struct gui_window *g, wimp_scroll_direction scroll_x, wimp_scroll_direction scroll_y)
 Scroll a browser window. More...
 
static bool handle_local_keypress_scale (struct gui_window *gw, uint32_t c)
 handle scale kepresses within RISC OS More...
 
static bool ro_gui_window_handle_local_keypress (struct gui_window *g, wimp_key *key, bool is_toolbar)
 Handle keypresses within the RISC OS GUI. More...
 
static bool ro_gui_window_toolbar_keypress (void *data, wimp_key *key)
 Callback handler for keypresses within browser window toolbars. More...
 
static void ro_gui_window_save_toolbar_buttons (void *data, char *config)
 Save a new toolbar button configuration. More...
 
static void ro_gui_window_close (wimp_w w)
 Handle wimp closing event. More...
 
static void ro_gui_window__redraw_rect (const struct gui_window *gui_win, const wimp_draw *wimp_rect, bool use_buffer)
 Wrapper for calls to browser_window_redraw for a wimp_draw rectangle. More...
 
static void ro_gui_window_redraw (wimp_draw *redraw)
 Handle a Redraw_Window_Request for a browser window. More...
 
static void ro_gui_window_scroll (wimp_scroll *scroll)
 Process Scroll_Request events in a browser window. More...
 
static void ro_gui_window_track_end (wimp_leaving *leaving, void *data)
 Process Pointer Leaving Window events in a browser window. More...
 
static void ro_gui_window_pointer_entering (wimp_entering *entering)
 Process Pointer Entering Window events in a browser window. More...
 
static bool ro_gui_window_keypress (wimp_key *key)
 Process Key_Pressed events in a browser window. More...
 
static bool ro_gui_window_click (wimp_pointer *pointer)
 Handle Mouse_Click events in a browser window. More...
 
static bool ro_gui_window_prepare_form_select_menu (struct gui_window *g, struct form_control *control)
 Prepare or reprepare a form select menu. More...
 
static bool ro_gui_window_content_export_types (struct hlcache_handle *h, bool *export_draw, bool *export_sprite)
 Return boolean flags to show what RISC OS types we can sensibly convert the given object into. More...
 
static bool ro_gui_window_menu_prepare (wimp_w w, wimp_i i, wimp_menu *menu, wimp_pointer *pointer)
 Prepare the browser window menu for (re-)opening. More...
 
static void ro_gui_window_process_form_select_menu (struct gui_window *g, wimp_selection *selection)
 Process selections from a form select menu, passing them back to the core. More...
 
static void ro_gui_window_prepare_objectinfo (struct hlcache_handle *object, nsurl *target_url)
 Prepare the object info window for use. More...
 
static void ro_gui_window_paste_cb (void *pw)
 callback to handle window paste operation More...
 
static bool ro_gui_window_menu_select (wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
 Handle selections from a browser window menu. More...
 
static void ro_gui_window_menu_warning (wimp_w w, wimp_i i, wimp_menu *menu, wimp_selection *selection, menu_action action)
 Handle submenu warnings for a browser window menu. More...
 
static void ro_gui_window_menu_close (wimp_w w, wimp_i i, wimp_menu *menu)
 Handle the closure of a browser window menu. More...
 
static void ro_gui_window_clone_options (struct gui_window *new_gui, struct gui_window *old_gui)
 Clones a browser window's options. More...
 
static struct gui_windowgui_window_create (struct browser_window *bw, struct gui_window *existing, gui_window_create_flags flags)
 Create and open a new browser window. More...
 
static void ro_gui_window_remove_update_boxes (struct gui_window *g)
 Remove all pending update boxes for a window. More...
 
static void gui_window_destroy (struct gui_window *g)
 Close a browser window and free any related resources. More...
 
static void gui_window_set_title (struct gui_window *g, const char *title)
 Set the title of a browser window. More...
 
static bool gui_window_get_scroll (struct gui_window *g, int *sx, int *sy)
 Get the scroll position of a browser window. More...
 
static nserror gui_window_set_scroll (struct gui_window *g, const struct rect *rect)
 Set the scroll position of a riscos browser window. More...
 
static nserror gui_window_get_dimensions (struct gui_window *gw, int *width, int *height)
 Find the current dimensions of a browser window's content area. More...
 
static void riscos_window_set_status (struct gui_window *g, const char *text)
 Set the status bar of a browser window. More...
 
static void gui_window_start_throbber (struct gui_window *g)
 Update the interface to reflect start of page loading. More...
 
static void gui_window_stop_throbber (struct gui_window *g)
 Update the interface to reflect page loading stopped. More...
 
static void gui_window_page_info_change (struct gui_window *gw)
 Update the interface to reflect change in page info status. More...
 
static void gui_window_set_icon (struct gui_window *g, struct hlcache_handle *icon)
 set favicon More...
 
static void gui_window_remove_caret (struct gui_window *g)
 Remove the caret, if present. More...
 
static void gui_window_new_content (struct gui_window *g)
 Called when the gui_window has new content. More...
 
static void ro_gui_window_scroll_end (wimp_dragged *drag, void *data)
 Completes scrolling of a browser window. More...
 
static bool gui_window_scroll_start (struct gui_window *g)
 Starts drag scrolling of a browser window. More...
 
static bool gui_window_drag_start (struct gui_window *g, gui_drag_type type, const struct rect *rect)
 Platform-dependent part of starting drag operation. More...
 
static nserror gui_window_save_link (struct gui_window *g, nsurl *url, const char *title)
 Save the specified content as a link. More...
 
static void gui_window_create_form_select_menu (struct gui_window *g, struct form_control *control)
 Display a menu of options for a form select control. More...
 
static bool ro_gui_window_import_text (struct gui_window *g, const char *filename)
 Import text file into window. More...
 
static nserror ro_gui_window_event (struct gui_window *gw, enum gui_window_event event)
 process miscellaneous window events More...
 
void ro_gui_window_initialise (void)
 Initialise the browser window module and its menus. More...
 
nserror ro_gui_window_invalidate_area (struct gui_window *g, const struct rect *rect)
 Cause an area of a window to be invalidated. More...
 
nserror ro_gui_window_set_url (struct gui_window *g, nsurl *url)
 Set the contents of a window's address bar. More...
 
void ro_gui_window_set_scale (struct gui_window *g, float scale)
 Set a gui_window's scale. More...
 
bool ro_gui_window_dataload (struct gui_window *g, wimp_message *message)
 Handle Message_DataLoad (file dragged in) for a window. More...
 
void ro_gui_window_mouse_at (wimp_pointer *pointer, void *data)
 Handle pointer movements in a browser window. More...
 
void ro_gui_window_iconise (struct gui_window *g, wimp_full_message_window_info *wi)
 Window is being iconised. More...
 
bool ro_gui_toolbar_dataload (struct gui_window *g, wimp_message *message)
 Handle Message_DataLoad (file dragged in) for a toolbar. More...
 
bool ro_gui_window_check_menu (wimp_menu *menu)
 Check if a particular menu handle is a browser window menu. More...
 
void ro_gui_window_redraw_all (void)
 Redraws the content for all windows. More...
 
void ro_gui_window_update_boxes (void)
 Redraw any pending update boxes. More...
 
void ro_gui_window_quit (void)
 Destroy all browser windows. More...
 
void ro_gui_throb (void)
 Animate the "throbbers" of all browser windows. More...
 
void ro_gui_window_default_options (struct gui_window *gui)
 Makes a browser window's options the default. More...
 
struct gui_windowro_gui_window_lookup (wimp_w window)
 Convert a RISC OS window handle to a gui_window. More...
 
struct gui_windowro_gui_toolbar_lookup (wimp_w window)
 Convert a toolbar RISC OS window handle to a gui_window. More...
 
bool ro_gui_window_to_window_pos (struct gui_window *g, int x, int y, os_coord *pos)
 Convert x,y screen co-ordinates into window co-ordinates. More...
 
enum browser_mouse_state ro_gui_mouse_click_state (wimp_mouse_state buttons, wimp_icon_flags type)
 Returns the state of the mouse buttons and modifiers keys for a mouse action, suitable for passing to the OS-independent browser window/ treeview/ etc code. More...
 
browser_mouse_state ro_gui_mouse_drag_state (wimp_mouse_state buttons, wimp_icon_flags type)
 Returns the state of the mouse buttons and modifiers keys whilst dragging, for passing to the OS-independent browser window/ treeview/ etc code. More...
 
bool ro_gui_shift_pressed (void)
 Returns true iff one or more Shift keys is held down. More...
 
bool ro_gui_ctrl_pressed (void)
 Returns true iff one or more Ctrl keys is held down. More...
 
bool ro_gui_alt_pressed (void)
 Returns true iff one or more Alt keys is held down. More...
 
void gui_window_set_pointer (struct gui_window *g, gui_pointer_shape shape)
 set the pointer shape More...
 

Variables

static bool iconise_used [64]
 Remembers which iconised sprite numbers are in use. More...
 
static int iconise_next = 0
 
static bool mouse_drag_select
 Whether a pressed mouse button has become a drag. More...
 
static bool mouse_drag_adjust
 
static struct gui_windowwindow_list = 0
 List of all browser windows. More...
 
struct gui_windowro_gui_current_redraw_gui
 GUI window which is being redrawn. More...
 
static struct form_controlgui_form_select_control
 Form control which gui_form_select_menu is for. More...
 
static wimp_menu * ro_gui_browser_window_menu = NULL
 The browser window menu handle. More...
 
static wimp_menu * gui_form_select_menu = NULL
 Menu of options for form select controls. More...
 
static struct hlcache_handlecurrent_menu_main = 0
 Main content object under menu, or 0 if none. More...
 
static struct hlcache_handlecurrent_menu_object = 0
 Object under menu, or 0 if no object. More...
 
static nsurlcurrent_menu_url = 0
 URL of link under menu, or 0 if no link. More...
 
static float scale_snap_to []
 
struct ro_gui_pointer_entry ro_gui_pointer_table []
 Map from gui_pointer_shape to pointer sprite data. More...
 
struct update_boxpending_updates
 
static const struct toolbar_callbacks ro_gui_window_toolbar_callbacks
 toolbar callbacks for a browser window. More...
 
static struct gui_window_table window_table
 RISC OS browser window operation table. More...
 
struct gui_window_tableriscos_window_table = &window_table
 

Detailed Description

Implementation of RISC OS browser window handling.

Definition in file window.c.

Macro Definition Documentation

◆ MARGIN

#define MARGIN   4

Definition at line 187 of file window.c.

◆ SCALE_SNAP_TO_SIZE

#define SCALE_SNAP_TO_SIZE   (sizeof scale_snap_to) / (sizeof(float))

Definition at line 141 of file window.c.

◆ SCROLL_BOTTOM

#define SCROLL_BOTTOM   INT_MAX

Definition at line 111 of file window.c.

◆ SCROLL_PAGE_DOWN

#define SCROLL_PAGE_DOWN   (INT_MAX - 1)

Definition at line 110 of file window.c.

◆ SCROLL_PAGE_UP

#define SCROLL_PAGE_UP   (INT_MIN + 1)

Definition at line 109 of file window.c.

◆ SCROLL_TOP

#define SCROLL_TOP   INT_MIN

Definition at line 108 of file window.c.

◆ SCROLL_VISIBLE_PADDING

#define SCROLL_VISIBLE_PADDING   32

Definition at line 106 of file window.c.

◆ wimp_KEY_END

#define wimp_KEY_END   wimp_KEY_COPY

Definition at line 98 of file window.c.

◆ wimp_WINDOW_GIVE_SHADED_ICON_INFO

#define wimp_WINDOW_GIVE_SHADED_ICON_INFO   ((wimp_extra_window_flags) 0x10u)

Definition at line 103 of file window.c.

Function Documentation

◆ gui_window_create()

static struct gui_window * gui_window_create ( struct browser_window bw,
struct gui_window existing,
gui_window_create_flags  flags 
)
static

Create and open a new browser window.

Parameters
bwbw to create gui_window for
existingan existing gui_window, may be NULL
flagsflags for gui window creation
Returns
gui window, or NULL on error

Definition at line 3275 of file window.c.

References gui_window::active, brower_toolbar_buttons, gui_window::bw, gui_window_place_caret(), GW_CREATE_CLONE, gui_window::iconise_icon, gui_window::next, fbtk_widget_s::next, NSLOG, nsoption_bool, nsoption_charp, nsoption_int, gui_window::old_height, gui_window::old_width, gui_window::prev, PTR_WIMP_OPEN, ro_get_vscroll_width(), ro_gui_browser_window_menu, ro_gui_screen_size(), ro_gui_status_bar_create(), ro_gui_url_complete_start(), ro_gui_wimp_event_register_close_window(), ro_gui_wimp_event_register_keypress(), ro_gui_wimp_event_register_menu(), ro_gui_wimp_event_register_menu_close(), ro_gui_wimp_event_register_menu_prepare(), ro_gui_wimp_event_register_menu_selection(), ro_gui_wimp_event_register_menu_warning(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_open_window(), ro_gui_wimp_event_register_pointer_entering_window(), ro_gui_wimp_event_register_redraw_window(), ro_gui_wimp_event_register_scroll_window(), ro_gui_wimp_event_set_user_data(), ro_gui_window_click(), ro_gui_window_clone_options(), ro_gui_window_close(), ro_gui_window_keypress(), ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), ro_gui_window_menu_select(), ro_gui_window_menu_warning(), ro_gui_window_open(), ro_gui_window_pointer_entering(), ro_gui_window_redraw(), ro_gui_window_scroll(), ro_gui_window_toolbar_callbacks, ro_gui_window_update_toolbar_buttons(), ro_toolbar_add_buttons(), ro_toolbar_add_throbber(), ro_toolbar_add_url(), ro_toolbar_create(), ro_toolbar_rebuild(), ro_toolbar_take_caret(), ro_warn_user(), gui_window::state, gui_window::status_bar, fbtk_widget_s::text, THEME_STYLE_BROWSER_TOOLBAR, gui_window::title, gui_window::toolbar, TOOLBAR_FLAGS_NONE, gui_window::update_extent, wimp_WINDOW_GIVE_SHADED_ICON_INFO, gui_window::window, and window_list.

Here is the call graph for this function:

◆ gui_window_create_form_select_menu()

static void gui_window_create_form_select_menu ( struct gui_window g,
struct form_control control 
)
static

Display a menu of options for a form select control.

Parameters
ggui window containing form control
controlform control of type GADGET_SELECT

Definition at line 4071 of file window.c.

References gui_form_select_control, gui_form_select_menu, NSLOG, ro_gui_menu_create(), ro_gui_menu_destroy(), ro_gui_window_prepare_form_select_menu(), ro_warn_user(), and gui_window::window.

Here is the call graph for this function:

◆ gui_window_destroy()

static void gui_window_destroy ( struct gui_window g)
static

Close a browser window and free any related resources.

Parameters
ggui_window to destroy

Definition at line 3529 of file window.c.

References current_menu_window, update_box::g, gui_window::next, NSLOG, gui_window::prev, ro_gui_dialog_close_persistent(), ro_gui_menu_destroy(), ro_gui_status_bar_destroy(), ro_gui_url_complete_close(), ro_gui_wimp_event_finalise(), ro_gui_window_remove_update_boxes(), ro_mouse_kill(), ro_toolbar_destroy(), ro_warn_user(), gui_window::status_bar, gui_window::toolbar, gui_window::window, and window_list.

Here is the call graph for this function:

◆ gui_window_drag_start()

static bool gui_window_drag_start ( struct gui_window g,
gui_drag_type  type,
const struct rect rect 
)
static

Platform-dependent part of starting drag operation.

Parameters
ggui window containing the drag
typetype of drag the core is performing
rectrectangle to constrain pointer to (relative to drag start coord)
Returns
true iff succesful

Definition at line 3991 of file window.c.

References browser_window_get_scale(), gui_window::bw, GDRAGGING_SCROLLBAR, NSLOG, ro_gui_window_mouse_at(), ro_gui_window_scroll_end(), ro_mouse_drag_start(), ro_warn_user(), gui_window::scale, type, rect::x0, rect::x1, rect::y0, and rect::y1.

Here is the call graph for this function:

◆ gui_window_get_dimensions()

static nserror gui_window_get_dimensions ( struct gui_window gw,
int *  width,
int *  height 
)
static

Find the current dimensions of a browser window's content area.

Parameters
gwgui window to measure
widthreceives width of window
heightreceives height of window
Returns
NSERROR_OK and width and height updated

Definition at line 3757 of file window.c.

References height, NSERROR_OK, gui_window::old_height, gui_window::old_width, and width.

◆ gui_window_get_scroll()

static bool gui_window_get_scroll ( struct gui_window g,
int *  sx,
int *  sy 
)
static

Get the scroll position of a browser window.

Parameters
ggui_window
sxreceives x ordinate of point at top-left of window
syreceives y ordinate of point at top-left of window
Returns
true iff successful

Definition at line 3614 of file window.c.

References update_box::g, NSLOG, ro_toolbar_full_height(), ro_warn_user(), gui_window::toolbar, and gui_window::window.

Here is the call graph for this function:

◆ gui_window_new_content()

static void gui_window_new_content ( struct gui_window g)
static

Called when the gui_window has new content.

Parameters
gthe gui_window that has new content

Definition at line 3867 of file window.c.

References update_box::g, ro_gui_browser_window_menu, ro_gui_dialog_close_persistent(), ro_gui_menu_refresh(), ro_gui_window_update_toolbar_buttons(), ro_toolbar_set_content_favicon(), gui_window::toolbar, and gui_window::window.

Referenced by ro_gui_window_event().

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

◆ gui_window_page_info_change()

static void gui_window_page_info_change ( struct gui_window gw)
static

Update the interface to reflect change in page info status.

Parameters
gwwindow with start of load

Definition at line 3816 of file window.c.

References ro_toolbar_page_info_change(), and gui_window::toolbar.

Referenced by ro_gui_window_event().

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

◆ gui_window_place_caret()

static void gui_window_place_caret ( struct gui_window g,
int  x,
int  y,
int  height,
const struct rect clip 
)
static

Place the caret in a browser window.

Parameters
gwindow with caret
xcoordinates of caret
ycoordinates of caret
heightheight of caret
clipclip rectangle, or NULL if none

Definition at line 200 of file window.c.

References update_box::g, height, NSLOG, ro_warn_user(), and gui_window::window.

Referenced by gui_window_create(), gui_window_remove_caret(), and ro_gui_window_click().

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

◆ gui_window_remove_caret()

static void gui_window_remove_caret ( struct gui_window g)
static

Remove the caret, if present.

Parameters
gwindow with caret

Definition at line 3842 of file window.c.

References update_box::g, gui_window_place_caret(), NSLOG, ro_warn_user(), and gui_window::window.

Referenced by ro_gui_window_event().

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

◆ gui_window_save_link()

static nserror gui_window_save_link ( struct gui_window g,
nsurl url,
const char *  title 
)
static

Save the specified content as a link.

Parameters
gThe window containing the content
urlThe url of the link
titleThe title of the link

Definition at line 4056 of file window.c.

References dialog_saveas, GUI_SAVE_LINK_URL, NSERROR_OK, ro_gui_dialog_open_persistent(), ro_gui_save_prepare(), gui_window::title, gui_window::url, and gui_window::window.

Here is the call graph for this function:

◆ gui_window_scroll_start()

static bool gui_window_scroll_start ( struct gui_window g)
static

Starts drag scrolling of a browser window.

Parameters
gthe window to scroll

Definition at line 3927 of file window.c.

References height, NSLOG, ro_gui_window_mouse_at(), ro_gui_window_scroll_end(), ro_mouse_drag_start(), ro_toolbar_full_height(), ro_warn_user(), gui_window::toolbar, width, and gui_window::window.

Referenced by ro_gui_window_event().

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

◆ gui_window_set_extent()

static void gui_window_set_extent ( struct gui_window g,
int  width,
int  height 
)
static

Updates a windows extent.

Parameters
gthe gui_window to update
widththe minimum width, or -1 to use window width
heightthe minimum height, or -1 to use window height

Definition at line 225 of file window.c.

References browser_window_get_extents(), browser_window_has_content(), browser_window_is_frameset(), gui_window::bw, update_box::g, height, max, NSLOG, ro_get_hscroll_height(), ro_get_title_height(), ro_gui_screen_size(), ro_toolbar_full_height(), ro_warn_user(), gui_window::toolbar, width, and gui_window::window.

Referenced by ro_gui_window_open().

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

◆ gui_window_set_icon()

static void gui_window_set_icon ( struct gui_window g,
struct hlcache_handle icon 
)
static

set favicon

Definition at line 3828 of file window.c.

References update_box::g, ro_toolbar_set_site_favicon(), and gui_window::toolbar.

Here is the call graph for this function:

◆ gui_window_set_pointer()

void gui_window_set_pointer ( struct gui_window g,
gui_pointer_shape  shape 
)

set the pointer shape

Change mouse pointer shape.

Definition at line 5051 of file window.c.

References GUI_POINTER_DEFAULT, gui_sprites, NSLOG, ro_gui_pointer_table, ro_warn_user(), ro_gui_pointer_entry::sprite_name, ro_gui_pointer_entry::wimp_area, ro_gui_pointer_entry::xactive, and ro_gui_pointer_entry::yactive.

Referenced by ro_gui_window_handle_local_keypress(), and ro_gui_window_track_end().

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

◆ gui_window_set_scroll()

static nserror gui_window_set_scroll ( struct gui_window g,
const struct rect rect 
)
static

Set the scroll position of a riscos browser window.

Scrolls the viewport to ensure the specified rectangle of the content is shown.

Parameters
ggui window to scroll
rectThe rectangle to ensure is shown.
Returns
NSERROR_OK on success or apropriate error code.

Definition at line 3651 of file window.c.

References update_box::g, height, NSERROR_BAD_PARAMETER, NSERROR_OK, NSLOG, PTR_WIMP_OPEN, ro_gui_window_open(), ro_toolbar_full_height(), ro_warn_user(), SCROLL_VISIBLE_PADDING, gui_window::toolbar, width, gui_window::window, update_box::x0, rect::x0, update_box::x1, rect::x1, update_box::y0, rect::y0, update_box::y1, and rect::y1.

Here is the call graph for this function:

◆ gui_window_set_title()

static void gui_window_set_title ( struct gui_window g,
const char *  title 
)
static

Set the title of a browser window.

Parameters
ggui_window to update
titlenew window title, copied

Definition at line 3579 of file window.c.

References ABS, browser_window_get_scale(), gui_window::bw, update_box::g, ro_gui_set_window_title(), gui_window::title, and gui_window::window.

Here is the call graph for this function:

◆ gui_window_start_throbber()

static void gui_window_start_throbber ( struct gui_window g)
static

Update the interface to reflect start of page loading.

Parameters
gwindow with start of load

Definition at line 3786 of file window.c.

References gui_window::active, update_box::g, ro_gui_browser_window_menu, ro_gui_menu_refresh(), ro_gui_window_update_toolbar_buttons(), ro_toolbar_start_throbbing(), and gui_window::toolbar.

Referenced by ro_gui_window_event().

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

◆ gui_window_stop_throbber()

static void gui_window_stop_throbber ( struct gui_window g)
static

Update the interface to reflect page loading stopped.

Parameters
gwindow with start of load

Definition at line 3801 of file window.c.

References gui_window::active, update_box::g, ro_gui_browser_window_menu, ro_gui_menu_refresh(), ro_gui_window_update_toolbar_buttons(), ro_toolbar_stop_throbbing(), and gui_window::toolbar.

Referenced by ro_gui_window_event().

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

◆ gui_window_update_extent()

static void gui_window_update_extent ( struct gui_window g)
static

Update the extent of the inside of a browser window to that of the current content.

Parameters
ggui_window to update the extent of

Definition at line 458 of file window.c.

References NSLOG, PTR_WIMP_OPEN, ro_gui_window_open(), ro_toolbar_height(), ro_warn_user(), gui_window::toolbar, gui_window::update_extent, and gui_window::window.

Referenced by ro_gui_window_event(), ro_gui_window_update_theme(), and ro_gui_window_update_toolbar().

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

◆ handle_local_keypress_scale()

static bool handle_local_keypress_scale ( struct gui_window gw,
uint32_t  c 
)
static

handle scale kepresses within RISC OS

Definition at line 1226 of file window.c.

References browser_window_get_scale(), gui_window::bw, ro_gui_shift_pressed(), ro_gui_window_set_scale(), scale_snap_to, and SCALE_SNAP_TO_SIZE.

Referenced by ro_gui_window_handle_local_keypress().

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

◆ riscos_window_set_status()

static void riscos_window_set_status ( struct gui_window g,
const char *  text 
)
static

Set the status bar of a browser window.

Parameters
ggui_window to update
textnew status text

Definition at line 3773 of file window.c.

References update_box::g, ro_gui_status_bar_set_text(), gui_window::status_bar, and text().

Here is the call graph for this function:

◆ ro_gui_alt_pressed()

bool ro_gui_alt_pressed ( void  )

Returns true iff one or more Alt keys is held down.

Definition at line 5042 of file window.c.

Referenced by ro_gui_close_window_request(), ro_gui_mouse_click_state(), and ro_gui_mouse_drag_state().

Here is the caller graph for this function:

◆ ro_gui_ctrl_pressed()

bool ro_gui_ctrl_pressed ( void  )

Returns true iff one or more Ctrl keys is held down.

Definition at line 5033 of file window.c.

Referenced by ro_cw_keypress(), ro_gui_mouse_click_state(), ro_gui_mouse_drag_state(), ro_gui_window_keypress(), and ro_gui_window_open().

Here is the caller graph for this function:

◆ ro_gui_mouse_click_state()

enum browser_mouse_state ro_gui_mouse_click_state ( wimp_mouse_state  buttons,
wimp_icon_flags  type 
)

Returns the state of the mouse buttons and modifiers keys for a mouse action, suitable for passing to the OS-independent browser window/ treeview/ etc code.

Parameters
buttonsWimp button state.
typeWimp work-area/icon type for decoding.
Returns
NetSurf core button state.

Definition at line 4878 of file window.c.

References BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_DOUBLE_CLICK, BROWSER_MOUSE_DRAG_1, BROWSER_MOUSE_DRAG_2, BROWSER_MOUSE_MOD_1, BROWSER_MOUSE_MOD_2, BROWSER_MOUSE_MOD_3, BROWSER_MOUSE_PRESS_1, BROWSER_MOUSE_PRESS_2, BROWSER_MOUSE_TRIPLE_CLICK, mouse_drag_adjust, mouse_drag_select, ro_gui_alt_pressed(), ro_gui_ctrl_pressed(), ro_gui_shift_pressed(), and type.

Referenced by ro_cw_mouse_click(), and ro_gui_window_click().

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

◆ ro_gui_mouse_drag_state()

browser_mouse_state ro_gui_mouse_drag_state ( wimp_mouse_state  buttons,
wimp_icon_flags  type 
)

Returns the state of the mouse buttons and modifiers keys whilst dragging, for passing to the OS-independent browser window/ treeview/ etc code.

Parameters
buttonsWimp button state.
typeWimp work-area/icon type for decoding.
Returns
NetSurf core button state.

Definition at line 4995 of file window.c.

References BROWSER_MOUSE_DRAG_ON, BROWSER_MOUSE_HOLDING_1, BROWSER_MOUSE_HOLDING_2, BROWSER_MOUSE_MOD_1, BROWSER_MOUSE_MOD_2, BROWSER_MOUSE_MOD_3, mouse_drag_adjust, mouse_drag_select, ro_gui_alt_pressed(), ro_gui_ctrl_pressed(), and ro_gui_shift_pressed().

Referenced by ro_cw_mouse_at(), and ro_gui_window_mouse_at().

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

◆ ro_gui_shift_pressed()

bool ro_gui_shift_pressed ( void  )

Returns true iff one or more Shift keys is held down.

Definition at line 5024 of file window.c.

Referenced by handle_local_keypress_scale(), ro_gui_mouse_click_state(), ro_gui_mouse_drag_state(), ro_gui_window_close(), ro_gui_window_scroll(), and ro_gui_window_toolbar_click().

Here is the caller graph for this function:

◆ ro_gui_throb()

void ro_gui_throb ( void  )

Animate the "throbbers" of all browser windows.

Definition at line 4778 of file window.c.

References gui_window::active, gui_window::next, ro_toolbar_throb(), gui_window::toolbar, and window_list.

Referenced by ro_gui_handle_event().

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

◆ ro_gui_toolbar_dataload()

bool ro_gui_toolbar_dataload ( struct gui_window g,
wimp_message *  message 
)

Handle Message_DataLoad (file dragged in) for a toolbar.

Todo:
This belongs in the toolbar module, and should be moved there once the module is able to usefully handle its own events.
Parameters
gwindow
messageMessage_DataLoad block
Returns
true if the load was processed

Definition at line 4657 of file window.c.

References NSLOG, ro_gui_window_import_text(), 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_toolbar_lookup()

struct gui_window * ro_gui_toolbar_lookup ( wimp_w  window)

Convert a toolbar RISC OS window handle to a gui_window.

Parameters
windowRISC OS window handle of a toolbar
Returns
pointer to a structure if found, NULL otherwise

Definition at line 4836 of file window.c.

References parent, ro_gui_window_lookup(), ro_toolbar_get_parent_window(), and ro_toolbar_window_lookup().

Referenced by ro_gui_url_bar_menu_select(), ro_gui_url_bar_page_info_change(), and ro_msg_dataload().

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

◆ ro_gui_window__redraw_rect()

static void ro_gui_window__redraw_rect ( const struct gui_window gui_win,
const wimp_draw *  wimp_rect,
bool  use_buffer 
)
inlinestatic

Wrapper for calls to browser_window_redraw for a wimp_draw rectangle.

Parameters
[in]gui_winWindow to render.
[in]wimp_rectThe area of gui_win to render into.
[in]use_bufferWhether to use buffered rendering.

Definition at line 1650 of file window.c.

References browser_window_redraw(), gui_window::bw, clip(), redraw_context::interactive, ro_gui_buffer_close(), ro_gui_buffer_open(), ro_plot_clip_rect, ro_plot_origin_x, ro_plot_origin_y, ro_plotters, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by ro_gui_window_redraw(), and ro_gui_window_update_boxes().

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

◆ ro_gui_window_action_add_bookmark()

static void ro_gui_window_action_add_bookmark ( struct gui_window g)
static

Add a hotlist entry for a browser window.

Parameters
gThe browser window to act on.

Definition at line 583 of file window.c.

References browser_window_access_url(), browser_window_has_content(), gui_window::bw, ro_gui_hotlist_add_page(), ro_toolbar_update_hotlist(), gui_window::toolbar, and toolbar::url.

Referenced by ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_home()

static void ro_gui_window_action_home ( struct gui_window g)
static

Perform a Navigate Home action on a browser window.

Parameters
gThe browser window to act on.

Definition at line 643 of file window.c.

References browser_window_navigate(), gui_window::bw, BW_NAVIGATE_HISTORY, messages_get_errorcode(), NSERROR_OK, nsoption_charp, nsurl_create(), nsurl_unref(), ro_warn_user(), and toolbar::url.

Referenced by ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_local_history()

static void ro_gui_window_action_local_history ( struct gui_window gw)
static

Open a local history pane for a browser window.

Parameters
gwThe browser window to act on.

Definition at line 622 of file window.c.

References gui_window::bw, messages_get_errorcode(), NSERROR_OK, ro_gui_local_history_present(), ro_warn_user(), and gui_window::window.

Referenced by ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_new_window()

static void ro_gui_window_action_new_window ( struct gui_window g)
static

Open a new browser window.

Parameters
gThe browser window to act on.

Definition at line 1025 of file window.c.

References browser_window_access_url(), browser_window_create(), gui_window::bw, BW_CREATE_CLONE, messages_get_errorcode(), NSERROR_OK, and ro_warn_user().

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_window_action_page_info()

static void ro_gui_window_action_page_info ( struct gui_window g)
static

Open a page info box for a browser window.

Parameters
gThe browser window to act on.

Definition at line 800 of file window.c.

References browser_window_has_content(), gui_window::bw, dialog_pageinfo, ro_gui_dialog_open_persistent(), ro_gui_window_prepare_pageinfo(), and gui_window::window.

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_window_action_print()

static void ro_gui_window_action_print ( struct gui_window g)
static

Open a print dialogue for a browser window.

Parameters
gThe browser window to act on.

Definition at line 731 of file window.c.

References dialog_print, ro_gui_dialog_open_persistent(), ro_gui_print_prepare(), and gui_window::window.

Referenced by ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_remove_bookmark()

static void ro_gui_window_action_remove_bookmark ( struct gui_window g)
static

Remove a hotlist entry for a browser window.

Parameters
gThe browser window to act on.

Definition at line 603 of file window.c.

References browser_window_access_url(), browser_window_has_content(), gui_window::bw, ro_gui_hotlist_remove_page(), gui_window::toolbar, and toolbar::url.

Referenced by ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_save()

static void ro_gui_window_action_save ( struct gui_window g,
gui_save_type  save_type 
)
static

Open a save dialogue for a browser window contents.

Parameters
gThe browser window to act on.
save_typeThe type of save to open.

Definition at line 710 of file window.c.

References browser_window_get_content(), browser_window_has_content(), gui_window::bw, dialog_saveas, ro_gui_dialog_open_persistent(), ro_gui_save_prepare(), and gui_window::window.

Referenced by ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_search()

static void ro_gui_window_action_search ( struct gui_window g)
static

Open a text search dialogue for a browser window.

Parameters
gThe browser window to act on.

Definition at line 678 of file window.c.

References browser_window_can_search(), gui_window::bw, dialog_search, ro_gui_dialog_open_persistent(), ro_gui_search_prepare(), and gui_window::window.

Referenced by ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_action_zoom()

static void ro_gui_window_action_zoom ( struct gui_window g)
static

Open a zoom dialogue for a browser window.

Parameters
gThe browser window to act on.

Definition at line 693 of file window.c.

References dialog_zoom, ro_gui_dialog_open_persistent(), ro_gui_dialog_prepare_zoom(), and gui_window::window.

Referenced by ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().

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

◆ ro_gui_window_check_menu()

bool ro_gui_window_check_menu ( wimp_menu *  menu)

Check if a particular menu handle is a browser window menu.

Parameters
menuThe menu in question.
Returns
true if this menu is a browser window menu

Definition at line 4683 of file window.c.

References ro_gui_browser_window_menu.

Referenced by ro_gui_interactive_help_request().

Here is the caller graph for this function:

◆ ro_gui_window_click()

static bool ro_gui_window_click ( wimp_pointer *  pointer)
static

Handle Mouse_Click events in a browser window.

This should never see Menu clicks, as these will be routed to the menu handlers.

Parameters
pointerdetails of mouse click
Returns
true if click handled, false otherwise

Definition at line 1975 of file window.c.

References browser_window_mouse_click(), gui_window::bw, gui_window_place_caret(), ro_gui_mouse_click_state(), ro_gui_url_complete_close(), ro_gui_wimp_event_get_user_data(), and ro_gui_window_to_window_pos().

Referenced by gui_window_create().

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

◆ ro_gui_window_clone_options()

static void ro_gui_window_clone_options ( struct gui_window new_gui,
struct gui_window old_gui 
)
static

Clones a browser window's options.

Parameters
new_guithe new gui window
old_guithe gui window to clone from, or NULL for default

Definition at line 3228 of file window.c.

References gui_window::buffer_animations, gui_window::buffer_everything, nsoption_bool, gui_window::option, ro_toolbar_get_display_buttons(), ro_toolbar_get_display_throbber(), ro_toolbar_get_display_url(), ro_toolbar_process(), ro_toolbar_set_display_buttons(), ro_toolbar_set_display_throbber(), ro_toolbar_set_display_url(), and gui_window::toolbar.

Referenced by gui_window_create().

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

◆ ro_gui_window_close()

static void ro_gui_window_close ( wimp_w  w)
static

Handle wimp closing event.

Parameters
wThe window handle the event occoured on

Definition at line 1575 of file window.c.

References browser_window_access_url(), browser_window_destroy(), browser_window_navigate_up(), gui_window::bw, netsurf_nsurl_to_path(), NSLOG, ro_gui_shift_pressed(), ro_gui_wimp_event_get_user_data(), ro_warn_user(), and gui_window::url.

Referenced by gui_window_create().

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

◆ ro_gui_window_content_export_types()

static bool ro_gui_window_content_export_types ( struct hlcache_handle h,
bool *  export_draw,
bool *  export_sprite 
)
static

Return boolean flags to show what RISC OS types we can sensibly convert the given object into.

Todo:
This should probably be somewhere else but in window.c, and should probably even be done in content_().
Parameters
hThe object to test.
export_drawtrue on exit if a drawfile would be possible.
export_spritetrue on exit if a sprite would be possible.
Returns
true if valid data is returned; else false.

Definition at line 2144 of file window.c.

References content_get_type(), CONTENT_IMAGE, and ro_content_native_type().

Referenced by ro_gui_window_menu_prepare(), and ro_gui_window_menu_warning().

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

◆ ro_gui_window_dataload()

bool ro_gui_window_dataload ( struct gui_window g,
wimp_message *  message 
)

Handle Message_DataLoad (file dragged in) for a window.

If the file was dragged into a form file input, it is used as the value.

Parameters
gwindow
messageMessage_DataLoad block
Returns
true if the load was processed

Definition at line 4481 of file window.c.

References browser_window_drop_file_at_point(), gui_window::bw, update_box::g, NSLOG, ro_gui_window_to_window_pos(), ro_warn_user(), and browser_window::x.

Referenced by ro_msg_dataload().

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

◆ ro_gui_window_default_options()

void ro_gui_window_default_options ( struct gui_window gui)

Makes a browser window's options the default.

Parameters
guiThe riscos gui window to set default options in.

Definition at line 4792 of file window.c.

References browser_window_get_scale(), gui_window::buffer_animations, gui_window::buffer_everything, gui_window::bw, gui_window::gui, nsoption_set_bool, nsoption_set_int, gui_window::option, ro_gui_status_bar_get_width(), ro_toolbar_get_display_buttons(), ro_toolbar_get_display_throbber(), ro_toolbar_get_display_url(), gui_window::scale, gui_window::status_bar, and gui_window::toolbar.

Referenced by ro_gui_window_menu_select().

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

◆ ro_gui_window_event()

static nserror ro_gui_window_event ( struct gui_window gw,
enum gui_window_event  event 
)
static

process miscellaneous window events

Parameters
gwThe window receiving the event.
eventThe event code.
Returns
NSERROR_OK when processed ok

Definition at line 4188 of file window.c.

References gui_start_selection(), gui_window_new_content(), gui_window_page_info_change(), gui_window_remove_caret(), gui_window_scroll_start(), gui_window_start_throbber(), gui_window_stop_throbber(), gui_window_update_extent(), GW_EVENT_NEW_CONTENT, GW_EVENT_PAGE_INFO_CHANGE, GW_EVENT_REMOVE_CARET, GW_EVENT_SCROLL_START, GW_EVENT_START_SELECTION, GW_EVENT_START_THROBBER, GW_EVENT_STOP_THROBBER, GW_EVENT_UPDATE_EXTENT, and NSERROR_OK.

Here is the call graph for this function:

◆ ro_gui_window_handle_local_keypress()

static bool ro_gui_window_handle_local_keypress ( struct gui_window g,
wimp_key *  key,
bool  is_toolbar 
)
static

Handle keypresses within the RISC OS GUI.

this is to be called after the core has been given a chance to act, or on keypresses in the toolbar where the core doesn't get involved.

Parameters
*gThe gui window to which the keypress applies.
*keyThe keypress data.
is_toolbartrue if the keypress is from a toolbar else false.
Returns
true if the keypress was claimed; else false.

Definition at line 1283 of file window.c.

References browser_window_create(), browser_window_debug(), browser_window_destroy(), browser_window_get_content(), browser_window_get_features(), browser_window_has_content(), browser_window_reload(), browser_window_stop(), gui_window::bw, BW_CREATE_HISTORY, CONTENT_DEBUG_REDRAW, GUI_POINTER_DEFAULT, GUI_SAVE_COMPLETE, GUI_SAVE_DRAW, GUI_SAVE_SOURCE, GUI_SAVE_TEXT, gui_window_set_pointer(), handle_local_keypress_scale(), IS_WIMP_KEY, browser_window_features::main, messages_get_errorcode(), NSERROR_OK, NSLOG, nsurl_create(), nsurl_unref(), ro_gui_dump_browser_window(), ro_gui_global_history_present(), ro_gui_hotlist_present(), ro_gui_url_complete_close(), ro_gui_url_complete_keypress(), ro_gui_url_complete_start(), ro_gui_view_source(), ro_gui_window_action_local_history(), ro_gui_window_action_new_window(), ro_gui_window_action_page_info(), ro_gui_window_action_print(), ro_gui_window_action_save(), ro_gui_window_action_search(), ro_gui_window_action_zoom(), ro_gui_window_invalidate_area(), ro_gui_window_launch_url(), ro_gui_window_scroll_action(), ro_gui_window_to_window_pos(), ro_toolbar_get_url(), ro_toolbar_set_url(), ro_warn_user(), talloc_report_full(), gui_window::toolbar, urldb_dump(), wimp_KEY_END, and browser_window::x.

Referenced by ro_gui_window_keypress(), and ro_gui_window_toolbar_keypress().

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

◆ ro_gui_window_iconise()

void ro_gui_window_iconise ( struct gui_window g,
wimp_full_message_window_info *  wi 
)

Window is being iconised.

Create a suitable thumbnail sprite (which, sadly, must be in the Wimp sprite pool), and return the sprite name and truncated title to the iconiser

Parameters
gthe gui window being iconised
withe WindowInfo message from the iconiser

Definition at line 4531 of file window.c.

References bitmap(), BITMAP_CLEAR, BITMAP_OPAQUE, browser_window_get_content(), browser_window::bw, gui_window::bw, height, gui_window::iconise_icon, iconise_next, iconise_used, NOF_ELEMENTS, NSLOG, riscos_bitmap_convert_8bpp(), riscos_bitmap_create(), riscos_bitmap_destroy(), riscos_bitmap_overlay_sprite(), riscos_bitmap_render(), ro_gui_wimp_get_sprite(), ro_warn_user(), sprite_bpp(), gui_window::title, and width.

Referenced by ro_msg_window_info().

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

◆ ro_gui_window_import_text()

static bool ro_gui_window_import_text ( struct gui_window g,
const char *  filename 
)
static

Import text file into window.

Parameters
ggui window containing textarea
filenamepathname of file to be imported
Returns
true iff successful

Definition at line 4109 of file window.c.

References NSERROR_BAD_ENCODING, NSERROR_OK, NSLOG, ro_gui_window_launch_url(), ro_warn_user(), utf8_from_local_encoding(), and utf8_next().

Referenced by ro_gui_toolbar_dataload().

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

◆ ro_gui_window_initialise()

void ro_gui_window_initialise ( void  )

Initialise the browser window module and its menus.

Definition at line 4262 of file window.c.

References BROWSER_BUFFER_ALL, BROWSER_BUFFER_ANIMS, BROWSER_EXPORT_DRAW, BROWSER_EXPORT_PDF, BROWSER_EXPORT_TEXT, BROWSER_FIND_TEXT, BROWSER_IMAGES_BACKGROUND, BROWSER_IMAGES_FOREGROUND, BROWSER_LINK_DOWNLOAD, BROWSER_LINK_NEW_WINDOW, BROWSER_LINK_SAVE, BROWSER_LINK_SAVE_TEXT, BROWSER_LINK_SAVE_URI, BROWSER_LINK_SAVE_URL, BROWSER_NAVIGATE_BACK, BROWSER_NAVIGATE_FORWARD, BROWSER_NAVIGATE_HOME, BROWSER_NAVIGATE_RELOAD_ALL, BROWSER_NAVIGATE_STOP, BROWSER_NAVIGATE_UP, BROWSER_NEW_WINDOW, BROWSER_OBJECT, BROWSER_OBJECT_EXPORT, BROWSER_OBJECT_EXPORT_DRAW, BROWSER_OBJECT_EXPORT_SPRITE, BROWSER_OBJECT_INFO, BROWSER_OBJECT_LINK, BROWSER_OBJECT_OBJECT, BROWSER_OBJECT_PRINT, BROWSER_OBJECT_RELOAD, BROWSER_OBJECT_SAVE, BROWSER_OBJECT_SAVE_URL_TEXT, BROWSER_OBJECT_SAVE_URL_URI, BROWSER_OBJECT_SAVE_URL_URL, BROWSER_PAGE, BROWSER_PAGE_INFO, BROWSER_PRINT, BROWSER_SAVE, BROWSER_SAVE_COMPLETE, BROWSER_SAVE_URL_TEXT, BROWSER_SAVE_URL_URI, BROWSER_SAVE_URL_URL, BROWSER_SAVE_VIEW, BROWSER_SCALE_VIEW, BROWSER_SELECTION, BROWSER_SELECTION_ALL, BROWSER_SELECTION_CLEAR, BROWSER_SELECTION_COPY, BROWSER_SELECTION_CUT, BROWSER_SELECTION_PASTE, BROWSER_SELECTION_SAVE, BROWSER_VIEW_SOURCE, BROWSER_WINDOW_COPY, BROWSER_WINDOW_DEFAULT, BROWSER_WINDOW_RESET, BROWSER_WINDOW_STAGGER, COOKIES_DELETE, COOKIES_SHOW, dialog_objinfo, dialog_pageinfo, dialog_print, dialog_saveas, dialog_search, dialog_zoom, HELP_LAUNCH_INTERACTIVE, HELP_OPEN_CONTENTS, HELP_OPEN_CREDITS, HELP_OPEN_GUIDE, HELP_OPEN_INFORMATION, HELP_OPEN_LICENCE, HISTORY_SHOW_GLOBAL, HISTORY_SHOW_LOCAL, HOTLIST_ADD_URL, HOTLIST_SHOW, NO_ACTION, ro_gui_browser_window_menu, ro_gui_menu_define_menu(), TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, and TOOLBAR_THROBBER.

Referenced by gui_init().

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

◆ ro_gui_window_invalidate_area()

nserror ro_gui_window_invalidate_area ( struct gui_window g,
const struct rect rect 
)

Cause an area of a window to be invalidated.

The specified area of the window should now be considered out of date. If the entire window is invalidated this simply calls wimp_force_redraw() otherwise the area is added to a queue of pending updates which will be processed from a wimp poll allowing multiple invalidation requests to be agregated.

Parameters
gThe window to update
rectThe area of the window to update or NULL to redraw entire contents.

Definition at line 4371 of file window.c.

References gui_window::buffer_animations, gui_window::buffer_everything, update_box::g, MARGIN, max, min, update_box::next, NSERROR_INVALID, NSERROR_NOMEM, NSERROR_OK, NSLOG, gui_window::option, pending_updates, ro_warn_user(), update_box::use_buffer, gui_window::window, update_box::x0, rect::x0, update_box::x1, rect::x1, update_box::y0, rect::y0, update_box::y1, and rect::y1.

Referenced by print_document(), ro_gui_window_handle_local_keypress(), and ro_gui_window_redraw_all().

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

◆ ro_gui_window_keypress()

static bool ro_gui_window_keypress ( wimp_key *  key)
static

Process Key_Pressed events in a browser window.

Parameters
keyThe wimp keypress block for the event.
Returns
true if the event was handled, else false.

Definition at line 1845 of file window.c.

References browser_window_key_press(), gui_window::bw, IS_WIMP_KEY, NS_KEY_DELETE_LEFT, NS_KEY_DELETE_LINE_END, NS_KEY_DELETE_LINE_START, NS_KEY_DELETE_RIGHT, NS_KEY_DOWN, NS_KEY_LEFT, NS_KEY_LINE_END, NS_KEY_LINE_START, NS_KEY_PAGE_DOWN, NS_KEY_PAGE_UP, NS_KEY_REDO, NS_KEY_RIGHT, NS_KEY_TEXT_END, NS_KEY_TEXT_START, NS_KEY_UNDO, NS_KEY_UP, NS_KEY_WORD_LEFT, NS_KEY_WORD_RIGHT, os_version, RISCOS5, ro_gui_ctrl_pressed(), ro_gui_wimp_event_get_user_data(), ro_gui_window_handle_local_keypress(), and wimp_KEY_END.

Referenced by gui_window_create().

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

◆ ro_gui_window_launch_url()

static void ro_gui_window_launch_url ( struct gui_window g,
const char *  url_s 
)
static

Launch a new url in the given window.

Parameters
ggui_window to update
url1url to be launched

Definition at line 995 of file window.c.

References browser_window_navigate(), gui_window::bw, BW_NAVIGATE_HISTORY, messages_get_errorcode(), NSERROR_OK, nsurl_unref(), ro_gui_url_complete_close(), ro_gui_window_set_url(), ro_warn_user(), search_web_omni(), SEARCH_WEB_OMNI_NONE, and gui_window::url.

Referenced by ro_gui_window_handle_local_keypress(), and ro_gui_window_import_text().

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

◆ ro_gui_window_lookup()

struct gui_window * ro_gui_window_lookup ( wimp_w  window)

Convert a RISC OS window handle to a gui_window.

Parameters
windowRISC OS window handle.
Returns
A pointer to a riscos gui window if found or NULL.

Definition at line 4823 of file window.c.

References gui_window::next, gui_window::window, and window_list.

Referenced by ro_gui_interactive_help_request(), ro_gui_save_drag_end(), ro_gui_selection_dragging(), ro_gui_toolbar_lookup(), ro_gui_url_complete_click(), ro_gui_window_pointer_entering(), ro_gui_window_scroll(), ro_msg_dataload(), and ro_msg_window_info().

Here is the caller graph for this function:

◆ ro_gui_window_menu_close()

static void ro_gui_window_menu_close ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu 
)
static

Handle the closure of a browser window menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
menuThe menu that is being closed.

Definition at line 3210 of file window.c.

References current_menu_object, current_menu_url, gui_form_select_control, gui_form_select_menu, and ro_gui_browser_window_menu.

Referenced by gui_window_create().

Here is the caller graph for this function:

◆ ro_gui_window_menu_prepare()

static bool ro_gui_window_menu_prepare ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_pointer *  pointer 
)
static

Prepare the browser window menu for (re-)opening.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
menuThe menu about to be opened.
pointerPointer to the relevant wimp event block, or NULL for an Adjust click.
Returns
true if the event was handled; else false.

Definition at line 2195 of file window.c.

References BROWSER_BUFFER_ALL, BROWSER_BUFFER_ANIMS, BROWSER_EXPORT_DRAW, BROWSER_EXPORT_PDF, BROWSER_EXPORT_TEXT, BROWSER_FIND_TEXT, BROWSER_IMAGES_BACKGROUND, BROWSER_IMAGES_FOREGROUND, BROWSER_LINK_SAVE_TEXT, BROWSER_LINK_SAVE_URI, BROWSER_LINK_SAVE_URL, BROWSER_NAVIGATE_BACK, BROWSER_NAVIGATE_FORWARD, BROWSER_NAVIGATE_RELOAD_ALL, BROWSER_NAVIGATE_STOP, BROWSER_NAVIGATE_UP, BROWSER_NEW_WINDOW, BROWSER_OBJECT, BROWSER_OBJECT_EXPORT, BROWSER_OBJECT_EXPORT_DRAW, BROWSER_OBJECT_EXPORT_SPRITE, BROWSER_OBJECT_INFO, BROWSER_OBJECT_LINK, BROWSER_OBJECT_OBJECT, BROWSER_OBJECT_PRINT, BROWSER_OBJECT_RELOAD, BROWSER_OBJECT_SAVE, BROWSER_OBJECT_SAVE_URL_TEXT, BROWSER_OBJECT_SAVE_URL_URI, BROWSER_OBJECT_SAVE_URL_URL, BROWSER_PAGE, BROWSER_PAGE_INFO, BROWSER_PRINT, BROWSER_SAVE, BROWSER_SAVE_COMPLETE, BROWSER_SAVE_URL_TEXT, BROWSER_SAVE_URL_URI, BROWSER_SAVE_URL_URL, BROWSER_SCALE_VIEW, BROWSER_SELECTION, BROWSER_SELECTION_CLEAR, BROWSER_SELECTION_COPY, BROWSER_SELECTION_CUT, BROWSER_SELECTION_PASTE, BROWSER_SELECTION_SAVE, BROWSER_VIEW_SOURCE, browser_window_back_available(), browser_window_can_search(), browser_window_can_select(), BROWSER_WINDOW_COPY, browser_window_forward_available(), browser_window_get_content(), browser_window_get_editor_flags(), browser_window_get_features(), browser_window_has_content(), browser_window_reload_available(), BROWSER_WINDOW_RESET, BROWSER_WINDOW_STAGGER, browser_window_stop_available(), browser_window_up_available(), gui_window::buffer_animations, gui_window::buffer_everything, browser_window::bw, gui_window::bw, BW_EDITOR_CAN_COPY, BW_EDITOR_CAN_CUT, BW_EDITOR_CAN_PASTE, current_menu_main, current_menu_object, current_menu_url, gui_form_select_control, gui_form_select_menu, HELP_LAUNCH_INTERACTIVE, HISTORY_SHOW_LOCAL, HOTLIST_ADD_URL, browser_window_features::link, browser_window_features::main, nsoption_bool, nsoption_int, browser_window_features::object, gui_window::option, ro_gui_browser_window_menu, ro_gui_interactive_help_available(), ro_gui_menu_set_entry_shaded(), ro_gui_menu_set_entry_ticked(), ro_gui_url_complete_close(), ro_gui_wimp_event_get_user_data(), ro_gui_window_content_export_types(), ro_gui_window_prepare_form_select_menu(), ro_gui_window_to_window_pos(), ro_toolbar_menu_buttons_tick, ro_toolbar_menu_edit_shade, ro_toolbar_menu_edit_tick, ro_toolbar_menu_option_shade, ro_toolbar_menu_throbber_tick, ro_toolbar_menu_url_tick, gui_window::toolbar, TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, TOOLBAR_THROBBER, gui_window::window, and browser_window::x.

Referenced by gui_window_create().

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

◆ ro_gui_window_menu_select()

static bool ro_gui_window_menu_select ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle selections from a browser window menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
menuThe menu from which the selection was made.
selectionThe wimp menu selection data.
actionThe selected menu action.
Returns
true if action accepted; else false.

Definition at line 2542 of file window.c.

References BROWSER_BUFFER_ALL, BROWSER_BUFFER_ANIMS, BROWSER_EXPORT_DRAW, BROWSER_EXPORT_PDF, BROWSER_EXPORT_TEXT, BROWSER_FIND_TEXT, BROWSER_IMAGES_BACKGROUND, BROWSER_IMAGES_FOREGROUND, BROWSER_LINK_DOWNLOAD, BROWSER_LINK_NEW_WINDOW, BROWSER_LINK_SAVE_TEXT, BROWSER_LINK_SAVE_URI, BROWSER_LINK_SAVE_URL, BROWSER_NAVIGATE_BACK, BROWSER_NAVIGATE_FORWARD, BROWSER_NAVIGATE_HOME, BROWSER_NAVIGATE_RELOAD_ALL, BROWSER_NAVIGATE_STOP, BROWSER_NAVIGATE_UP, BROWSER_NEW_WINDOW, BROWSER_OBJECT_EXPORT_DRAW, BROWSER_OBJECT_EXPORT_SPRITE, BROWSER_OBJECT_INFO, BROWSER_OBJECT_RELOAD, BROWSER_OBJECT_SAVE, BROWSER_PAGE_INFO, BROWSER_PRINT, BROWSER_SAVE, BROWSER_SAVE_COMPLETE, BROWSER_SAVE_URL_TEXT, BROWSER_SAVE_URL_URI, BROWSER_SAVE_URL_URL, BROWSER_SAVE_VIEW, BROWSER_SCALE_VIEW, BROWSER_SELECTION_ALL, BROWSER_SELECTION_CLEAR, BROWSER_SELECTION_COPY, BROWSER_SELECTION_CUT, BROWSER_SELECTION_PASTE, BROWSER_SELECTION_SAVE, BROWSER_VIEW_SOURCE, browser_window_access_url(), BROWSER_WINDOW_COPY, browser_window_create(), BROWSER_WINDOW_DEFAULT, browser_window_get_content(), browser_window_get_selection(), browser_window_history_back(), browser_window_history_forward(), browser_window_key_press(), browser_window_navigate(), browser_window_navigate_up(), browser_window_reload(), BROWSER_WINDOW_RESET, BROWSER_WINDOW_STAGGER, browser_window_stop(), gui_window::buffer_animations, gui_window::buffer_everything, browser_window::bw, gui_window::bw, BW_CREATE_CLONE, BW_CREATE_HISTORY, BW_NAVIGATE_DOWNLOAD, content_invalidate_reuse_data(), cookie_manager_keypress(), COOKIES_DELETE, COOKIES_SHOW, current_menu_main, current_menu_object, current_menu_url, dialog_objinfo, dialog_saveas, gui_form_select_menu, GUI_SAVE_COMPLETE, GUI_SAVE_DRAW, GUI_SAVE_LINK_TEXT, GUI_SAVE_LINK_URI, GUI_SAVE_LINK_URL, GUI_SAVE_OBJECT_NATIVE, GUI_SAVE_OBJECT_ORIG, GUI_SAVE_PDF, GUI_SAVE_SOURCE, GUI_SAVE_TEXT, GUI_SAVE_TEXT_SELECTION, HELP_LAUNCH_INTERACTIVE, HELP_OPEN_CONTENTS, HELP_OPEN_CREDITS, HELP_OPEN_GUIDE, HELP_OPEN_INFORMATION, HELP_OPEN_LICENCE, HISTORY_SHOW_GLOBAL, HISTORY_SHOW_LOCAL, HOTLIST_ADD_URL, HOTLIST_SHOW, messages_get_errorcode(), NS_KEY_CLEAR_SELECTION, NS_KEY_COPY_SELECTION, NS_KEY_CUT_SELECTION, NS_KEY_DELETE_LEFT, NS_KEY_SELECT_ALL, NSERROR_OK, NSLOG, nsoption_bool, nsoption_int, nsoption_set_bool, nsoption_set_int, nsurl_create(), nsurl_unref(), gui_window::option, ro_gui_cookies_present(), ro_gui_dialog_open_persistent(), ro_gui_global_history_present(), ro_gui_hotlist_present(), ro_gui_interactive_help_available(), ro_gui_interactive_help_start(), ro_gui_save_options(), ro_gui_save_prepare(), ro_gui_screen_size(), ro_gui_selection_prepare_paste(), ro_gui_view_source(), ro_gui_wimp_event_get_user_data(), ro_gui_window_action_add_bookmark(), ro_gui_window_action_home(), ro_gui_window_action_local_history(), ro_gui_window_action_new_window(), ro_gui_window_action_page_info(), ro_gui_window_action_print(), ro_gui_window_action_save(), ro_gui_window_action_search(), ro_gui_window_action_zoom(), ro_gui_window_default_options(), ro_gui_window_paste_cb(), ro_gui_window_prepare_objectinfo(), ro_gui_window_process_form_select_menu(), ro_toolbar_get_display_buttons(), ro_toolbar_get_display_throbber(), ro_toolbar_get_display_url(), ro_toolbar_set_display_buttons(), ro_toolbar_set_display_throbber(), ro_toolbar_set_display_url(), ro_toolbar_take_caret(), ro_toolbar_toggle_edit(), ro_warn_user(), gui_window::state, gui_window::toolbar, TOOLBAR_ADDRESS_BAR, TOOLBAR_BUTTONS, TOOLBAR_EDIT, TOOLBAR_THROBBER, gui_window::url, toolbar::url, and gui_window::window.

Referenced by gui_window_create().

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

◆ ro_gui_window_menu_warning()

static void ro_gui_window_menu_warning ( wimp_w  w,
wimp_i  i,
wimp_menu *  menu,
wimp_selection *  selection,
menu_action  action 
)
static

Handle submenu warnings for a browser window menu.

Parameters
wThe window owning the menu.
iThe icon owning the menu.
menuThe menu to which the warning applies.
selectionThe wimp menu selection data.
actionThe selected menu action.

Definition at line 3005 of file window.c.

References BROWSER_EXPORT_DRAW, BROWSER_EXPORT_PDF, BROWSER_EXPORT_TEXT, BROWSER_FIND_TEXT, BROWSER_LINK_SAVE_TEXT, BROWSER_LINK_SAVE_URI, BROWSER_LINK_SAVE_URL, BROWSER_OBJECT_EXPORT_DRAW, BROWSER_OBJECT_EXPORT_SPRITE, BROWSER_OBJECT_INFO, BROWSER_OBJECT_SAVE, BROWSER_OBJECT_SAVE_URL_TEXT, BROWSER_OBJECT_SAVE_URL_URI, BROWSER_OBJECT_SAVE_URL_URL, BROWSER_PAGE_INFO, BROWSER_PRINT, BROWSER_SAVE, BROWSER_SAVE_COMPLETE, BROWSER_SAVE_URL_TEXT, BROWSER_SAVE_URL_URI, BROWSER_SAVE_URL_URL, BROWSER_SCALE_VIEW, BROWSER_SELECTION_SAVE, browser_window_get_content(), browser_window_get_editor_flags(), browser_window_get_selection(), gui_window::bw, BW_EDITOR_CAN_COPY, content_get_title(), content_get_type(), CONTENT_HTML, CONTENT_TEXTPLAIN, current_menu_object, current_menu_url, GUI_SAVE_COMPLETE, GUI_SAVE_DRAW, GUI_SAVE_LINK_TEXT, GUI_SAVE_LINK_URI, GUI_SAVE_LINK_URL, GUI_SAVE_OBJECT_NATIVE, GUI_SAVE_OBJECT_ORIG, GUI_SAVE_PDF, GUI_SAVE_SOURCE, GUI_SAVE_TEXT, GUI_SAVE_TEXT_SELECTION, hlcache_handle_get_url(), ro_gui_browser_window_menu, ro_gui_dialog_prepare_zoom(), ro_gui_print_prepare(), ro_gui_save_prepare(), ro_gui_search_prepare(), ro_gui_wimp_event_get_user_data(), ro_gui_window_content_export_types(), ro_gui_window_prepare_objectinfo(), and ro_gui_window_prepare_pageinfo().

Referenced by gui_window_create().

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

◆ ro_gui_window_mouse_at()

void ro_gui_window_mouse_at ( wimp_pointer *  pointer,
void *  data 
)

Handle pointer movements in a browser window.

Parameters
pointernew mouse position
databrowser window that the pointer is in

Definition at line 4513 of file window.c.

References browser_window_mouse_track(), gui_window::bw, ro_gui_mouse_drag_state(), and ro_gui_window_to_window_pos().

Referenced by gui_start_selection(), gui_window_drag_start(), gui_window_scroll_start(), and ro_gui_window_pointer_entering().

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

◆ ro_gui_window_open()

static void ro_gui_window_open ( wimp_open *  open)
static

Open a window.

opens a window using the given wimp_open, handling toolbars and resizing.

Parameters
openthe window open event information

Definition at line 290 of file window.c.

References browser_window_get_scale(), browser_window_get_scrollbar_type(), browser_window_has_content(), browser_window_is_frameset(), browser_window_schedule_reformat(), gui_window::bw, BW_SCROLLING_NO, gui_window_set_extent(), height, gui_window::iconise_icon, iconise_used, NSLOG, gui_window::old_height, gui_window::old_width, parent, PTR_WIMP_OPEN, ro_get_hscroll_height(), ro_get_vscroll_width(), ro_gui_ctrl_pressed(), ro_gui_status_bar_resize(), ro_gui_url_complete_resize(), ro_gui_wimp_event_get_user_data(), ro_gui_window_set_scale(), ro_toolbar_full_height(), ro_toolbar_process(), ro_warn_user(), gui_window::state, gui_window::status_bar, gui_window::toolbar, gui_window::update_extent, width, and gui_window::window.

Referenced by gui_window_create(), gui_window_set_scroll(), and gui_window_update_extent().

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

◆ ro_gui_window_paste_cb()

static void ro_gui_window_paste_cb ( void *  pw)
static

callback to handle window paste operation

Parameters
pwcontext containing browser window

Definition at line 2523 of file window.c.

References browser_window_key_press(), browser_window::bw, and NS_KEY_PASTE.

Referenced by ro_gui_window_menu_select().

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

◆ ro_gui_window_pointer_entering()

static void ro_gui_window_pointer_entering ( wimp_entering *  entering)
static

Process Pointer Entering Window events in a browser window.

Parameters
enteringThe wimp pointer entering event data block.

Definition at line 1827 of file window.c.

References ro_gui_window_lookup(), ro_gui_window_mouse_at(), ro_gui_window_track_end(), and ro_mouse_track_start().

Referenced by gui_window_create().

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

◆ ro_gui_window_prepare_form_select_menu()

static bool ro_gui_window_prepare_form_select_menu ( struct gui_window g,
struct form_control control 
)
static

Prepare or reprepare a form select menu.

setting up the menu handle globals in the process.

Parameters
gThe RISC OS gui window the menu is in.
controlThe form control needing a menu.
Returns
true if the menu is OK to be opened; else false.

Definition at line 2016 of file window.c.

References cnv_space2nbsp(), form_select_get_option(), gui_form_select_control, gui_form_select_menu, messages_get(), NSERROR_BAD_ENCODING, NSERROR_OK, NSLOG, ro_gui_menu_destroy(), ro_gui_menu_init_structure(), ro_warn_user(), form_option::selected, form_option::text, and utf8_to_local_encoding().

Referenced by gui_window_create_form_select_menu(), and ro_gui_window_menu_prepare().

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

◆ ro_gui_window_prepare_objectinfo()

static void ro_gui_window_prepare_objectinfo ( struct hlcache_handle object,
nsurl target_url 
)
static

Prepare the object info window for use.

Parameters
objectthe object for which information is to be displayed
target_urlcorresponding url, if any

Definition at line 2482 of file window.c.

References content_get_mime_type(), dialog_objinfo, hlcache_handle_get_url(), ICON_OBJINFO_ICON, ICON_OBJINFO_TARGET, ICON_OBJINFO_TYPE, ICON_OBJINFO_URL, nsurl_access(), ro_content_filetype(), ro_gui_set_icon_string(), ro_gui_wimp_sprite_exists(), and gui_window::url.

Referenced by ro_gui_window_menu_select(), and ro_gui_window_menu_warning().

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

◆ ro_gui_window_prepare_pageinfo()

static void ro_gui_window_prepare_pageinfo ( struct gui_window g)
static

Prepare the page info window for use.

Parameters
gThe GUI window block to use.

Definition at line 745 of file window.c.

References browser_window_get_content(), gui_window::bw, CONTENT_ENCODING_NORMAL, CONTENT_ENCODING_SOURCE, content_get_encoding(), content_get_mime_type(), content_get_title(), content_get_type(), CONTENT_HTML, dialog_pageinfo, hlcache_handle_get_url(), ICON_PAGEINFO_ENC, ICON_PAGEINFO_ICON, ICON_PAGEINFO_TITLE, ICON_PAGEINFO_TYPE, ICON_PAGEINFO_URL, messages_get(), nsurl_access(), ro_content_filetype(), ro_gui_set_icon_string(), and ro_gui_wimp_sprite_exists().

Referenced by ro_gui_window_action_page_info(), and ro_gui_window_menu_warning().

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

◆ ro_gui_window_process_form_select_menu()

static void ro_gui_window_process_form_select_menu ( struct gui_window g,
wimp_selection *  selection 
)
static

Process selections from a form select menu, passing them back to the core.

Parameters
gThe browser window affected by the menu.
selectionThe menu selection.

Definition at line 2463 of file window.c.

References form_select_process_selection(), and gui_form_select_control.

Referenced by ro_gui_window_menu_select().

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

◆ ro_gui_window_quit()

void ro_gui_window_quit ( void  )

Destroy all browser windows.

Definition at line 4766 of file window.c.

References browser_window_destroy(), gui_window::bw, gui_window::next, and window_list.

Referenced by gui_quit().

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

◆ ro_gui_window_redraw()

static void ro_gui_window_redraw ( wimp_draw *  redraw)
static

Handle a Redraw_Window_Request for a browser window.

Parameters
redrawThe redraw event

Definition at line 1700 of file window.c.

References browser_window_redraw_ready(), gui_window::buffer_everything, gui_window::bw, NSLOG, gui_window::option, gui_window::redraw, ro_gui_current_redraw_gui, ro_gui_wimp_event_get_user_data(), ro_gui_window__redraw_rect(), and ro_warn_user().

Referenced by gui_window_create().

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

◆ ro_gui_window_redraw_all()

void ro_gui_window_redraw_all ( void  )

Redraws the content for all windows.

Definition at line 4690 of file window.c.

References gui_window::next, ro_gui_window_invalidate_area(), and window_list.

Here is the call graph for this function:

◆ ro_gui_window_remove_update_boxes()

static void ro_gui_window_remove_update_boxes ( struct gui_window g)
static

Remove all pending update boxes for a window.

Parameters
ggui_window

Definition at line 3512 of file window.c.

References update_box::g, update_box::next, and pending_updates.

Referenced by gui_window_destroy().

Here is the caller graph for this function:

◆ ro_gui_window_save_toolbar_buttons()

static void ro_gui_window_save_toolbar_buttons ( void *  data,
char *  config 
)
static

Save a new toolbar button configuration.

used as a callback by the toolbar module when a buttonbar edit has finished.

Parameters
datavoid pointer to the window's gui_window struct
configpointer to a malloc()'d button config string.

Definition at line 1550 of file window.c.

References nsoption_set_charp, and ro_gui_save_options().

Here is the call graph for this function:

◆ ro_gui_window_scroll()

static void ro_gui_window_scroll ( wimp_scroll *  scroll)
static

Process Scroll_Request events in a browser window.

Parameters
scrollThe wimp scroll event data block.

Definition at line 1755 of file window.c.

References ABS, browser_window_get_scale(), browser_window_has_content(), gui_window::bw, ro_gui_shift_pressed(), ro_gui_window_lookup(), ro_gui_window_scroll_action(), ro_gui_window_set_scale(), gui_window::scale, scale_snap_to, and SCALE_SNAP_TO_SIZE.

Referenced by gui_window_create().

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

◆ ro_gui_window_scroll_action()

static void ro_gui_window_scroll_action ( struct gui_window g,
wimp_scroll_direction  scroll_x,
wimp_scroll_direction  scroll_y 
)
static

Scroll a browser window.

the scroll is either via the core or directly using the normal Wimp_OpenWindow interface.

Scroll steps are supplied in terms of the (extended) Scroll Event direction values returned by Wimp_Poll. Special values of 0x7fffffff and 0x80000000 are added to mean "Home" and "End".

Parameters
gThe GUI Window to be scrolled.
scroll_xThe X scroll step to be applied.
scroll_yThe Y scroll step to be applied.

Definition at line 1057 of file window.c.

References browser_window_is_frameset(), browser_window_scroll_at_point(), gui_window::bw, NSLOG, ro_gui_window_to_window_pos(), ro_toolbar_full_height(), ro_toolbar_parent_window_lookup(), ro_warn_user(), SCROLL_BOTTOM, SCROLL_PAGE_DOWN, SCROLL_PAGE_UP, SCROLL_TOP, gui_window::state, gui_window::toolbar, gui_window::window, and browser_window::x.

Referenced by ro_gui_window_handle_local_keypress(), and ro_gui_window_scroll().

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

◆ ro_gui_window_scroll_end()

static void ro_gui_window_scroll_end ( wimp_dragged *  drag,
void *  data 
)
static

Completes scrolling of a browser window.

Parameters
dragThe DragEnd event data block.
datagui window block pointer.

Definition at line 3882 of file window.c.

References browser_window_mouse_track(), gui_window::bw, NSLOG, ro_gui_window_to_window_pos(), ro_warn_user(), and browser_window::x.

Referenced by gui_window_drag_start(), and gui_window_scroll_start().

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

◆ ro_gui_window_set_scale()

void ro_gui_window_set_scale ( struct gui_window g,
float  scale 
)

Set a gui_window's scale.

Definition at line 4474 of file window.c.

References browser_window_set_scale(), gui_window::bw, and update_box::g.

Referenced by handle_local_keypress_scale(), ro_gui_dialog_zoom_apply(), ro_gui_window_open(), and ro_gui_window_scroll().

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

◆ ro_gui_window_set_url()

nserror ro_gui_window_set_url ( struct gui_window g,
struct nsurl url 
)

Set the contents of a window's address bar.

Parameters
ggui_window to update
urlnew url for address bar

Definition at line 4450 of file window.c.

References update_box::g, NSERROR_OK, nsoption_bool, nsurl_access(), nsurl_get_utf8(), ro_gui_url_complete_start(), ro_toolbar_set_url(), and gui_window::toolbar.

Referenced by ro_gui_url_bar_menu_select(), and ro_gui_window_launch_url().

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

◆ ro_gui_window_to_window_pos()

bool ro_gui_window_to_window_pos ( struct gui_window g,
int  x,
int  y,
os_coord *  pos 
)

Convert x,y screen co-ordinates into window co-ordinates.

Parameters
ggui window
xx ordinate
yy ordinate
posreceives position in window co-ordinatates
Returns
true iff conversion successful

Definition at line 4855 of file window.c.

References NSLOG, ro_warn_user(), and gui_window::window.

Referenced by ro_gui_save_drag_end(), ro_gui_selection_drag_end(), ro_gui_selection_dragging(), ro_gui_window_click(), ro_gui_window_dataload(), ro_gui_window_handle_local_keypress(), ro_gui_window_menu_prepare(), ro_gui_window_mouse_at(), ro_gui_window_scroll_action(), and ro_gui_window_scroll_end().

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

◆ ro_gui_window_toolbar_click()

static void ro_gui_window_toolbar_click ( void *  data,
toolbar_action_type  action_type,
union toolbar_action  action 
)
static

Process Mouse_Click events in a toolbar's button bar.

This does not handle other clicks in a toolbar: these are handled by the toolbar module itself.

Parameters
dataThe GUI window associated with the click.
action_typeThe action type to be handled.
actionThe action to process.

Definition at line 822 of file window.c.

References browser_window_access_url(), browser_window_get_title(), browser_window_get_url(), browser_window_has_content(), browser_window_history_back(), browser_window_history_forward(), browser_window_navigate_up(), browser_window_reload(), browser_window_stop(), toolbar_action::button, gui_window::bw, GUI_SAVE_COMPLETE, GUI_SAVE_LINK_TEXT, GUI_SAVE_LINK_URL, GUI_SAVE_SOURCE, messages_get_errorcode(), NSERROR_OK, nsurl_ref(), nsurl_unref(), ro_gui_drag_save_link(), ro_gui_global_history_present(), ro_gui_hotlist_present(), ro_gui_pageinfo_present(), ro_gui_shift_pressed(), ro_gui_window_action_add_bookmark(), ro_gui_window_action_home(), ro_gui_window_action_local_history(), ro_gui_window_action_print(), ro_gui_window_action_remove_bookmark(), ro_gui_window_action_save(), ro_gui_window_action_search(), ro_gui_window_action_zoom(), ro_gui_window_update_toolbar_buttons(), ro_warn_user(), TOOLBAR_ACTION_BUTTON, TOOLBAR_ACTION_URL, TOOLBAR_BUTTON_BACK, TOOLBAR_BUTTON_BACK_NEW, TOOLBAR_BUTTON_BOOKMARK_ADD, TOOLBAR_BUTTON_BOOKMARK_OPEN, TOOLBAR_BUTTON_FORWARD, TOOLBAR_BUTTON_FORWARD_NEW, TOOLBAR_BUTTON_HISTORY_GLOBAL, TOOLBAR_BUTTON_HISTORY_LOCAL, TOOLBAR_BUTTON_HOME, TOOLBAR_BUTTON_PRINT, TOOLBAR_BUTTON_RELOAD, TOOLBAR_BUTTON_RELOAD_ALL, TOOLBAR_BUTTON_SAVE_COMPLETE, TOOLBAR_BUTTON_SAVE_SOURCE, TOOLBAR_BUTTON_SCALE, TOOLBAR_BUTTON_SEARCH, TOOLBAR_BUTTON_STOP, TOOLBAR_BUTTON_UP, TOOLBAR_BUTTON_UP_NEW, TOOLBAR_URL_ADJUST_HOTLIST, TOOLBAR_URL_ADJUST_PGINFO, TOOLBAR_URL_DRAG_FAVICON, TOOLBAR_URL_DRAG_URL, TOOLBAR_URL_SELECT_HOTLIST, TOOLBAR_URL_SELECT_PGINFO, gui_window::url, and toolbar_action::url.

Here is the call graph for this function:

◆ ro_gui_window_toolbar_keypress()

static bool ro_gui_window_toolbar_keypress ( void *  data,
wimp_key *  key 
)
static

Callback handler for keypresses within browser window toolbars.

Parameters
dataClient data, pointing to the GUI Window.
keyThe keypress data.
Returns
true if the keypress was handled; else false.

Definition at line 1529 of file window.c.

References ro_gui_window_handle_local_keypress().

Here is the call graph for this function:

◆ ro_gui_window_track_end()

static void ro_gui_window_track_end ( wimp_leaving *  leaving,
void *  data 
)
static

Process Pointer Leaving Window events in a browser window.

These arrive via the termination callback handler from ro_mouse's mouse tracking.

Parameters
leavingThe wimp pointer leaving event data block.
dataThe GUI window that the pointer is leaving.

Definition at line 1812 of file window.c.

References GUI_POINTER_DEFAULT, and gui_window_set_pointer().

Referenced by ro_gui_window_pointer_entering().

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

◆ ro_gui_window_update_boxes()

void ro_gui_window_update_boxes ( void  )

Redraw any pending update boxes.

Definition at line 4699 of file window.c.

References update_box::g, update_box::next, NSLOG, pending_updates, ro_gui_current_redraw_gui, ro_gui_window__redraw_rect(), ro_warn_user(), update_box::use_buffer, gui_window::window, update_box::x0, update_box::x1, update_box::y0, and update_box::y1.

Referenced by riscos_poll().

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

◆ ro_gui_window_update_theme()

static void ro_gui_window_update_theme ( void *  data,
bool  ok 
)
static

Update a window and its toolbar.

makes a window and toolbar reflect a new theme: used as a callback by the toolbar module when a theme change affects a toolbar.

Parameters
datavoid pointer to the window's gui_window struct
oktrue if the bar still exists; else false.

Definition at line 497 of file window.c.

References gui_window_update_extent(), and gui_window::toolbar.

Here is the call graph for this function:

◆ ro_gui_window_update_toolbar()

static void ro_gui_window_update_toolbar ( void *  data)
static

Update a window to reflect a change in toolbar size: used as a callback by the toolbar module when a toolbar height changes.

Parameters
datavoid pointer the window's gui_window struct

Definition at line 517 of file window.c.

References gui_window_update_extent().

Here is the call graph for this function:

◆ ro_gui_window_update_toolbar_buttons()

static void ro_gui_window_update_toolbar_buttons ( struct gui_window g)
static

Update the toolbar buttons for a given browser window to reflect the current state of its contents.

Note that the parameters to this function are arranged so that it can be supplied to the toolbar module as an button state update callback.

Parameters
gThe browser window to update.

Definition at line 536 of file window.c.

References browser_window_back_available(), browser_window_can_search(), browser_window_forward_available(), browser_window_has_content(), browser_window_reload_available(), browser_window_stop_available(), browser_window_up_available(), browser_window::bw, gui_window::bw, ro_toolbar_set_button_shaded_state(), ro_toolbar_update_urlsuggest(), gui_window::toolbar, TOOLBAR_BUTTON_BACK, TOOLBAR_BUTTON_FORWARD, TOOLBAR_BUTTON_PRINT, TOOLBAR_BUTTON_RELOAD, TOOLBAR_BUTTON_SAVE_SOURCE, TOOLBAR_BUTTON_SCALE, TOOLBAR_BUTTON_SEARCH, TOOLBAR_BUTTON_STOP, and TOOLBAR_BUTTON_UP.

Referenced by gui_window_create(), gui_window_new_content(), gui_window_start_throbber(), gui_window_stop_throbber(), and ro_gui_window_toolbar_click().

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

Variable Documentation

◆ current_menu_main

struct hlcache_handle* current_menu_main = 0
static

Main content object under menu, or 0 if none.

Definition at line 132 of file window.c.

Referenced by ro_gui_window_menu_prepare(), and ro_gui_window_menu_select().

◆ current_menu_object

struct hlcache_handle* current_menu_object = 0
static

Object under menu, or 0 if no object.

Definition at line 134 of file window.c.

Referenced by ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), ro_gui_window_menu_select(), and ro_gui_window_menu_warning().

◆ current_menu_url

nsurl* current_menu_url = 0
static

URL of link under menu, or 0 if no link.

Definition at line 136 of file window.c.

Referenced by ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), ro_gui_window_menu_select(), and ro_gui_window_menu_warning().

◆ gui_form_select_control

struct form_control* gui_form_select_control
static

◆ gui_form_select_menu

wimp_menu* gui_form_select_menu = NULL
static

◆ iconise_next

int iconise_next = 0
static

Definition at line 115 of file window.c.

Referenced by ro_gui_window_iconise().

◆ iconise_used

bool iconise_used[64]
static

Remembers which iconised sprite numbers are in use.

Definition at line 114 of file window.c.

Referenced by ro_gui_window_iconise(), and ro_gui_window_open().

◆ mouse_drag_adjust

bool mouse_drag_adjust
static

Definition at line 119 of file window.c.

Referenced by ro_gui_mouse_click_state(), and ro_gui_mouse_drag_state().

◆ mouse_drag_select

bool mouse_drag_select
static

Whether a pressed mouse button has become a drag.

Definition at line 118 of file window.c.

Referenced by ro_gui_mouse_click_state(), and ro_gui_mouse_drag_state().

◆ pending_updates

struct update_box* pending_updates

◆ riscos_window_table

struct gui_window_table* riscos_window_table = &window_table

Definition at line 4258 of file window.c.

Referenced by main().

◆ ro_gui_browser_window_menu

wimp_menu* ro_gui_browser_window_menu = NULL
static

◆ ro_gui_current_redraw_gui

struct gui_window* ro_gui_current_redraw_gui

GUI window which is being redrawn.

Valid only during redraw.

Definition at line 124 of file window.c.

Referenced by print_document(), ro_gui_window_redraw(), and ro_gui_window_update_boxes().

◆ ro_gui_pointer_table

struct ro_gui_pointer_entry ro_gui_pointer_table[]
Initial value:
= {
{ true, "ptr_default", 0, 0 },
{ false, "ptr_point", 6, 0 },
{ false, "ptr_caret", 4, 9 },
{ false, "ptr_menu", 6, 4 },
{ false, "ptr_ud", 6, 7 },
{ false, "ptr_ud", 6, 7 },
{ false, "ptr_lr", 7, 6 },
{ false, "ptr_lr", 7, 6 },
{ false, "ptr_ld", 7, 7 },
{ false, "ptr_ld", 7, 7 },
{ false, "ptr_rd", 7, 7 },
{ false, "ptr_rd", 6, 7 },
{ false, "ptr_cross", 7, 7 },
{ false, "ptr_move", 8, 0 },
{ false, "ptr_wait", 7, 10 },
{ false, "ptr_help", 0, 0 },
{ false, "ptr_nodrop", 0, 0 },
{ false, "ptr_nt_allwd", 10, 10 },
{ false, "ptr_progress", 0, 0 },
}

Map from gui_pointer_shape to pointer sprite data.

Must be ordered as enum gui_pointer_shape.

Definition at line 154 of file window.c.

Referenced by gui_window_set_pointer().

◆ ro_gui_window_toolbar_callbacks

const struct toolbar_callbacks ro_gui_window_toolbar_callbacks
static
Initial value:
= {
}
static bool ro_gui_window_toolbar_keypress(void *data, wimp_key *key)
Callback handler for keypresses within browser window toolbars.
Definition: window.c:1529
static void ro_gui_window_update_theme(void *data, bool ok)
Update a window and its toolbar.
Definition: window.c:497
static void ro_gui_window_update_toolbar_buttons(struct gui_window *g)
Update the toolbar buttons for a given browser window to reflect the current state of its contents.
Definition: window.c:536
static void ro_gui_window_update_toolbar(void *data)
Update a window to reflect a change in toolbar size: used as a callback by the toolbar module when a ...
Definition: window.c:517
static void ro_gui_window_toolbar_click(void *data, toolbar_action_type action_type, union toolbar_action action)
Process Mouse_Click events in a toolbar's button bar.
Definition: window.c:822
static void ro_gui_window_save_toolbar_buttons(void *data, char *config)
Save a new toolbar button configuration.
Definition: window.c:1550

toolbar callbacks for a browser window.

Definition at line 1560 of file window.c.

Referenced by gui_window_create().

◆ scale_snap_to

float scale_snap_to[]
static
Initial value:
= {0.10, 0.125, 0.25, 0.333, 0.5, 0.75,
1.0,
1.5, 2.0, 3.0, 4.0, 6.0, 8.0, 12.0, 16.0}

Definition at line 138 of file window.c.

Referenced by handle_local_keypress_scale(), and ro_gui_window_scroll().

◆ window_list

struct gui_window* window_list = 0
static

List of all browser windows.

Definition at line 122 of file window.c.

◆ window_table

struct gui_window_table window_table
static
Initial value:
= {
.create = gui_window_create,
.destroy = gui_window_destroy,
.get_scroll = gui_window_get_scroll,
.set_scroll = gui_window_set_scroll,
.get_dimensions = gui_window_get_dimensions,
.set_title = gui_window_set_title,
.set_icon = gui_window_set_icon,
.set_status = riscos_window_set_status,
.set_pointer = gui_window_set_pointer,
.place_caret = gui_window_place_caret,
.save_link = gui_window_save_link,
.drag_start = gui_window_drag_start,
.create_form_select_menu = gui_window_create_form_select_menu,
.drag_save_object = gui_drag_save_object,
.drag_save_selection =gui_drag_save_selection,
}
void gui_drag_save_selection(struct gui_window *g, const char *selection)
Definition: drag.c:303
void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c, gui_save_type type)
Definition: drag.c:298
static nserror ro_gui_window_event(struct gui_window *gw, enum gui_window_event event)
process miscellaneous window events
Definition: window.c:4188
static nserror gui_window_save_link(struct gui_window *g, nsurl *url, const char *title)
Save the specified content as a link.
Definition: window.c:4056
static void gui_window_destroy(struct gui_window *g)
Close a browser window and free any related resources.
Definition: window.c:3529
static nserror gui_window_get_dimensions(struct gui_window *gw, int *width, int *height)
Find the current dimensions of a browser window's content area.
Definition: window.c:3757
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
set the pointer shape
Definition: window.c:5051
static struct gui_window * gui_window_create(struct browser_window *bw, struct gui_window *existing, gui_window_create_flags flags)
Create and open a new browser window.
Definition: window.c:3275
static void gui_window_set_title(struct gui_window *g, const char *title)
Set the title of a browser window.
Definition: window.c:3579
nserror ro_gui_window_invalidate_area(struct gui_window *g, const struct rect *rect)
Cause an area of a window to be invalidated.
Definition: window.c:4371
static void riscos_window_set_status(struct gui_window *g, const char *text)
Set the status bar of a browser window.
Definition: window.c:3773
static void gui_window_place_caret(struct gui_window *g, int x, int y, int height, const struct rect *clip)
Place the caret in a browser window.
Definition: window.c:200
static bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
Get the scroll position of a browser window.
Definition: window.c:3614
static nserror gui_window_set_scroll(struct gui_window *g, const struct rect *rect)
Set the scroll position of a riscos browser window.
Definition: window.c:3651
static void gui_window_set_icon(struct gui_window *g, struct hlcache_handle *icon)
set favicon
Definition: window.c:3828
static bool gui_window_drag_start(struct gui_window *g, gui_drag_type type, const struct rect *rect)
Platform-dependent part of starting drag operation.
Definition: window.c:3991
static void gui_window_create_form_select_menu(struct gui_window *g, struct form_control *control)
Display a menu of options for a form select control.
Definition: window.c:4071
nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url)
Set the contents of a window's address bar.
Definition: window.c:4450

RISC OS browser window operation table.

Definition at line 4234 of file window.c.