NetSurf
Data Structures | Functions | Variables
local_history.c File Reference

Implementation of win32 local history interface. More...

#include <stdint.h>
#include <stdlib.h>
#include <windows.h>
#include "utils/log.h"
#include "utils/nsoption.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/local_history.h"
#include "windows/plot.h"
#include "windows/corewindow.h"
#include "windows/local_history.h"
Include dependency graph for local_history.c:

Go to the source code of this file.

Data Structures

struct  nsw32_local_history_window
 

Functions

static nserror nsw32_local_history_key (struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
 callback for keypress on local_history window More...
 
static nserror nsw32_local_history_mouse (struct nsw32_corewindow *nsw32_cw, browser_mouse_state mouse_state, int x, int y)
 callback for mouse action on local_history window More...
 
static nserror nsw32_local_history_draw (struct nsw32_corewindow *nsw32_cw, int scrollx, int scrolly, struct rect *r)
 callback on draw event for local_history window More...
 
static nserror nsw32_local_history_close (struct nsw32_corewindow *nsw32_cw)
 
static nserror nsw32_local_history_init (HINSTANCE hInstance, struct browser_window *bw, struct nsw32_local_history_window **win_out)
 Creates the window for the local_history tree. More...
 
nserror nsw32_local_history_present (HWND hWndParent, struct browser_window *bw)
 make the local history window visible. More...
 
nserror nsw32_local_history_hide (void)
 hide the local history window. More...
 
nserror nsw32_local_history_finalise (void)
 Destroys the local history window and performs any other necessary cleanup actions. More...
 

Variables

static struct nsw32_local_history_windowlocal_history_window = NULL
 

Detailed Description

Implementation of win32 local history interface.

Definition in file local_history.c.

Function Documentation

◆ nsw32_local_history_close()

static nserror nsw32_local_history_close ( struct nsw32_corewindow nsw32_cw)
static

Definition at line 121 of file local_history.c.

References nsw32_corewindow::hWnd, NSERROR_OK, and ShowWindow.

Referenced by nsw32_local_history_init().

Here is the caller graph for this function:

◆ nsw32_local_history_draw()

static nserror nsw32_local_history_draw ( struct nsw32_corewindow nsw32_cw,
int  scrollx,
int  scrolly,
struct rect r 
)
static

callback on draw event for local_history window

Parameters
nsw32_cwThe nsw32 core window structure.
scrollxThe horizontal scroll offset.
scrollyThe vertical scroll offset.
rThe rectangle of the window that needs updating.
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 100 of file local_history.c.

References redraw_context::interactive, local_history_redraw(), NSERROR_OK, nsw32_local_history_window::session, and win_plotters.

Referenced by nsw32_local_history_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsw32_local_history_finalise()

nserror nsw32_local_history_finalise ( void  )

Destroys the local history window and performs any other necessary cleanup actions.

Definition at line 239 of file local_history.c.

References nsw32_local_history_window::core, nsw32_corewindow::hWnd, local_history_fini(), local_history_window, NSERROR_OK, nsw32_corewindow_fini(), and nsw32_local_history_window::session.

Here is the call graph for this function:

◆ nsw32_local_history_hide()

nserror nsw32_local_history_hide ( void  )

hide the local history window.

Definition at line 225 of file local_history.c.

References nsw32_local_history_window::core, nsw32_corewindow::hWnd, local_history_set(), local_history_window, NSERROR_OK, nsw32_local_history_window::session, and ShowWindow.

Referenced by nsws_drawable_mousedown(), nsws_window_drawable_event_callback(), nsws_window_event_callback(), and nsws_window_update_forward_back().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsw32_local_history_init()

static nserror nsw32_local_history_init ( HINSTANCE  hInstance,
struct browser_window bw,
struct nsw32_local_history_window **  win_out 
)
static

Creates the window for the local_history tree.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 134 of file local_history.c.

References nsw32_corewindow::cb_table, nsw32_corewindow::close, nsw32_local_history_window::core, nsw32_corewindow::draw, nsw32_corewindow::key, local_history_init(), local_history_set(), nsw32_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsw32_corewindow_init(), nsw32_local_history_close(), nsw32_local_history_draw(), nsw32_local_history_key(), nsw32_local_history_mouse(), nsw32_local_history_window::session, and nsw32_corewindow::title.

Referenced by nsw32_local_history_present().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsw32_local_history_key()

static nserror nsw32_local_history_key ( struct nsw32_corewindow nsw32_cw,
uint32_t  nskey 
)
static

callback for keypress on local_history window

Parameters
nsw32_cwThe nsw32 core window structure.
nskeyThe netsurf key code
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 55 of file local_history.c.

References local_history_keypress(), NSERROR_NOT_IMPLEMENTED, NSERROR_OK, and nsw32_local_history_window::session.

Referenced by nsw32_local_history_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsw32_local_history_mouse()

static nserror nsw32_local_history_mouse ( struct nsw32_corewindow nsw32_cw,
browser_mouse_state  mouse_state,
int  x,
int  y 
)
static

callback for mouse action on local_history window

Parameters
nsw32_cwThe nsw32 core window structure.
mouse_statenetsurf mouse state on event
xlocation of event
ylocation of event
Returns
NSERROR_OK on success otherwise apropriate error code

Definition at line 77 of file local_history.c.

References local_history_mouse_action(), NSERROR_OK, and nsw32_local_history_window::session.

Referenced by nsw32_local_history_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nsw32_local_history_present()

nserror nsw32_local_history_present ( HWND  hWndParent,
struct browser_window bw 
)

make the local history window visible.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 183 of file local_history.c.

References nsw32_local_history_window::core, height, nsw32_corewindow::hWnd, local_history_get_size(), local_history_scroll_to_cursor(), local_history_window, NSERROR_OK, nsw32_local_history_init(), nsw32_local_history_window::session, and width.

Referenced by nsws_window_command().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ local_history_window

struct nsw32_local_history_window* local_history_window = NULL
static