aboutsummaryrefslogtreecommitdiff
path: root/ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/ui.h b/ui.h
index c51c261..3bb14c7 100644
--- a/ui.h
+++ b/ui.h
@@ -2,9 +2,25 @@
#include "data_manager.h"
+enum ui_state {
+ UI_STATE_MAIN,
+ UI_STATE_MAIN_WITH_SETTING,
+ UI_STATE_CHOOSE_UNIT_CATEGORY,
+ UI_STATE_CHANGE_UNIT_MODE,
+};
+
+enum ui_input_event {
+ UI_INPUT_EVENT_UP,
+ UI_INPUT_EVENT_DOWN,
+ UI_INPUT_EVENT_PRESS,
+ UI_INPUT_EVENT_HOLD,
+};
+
struct ui_ctx {
struct display *display;
+ enum ui_state state;
};
void ui_init(struct ui_ctx*, struct display *);
void ui_update(struct ui_ctx*, struct data_ctx*);
+void ui_input_event(struct ui_ctx*, struct data_ctx *dctx, enum ui_input_event);