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.h23
1 files changed, 7 insertions, 16 deletions
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 <stdint.h>
+#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);