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

Implementation of win32 bookmark (hotlist) manager. 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/hotlist.h"
#include "windows/plot.h"
#include "windows/corewindow.h"
#include "windows/hotlist.h"
Include dependency graph for hotlist.c:

Go to the source code of this file.

Data Structures

struct  nsw32_hotlist_window
 Hotlist window container for win32. More...
 

Functions

static nserror nsw32_hotlist_key (struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
 callback for keypress on hotlist window More...
 
static nserror nsw32_hotlist_mouse (struct nsw32_corewindow *nsw32_cw, browser_mouse_state mouse_state, int x, int y)
 callback for mouse action on hotlist window More...
 
static nserror nsw32_hotlist_draw (struct nsw32_corewindow *nsw32_cw, int scrollx, int scrolly, struct rect *r)
 callback on draw event for hotlist window More...
 
static nserror nsw32_hotlist_close (struct nsw32_corewindow *nsw32_cw)
 
static nserror nsw32_hotlist_init (HINSTANCE hInstance)
 Creates the window for the hotlist tree. More...
 
nserror nsw32_hotlist_present (HINSTANCE hInstance)
 make the hotlist window visible. More...
 
nserror nsw32_hotlist_finalise (void)
 Free any resources allocated for the hotlist window. More...
 

Variables

static struct nsw32_hotlist_windowhotlist_window = NULL
 hotlist window singleton More...
 

Detailed Description

Implementation of win32 bookmark (hotlist) manager.

Definition in file hotlist.c.

Function Documentation

◆ nsw32_hotlist_close()

static nserror nsw32_hotlist_close ( struct nsw32_corewindow nsw32_cw)
static

Definition at line 112 of file hotlist.c.

References nsw32_corewindow::hWnd, NSERROR_OK, and ShowWindow.

Referenced by nsw32_hotlist_init().

Here is the caller graph for this function:

◆ nsw32_hotlist_draw()

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

callback on draw event for hotlist 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 94 of file hotlist.c.

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

Referenced by nsw32_hotlist_init().

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

◆ nsw32_hotlist_finalise()

nserror nsw32_hotlist_finalise ( void  )

Free any resources allocated for the hotlist window.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 178 of file hotlist.c.

References nsw32_hotlist_window::core, hotlist_fini(), hotlist_window, nsw32_corewindow::hWnd, NSERROR_OK, and nsw32_corewindow_fini().

Here is the call graph for this function:

◆ nsw32_hotlist_init()

static nserror nsw32_hotlist_init ( HINSTANCE  hInstance)
static

Creates the window for the hotlist tree.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 124 of file hotlist.c.

References nsw32_corewindow::close, nsw32_hotlist_window::core, nsw32_corewindow::draw, hotlist_manager_init(), hotlist_window, nsw32_corewindow::key, nsw32_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsw32_corewindow_init(), nsw32_hotlist_close(), nsw32_hotlist_draw(), nsw32_hotlist_key(), nsw32_hotlist_mouse(), and nsw32_corewindow::title.

Referenced by nsw32_hotlist_present().

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

◆ nsw32_hotlist_key()

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

callback for keypress on hotlist window

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

Definition at line 57 of file hotlist.c.

References hotlist_keypress(), NSERROR_NOT_IMPLEMENTED, and NSERROR_OK.

Referenced by nsw32_hotlist_init().

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

◆ nsw32_hotlist_mouse()

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

callback for mouse action on hotlist 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 75 of file hotlist.c.

References hotlist_mouse_action(), and NSERROR_OK.

Referenced by nsw32_hotlist_init().

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

◆ nsw32_hotlist_present()

nserror nsw32_hotlist_present ( HINSTANCE  hinstance)

make the hotlist window visible.

Returns
NSERROR_OK on success else appropriate error code on faliure.

Definition at line 166 of file hotlist.c.

References nsw32_hotlist_window::core, hotlist_window, nsw32_corewindow::hWnd, NSERROR_OK, nsw32_hotlist_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

◆ hotlist_window

struct nsw32_hotlist_window* hotlist_window = NULL
static

hotlist window singleton

Definition at line 47 of file hotlist.c.

Referenced by nsw32_hotlist_finalise(), nsw32_hotlist_init(), and nsw32_hotlist_present().