NetSurf
|
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | fbtk_widget_s |
Widget description. More... | |
Enumerations | |
enum | fbtk_widgettype_e { FB_WIDGET_TYPE_ROOT = 0 , FB_WIDGET_TYPE_WINDOW , FB_WIDGET_TYPE_BITMAP , FB_WIDGET_TYPE_FILL , FB_WIDGET_TYPE_TEXT , FB_WIDGET_TYPE_HSCROLL , FB_WIDGET_TYPE_VSCROLL , FB_WIDGET_TYPE_USER } |
Functions | |
fbtk_widget_t * | fbtk_widget_new (fbtk_widget_t *parent, enum fbtk_widgettype_e type, int x, int y, int width, int height) |
creates a new widget and insert it into to hierachy. More... | |
fbtk_widget_t * | fbtk_get_root_widget (fbtk_widget_t *widget) |
find the root widget from any widget in the toolkit hierarchy. More... | |
int | fbtk_set_ptr (fbtk_widget_t *widget, fbtk_callback_info *cbi) |
set pointer to bitmap in context. More... | |
enum fbtk_widgettype_e |
fbtk_widget_t * fbtk_get_root_widget | ( | fbtk_widget_t * | widget | ) |
find the root widget from any widget in the toolkit hierarchy.
widget | Any widget. |
Definition at line 412 of file fbtk.c.
References FB_WIDGET_TYPE_ROOT, NSLOG, fbtk_widget_s::parent, and fbtk_widget_s::type.
Referenced by fb_redraw_text(), fb_redraw_text_button(), fbtk_click(), fbtk_enable_oskb(), fbtk_event(), fbtk_get_caret(), fbtk_get_nsfb(), fbtk_get_redraw_pending(), fbtk_get_widget_at(), fbtk_input(), fbtk_redraw(), fbtk_set_caret(), fbtk_set_focus(), fbtk_set_ptr(), fbtk_tgrab_pointer(), fbtk_warp_pointer(), hscroll_redraw(), and vscroll_redraw().
int fbtk_set_ptr | ( | fbtk_widget_t * | widget, |
fbtk_callback_info * | cbi | ||
) |
set pointer to bitmap in context.
widget helper callback to set cursor image to the bitmap passed in the callbacks private data.
Definition at line 393 of file fbtk.c.
References fbtk_callback_info::context, fbtk_get_root_widget(), fbtk_bitmap::height, fbtk_bitmap::hot_x, fbtk_bitmap::hot_y, fbtk_bitmap::pixdata, root, and fbtk_bitmap::width.
Referenced by fbtk_create_button(), and fbtk_create_text_button().
fbtk_widget_t * fbtk_widget_new | ( | fbtk_widget_t * | parent, |
enum fbtk_widgettype_e | type, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
creates a new widget and insert it into to hierachy.
The widget is set to defaults of false, 0 or NULL.
parent | The parent widget. The new widget will be added with the shallowest z order relative to its siblings. |
type | The type of the widget. |
x | The x co-ordinate relative to the parent widget. |
y | The y co-ordinate relative to the parent widget. |
width | the widgets width. This will be clipped to the parent, if the value is 0 the largest extent which can fit within the parent is used, if the value is negative the largest value that will fit within the parent less the value given will be used. |
height | the widgets width. This will be clipped to the parent, if the value is 0 the largest extent which can fit within the parent is used, if the value is negative the largest value that will fit within the parent less the value given will be used. |
Definition at line 546 of file fbtk.c.
References fbtk, fbtk_widget_s::height, height, fbtk_widget_s::next, NSLOG, fbtk_widget_s::parent, parent, fbtk_widget_s::prev, type, fbtk_widget_s::type, fbtk_widget_s::width, width, fbtk_widget_s::x, and fbtk_widget_s::y.
Referenced by fbtk_create_bitmap(), fbtk_create_button(), fbtk_create_fill(), fbtk_create_hscroll(), fbtk_create_text(), fbtk_create_text_button(), fbtk_create_user(), fbtk_create_vscroll(), fbtk_create_window(), and fbtk_create_writable_text().