|
PatchworkOS
|
Go to the source code of this file.
Functions | |
| static uint64_t | element_send_init (element_t *elem) |
| static element_t * | element_new_raw (element_id_t id, const rect_t *rect, const char *text, element_flags_t flags, procedure_t procedure, void *private) |
| element_t * | element_new (element_t *parent, element_id_t id, const rect_t *rect, const char *text, element_flags_t flags, procedure_t procedure, void *private) |
| Allocate and initialize a new element. | |
| element_t * | element_new_root (window_t *win, element_id_t id, const rect_t *rect, const char *text, element_flags_t flags, procedure_t procedure, void *private) |
| static void | element_free_children (element_t *elem) |
| void | element_free (element_t *elem) |
| Deinitialize and free an element and all its children. | |
| element_t * | element_find (element_t *elem, element_id_t id) |
| Find a child element by its ID. | |
| void | element_set_private (element_t *elem, void *private) |
| Set private data for an element. | |
| void * | element_get_private (element_t *elem) |
| Get private data for an element. | |
| element_id_t | element_get_id (element_t *elem) |
| Get the ID of an element. | |
| void | element_move (element_t *elem, const rect_t *rect) |
| Move an element to a new rectangle in its parent's coordinate space. | |
| rect_t | element_get_rect (element_t *elem) |
| Get the rectangle of an element in its parent's coordinate space. | |
| rect_t | element_get_content_rect (element_t *elem) |
| Get the element's rectangle in local coordinates. | |
| rect_t | element_get_window_rect (element_t *elem) |
| Get the rectangle of an element in window coordinates. | |
| point_t | element_get_window_point (element_t *elem) |
| Get the top-left point of an element in window coordinates. | |
| rect_t | element_rect_to_window (element_t *elem, const rect_t *src) |
| Convert a rectangle from element coordinates to window coordinates. | |
| point_t | element_point_to_window (element_t *elem, const point_t *src) |
| Convert a point from element coordinates to window coordinates. | |
| rect_t | element_window_to_rect (element_t *elem, const rect_t *src) |
| Convert a rectangle from window coordinates to element coordinates. | |
| point_t | element_window_to_point (element_t *elem, const point_t *src) |
| Convert a point from window coordinates to element coordinates. | |
| element_flags_t | element_flags_get (element_t *elem) |
| void | element_set_flags (element_t *elem, element_flags_t flags) |
| Set the flags of an element. | |
| const char * | element_text_get (element_t *elem) |
| uint64_t | element_set_text (element_t *elem, const char *text) |
| Set the text of an element. | |
| text_props_t * | element_get_text_props (element_t *elem) |
| Get the text properties of an element. | |
| image_t * | element_image_get (element_t *elem) |
| void | element_set_image (element_t *elem, image_t *image) |
| Set the image of an element. | |
| image_props_t * | element_image_props_get (element_t *elem) |
| theme_t * | element_get_theme (element_t *elem) |
| Get the theme of an element. | |
| void | element_draw_begin (element_t *elem, drawable_t *draw) |
| Begin drawing to an element. | |
| void | element_draw_end (element_t *elem, drawable_t *draw) |
| End drawing to an element. | |
| void | element_redraw (element_t *elem, bool shouldPropagate) |
| Redraw an element. | |
| void | element_force_action (element_t *elem, action_type_t action) |
| Force an action on an element. | |
| uint64_t | element_dispatch (element_t *elem, const event_t *event) |
| Dispatch an event to an element. | |
| uint64_t | element_emit (element_t *elem, event_type_t type, const void *data, uint64_t size) |
| Emit an event to an element. | |
| element_flags_t element_flags_get | ( | element_t * | elem | ) |
Definition at line 313 of file element.c.
References ELEMENT_NONE, element_t::flags, and NULL.
|
static |
Definition at line 102 of file element.c.
References element_t::children, element_free(), element_t::entry, LIST_FOR_EACH_SAFE, and list_remove().
Referenced by element_free().
Definition at line 371 of file element.c.
References element_t::image, and NULL.
| image_props_t * element_image_props_get | ( | element_t * | elem | ) |
Definition at line 391 of file element.c.
References element_t::imageProps, and NULL.
|
static |
Definition at line 18 of file element.c.
References ALIGN_CENTER, element_t::children, element_t::entry, element_t::flags, free(), element_t::id, id, element_t::image, element_t::imageProps, list_entry_init(), list_init(), malloc(), NULL, element_t::parent, element_t::private, element_t::proc, procedure(), element_t::rect, strdup(), element_t::text, element_t::textProps, element_t::theme, theme_global_get(), element_t::win, text_props_t::xAlign, and image_props_t::xAlign.
Referenced by element_new(), and element_new_root().
| element_t * element_new_root | ( | window_t * | win, |
| element_id_t | id, | ||
| const rect_t * | rect, | ||
| const char * | text, | ||
| element_flags_t | flags, | ||
| procedure_t | procedure, | ||
| void * | private | ||
| ) |
Definition at line 76 of file element.c.
References EINVAL, element_free(), element_new_raw(), element_send_init(), ENOMEM, ERR, errno, NULL, procedure(), and element_t::win.
Referenced by window_new().
Definition at line 6 of file element.c.
References element_redraw(), ERR, LEVENT_INIT, element_t::proc, window_t::surface, event_t::target, and element_t::win.
Referenced by element_new(), and element_new_root().
| const char * element_text_get | ( | element_t * | elem | ) |
Definition at line 333 of file element.c.
References NULL, and element_t::text.