NetSurf
|
framebuffer generic core window interface. More...
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <limits.h>
#include <libnsfb.h>
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/utf8.h"
#include "utils/nsoption.h"
#include "netsurf/keypress.h"
#include "netsurf/mouse.h"
#include "netsurf/plot_style.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
#include "framebuffer/corewindow.h"
Go to the source code of this file.
Functions | |
static int | fb_cw_mouse_press_event (fbtk_widget_t *widget, fbtk_callback_info *cbi) |
static int | fb_cw_draw_event (fbtk_widget_t *widget, fbtk_callback_info *cbi) |
handler for toolkit window redraw event More... | |
static nserror | fb_cw_invalidate (struct core_window *cw, const struct rect *r) |
callback from core to request a redraw More... | |
static nserror | fb_cw_update_size (struct core_window *cw, int width, int height) |
static nserror | fb_cw_set_scroll (struct core_window *cw, int x, int y) |
static nserror | fb_cw_get_scroll (const struct core_window *cw, int *x, int *y) |
static nserror | fb_cw_get_window_dimensions (const struct core_window *cw, int *width, int *height) |
static nserror | fb_cw_drag_status (struct core_window *cw, core_window_drag_status ds) |
nserror | fb_corewindow_init (fbtk_widget_t *parent, struct fb_corewindow *fb_cw) |
initialise elements of fb core window. More... | |
nserror | fb_corewindow_fini (struct fb_corewindow *fb_cw) |
finalise elements of fb core window. More... | |
Variables | |
struct core_window_table | fb_cw_cb_table |
struct core_window_table * | framebuffer_core_window_table = &fb_cw_cb_table |
framebuffer generic core window interface.
Provides interface for core renderers to the framebufefr toolkit drawable area.
This module is an object that must be encapsulated. Client users should embed a struct fb_corewindow at the beginning of their context for this display surface, fill in relevant data and then call fb_corewindow_init()
The fb core window structure requires the callback for draw, key and mouse operations.
Definition in file corewindow.c.
nserror fb_corewindow_fini | ( | struct fb_corewindow * | fb_cw | ) |
finalise elements of fb core window.
fb_cw | A fb core window structure to initialise |
Definition at line 278 of file corewindow.c.
References NSERROR_OK.
Referenced by fb_local_history_destroy().
nserror fb_corewindow_init | ( | fbtk_widget_t * | parent, |
struct fb_corewindow * | fb_cw | ||
) |
initialise elements of fb core window.
As a pre-requisite the draw, key and mouse callbacks must be defined
fb_cw | A fb core window structure to initialise |
Definition at line 207 of file corewindow.c.
References CORE_WINDOW_DRAG_NONE, fb_corewindow::drag_status, fb_corewindow::drawable, fb_cw_draw_event(), fb_cw_mouse_press_event(), FB_FRAME_COLOUR, FB_SCROLL_COLOUR, FBTK_CBT_CLICK, FBTK_CBT_REDRAW, fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_window(), fbtk_get_height(), fbtk_get_width(), fbtk_set_handler(), fb_corewindow::hscroll, NSERROR_OK, nsoption_int, parent, fb_corewindow::vscroll, and fb_corewindow::wnd.
Referenced by fb_local_history_init().
|
static |
Definition at line 186 of file corewindow.c.
References fb_corewindow::drag_status, and NSERROR_OK.
|
static |
handler for toolkit window redraw event
Definition at line 94 of file corewindow.c.
References clip(), fbtk_callback_info::context, fb_corewindow::draw, fbtk_get_absx(), fbtk_get_absy(), fbtk_get_height(), fbtk_get_nsfb(), fbtk_get_width(), fb_corewindow::scrollx, and fb_corewindow::scrolly.
Referenced by fb_corewindow_init().
|
static |
Definition at line 163 of file corewindow.c.
References NSERROR_NOT_IMPLEMENTED.
|
static |
Definition at line 174 of file corewindow.c.
References fb_corewindow::drawable, fbtk_get_height(), fbtk_get_width(), height, NSERROR_OK, and width.
callback from core to request a redraw
Definition at line 127 of file corewindow.c.
References NSERROR_OK.
|
static |
Definition at line 62 of file corewindow.c.
References BROWSER_MOUSE_HOVER, BROWSER_MOUSE_PRESS_1, fbtk_callback_info::context, fbtk_callback_info::event, fb_corewindow::mouse, fbtk_callback_info::x, and fbtk_callback_info::y.
Referenced by fb_corewindow_init().
|
static |
Definition at line 152 of file corewindow.c.
References NSERROR_OK.
|
static |
Definition at line 140 of file corewindow.c.
References NSERROR_OK.
struct core_window_table fb_cw_cb_table |
Definition at line 195 of file corewindow.c.
struct core_window_table* framebuffer_core_window_table = &fb_cw_cb_table |
Definition at line 204 of file corewindow.c.
Referenced by main().