From 2d9f22e056b61917979db67da49fc0655b0af3a4 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 7 Jan 2020 00:54:54 +0100 Subject: touch event hanlder: added tracking/dragging; text box: added drag/scroll capability; added keyboard --- code/fe310/eos/eve_text.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'code/fe310/eos/eve_text.h') diff --git a/code/fe310/eos/eve_text.h b/code/fe310/eos/eve_text.h index 350be45..794f430 100644 --- a/code/fe310/eos/eve_text.h +++ b/code/fe310/eos/eve_text.h @@ -1,19 +1,26 @@ #include -typedef struct EVEText { +typedef struct EOSText { int x; int y; int w; int h; - uint32_t buf_addr; int buf_line_h; int buf_idx; int line_idx; - uint8_t bitmap_handle; -} EVEText; + uint32_t buf_addr; + uint16_t transform_a; + uint16_t transform_e; + uint8_t tag; + uint8_t ch_h; + uint8_t ch_w; + uint8_t dl_size; + char dirty; +} EOSText; -void eos_eve_text_init(EVEText *box, int x, int y, int w, int h, uint8_t bitmap_handle, uint32_t mem_addr, int buf_line_h, uint32_t *mem_next); -void eos_eve_text_draw(EVEText *box); -void eos_eve_text_update(EVEText *box); -void eos_eve_text_putc(EVEText *box, int c); -void eos_eve_text_newline(EVEText *box); +void eos_text_init(EOSText *box, int x, int y, int w, int h, double scale_x, double scale_y, uint8_t tag, int buf_line_h, uint32_t mem_addr, uint32_t *mem_next); +void eos_text_draw(EOSText *box, uint8_t tag0, int touch_idx); +void eos_text_update(EOSText *box, int line_idx); +void eos_text_putc(EOSText *box, int c); +void eos_text_newline(EOSText *box); +void eos_text_backspace(EOSText *box); -- cgit v1.2.3