NetSurf
|
Browser window creation and manipulation interface. More...
#include <stdbool.h>
#include <stdio.h>
#include "utils/errors.h"
#include "netsurf/mouse.h"
#include "netsurf/console.h"
Go to the source code of this file.
Data Structures | |
struct | browser_window_features |
Page features at a specific spatial location. More... | |
Functions | |
nserror | browser_window_create (enum browser_window_create_flags flags, struct nsurl *url, struct nsurl *referrer, struct browser_window *existing, struct browser_window **bw) |
Create and open a new root browser window with the given page. More... | |
nserror | browser_window_navigate (struct browser_window *bw, struct nsurl *url, struct nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, struct hlcache_handle *parent) |
Start fetching a page in a browser window. More... | |
bool | browser_window_up_available (struct browser_window *bw) |
Return true if a browser window can navigate upwards. More... | |
nserror | browser_window_navigate_up (struct browser_window *bw, bool new_window) |
Navigate to a browser_window's parent URL. More... | |
struct nsurl * | browser_window_access_url (const struct browser_window *bw) |
Access a browser window's URL. More... | |
nserror | browser_window_get_url (struct browser_window *bw, bool fragment, struct nsurl **url_out) |
Access a browser window's URL. More... | |
const char * | browser_window_get_title (struct browser_window *bw) |
Get the title of a browser_window. More... | |
struct history * | browser_window_get_history (struct browser_window *bw) |
Get a browser window's history object. More... | |
nserror | browser_window_get_extents (struct browser_window *bw, bool scaled, int *width, int *height) |
Get a browser window's content extents. More... | |
bool | browser_window_has_content (struct browser_window *bw) |
Find out if a browser window is currently showing a content. More... | |
struct hlcache_handle * | browser_window_get_content (struct browser_window *bw) |
Get a cache handle for the content within a browser window. More... | |
void | browser_window_set_dimensions (struct browser_window *bw, int width, int height) |
Set the dimensions of the area a browser window occupies. More... | |
void | browser_window_stop (struct browser_window *bw) |
Stop all fetching activity in a browser window. More... | |
nserror | browser_window_reload (struct browser_window *bw, bool all) |
Reload the page in a browser window. More... | |
void | browser_window_destroy (struct browser_window *bw) |
Close and destroy a browser window. More... | |
void | browser_window_reformat (struct browser_window *bw, bool background, int width, int height) |
Reformat a browser window contents to a new width or height. More... | |
nserror | browser_window_set_scale (struct browser_window *bw, float scale, bool absolute) |
Sets the scale of a browser window. More... | |
float | browser_window_get_scale (struct browser_window *bw) |
Gets the scale of a browser window. More... | |
nserror | browser_window_get_features (struct browser_window *bw, int x, int y, struct browser_window_features *data) |
Get access to any page features at the given coordinates. More... | |
bool | browser_window_scroll_at_point (struct browser_window *bw, int x, int y, int scrx, int scry) |
Send a scroll request to a browser window at a particular point. More... | |
bool | browser_window_drop_file_at_point (struct browser_window *bw, int x, int y, char *file) |
Drop a file onto a browser window at a particular point, or determine if a file may be dropped onto the content at given point. More... | |
void | browser_window_set_gadget_filename (struct browser_window *bw, struct form_control *gadget, const char *fn) |
set filename on form control. More... | |
nserror | browser_window_refresh_url_bar (struct browser_window *bw) |
Update URL bar for a given browser window to bw's content's URL. More... | |
void | browser_window_mouse_click (struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
Handle mouse clicks in a browser window. More... | |
void | browser_window_mouse_track (struct browser_window *bw, browser_mouse_state mouse, int x, int y) |
Handle non-click mouse action in a browser window. More... | |
struct browser_window * | browser_window_find_target (struct browser_window *bw, const char *target, browser_mouse_state mouse) |
Locate a browser window in the specified stack according. More... | |
nserror | browser_window_schedule_reformat (struct browser_window *bw) |
Reformat the browser window contents in a safe context. More... | |
void | browser_window_set_pointer (struct browser_window *bw, browser_pointer_shape shape) |
Change the shape of the mouse pointer. More... | |
void | browser_window_page_drag_start (struct browser_window *bw, int x, int y) |
Start drag scrolling the contents of the browser window. More... | |
bool | browser_window_back_available (struct browser_window *bw) |
Check availability of Back action for a given browser window. More... | |
bool | browser_window_forward_available (struct browser_window *bw) |
Check availability of Forward action for a given browser window. More... | |
bool | browser_window_reload_available (struct browser_window *bw) |
Check availability of Reload action for a given browser window. More... | |
bool | browser_window_stop_available (struct browser_window *bw) |
Check availability of Stop action for a given browser window. More... | |
bool | browser_window_redraw (struct browser_window *bw, int x, int y, const struct rect *clip, const struct redraw_context *ctx) |
Redraw an area of a window. More... | |
bool | browser_window_redraw_ready (struct browser_window *bw) |
Check whether browser window is ready for redraw. More... | |
void | browser_window_get_position (struct browser_window *bw, bool root, int *pos_x, int *pos_y) |
Get the position of the current browser window with respect to the root or parent browser window. More... | |
void | browser_window_set_position (struct browser_window *bw, int x, int y) |
Set the position of the current browser window with respect to the parent browser window. More... | |
void | browser_window_set_drag_type (struct browser_window *bw, browser_drag_type type, const struct rect *rect) |
Set drag type for a browser window, and inform front end. More... | |
browser_drag_type | browser_window_get_drag_type (struct browser_window *bw) |
Get type of any current drag for a browser window. More... | |
browser_editor_flags | browser_window_get_editor_flags (struct browser_window *bw) |
Check whether browser window can accept a cut/copy/paste, or has a selection that could be saved. More... | |
bool | browser_window_can_select (struct browser_window *bw) |
Find out if given browser window content is selectable. More... | |
char * | browser_window_get_selection (struct browser_window *bw) |
Get the current selection from a root browser window, ownership passed to caller, who must free() it. More... | |
bool | browser_window_can_search (struct browser_window *bw) |
Find out if given browser window can be searched. More... | |
bool | browser_window_is_frameset (struct browser_window *bw) |
Find out if a browser window contains a frameset. More... | |
nserror | browser_window_get_scrollbar_type (struct browser_window *bw, browser_scrolling *h, browser_scrolling *v) |
Get the browser window's scrollbar details. More... | |
nserror | browser_window_debug_dump (struct browser_window *bw, FILE *f, enum content_debug op) |
Dump debug info concerning the browser window's contents to file. More... | |
nserror | browser_window_debug (struct browser_window *bw, enum content_debug op) |
Set debug options on a window. More... | |
nserror | browser_window_get_name (struct browser_window *bw, const char **name) |
Obtain a browsing contexts name. More... | |
nserror | browser_window_set_name (struct browser_window *bw, const char *name) |
Set a browsing contexts name. More... | |
bool | browser_window_exec (struct browser_window *bw, const char *src, size_t srclen) |
Execute some JavaScript code in a browsing context. More... | |
nserror | browser_window_console_log (struct browser_window *bw, browser_window_console_source src, const char *msg, size_t msglen, browser_window_console_flags flags) |
Log a console message into the browser window console. More... | |
browser_window_page_info_state | browser_window_get_page_info_state (const struct browser_window *bw) |
Request the current browser window page info state. More... | |
nserror | browser_window_get_ssl_chain (struct browser_window *bw, struct cert_chain **chain) |
Request the current browser window SSL certificate chain. More... | |
int | browser_window_get_cookie_count (const struct browser_window *bw) |
Get the number of cookies in use for the current page. More... | |
nserror | browser_window_show_cookies (const struct browser_window *bw) |
Open cookie viewer for the current page. More... | |
nserror | browser_window_show_certificates (struct browser_window *bw) |
Show the certificate page for the current page. More... | |
Browser window creation and manipulation interface.
Definition in file browser_window.h.
enum browser_drag_type |
type of browser window drag in progess
Enumerator | |
---|---|
DRAGGING_NONE | |
DRAGGING_SELECTION | |
DRAGGING_PAGE_SCROLL | |
DRAGGING_FRAME | |
DRAGGING_SCR_X | |
DRAGGING_SCR_Y | |
DRAGGING_CONTENT_SCROLLBAR | |
DRAGGING_OTHER |
Definition at line 51 of file browser_window.h.
enum browser_editor_flags |
Enumerator | |
---|---|
BW_EDITOR_NONE | No selection, no editing. |
BW_EDITOR_CAN_COPY | Have selection. |
BW_EDITOR_CAN_CUT | Selection not read-only. |
BW_EDITOR_CAN_PASTE | Can paste, input. |
Definition at line 76 of file browser_window.h.
enum browser_scrolling |
Enumerator | |
---|---|
BW_SCROLLING_AUTO | |
BW_SCROLLING_YES | |
BW_SCROLLING_NO |
Definition at line 83 of file browser_window.h.
flags to browser_window_create
Enumerator | |
---|---|
BW_CREATE_NONE | No flags set. |
BW_CREATE_HISTORY | this will form a new history node (don't set for back/reload/etc) |
BW_CREATE_TAB | New gui_window to be tab in same window as "existing" gui_window. |
BW_CREATE_CLONE | New gui_window to be clone of "existing" gui_window. |
BW_CREATE_UNVERIFIABLE | Window not opened by user interaction (e.g. JS popup) rfc2965: A transaction is verifiable if the user, or a user-designated agent, has the option to review the request-URI prior to its use in the transaction. A transaction is unverifiable if the user does not have that option. |
BW_CREATE_FOREGROUND | Request foreground opening. |
BW_CREATE_FOCUS_LOCATION | Request location bar focus. |
Definition at line 90 of file browser_window.h.
flags to browser_window_navigate
Definition at line 122 of file browser_window.h.
Browser window page information states.
Enumerator | |
---|---|
PAGE_STATE_UNKNOWN | Unable to determine. |
PAGE_STATE_INTERNAL | Page loaded from internal handler. |
PAGE_STATE_LOCAL | Page loaded from file:/// etc. |
PAGE_STATE_INSECURE | Insecure page load. |
PAGE_STATE_SECURE_OVERRIDE | Secure load, but had to override. |
PAGE_STATE_SECURE_ISSUES | Secure load, but has insecure elements. |
PAGE_STATE_SECURE | Secure load. |
PAGE_STATE__COUNT | Count of number of valid page states. |
Definition at line 65 of file browser_window.h.
struct nsurl * browser_window_access_url | ( | const struct browser_window * | bw | ) |
Access a browser window's URL.
This URL is always without any fragment.
bw | browser window |
Definition at line 3893 of file browser_window.c.
References browser_window::current_content, hlcache_handle_get_url(), and browser_window::loading_content.
Referenced by addbookmarks_button_clicked_cb(), ami_gui_opts_event(), browser_window_get_cookie_count(), browser_window_get_url(), browser_window_navigate_up(), browser_window_show_cookies(), context_popup(), HOOKF(), menu_add_bookmark(), nsgtk_preferences_setCurrentPage_clicked(), nsgtk_saveas_dialog(), nsgtk_viewsource(), page_info__create_from_bw(), ro_gui_window_action_add_bookmark(), ro_gui_window_action_new_window(), ro_gui_window_action_remove_bookmark(), ro_gui_window_close(), ro_gui_window_menu_select(), ro_gui_window_toolbar_click(), and RXHOOKF().
bool browser_window_back_available | ( | struct browser_window * | bw | ) |
Check availability of Back action for a given browser window.
bw | browser window |
Definition at line 4524 of file browser_window.c.
References browser_window_history_back_available(), browser_window::bw, browser_window::history, and browser_window::internal_nav.
Referenced by ami_gui_history(), ami_update_buttons(), fb_leftarrow_click(), fb_update_back_forward(), ro_gui_window_menu_prepare(), ro_gui_window_update_toolbar_buttons(), toolbar_back_click(), and toolbar_update_buttons().
bool browser_window_can_search | ( | struct browser_window * | bw | ) |
Find out if given browser window can be searched.
bw | browser window to look at |
Definition at line 2960 of file browser_window.c.
References browser_window::bw, content_get_type(), CONTENT_HTML, CONTENT_TEXTPLAIN, and browser_window::current_content.
Referenced by ro_gui_window_action_search(), ro_gui_window_menu_prepare(), and ro_gui_window_update_toolbar_buttons().
bool browser_window_can_select | ( | struct browser_window * | bw | ) |
Find out if given browser window content is selectable.
bw | browser window to look at |
Definition at line 2929 of file browser_window.c.
References browser_window::bw, content_get_type(), CONTENT_HTML, CONTENT_TEXTPLAIN, and browser_window::current_content.
Referenced by HOOKF(), and ro_gui_window_menu_prepare().
nserror browser_window_console_log | ( | struct browser_window * | bw, |
browser_window_console_source | src, | ||
const char * | msg, | ||
size_t | msglen, | ||
browser_window_console_flags | flags | ||
) |
Log a console message into the browser window console.
If the targetted browser window is a frame, the message will be bubbled to the outermost window to be logged.
bw | The browser window |
src | The source of the message |
msg | The text of the message |
msglen | The length of the text of the message |
flags | Flags for the message |
Definition at line 4581 of file browser_window.c.
References browser_window_get_root(), browser_window::bw, BW_CS_FLAG_LEVEL_DEBUG, BW_CS_FLAG_LEVEL_ERROR, BW_CS_FLAG_LEVEL_INFO, BW_CS_FLAG_LEVEL_LOG, BW_CS_FLAG_LEVEL_MASK, BW_CS_FLAG_LEVEL_WARN, BW_CS_INPUT, BW_CS_SCRIPT_CONSOLE, BW_CS_SCRIPT_ERROR, gui_window_table::console_log, guit, NSERROR_OK, NSLOG, root, and netsurf_table::window.
Referenced by browser_window_callback().
nserror browser_window_create | ( | enum browser_window_create_flags | flags, |
struct nsurl * | url, | ||
struct nsurl * | referrer, | ||
struct browser_window * | existing, | ||
struct browser_window ** | bw | ||
) |
Create and open a new root browser window with the given page.
flags | Flags to control operation |
url | URL to fetch in the new window or NULL for blank |
referrer | The referring uri or NULL if none |
existing | The an existing bw or NULL, required for some flags. |
bw | Updated to created browser window or untouched on error. |
Definition at line 3078 of file browser_window.c.
References browser_window::border, browser_window_destroy(), browser_window_get_root(), browser_window_initialise_common(), browser_window_navigate(), browser_window::BROWSER_WINDOW_NORMAL, browser_window::browser_window_type, browser_window::bw, BW_CREATE_CLONE, BW_CREATE_FOCUS_LOCATION, BW_CREATE_FOREGROUND, BW_CREATE_HISTORY, BW_CREATE_TAB, BW_CREATE_UNVERIFIABLE, BW_NAVIGATE_HISTORY, BW_NAVIGATE_NO_TERMINAL_HISTORY_UPDATE, BW_NAVIGATE_UNVERIFIABLE, BW_SCROLLING_YES, gui_window_table::create, browser_window::focus, guit, GW_CREATE_CLONE, GW_CREATE_FOCUS_LOCATION, GW_CREATE_FOREGROUND, GW_CREATE_NONE, GW_CREATE_TAB, browser_window::last_action, browser_window::no_resize, NSERROR_BAD_PARAMETER, NSERROR_NOMEM, NSERROR_OK, browser_window::scrolling, browser_window::window, and netsurf_table::window.
Referenced by about_open(), ami_gui_new_blank_tab(), ami_handle_applib(), ami_handle_appmsg(), atari_about_show(), browser_window_find_target(), browser_window_history_go(), browser_window_navigate_up(), browser_window_show_certificates(), context_popup(), global_history_tree_node_entry_cb(), gui_init(), gui_init2(), HOOKF(), hotlist_tree_node_entry_cb(), main(), menu_new_win(), menu_open_file(), menu_open_url(), monkey_window_handle_new(), nsbeos_scaffolding_dispatch_event(), nsgtk_browser_window_create(), nsgtk_on_link_opentab_activate_menu(), nsgtk_on_link_openwin_activate_menu(), nsgtk_setup(), ro_gui_dialog_openurl_apply(), ro_gui_iconbar_click(), ro_gui_iconbar_menu_select(), ro_gui_window_action_new_window(), ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), ro_msg_dataload(), ro_msg_dataopen(), ro_uri_message_received(), ro_url_message_received(), RXHOOKF(), tab_init_fname(), websearch_entry_activate_cb(), win32_open_new_window(), and WinMain().
nserror browser_window_debug | ( | struct browser_window * | bw, |
enum content_debug | op | ||
) |
Set debug options on a window.
bw | The browser window. |
op | The debug operation type. |
Definition at line 3067 of file browser_window.c.
References browser_window::bw, browser_window::current_content, and NSERROR_OK.
Referenced by nsws_window_command(), ro_gui_window_handle_local_keypress(), and toggledebugging_button_clicked_cb().
nserror browser_window_debug_dump | ( | struct browser_window * | bw, |
FILE * | f, | ||
enum content_debug | op | ||
) |
Dump debug info concerning the browser window's contents to file.
bw | The browser window. |
f | The file to dump to. |
op | The debug operation type to dump. |
Definition at line 3055 of file browser_window.c.
References browser_window::bw, content_debug_dump(), browser_window::current_content, and NSERROR_OK.
Referenced by debugboxtree_button_clicked_cb(), debugdomtree_button_clicked_cb(), and ro_gui_dump_browser_window().
void browser_window_destroy | ( | struct browser_window * | bw | ) |
Close and destroy a browser window.
bw | browser window |
Definition at line 3228 of file browser_window.c.
References browser_window_destroy_internal(), browser_window::bw, and browser_window::parent.
Referenced by ami_gui_close_tabs(), ami_gui_event(), browser_window_create(), gui_quit(), handle_event(), HOOKF(), main(), monkey_kill_browser_windows(), monkey_window_handle_destroy(), nsbeos_window_destroy_browser(), nsws_window_event_callback(), ro_gui_window_close(), ro_gui_window_handle_local_keypress(), ro_gui_window_quit(), RXHOOKF(), and window_destroy().
bool browser_window_drop_file_at_point | ( | struct browser_window * | bw, |
int | x, | ||
int | y, | ||
char * | file | ||
) |
Drop a file onto a browser window at a particular point, or determine if a file may be dropped onto the content at given point.
bw | browser window to look inside |
x | x-coordinate of point of interest |
y | y-coordinate of point of interest |
file | path to file to be dropped, or NULL to know if drop allowed |
Definition at line 3032 of file browser_window.c.
References browser_window_drop_file_at_point_internal(), browser_window::bw, browser_window::scale, browser_window::x, and browser_window::y.
Referenced by ami_handle_appmsg(), html_drop_file_at_point(), on_file_dropped(), ro_gui_save_drag_end(), and ro_gui_window_dataload().
bool browser_window_exec | ( | struct browser_window * | bw, |
const char * | src, | ||
size_t | srclen | ||
) |
Execute some JavaScript code in a browsing context.
Runs the passed in JavaScript code in the browsing context.
bw | The browser window |
src | The JavaScript source code |
srclen | The length of the source code |
Definition at line 4558 of file browser_window.c.
References browser_window::bw, content_exec(), content_get_status(), CONTENT_STATUS_DONE, browser_window::current_content, and NSLOG.
Referenced by monkey_window_handle_exec(), and RXHOOKF().
struct browser_window * browser_window_find_target | ( | struct browser_window * | bw, |
const char * | target, | ||
browser_mouse_state | mouse | ||
) |
Locate a browser window in the specified stack according.
bw | the browser_window to search all relatives of |
target | the target to locate |
mouse | The current mouse state |
Definition at line 4334 of file browser_window.c.
References BROWSER_MOUSE_CLICK_1, BROWSER_MOUSE_CLICK_2, BROWSER_MOUSE_MOD_2, browser_window_create(), browser_window_find_target_internal(), browser_window::bw, BW_CREATE_CLONE, BW_CREATE_HISTORY, BW_CREATE_TAB, content_get_type(), CONTENT_HTML, browser_window::current_content, html_get_base_target(), browser_window::name, NSERROR_OK, nsoption_bool, and browser_window::parent.
Referenced by mouse_action_drag_none().
bool browser_window_forward_available | ( | struct browser_window * | bw | ) |
Check availability of Forward action for a given browser window.
bw | browser window |
Definition at line 4535 of file browser_window.c.
References browser_window_history_forward_available(), browser_window::bw, and browser_window::history.
Referenced by ami_gui_history(), ami_update_buttons(), fb_rightarrow_click(), fb_update_back_forward(), ro_gui_window_menu_prepare(), ro_gui_window_update_toolbar_buttons(), toolbar_forward_click(), and toolbar_update_buttons().
struct hlcache_handle * browser_window_get_content | ( | struct browser_window * | bw | ) |
Get a cache handle for the content within a browser window.
Definition at line 3975 of file browser_window.c.
References browser_window::current_content.
Referenced by ami_switch_tab(), context_popup(), get_context_info(), gui_window_new_content(), HOOKF(), menu_save_page(), mouse_action_select_menu(), nsbeos_scaffolding_dispatch_event(), nsgtk_viewsource(), pdf_button_clicked_cb(), plaintext_button_clicked_cb(), print_button_clicked_cb(), print_document(), ro_gui_print_apply(), ro_gui_search_bw_searchable(), ro_gui_url_bar_set_content_favicon(), ro_gui_window_action_save(), ro_gui_window_handle_local_keypress(), ro_gui_window_iconise(), ro_gui_window_menu_prepare(), ro_gui_window_menu_select(), ro_gui_window_menu_warning(), ro_gui_window_prepare_pageinfo(), RXHOOKF(), and savepage_button_clicked_cb().
int browser_window_get_cookie_count | ( | const struct browser_window * | bw | ) |
Get the number of cookies in use for the current page.
bw | A browser window. |
Definition at line 4743 of file browser_window.c.
References browser_window_access_url(), browser_window::bw, count(), and urldb_get_cookie().
Referenced by page_info__create_from_bw().
browser_drag_type browser_window_get_drag_type | ( | struct browser_window * | bw | ) |
Get type of any current drag for a browser window.
bw | browser window to set the type of the current drag for |
Definition at line 2891 of file browser_window.c.
References browser_window::bw, browser_window::drag, and browser_window::type.
Referenced by mouse_action_select_menu(), and textplain_mouse_track().
browser_editor_flags browser_window_get_editor_flags | ( | struct browser_window * | bw | ) |
Check whether browser window can accept a cut/copy/paste, or has a selection that could be saved.
bw | The browser window |
Definition at line 2908 of file browser_window.c.
References browser_window::bw, BW_EDITOR_CAN_COPY, BW_EDITOR_CAN_CUT, BW_EDITOR_CAN_PASTE, BW_EDITOR_NONE, browser_window::can_edit, browser_window::parent, browser_window::read_only, browser_window::selection, and browser_window::window.
Referenced by ami_gui_menu_update_disabled(), gui_start_selection(), nsgtk_scaffolding_update_edit_actions_sensitivity(), nsws_update_edit(), ro_gui_window_menu_prepare(), and ro_gui_window_menu_warning().
nserror browser_window_get_extents | ( | struct browser_window * | bw, |
bool | scaled, | ||
int * | width, | ||
int * | height | ||
) |
Get a browser window's content extents.
bw | browser window |
scaled | whether to apply current browser window scale |
width | updated to content width extent in px |
height | updated to content height extent in px |
Definition at line 3982 of file browser_window.c.
References content_get_height(), content_get_width(), browser_window::current_content, height, NSERROR_BAD_CONTENT, NSERROR_OK, browser_window::scale, and width.
Referenced by ami_gui_scroll_internal(), ami_gui_scroller_update(), gui_window_set_extent(), gui_window_set_scroll(), gui_window_update_extent(), nsws_drawable_hscroll(), nsws_drawable_vscroll(), widget_scroll_x(), widget_scroll_y(), and win32_window_set_scroll().
nserror browser_window_get_features | ( | struct browser_window * | bw, |
int | x, | ||
int | y, | ||
struct browser_window_features * | data | ||
) |
Get access to any page features at the given coordinates.
Fetches page features like content, link URLs and objects (images) at the specified co-ordinates within the browsing context.
Fields within the supplied features structure are updated with pointers to any relevent content, or set to NULL if none.
[in] | bw | browser window to examine. |
[in] | x | x-coordinate of point of interest |
[in] | y | y-coordinate of point of interest |
[out] | data | Feature structure to update. |
Definition at line 2999 of file browser_window.c.
References browser_window__get_contextual_content(), browser_window::bw, browser_window_features::form_features, browser_window_features::link, browser_window_features::main, browser_window_features::object, browser_window::scale, browser_window::x, and browser_window::y.
Referenced by ami_text_box_at_point(), get_context_info(), html_get_contextual_content(), nsbeos_scaffolding_popup_menu(), nsgtk_scaffolding_context_menu(), ro_gui_window_handle_local_keypress(), and ro_gui_window_menu_prepare().
struct history * browser_window_get_history | ( | struct browser_window * | bw | ) |
Get a browser window's history object.
bw | browser window |
Clients need history object to make use of the history_* functions.
Definition at line 3953 of file browser_window.c.
References browser_window::history.
nserror browser_window_get_name | ( | struct browser_window * | bw, |
const char ** | name | ||
) |
Obtain a browsing contexts name.
The returned pointer is owned bu the browsing context and is only valid untill the next operation on that context. The returned name may be NULL if no name has been set.
bw | The browser window. |
name | recives result string. |
Definition at line 2546 of file browser_window.c.
References browser_window::bw, browser_window::name, and NSERROR_OK.
browser_window_page_info_state browser_window_get_page_info_state | ( | const struct browser_window * | bw | ) |
Request the current browser window page info state.
The page information state is an indicator enumeration to be used by frontends to indicate to the user if the page they are viewing is able to be trusted. This is often shown as a padlock of some kind.
This is also used by the internal page information corewindow to render to the user what the situation is.
bw | The browser window |
Definition at line 4663 of file browser_window.c.
References browser_window::bw, content_saw_insecure_objects(), browser_window::current_content, hlcache_handle_get_url(), browser_window::match, nsurl_get_component(), NSURL_SCHEME, PAGE_STATE_INSECURE, PAGE_STATE_INTERNAL, PAGE_STATE_LOCAL, PAGE_STATE_SECURE, PAGE_STATE_SECURE_ISSUES, PAGE_STATE_SECURE_OVERRIDE, PAGE_STATE_UNKNOWN, and urldb_get_cert_permissions().
Referenced by gui_page_info_change(), gui_window_report_page_info(), nsgtk_toolbar_page_info_change(), page_info__create_from_bw(), ro_gui_url_bar_page_info_change(), and win32_window_page_info_change().
void browser_window_get_position | ( | struct browser_window * | bw, |
bool | root, | ||
int * | pos_x, | ||
int * | pos_y | ||
) |
Get the position of the current browser window with respect to the root or parent browser window.
bw | browser window to get the position of |
root | true if we want position wrt root bw, false if wrt parent bw |
pos_x | updated to x position of bw |
pos_y | updated to y position of bw |
Definition at line 2794 of file browser_window.c.
References browser_window::BROWSER_WINDOW_FRAME, browser_window::BROWSER_WINDOW_FRAMESET, browser_window::BROWSER_WINDOW_IFRAME, browser_window::BROWSER_WINDOW_NORMAL, browser_window::browser_window_type, browser_window::bw, browser_window::parent, root, browser_window::scale, browser_window::scroll_x, browser_window::scroll_y, scrollbar_get_offset(), browser_window::x, and browser_window::y.
Referenced by browser_window_frame_resize_start(), browser_window_invalidate_rect(), browser_window_mouse_track_internal(), browser_window_place_caret(), and iframe_mouse_action().
float browser_window_get_scale | ( | struct browser_window * | bw | ) |
Gets the scale of a browser window.
bw | The browser window to get the scale of. |
Definition at line 4322 of file browser_window.c.
References browser_window::bw, and browser_window::scale.
Referenced by gui_window_drag_start(), gui_window_set_title(), handle_local_keypress_scale(), html_drop_file_at_point(), html_get_contextual_content(), html_scroll_at_point(), iframe_mouse_action(), ro_gui_dialog_prepare_zoom(), ro_gui_window_default_options(), ro_gui_window_open(), ro_gui_window_scroll(), and window_redraw_content().
nserror browser_window_get_scrollbar_type | ( | struct browser_window * | bw, |
browser_scrolling * | h, | ||
browser_scrolling * | v | ||
) |
Get the browser window's scrollbar details.
Vertical and horizontal scrollbars may be {YES|NO|AUTO}, although it is entirely up to the front end whether this is implemented. e.g. if the gui toolkit style-guide says all windows must have scrollbars then this API can be ignored.
bw | browser window to look at |
h | Updated to indicate horizontal scrollbar type |
v | Updated to indicate vertical scrollbar type |
Definition at line 2986 of file browser_window.c.
References browser_window::bw, NSERROR_OK, and browser_window::scrolling.
Referenced by ami_gui_scroller_update(), and ro_gui_window_open().
char * browser_window_get_selection | ( | struct browser_window * | bw | ) |
Get the current selection from a root browser window, ownership passed to caller, who must free() it.
bw | The browser window |
Definition at line 2946 of file browser_window.c.
References browser_window::bw, content_get_selection(), browser_window::current_content, browser_window::parent, browser_window::selection, and browser_window::window.
Referenced by ami_drag_selection(), ami_file_save(), ro_gui_window_menu_select(), and ro_gui_window_menu_warning().
nserror browser_window_get_ssl_chain | ( | struct browser_window * | bw, |
struct cert_chain ** | chain | ||
) |
Request the current browser window SSL certificate chain.
When the page has SSL information, this will retrieve the certificate chain.
If there is no chain available, this will return NSERROR_NOT_FOUND
bw | The browser window |
chain | Pointer to be filled out with certificate chain |
Definition at line 4728 of file browser_window.c.
References browser_window::bw, browser_window::current_cert_chain, NSERROR_NOT_FOUND, and NSERROR_OK.
const char * browser_window_get_title | ( | struct browser_window * | bw | ) |
Get the title of a browser_window.
bw | The browser window. |
Definition at line 3939 of file browser_window.c.
References content_get_title(), browser_window::current_content, and nsurl_access().
Referenced by ami_switch_tab(), ami_toggletabbar(), HOOKF(), nsgtk_scaffolding_set_top_level(), and ro_gui_window_toolbar_click().
nserror browser_window_get_url | ( | struct browser_window * | bw, |
bool | fragment, | ||
struct nsurl ** | url_out | ||
) |
Access a browser window's URL.
[in] | bw | browser window |
[in] | fragment | Whether to include any URL fragment. |
[out] | url_out | Returns a ref to the URL on success. |
Definition at line 3911 of file browser_window.c.
References browser_window_access_url(), browser_window::frag_id, browser_window::loading_content, NSERROR_OK, nsurl_ref(), nsurl_refragment(), and browser_fetch_parameters::url.
Referenced by ro_gui_window_toolbar_click().
bool browser_window_has_content | ( | struct browser_window * | bw | ) |
Find out if a browser window is currently showing a content.
bw | browser window |
Definition at line 3962 of file browser_window.c.
References browser_window::current_content.
Referenced by addbookmarks_button_clicked_cb(), ami_switch_tab(), beos_window_invalidate_area(), get_context_info(), gui_window_new_content(), gui_window_set_extent(), gui_window_set_scroll(), gui_window_update_extent(), HOOKF(), menu_add_bookmark(), nsbeos_scaffolding_dispatch_event(), nsbeos_window_expose_event(), nsgtk_saveas_dialog(), nsgtk_window_invalidate_area(), on_resized(), ro_gui_window_action_add_bookmark(), ro_gui_window_action_page_info(), ro_gui_window_action_remove_bookmark(), ro_gui_window_action_save(), ro_gui_window_handle_local_keypress(), ro_gui_window_menu_prepare(), ro_gui_window_open(), ro_gui_window_scroll(), ro_gui_window_toolbar_click(), and ro_gui_window_update_toolbar_buttons().
bool browser_window_is_frameset | ( | struct browser_window * | bw | ) |
Find out if a browser window contains a frameset.
bw | browser window to look at |
Definition at line 2978 of file browser_window.c.
References browser_window::bw, and browser_window::children.
Referenced by ami_gui_scroller_update(), gui_window_set_extent(), ro_gui_window_open(), and ro_gui_window_scroll_action().
void browser_window_mouse_click | ( | struct browser_window * | bw, |
browser_mouse_state | mouse, | ||
int | x, | ||
int | y | ||
) |
Handle mouse clicks in a browser window.
bw | browser window |
mouse | state of mouse buttons and modifier keys |
x | coordinate of mouse |
y | coordinate of mouse |
Definition at line 4487 of file browser_window.c.
References browser_window_mouse_click_internal(), browser_window::bw, browser_window::scale, browser_window::x, and browser_window::y.
Referenced by ami_drag_selection(), ami_gui_event(), fb_browser_window_click(), fb_browser_window_move(), iframe_mouse_action(), monkey_window_handle_click(), nsbeos_dispatch_event(), nsgtk_window_button_press_event(), nsgtk_window_button_release_event(), nsgtk_window_motion_notify_event(), nsws_drawable_mousedown(), nsws_drawable_mousemove(), nsws_drawable_mouseup(), on_content_mouse_click(), and ro_gui_window_click().
void browser_window_mouse_track | ( | struct browser_window * | bw, |
browser_mouse_state | mouse, | ||
int | x, | ||
int | y | ||
) |
Handle non-click mouse action in a browser window.
(drag ends, movements)
bw | browser window |
mouse | state of mouse buttons and modifier keys |
x | coordinate of mouse |
y | coordinate of mouse |
Definition at line 4475 of file browser_window.c.
References browser_window_mouse_track_internal(), browser_window::bw, browser_window::scale, browser_window::x, and browser_window::y.
Referenced by ami_gui_event(), fb_browser_window_click(), fb_browser_window_move(), iframe_mouse_action(), nsbeos_dispatch_event(), nsgtk_window_button_release_event(), nsgtk_window_motion_notify_event(), nsws_drawable_mousemove(), nsws_drawable_mouseup(), on_content_mouse_click(), on_content_mouse_move(), ro_gui_selection_drag_end(), ro_gui_window_mouse_at(), and ro_gui_window_scroll_end().
nserror browser_window_navigate | ( | struct browser_window * | bw, |
struct nsurl * | url, | ||
struct nsurl * | referrer, | ||
enum browser_window_nav_flags | flags, | ||
char * | post_urlenc, | ||
struct fetch_multipart_data * | post_multipart, | ||
struct hlcache_handle * | parent | ||
) |
Start fetching a page in a browser window.
bw | browser window |
url | URL to start fetching |
flags | Flags to control operation |
referrer | The referring uri or NULL if none |
post_urlenc | url encoded post data or NULL if none |
post_multipart | multipart post data or NULL if none |
parent | Parent content or NULL if none |
Any existing fetches in the window are aborted.
If post_urlenc and post_multipart are NULL the url is fetched using GET rather than POST.
Definition at line 3290 of file browser_window.c.
References browser_window__free_fetch_parameters(), browser_window__navigate_internal(), browser_window_destroy_children(), browser_window_destroy_iframes(), browser_window_download(), browser_window_history_add(), browser_window_history_update(), browser_window_refresh_url_bar(), browser_window_remove_caret(), browser_window_stop(), browser_window_update(), BW_NAVIGATE_DOWNLOAD, BW_NAVIGATE_HISTORY, BW_NAVIGATE_INTERNAL, BW_NAVIGATE_NO_TERMINAL_HISTORY_UPDATE, BW_NAVIGATE_UNVERIFIABLE, hlcache_child_context::charset, CONTENT_ENCODING_NORMAL, content_get_encoding(), content_get_quirks(), content_get_type(), CONTENT_HTML, history::current, browser_window::current_content, llcache_post_data::data, fetch_multipart_data_clone(), browser_fetch_parameters::flags, browser_window::frag_id, FRAME_DEPTH, browser_window::history, hlcache_handle_get_url(), browser_window::internal_nav, is_internal_navigate_url(), LLCACHE_RETRIEVE_VERIFIABLE, browser_window::loading_parameters, llcache_post_data::multipart, NSERROR_FRAME_DEPTH, NSERROR_NEED_DATA, NSERROR_OK, NSLOG, nsurl_access(), nsurl_compare(), NSURL_COMPLETE, NSURL_FRAGMENT, nsurl_get_component(), nsurl_has_component(), NSURL_QUERY, nsurl_ref(), nsurl_unref(), browser_window::parent, parent, browser_fetch_parameters::parent_charset, browser_fetch_parameters::parent_quirks, browser_fetch_parameters::post_multipart, browser_fetch_parameters::post_urlenc, hlcache_child_context::quirks, browser_fetch_parameters::referrer, llcache_post_data::type, browser_fetch_parameters::url, and llcache_post_data::urlenc.
Referenced by ami_file_open(), ami_gui_event(), ami_handle_appmsg(), ami_history_global_drag_end(), ami_hotlist_drag_end(), browser_window_create(), browser_window_create_frameset_internal(), browser_window_create_iframes(), browser_window_history_back(), browser_window_history_go(), browser_window_navigate_up(), browser_window_refresh(), browser_window_reload(), context_popup(), fb_url_enter(), form_submit(), gui_download_window_done(), HOOKF(), link_mouse_action(), monkey_window_handle_go(), mouse_action_drag_none(), nsbeos_scaffolding_dispatch_event(), nsgtk_completion_match_select(), nsgtk_on_savelink_activate_menu(), nsws_window_command(), nsws_window_go(), on_file_dropped(), openfile_button_clicked_cb(), ro_gui_url_bar_menu_select(), ro_gui_url_complete_click(), ro_gui_window_action_home(), ro_gui_window_launch_url(), ro_gui_window_menu_select(), ro_msg_dataload(), RXHOOKF(), toolbar_home_click(), toolbar_key_input(), toolbar_navigate_to_url(), and url_entry_activate_cb().
nserror browser_window_navigate_up | ( | struct browser_window * | bw, |
bool | new_window | ||
) |
Navigate to a browser_window's parent URL.
bw | browser window |
new_window | whether to open parent in a new window, or existing |
Definition at line 3857 of file browser_window.c.
References browser_window_access_url(), browser_window_create(), browser_window_navigate(), BW_CREATE_CLONE, BW_NAVIGATE_HISTORY, NSERROR_BAD_PARAMETER, NSERROR_OK, nsurl_compare(), NSURL_COMPLETE, nsurl_parent(), nsurl_unref(), and parent.
Referenced by ro_gui_window_close(), ro_gui_window_menu_select(), and ro_gui_window_toolbar_click().
void browser_window_page_drag_start | ( | struct browser_window * | bw, |
int | x, | ||
int | y | ||
) |
Start drag scrolling the contents of the browser window.
bw | browser window |
x | x ordinate of initial mouse position |
y | y ordinate |
Definition at line 4499 of file browser_window.c.
References browser_window_set_drag_type(), browser_window::bw, browser_window::drag, DRAGGING_PAGE_SCROLL, gui_window_table::event, gui_window_table::get_scroll, guit, GW_EVENT_SCROLL_START, browser_window::scroll_x, browser_window::scroll_y, scrollbar_get_offset(), browser_window::start_scroll_x, browser_window::start_scroll_y, browser_window::start_x, browser_window::start_y, browser_window::window, netsurf_table::window, browser_window::x, and browser_window::y.
Referenced by browser_window_mouse_click_internal(), default_mouse_action(), and textplain_mouse_action().
bool browser_window_redraw | ( | struct browser_window * | bw, |
int | x, | ||
int | y, | ||
const struct rect * | clip, | ||
const struct redraw_context * | ctx | ||
) |
Redraw an area of a window.
Calls the redraw function for the content.
bw | The window to redraw |
x | coordinate for top-left of redraw |
y | coordinate for top-left of redraw |
clip | clip rectangle coordinates |
ctx | redraw context |
The clip rectangle is guaranteed to be filled to its extents, so there is no need to render a solid background first.
x, y and clip are coordinates from the top left of the canvas area.
The top left corner of the clip rectangle is (x0, y0) and the bottom right corner of the clip rectangle is (x1, y1). Units for x, y and clip are pixels.
Definition at line 2583 of file browser_window.c.
References content_redraw_data::background_colour, browser_window_get_scrollbar_pos(), browser_window_redraw(), browser_window::bw, browser_window::children, clip(), plotter_table::clip, browser_window::cols, content_get_height(), content_get_type(), content_get_width(), CONTENT_HTML, content_redraw(), CONTENT_TEXTPLAIN, browser_window::current_content, browser_window::height, height, content_redraw_data::height, knockout_plot_end(), knockout_plot_start(), NSERROR_OK, NSLOG, plotter_table::option_knockout, redraw_context::plot, plot_style_fill_white, plotter_table::rectangle, content_redraw_data::repeat_x, content_redraw_data::repeat_y, browser_window::rows, browser_window::scale, content_redraw_data::scale, browser_window::scroll_x, browser_window::scroll_y, scrollbar_get_offset(), scrollbar_redraw(), SCROLLBAR_WIDTH, browser_window::width, width, content_redraw_data::width, browser_window::window, browser_window::x, content_redraw_data::x, rect::x0, rect::x1, browser_window::y, content_redraw_data::y, rect::y0, and rect::y1.
Referenced by ami_do_redraw_tiled(), browser_window_redraw(), fb_redraw(), html_redraw_box(), monkey_window_handle_redraw(), nsbeos_window_expose_event(), nsgtk_window_draw_event(), nsws_drawable_paint(), ro_gui_window__redraw_rect(), and window_redraw_content().
bool browser_window_redraw_ready | ( | struct browser_window * | bw | ) |
Check whether browser window is ready for redraw.
bw | The window to redraw |
Definition at line 2765 of file browser_window.c.
References browser_window::bw, content_is_locked(), browser_window::current_content, and NSLOG.
Referenced by ami_do_redraw(), ami_do_redraw_limits(), and ro_gui_window_redraw().
void browser_window_reformat | ( | struct browser_window * | bw, |
bool | background, | ||
int | width, | ||
int | height | ||
) |
Reformat a browser window contents to a new width or height.
This API is not safe to call from all contexts and care must be used.
bw | The browser window to reformat. |
background | Reformat in the background. |
width | new width |
height | new height |
Definition at line 4255 of file browser_window.c.
References browser_window::BROWSER_WINDOW_IFRAME, browser_window::browser_window_type, browser_window::bw, content_reformat(), browser_window::current_content, height, browser_window::scale, browser_window::scroll_x, browser_window::scroll_y, SCROLLBAR_WIDTH, width, and browser_window::window.
Referenced by browser_window_content_done(), browser_window_recalculate_frameset_internal(), layout_calculate_descendant_bboxes(), menu_debug_render(), on_resized(), scheduled_reformat(), window_close_search(), and window_open_search().
nserror browser_window_refresh_url_bar | ( | struct browser_window * | bw | ) |
Update URL bar for a given browser window to bw's content's URL.
bw | Browser window to update URL bar for. |
Definition at line 3240 of file browser_window.c.
References browser_window_refresh_url_bar_internal(), browser_window::bw, browser_window::current_content, browser_window::frag_id, hlcache_handle_get_url(), browser_window::internal_nav, browser_window::loading_parameters, NSERROR_OK, nsurl_refragment(), nsurl_unref(), browser_window::parent, browser_window::throbbing, and browser_fetch_parameters::url.
Referenced by ami_switch_tab(), browser_window_callback(), browser_window_content_ready(), browser_window_navigate(), and browser_window_stop().
nserror browser_window_reload | ( | struct browser_window * | bw, |
bool | all | ||
) |
Reload the page in a browser window.
bw | browser window |
all | whether to reload all objects associated with the page |
Definition at line 4118 of file browser_window.c.
References browser_window_navigate(), BW_NAVIGATE_NONE, content_html_object::content, content_get_type(), CONTENT_HTML, content_invalidate_reuse_data(), count(), browser_window::current_content, hlcache_handle_get_url(), html_get_objects(), html_get_stylesheets(), browser_window::loading_content, NSERROR_INVALID, and STYLESHEET_START.
Referenced by ami_gui_event(), fb_reload_click(), monkey_window_handle_reload(), nsbeos_scaffolding_dispatch_event(), nsws_window_command(), reload_button_clicked_cb(), reloadstop_button_clicked_cb(), ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), ro_gui_window_toolbar_click(), RXHOOKF(), and toolbar_reload_click().
bool browser_window_reload_available | ( | struct browser_window * | bw | ) |
Check availability of Reload action for a given browser window.
bw | browser window |
Definition at line 4541 of file browser_window.c.
References browser_window::bw, browser_window::current_content, and browser_window::loading_content.
Referenced by ami_gui_event(), ami_update_buttons(), ro_gui_window_menu_prepare(), ro_gui_window_update_toolbar_buttons(), and toolbar_update_buttons().
nserror browser_window_schedule_reformat | ( | struct browser_window * | bw | ) |
Reformat the browser window contents in a safe context.
The browser_window_reformat() call cannot safely be called from some contexts, This interface allows for the reformat to happen from a safe top level context.
The reformat uses the window table get_dimensions() callback as the correct viewport dimensions are only available to the frontend.
bw | The browser window to reformat the content of. |
Definition at line 4243 of file browser_window.c.
References browser_window::bw, guit, netsurf_table::misc, NSERROR_BAD_PARAMETER, gui_misc_table::schedule, scheduled_reformat(), and browser_window::window.
Referenced by ami_gui_event(), ami_gui_scroller_update(), browser_window_set_scale_internal(), nsbeos_reflow_all_windows(), nsbeos_window_resize_event(), nsgtk_window_size_allocate_event(), nsgtk_window_update_all(), nsws_drawable_resize(), nsws_window_command(), resize_browser_widget(), and ro_gui_window_open().
bool browser_window_scroll_at_point | ( | struct browser_window * | bw, |
int | x, | ||
int | y, | ||
int | scrx, | ||
int | scry | ||
) |
Send a scroll request to a browser window at a particular point.
The 'deepest' scrollable object which can be scrolled in the requested direction at the given point will consume the scroll.
bw | browser window to look inside |
x | x-coordinate of point of interest |
y | y-coordinate of point of interest |
scrx | number of px try to scroll something in x direction |
scry | number of px try to scroll something in y direction |
Definition at line 3018 of file browser_window.c.
References browser_window_scroll_at_point_internal(), browser_window::bw, browser_window::scale, browser_window::x, and browser_window::y.
Referenced by ami_gui_scroll_internal(), fb_browser_window_click(), html_scroll_at_point(), nsgtk_window_scroll_event(), and ro_gui_window_scroll_action().
void browser_window_set_dimensions | ( | struct browser_window * | bw, |
int | width, | ||
int | height | ||
) |
Set the dimensions of the area a browser window occupies.
bw | The browser window to set dimensions of |
width | Width in pixels |
height | Height in pixels |
Definition at line 4029 of file browser_window.c.
References browser_window::height, height, NSLOG, browser_window::width, width, and browser_window::window.
Referenced by browser_window_create_iframes(), and layout_calculate_descendant_bboxes().
void browser_window_set_drag_type | ( | struct browser_window * | bw, |
browser_drag_type | type, | ||
const struct rect * | rect | ||
) |
Set drag type for a browser window, and inform front end.
bw | browser window to set the type of the current drag for |
type | drag type |
rect | area pointer may be confined to, during drag, or NULL |
Definition at line 2857 of file browser_window.c.
References browser_window_get_root(), browser_window::bw, browser_window::drag, gui_window_table::drag_start, DRAGGING_CONTENT_SCROLLBAR, DRAGGING_NONE, DRAGGING_SCR_X, DRAGGING_SCR_Y, DRAGGING_SELECTION, GDRAGGING_OTHER, GDRAGGING_SCROLLBAR, guit, browser_window::type, type, browser_window::window, and netsurf_table::window.
Referenced by browser_window_callback(), browser_window_mouse_drag_end(), browser_window_page_drag_start(), browser_window_resize_frames(), browser_window_scroll_callback(), form_select_menu_scroll_callback(), textplain_mouse_action(), and textplain_mouse_track().
void browser_window_set_gadget_filename | ( | struct browser_window * | bw, |
struct form_control * | gadget, | ||
const char * | fn | ||
) |
set filename on form control.
bw | browser window to look inside. |
gadget | form control. |
fn | filename to set. |
Definition at line 3045 of file browser_window.c.
References browser_window::bw, browser_window::current_content, and html_set_file_gadget_filename().
Referenced by gui_file_gadget_open(), and gui_window_file_gadget_open().
nserror browser_window_set_name | ( | struct browser_window * | bw, |
const char * | name | ||
) |
Set a browsing contexts name.
Changes a browsing contexts name to a copy of that passed and the value is not subsequently referenced.
bw | The browser window. |
name | The name string to set. |
Definition at line 2558 of file browser_window.c.
References browser_window::bw, browser_window::name, NSERROR_NOMEM, and NSERROR_OK.
void browser_window_set_pointer | ( | struct browser_window * | bw, |
browser_pointer_shape | shape | ||
) |
Change the shape of the mouse pointer.
bw | Browser window to set shape in |
shape | The pointer shape to use |
Definition at line 4203 of file browser_window.c.
References BROWSER_POINTER_AUTO, browser_window_get_root(), browser_window::bw, content_get_status(), CONTENT_STATUS_READY, browser_window::current_content, GUI_POINTER_DEFAULT, GUI_POINTER_PROGRESS, guit, browser_window::last_action, browser_window::loading, browser_window::loading_content, root, gui_window_table::set_pointer, and netsurf_table::window.
Referenced by browser_window_callback(), browser_window_mouse_click_internal(), browser_window_mouse_track_internal(), and browser_window_scroll_callback().
void browser_window_set_position | ( | struct browser_window * | bw, |
int | x, | ||
int | y | ||
) |
Set the position of the current browser window with respect to the parent browser window.
bw | browser window to set the position of |
x | x position of bw |
y | y position of bw |
Definition at line 2839 of file browser_window.c.
References browser_window::bw, NSLOG, browser_window::window, browser_window::x, and browser_window::y.
Referenced by browser_window_create_iframes(), and layout_calculate_descendant_bboxes().
nserror browser_window_set_scale | ( | struct browser_window * | bw, |
float | scale, | ||
bool | absolute | ||
) |
Sets the scale of a browser window.
bw | The browser window to scale. |
scale | The new scale. |
absolute | If the scale value is absolute or relative to current value |
Definition at line 4286 of file browser_window.c.
References browser_window_recalculate_frameset(), browser_window_set_scale_internal(), browser_window::bw, NSERROR_OK, browser_window::parent, browser_window::scale, SCALE_MAXIMUM, and SCALE_MINIMUM.
Referenced by ami_gui_adjust_scale(), ami_gui_set_scale(), fb_browser_window_input(), menu_dec_scale(), menu_inc_scale(), nsws_window_command(), ro_gui_window_set_scale(), zoomminus_button_clicked_cb(), zoomnormal_button_clicked_cb(), and zoomplus_button_clicked_cb().
nserror browser_window_show_certificates | ( | struct browser_window * | bw | ) |
Show the certificate page for the current page.
Does nothing for a page without certificates.
bw | A browser window. |
Definition at line 4780 of file browser_window.c.
References browser_window_create(), browser_window::bw, BW_CREATE_FOREGROUND, BW_CREATE_HISTORY, BW_CREATE_TAB, cert_chain_to_query(), browser_window::current_cert_chain, NSERROR_NOT_FOUND, NSERROR_OK, and nsurl_unref().
Referenced by page_info__handle_item_click().
nserror browser_window_show_cookies | ( | const struct browser_window * | bw | ) |
Open cookie viewer for the current page.
bw | A browser window. |
Definition at line 4763 of file browser_window.c.
References browser_window_access_url(), browser_window::bw, guit, netsurf_table::misc, nsurl_get_component(), NSURL_HOST, and gui_misc_table::present_cookies.
Referenced by page_info__handle_item_click().
void browser_window_stop | ( | struct browser_window * | bw | ) |
Stop all fetching activity in a browser window.
bw | The browser window to stop activity in. |
Definition at line 4077 of file browser_window.c.
References browser_window_refresh(), browser_window_refresh_url_bar(), browser_window_stop(), browser_window_stop_throbber(), browser_window::bw, browser_window::children, browser_window::cols, content_get_status(), CONTENT_STATUS_DONE, CONTENT_STATUS_READY, browser_window::current_content, guit, hlcache_handle_abort(), hlcache_handle_release(), browser_window::iframe_count, browser_window::iframes, browser_window::loading_content, netsurf_table::misc, NSERROR_OK, browser_window::rows, and gui_misc_table::schedule.
Referenced by ami_gui_event(), browser_window__handle_ssl_query_response(), browser_window__handle_userpass_response(), browser_window_navigate(), browser_window_stop(), fb_stop_click(), monkey_window_handle_stop(), nsbeos_scaffolding_dispatch_event(), nsws_window_command(), reloadstop_button_clicked_cb(), ro_gui_window_handle_local_keypress(), ro_gui_window_menu_select(), ro_gui_window_toolbar_click(), stop_button_clicked_cb(), and toolbar_stop_click().
bool browser_window_stop_available | ( | struct browser_window * | bw | ) |
Check availability of Stop action for a given browser window.
bw | browser window |
Definition at line 4548 of file browser_window.c.
References browser_window::bw, content_get_status(), CONTENT_STATUS_DONE, browser_window::current_content, and browser_window::loading_content.
Referenced by ami_gui_event(), ami_update_buttons(), ro_gui_window_menu_prepare(), ro_gui_window_update_toolbar_buttons(), and toolbar_update_buttons().
bool browser_window_up_available | ( | struct browser_window * | bw | ) |
Return true if a browser window can navigate upwards.
bw | the browser window to test. |
Definition at line 3834 of file browser_window.c.
References browser_window::current_content, hlcache_handle_get_url(), NSERROR_OK, nsurl_compare(), NSURL_COMPLETE, nsurl_parent(), nsurl_unref(), parent, and result.
Referenced by ro_gui_window_menu_prepare(), and ro_gui_window_update_toolbar_buttons().