NetSurf
|
Go to the source code of this file.
Functions | |
nserror | global_history_init (void *core_window_handle) |
Initialise the global history. More... | |
nserror | global_history_fini (void) |
Finalise the global history. More... | |
nserror | global_history_add (struct nsurl *url) |
Add an entry to the global history. More... | |
nserror | global_history_export (const char *path, const char *title) |
Save global history to file (html) More... | |
void | global_history_redraw (int x, int y, struct rect *clip, const struct redraw_context *ctx) |
Redraw the global history. More... | |
void | global_history_mouse_action (enum browser_mouse_state mouse, int x, int y) |
Handles all kinds of mouse action. More... | |
bool | global_history_keypress (uint32_t key) |
Key press handling. More... | |
bool | global_history_has_selection (void) |
Determine whether there is a selection. More... | |
bool | global_history_get_selection (struct nsurl **url, const char **title) |
Get the first selected node. More... | |
nserror | global_history_expand (bool only_folders) |
Expand the treeview's nodes. More... | |
nserror | global_history_contract (bool all) |
Contract the treeview's nodes. More... | |
Add an entry to the global history.
If the URL already exists in the global history, the old node is removed.
url | URL for node being added |
Definition at line 829 of file global_history.c.
References gh_ctx, global_history_add_entry(), NSERROR_BAD_PARAMETER, NSERROR_OK, NSLOG, global_history_ctx::tree, and urldb_get_url_data().
Referenced by browser_window_content_ready().
nserror global_history_contract | ( | bool | all | ) |
Contract the treeview's nodes.
all | Iff false, only entries are contracted. |
Definition at line 1009 of file global_history.c.
References gh_ctx, global_history_ctx::tree, and treeview_contract().
Referenced by global_history_menu_select(), global_history_toolbar_click(), HOOKF(), and MENUHANDLER().
nserror global_history_expand | ( | bool | only_folders | ) |
Expand the treeview's nodes.
only_folders | Iff true, only folders are expanded. |
Definition at line 1002 of file global_history.c.
References gh_ctx, global_history_ctx::tree, and treeview_expand().
Referenced by global_history_menu_select(), global_history_toolbar_click(), HOOKF(), and MENUHANDLER().
nserror global_history_export | ( | const char * | path, |
const char * | title | ||
) |
Save global history to file (html)
path | The path to save history to |
title | The title to give the document, or NULL for default |
Definition at line 912 of file global_history.c.
References treeview_export_walk_ctx::fp, gh_ctx, global_history_export_enter_cb(), global_history_export_leave_cb(), NSERROR_OK, NSERROR_SAVE_FAILED, path(), global_history_ctx::tree, TREE_NODE_ENTRY, TREE_NODE_FOLDER, and treeview_walk().
Referenced by HOOKF(), MENUHANDLER(), and ro_gui_save_content().
nserror global_history_fini | ( | void | ) |
Finalise the global history.
This destroys the global history treeview and the global history module's internal data. After calling this if global history is required again, global_history_init must be called.
Definition at line 799 of file global_history.c.
References global_history_ctx::built, treeview_field_desc::field, global_history_ctx::fields, gh_ctx, N_FIELDS, NSERROR_OK, NSLOG, global_history_ctx::tree, treeview_destroy(), and treeview_fini().
Referenced by ami_history_global_destroy(), atari_global_history_finish(), nsgtk_global_history_destroy(), nsw32_global_history_finalise(), and ro_gui_global_history_finalise().
bool global_history_get_selection | ( | struct nsurl ** | url, |
const char ** | title | ||
) |
Get the first selected node.
url | Updated to the selected entry's address, or NULL |
title | Updated to the selected entry's title, or NULL |
Definition at line 980 of file global_history.c.
References global_history_entry::data, gh_ctx, GH_TITLE, global_history_ctx::tree, TREE_NODE_ENTRY, treeview_get_selection(), type, global_history_entry::url, and treeview_field_data::value.
Referenced by ami_history_global_drag_end().
bool global_history_has_selection | ( | void | ) |
Determine whether there is a selection.
Definition at line 973 of file global_history.c.
References gh_ctx, global_history_ctx::tree, and treeview_has_selection().
Referenced by ami_history_global_drag_end(), global_history_menu_prepare(), and global_history_toolbar_update().
nserror global_history_init | ( | void * | core_window_handle | ) |
Initialise the global history.
This iterates through the URL database, generating the global history data, and creates a treeview.
This must be called before any other global_history_* function.
core_window_handle | The core_window in which the global history is shown. |
Definition at line 726 of file global_history.c.
References global_history_ctx::built, global_history_ctx::fields, global_history_folder::folder, global_history_ctx::folders, gh_ctx, GH_TODAY, gh_tree_cb_t, global_history_add_entry(), global_history_create_dir(), global_history_init_entries(), global_history_initialise_entry_fields(), global_history_initialise_time(), N_FIELDS, NSERROR_OK, NSLOG, global_history_ctx::tree, treeview_create(), TREEVIEW_DEL_EMPTY_DIRS, treeview_get_height(), treeview_init(), TREEVIEW_NO_MOVES, treeview_node_expand(), TREEVIEW_SEARCHABLE, and urldb_iterate_entries().
Referenced by ami_history_global_present(), atari_global_history_init_phase2(), nsgtk_global_history_init(), nsw32_global_history_init(), and ro_global_history_init().
bool global_history_keypress | ( | uint32_t | key | ) |
Key press handling.
key | The ucs4 character codepoint |
Definition at line 966 of file global_history.c.
References gh_ctx, global_history_ctx::tree, and treeview_keypress().
Referenced by ami_history_global_key(), atari_global_history_keypress(), global_history_key(), global_history_menu_select(), global_history_toolbar_click(), HOOKF(), MENUHANDLER(), nsgtk_global_history_key(), and nsw32_global_history_key().
void global_history_mouse_action | ( | enum browser_mouse_state | mouse, |
int | x, | ||
int | y | ||
) |
Handles all kinds of mouse action.
mouse | The current mouse state |
x | X coordinate |
y | Y coordinate |
Definition at line 959 of file global_history.c.
References gh_ctx, global_history_ctx::tree, and treeview_mouse_action().
Referenced by ami_history_global_mouse(), atari_global_history_mouse_action(), global_history_mouse(), nsgtk_global_history_mouse(), and nsw32_global_history_mouse().
void global_history_redraw | ( | int | x, |
int | y, | ||
struct rect * | clip, | ||
const struct redraw_context * | ctx | ||
) |
Redraw the global history.
x | X coordinate to render treeview at |
y | Y coordinate to render treeview at |
clip | Current clip rectangle (wrt tree origin) |
ctx | Current redraw context |
Definition at line 951 of file global_history.c.
References clip(), gh_ctx, global_history_ctx::tree, and treeview_redraw().
Referenced by ami_history_global_draw(), atari_global_history_draw(), global_history_draw(), nsgtk_global_history_draw(), and nsw32_global_history_draw().