diff options
author | Uros Majstorovic <majstor@majstor.org> | 2024-09-04 17:01:05 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2024-09-04 17:01:05 +0200 |
commit | 16481ee83d7bde7a28dc8b0d767e0e59d78eb678 (patch) | |
tree | b57a851caaa964a6b5d2b798f0b74133b7ab5538 /fw/fe310/eos/eve/widget/textw.c | |
parent | 6da98500b8310c19d8b0745ce1b5adfc677ab6b1 (diff) |
unicode support improvements / bugfixes
Diffstat (limited to 'fw/fe310/eos/eve/widget/textw.c')
-rw-r--r-- | fw/fe310/eos/eve/widget/textw.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fw/fe310/eos/eve/widget/textw.c b/fw/fe310/eos/eve/widget/textw.c index 4348b67..d77e245 100644 --- a/fw/fe310/eos/eve/widget/textw.c +++ b/fw/fe310/eos/eve/widget/textw.c @@ -32,7 +32,8 @@ void eve_textw_init(EVETextWidget *widget, EVERect *g, EVEPage *page, EVEFont *font, utf8_t *text, uint16_t text_size, uint16_t *line, uint16_t line_size) { EVEWidget *_widget = &widget->w; - int rv, text_len; + size_t text_len; + int rv; memset(widget, 0, sizeof(EVETextWidget)); eve_widget_init(_widget, EVE_WIDGET_TYPE_TEXT, g, page, eve_textw_draw, eve_textw_touch, eve_textw_putc); @@ -327,7 +328,7 @@ void eve_textw_putc(void *w, int c) { if (!cursor1->on) return; if (!cursor2->on && ((c == CH_BS) || (c == CH_DEL))) { - utf32_t uc; + ucp_t uc; text = widget->text + cursor1->ch; switch (c) { @@ -371,7 +372,8 @@ void eve_textw_putc(void *w, int c) { ins_c = utf8_enc(c, utf8_buf); ch_w = eve_font_ch_w(widget->font, c); } else if (c == CH_CTRLV) { - int rv, clipb_len = 0; + size_t clipb_len = 0; + int rv; clipb = eve_clipb_get(); if (clipb) { @@ -431,7 +433,7 @@ void eve_textw_putc(void *w, int c) { uint16_t eve_textw_text_update(EVETextWidget *widget, uint16_t line, int uievt) { int i; - utf32_t ch; + ucp_t ch; uint8_t ch_w; uint8_t ch_l; uint16_t word_w, line_w, line_b; @@ -495,7 +497,7 @@ uint16_t eve_textw_text_update(EVETextWidget *widget, uint16_t line, int uievt) void eve_textw_cursor_update(EVETextWidget *widget, EVETextCursor *cursor) { int i = LINE_START(widget, cursor->line); uint16_t x = 0; - utf32_t ch; + ucp_t ch; uint8_t ch_l; EVEWidget *_widget = &widget->w; @@ -512,7 +514,7 @@ void eve_textw_cursor_set(EVETextWidget *widget, EVETextCursor *cursor, uint8_t int i; int16_t _x, _d; uint16_t c_line = LINE_EMPTY; - utf32_t ch; + ucp_t ch; uint8_t ch_w; uint8_t ch_l; EVEWidget *_widget = &widget->w; |