diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-03-25 19:58:43 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-03-25 19:58:43 +0100 |
commit | 58232586e1ed65fc8a8e382796628aa087b5dc4c (patch) | |
tree | a2a174228ad0b217369820750a6c1d4f087d8d7b /fw/fe310/eos/eve/screen/view.h | |
parent | 95f69d4f83ad8f7fbb56349f29e902928510362b (diff) |
uievt added to view
Diffstat (limited to 'fw/fe310/eos/eve/screen/view.h')
-rw-r--r-- | fw/fe310/eos/eve/screen/view.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fw/fe310/eos/eve/screen/view.h b/fw/fe310/eos/eve/screen/view.h index f0e2eb0..527282b 100644 --- a/fw/fe310/eos/eve/screen/view.h +++ b/fw/fe310/eos/eve/screen/view.h @@ -1,6 +1,8 @@ #include <stdint.h> -#define EVE_VIEW_SIZE_STACK 16 +#include "uievt.h" + +#define EVE_VIEW_SIZE_STACK 16 struct EVEView; struct EVEViewStack; @@ -8,11 +10,13 @@ struct EVEWindow; typedef uint8_t (*eve_view_draw_t) (struct EVEView *, uint8_t); typedef int (*eve_view_touch_t) (struct EVEView *, EVETouch *, uint16_t, uint8_t); +typedef void (*eve_view_uievt_t) (struct EVEView *, uint16_t, void *); typedef void (*eve_view_constructor_t) (struct EVEWindow *window, struct EVEViewStack *); typedef struct EVEView { eve_view_draw_t draw; eve_view_touch_t touch; + eve_view_uievt_t uievt; struct EVEWindow *window; void *param; uint32_t color_bg; @@ -25,11 +29,13 @@ typedef struct EVEViewStack { uint8_t level; } EVEViewStack; -void eve_view_init(EVEView *view, struct EVEWindow *window, eve_view_draw_t draw, eve_view_touch_t touch, void *param); +void eve_view_init(EVEView *view, struct EVEWindow *window, eve_view_draw_t draw, eve_view_touch_t touch, eve_view_uievt_t uievt, void *param); void eve_view_set_color_bg(EVEView *view, uint8_t r, uint8_t g, uint8_t b); void eve_view_set_color_fg(EVEView *view, uint8_t r, uint8_t g, uint8_t b); uint8_t eve_view_clear(EVEView *view, uint8_t tag0); void eve_view_stack_init(EVEViewStack *stack); void eve_view_create(struct EVEWindow *window, EVEViewStack *stack, eve_view_constructor_t constructor); -void eve_view_destroy(struct EVEWindow *window, EVEViewStack *stack);
\ No newline at end of file +void eve_view_destroy(struct EVEWindow *window, EVEViewStack *stack); + +void eve_view_uievt_push(EVEView *view, uint16_t evt, void *param);
\ No newline at end of file |