|
ginnOS
The reference: libc, the libraries and the kernel
|
idunn: the widget tree, sizes, what must be drawn again, and transitions. More...
Functions | |
| idunn_widget_t * | idunn_widget_new (const idunn_class_t *cls, void *data, uint32_t flags) |
| idunn_widget_t * | idunn_add (idunn_widget_t *parent, idunn_widget_t *child) |
| add child at the end of parent. | |
| void | idunn_set_tooltip (idunn_widget_t *w, const char *text) |
| a tooltip: shown over the widget after 600 ms under the pointer (NULL: none) | |
| void | idunn_free_later (idunn_widget_t *w) |
| free w (and its children) after the event that is running: for a widget that may be in its own callback (a button that rebuilds the view it is in). | |
| void | idunn_widget_free (idunn_widget_t *w) |
| take a widget out of its parent and free it and its children. | |
| void | idunn_set_window (idunn_widget_t *w, idunn_window_t *win) |
| idunn_widget_t * | idunn_grow (idunn_widget_t *w, int weight) |
| let a widget take a share of the free space along its box. | |
| void | idunn_set_size (idunn_widget_t *w, int32_t width, int32_t height) |
| a size a widget must have, in design pixels (0: its own size). | |
| void | idunn_set_disabled (idunn_widget_t *w, bool disabled) |
| a disabled widget is drawn at half opacity and gets no input. | |
| void | idunn_set_error (idunn_widget_t *w, bool error) |
| a control with a wrong value: its border and ring are red (a field sets this on its control with idunn_field_set_error). | |
| gfx_rect_t | idunn_widget_rect (const idunn_widget_t *w) |
| where a widget is in its window, after layout. | |
| void | idunn_measure (idunn_widget_t *w, int32_t max_width, int32_t *width, int32_t *height) |
| void | idunn_place (idunn_widget_t *w, gfx_rect_t rect) |
| void | idunn_dirty (idunn_widget_t *w) |
| void | idunn_dirty_rect (idunn_widget_t *w, gfx_rect_t rect) |
| draw a part of w again (a row of a list), with room for a ring | |
| void | idunn_set_hidden (idunn_widget_t *w, bool hidden) |
| a hidden widget is not drawn, takes no room in its box and gets no input. | |
| bool | idunn_shown (const idunn_widget_t *w) |
| true if w and its parents are not hidden | |
| void | idunn_reveal (idunn_widget_t *w, gfx_rect_t r) |
| scroll the views w is in so that r (in the window) can be seen: a focused widget, the current row of a list. | |
| void | idunn_relayout (idunn_widget_t *w) |
| bool | idunn_ring_visible (const idunn_widget_t *w) |
| true when the focus ring shows | |
| uint8_t | idunn_hover_amount (idunn_widget_t *w) |
| the hover and press looks now (0 to 255), for drawing | |
| uint8_t | idunn_press_amount (idunn_widget_t *w) |
| void | idunn_anim_to (idunn_anim_t *a, float to, uint32_t now, uint32_t duration) |
| float | idunn_anim_value (const idunn_anim_t *a, uint32_t now) |
| bool | idunn_anim_running (const idunn_anim_t *a, uint32_t now) |
| void | idunn_on_middle_click (idunn_widget_t *w, idunn_callback_t on_middle, void *data) |
| on_middle on a press of the middle button on the widget or in it (the nearest widget that has one): a task button closes its window. | |
| void | idunn_on_key (idunn_widget_t *w, idunn_widget_key_t on_key, void *data) |
| void | idunn_on_menu (idunn_widget_t *w, idunn_callback_t on_menu, void *data) |
| on_menu on a right click on the widget or in it, when no widget in it used the click (a list view uses it on its items: idunn_list_view_on_menu). | |
| void | idunn_draw_picture (const idunn_theme_t *t, gfx_buffer_t *buf, const icon_t *icon, int32_t x, int32_t y, uint8_t opacity) |
| draw a Tela picture. | |
idunn: the widget tree, sizes, what must be drawn again, and transitions.
| idunn_widget_t * idunn_widget_new | ( | const idunn_class_t * | cls, |
| void * | data, | ||
| uint32_t | flags ) |
| idunn_widget_t * idunn_add | ( | idunn_widget_t * | parent, |
| idunn_widget_t * | child ) |
add child at the end of parent.
| void idunn_set_tooltip | ( | idunn_widget_t * | w, |
| const char * | text ) |
a tooltip: shown over the widget after 600 ms under the pointer (NULL: none)
| void idunn_free_later | ( | idunn_widget_t * | w | ) |
free w (and its children) after the event that is running: for a widget that may be in its own callback (a button that rebuilds the view it is in).
| void idunn_widget_free | ( | idunn_widget_t * | w | ) |
take a widget out of its parent and free it and its children.
| void idunn_set_window | ( | idunn_widget_t * | w, |
| idunn_window_t * | win ) |
| idunn_widget_t * idunn_grow | ( | idunn_widget_t * | w, |
| int | weight ) |
let a widget take a share of the free space along its box.
| void idunn_set_size | ( | idunn_widget_t * | w, |
| int32_t | width, | ||
| int32_t | height ) |
a size a widget must have, in design pixels (0: its own size).
| void idunn_set_disabled | ( | idunn_widget_t * | w, |
| bool | disabled ) |
a disabled widget is drawn at half opacity and gets no input.
| void idunn_set_error | ( | idunn_widget_t * | w, |
| bool | error ) |
a control with a wrong value: its border and ring are red (a field sets this on its control with idunn_field_set_error).
| gfx_rect_t idunn_widget_rect | ( | const idunn_widget_t * | w | ) |
where a widget is in its window, after layout.
| void idunn_measure | ( | idunn_widget_t * | w, |
| int32_t | max_width, | ||
| int32_t * | width, | ||
| int32_t * | height ) |
| void idunn_place | ( | idunn_widget_t * | w, |
| gfx_rect_t | rect ) |
| void idunn_dirty | ( | idunn_widget_t * | w | ) |
| void idunn_dirty_rect | ( | idunn_widget_t * | w, |
| gfx_rect_t | rect ) |
draw a part of w again (a row of a list), with room for a ring
| void idunn_set_hidden | ( | idunn_widget_t * | w, |
| bool | hidden ) |
a hidden widget is not drawn, takes no room in its box and gets no input.
| bool idunn_shown | ( | const idunn_widget_t * | w | ) |
true if w and its parents are not hidden
| void idunn_reveal | ( | idunn_widget_t * | w, |
| gfx_rect_t | r ) |
scroll the views w is in so that r (in the window) can be seen: a focused widget, the current row of a list.
| void idunn_relayout | ( | idunn_widget_t * | w | ) |
| bool idunn_ring_visible | ( | const idunn_widget_t * | w | ) |
true when the focus ring shows
| uint8_t idunn_hover_amount | ( | idunn_widget_t * | w | ) |
the hover and press looks now (0 to 255), for drawing
| uint8_t idunn_press_amount | ( | idunn_widget_t * | w | ) |
| void idunn_anim_to | ( | idunn_anim_t * | a, |
| float | to, | ||
| uint32_t | now, | ||
| uint32_t | duration ) |
| float idunn_anim_value | ( | const idunn_anim_t * | a, |
| uint32_t | now ) |
| bool idunn_anim_running | ( | const idunn_anim_t * | a, |
| uint32_t | now ) |
| void idunn_on_middle_click | ( | idunn_widget_t * | w, |
| idunn_callback_t | on_middle, | ||
| void * | data ) |
on_middle on a press of the middle button on the widget or in it (the nearest widget that has one): a task button closes its window.
| void idunn_on_key | ( | idunn_widget_t * | w, |
| idunn_widget_key_t | on_key, | ||
| void * | data ) |
| void idunn_on_menu | ( | idunn_widget_t * | w, |
| idunn_callback_t | on_menu, | ||
| void * | data ) |
on_menu on a right click on the widget or in it, when no widget in it used the click (a list view uses it on its items: idunn_list_view_on_menu).
open a menu with idunn_menu_popup_at_pointer.
| void idunn_draw_picture | ( | const idunn_theme_t * | t, |
| gfx_buffer_t * | buf, | ||
| const icon_t * | icon, | ||
| int32_t | x, | ||
| int32_t | y, | ||
| uint8_t | opacity ) |
draw a Tela picture.
in the light theme a faint edge of its own shape goes under it, so a white page (a text file) shows on a white ground.