diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-03-24 23:13:42 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-03-24 23:13:42 +0100 |
commit | 95f69d4f83ad8f7fbb56349f29e902928510362b (patch) | |
tree | 51f4848b0518d138368af30f8e7abeebb89ebd5f /fw/fe310/eos/eve/screen/view.h | |
parent | 8c61343677d2ed8f929372863016524707b8ab93 (diff) |
window hierarchy
Diffstat (limited to 'fw/fe310/eos/eve/screen/view.h')
-rw-r--r-- | fw/fe310/eos/eve/screen/view.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/fw/fe310/eos/eve/screen/view.h b/fw/fe310/eos/eve/screen/view.h index 6164a88..f0e2eb0 100644 --- a/fw/fe310/eos/eve/screen/view.h +++ b/fw/fe310/eos/eve/screen/view.h @@ -4,16 +4,20 @@ struct EVEView; struct EVEViewStack; +struct EVEWindow; -typedef int (*eve_view_touch_t) (struct EVEView *, EVETouch *, uint16_t, uint8_t); typedef uint8_t (*eve_view_draw_t) (struct EVEView *, uint8_t); -typedef void (*eve_view_constructor_t) (EVEWindow *window, struct EVEViewStack *); +typedef int (*eve_view_touch_t) (struct EVEView *, EVETouch *, uint16_t, uint8_t); +typedef void (*eve_view_constructor_t) (struct EVEWindow *window, struct EVEViewStack *); typedef struct EVEView { - eve_view_touch_t touch; eve_view_draw_t draw; - EVEWindow *window; + eve_view_touch_t touch; + struct EVEWindow *window; void *param; + uint32_t color_bg; + uint32_t color_fg; + uint8_t tag; } EVEView; typedef struct EVEViewStack { @@ -21,7 +25,11 @@ typedef struct EVEViewStack { 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_init(EVEView *view, struct EVEWindow *window, eve_view_draw_t draw, eve_view_touch_t touch, 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(EVEWindow *window, EVEViewStack *stack, eve_view_constructor_t constructor); -void eve_view_destroy(EVEWindow *window, EVEViewStack *stack);
\ No newline at end of file +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 |