181 if (entry != cursor) {
198 &char_offset, &actual_x);
214 for (child = entry->
forward; child; child = child->
next) {
226 rect.
x1 = child->
x - tailsize + x;
233 rect.
x0 = child->
x - tailsize + x;
270 if ((entry->
x <=
x) &&
277 for (child = entry->
forward; child; child = child->
next) {
293 if (session->
cursor == NULL) {
365 if (session->
bw == NULL) {
395 if (session->
bw == NULL) {
439 if (ent->
back == NULL) {
445 while (ent->
back != NULL) {
498 if (branch_point != NULL) {
499 if (branch_point->
next != NULL) {
500 branch_point = branch_point->
next;
502 session->
cursor = branch_point;
513 while (ent != session->
cursor &&
518 if (session->
cursor != ent) {
525 if (branch_point != NULL) {
527 while (ent->
next != NULL && ent->
next != branch_point) {
585 if (session->
bw == NULL) {
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.
Interface to browser history operations.
Browser window private structure.
Browser window creation and manipulation interface.
Interface to core window handling.
nserror cw_helper_scroll_visible(struct core_window *cw_h, const struct rect *r)
Scroll a core window to make the given rectangle visible.
Helpers to simplify core use of corewindow.
static plot_font_style_t pfstyle_node
plot style for font on unselected nodes
static plot_style_t pstyle_bg
plot style for drawing background
static plot_style_t pstyle_line
plot style for drawing lines between nodes
static plot_style_t pstyle_rect
plot style for drawing rectangle round unselected nodes
nserror local_history_redraw(struct local_history_session *session, int x, int y, struct rect *clip, const struct redraw_context *ctx)
Redraw the local history.
nserror local_history_scroll_to_cursor(struct local_history_session *session)
Scroll the local history window to ensure the current cursor is shown.
static plot_font_style_t pfstyle_node_sel
plot style for font on unselected nodes
nserror local_history_get_size(struct local_history_session *session, int *width, int *height)
get size of local history content area.
nserror local_history_set(struct local_history_session *session, struct browser_window *bw)
Change the browser window to draw local history for.
static void _local_history_find_branch_point(struct history_entry *ent, struct history_entry **branch_point)
Determine the point on the parent line where this history line branches.
nserror local_history_fini(struct local_history_session *session)
Finalise the local history.
bool local_history_keypress(struct local_history_session *session, uint32_t key)
Key press handling.
static plot_style_t pstyle_rect_sel
plot style for drawing rectangle round selected nodes
static plot_style_t pstyle_rect_cursor
plot style for drawing rectangle round the cursor node
static nserror redraw_entry(struct history *history, struct history_entry *entry, struct history_entry *cursor, struct rect *clip, int x, int y, const struct redraw_context *ctx)
Recursively redraw a history entry.
static struct history_entry * find_entry_position(struct history_entry *entry, int x, int y)
Find the history entry at a position.
nserror local_history_init(void *core_window_handle, struct browser_window *bw, struct local_history_session **session)
Initialise the local history.
nserror local_history_get_url(struct local_history_session *session, int x, int y, nsurl **url_out)
get url of entry at position in local history content area.
nserror local_history_mouse_action(struct local_history_session *session, enum browser_mouse_state mouse, int x, int y)
Handles all kinds of mouse action.
nserror
Enumeration of error codes.
@ NSERROR_PERMISSION
Permission error.
@ NSERROR_NOT_FOUND
Requested item not found.
@ NSERROR_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_BAD_PARAMETER
Bad Parameter.
@ NSERROR_NOMEM
Memory exhaustion.
struct netsurf_table * guit
The global interface table.
Interface to core interface table.
Interface to platform-specific layout operation table.
browser_mouse_state
Mouse state: 1 is primary mouse button.
@ BROWSER_MOUSE_PRESS_1
primary button pressed
@ BROWSER_MOUSE_PRESS_2
auxillary button pressed
Target independent plotting interface.
Interface to key press operations.
Interface to browser history private operations.
#define LOCAL_HISTORY_RIGHT_MARGIN
#define LOCAL_HISTORY_WIDTH
#define LOCAL_HISTORY_BOTTOM_MARGIN
#define LOCAL_HISTORY_HEIGHT
colour nscolours[NSCOLOUR__COUNT]
NetSurf UI colour table.
NetSurf UI colours (interface).
@ NSCOLOUR_WIN_EVEN_BORDER
NetSurf URL handling (interface).
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
struct nsurl nsurl
NetSurf URL object.
plot_font_style_t const *const plot_style_font
#define plot_style_int_to_fixed(v)
@ PLOT_OP_TYPE_DASH
Dashed plot.
@ PLOT_OP_TYPE_SOLID
Solid colour.
@ PLOT_FONT_FAMILY_SANS_SERIF
#define PLOT_STYLE_SCALE
Scaling factor for plot styles.
Interface to utility string handling.
struct history * history
local history handle.
nserror(* set_extent)(struct core_window *cw, int width, int height)
Update the logical extent of the window.
nserror(* invalidate)(struct core_window *cw, const struct rect *rect)
Invalidate an area of a window.
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.
A node in the history tree.
struct history_entry * forward_last
Last child.
struct history_entry * back
Parent.
struct history_entry * forward
First child.
struct history_entry * next
Next sibling.
struct history_entry * forward_pref
Child in direction of current entry.
struct bitmap * bitmap
Thumbnail bitmap, or NULL.
char * title
Fragment identifier, or NULL.
struct nsurl * url
Page URL, never NULL.
History tree for a window.
int width
Width of layout.
int height
Height of layout.
struct history_entry * current
Current position in tree.
struct history_entry * start
First page in tree (page that window opened with).
local history viewer context
struct browser_window * bw
void * core_window_handle
struct history_entry * cursor
struct core_window_table * corewindow
Core window table.
struct gui_layout_table * layout
Layout table.
plot_font_generic_family_t family
Generic family to plot with.
colour foreground
Colour of text.
colour background
Background colour to blend to, if appropriate.
Plot style for stroke/fill plotters.
colour fill_colour
Colour of fill.
plot_operation_type_t fill_type
Fill plot type.
colour stroke_colour
Colour of stroke.
plot_operation_type_t stroke_type
Stroke plot type.
nserror(* line)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
Plots a line.
nserror(* text)(const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
nserror(* rectangle)(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rectangle)
Plots a rectangle.
nserror(* clip)(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
nserror(* bitmap)(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
Plot a bitmap.
const struct plotter_table * plot
Current plot operation table.
Interface to system colour values.
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.