diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
commit | cf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch) | |
tree | a3b8cc23574b98e10874b51d33c9fe1bfc012663 /fw/fe310/eos/eve/widget/textw.h | |
parent | 5cd610a07468137066ea4daa5176c3e7045113b0 (diff) |
code -> fw
Diffstat (limited to 'fw/fe310/eos/eve/widget/textw.h')
-rw-r--r-- | fw/fe310/eos/eve/widget/textw.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/widget/textw.h b/fw/fe310/eos/eve/widget/textw.h new file mode 100644 index 0000000..cd46ea3 --- /dev/null +++ b/fw/fe310/eos/eve/widget/textw.h @@ -0,0 +1,39 @@ +#include <stdint.h> + +typedef struct EVETextCursor { + char on; + uint16_t x; + uint16_t line; + uint16_t ch; +} EVETextCursor; + +typedef struct EVETextWidget { + EVEWidget w; + EVEFont *font; + utf8_t *text; + uint16_t text_size; + uint16_t text_len; + uint16_t *line; + uint16_t line_size; + uint16_t line_len; + EVETextCursor cursor1; + EVETextCursor cursor2; + uint16_t line0; + uint8_t tag0; + uint8_t tagN; + struct { + EVETextCursor *cursor; + short dx; + short dl; + char mode; + } track; +} EVETextWidget; + +void eve_textw_init(EVETextWidget *widget, EVERect *g, EVEFont *font, utf8_t *text, uint16_t text_size, uint16_t *line, uint16_t line_size); +int eve_textw_touch(EVEWidget *_widget, EVEPage *page, uint8_t tag0, int touch_idx); +uint8_t eve_textw_draw(EVEWidget *_widget, EVEPage *page, uint8_t tag0); +void eve_textw_putc(void *_w, int c); +uint16_t eve_textw_update(EVETextWidget *widget, EVEPage *page, uint16_t line); +void eve_textw_cursor_update(EVETextWidget *widget, EVETextCursor *cursor); +void eve_textw_cursor_set(EVETextWidget *widget, EVETextCursor *cursor, uint8_t tag, int16_t x); +void eve_textw_cursor_clear(EVETextWidget *widget, EVETextCursor *cursor); |