Add widget_{set,delete}_{handler,timer}()

This commit is contained in:
Pim van Pelt
2017-11-26 15:55:15 +01:00
parent fd68b1ec03
commit f9c4520b60
2 changed files with 45 additions and 7 deletions

View File

@ -39,6 +39,10 @@ void widget_remove(struct widget_t *widget);
*/
struct widget_t *widget_create(char *name, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint32_t timer_msec, widget_event_fn handler, void *user_data);
void widget_set_handler(struct widget_t *w, widget_event_fn handler, void *user_data);
void widget_delete_handler(struct widget_t *w);
void widget_set_timer(struct widget_t *w, uint32_t timer_msec);
void widget_delete_timer(struct widget_t *w);
struct widget_t *widget_create_from_json(const char *json);
struct widget_t *widget_create_from_file(const char *fn);
void widget_destroy(struct widget_t **widget);