summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/selectw.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-24 03:20:19 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-24 03:20:19 +0100
commitd0a0fee0571be63f023f8f6a49a0b76b89871e56 (patch)
tree48094cd0e4f3027f589b97fd21ef386e02ab1786 /fw/fe310/eos/eve/widget/selectw.h
parenta1b7a1fb1f5a5ad5b6f34b576dd0a1a2cce2f210 (diff)
select widget initial import
Diffstat (limited to 'fw/fe310/eos/eve/widget/selectw.h')
-rw-r--r--fw/fe310/eos/eve/widget/selectw.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/widget/selectw.h b/fw/fe310/eos/eve/widget/selectw.h
new file mode 100644
index 0000000..6e2c203
--- /dev/null
+++ b/fw/fe310/eos/eve/widget/selectw.h
@@ -0,0 +1,27 @@
+#include <stdint.h>
+
+typedef struct EVESelectWidget {
+ EVEWidget w;
+ EVEFont *font;
+ utf8_t *option;
+ uint16_t option_size;
+ uint32_t select;
+} EVESelectWidget;
+
+typedef struct EVESelectSpec {
+ EVEFont *font;
+ uint16_t option_size;
+} EVESelectSpec;
+
+int eve_selectw_create(EVESelectWidget *widget, EVERect *g, EVESelectSpec *spec);
+void eve_selectw_destroy(EVESelectWidget *widget);
+void eve_selectw_init(EVESelectWidget *widget, EVERect *g, EVEFont *font, utf8_t *option, uint16_t option_size);
+void eve_selectw_update(EVESelectWidget *widget, EVEFont *font, utf8_t *option, uint16_t option_size);
+
+int eve_selectw_touch(EVEWidget *_widget, EVEPage *page, EVETouch *t, uint16_t evt, uint8_t tag0, int touch_idx);
+uint8_t eve_selectw_draw(EVEWidget *_widget, EVEPage *page, uint8_t tag0);
+
+utf8_t *eve_selectw_option_get(EVESelectWidget *widget, int idx);
+int eve_selectw_option_set(EVESelectWidget *widget, utf8_t *opt, uint16_t size);
+int eve_selectw_option_add(EVESelectWidget *widget, utf8_t *opt);
+utf8_t *eve_selectw_option_get_select(EVESelectWidget *widget);