32#include <nsutils/time.h>
67#ifdef WITH_THEME_INSTALL
74#define SCALE_MINIMUM 0.2
79#define SCALE_MAXIMUM 10.0
101 for (i = 0; i < (bw->
rows * bw->
cols); i++) {
120 if (params->
url != NULL) {
287 for (cur_child = 0; cur_child <
children; cur_child++) {
301 (
x - bwc->
x), (
y - bwc->
y), data);
324 uint32_t fetch_flags,
333 assert(
root != NULL);
339 fetch_is_post ? post : NULL,
345 NSLOG(netsurf, INFO,
"Failed to fetch download: %d", error);
350 "Failed creating download context: %d", error);
374 for (index = 0; index <
children; index++) {
444 switch (event->
type) {
481 "Unable to create default location url");
547 bool speculative_default =
false;
556 if ((lwc_string_caseless_isequal(scheme,
558 &
match) == lwc_error_ok &&
560 (lwc_string_caseless_isequal(scheme,
561 corestring_lwc_https,
562 &
match) == lwc_error_ok &&
564 speculative_default =
true;
567 lwc_string_unref(scheme);
569 if (speculative_default) {
578 "Unable to create default location url");
587 "fetching general favicon from '%s'",
591 "fetching favicon rel:%s '%s'",
592 lwc_string_data(link->
rel),
653 flags &= ~BW_NAVIGATE_UNVERIFIABLE;
679 assert(
root != NULL);
738 static const struct rect zrect = {
751 case BROWSER_WINDOW_NORMAL:
770 case BROWSER_WINDOW_IFRAME:
772 assert(bw->
parent != NULL);
789 case BROWSER_WINDOW_FRAME:
812 case BROWSER_WINDOW_FRAMESET:
953 NSLOG(netsurf, WARNING,
954 "Unable to set browser scroll offsets to %d by %d",
1019 char **username_out,
1020 char **password_out)
1027 if (userpass == NULL) {
1028 username = malloc(1);
1029 password = malloc(1);
1030 if (username == NULL || password == NULL) {
1038 *username_out = username;
1039 *password_out = password;
1043 tmp = strchr(userpass,
':');
1048 len = tmp - userpass;
1049 len2 = strlen(++tmp);
1051 username = malloc(len + 1);
1052 password = malloc(len2 + 1);
1053 if (username == NULL || password == NULL) {
1058 memcpy(username, userpass, len);
1059 username[len] =
'\0';
1060 memcpy(password, tmp, len2 + 1);
1063 *username_out = username;
1064 *password_out = password;
1080 const char *password,
1081 char **userpass_out)
1086 len = strlen(username) + 1 + strlen(password) + 1;
1088 userpass = malloc(len);
1089 if (userpass == NULL) {
1093 snprintf(userpass, len,
"%s:%s", username, password);
1095 *userpass_out = userpass;
1106 const char *username,
1107 const char *password,
1148 char *username = NULL, *password = NULL;
1152 memset(¶ms, 0,
sizeof(params));
1157 &username, &password);
1163 params.
url =
nsurl_ref(corestring_nsurl_about_query_auth);
1210 if (username != NULL) {
1213 if (password != NULL) {
1233 nsurl *chainurl = NULL;
1235 memset(¶ms, 0,
sizeof(params));
1237 params.
url =
nsurl_ref(corestring_nsurl_about_query_ssl);
1287 if (chainurl != NULL)
1302 memset(¶ms, 0,
sizeof(params));
1304 params.
url =
nsurl_ref(corestring_nsurl_about_query_timeout);
1339 memset(¶ms, 0,
sizeof(params));
1341 params.
url =
nsurl_ref(corestring_nsurl_about_query_fetcherror);
1380 const char *message =
event->data.errordata.errormsg;
1381 nserror code =
event->data.errordata.errorcode;
1388 if (message == NULL) {
1455 switch (event->
type) {
1483#ifdef WITH_THEME_INSTALL
1523 const char *
status = NULL;
1565 .
x0 =
event->data.redraw.x,
1566 .y0 =
event->data.redraw.y,
1567 .x1 =
event->data.redraw.x +
event->data.redraw.width,
1568 .y1 =
event->data.redraw.y +
event->data.redraw.height
1584 if ((lwc_string_caseless_isequal(
1586 corestring_lwc_icon,
1587 &match) == lwc_error_ok && match) ||
1588 (lwc_string_caseless_isequal(
1590 corestring_lwc_shortcut_icon,
1591 &match) == lwc_error_ok && match)) {
1615 *(
event->data.jsthread) = thread;
1627 *(
event->data.getdims.viewport_width) =
width / bw->
scale;
1635 .
x0 =
event->data.scroll.x0,
1636 .y0 =
event->data.scroll.y0,
1645 rect.
x1 =
event->data.scroll.x1;
1646 rect.
y1 =
event->data.scroll.y1;
1648 rect.
x1 =
event->data.scroll.x0;
1649 rect.
y1 =
event->data.scroll.y0;
1667 case CONTENT_SAVE_ORIG:
1673 case CONTENT_SAVE_NATIVE:
1679 case CONTENT_SAVE_COMPLETE:
1685 case CONTENT_SAVE_SOURCE:
1714 case CONTENT_DRAG_NONE:
1717 case CONTENT_DRAG_SCROLL:
1720 case CONTENT_DRAG_SELECTION:
1730 case CONTENT_CARET_REMOVE:
1733 case CONTENT_CARET_HIDE:
1736 case CONTENT_CARET_SET_POS:
1775 case CONTENT_TEXTSEARCH_FIND:
1780 case CONTENT_TEXTSEARCH_MATCH:
1785 case CONTENT_TEXTSEARCH_BACK:
1790 case CONTENT_TEXTSEARCH_FORWARD:
1795 case CONTENT_TEXTSEARCH_RECENT:
1850 NSLOG(netsurf, INFO,
1851 "Clearing reformat schedule for browser window %p",
bw);
1924 NSLOG(netsurf, INFO,
"Status text cache match:miss %d:%d",
1993 if ((
bw == page) || (depth > *rdepth)) {
2010 (depth > *rdepth)) {
2018 target, depth, page,
2105 const char *
status = NULL;
2114 for (cur_child = 0; cur_child <
children; cur_child++) {
2118 if ((x < child->
x) ||
2120 (child->
x + child->
width <
x) ||
2240 const char *
status = NULL;
2273 for (cur_child = 0; cur_child <
children; cur_child++) {
2277 if ((x < child->
x) ||
2279 (child->
x + child->
width <
x) ||
2420 for (cur_child = 0; cur_child <
children; cur_child++) {
2425 if (x < bwc->
x || bwc->
x + bwc->
width <
x ||
2478 for (cur_child = 0; cur_child <
children; cur_child++) {
2483 if (x < bwc->
x || bwc->
x + bwc->
width <
x ||
2518 bool is_internal =
false;
2519 lwc_string *scheme, *
path;
2522 if (scheme != NULL) {
2525 if (scheme == corestring_lwc_about) {
2526 if (
path == corestring_lwc_query_auth) {
2528 }
else if (
path == corestring_lwc_query_ssl) {
2530 }
else if (
path == corestring_lwc_query_timeout) {
2532 }
else if (
path == corestring_lwc_query_fetcherror) {
2536 lwc_string_unref(
path);
2538 lwc_string_unref(scheme);
2565 nname = strdup(
name);
2566 if (nname == NULL) {
2591 bool plot_ok =
true;
2594 struct rect content_clip;
2598 NSLOG(netsurf, INFO,
"NULL browser window");
2613 if ((bw->
window != NULL) &&
2635 for (cur_child = 0; cur_child <
children; cur_child++) {
2640 content_clip.
x0 = (
x + child->
x) * child->
scale;
2641 content_clip.
y0 = (
y + child->
y) * child->
scale;
2642 content_clip.
x1 = content_clip.
x0 +
2644 content_clip.
y1 = content_clip.
y0 +
2648 if (content_clip.
x0 <
clip->x0)
2649 content_clip.
x0 =
clip->x0;
2650 if (content_clip.
y0 <
clip->y0)
2651 content_clip.
y0 =
clip->y0;
2652 if (
clip->x1 < content_clip.
x1)
2653 content_clip.
x1 =
clip->x1;
2654 if (
clip->y1 < content_clip.
y1)
2655 content_clip.
y1 =
clip->y1;
2658 if (content_clip.
x0 >= content_clip.
x1 ||
2659 content_clip.
y0 >= content_clip.
y1)
2707 content_clip = *
clip;
2717 if (content_clip.
x0 < x0) content_clip.
x0 = x0;
2718 if (content_clip.
y0 < y0) content_clip.
y0 = y0;
2719 if (x1 < content_clip.
x1) content_clip.
x1 = x1;
2720 if (y1 < content_clip.
y1) content_clip.
y1 = y1;
2725 &content_clip, &new_ctx);
2737 x + off_x,
y + off_y,
clip,
2747 x + off_x,
y + off_y,
clip,
2768 NSLOG(netsurf, INFO,
"NULL browser window");
2848 NSLOG(netsurf, INFO,
2849 "Asked to set position of front end window.");
3090 if (existing == NULL) {
3091 assert(0 &&
"Failed: No existing window provided.");
3098 assert(0 &&
"Failed: Must have existing for history.");
3140 (existing != NULL) ? existing->
window : NULL,
3143 if (ret->
window == NULL) {
3189 assert(existing != NULL);
3243 nsurl *display_url, *url;
3255 corestring_nsurl_about_blank);
3300 uint32_t fetch_flags = 0;
3301 bool fetch_is_post = (post_urlenc != NULL || post_multipart != NULL);
3305 bool is_internal =
false;
3355 NSLOG(netsurf, INFO,
"frame depth too high.");
3365 post.
type = LLCACHE_POST_MULTIPART;
3368 post.
type = LLCACHE_POST_URL_ENCODED;
3401 lwc_string_unref(bw->
frag_id);
3406 bool same_url =
false;
3423 (fetch_is_post ==
false) &&
3452 memset(¶ms, 0,
sizeof(params));
3478 pass_params = ¶ms;
3483 memset(¶ms, 0,
sizeof(params));
3510 uint32_t fetch_flags = 0;
3531 post.
type = LLCACHE_POST_MULTIPART;
3534 post.
type = LLCACHE_POST_URL_ENCODED;
3554 fetch_is_post ? &post : NULL,
3565 if (bw->
window != NULL) {
3604 char *userpass = NULL;
3605 const char *username, *password, *realm, *siteurl;
3608 bool is_login =
false, is_cancel =
false;
3615 if (!(is_login || is_cancel)) {
3639 if (username == NULL || password == NULL ||
3640 realm == NULL || siteurl == NULL) {
3681 bool is_proceed =
false, is_back =
false;
3682 const char *siteurl = NULL;
3691 if (!(is_proceed || is_back) || siteurl == NULL) {
3697 NSLOG(netsurf, ERROR,
"Unable to reset ssl loading parameters");
3718 bool is_retry =
false, is_back =
false;
3720 NSLOG(netsurf, INFO,
"bw:%p params:%p", bw, params);
3754 bool is_retry =
false, is_back =
false;
3756 NSLOG(netsurf, INFO,
"bw:%p params:%p", bw, params);
3794 lwc_string *scheme, *
path;
3798 if (scheme != corestring_lwc_about) {
3799 lwc_string_unref(scheme);
3802 lwc_string_unref(scheme);
3806 if (
path == corestring_lwc_query_auth) {
3807 lwc_string_unref(
path);
3810 if (
path == corestring_lwc_query_ssl) {
3811 lwc_string_unref(
path);
3814 if (
path == corestring_lwc_query_timeout) {
3815 lwc_string_unref(
path);
3818 if (
path == corestring_lwc_query_fetcherror) {
3819 lwc_string_unref(
path);
3823 lwc_string_unref(
path);
3905 return corestring_nsurl_about_blank;
4014 if (bw->
window == NULL) {
4033 if (bw->
window == NULL) {
4038 NSLOG(netsurf, INFO,
4039 "Asked to set dimensions of front end window.");
4100 for (index = 0; index <
children; index++)
4105 for (index = 0; index <
children; index++)
4122 struct nsurl *reload_url;
4139 for (;
object != NULL;
object =
object->next) {
4148 if (sheets[i].sheet != NULL) {
4185 text_len = strlen(
text);
4212 assert(
root->window);
4218 nsu_getmonotonic_ms(&ms_now);
4346 if (target == NULL &&
4351 if (target == NULL) {
4364 if (!strcasecmp(target,
"_blank"))
4375 (!strcasecmp(target,
"_blank")))) {
4401 (!strcasecmp(target,
"_blank")))) {
4421 }
else if (!strcasecmp(target,
"_self")) {
4423 }
else if (!strcasecmp(target,
"_parent")) {
4427 }
else if (!strcasecmp(target,
"_top")) {
4466 if (target[0] !=
'_') {
4467 bw_target->
name = strdup(target);
4563 NSLOG(netsurf, DEEPDEBUG,
"Unable to exec, no content");
4568 NSLOG(netsurf, DEEPDEBUG,
"Unable to exec, content not done");
4590 assert(msg != NULL);
4598 NSLOG(netsurf, DEEPDEBUG,
"Logging message in %p targetted at %p",
root,
bw);
4599 NSLOG(netsurf, DEEPDEBUG,
"Log came from %s",
4603 "unknown input location"));
4605 switch (log_level) {
4607 NSLOG(netsurf, DEBUG,
"%.*s", (
int)msglen, msg);
4610 NSLOG(netsurf, VERBOSE,
"%.*s", (
int)msglen, msg);
4613 NSLOG(netsurf, INFO,
"%.*s", (
int)msglen, msg);
4616 NSLOG(netsurf, WARNING,
"%.*s", (
int)msglen, msg);
4619 NSLOG(netsurf, ERROR,
"%.*s", (
int)msglen, msg);
4680 if ((lwc_string_isequal(scheme, corestring_lwc_about,
4681 &
match) == lwc_error_ok &&
4683 (lwc_string_isequal(scheme, corestring_lwc_data,
4684 &
match) == lwc_error_ok &&
4686 (lwc_string_isequal(scheme, corestring_lwc_resource,
4687 &
match) == lwc_error_ok &&
4689 lwc_string_unref(scheme);
4694 if (lwc_string_isequal(scheme, corestring_lwc_file,
4695 &
match) == lwc_error_ok &&
4697 lwc_string_unref(scheme);
4702 if ((lwc_string_isequal(scheme, corestring_lwc_https,
4703 &
match) == lwc_error_ok &&
4704 (
match ==
false))) {
4706 lwc_string_unref(scheme);
4710 lwc_string_unref(scheme);
4748 if (cookies == NULL) {
4752 for (
char *c = cookies; *c !=
'\0'; c++) {
4769 const char *
string = (host != NULL) ? lwc_string_data(host) : NULL;
4774 lwc_string_unref(host);
nserror browser_window_history_add(struct browser_window *bw, struct hlcache_handle *content, lwc_string *frag_id)
Insert a url into the history tree.
nserror browser_window_history_update(struct browser_window *bw, struct hlcache_handle *content)
Update the thumbnail and scroll offsets for the current entry.
nserror browser_window_history_create(struct browser_window *bw)
Create a new history tree for a browser window window.
nserror browser_window_history_get_scroll(struct browser_window *bw, float *sx, float *sy)
Retrieve the stored scroll offsets for the current history entry.
nserror browser_window_history_clone(const struct browser_window *existing, struct browser_window *clone)
Clone a bw's history tree for new bw.
bool browser_window_history_forward_available(struct browser_window *bw)
Check whether it is pssible to go forwards in the history.
bool browser_window_history_back_available(struct browser_window *bw)
Check whether it is pssible to go back in the history.
void browser_window_history_destroy(struct browser_window *bw)
Free a history structure.
Interface to browser history operations.
Browser window private structure.
nserror browser_window_initialise_common(enum browser_window_create_flags flags, struct browser_window *bw, const struct browser_window *existing)
Initialise common parts of a browser window.
nserror browser_window_schedule_reformat(struct browser_window *bw)
Reformat the browser window contents in a safe context.
bool browser_window_redraw_ready(struct browser_window *bw)
Check whether browser window is ready for redraw.
static nserror browser_window__handle_ssl_query_response(bool proceed, void *pw)
Handle query responses from SSL requests.
nserror browser_window_show_certificates(struct browser_window *bw)
Show the certificate page for the current page.
void browser_window_page_drag_start(struct browser_window *bw, int x, int y)
Start drag scrolling the contents of the browser window.
static nserror browser_window_refresh_url_bar_internal(struct browser_window *bw, nsurl *url)
Update URL bar for a given browser window to given URL.
bool browser_window_can_select(struct browser_window *bw)
Find out if given browser window content is selectable.
static nserror browser_window__handle_userpass_response(nsurl *url, const char *realm, const char *username, const char *password, void *pw)
Handle a response from the UI when prompted for credentials.
void browser_window_update_extent(struct browser_window *bw)
Update the extent of the inside of a browser window to that of the current content.
nserror browser_window_refresh_url_bar(struct browser_window *bw)
Update URL bar for a given browser window to bw's content's URL.
static nserror browser_window_set_scale_internal(struct browser_window *bw, float scale)
Set browser window scale.
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.
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.
static bool browser_window_check_throbber(struct browser_window *bw)
recursively check browser windows for activity
static nserror browser_window__build_userpass(const char *username, const char *password, char **userpass_out)
Build a "username:password" from components.
float browser_window_get_scale(struct browser_window *bw)
Gets the scale of a browser window.
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.
static nserror browser_window__handle_error(struct browser_window *bw, hlcache_handle *c, const hlcache_event *event)
Handle errors during content fetch.
static int get_horz_scrollbar_len(struct browser_window *bw)
Get browser window horizontal scrollbar widget length.
static nserror browser_window__get_contextual_content(struct browser_window *bw, int x, int y, struct browser_window_features *data)
Internal helper for getting the positional features.
nsurl * browser_window_access_url(const struct browser_window *bw)
Access a browser window's URL.
bool browser_window_has_content(struct browser_window *bw)
Find out if a browser window is currently showing a content.
static void browser_window_get_scrollbar_pos(struct browser_window *bw, bool horizontal, int *x, int *y)
Get position of scrollbar widget within browser window.
static nserror browser_window__handle_fetcherror(struct browser_window *bw, const char *reason, nsurl *url)
Handle non specific errors during a fetch.
nserror browser_window_create(enum browser_window_create_flags flags, nsurl *url, nsurl *referrer, struct browser_window *existing, struct browser_window **bw)
Create and open a new root browser window with the given page.
bool browser_window_back_available(struct browser_window *bw)
Check availability of Back action for a given browser window.
nserror browser_window_get_ssl_chain(struct browser_window *bw, struct cert_chain **chain)
Request the current browser window SSL certificate chain.
static void browser_window_mouse_track_internal(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Process mouse movement event.
nserror browser_window_get_name(struct browser_window *bw, const char **out_name)
Obtain a browsing contexts name.
bool browser_window_exec(struct browser_window *bw, const char *src, size_t srclen)
Execute some JavaScript code in a browsing context.
static nserror navigate_internal_query_auth(struct browser_window *bw, struct browser_fetch_parameters *params)
Internal navigation handler for the authentication query handler.
nserror browser_window_get_scrollbar_type(struct browser_window *bw, browser_scrolling *h, browser_scrolling *v)
Get the browser window's scrollbar details.
static void scheduled_reformat(void *vbw)
internal scheduled reformat callback.
nserror browser_window_debug(struct browser_window *bw, enum content_debug op)
Set debug options on a window.
static bool browser_window_scroll_at_point_internal(struct browser_window *bw, int x, int y, int scrx, int scry)
perform a scroll operation at a given coordinate
bool browser_window_can_search(struct browser_window *bw)
Find out if given browser window can be searched.
static void browser_window_refresh(void *p)
Handle meta http-equiv refresh time elapsing by loading a new page.
void browser_window_mouse_click(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle mouse clicks in a browser window.
static nserror browser_window_favicon_callback(hlcache_handle *c, const hlcache_event *event, void *pw)
Callback for fetchcache() for browser window favicon fetches.
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.
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.
nserror browser_window_show_cookies(const struct browser_window *bw)
Open cookie viewer for the current page.
static nserror browser_window_start_throbber(struct browser_window *bw)
Start the busy indicator.
static nserror browser_window_content_ready(struct browser_window *bw)
handle message for content ready on browser window
bool browser_window_up_available(struct browser_window *bw)
Return true if a browser window can navigate upwards.
void browser_window_destroy(struct browser_window *bw)
Close and destroy a browser window.
static nserror browser_window__handle_bad_certs(struct browser_window *bw, nsurl *url)
Handle a certificate verification request (BAD_CERTS) during a fetch.
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.
static nserror browser_window__unpack_userpass(const char *userpass, char **username_out, char **password_out)
Unpack a "username:password" to components.
static nserror navigate_internal_query_ssl(struct browser_window *bw, struct browser_fetch_parameters *params)
Internal navigation handler for the SSL/privacy query page.
static nserror browser_window_set_scroll(struct browser_window *bw, const struct rect *rect)
Set the scroll position of a browser window.
nserror browser_window_navigate_up(struct browser_window *bw, bool new_window)
Navigate to a browser_window's parent URL.
nserror browser_window_reload(struct browser_window *bw, bool all)
Reload the page in a browser window.
nserror browser_window_get_dimensions(struct browser_window *bw, int *width, int *height)
Get the dimensions of the area a browser window occupies.
static void browser_window_set_selection(struct browser_window *bw, bool selection, bool read_only)
Set or remove a selection.
static nserror navigate_internal_query_timeout(struct browser_window *bw, struct browser_fetch_parameters *params)
Internal navigation handler for the timeout query page.
nserror browser_window_destroy_internal(struct browser_window *bw)
Release all memory associated with a browser window.
bool browser_window_reload_available(struct browser_window *bw)
Check availability of Reload action for a given browser window.
static bool frag_scroll(struct browser_window *bw)
scroll to a fragment if present
bool browser_window_forward_available(struct browser_window *bw)
Check availability of Forward action for a given browser window.
nserror browser_window_invalidate_rect(struct browser_window *bw, struct rect *rect)
Cause an area of a browser window to be marked invalid and hence redrawn.
void browser_window_set_dimensions(struct browser_window *bw, int width, int height)
Set the dimensions of the area a browser window occupies.
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.
nserror browser_window_get_url(struct browser_window *bw, bool fragment, nsurl **url_out)
Access a browser window's URL.
static bool is_internal_navigate_url(nsurl *url)
Check if this is an internal navigation URL.
#define SCALE_MAXIMUM
largests scale that can be applied to a browser window
const char * browser_window_get_title(struct browser_window *bw)
Get the title of a browser_window.
static void browser_window_convert_to_download(struct browser_window *bw, llcache_handle *stream)
Transfer the loading_content to a new download window.
static void browser_window_mouse_click_internal(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Process mouse click event.
int browser_window_get_cookie_count(const struct browser_window *bw)
Get the number of cookies in use for the current page.
static nserror browser_window__handle_timeout(struct browser_window *bw, nsurl *url)
Handle a timeout during a fetch.
#define FRAME_DEPTH
maximum frame depth
nserror browser_window_get_extents(struct browser_window *bw, bool scaled, int *width, int *height)
Get a browser window's content extents.
void browser_window_stop(struct browser_window *bw)
Stop all fetching activity in a browser window.
bool browser_window_is_frameset(struct browser_window *bw)
Find out if a browser window contains a frameset.
static nserror browser_window_callback(hlcache_handle *c, const hlcache_event *event, void *pw)
Browser window content event callback handler.
nserror browser_window__reload_current_parameters(struct browser_window *bw)
Navigate a browser window to the current parameters.
nserror browser_window_set_scale(struct browser_window *bw, float scale, bool absolute)
Sets the scale of a browser window.
struct history * browser_window_get_history(struct browser_window *bw)
Get a browser window's history object.
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.
nserror browser_window_navigate(struct browser_window *bw, nsurl *url, nsurl *referrer, enum browser_window_nav_flags flags, char *post_urlenc, struct fetch_multipart_data *post_multipart, hlcache_handle *parent)
Start fetching a page in a browser window.
static nserror browser_window__handle_login(struct browser_window *bw, const char *realm, nsurl *url)
Handle login request (BAD_AUTH) during fetch.
static void browser_window_update(struct browser_window *bw, bool scroll_to_top)
Redraw browser window, set extent to content, and update title.
static nserror navigate_internal_query_fetcherror(struct browser_window *bw, struct browser_fetch_parameters *params)
Internal navigation handler for the fetch error query page.
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.
nserror browser_window_set_name(struct browser_window *bw, const char *name)
Set a browsing contexts name.
browser_window_page_info_state browser_window_get_page_info_state(const struct browser_window *bw)
Request the current browser window page info state.
struct hlcache_handle * browser_window_get_content(struct browser_window *bw)
Get a cache handle for the content within a browser window.
static void browser_window_find_target_internal(struct browser_window *bw, const char *target, int depth, struct browser_window *page, int *rdepth, struct browser_window **bw_target)
Find browser window.
#define SCALE_MINIMUM
smallest scale that can be applied to a browser window
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.
static nserror browser_window__navigate_internal(struct browser_window *bw, struct browser_fetch_parameters *params)
dispatch to internal query handlers or normal navigation
static bool browser_window_drop_file_at_point_internal(struct browser_window *bw, int x, int y, char *file)
allows a dragged file to be dropped into a browser window at a position
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.
static void browser_window_mouse_drag_end(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handles the end of a drag operation in a browser window.
bool browser_window_stop_available(struct browser_window *bw)
Check availability of Stop action for a given browser window.
static nserror browser_window_stop_throbber(struct browser_window *bw)
Stop the busy indicator.
static nserror browser_window_content_done(struct browser_window *bw)
handle message for content done on browser window
static int get_vert_scrollbar_len(struct browser_window *bw)
Get browser window vertical scrollbar widget length.
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.
static nserror navigate_internal_real(struct browser_window *bw, struct browser_fetch_parameters *params)
Internal navigation handler for normal fetches.
static nserror browser_window_download(struct browser_window *bw, nsurl *url, nsurl *nsref, uint32_t fetch_flags, bool fetch_is_post, llcache_post_data *post)
implements the download operation of a window navigate
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 t...
static void browser_window_destroy_children(struct browser_window *bw)
Close and destroy all child browser window.
void browser_window_set_status(struct browser_window *bw, const char *text)
Change the status bar of a browser window.
struct browser_window * browser_window_get_root(struct browser_window *bw)
Get the root level browser window.
static void browser_window__free_fetch_parameters(struct browser_fetch_parameters *params)
Free the stored fetch parameters.
static nserror browser_window_update_favicon(hlcache_handle *c, struct browser_window *bw, struct content_rfc5988_link *link)
update the favicon associated with the browser window
browser_drag_type browser_window_get_drag_type(struct browser_window *bw)
Get type of any current drag for a browser window.
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.
void browser_window_set_pointer(struct browser_window *bw, browser_pointer_shape shape)
Change the shape of the mouse pointer.
void browser_window_set_gadget_filename(struct browser_window *bw, struct form_control *gadget, const char *fn)
set filename on form control.
Browser window creation and manipulation interface.
browser_drag_type
type of browser window drag in progess
@ DRAGGING_CONTENT_SCROLLBAR
@ BW_EDITOR_CAN_PASTE
Can paste, input.
@ BW_EDITOR_NONE
No selection, no editing.
@ BW_EDITOR_CAN_CUT
Selection not read-only.
@ BW_EDITOR_CAN_COPY
Have selection.
browser_window_page_info_state
Browser window page information states.
@ PAGE_STATE_INSECURE
Insecure page load.
@ PAGE_STATE_UNKNOWN
Unable to determine.
@ PAGE_STATE_SECURE_ISSUES
Secure load, but has insecure elements.
@ PAGE_STATE_SECURE
Secure load.
@ PAGE_STATE_SECURE_OVERRIDE
Secure load, but had to override.
@ PAGE_STATE_LOCAL
Page loaded from file:/// etc.
@ PAGE_STATE_INTERNAL
Page loaded from internal handler.
browser_window_create_flags
flags to browser_window_create
@ 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_FOREGROUND
Request foreground opening.
@ BW_CREATE_CLONE
New gui_window to be clone of "existing" gui_window.
@ BW_CREATE_FOCUS_LOCATION
Request location bar focus.
@ BW_CREATE_UNVERIFIABLE
Window not opened by user interaction (e.g.
browser_window_nav_flags
flags to browser_window_navigate
@ BW_NAVIGATE_DOWNLOAD
download rather than render the uri
@ BW_NAVIGATE_HISTORY
this will form a new history node (don't set for back/reload/etc)
@ BW_NAVIGATE_NO_TERMINAL_HISTORY_UPDATE
suppress initial history updates (used by back/fwd/etc)
@ BW_NAVIGATE_NONE
No flags set.
@ BW_NAVIGATE_UNVERIFIABLE
Transation not caused by user interaction (e.g.
@ BW_NAVIGATE_INTERNAL
Internal navigation (set only by core features using such)
static uint32_t count(const http_directive *list, lwc_string *key)
browser_window_console_source
Sources of messages which end up in the browser window console.
@ BW_CS_SCRIPT_CONSOLE
Logging from some running script.
@ BW_CS_INPUT
Input from the client.
@ BW_CS_SCRIPT_ERROR
Error from some running script.
browser_window_console_flags
Flags for browser window console logging.
@ BW_CS_FLAG_LEVEL_LOG
Logged at the 'log' level, please only use one of the LEVEL flags.
@ BW_CS_FLAG_LEVEL_DEBUG
Logged at the 'debug' level, please use only one of the LEVEL flags.
@ BW_CS_FLAG_LEVEL_INFO
Logged at the 'info' level, please use only one of the LEVEL flags.
@ BW_CS_FLAG_LEVEL_MASK
Mask for the error level to allow easy comparison using the above.
@ BW_CS_FLAG_LEVEL_WARN
Logged at the 'warn' level, please use only one of the LEVEL flags.
@ BW_CS_FLAG_LEVEL_ERROR
Logged at the 'error' level, please use only one of the LEVEL flags.
Content handling interface.
nserror fetch_multipart_data_new_kv(struct fetch_multipart_data **list, const char *name, const char *value)
Create an entry for a fetch_multipart_data.
const char * fetch_multipart_data_find(const struct fetch_multipart_data *list, const char *name)
Find an entry in a fetch_multipart_data.
struct fetch_multipart_data * fetch_multipart_data_clone(const struct fetch_multipart_data *list)
Clone a linked list of fetch_multipart_data.
void fetch_multipart_data_destroy(struct fetch_multipart_data *list)
Free a linked list of fetch_multipart_data.
char * content_get_selection(hlcache_handle *h)
Get a text selection from a content.
bool content_get_quirks(hlcache_handle *h)
Retrieve quirkiness of a content.
nserror content_debug_dump(struct hlcache_handle *h, FILE *f, enum content_debug op)
Dump debug information to file.
bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen)
Execute some JavaScript code inside a content object.
bool content_is_locked(hlcache_handle *h)
Return whether a content is currently locked.
struct content_rfc5988_link * content_find_rfc5988_link(hlcache_handle *h, lwc_string *rel)
find link in content that matches the rel string.
void content_mouse_action(hlcache_handle *h, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle mouse clicks and movements in a content window.
void content_clear_selection(hlcache_handle *h)
Tell a content that any selection it has, or one of its objects has, must be cleared.
nserror content_close(hlcache_handle *h)
The window containing the content has been closed.
bool content_saw_insecure_objects(struct hlcache_handle *h)
Determine if the content referred to any insecure objects.
bool content_scroll_at_point(struct hlcache_handle *h, int x, int y, int scrx, int scry)
scroll content at coordnate
nserror content_get_contextual_content(struct hlcache_handle *h, int x, int y, struct browser_window_features *data)
Get positional contextural information for a content.
void content_mouse_track(hlcache_handle *h, struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle mouse movements in a content window.
bool content_can_reformat(hlcache_handle *h)
Get whether a content can reformat.
bool content_drop_file_at_point(struct hlcache_handle *h, int x, int y, char *file)
Drag and drop a file at coordinate.
void content_reformat(hlcache_handle *h, bool background, int width, int height)
Reformat to new size.
nsurl * content_get_refresh_url(hlcache_handle *h)
Retrieve the refresh URL for a content.
const char * content_get_status_message(hlcache_handle *h)
Retrieve status message associated with content.
nserror content_open(hlcache_handle *h, struct browser_window *bw, struct content *page, struct object_params *params)
A window containing the content has been opened.
content_status content_get_status(hlcache_handle *h)
Retrieve status of content.
Interface to content handling debug.
@ CONTENT_STATUS_READY
Some parts of content still being loaded, but can be displayed.
@ CONTENT_STATUS_DONE
Content has completed all processing.
content_type
The type of a content.
@ CONTENT_IMAGE
All images.
@ CONTENT_ANY
Any content matches.
@ CONTENT_THEME
RISC OS themes content.
@ CONTENT_HTML
content is HTML
@ CONTENT_TEXTPLAIN
content is plain text
@ CONTENT_MSG_TEXTSEARCH
A free text search action has occurred.
@ CONTENT_MSG_LINK
RFC5988 link.
@ CONTENT_MSG_SELECTMENU
Create a select menu.
@ CONTENT_MSG_REFRESH
wants refresh
@ CONTENT_MSG_GETDIMS
Get viewport dimensions.
@ CONTENT_MSG_GADGETCLICK
A gadget has been clicked on (mainly for file)
@ CONTENT_MSG_STATUS
new status string
@ CONTENT_MSG_SCROLL
Request to scroll content.
@ CONTENT_MSG_LOG
Content wishes to log something.
@ CONTENT_MSG_DONE
content has finished processing
@ CONTENT_MSG_DOWNLOAD
download, not for display
@ CONTENT_MSG_LOADING
fetching or converting
@ CONTENT_MSG_ERROR
error occurred
@ CONTENT_MSG_REDIRECT
fetch url redirect occured
@ CONTENT_MSG_DRAGSAVE
Allow drag saving of content.
@ CONTENT_MSG_POINTER
Wants a specific mouse pointer set.
@ CONTENT_MSG_SELECTION
A selection made or cleared.
@ CONTENT_MSG_SSL_CERTS
Content is from SSL and this is its chain.
@ CONTENT_MSG_DRAG
A drag started or ended.
@ CONTENT_MSG_GETTHREAD
Javascript thread.
@ CONTENT_MSG_REDRAW
needs redraw (eg.
@ CONTENT_MSG_READY
may be displayed
@ CONTENT_MSG_SAVELINK
Allow URL to be saved.
@ CONTENT_MSG_REFORMAT
content_reformat done
@ CONTENT_MSG_CARET
Caret movement / hiding.
content_debug
Debugging dump operations.
@ CONTENT_ENCODING_NORMAL
The content encoding.
Useful interned string pointers (interface).
nserror download_context_create(llcache_handle *llcache, struct gui_window *parent)
Create a download context.
Core download context (interface)
nserror global_history_add(nsurl *url)
Add an entry to the global history.
void hotlist_update_url(nsurl *url)
Update given URL, e.g.
nserror
Enumeration of error codes.
@ NSERROR_TIMEOUT
Operation timed out.
@ NSERROR_NOT_FOUND
Requested item not found.
@ NSERROR_BAD_CONTENT
Bad Content.
@ NSERROR_BAD_AUTH
Fetch needs authentication data.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_BAD_PARAMETER
Bad Parameter.
@ NSERROR_BAD_CERTS
Fetch needs certificate chain check.
@ NSERROR_NO_FETCH_HANDLER
No fetch handler for URL scheme.
@ NSERROR_NEED_DATA
More data needed.
@ NSERROR_FRAME_DEPTH
Exceeded frame depth.
@ NSERROR_INVALID
Invalid data.
@ NSERROR_NOMEM
Memory exhaustion.
static struct directory * root
nserror browser_window_destroy_iframes(struct browser_window *bw)
Destroy iframes opened in browser_window_create_iframes()
void browser_window_recalculate_frameset(struct browser_window *bw)
Recalculate frameset positions following a resize.
void browser_window_recalculate_iframes(struct browser_window *bw)
Recalculate iframe positions following a resize.
void browser_window_handle_scrollbars(struct browser_window *bw)
Create, remove, and update browser window scrollbars.
nserror browser_window_create_iframes(struct browser_window *bw)
Create and open iframes for a browser window.
nserror browser_window_invalidate_iframe(struct browser_window *bw)
Invalidate an iframe causing a redraw.
void browser_window_resize_frame(struct browser_window *bw, int x, int y)
Resize a browser window that is a frame.
nserror browser_window_create_frameset(struct browser_window *bw)
Create and open a frameset for a browser window.
Frame and frameset creation and manipulation (interface).
struct netsurf_table * guit
The global interface table.
Interface to core interface table.
struct content * hlcache_handle_get_content(const hlcache_handle *handle)
Retrieve a content object from a cache handle.
nserror hlcache_handle_abort(hlcache_handle *handle)
Abort a high-level cache fetch.
nserror hlcache_handle_release(hlcache_handle *handle)
Release a high-level cache handle.
nserror hlcache_handle_retrieve(nsurl *url, uint32_t flags, nsurl *referer, llcache_post_data *post, hlcache_handle_callback cb, void *pw, hlcache_child_context *child, content_type accepted_types, hlcache_handle **result)
Retrieve a high-level cache handle for an object.
High-level resource cache interface.
@ HLCACHE_RETRIEVE_SNIFF_TYPE
@ HLCACHE_RETRIEVE_MAY_DOWNLOAD
It's permitted to convert this request into a download.
struct html_stylesheet * html_get_stylesheets(hlcache_handle *h, unsigned int *n)
Retrieve stylesheets used by HTML document.
const char * html_get_base_target(hlcache_handle *h)
Retrieve an HTML content's base target.
bool html_get_id_offset(hlcache_handle *h, lwc_string *frag_id, int *x, int *y)
Retrieve layout coordinates of box with given id.
void html_set_file_gadget_filename(struct hlcache_handle *hl, struct form_control *gadget, const char *fn)
set filename on a file gadget
Interface to text/html content handler.
struct content_html_object * html_get_objects(struct hlcache_handle *h, unsigned int *n)
Retrieve objects used by HTML document.
Public content interface.
bool content_redraw(struct hlcache_handle *h, struct content_redraw_data *data, const struct rect *clip, const struct redraw_context *ctx)
Display content on screen with optional tiling.
struct nsurl * hlcache_handle_get_url(const struct hlcache_handle *handle)
Retrieve the URL associated with a high level cache handle.
const char * content_get_title(struct hlcache_handle *h)
Retrieve title associated with content.
int content_get_height(struct hlcache_handle *h)
Retrieve height of content.
int content_get_width(struct hlcache_handle *h)
Retrieve width of content.
void content_invalidate_reuse_data(struct hlcache_handle *h)
Invalidate content reuse data.
const char * content_get_encoding(struct hlcache_handle *h, enum content_encoding_type op)
Retrieve the encoding of a content.
content_type content_get_type(struct hlcache_handle *h)
Retrieve computed type of content.
Interface to platform-specific miscellaneous browser operation table.
browser_pointer_shape
Mouse pointer type.
@ BROWSER_POINTER_DEFAULT
browser_mouse_state
Mouse state: 1 is primary mouse button.
@ BROWSER_MOUSE_CLICK_2
button 2 clicked.
@ BROWSER_MOUSE_CLICK_1
button 1 clicked.
@ BROWSER_MOUSE_MOD_2
2nd modifier key pressed (eg.
@ BROWSER_MOUSE_DRAG_1
start of button 1 drag
@ BROWSER_MOUSE_DRAG_2
start of button 2 drag
Target independent plotting interface.
Interface to platform-specific search operations.
Interface to platform-specific graphical user interface window operations.
gui_window_create_flags
Window creation control flags.
@ GW_CREATE_NONE
New window.
@ GW_CREATE_TAB
Create tab in same window as existing.
@ GW_CREATE_FOREGROUND
Request this window/tab is foregrounded.
@ GW_CREATE_FOCUS_LOCATION
@ GW_CREATE_CLONE
Clone existing window.
@ GW_EVENT_SCROLL_START
Starts drag scrolling of a browser window.
@ GW_EVENT_PAGE_INFO_CHANGE
Page status has changed and so the padlock should be updated.
@ GW_EVENT_NEW_CONTENT
Called when the gui_window has new content.
@ GW_EVENT_STOP_THROBBER
stop the navigation throbber.
@ GW_EVENT_UPDATE_EXTENT
Update the extent of the inside of a browser window to that of the current content.
@ GW_EVENT_START_THROBBER
start the navigation throbber.
Interface to javascript engine functions.
void js_destroyheap(jsheap *heap)
Destroy a previously created heap.
nserror js_newheap(int timeout, jsheap **heap)
Create a new javascript heap.
nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **thread)
Create a new javascript thread.
bool knockout_plot_end(const struct redraw_context *ctx)
End a knockout plotting session.
bool knockout_plot_start(const struct redraw_context *ctx, struct redraw_context *knk_ctx)
Start a knockout plotting session.
Knockout rendering (interface).
nserror llcache_handle_abort(llcache_handle *handle)
Abort a low-level fetch, informing all users of this action.
nserror llcache_handle_retrieve(nsurl *url, uint32_t flags, nsurl *referer, const llcache_post_data *post, llcache_handle_callback cb, void *pw, llcache_handle **result)
Retrieve a handle for a low-level cache object.
nserror llcache_handle_release(llcache_handle *handle)
Release a low-level cache handle.
@ LLCACHE_RETRIEVE_STREAM_DATA
@ LLCACHE_RETRIEVE_VERIFIABLE
Requested URL was verified.
@ LLCACHE_RETRIEVE_FORCE_FETCH
Force a new fetch.
#define NSLOG(catname, level, logmsg, args...)
const char * messages_get_errorcode(nserror code)
lookup of a message by errorcode from the standard Messages hash.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
const char * messages_get_sslcode(ssl_cert_err code)
lookup of a message by SSL error code from the standard Messages hash.
Localised message support (interface).
bool nsurl_compare(const nsurl *url1, const nsurl *url2, nsurl_component parts)
Compare two URLs.
nserror nsurl_create(const char *const url_s, nsurl **url)
Create a NetSurf URL object from a URL string.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
nserror nsurl_refragment(const nsurl *url, lwc_string *frag, nsurl **new_url)
Create a NetSurf URL object, adding a fragment to an existing URL object.
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
bool nsurl_has_component(const nsurl *url, nsurl_component part)
Enquire about the existence of componenets in a given URL.
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
lwc_string * nsurl_get_component(const nsurl *url, nsurl_component part)
Get part of a URL as a lwc_string, from a NetSurf URL object.
nserror nsurl_join(const nsurl *base, const char *rel, nsurl **joined)
Join a base url to a relative link part, creating a new NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
nserror nsurl_parent(const nsurl *url, nsurl **new_url)
Create a NetSurf URL object for URL with parent location of an existing URL.
plot_style_t * plot_style_fill_white
ssl_cert_err
ssl certificate error status
@ SSL_CERT_ERR_OK
Nothing wrong with this certificate.
@ SSL_CERT_ERR_UNKNOWN
Unknown error.
nserror cert_chain_dup(const struct cert_chain *src, struct cert_chain **dst_out)
duplicate a certificate chain
nserror cert_chain_free(struct cert_chain *chain)
free a certificate chain
nserror cert_chain_to_query(struct cert_chain *chain, struct nsurl **url_out)
create a fetch query string from a certificate chain
Interface to utility string handling.
The parameters for a fetch.
struct nsurl * url
The URL to fetch.
enum browser_window_nav_flags flags
Navigation flags.
char * parent_charset
Optional parent character set.
bool parent_quirks
Optional parent quirks.
struct fetch_multipart_data * post_multipart
Multipart post data.
char * post_urlenc
URL encoded post data.
struct nsurl * referrer
Optional refererer.
Page features at a specific spatial location.
struct hlcache_handle * object
Object at position or NULL.
struct hlcache_handle * main
handle of top level content.
enum browser_window_features::@56 form_features
type of form feature.
struct nsurl * link
URL of a link or NULL.
struct browser_fetch_parameters loading_parameters
The fetch parameters for the loading content.
@ BROWSER_WINDOW_FRAMESET
browser_scrolling scrolling
struct browser_window * iframes
struct scrollbar * scroll_x
Horizontal scroll.
struct browser_window::@59 drag
Current drag status.
struct browser_window * bw
float scale
scale of window contents
int rows
frameset characteristics
struct browser_window::@58 favicon
Favicon.
char * text
Current status bar text.
int start_scroll_x
Scroll offsets at start of current scroll draw.
int match
Number of times an idempotent status-set operation was performed.
struct scrollbar * scroll_y
Vertical scroll.
int miss
Number of times status was really updated.
bool history_add
Add loading_content to the window history when it loads.
bool failed
flag to indicate favicon fetch already failed which prevents infinite error looping.
int iframe_count
[iframe_count] iframes
struct cert_chain * loading_cert_chain
The certificate chain for the loading content.
int refresh_interval
Refresh interval (-1 if undefined)
struct browser_window * parent
struct browser_window::@62 status
cache of the currently displayed status text.
struct cert_chain * current_cert_chain
The certificate chain for the current content.
lwc_string * frag_id
Fragment identifier for current_content.
uint64_t last_action
Last time a link was followed in this window.
struct hlcache_handle * current
content handle of current page favicon
struct gui_window * window
Platform specific window data only valid at top level.
int text_len
Length of the status::text buffer.
int start_x
Mouse position at start of current scroll drag.
bool no_resize
frame characteristics
bool throbbing
Busy indicator is active.
struct hlcache_handle * loading
content handle for favicon which we started loading early
struct history * history
local history handle.
struct jsheap * jsheap
current javascript context
struct browser_window * children
[cols * rows] children
browser_drag_type type
the type of drag in progress
struct hlcache_handle * current_content
Content handle of page currently displayed which must have READY or DONE status or NULL for no conten...
struct browser_window::@61 selection
Current selection.
bool internal_nav
Internal navigation, do not update URL etc.
char * name
frame name for targetting
struct hlcache_handle * loading_content
Content handle of page in process of being loaded or NULL if no page is being loaded.
enum browser_window::@60 browser_window_type
Window characteristics.
struct browser_fetch_parameters current_parameters
The fetch parameters for the current content.
struct browser_window * focus
browser window child of root browser window which has input focus
struct cert_chain::@57 certs[MAX_CERT_DEPTH]
size_t depth
the number of certificates in the chain
ssl_cert_err err
Whatever is wrong with this certificate.
An object (img, object, etc.
struct hlcache_handle * content
Content, or 0.
parameters to content redraw
int height
vertical dimension
bool repeat_y
whether content is tiled in y direction
bool repeat_x
whether content is tiled in x direction
int y
coordinate for top-left of redraw
int x
coordinate for top-left of redraw
colour background_colour
The background colour.
int width
dimensions to render content at (for scaling contents with intrinsic dimensions)
float scale
Scale for redraw (for scaling contents without intrinsic dimensions)
lwc_string * rel
the link relationship - must be present
struct nsurl * href
the link href - must be present
Fetch POST multipart data.
nserror(* schedule)(int t, void(*callback)(void *p), void *p)
Schedule a callback.
nserror(* launch_url)(struct nsurl *url)
core has no fetcher for url
nserror(* login)(struct nsurl *url, const char *realm, const char *username, const char *password, nserror(*cb)(struct nsurl *url, const char *realm, const char *username, const char *password, void *pw), void *cbpw)
Retrieve username/password for a given url+realm if there is one stored in a frontend-specific way (e...
nserror(* present_cookies)(const char *search_term)
Request that the cookie manager be displayed.
void(* back_state)(bool active, void *p)
activate search back button in gui
void(* add_recent)(const char *string, void *p)
add search string to recent searches list front has full liberty how to implement the bare notificati...
void(* forward_state)(bool active, void *p)
activate search forwards button in gui
void(* status)(bool found, void *p)
Change the displayed search status.
void(* hourglass)(bool active, void *p)
display hourglass while searching.
nserror(* get_dimensions)(struct gui_window *gw, int *width, int *height)
Find the current dimensions of a browser window's content area.
void(* set_title)(struct gui_window *gw, const char *title)
Set the title of a window.
nserror(* set_scroll)(struct gui_window *gw, const struct rect *rect)
Set the scroll position of a browser window.
bool(* drag_start)(struct gui_window *g, gui_drag_type type, const struct rect *rect)
start a drag operation within a window
void(* set_pointer)(struct gui_window *g, enum gui_pointer_shape shape)
Change mouse pointer shape.
nserror(* save_link)(struct gui_window *g, struct nsurl *url, const char *title)
save link operation
void(* set_icon)(struct gui_window *gw, struct hlcache_handle *icon)
Set a favicon for a gui window.
nserror(* invalidate)(struct gui_window *gw, const struct rect *rect)
Invalidate an area of a window.
nserror(* event)(struct gui_window *gw, enum gui_window_event event)
Miscellaneous event occurred for a window.
void(* destroy)(struct gui_window *gw)
Destroy previously created gui window.
bool(* get_scroll)(struct gui_window *gw, int *sx, int *sy)
Get the scroll position of a browser window.
void(* create_form_select_menu)(struct gui_window *gw, struct form_control *control)
create a form select menu
void(* drag_save_object)(struct gui_window *gw, struct hlcache_handle *c, gui_save_type type)
object dragged to window
void(* console_log)(struct gui_window *gw, browser_window_console_source src, const char *msg, size_t msglen, browser_window_console_flags flags)
console logging happening.
struct gui_window *(* create)(struct browser_window *bw, struct gui_window *existing, gui_window_create_flags flags)
Create and open a gui window for a browsing context.
nserror(* set_url)(struct gui_window *gw, struct nsurl *url)
Set the navigation url.
void(* set_status)(struct gui_window *g, const char *text)
Set the status bar message of a browser window.
void(* file_gadget_open)(struct gui_window *gw, struct hlcache_handle *hl, struct form_control *gadget)
Called when file chooser gadget is activated.
History tree for a window.
struct history_entry * current
Current position in tree.
Context for retrieving a child object.
bool quirks
Whether parent is quirky.
const char * charset
Charset of parent.
content_msg type
Event type.
union content_msg_data data
Event data.
Container for stylesheets used by an HTML document.
Handle to low-level cache object.
POST data object for low-level cache requests.
struct fetch_multipart_data * multipart
Multipart data.
enum llcache_post_data::@122 type
Type of POST data.
union llcache_post_data::@123 data
POST data content.
char * urlenc
URL encoded data.
struct gui_misc_table * misc
Browser table.
struct gui_search_table * search
Page search table.
struct gui_window_table * window
Window table.
bool option_knockout
flag to enable knockout rendering.
nserror(* rectangle)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle)
Plots a rectangle.
nserror(* clip)(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
const struct plotter_table * plot
Current plot operation table.
void browser_window_remove_caret(struct browser_window *bw, bool only_hide)
Removes the caret and callback for key process.
void browser_window_place_caret(struct browser_window *bw, int x, int y, int height, const struct rect *clip)
Position the caret and assign a callback for key presses.
Textual input handling interface.
void theme_install_start(struct hlcache_handle *c)
Handle a CONTENT_THEME that has started loading.
struct content_msg_data::@103 scroll
CONTENT_MSG_SCROLL - Part of content to scroll to show.
browser_window_console_flags flags
The flags of the logging.
const char * msg
The message to log.
const struct rect * clip
Carret clip rect.
struct content_msg_data::@111 textsearch
CONTENT_MSG_TEXTSEARCH - Free text search action.
struct content_msg_data::@110 gadget_click
CONTENT_MSG_GADGETCLICK - User clicked on a form gadget.
size_t msglen
The length of that message.
browser_pointer_shape pointer
CONTENT_MSG_POINTER - Mouse pointer to set.
struct content_msg_data::@107 caret
CONTENT_MSG_CARET - set caret position or, hide caret.
struct content_msg_data::@105 savelink
CONTENT_MSG_SAVELINK - Save a URL.
bool selection
false for selection cleared
const struct cert_chain * chain
CONTENT_MSG_SSL_CERTS - The certificate chain from the underlying fetch.
struct content_rfc5988_link * rfc5988_link
CONTENT_MSG_RFC5988_LINK - rfc5988 link data.
struct nsurl * to
Redirect target.
struct content_msg_data::@104 dragsave
CONTENT_MSG_DRAGSAVE - Drag save a content.
unsigned * viewport_height
struct content_msg_data::@108 drag
CONTENT_MSG_DRAG - Drag start or end.
struct content_msg_data::@109 select_menu
CONTENT_MSG_SELECTMENU - Create select menu at pointer.
struct nsurl * from
Redirect origin.
struct content_msg_data::@98 log
CONTENT_MSG_LOG - Information for logging.
struct llcache_handle * download
CONTENT_MSG_DOWNLOAD - Low-level cache handle.
struct form_control * gadget
browser_window_console_source src
The source of the logging.
struct content_msg_data::@102 getdims
CONTENT_MSG_GETDIMS - Get the viewport dimensions.
bool state
state for operation
const char * string
search string
enum content_msg_data::@104::@112 type
struct content_msg_data::@100 redirect
CONTENT_MSG_REDIRECT - Redirect info.
void * ctx
context passed to browser_window_search()
const char * explicit_status_text
CONTENT_MSG_STATUS - Status message update.
struct content_msg_data::@107::@114 pos
With CONTENT_CARET_SET_POS.
bool background
CONTENT_MSG_REFORMAT - Reformat should not cause a redraw.
void urldb_set_cert_permissions(struct nsurl *url, bool permit)
Set certificate verification permissions.
nsurl * urldb_get_url(nsurl *url)
Extract an URL from the db.
nserror urldb_set_url_title(nsurl *url, const char *title)
Set an URL's title string, replacing any existing one.
bool urldb_add_url(nsurl *url)
Insert an URL into the database.
void urldb_set_auth_details(nsurl *url, const char *realm, const char *auth)
Set authentication data for an URL.
bool urldb_get_cert_permissions(nsurl *url)
Retrieve certificate verification permissions from database.
const char * urldb_get_auth_details(nsurl *url, const char *realm)
Look up authentication details in database.
nserror urldb_update_url_visit_data(nsurl *url)
Update an URL's visit data.
nserror urldb_set_url_content_type(nsurl *url, content_type type)
Set an URL's content type.
char * urldb_get_cookie(nsurl *url, bool include_http_only)
Retrieve cookies for an URL.
Unified URL information database internal interface.
Option reading and saving interface.
#define nsoption_int(OPTION)
Get the value of an integer option.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
static nserror text(const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.