139 if (gwt->
create == NULL) {
157 if (gwt->
event == NULL) {
285 const char *data,
unsigned int size)
291 const char *error_msg)
315 if (gdt->
create == NULL) {
318 if (gdt->
data == NULL) {
321 if (gdt->
error == NULL) {
324 if (gdt->
done == NULL) {
356 if (gct->
get == NULL) {
359 if (gct->
set == NULL) {
381 len = strlen(
string);
450 if (gst->
status == NULL) {
471 struct bitmap *provider_bitmap)
505 if (glt->
store == NULL) {
508 if (glt->
fetch == NULL) {
549 return (
int) socket(domain,
type, protocol);
602 if (gft->
mkpath == NULL) {
635 if (gbt->
create == NULL) {
671 if (gbt->
render == NULL) {
692 if (glt->
width == NULL) {
700 if (glt->
split == NULL) {
719 nsurl *url,
const char *realm,
720 const char *username,
const char *password,
722 const char *username,
723 const char *password,
757 if (gmt->
quit == NULL) {
763 if (gmt->
login == NULL) {
837 if (gt->
file == NULL) {
866 if (gt->
utf8 == NULL) {
Low-level source data cache backing store interface.
struct gui_llcache_table * null_llcache_table
static osspriteop_area * buffer
The buffer characteristics.
char * strndup(const char *s, size_t n)
Duplicate up to n characters of a string.
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.
Interface to core window handling.
core_window_drag_status
drag status passed to drag_status callback
Core download context (interface)
nserror save_pdf(const char *path)
nserror
Enumeration of error codes.
@ NSERROR_NOT_FOUND
Requested item not found.
@ NSERROR_INIT_FAILED
Initialisation failed.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_BAD_PARAMETER
Bad Parameter.
@ NSERROR_NO_FETCH_HANDLER
No fetch handler for URL scheme.
@ NSERROR_NOMEM
Memory exhaustion.
static int gui_default_socket_close(int fd)
static struct core_window_table default_corewindow_table
static void gui_default_status(bool found, void *p)
nserror netsurf_register(struct netsurf_table *gt)
Register operation table.
static nserror gui_default_window_save_link(struct gui_window *g, nsurl *url, const char *title)
static nserror gui_default_launch_url(struct nsurl *url)
static void gui_default_add_recent(const char *string, void *p)
static nserror verify_layout_register(struct gui_layout_table *glt)
verify layout table is valid
static nserror verify_window_register(struct gui_window_table *gwt)
verify window table is valid
static void gui_default_download_error(struct gui_download_window *dw, const char *error_msg)
static nserror verify_llcache_register(struct gui_llcache_table *glt)
verify low level cache persistant backing store table is valid
static nserror gui_default_get_resource_data(const char *path, const uint8_t **data, size_t *data_len)
static nserror gui_default_download_data(struct gui_download_window *dw, const char *data, unsigned int size)
static void gui_default_window_set_status(struct gui_window *g, const char *text)
static nsurl * gui_default_get_resource_url(const char *path)
static nserror verify_download_register(struct gui_download_table *gdt)
verify download window table is valid
static void gui_default_back_state(bool active, void *p)
static int gui_default_socket_open(int domain, int type, int protocol)
static nserror gui_default_utf8(const char *string, size_t len, char **result)
The default utf8 conversion implementation.
static nserror verify_corewindow_register(struct core_window_table *cwt)
verify corewindow window table is valid
static nserror verify_misc_register(struct gui_misc_table *gmt)
verify misc table is valid
static void gui_default_window_file_gadget_open(struct gui_window *g, hlcache_handle *hl, struct form_control *gadget)
static nserror verify_utf8_register(struct gui_utf8_table *gut)
verify clipboard table is valid
static nserror gui_default_release_resource_data(const uint8_t *data)
static nserror gui_default_corewindow_get_dimensions(const struct core_window *cw, int *width, int *height)
static struct gui_search_table default_search_table
static struct gui_clipboard_table default_clipboard_table
static struct gui_search_web_table default_search_web_table
static void gui_default_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
static void gui_default_window_place_caret(struct gui_window *g, int x, int y, int height, const struct rect *clip)
static char * gui_default_mimetype(const char *path)
static void gui_default_window_set_title(struct gui_window *g, const char *title)
static struct gui_utf8_table default_utf8_table
static void gui_default_quit(void)
static void gui_default_window_drag_save_selection(struct gui_window *g, const char *selection)
static void gui_default_window_create_form_select_menu(struct gui_window *g, struct form_control *control)
static nserror verify_search_web_register(struct gui_search_web_table *gswt)
verify search table is valid
static nserror gui_default_provider_update(const char *provider_name, struct bitmap *provider_bitmap)
struct netsurf_table * guit
The global interface table.
static void gui_default_window_drag_save_object(struct gui_window *g, hlcache_handle *c, gui_save_type type)
static void gui_default_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles)
static void gui_default_pdf_password(char **owner_pass, char **user_pass, char *path)
static nserror gui_default_corewindow_get_scroll(const struct core_window *cw, int *x, int *y)
static nserror gui_default_corewindow_dragstatus(struct core_window *cw, core_window_drag_status ds)
static nserror verify_file_register(struct gui_file_table *gft)
verify file table is valid
static nserror verify_search_register(struct gui_search_table *gst)
verify search table is valid
static struct gui_download_window * gui_default_download_create(download_context *ctx, struct gui_window *parent)
static void gui_default_window_set_icon(struct gui_window *g, hlcache_handle *icon)
static nserror gui_default_window_set_url(struct gui_window *g, struct nsurl *url)
static bool gui_default_window_drag_start(struct gui_window *g, gui_drag_type type, const struct rect *rect)
static nserror gui_default_401login_open(nsurl *url, const char *realm, const char *username, const char *password, nserror(*cb)(nsurl *url, const char *realm, const char *username, const char *password, void *pw), void *cbpw)
static nserror gui_default_present_cookies(const char *search_term)
static nserror gui_default_corewindow_set_extent(struct core_window *cw, int width, int height)
static nserror gui_default_corewindow_set_scroll(struct core_window *cw, int x, int y)
static void gui_default_get_clipboard(char **buffer, size_t *length)
static void gui_default_forward_state(bool active, void *p)
static struct gui_download_table default_download_table
static nserror verify_bitmap_register(struct gui_bitmap_table *gbt)
verify bitmap table is valid
static nserror gui_default_corewindow_invalidate(struct core_window *cw, const struct rect *rect)
static nserror verify_clipboard_register(struct gui_clipboard_table *gct)
verify clipboard table is valid
static void gui_default_console_log(struct gui_window *gw, browser_window_console_source src, const char *msg, size_t msglen, browser_window_console_flags flags)
static void gui_default_hourglass(bool active, void *p)
static void gui_default_download_done(struct gui_download_window *dw)
static nserror verify_fetch_register(struct gui_fetch_table *gft)
verify fetch table is valid
High-level resource cache interface.
Generic bitmap handling interface.
Interface to platform-specific clipboard operations.
Interface to platform-specific download operations.
Interface to platform-specific fetcher operations.
Interface to platform-specific layout operation table.
Interface to platform-specific miscellaneous browser operation table.
Interface to platform-specific search operations.
Interface to platform-specific utf8 operations.
Interface to platform-specific graphical user interface window operations.
internet structures and defines
NetSurf core interface registration, construction and destruction.
struct nsurl nsurl
NetSurf URL object.
core web search facilities interface.
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
Core user interface window function table.
nserror(* set_extent)(struct core_window *cw, int width, int height)
Update the logical extent of the window.
nserror(* get_dimensions)(const struct core_window *cw, int *width, int *height)
Get window viewport dimensions.
nserror(* drag_status)(struct core_window *cw, core_window_drag_status ds)
Inform corewindow owner of drag status.
nserror(* invalidate)(struct core_window *cw, const struct rect *rect)
Invalidate an area of a window.
nserror(* get_scroll)(const struct core_window *cw, int *x, int *y)
Get the current scroll offsets.
nserror(* set_scroll)(struct core_window *cw, int x, int y)
Scroll the window to given scroll offsets.
A context for a download.
void(* set_opaque)(void *bitmap, bool opaque)
Set the opacity of a bitmap.
int(* get_height)(void *bitmap)
Get the bitmap height.
void(* destroy)(void *bitmap)
Destroy a bitmap.
void *(* create)(int width, int height, enum gui_bitmap_flags flags)
Create a new bitmap.
nserror(* render)(struct bitmap *bitmap, struct hlcache_handle *content)
Render content into a bitmap.
int(* get_width)(void *bitmap)
Get the bitmap width.
size_t(* get_rowstride)(void *bitmap)
Get the number of bytes per row of the image.
bool(* get_opaque)(void *bitmap)
Get the opacity of a bitmap.
void(* modified)(void *bitmap)
Marks a bitmap as modified.
unsigned char *(* get_buffer)(void *bitmap)
Get the image buffer from a bitmap.
function table for clipboard operations.
void(* get)(char **buffer, size_t *length)
Core asks front end for clipboard contents.
void(* set)(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles)
Core tells front end to put given text in clipboard.
function table for download windows.
nserror(* data)(struct gui_download_window *dw, const char *data, unsigned int size)
void(* done)(struct gui_download_window *dw)
void(* error)(struct gui_download_window *dw, const char *error_msg)
struct gui_download_window *(* create)(struct download_context *ctx, struct gui_window *parent)
context for each download.
struct download_context * ctx
Associated context, or 0 if the fetch has completed or aborted.
function table for fetcher operations.
const char *(* filetype)(const char *unix_path)
Determine the MIME type of a local file.
nserror(* release_resource_data)(const uint8_t *data)
Releases source data.
char *(* mimetype)(const char *ro_path)
Find a MIME type for a local file.
nserror(* get_resource_data)(const char *path, const uint8_t **data, size_t *data_len)
Translate resource to source data.
struct nsurl *(* get_resource_url)(const char *path)
Translate resource to full url.
int(* socket_close)(int socket)
Close a socket.
int(* socket_open)(int domain, int type, int protocol)
Open a socket.
/brief function table for file and filename operations.
nserror(* basename)(const char *path, char **str, size_t *size)
Get the basename of a file.
nserror(* mkdir_all)(const char *fname)
Ensure that all directory elements needed to store a filename exist.
nserror(* nsurl_to_path)(struct nsurl *url, char **path)
Create a path from a nsurl.
nserror(* mkpath)(char **str, size_t *size, size_t nemb, va_list ap)
Generate a path from one or more component elemnts.
nserror(* path_to_nsurl)(const char *path, struct nsurl **url)
Create a nsurl from a path.
nserror(* position)(const struct plot_font_style *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
Find the position in a string where an x coordinate falls.
nserror(* width)(const struct plot_font_style *fstyle, const char *string, size_t length, int *width)
Measure the width of a string.
nserror(* split)(const struct plot_font_style *fstyle, const char *string, size_t length, int x, size_t *char_offset, int *actual_x)
Find where to split a string to make it fit a width.
low level cache backing store operation table
nserror(* initialise)(const struct llcache_store_parameters *parameters)
Initialise the backing store.
nserror(* store)(struct nsurl *url, enum backing_store_flags flags, uint8_t *data, const size_t datalen)
Place an object in the backing store.
nserror(* finalise)(void)
Finalise the backing store.
nserror(* invalidate)(struct nsurl *url)
Invalidate a source object from the backing store.
nserror(* release)(struct nsurl *url, enum backing_store_flags flags)
release a previously fetched or stored memory object.
nserror(* fetch)(struct nsurl *url, enum backing_store_flags flags, uint8_t **data, size_t *datalen)
Retrieve an object from the backing store.
Graphical user interface browser misc function table.
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...
void(* quit)(void)
called to allow the gui to cleanup.
nserror(* present_cookies)(const char *search_term)
Request that the cookie manager be displayed.
void(* pdf_password)(char **owner_pass, char **user_pass, char *path)
Prompt the user for a password for a PDF.
function table for page text search.
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.
Graphical user interface browser web search function table.
nserror(* provider_update)(const char *provider_name, struct bitmap *ico_bitmap)
called when the search provider details are updated.
User interface utf8 characterset conversion routines.
nserror(* local_to_utf8)(const char *string, size_t len, char **result)
Convert a string encoded in the system local encoding to UTF-8.
nserror(* utf8_to_local)(const char *string, size_t len, char **result)
Convert a UTF-8 encoded string into the system local encoding.
Graphical user interface window function table.
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(* drag_save_selection)(struct gui_window *gw, const char *selection)
drag selection save
void(* place_caret)(struct gui_window *g, int x, int y, int height, const struct rect *clip)
Place the caret in 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.
first entry in window list
NetSurf operation function table.
struct gui_misc_table * misc
Browser table.
struct gui_file_table * file
File table.
struct gui_search_table * search
Page search table.
struct gui_clipboard_table * clipboard
Clipboard table.
struct gui_fetch_table * fetch
Fetcher table.
struct gui_llcache_table * llcache
Low level cache table.
struct core_window_table * corewindow
Core window table.
struct gui_search_web_table * search_web
Web search table.
struct gui_window_table * window
Window table.
struct gui_bitmap_table * bitmap
Bitmap table.
struct gui_download_table * download
Download table.
struct gui_layout_table * layout
Layout table.
struct gui_utf8_table * utf8
UTF8 table.
struct gui_file_table * default_file_table
Default (posix) file operation table.
Default operations table for files.
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.