summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/pagew.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-08-23 22:37:16 +0200
committerUros Majstorovic <majstor@majstor.org>2020-08-23 22:37:16 +0200
commit1e5eb7cb910e6f23c69c2c986b6373e9f9abb980 (patch)
tree5e8ed0ad6b2fcba747c626c1c51afebbf76b3b9d /fw/fe310/eos/eve/widget/pagew.h
parent57c1824affca858023c65c84e188ea7dc6c0a5f2 (diff)
dynamic memory alloc for gui added; page navigation added
Diffstat (limited to 'fw/fe310/eos/eve/widget/pagew.h')
-rw-r--r--fw/fe310/eos/eve/widget/pagew.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/fw/fe310/eos/eve/widget/pagew.h b/fw/fe310/eos/eve/widget/pagew.h
index 1f9ae18..797f1c3 100644
--- a/fw/fe310/eos/eve/widget/pagew.h
+++ b/fw/fe310/eos/eve/widget/pagew.h
@@ -4,10 +4,19 @@ typedef struct EVEPageWidget {
EVEWidget w;
char *title;
EVEFont *font;
- EVEPage *page;
+ eve_page_constructor_t constructor;
uint8_t tag;
} EVEPageWidget;
-void eve_pagew_init(EVEPageWidget *widget, EVERect *g, char *title, EVEFont *font, EVEPage *page);
+typedef struct EVEPageSpec {
+ EVEFont *font;
+ char *title;
+ eve_page_constructor_t constructor;
+} EVEPageSpec;
+
+int eve_pagew_create(EVEPageWidget *widget, EVERect *g, EVEPageSpec *spec);
+void eve_pagew_init(EVEPageWidget *widget, EVERect *g, EVEFont *font, char *title, eve_page_constructor_t constructor);
+void eve_pagew_update(EVEPageWidget *widget, EVEFont *font, char *title, eve_page_constructor_t constructor);
+
int eve_pagew_touch(EVEWidget *_widget, EVEPage *page, uint8_t tag0, int touch_idx);
uint8_t eve_pagew_draw(EVEWidget *_widget, EVEPage *page, uint8_t tag0);