From daa87d92b3df433578e53284a8c88083e24f8623 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 27 Mar 2021 22:08:31 +0100 Subject: form/app cleanup; scroll infrastructure --- fw/fe310/eos/eve/screen/form.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'fw/fe310/eos/eve/screen/form.h') diff --git a/fw/fe310/eos/eve/screen/form.h b/fw/fe310/eos/eve/screen/form.h index eb817e5..87da85c 100644 --- a/fw/fe310/eos/eve/screen/form.h +++ b/fw/fe310/eos/eve/screen/form.h @@ -1,6 +1,9 @@ #include +#define EVE_FORM_LABEL_MARGIN 10 + struct EVEWidget; +struct EVEWidgetSpec; struct EVEForm; typedef void (*eve_form_action_t) (struct EVEForm *); @@ -8,24 +11,12 @@ typedef void (*eve_form_destructor_t) (struct EVEForm *); typedef struct EVEForm { EVEPage p; - struct EVEWidget *widget; - uint16_t widget_size; eve_form_action_t action; - int win_x0; - int win_y0; - uint16_t w; - uint16_t h; - uint8_t evt_lock; - EVEPhyLHO lho; - uint64_t lho_t0; } EVEForm; +EVEForm *eve_form_create(EVEWindow *window, EVEViewStack *stack, struct EVEWidgetSpec *spec, uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor); void eve_form_init(EVEForm *form, EVEWindow *window, EVEViewStack *stack, struct EVEWidget *widget, uint16_t widget_size, eve_form_action_t action, eve_form_destructor_t destructor); -void eve_form_update(EVEForm *form, struct EVEWidget *widget, uint16_t widget_size, eve_form_action_t action); - -uint8_t eve_form_draw(EVEView *view, uint8_t tag0); -int eve_form_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0); +void eve_form_update(EVEForm *form, struct EVEWidget *widget, uint16_t widget_size); +void eve_form_destroy(EVEForm *form); -void eve_form_update_g(EVEForm *form, struct EVEWidget *widget); -int eve_form_handle_evt(EVEForm *form, struct EVEWidget *widget, EVETouch *touch, uint16_t evt); -struct EVEWidget *eve_form_widget(EVEForm *form, uint16_t idx); +int eve_form_uievt(EVEView *view, uint16_t evt, void *param); -- cgit v1.2.3