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

Implementation of win32 global 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/global_history.h"
#include "windows/plot.h"
#include "windows/corewindow.h"
#include "windows/global_history.h"
Include dependency graph for global_history.c:

Go to the source code of this file.

Data Structures

struct  nsw32_global_history_window
 

Functions

static nserror nsw32_global_history_key (struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
 callback for keypress on global_history window More...
 
static nserror nsw32_global_history_mouse (struct nsw32_corewindow *nsw32_cw, browser_mouse_state mouse_state, int x, int y)
 callback for mouse action on global_history window More...
 
static nserror nsw32_global_history_draw (struct nsw32_corewindow *nsw32_cw, int scrollx, int scrolly, struct rect *r)
 callback on draw event for global_history window More...
 
static nserror nsw32_global_history_close (struct nsw32_corewindow *nsw32_cw)
 
static nserror nsw32_global_history_init (HINSTANCE hInstance)
 Creates the window for the global_history tree. More...
 
nserror nsw32_global_history_present (HINSTANCE hInstance)
 make the global history window visible. More...
 
nserror nsw32_global_history_finalise (void)
 Destroys the global history window and performs any other necessary cleanup actions. More...
 

Variables

static struct nsw32_global_history_windowglobal_history_window = NULL
 

Detailed Description

Implementation of win32 global history interface.

Definition in file global_history.c.

Function Documentation

◆ nsw32_global_history_close()

static nserror nsw32_global_history_close ( struct nsw32_corewindow nsw32_cw)
static

Definition at line 108 of file global_history.c.

References nsw32_corewindow::hWnd, NSERROR_OK, and ShowWindow.

Referenced by nsw32_global_history_init().

Here is the caller graph for this function:

◆ nsw32_global_history_draw()

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

callback on draw event for global_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 90 of file global_history.c.

References global_history_redraw(), redraw_context::interactive, NSERROR_OK, and win_plotters.

Referenced by nsw32_global_history_init().

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

◆ nsw32_global_history_finalise()

nserror nsw32_global_history_finalise ( void  )

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

Definition at line 175 of file global_history.c.

References nsw32_global_history_window::core, global_history_fini(), global_history_window, nsw32_corewindow::hWnd, NSERROR_OK, and nsw32_corewindow_fini().

Here is the call graph for this function:

◆ nsw32_global_history_init()

static nserror nsw32_global_history_init ( HINSTANCE  hInstance)
static

Creates the window for the global_history tree.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 120 of file global_history.c.

References nsw32_corewindow::cb_table, nsw32_corewindow::close, nsw32_global_history_window::core, nsw32_corewindow::draw, global_history_init(), global_history_window, nsw32_corewindow::key, nsw32_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsw32_corewindow_init(), nsw32_global_history_close(), nsw32_global_history_draw(), nsw32_global_history_key(), nsw32_global_history_mouse(), and nsw32_corewindow::title.

Referenced by nsw32_global_history_present().

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

◆ nsw32_global_history_key()

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

callback for keypress on global_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 53 of file global_history.c.

References global_history_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.

Referenced by nsw32_global_history_init().

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

◆ nsw32_global_history_mouse()

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

callback for mouse action on global_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 71 of file global_history.c.

References global_history_mouse_action(), and NSERROR_OK.

Referenced by nsw32_global_history_init().

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

◆ nsw32_global_history_present()

nserror nsw32_global_history_present ( HINSTANCE  hinstance)

make the global history window visible.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 163 of file global_history.c.

References nsw32_global_history_window::core, global_history_window, nsw32_corewindow::hWnd, NSERROR_OK, nsw32_global_history_init(), and ShowWindow.

Referenced by nsws_window_command().

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

Variable Documentation

◆ global_history_window

struct nsw32_global_history_window* global_history_window = NULL
static