diff options
Diffstat (limited to 'fw/fe310/eos/app')
-rw-r--r-- | fw/fe310/eos/app/root.c | 7 | ||||
-rw-r--r-- | fw/fe310/eos/app/root.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fw/fe310/eos/app/root.c b/fw/fe310/eos/app/root.c index 6eb3fa6..a86b291 100644 --- a/fw/fe310/eos/app/root.c +++ b/fw/fe310/eos/app/root.c @@ -97,10 +97,11 @@ static void widgets_destroy(EVEWidget *widget, uint16_t widget_size) { for (i=0; i<widget_size; i++) { if (widget->label) eve_free(widget->label); eve_widget_destroy(widget); + widget = eve_widget_next(widget); } } -EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_page_destructor_t destructor) { +EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor) { EVEWidget *widgets; EVEWidget *widget; EVELabel *label; @@ -146,8 +147,8 @@ EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec s widget = eve_widget_next(widget); } - if (destructor == NULL) destructor = (eve_page_destructor_t)app_form_destroy; - eve_form_init(form, window, stack, widgets, spec_size, destructor); + if (destructor == NULL) destructor = app_form_destroy; + eve_form_init(form, window, stack, widgets, spec_size, action, destructor); return form; } diff --git a/fw/fe310/eos/app/root.h b/fw/fe310/eos/app/root.h index 1885515..2b6fc63 100644 --- a/fw/fe310/eos/app/root.h +++ b/fw/fe310/eos/app/root.h @@ -24,5 +24,5 @@ typedef struct APPWidgetSpec { EVEScreen *app_screen(void); void app_root_init(eve_view_constructor_t home_page); -EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_page_destructor_t destructor); +EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, APPWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor); void app_form_destroy(EVEForm *form); |