30#include <libnsfb_plot.h>
31#include <libnsfb_event.h>
114 .background_images =
true,
143 if ((*win_out) != NULL) {
148 ncwin = calloc(1,
sizeof(*ncwin));
182 int prnt_width, prnt_height;
197 if (
width > prnt_width) {
200 if (
height > prnt_height) {
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.
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.
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.
nserror local_history_init(void *core_window_handle, struct browser_window *bw, struct local_history_session **session)
Initialise the local history.
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_NOT_IMPLEMENTED
Functionality is not implemented.
@ NSERROR_NOMEM
Memory exhaustion.
int fbtk_set_mapping(fbtk_widget_t *widget, bool mapped)
Map a widget and request it is redrawn.
int fbtk_get_width(fbtk_widget_t *widget)
Get a widget's width.
int fbtk_set_zorder(fbtk_widget_t *widget, int z)
Set the z order of a widget.
int fbtk_get_height(fbtk_widget_t *widget)
Get a widget's height.
nserror fb_corewindow_init(fbtk_widget_t *parent, struct fb_corewindow *fb_cw)
initialise elements of fb core window.
nserror fb_corewindow_fini(struct fb_corewindow *fb_cw)
finalise elements of fb core window.
const struct plotter_table fb_plotters
framebuffer plot operation table
static nserror fb_local_history_draw(struct fb_corewindow *fb_cw, struct rect *r)
callback on draw event for local history window
nserror fb_local_history_destroy(void)
Destroys the local history window and performs any other necessary cleanup actions.
static nserror fb_local_history_mouse(struct fb_corewindow *fb_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse action on local history window
static nserror fb_local_history_init(fbtk_widget_t *parent, struct browser_window *bw, struct fb_local_history_window **win_out)
Creates the window for the local history view.
nserror fb_local_history_present(fbtk_widget_t *parent, struct browser_window *bw)
make the local history window visible.
nserror fb_local_history_hide(void)
hide the local history window from being visible.
static struct fb_local_history_window * local_history_window
static nserror fb_local_history_key(struct fb_corewindow *fb_cw, uint32_t nskey)
callback for keypress on local history window
Interface to framebuffer local history manager.
browser_mouse_state
Mouse state: 1 is primary mouse button.
@ BROWSER_MOUSE_HOVER
No mouse buttons pressed, May be used to indicate hover or end of drag.
Target independent plotting interface.
Interface to key press operations.
struct fbtk_widget_s * wnd
framebuffer toolkit window.
nserror(* key)(struct fb_corewindow *fb_cw, uint32_t nskey)
callback for keypress on fb core window
nserror(* draw)(struct fb_corewindow *fb_cw, struct rect *r)
callback to draw on drawable area of fb core window
nserror(* mouse)(struct fb_corewindow *fb_cw, browser_mouse_state mouse_state, int x, int y)
callback for mouse event on fb core window
struct local_history_session * session
struct fb_corewindow core
local history viewer context
bool interactive
Redraw to show interactive features.