summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/screen/form.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/screen/form.h')
-rw-r--r--fw/fe310/eos/eve/screen/form.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/fw/fe310/eos/eve/screen/form.h b/fw/fe310/eos/eve/screen/form.h
index 272b6ed..62e10f7 100644
--- a/fw/fe310/eos/eve/screen/form.h
+++ b/fw/fe310/eos/eve/screen/form.h
@@ -1,10 +1,10 @@
#include <stdint.h>
-#define EVE_FORM_LABEL_MARGIN 10
+#include "../widget/widget.h"
struct EVEWidget;
-struct EVEWidgetSpec;
struct EVEForm;
+struct EVEFormSpec;
typedef int (*eve_form_uievt_t) (struct EVEForm *, uint16_t, void *);
typedef void (*eve_form_action_t) (struct EVEForm *);
@@ -15,9 +15,15 @@ typedef struct EVEForm {
eve_form_action_t action;
} EVEForm;
-EVEForm *eve_form_create(EVEWindow *window, EVEViewStack *stack, struct EVEWidgetSpec *spec, uint16_t spec_size, eve_form_uievt_t uievt, 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_uievt_t uievt, eve_form_action_t action, eve_form_destructor_t destructor);
-void eve_form_update(EVEForm *form, struct EVEWidget *widget, uint16_t widget_size);
+typedef struct EVEFormSpec {
+ EVELabelSpec label;
+ EVEWidgetSpec widget;
+} EVEFormSpec;
+
+EVEForm *eve_form_create(EVEWindow *window, EVEViewStack *stack, EVEFormSpec *spec, uint16_t spec_size, eve_form_uievt_t uievt, eve_form_action_t action, eve_form_destructor_t destructor);
+void eve_form_init(EVEForm *form, EVEWindow *window, EVEViewStack *stack, EVEWidget *widget, uint16_t widget_size, eve_form_uievt_t uievt, eve_form_action_t action, eve_form_destructor_t destructor);
+void eve_form_set_widget(EVEForm *form, EVEWidget *widget, uint16_t widget_size);
void eve_form_destroy(EVEForm *form);
int eve_form_uievt(EVEForm *form, uint16_t evt, void *param);
+