diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-03-27 22:08:31 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-03-27 22:08:31 +0100 |
commit | daa87d92b3df433578e53284a8c88083e24f8623 (patch) | |
tree | bb061a88510935f7bb91139ae618caaf9b546c96 /fw/fe310/eos/eve/screen/page.h | |
parent | 72a82b58ba87fe9ecc2718bfcb2b5f0432ffaea9 (diff) |
form/app cleanup; scroll infrastructure
Diffstat (limited to 'fw/fe310/eos/eve/screen/page.h')
-rw-r--r-- | fw/fe310/eos/eve/screen/page.h | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/fw/fe310/eos/eve/screen/page.h b/fw/fe310/eos/eve/screen/page.h index ded7185..26c33c5 100644 --- a/fw/fe310/eos/eve/screen/page.h +++ b/fw/fe310/eos/eve/screen/page.h @@ -1,6 +1,14 @@ #include <stdint.h> -#define EVE_PAGE_KBDCH_CLOSE 0x1a +#define EVE_PAGE_KBDCH_CLOSE 0x1a + +#define EVE_PAGE_OPT_SCROLL_X 0x01 +#define EVE_PAGE_OPT_SCROLL_Y 0x02 +#define EVE_PAGE_OPT_SCROLL_BACK 0x04 +#define EVE_PAGE_OPT_SCROLL_XY 0x08 +#define EVE_PAGE_OPT_TRACK_EXT_X 0x10 +#define EVE_PAGE_OPT_TRACK_EXT_Y 0x20 +#define EVE_PAGE_OPT_TRACK_EXT_XY (EVE_PAGE_OPT_TRACK_EXT_X | EVE_PAGE_OPT_TRACK_EXT_Y) struct EVEWidget; struct EVEPage; @@ -9,24 +17,40 @@ typedef void (*eve_page_destructor_t) (struct EVEPage *); typedef struct EVEPage { EVEView v; - int win_x; - int win_y; - eve_page_destructor_t destructor; + EVERect g; + int16_t x0; + int16_t y0; EVEViewStack *stack; + eve_page_destructor_t destructor; + struct EVEWidget *widget; + uint16_t widget_size; struct EVEWidget *widget_f; + EVEPhyLHO lho; + uint64_t lho_t0; + uint8_t track_mode; + uint8_t opt; } EVEPage; -void eve_page_init(EVEPage *page, EVEWindow *window, EVEViewStack *stack, eve_view_draw_t draw, eve_view_touch_t touch, eve_view_uievt_t uievt, eve_page_destructor_t destructor); +void eve_page_init(EVEPage *page, EVEWindow *window, EVEViewStack *stack, struct EVEWidget *widget, uint16_t widget_size, uint8_t opt,eve_view_draw_t draw, eve_view_touch_t touch, eve_view_uievt_t uievt, eve_page_destructor_t destructor); +void eve_page_update(EVEPage *page, struct EVEWidget *widget, uint16_t widget_size); void eve_page_open(EVEPage *parent, eve_view_constructor_t constructor); void eve_page_close(EVEPage *page); +/* Screen to page coordinates */ int16_t eve_page_x(EVEPage *page, int16_t x); int16_t eve_page_y(EVEPage *page, int16_t y); +/* Page to window coordinates */ +int16_t eve_page_win_x(EVEPage *page, int16_t x); +int16_t eve_page_win_y(EVEPage *page, int16_t y); +/* Page to screen coordinates */ int16_t eve_page_scr_x(EVEPage *page, int16_t x); int16_t eve_page_scr_y(EVEPage *page, int16_t y); - -void eve_page_set_focus(EVEPage *page, struct EVEWidget *widget, EVERect *focus); -struct EVEWidget *eve_page_get_focus(EVEPage *page); int eve_page_rect_visible(EVEPage *page, EVERect *g); -void eve_page_uievt_push(EVEPage *page, uint16_t evt, void *param);
\ No newline at end of file +void eve_page_focus(EVEPage *page, EVERect *rect); +void eve_page_focus_widget(EVEPage *page, struct EVEWidget *widget, EVERect *rect); +struct EVEWidget *eve_page_focus_widget_get(EVEPage *page); +struct EVEWidget *eve_page_widget(EVEPage *page, uint16_t idx); + +uint8_t eve_page_draw(EVEView *view, uint8_t tag0); +int eve_page_touch(EVEView *view, EVETouch *touch, uint16_t evt, uint8_t tag0); |