summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/screen/view.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-08-26 02:07:48 +0200
committerUros Majstorovic <majstor@majstor.org>2020-08-26 02:07:48 +0200
commitd6a8caa7e27dd08180f6a5a45a080c2e4cfc1fe4 (patch)
tree52f8010eace6e3e7002f6396297109a15eb8e81b /fw/fe310/eos/eve/screen/view.h
parent48d934f5b422d87a59ffb38e6215a851f28c1b0e (diff)
kbdwin removed; stack and contructor moved to view
Diffstat (limited to 'fw/fe310/eos/eve/screen/view.h')
-rw-r--r--fw/fe310/eos/eve/screen/view.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/screen/view.h b/fw/fe310/eos/eve/screen/view.h
new file mode 100644
index 0000000..3b635ef
--- /dev/null
+++ b/fw/fe310/eos/eve/screen/view.h
@@ -0,0 +1,27 @@
+#include <stdint.h>
+
+#define EVE_VIEW_SIZE_STACK 16
+
+struct EVEView;
+struct EVEViewStack;
+
+typedef int (*eve_view_touch_t) (struct EVEView *, uint8_t, int);
+typedef uint8_t (*eve_view_draw_t) (struct EVEView *, uint8_t);
+typedef void (*eve_view_constructor_t) (EVEWindow *window, struct EVEViewStack *);
+
+typedef struct EVEView {
+ eve_view_touch_t touch;
+ eve_view_draw_t draw;
+ EVEWindow *window;
+ void *param;
+} EVEView;
+
+typedef struct EVEViewStack {
+ eve_view_constructor_t constructor[EVE_VIEW_SIZE_STACK];
+ uint8_t level;
+} EVEViewStack;
+
+void eve_view_init(EVEView *view, EVEWindow *window, eve_view_touch_t touch, eve_view_draw_t draw, void *param);
+void eve_view_stack_init(EVEViewStack *stack);
+void eve_view_create(EVEWindow *window, EVEViewStack *stack, eve_view_constructor_t constructor);
+void eve_view_destroy(EVEWindow *window, EVEViewStack *stack); \ No newline at end of file