NetSurf
|
Graphical user interface window function table. More...
#include <window.h>
Data Fields | |
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. More... | |
void(* | destroy )(struct gui_window *gw) |
Destroy previously created gui window. More... | |
nserror(* | invalidate )(struct gui_window *gw, const struct rect *rect) |
Invalidate an area of a window. More... | |
bool(* | get_scroll )(struct gui_window *gw, int *sx, int *sy) |
Get the scroll position of a browser window. More... | |
nserror(* | set_scroll )(struct gui_window *gw, const struct rect *rect) |
Set the scroll position of a browser window. More... | |
nserror(* | get_dimensions )(struct gui_window *gw, int *width, int *height) |
Find the current dimensions of a browser window's content area. More... | |
nserror(* | event )(struct gui_window *gw, enum gui_window_event event) |
Miscellaneous event occurred for a window. More... | |
void(* | set_title )(struct gui_window *gw, const char *title) |
Set the title of a window. More... | |
nserror(* | set_url )(struct gui_window *gw, struct nsurl *url) |
Set the navigation url. More... | |
void(* | set_icon )(struct gui_window *gw, struct hlcache_handle *icon) |
Set a favicon for a gui window. More... | |
void(* | set_status )(struct gui_window *g, const char *text) |
Set the status bar message of a browser window. More... | |
void(* | set_pointer )(struct gui_window *g, enum gui_pointer_shape shape) |
Change mouse pointer shape. More... | |
void(* | place_caret )(struct gui_window *g, int x, int y, int height, const struct rect *clip) |
Place the caret in a browser window. More... | |
bool(* | drag_start )(struct gui_window *g, gui_drag_type type, const struct rect *rect) |
start a drag operation within a window More... | |
nserror(* | save_link )(struct gui_window *g, struct nsurl *url, const char *title) |
save link operation More... | |
void(* | create_form_select_menu )(struct gui_window *gw, struct form_control *control) |
create a form select menu More... | |
void(* | file_gadget_open )(struct gui_window *gw, struct hlcache_handle *hl, struct form_control *gadget) |
Called when file chooser gadget is activated. More... | |
void(* | drag_save_object )(struct gui_window *gw, struct hlcache_handle *c, gui_save_type type) |
object dragged to window More... | |
void(* | drag_save_selection )(struct gui_window *gw, const char *selection) |
drag selection save More... | |
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. More... | |
Graphical user interface window function table.
function table implementing window operations
void(* gui_window_table::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.
See browser_window_console_log
gw | The gui window receiving the logging. |
src | The source of the logging message |
msg | The text of the logging message |
msglen | The length of the text of the logging message |
flags | Flags associated with the logging. |
Definition at line 374 of file window.h.
Referenced by browser_window_console_log(), and verify_window_register().
struct gui_window *(* gui_window_table::create) (struct browser_window *bw, struct gui_window *existing, gui_window_create_flags flags) |
Create and open a gui window for a browsing context.
The implementing front end must create a context suitable for it to display a window referred to as the "gui window".
The frontend will be expected to request the core redraw areas of the gui window which have become invalidated either from toolkit expose events or as a result of a invalidate() call.
Most core operations used by the frontend concerning browser windows require passing the browser window context therefor the gui window must include a reference to the browser window passed here.
If GW_CREATE_CLONE flag is set existing is non-NULL.
bw | The core browsing context associated with the gui window |
existing | An existing gui_window, may be NULL. |
flags | flags to control the gui window creation. |
Definition at line 1 of file window.h.
Referenced by browser_window_create(), and verify_window_register().
void(* gui_window_table::create_form_select_menu) (struct gui_window *gw, struct form_control *control) |
create a form select menu
gw | The gui window to open select menu form gadget in. |
control | The form control gadget handle. |
Definition at line 335 of file window.h.
Referenced by browser_window_callback(), and verify_window_register().
void(* gui_window_table::destroy) (struct gui_window *gw) |
Destroy previously created gui window.
gw | The gui window to destroy. |
Definition at line 174 of file window.h.
Referenced by browser_window_destroy_internal(), and verify_window_register().
void(* gui_window_table::drag_save_object) (struct gui_window *gw, struct hlcache_handle *c, gui_save_type type) |
object dragged to window
gw | The gui window to save dragged object of. |
c | The content of the object. |
type | the type of save. |
Definition at line 353 of file window.h.
Referenced by browser_window_callback(), browser_window_mouse_click_internal(), and verify_window_register().
void(* gui_window_table::drag_save_selection) (struct gui_window *gw, const char *selection) |
drag selection save
gw | The gui window to save dragged selection of. |
selection | The selection to save. |
Definition at line 361 of file window.h.
Referenced by selection_click(), and verify_window_register().
bool(* gui_window_table::drag_start) (struct gui_window *g, gui_drag_type type, const struct rect *rect) |
start a drag operation within a window
g | window to start drag from. |
type | Type of drag to start |
rect | Confining rectangle of drag operation. |
Definition at line 317 of file window.h.
Referenced by browser_window_set_drag_type(), and verify_window_register().
nserror(* gui_window_table::event) (struct gui_window *gw, enum gui_window_event event) |
Miscellaneous event occurred for a window.
This is used to inform the frontend of window events which require no additional parameters.
gw | The gui window the event occurred for |
event | Which event has occurred. |
Definition at line 254 of file window.h.
Referenced by browser_window_content_ready(), browser_window_page_drag_start(), browser_window_remove_caret(), browser_window_start_throbber(), browser_window_stop_throbber(), browser_window_update_extent(), selection_click(), and verify_window_register().
void(* gui_window_table::file_gadget_open) (struct gui_window *gw, struct hlcache_handle *hl, struct form_control *gadget) |
Called when file chooser gadget is activated.
gw | The gui window to open file chooser in. |
hl | The content of the object. |
gadget | The form control gadget handle. |
Definition at line 344 of file window.h.
Referenced by browser_window_callback(), and verify_window_register().
nserror(* gui_window_table::get_dimensions) (struct gui_window *gw, int *width, int *height) |
Find the current dimensions of a browser window's content area.
This is used to determine the actual available drawing size in pixels. This allows contents that can be dynamically reformatted, such as HTML, to better use the available space.
gw | The gui window to measure content area of. |
width | receives width of window |
height | receives height of window |
Definition at line 241 of file window.h.
Referenced by browser_window_get_dimensions(), scheduled_reformat(), and verify_window_register().
bool(* gui_window_table::get_scroll) (struct gui_window *gw, int *sx, int *sy) |
Get the scroll position of a browser window.
gw | The gui window to obtain the scroll position from. |
sx | receives x ordinate of point at top-left of window |
sy | receives y ordinate of point at top-left of window |
Definition at line 205 of file window.h.
Referenced by browser_window_history_update(), browser_window_page_drag_start(), and verify_window_register().
nserror(* gui_window_table::invalidate) (struct gui_window *gw, const struct rect *rect) |
Invalidate an area of a window.
The specified area of the window should now be considered out of date. If the area is NULL the entire window must be invalidated. It is expected that the windowing system will then subsequently cause redraw/expose operations as necessary.
gw | The gui window to invalidate. |
rect | area to redraw or NULL for the entire window area |
Definition at line 194 of file window.h.
Referenced by browser_window_invalidate_rect(), browser_window_update(), and verify_window_register().
void(* gui_window_table::place_caret) (struct gui_window *g, int x, int y, int height, const struct rect *clip) |
Place the caret in a browser window.
g | window with caret |
x | coordinates of caret |
y | coordinates of caret |
height | height of caret |
clip | clip rectangle, or NULL if none |
Definition at line 307 of file window.h.
Referenced by browser_window_place_caret(), and verify_window_register().
nserror(* gui_window_table::save_link) (struct gui_window *g, struct nsurl *url, const char *title) |
save link operation
g | window to save link from. |
url | The link url. |
title | The title of the link. |
Definition at line 327 of file window.h.
Referenced by browser_window_callback(), and verify_window_register().
void(* gui_window_table::set_icon) (struct gui_window *gw, struct hlcache_handle *icon) |
Set a favicon for a gui window.
gw | window to update. |
icon | handle to object to use as icon. |
Definition at line 280 of file window.h.
Referenced by browser_window_favicon_callback(), navigate_internal_real(), and verify_window_register().
void(* gui_window_table::set_pointer) (struct gui_window *g, enum gui_pointer_shape shape) |
Change mouse pointer shape.
g | The gui window to change pointer shape in. |
shape | The new shape to change to. |
Definition at line 296 of file window.h.
Referenced by browser_window_set_pointer(), and verify_window_register().
nserror(* gui_window_table::set_scroll) (struct gui_window *gw, const struct rect *rect) |
Set the scroll position of a browser window.
scrolls the viewport to ensure the specified rectangle of the content is shown. If the rectangle is of zero size i.e. x0 == x1 and y0 == y1 the contents will be scrolled so the specified point in the content is at the top of the viewport. If the size of the rectangle is non zero the frontend may add padding or centre the defined area or it may simply align as in the zero size rectangle
gw | The gui window to scroll. |
rect | The rectangle to ensure is shown. |
Definition at line 224 of file window.h.
Referenced by browser_window_set_scroll(), and verify_window_register().
void(* gui_window_table::set_status) (struct gui_window *g, const char *text) |
Set the status bar message of a browser window.
g | gui_window to update |
text | new status text |
Definition at line 288 of file window.h.
Referenced by browser_window_set_status(), and verify_window_register().
void(* gui_window_table::set_title) (struct gui_window *gw, const char *title) |
Set the title of a window.
gw | The gui window to set title of. |
title | new window title |
Definition at line 264 of file window.h.
Referenced by browser_window_update(), and verify_window_register().
nserror(* gui_window_table::set_url) (struct gui_window *gw, struct nsurl *url) |
Set the navigation url.
gw | window to update. |
url | The url to use as icon. |
Definition at line 272 of file window.h.
Referenced by browser_window_refresh_url_bar_internal(), and verify_window_register().