NetSurf
|
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"
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_window * | gui_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_window * | ro_gui_window_lookup (wimp_w window) |
Convert a RISC OS window handle to a gui_window. More... | |
struct gui_window * | ro_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_window * | window_list = 0 |
List of all browser windows. More... | |
struct gui_window * | ro_gui_current_redraw_gui |
GUI window which is being redrawn. More... | |
static struct form_control * | gui_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_handle * | current_menu_main = 0 |
Main content object under menu, or 0 if none. More... | |
static struct hlcache_handle * | current_menu_object = 0 |
Object under menu, or 0 if no object. More... | |
static nsurl * | current_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_box * | pending_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_table * | riscos_window_table = &window_table |
Implementation of RISC OS browser window handling.
Definition in file window.c.
#define SCALE_SNAP_TO_SIZE (sizeof scale_snap_to) / (sizeof(float)) |
#define wimp_WINDOW_GIVE_SHADED_ICON_INFO ((wimp_extra_window_flags) 0x10u) |
|
static |
Create and open a new browser window.
bw | bw to create gui_window for |
existing | an existing gui_window, may be NULL |
flags | flags for gui window creation |
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.
|
static |
Display a menu of options for a form select control.
g | gui window containing form control |
control | form 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.
|
static |
Close a browser window and free any related resources.
g | gui_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.
|
static |
Platform-dependent part of starting drag operation.
g | gui window containing the drag |
type | type of drag the core is performing |
rect | rectangle to constrain pointer to (relative to drag start coord) |
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.
|
static |
Find the current dimensions of a browser window's content area.
gw | gui window to measure |
width | receives width of window |
height | receives height of window |
Definition at line 3757 of file window.c.
References height, NSERROR_OK, gui_window::old_height, gui_window::old_width, and width.
|
static |
Get the scroll position of a browser window.
g | gui_window |
sx | receives x ordinate of point at top-left of window |
sy | receives y ordinate of point at top-left of window |
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.
|
static |
Called when the gui_window has new content.
g | the 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().
|
static |
Update the interface to reflect change in page info status.
gw | window 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().
|
static |
Place the caret in a browser window.
g | window with caret |
x | coordinates of caret |
y | coordinates of caret |
height | height of caret |
clip | clip 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().
|
static |
Remove the caret, if present.
g | window 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().
|
static |
Save the specified content as a link.
g | The window containing the content |
url | The url of the link |
title | The 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.
|
static |
Starts drag scrolling of a browser window.
g | the 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().
|
static |
Updates a windows extent.
g | the gui_window to update |
width | the minimum width, or -1 to use window width |
height | the 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().
|
static |
set favicon
Definition at line 3828 of file window.c.
References update_box::g, ro_toolbar_set_site_favicon(), and gui_window::toolbar.
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().
|
static |
Set the scroll position of a riscos browser window.
Scrolls the viewport to ensure the specified rectangle of the content is shown.
g | gui window to scroll |
rect | The rectangle to ensure is shown. |
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.
|
static |
Set the title of a browser window.
g | gui_window to update |
title | new 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.
|
static |
Update the interface to reflect start of page loading.
g | window 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().
|
static |
Update the interface to reflect page loading stopped.
g | window 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().
|
static |
Update the extent of the inside of a browser window to that of the current content.
g | gui_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().
|
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().
|
static |
Set the status bar of a browser window.
g | gui_window to update |
text | new 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().
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().
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().
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.
buttons | Wimp button state. |
type | Wimp work-area/icon type for decoding. |
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().
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.
buttons | Wimp button state. |
type | Wimp work-area/icon type for decoding. |
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().
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().
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().
bool ro_gui_toolbar_dataload | ( | struct gui_window * | g, |
wimp_message * | message | ||
) |
Handle Message_DataLoad (file dragged in) for a toolbar.
g | window |
message | Message_DataLoad block |
Definition at line 4657 of file window.c.
References NSLOG, ro_gui_window_import_text(), and ro_warn_user().
Referenced by ro_msg_dataload().
struct gui_window * ro_gui_toolbar_lookup | ( | wimp_w | window | ) |
Convert a toolbar RISC OS window handle to a gui_window.
window | RISC OS window handle of a toolbar |
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().
|
inlinestatic |
Wrapper for calls to browser_window_redraw for a wimp_draw rectangle.
[in] | gui_win | Window to render. |
[in] | wimp_rect | The area of gui_win to render into. |
[in] | use_buffer | Whether 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().
|
static |
Add a hotlist entry for a browser window.
g | The 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().
|
static |
Perform a Navigate Home action on a browser window.
g | The 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().
|
static |
Open a local history pane for a browser window.
gw | The 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().
|
static |
Open a new browser window.
g | The 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().
|
static |
Open a page info box for a browser window.
g | The 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().
|
static |
Open a print dialogue for a browser window.
g | The 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().
|
static |
Remove a hotlist entry for a browser window.
g | The 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().
|
static |
Open a save dialogue for a browser window contents.
g | The browser window to act on. |
save_type | The 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().
|
static |
Open a text search dialogue for a browser window.
g | The 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().
|
static |
Open a zoom dialogue for a browser window.
g | The 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().
bool ro_gui_window_check_menu | ( | wimp_menu * | menu | ) |
Check if a particular menu handle is a browser window menu.
menu | The menu in question. |
Definition at line 4683 of file window.c.
References ro_gui_browser_window_menu.
Referenced by ro_gui_interactive_help_request().
|
static |
Handle Mouse_Click events in a browser window.
This should never see Menu clicks, as these will be routed to the menu handlers.
pointer | details of mouse click |
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().
|
static |
Clones a browser window's options.
new_gui | the new gui window |
old_gui | the 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().
|
static |
Handle wimp closing event.
w | The 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().
|
static |
Return boolean flags to show what RISC OS types we can sensibly convert the given object into.
h | The object to test. |
export_draw | true on exit if a drawfile would be possible. |
export_sprite | true on exit if a sprite would be possible. |
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().
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.
g | window |
message | Message_DataLoad block |
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().
void ro_gui_window_default_options | ( | struct gui_window * | gui | ) |
Makes a browser window's options the default.
gui | The 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().
|
static |
process miscellaneous window events
gw | The window receiving the event. |
event | The event code. |
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.
|
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.
*g | The gui window to which the keypress applies. |
*key | The keypress data. |
is_toolbar | true if the keypress is from a toolbar 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().
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
g | the gui window being iconised |
wi | the 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().
|
static |
Import text file into window.
g | gui window containing textarea |
filename | pathname of file to be imported |
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().
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().
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.
g | The window to update |
rect | The 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().
|
static |
Process Key_Pressed events in a browser window.
key | The wimp keypress block for the event. |
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().
|
static |
Launch a new url in the given window.
g | gui_window to update |
url1 | url 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().
struct gui_window * ro_gui_window_lookup | ( | wimp_w | window | ) |
Convert a RISC OS window handle to a gui_window.
window | RISC OS window handle. |
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().
|
static |
Handle the closure of a browser window menu.
w | The window owning the menu. |
i | The icon owning the menu. |
menu | The 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().
|
static |
Prepare the browser window menu for (re-)opening.
w | The window owning the menu. |
i | The icon owning the menu. |
menu | The menu about to be opened. |
pointer | Pointer to the relevant wimp event block, or NULL for an Adjust click. |
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().
|
static |
Handle selections from a browser window menu.
w | The window owning the menu. |
i | The icon owning the menu. |
menu | The menu from which the selection was made. |
selection | The wimp menu selection data. |
action | The selected menu action. |
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().
|
static |
Handle submenu warnings for a browser window menu.
w | The window owning the menu. |
i | The icon owning the menu. |
menu | The menu to which the warning applies. |
selection | The wimp menu selection data. |
action | The 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().
void ro_gui_window_mouse_at | ( | wimp_pointer * | pointer, |
void * | data | ||
) |
Handle pointer movements in a browser window.
pointer | new mouse position |
data | browser 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().
|
static |
Open a window.
opens a window using the given wimp_open, handling toolbars and resizing.
open | the 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().
|
static |
callback to handle window paste operation
pw | context 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().
|
static |
Process Pointer Entering Window events in a browser window.
entering | The 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().
|
static |
Prepare or reprepare a form select menu.
setting up the menu handle globals in the process.
g | The RISC OS gui window the menu is in. |
control | The form control needing a menu. |
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().
|
static |
Prepare the object info window for use.
object | the object for which information is to be displayed |
target_url | corresponding 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().
|
static |
Prepare the page info window for use.
g | The 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().
|
static |
Process selections from a form select menu, passing them back to the core.
g | The browser window affected by the menu. |
selection | The 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().
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().
|
static |
Handle a Redraw_Window_Request for a browser window.
redraw | The 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().
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.
|
static |
Remove all pending update boxes for a window.
g | gui_window |
Definition at line 3512 of file window.c.
References update_box::g, update_box::next, and pending_updates.
Referenced by gui_window_destroy().
|
static |
Save a new toolbar button configuration.
used as a callback by the toolbar module when a buttonbar edit has finished.
data | void pointer to the window's gui_window struct |
config | pointer to a malloc()'d button config string. |
Definition at line 1550 of file window.c.
References nsoption_set_charp, and ro_gui_save_options().
|
static |
Process Scroll_Request events in a browser window.
scroll | The 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().
|
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".
g | The GUI Window to be scrolled. |
scroll_x | The X scroll step to be applied. |
scroll_y | The 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().
|
static |
Completes scrolling of a browser window.
drag | The DragEnd event data block. |
data | gui 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().
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().
nserror ro_gui_window_set_url | ( | struct gui_window * | g, |
struct nsurl * | url | ||
) |
Set the contents of a window's address bar.
g | gui_window to update |
url | new 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().
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.
g | gui window |
x | x ordinate |
y | y ordinate |
pos | receives position in window co-ordinatates |
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().
|
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.
data | The GUI window associated with the click. |
action_type | The action type to be handled. |
action | The 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.
|
static |
Callback handler for keypresses within browser window toolbars.
data | Client data, pointing to the GUI Window. |
key | The keypress data. |
Definition at line 1529 of file window.c.
References ro_gui_window_handle_local_keypress().
|
static |
Process Pointer Leaving Window events in a browser window.
These arrive via the termination callback handler from ro_mouse's mouse tracking.
leaving | The wimp pointer leaving event data block. |
data | The 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().
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().
|
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.
data | void pointer to the window's gui_window struct |
ok | true if the bar still exists; else false. |
Definition at line 497 of file window.c.
References gui_window_update_extent(), and gui_window::toolbar.
|
static |
Update a window to reflect a change in toolbar size: used as a callback by the toolbar module when a toolbar height changes.
data | void pointer the window's gui_window struct |
Definition at line 517 of file window.c.
References gui_window_update_extent().
|
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.
g | The 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().
|
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().
|
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().
|
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().
|
static |
Form control which gui_form_select_menu is for.
Definition at line 126 of file window.c.
Referenced by gui_window_create_form_select_menu(), ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), ro_gui_window_prepare_form_select_menu(), and ro_gui_window_process_form_select_menu().
|
static |
Menu of options for form select controls.
Definition at line 130 of file window.c.
Referenced by gui_window_create_form_select_menu(), ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), ro_gui_window_menu_select(), and ro_gui_window_prepare_form_select_menu().
|
static |
Definition at line 115 of file window.c.
Referenced by ro_gui_window_iconise().
|
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().
|
static |
Definition at line 119 of file window.c.
Referenced by ro_gui_mouse_click_state(), and ro_gui_mouse_drag_state().
|
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().
struct update_box* pending_updates |
Definition at line 186 of file window.c.
Referenced by ro_gui_window_invalidate_area(), ro_gui_window_remove_update_boxes(), and ro_gui_window_update_boxes().
struct gui_window_table* riscos_window_table = &window_table |
|
static |
The browser window menu handle.
Definition at line 128 of file window.c.
Referenced by gui_window_create(), gui_window_new_content(), gui_window_start_throbber(), gui_window_stop_throbber(), ro_gui_window_check_menu(), ro_gui_window_initialise(), ro_gui_window_menu_close(), ro_gui_window_menu_prepare(), and ro_gui_window_menu_warning().
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().
struct ro_gui_pointer_entry ro_gui_pointer_table[] |
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().
|
static |
toolbar callbacks for a browser window.
Definition at line 1560 of file window.c.
Referenced by gui_window_create().
|
static |
Definition at line 138 of file window.c.
Referenced by handle_local_keypress_scale(), and ro_gui_window_scroll().
|
static |
|
static |
RISC OS browser window operation table.