NetSurf
|
#include <stdbool.h>
#include <stdlib.h>
#include <libnsfb.h>
#include <libnsfb_plot.h>
#include "netsurf/browser_window.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
#include "framebuffer/image_data.h"
#include "widget.h"
Go to the source code of this file.
Functions | |
static int | fb_redraw_bitmap (fbtk_widget_t *widget, fbtk_callback_info *cbi) |
void | fbtk_set_bitmap (fbtk_widget_t *widget, struct fbtk_bitmap *image) |
Change the bitmap in a widget. More... | |
fbtk_widget_t * | fbtk_create_bitmap (fbtk_widget_t *parent, int x, int y, int width, int height, colour c, struct fbtk_bitmap *image) |
Create a bitmap widget. More... | |
fbtk_widget_t * | fbtk_create_button (fbtk_widget_t *parent, int x, int y, int width, int height, colour c, struct fbtk_bitmap *image, fbtk_callback click, void *pw) |
Create a button widget with an image. More... | |
|
static |
Definition at line 36 of file bitmap.c.
References fbtk_widget_s::bg, fbtk_widget_s::bitmap, fbtk_get_bbox(), fbtk_get_nsfb(), fbtk_bitmap::height, nsfb, fbtk_bitmap::opaque, fbtk_bitmap::pixdata, fbtk_widget_s::u, and fbtk_bitmap::width.
Referenced by fbtk_create_bitmap(), and fbtk_create_button().
fbtk_widget_t * fbtk_create_bitmap | ( | fbtk_widget_t * | window, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
colour | c, | ||
struct fbtk_bitmap * | image | ||
) |
Create a bitmap widget.
Create a widget which shows a bitmap.
window | The window to add the bitmap widget to. |
x | X coordinate of widget. |
y | Y coordinate of widget. |
width | Width of the widget |
height | Height of the widget |
c | background colour |
image | The bitmap to put in the widget |
Definition at line 84 of file bitmap.c.
References fbtk_widget_s::bg, fbtk_widget_s::bitmap, fb_redraw_bitmap(), FB_WIDGET_TYPE_BITMAP, FBTK_CBT_REDRAW, fbtk_set_handler(), fbtk_widget_new(), height, fbtk_widget_s::mapped, parent, fbtk_widget_s::u, and width.
Referenced by create_toolbar().
fbtk_widget_t * fbtk_create_button | ( | fbtk_widget_t * | window, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height, | ||
colour | c, | ||
struct fbtk_bitmap * | image, | ||
fbtk_callback | click, | ||
void * | pw | ||
) |
Create a button widget with an image.
Helper function which creates a bitmap widget and associate a handler for when it is clicked.
window | The window to add the button widget to. |
x | X coordinate of widget. |
y | Y coordinate of widget. |
width | Width of the widget |
height | Height of the widget |
c | background colour |
image | The bitmap to put in the widget |
click | The callback upon a click |
pw | The context tp pass to the callback |
Definition at line 107 of file bitmap.c.
References fbtk_widget_s::bg, fbtk_widget_s::bitmap, fb_redraw_bitmap(), FB_WIDGET_TYPE_BITMAP, FBTK_CBT_CLICK, FBTK_CBT_POINTERENTER, FBTK_CBT_REDRAW, fbtk_set_handler(), fbtk_set_ptr(), fbtk_widget_new(), hand_image, height, fbtk_widget_s::mapped, parent, fbtk_widget_s::u, and width.
Referenced by create_normal_browser_window(), create_toolbar(), fbtk_create_hscroll(), fbtk_create_vscroll(), and fbtk_enable_oskb().
void fbtk_set_bitmap | ( | fbtk_widget_t * | widget, |
struct fbtk_bitmap * | image | ||
) |
Change the bitmap in a widget.
widget | The widget to get the context from. |
image | The bitmap to put in the widget |
Definition at line 72 of file bitmap.c.
References fbtk_widget_s::bitmap, FB_WIDGET_TYPE_BITMAP, fbtk_request_redraw(), fbtk_widget_s::type, and fbtk_widget_s::u.
Referenced by fb_update_back_forward(), gui_window_stop_throbber(), and throbber_advance().