25#ifndef NETSURF_BROWSER_WINDOW_H_
26#define NETSURF_BROWSER_WINDOW_H_
205 struct nsurl *referrer,
248 struct nsurl** url_out);
400 int x,
int y,
int scrx,
int scry);
414 int x,
int y,
char *file);
588 int *pos_x,
int *pos_y);
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.
browser_drag_type
type of browser window drag in progess
@ DRAGGING_CONTENT_SCROLLBAR
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.
bool browser_window_can_select(struct browser_window *bw)
Find out if given browser window content is selectable.
nserror browser_window_refresh_url_bar(struct browser_window *bw)
Update URL bar for a given browser window to bw's content's URL.
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.
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.
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.
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.
bool browser_window_has_content(struct browser_window *bw)
Find out if a browser window is currently showing a content.
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.
bool browser_window_exec(struct browser_window *bw, const char *src, size_t srclen)
Execute some JavaScript code in a browsing context.
nserror browser_window_get_scrollbar_type(struct browser_window *bw, browser_scrolling *h, browser_scrolling *v)
Get the browser window's scrollbar details.
nserror browser_window_debug(struct browser_window *bw, enum content_debug op)
Set debug options on a window.
nserror browser_window_get_url(struct browser_window *bw, bool fragment, struct nsurl **url_out)
Access a browser window's URL.
bool browser_window_can_search(struct browser_window *bw)
Find out if given browser window can be searched.
void browser_window_mouse_click(struct browser_window *bw, browser_mouse_state mouse, int x, int y)
Handle mouse clicks in a browser window.
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.
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.
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.
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.
@ 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.
struct nsurl * browser_window_access_url(const struct browser_window *bw)
Access a browser window's URL.
bool browser_window_reload_available(struct browser_window *bw)
Check availability of Reload action for a given browser window.
bool browser_window_forward_available(struct browser_window *bw)
Check availability of Forward action for a given browser window.
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__COUNT
Count of number of valid page states.
@ 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.
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.
const char * browser_window_get_title(struct browser_window *bw)
Get the title of a browser_window.
int browser_window_get_cookie_count(const struct browser_window *bw)
Get the number of cookies in use for the current page.
nserror browser_window_get_extents(struct browser_window *bw, bool scaled, int *width, int *height)
Get a browser window's content extents.
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.
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.
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.
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.
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.
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.
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.
@ BW_CREATE_NONE
No flags set.
bool browser_window_stop_available(struct browser_window *bw)
Check availability of Stop action for a given browser window.
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.
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...
nserror browser_window_get_name(struct browser_window *bw, const char **name)
Obtain a browsing contexts name.
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)
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 console stuff.
browser_window_console_source
Sources of messages which end up in the browser window console.
browser_window_console_flags
Flags for browser window console logging.
content_debug
Debugging dump operations.
nserror
Enumeration of error codes.
static struct directory * root
Core mouse and pointer states.
browser_pointer_shape
Mouse pointer type.
browser_mouse_state
Mouse state.
struct nsurl nsurl
NetSurf URL object.
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_window * bw
char * name
frame name for targetting
Fetch POST multipart data.
first entry in window list
History tree for a window.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.