NetSurf
|
Interface to browser history operations. More...
Go to the source code of this file.
Typedefs | |
typedef bool(* | browser_window_history_enumerate_cb) (const struct browser_window *bw, int x0, int y0, int x1, int y1, const struct history_entry *entry, void *user_data) |
Callback function type for history enumeration. More... | |
Functions | |
nserror | browser_window_history_back (struct browser_window *bw, bool new_window) |
Go back in the history. More... | |
nserror | browser_window_history_forward (struct browser_window *bw, bool new_window) |
Go forward in the history. More... | |
bool | browser_window_history_back_available (struct browser_window *bw) |
Check whether it is pssible to go back in the history. More... | |
bool | browser_window_history_forward_available (struct browser_window *bw) |
Check whether it is pssible to go forwards in the history. More... | |
nserror | browser_window_history_get_thumbnail (struct browser_window *bw, struct bitmap **bitmap_out) |
Get the thumbnail bitmap for the current history entry. More... | |
void | browser_window_history_enumerate (const struct browser_window *bw, browser_window_history_enumerate_cb cb, void *user_data) |
Enumerate all entries in the history. More... | |
void | browser_window_history_enumerate_forward (const struct browser_window *bw, browser_window_history_enumerate_cb cb, void *user_data) |
Enumerate all entries that will be reached by the 'forward' button. More... | |
void | browser_window_history_enumerate_back (const struct browser_window *bw, browser_window_history_enumerate_cb cb, void *user_data) |
Enumerate all entries that will be reached by the 'back' button. More... | |
struct nsurl * | browser_window_history_entry_get_url (const struct history_entry *entry) |
Returns the URL to a history entry. More... | |
const char * | browser_window_history_entry_get_fragment_id (const struct history_entry *entry) |
Returns the URL to a history entry. More... | |
const char * | browser_window_history_entry_get_title (const struct history_entry *entry) |
Returns the title of a history entry. More... | |
nserror | browser_window_history_go (struct browser_window *bw, struct history_entry *entry, bool new_window) |
Navigate to specified history entry, optionally in new window. More... | |
Interface to browser history operations.
The are operations on a browsing contexts history. These interfaces allow navigation forward and backwards in the history as well as enumerating the entries.
The local history viewing is distinct via corewindow defined in desktop/local_history.h
Definition in file browser_history.h.
typedef bool(* browser_window_history_enumerate_cb) (const struct browser_window *bw, int x0, int y0, int x1, int y1, const struct history_entry *entry, void *user_data) |
Callback function type for history enumeration.
bw | The browser window with history being enumerated |
x0,y0,x1,y1 | Coordinates of entry in history tree view |
entry | Current history entry |
Definition at line 96 of file browser_history.h.
nserror browser_window_history_back | ( | struct browser_window * | bw, |
bool | new_window | ||
) |
Go back in the history.
bw | A browser window to navigate the history in. |
new_window | whether to open in new window. |
Definition at line 518 of file browser_history.c.
References history_entry::back, browser_window__reload_current_parameters(), browser_window_history_go(), browser_window_navigate(), BW_NAVIGATE_HISTORY, history::current, browser_window::current_parameters, browser_window::history, browser_window::internal_nav, NSERROR_BAD_PARAMETER, and browser_fetch_parameters::url.
Referenced by ami_gui_history(), back_button_clicked_cb(), fb_leftarrow_click(), nsbeos_scaffolding_dispatch_event(), nsws_window_command(), ro_gui_window_menu_select(), ro_gui_window_toolbar_click(), and toolbar_back_click().
bool browser_window_history_back_available | ( | struct browser_window * | bw | ) |
Check whether it is pssible to go back in the history.
bw | A browser window to check the history navigation in. |
Definition at line 562 of file browser_history.c.
References history_entry::back, history::current, and browser_window::history.
Referenced by back_button_clicked_cb(), browser_window_back_available(), forward_button_clicked_cb(), nsbeos_scaffolding_dispatch_event(), nsbeos_window_update_back_forward(), nsgtk_toolbar_throbber(), nsws_window_command(), nsws_window_update_forward_back(), and scaffolding_update_context().
const char * browser_window_history_entry_get_fragment_id | ( | const struct history_entry * | entry | ) |
Returns the URL to a history entry.
entry | the history entry to retrieve the fragment id from |
Definition at line 700 of file browser_history.c.
References history_page::frag_id, and history_entry::page.
const char * browser_window_history_entry_get_title | ( | const struct history_entry * | entry | ) |
Returns the title of a history entry.
entry | The history entry to retrieve the title from |
Definition at line 708 of file browser_history.c.
References history_entry::page, and history_page::title.
struct nsurl * browser_window_history_entry_get_url | ( | const struct history_entry * | entry | ) |
Returns the URL to a history entry.
entry | the history entry to retrieve the URL from |
Definition at line 693 of file browser_history.c.
References nsurl_ref(), history_entry::page, and history_page::url.
void browser_window_history_enumerate | ( | const struct browser_window * | bw, |
browser_window_history_enumerate_cb | cb, | ||
void * | user_data | ||
) |
Enumerate all entries in the history.
Do not change the history while it is being enumerated.
bw | The browser window to enumerate history of |
cb | callback function |
user_data | context pointer passed to cb |
Definition at line 682 of file browser_history.c.
References browser_window_history__enumerate_entry(), browser_window::history, and history::start.
void browser_window_history_enumerate_back | ( | const struct browser_window * | bw, |
browser_window_history_enumerate_cb | cb, | ||
void * | user_data | ||
) |
Enumerate all entries that will be reached by the 'back' button.
bw | The browser window to enumerate history of |
cb | The callback function |
user_data | Data passed to the callback |
Definition at line 664 of file browser_history.c.
References history_entry::back, history::current, browser_window::history, LOCAL_HISTORY_HEIGHT, LOCAL_HISTORY_WIDTH, history_entry::x, and history_entry::y.
void browser_window_history_enumerate_forward | ( | const struct browser_window * | bw, |
browser_window_history_enumerate_cb | cb, | ||
void * | user_data | ||
) |
Enumerate all entries that will be reached by the 'forward' button.
bw | The browser window to enumerate history of |
cb | The callback function |
user_data | Data passed to the callback |
Definition at line 645 of file browser_history.c.
References history::current, history_entry::forward_pref, browser_window::history, LOCAL_HISTORY_HEIGHT, LOCAL_HISTORY_WIDTH, history_entry::x, and history_entry::y.
nserror browser_window_history_forward | ( | struct browser_window * | bw, |
bool | new_window | ||
) |
Go forward in the history.
bw | A browser window to navigate the history in. |
new_window | whether to open in new window. |
Definition at line 549 of file browser_history.c.
References browser_window_history_go(), history::current, history_entry::forward_pref, browser_window::history, and NSERROR_BAD_PARAMETER.
Referenced by ami_gui_history(), fb_rightarrow_click(), forward_button_clicked_cb(), nsbeos_scaffolding_dispatch_event(), nsws_window_command(), ro_gui_window_menu_select(), ro_gui_window_toolbar_click(), and toolbar_forward_click().
bool browser_window_history_forward_available | ( | struct browser_window * | bw | ) |
Check whether it is pssible to go forwards in the history.
bw | A browser window to check the history navigation in. |
Definition at line 570 of file browser_history.c.
References history::current, history_entry::forward_pref, and browser_window::history.
Referenced by back_button_clicked_cb(), browser_window_forward_available(), forward_button_clicked_cb(), nsbeos_scaffolding_dispatch_event(), nsbeos_window_update_back_forward(), nsgtk_toolbar_throbber(), nsws_window_command(), nsws_window_update_forward_back(), and scaffolding_update_context().
nserror browser_window_history_get_thumbnail | ( | struct browser_window * | bw, |
struct bitmap ** | bitmap_out | ||
) |
Get the thumbnail bitmap for the current history entry.
bw | The browser window |
bitmap | The bitmat for the current history entry. |
Definition at line 578 of file browser_history.c.
References history_page::bitmap, bitmap(), content_get_bitmap(), history::current, browser_window::current_content, browser_window::history, NSERROR_INVALID, NSERROR_OK, and history_entry::page.
Referenced by ami_gui_event().
nserror browser_window_history_go | ( | struct browser_window * | bw, |
struct history_entry * | entry, | ||
bool | new_window | ||
) |
Navigate to specified history entry, optionally in new window.
bw | browser window |
entry | entry to open |
new_window | open entry in new window |
Definition at line 599 of file browser_history.c.
References browser_window_create(), browser_window_history_update(), browser_window_navigate(), BW_CREATE_CLONE, BW_NAVIGATE_NO_TERMINAL_HISTORY_UPDATE, history::current, browser_window::current_content, history_page::frag_id, browser_window::history, NSERROR_OK, nsurl_ref(), nsurl_refragment(), nsurl_unref(), history_entry::page, and history_page::url.
Referenced by browser_window_history_back(), browser_window_history_forward(), local_history_keypress(), and local_history_mouse_action().