NetSurf
Data Fields
gui_misc_table Struct Reference

Graphical user interface browser misc function table. More...

#include <misc.h>

Data Fields

nserror(* schedule )(int t, void(*callback)(void *p), void *p)
 Schedule a callback. More...
 
void(* quit )(void)
 called to allow the gui to cleanup. More...
 
nserror(* launch_url )(struct nsurl *url)
 core has no fetcher for url More...
 
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.g. More...
 
void(* pdf_password )(char **owner_pass, char **user_pass, char *path)
 Prompt the user for a password for a PDF. More...
 
nserror(* present_cookies )(const char *search_term)
 Request that the cookie manager be displayed. More...
 

Detailed Description

Graphical user interface browser misc function table.

function table implementing GUI interface to miscelaneous browser functionality

Definition at line 39 of file misc.h.

Field Documentation

◆ launch_url

nserror(* gui_misc_table::launch_url) (struct nsurl *url)

core has no fetcher for url

Definition at line 71 of file misc.h.

Referenced by browser_window_download(), navigate_internal_real(), and verify_misc_register().

◆ login

nserror(* gui_misc_table::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.g.

gnome-keyring)

To respond, call the callback with the url, realm, username, and password. Pass "" if the empty string is required.

To keep hold of the url, remember to nsurl_ref() it, and to keep the realm, you will need to strdup() it.

If the front end returns NSERROR_OK for this function, they may, at some future time, call the cb with cbpw callback exactly once.

If the front end returns other than NSERROR_OK, they should not call the cb callback.

The callback should not be called immediately upon receipt of this call as the browser window may not be reentered.

NOTE The lifetime of the cbpw is not well defined. In general do not use the cb if any browser window has navigated or been destroyed.

Parameters
urlThe URL being verified.
realmThe authorization realm.
usernameAny current username (or empty string).
passwordAny current password (or empty string).
cbCallback upon user decision.
cbpwContext pointer passed to cb
Returns
NSERROR_OK on sucess else error and cb never called

Definition at line 105 of file misc.h.

Referenced by browser_window__handle_login(), and verify_misc_register().

◆ pdf_password

void(* gui_misc_table::pdf_password) (char **owner_pass, char **user_pass, char *path)

Prompt the user for a password for a PDF.

Definition at line 117 of file misc.h.

Referenced by verify_misc_register().

◆ present_cookies

nserror(* gui_misc_table::present_cookies) (const char *search_term)

Request that the cookie manager be displayed.

Parameters
search_termThe search term to be set (NULL if no search)
Returns
NSERROR_OK on success

Definition at line 126 of file misc.h.

Referenced by browser_window_show_cookies(), and verify_misc_register().

◆ quit

void(* gui_misc_table::quit) (void)

called to allow the gui to cleanup.

Definition at line 66 of file misc.h.

Referenced by netsurf_exit(), and verify_misc_register().

◆ schedule

nserror(* gui_misc_table::schedule) (int t, void(*callback)(void *p), void *p)

Schedule a callback.

Parameters
tinterval before the callback should be made in ms or negative value to remove any existing callback.
callbackcallback function
puser parameter passed to callback function
Returns
NSERROR_OK on sucess or appropriate error on faliure

The callback function will be called as soon as possible after the timeout has elapsed.

Additional calls with the same callback and user parameter will reset the callback time to the newly specified value.

Definition at line 58 of file misc.h.

Referenced by browser_window_content_done(), browser_window_destroy_internal(), browser_window_schedule_reformat(), browser_window_stop(), cancel_dom_to_box(), convert_xml_to_box(), dom_to_box(), fetch_fdset(), fetch_start(), fetcher_poll(), finalise(), get_store_entry(), gif__animate(), gif_destroy(), gif_remove_user(), hlcache_clean(), hlcache_finalise(), hlcache_initialise(), hlcache_stop(), hotlist_fini(), hotlist_schedule_save(), html_css_free_stylesheets(), html_css_process_modified_styles(), html_css_update_style(), html_object_callback(), html_object_close_objects(), html_object_free_objects(), image_cache__background_update(), image_cache_fini(), image_cache_init(), llcache_fetch_callback(), llcache_finalise(), llcache_persist(), llcache_users_not_caught_up(), nsgtk_pi_mouse(), set_store_entry(), and verify_misc_register().


The documentation for this struct was generated from the following file: