From 86b34460dd80d6c3e35d903a6ee29ab943137704 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Fri, 1 Feb 2019 23:53:09 +0100 Subject: [PATCH 001/590] Added POS1 and END support to lv_ta --- lv_core/lv_group.h | 2 ++ lv_objx/lv_ta.c | 19 ++++++++++++++----- lv_objx/lv_ta.h | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 6be9b5ccab79..7aac83d60708 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -36,6 +36,8 @@ extern "C" { #define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/ #define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ #define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ +#define LV_GROUP_KEY_POS1 2 /*0x02, STX*/ +#define LV_GROUP_KEY_END 3 /*0x03, ETX*/ #if USE_LV_GROUP != 0 /********************** diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 69c12ce030d3..f6d3a4614dd7 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -351,6 +351,17 @@ void lv_ta_del_char(lv_obj_t * ta) lv_ta_set_cursor_pos(ta, ext->cursor.pos - 1); } +/** + * Delete the right character from the current cursor position + * @param ta pointer to a text area object + */ +void lv_ta_del_char_forward(lv_obj_t * ta) +{ + uint16_t cp = lv_ta_get_cursor_pos(ta); + lv_ta_set_cursor_pos(ta, cp + 1); + if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta); +} + /*===================== * Setter functions *====================*/ @@ -1051,11 +1062,9 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) else if(c == LV_GROUP_KEY_UP) lv_ta_cursor_up(ta); else if(c == LV_GROUP_KEY_DOWN) lv_ta_cursor_down(ta); else if(c == LV_GROUP_KEY_BACKSPACE) lv_ta_del_char(ta); - else if(c == LV_GROUP_KEY_DEL) { - uint16_t cp = lv_ta_get_cursor_pos(ta); - lv_ta_set_cursor_pos(ta, cp + 1); - if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta); - } + else if(c == LV_GROUP_KEY_DEL) lv_ta_del_char_forward(ta); + else if(c == LV_GROUP_KEY_POS1) lv_ta_set_cursor_pos(ta, 0); + else if(c == LV_GROUP_KEY_END) lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST); else { lv_ta_add_char(ta, c); } diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index 3227873a7d7b..dd38cc857499 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -122,6 +122,12 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt); */ void lv_ta_del_char(lv_obj_t * ta); +/** + * Delete the right character from the current cursor position + * @param ta pointer to a text area object + */ +void lv_ta_del_char_forward(lv_obj_t * ta); + /*===================== * Setter functions *====================*/ From dc9cffec5d316c4c19a062f732abdf479359d314 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 00:19:18 +0100 Subject: [PATCH 002/590] Position cursor at the position at which lv_ta was clicked --- lv_objx/lv_ta.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 69c12ce030d3..521ca61adcda 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -53,6 +53,7 @@ static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); +static lv_res_t label_signal_wrapper(lv_obj_t * ta, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES @@ -61,6 +62,7 @@ static lv_design_func_t ancestor_design; static lv_design_func_t scrl_design; static lv_signal_func_t ancestor_signal; static lv_signal_func_t scrl_signal; +static lv_signal_func_t label_signal_original; /********************** * MACROS @@ -153,6 +155,11 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_ta); } + /*Wrap the labels signal function and make it clickable*/ + if(label_signal_original) label_signal_original = lv_obj_get_signal_func(ext->label); + lv_obj_set_signal_func(ext->label, label_signal_wrapper); + lv_obj_set_click(ext->label, true); + #if USE_LV_ANIMATION /*Create a cursor blinker animation*/ lv_anim_t a; @@ -1090,7 +1097,36 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); } #endif + } else if(sign == LV_SIGNAL_PRESSED) { + lv_indev_t * indev = (lv_indev_t *)param; + lv_area_t label_coords; + uint16_t index_of_char_at_position; + + lv_obj_get_coords(ext->label, &label_coords); + + lv_point_t relative_position = { + indev->proc.act_point.x - label_coords.x1, + indev->proc.act_point.y - label_coords.y1 + }; + + lv_coord_t label_width = lv_obj_get_width(ext->label); + + /*Check if the click happend on the left side of the area ouside the label*/ + if (relative_position.x < 0) { + index_of_char_at_position = 0; + } + /*Check if the click happend on the right side of the area ouside the label*/ + else if (relative_position.x >= label_width) { + index_of_char_at_position = LV_TA_CURSOR_LAST; + } + else { + index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); + + } + + lv_ta_set_cursor_pos(ta, index_of_char_at_position); } + return res; } @@ -1345,4 +1381,27 @@ static void refr_cursor_area(lv_obj_t * ta) lv_inv_area(&area_tmp); } +static lv_res_t label_signal_wrapper(lv_obj_t * label, lv_signal_t sign, void * param) +{ + if(sign == LV_SIGNAL_PRESSED) { + lv_obj_t * parent; + + parent = lv_obj_get_parent(label); + /*Get the parent (ta) of the parent (scrl part)*/ + parent = parent ? lv_obj_get_parent(parent) : NULL; + + /*Forward the pressed event to the parent, which is the ta*/ + if(parent) { + lv_signal_func_t parent_signal = lv_obj_get_signal_func(parent); + + if(parent_signal) { + if(parent_signal(parent, sign, param) != LV_RES_OK) return LV_RES_INV; + } + } + } + + if(label_signal_original) return label_signal_original(label, sign, param); + + return LV_RES_OK; +} #endif From 4e61a2da338818914aa3b3c544c9a483a1702b41 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 00:21:50 +0100 Subject: [PATCH 003/590] Fixed missing NULL check --- lv_objx/lv_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 521ca61adcda..4518bfd6c31b 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -156,7 +156,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) } /*Wrap the labels signal function and make it clickable*/ - if(label_signal_original) label_signal_original = lv_obj_get_signal_func(ext->label); + if(label_signal_original == NULL) label_signal_original = lv_obj_get_signal_func(ext->label); lv_obj_set_signal_func(ext->label, label_signal_wrapper); lv_obj_set_click(ext->label, true); From 8acc122ab0569710e9a1e83a097974e839a93ef6 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 01:26:52 +0100 Subject: [PATCH 004/590] Added placeholder label to text area --- lv_objx/lv_ta.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ lv_objx/lv_ta.h | 16 ++++++++++ 2 files changed, 100 insertions(+) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 69c12ce030d3..e89caacedf17 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -53,6 +53,7 @@ static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); +static void placeholder_update(lv_obj_t * ta); /********************** * STATIC VARIABLES @@ -247,6 +248,8 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) /*Revert the original edge flash state*/ lv_ta_set_edge_flash(ta, edge_flash_en); + + placeholder_update(ta); } /** @@ -310,6 +313,8 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) /*Revert the original edge flash state*/ lv_ta_set_edge_flash(ta, edge_flash_en); + + placeholder_update(ta); } /** @@ -349,6 +354,8 @@ void lv_ta_del_char(lv_obj_t * ta) /*Move the cursor to the place of the deleted character*/ lv_ta_set_cursor_pos(ta, ext->cursor.pos - 1); + + placeholder_update(ta); } /*===================== @@ -411,6 +418,29 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) pwd_char_hider(ta); #endif } + + placeholder_update(ta); +} + +/** +* Set the placeholder text of a text area +* @param ta pointer to a text area +* @param txt pointer to the text +*/ +void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + /*Create the placeholder label only when it is needed*/ + if (ext->placeholder == NULL) { + ext->placeholder = lv_label_create(ta, NULL); + + lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_CROP); + } + + lv_label_set_text(ext->placeholder, txt); + + placeholder_update(ta); } /** @@ -663,6 +693,9 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) lv_obj_refresh_ext_size(lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ refr_cursor_area(ta); break; + case LV_TA_STYLE_PLACEHOLDER: + if(ext->placeholder) lv_label_set_style(ext->placeholder, style); + break; } } @@ -689,6 +722,21 @@ const char * lv_ta_get_text(const lv_obj_t * ta) return txt; } +/** +* Get the placeholder text of a text area +* @param ta pointer to a text area object +* @return pointer to the text +*/ +const char * lv_ta_get_placeholder_text(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + const char * txt = NULL; + + if (ext->placeholder) txt = lv_label_get_text(ext->label); + + return txt; +} /** * Get the label of a text area @@ -793,6 +841,9 @@ lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) case LV_TA_STYLE_CURSOR: style = ext->cursor.style; break; + case LV_TA_STYLE_PLACEHOLDER: + if (ext->placeholder) style = lv_label_get_style(ext->placeholder); + break; default: style = NULL; break; @@ -1026,6 +1077,11 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /*In not one line mode refresh the Label width because 'hpad' can modify it*/ lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); /*Be sure the Label is in the correct position*/ + + if(ext->placeholder) { + lv_obj_set_width(ext->placeholder, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.hor, style_scrl->body.padding.ver); /*Be sure the Label is in the correct position*/ + } } lv_label_set_text(ext->label, NULL); @@ -1041,6 +1097,19 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); lv_label_set_text(ext->label, NULL); /*Refresh the label*/ + refr_cursor_area(ta); + } + } + /*Set the placeholder width according to the text area width*/ + if (ext->placeholder) { + if (lv_obj_get_width(ta) != lv_area_get_width(param) || + lv_obj_get_height(ta) != lv_area_get_height(param)) { + lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_set_width(ext->placeholder, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/ + refr_cursor_area(ta); } } @@ -1345,4 +1414,19 @@ static void refr_cursor_area(lv_obj_t * ta) lv_inv_area(&area_tmp); } +static void placeholder_update(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + const char *ta_text; + + if (ext->placeholder == NULL) return; + + ta_text = lv_ta_get_text(ta); + + uint32_t len = ta_text == NULL ? 0 : strlen(ta_text); + + if(len == 0) lv_obj_set_hidden(ext->placeholder, false); + else lv_obj_set_hidden(ext->placeholder, true); +} + #endif diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index 3227873a7d7b..f9c082790986 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -59,6 +59,7 @@ typedef struct lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ lv_obj_t * label; /*Label of the text area*/ + lv_obj_t * placeholder; /*Place holder label of the text area, only visible if text is an empty string*/ char * pwd_tmp; /*Used to store the original text in password mode*/ const char * accapted_chars;/*Only these characters will be accepted. NULL: accept all*/ uint16_t max_length; /*The max. number of characters. 0: no limit*/ @@ -80,6 +81,7 @@ enum { LV_TA_STYLE_SB, LV_TA_STYLE_EDGE_FLASH, LV_TA_STYLE_CURSOR, + LV_TA_STYLE_PLACEHOLDER, }; typedef uint8_t lv_ta_style_t; @@ -133,6 +135,13 @@ void lv_ta_del_char(lv_obj_t * ta); */ void lv_ta_set_text(lv_obj_t * ta, const char * txt); +/** +* Set the placeholder text of a text area +* @param ta pointer to a text area +* @param txt pointer to the text +*/ +void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt); + /** * Set the cursor position * @param obj pointer to a text area object @@ -245,6 +254,13 @@ void lv_ta_set_style(lv_obj_t *ta, lv_ta_style_t type, lv_style_t *style); */ const char * lv_ta_get_text(const lv_obj_t * ta); +/** +* Get the placeholder text of a text area +* @param ta pointer to a text area object +* @return pointer to the text +*/ +const char * lv_ta_get_placeholder_text(lv_obj_t * ta); + /** * Get the label of a text area * @param ta pointer to a text area object From e1afa61128a0a91a306447a9224ca38813da2443 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 2 Feb 2019 04:46:19 +0100 Subject: [PATCH 005/590] multi-disp: inital changes --- lv_hal/lv_hal_disp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 131b948cc347..fbbadbf7c9f5 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -33,6 +33,10 @@ extern "C" { * Display Driver structure to be registered by HAL */ typedef struct _disp_drv_t { + lv_coord_t hor_res; + + lv_coord_t ver_res; + /*Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished*/ void (*disp_flush)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); @@ -59,6 +63,10 @@ typedef struct _disp_drv_t { typedef struct _disp_t { lv_disp_drv_t driver; + lv_area_t inv_buf[32]; + lv_ll_t scr_ll; + lv_obj_t * act_scr; + lv_obj_t * top_scr; struct _disp_t *next; } lv_disp_t; From 1e6dc74c5a76bafe541490cd75ec3f0d88eaea1c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 2 Feb 2019 05:00:59 +0100 Subject: [PATCH 006/590] lv_ta click simplification --- lv_objx/lv_ta.c | 85 ++++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 57 deletions(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 4518bfd6c31b..3b5510cac4fb 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -53,7 +53,6 @@ static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); -static lv_res_t label_signal_wrapper(lv_obj_t * ta, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES @@ -62,7 +61,6 @@ static lv_design_func_t ancestor_design; static lv_design_func_t scrl_design; static lv_signal_func_t ancestor_signal; static lv_signal_func_t scrl_signal; -static lv_signal_func_t label_signal_original; /********************** * MACROS @@ -155,11 +153,6 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_ta); } - /*Wrap the labels signal function and make it clickable*/ - if(label_signal_original == NULL) label_signal_original = lv_obj_get_signal_func(ext->label); - lv_obj_set_signal_func(ext->label, label_signal_wrapper); - lv_obj_set_click(ext->label, true); - #if USE_LV_ANIMATION /*Create a cursor blinker animation*/ lv_anim_t a; @@ -1097,7 +1090,34 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); } #endif - } else if(sign == LV_SIGNAL_PRESSED) { + } + return res; +} + +/** + * Signal function of the scrollable part of the text area + * @param scrl pointer to scrollable part of a text area object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted + */ +static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param) +{ + lv_res_t res; + + /* Include the ancient signal function */ + res = scrl_signal(scrl, sign, param); + if(res != LV_RES_OK) return res; + + lv_obj_t * ta = lv_obj_get_parent(scrl); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + /*Set ext. size because the cursor might be out of this object*/ + lv_style_t * style_label = lv_obj_get_style(ext->label); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); + scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); + } + else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = (lv_indev_t *)param; lv_area_t label_coords; uint16_t index_of_char_at_position; @@ -1127,32 +1147,6 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_ta_set_cursor_pos(ta, index_of_char_at_position); } - return res; -} - -/** - * Signal function of the scrollable part of the text area - * @param scrl pointer to scrollable part of a text area object - * @param sign a signal type from lv_signal_t enum - * @param param pointer to a signal specific variable - * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted - */ -static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param) -{ - lv_res_t res; - - /* Include the ancient signal function */ - res = scrl_signal(scrl, sign, param); - if(res != LV_RES_OK) return res; - - if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - /*Set ext. size because the cursor might be out of this object*/ - lv_obj_t * ta = lv_obj_get_parent(scrl); - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); - scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); - } return res; } @@ -1381,27 +1375,4 @@ static void refr_cursor_area(lv_obj_t * ta) lv_inv_area(&area_tmp); } -static lv_res_t label_signal_wrapper(lv_obj_t * label, lv_signal_t sign, void * param) -{ - if(sign == LV_SIGNAL_PRESSED) { - lv_obj_t * parent; - - parent = lv_obj_get_parent(label); - /*Get the parent (ta) of the parent (scrl part)*/ - parent = parent ? lv_obj_get_parent(parent) : NULL; - - /*Forward the pressed event to the parent, which is the ta*/ - if(parent) { - lv_signal_func_t parent_signal = lv_obj_get_signal_func(parent); - - if(parent_signal) { - if(parent_signal(parent, sign, param) != LV_RES_OK) return LV_RES_INV; - } - } - } - - if(label_signal_original) return label_signal_original(label, sign, param); - - return LV_RES_OK; -} #endif From cfe0c14e56a7fd369d8703fa3155afa79a7f2851 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 2 Feb 2019 05:11:18 +0100 Subject: [PATCH 007/590] ta click: add to lv_ta_signal too --- lv_objx/lv_ta.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 3b5510cac4fb..1b322c6bbe7f 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1091,6 +1091,30 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } #endif } + else if(sign == LV_SIGNAL_PRESSED) { + lv_indev_t * indev = (lv_indev_t *)param; + lv_area_t label_coords; + uint16_t index_of_char_at_position; + + lv_obj_get_coords(ext->label, &label_coords); + + lv_point_t relative_position; + relative_position.x = indev->proc.act_point.x - label_coords.x1; + relative_position.y = indev->proc.act_point.y - label_coords.y1; + + lv_coord_t label_width = lv_obj_get_width(ext->label); + + /*Check if the click happened on the left side of the area outside the label*/ + if (relative_position.x < label_width / 2) { + index_of_char_at_position = 0; + } + /*Check if the click happened on the right side of the area outside the label*/ + else if (relative_position.x >= label_width / 2) { + index_of_char_at_position = LV_TA_CURSOR_LAST; + } + + lv_ta_set_cursor_pos(ta, index_of_char_at_position); + } return res; } @@ -1124,18 +1148,18 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_get_coords(ext->label, &label_coords); - lv_point_t relative_position = { - indev->proc.act_point.x - label_coords.x1, - indev->proc.act_point.y - label_coords.y1 - }; + lv_point_t relative_position; + relative_position.x = indev->proc.act_point.x - label_coords.x1; + relative_position.y = indev->proc.act_point.y - label_coords.y1; + lv_coord_t label_width = lv_obj_get_width(ext->label); - /*Check if the click happend on the left side of the area ouside the label*/ + /*Check if the click happened on the left side of the area outside the label*/ if (relative_position.x < 0) { index_of_char_at_position = 0; } - /*Check if the click happend on the right side of the area ouside the label*/ + /*Check if the click happened on the right side of the area outside the label*/ else if (relative_position.x >= label_width) { index_of_char_at_position = LV_TA_CURSOR_LAST; } From 0d76cc4ef3b707bcad82827a26502fcf042f60ef Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 22:45:02 +0100 Subject: [PATCH 008/590] Changed POS1 to HOME --- lv_core/lv_group.h | 2 +- lv_objx/lv_ta.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 7aac83d60708..133d5954e288 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -36,7 +36,7 @@ extern "C" { #define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/ #define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ #define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ -#define LV_GROUP_KEY_POS1 2 /*0x02, STX*/ +#define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ #define LV_GROUP_KEY_END 3 /*0x03, ETX*/ #if USE_LV_GROUP != 0 diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index f6d3a4614dd7..951f32049763 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1063,7 +1063,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) else if(c == LV_GROUP_KEY_DOWN) lv_ta_cursor_down(ta); else if(c == LV_GROUP_KEY_BACKSPACE) lv_ta_del_char(ta); else if(c == LV_GROUP_KEY_DEL) lv_ta_del_char_forward(ta); - else if(c == LV_GROUP_KEY_POS1) lv_ta_set_cursor_pos(ta, 0); + else if(c == LV_GROUP_KEY_HOME) lv_ta_set_cursor_pos(ta, 0); else if(c == LV_GROUP_KEY_END) lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST); else { lv_ta_add_char(ta, c); From 43b20179ed4c678e5bb7e705dfa4893051fd0195 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 22:59:28 +0100 Subject: [PATCH 009/590] removed code duplication --- lv_objx/lv_ta.c | 82 ++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 49 deletions(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 1b322c6bbe7f..9c1fd3abc3e3 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -53,6 +53,7 @@ static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); +static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source); /********************** * STATIC VARIABLES @@ -1092,28 +1093,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) #endif } else if(sign == LV_SIGNAL_PRESSED) { - lv_indev_t * indev = (lv_indev_t *)param; - lv_area_t label_coords; - uint16_t index_of_char_at_position; - - lv_obj_get_coords(ext->label, &label_coords); - - lv_point_t relative_position; - relative_position.x = indev->proc.act_point.x - label_coords.x1; - relative_position.y = indev->proc.act_point.y - label_coords.y1; - - lv_coord_t label_width = lv_obj_get_width(ext->label); - - /*Check if the click happened on the left side of the area outside the label*/ - if (relative_position.x < label_width / 2) { - index_of_char_at_position = 0; - } - /*Check if the click happened on the right side of the area outside the label*/ - else if (relative_position.x >= label_width / 2) { - index_of_char_at_position = LV_TA_CURSOR_LAST; - } - - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + update_cursor_position_on_click(ta, (lv_indev_t *) param); } return res; } @@ -1142,33 +1122,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); } else if(sign == LV_SIGNAL_PRESSED) { - lv_indev_t * indev = (lv_indev_t *)param; - lv_area_t label_coords; - uint16_t index_of_char_at_position; - - lv_obj_get_coords(ext->label, &label_coords); - - lv_point_t relative_position; - relative_position.x = indev->proc.act_point.x - label_coords.x1; - relative_position.y = indev->proc.act_point.y - label_coords.y1; - - - lv_coord_t label_width = lv_obj_get_width(ext->label); - - /*Check if the click happened on the left side of the area outside the label*/ - if (relative_position.x < 0) { - index_of_char_at_position = 0; - } - /*Check if the click happened on the right side of the area outside the label*/ - else if (relative_position.x >= label_width) { - index_of_char_at_position = LV_TA_CURSOR_LAST; - } - else { - index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); - - } - - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + update_cursor_position_on_click(ta, (lv_indev_t *)param); } @@ -1399,4 +1353,34 @@ static void refr_cursor_area(lv_obj_t * ta) lv_inv_area(&area_tmp); } +static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + lv_area_t label_coords; + uint16_t index_of_char_at_position; + + lv_obj_get_coords(ext->label, &label_coords); + + lv_point_t relative_position; + relative_position.x = click_source->proc.act_point.x - label_coords.x1; + relative_position.y = click_source->proc.act_point.y - label_coords.y1; + + lv_coord_t label_width = lv_obj_get_width(ext->label); + + /*Check if the click happened on the left side of the area outside the label*/ + if (relative_position.x < 0) { + index_of_char_at_position = 0; + } + /*Check if the click happened on the right side of the area outside the label*/ + else if (relative_position.x >= label_width) { + index_of_char_at_position = LV_TA_CURSOR_LAST; + } + else { + index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); + } + + lv_ta_set_cursor_pos(ta, index_of_char_at_position); +} + #endif From a71964f0b266c36412dfb17c7202745b765db288 Mon Sep 17 00:00:00 2001 From: MiSimon Date: Sat, 2 Feb 2019 23:25:11 +0100 Subject: [PATCH 010/590] Removed some spaces --- lv_objx/lv_ta.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index e89caacedf17..971a3beefbb2 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -432,7 +432,7 @@ void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt) lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); /*Create the placeholder label only when it is needed*/ - if (ext->placeholder == NULL) { + if(ext->placeholder == NULL) { ext->placeholder = lv_label_create(ta, NULL); lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_CROP); @@ -733,7 +733,7 @@ const char * lv_ta_get_placeholder_text(lv_obj_t * ta) const char * txt = NULL; - if (ext->placeholder) txt = lv_label_get_text(ext->label); + if(ext->placeholder) txt = lv_label_get_text(ext->label); return txt; } @@ -842,7 +842,7 @@ lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) style = ext->cursor.style; break; case LV_TA_STYLE_PLACEHOLDER: - if (ext->placeholder) style = lv_label_get_style(ext->placeholder); + if(ext->placeholder) style = lv_label_get_style(ext->placeholder); break; default: style = NULL; @@ -1101,8 +1101,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } } /*Set the placeholder width according to the text area width*/ - if (ext->placeholder) { - if (lv_obj_get_width(ta) != lv_area_get_width(param) || + if(ext->placeholder) { + if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); @@ -1417,9 +1417,9 @@ static void refr_cursor_area(lv_obj_t * ta) static void placeholder_update(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - const char *ta_text; + const char * ta_text; - if (ext->placeholder == NULL) return; + if(ext->placeholder == NULL) return; ta_text = lv_ta_get_text(ta); From 2692100bb1a14dc4d306f9fb9402b36624f2606a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 3 Feb 2019 00:47:50 +0100 Subject: [PATCH 011/590] multi-disp: minor update --- lv_hal/lv_hal_disp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index fbbadbf7c9f5..15019ef43986 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -67,6 +67,7 @@ typedef struct _disp_t { lv_ll_t scr_ll; lv_obj_t * act_scr; lv_obj_t * top_scr; + uint8_t orientation:2; struct _disp_t *next; } lv_disp_t; From e2e6479fb07d5f88d8dfd6335dea346acc54d7d1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Feb 2019 19:17:10 +0100 Subject: [PATCH 012/590] multi_disp: add dynamic hor/ver res --- lv_conf_checker.h | 4 +-- lv_core/lv_disp.c | 54 ++++++++++++++++++++++++++++++++++++++++ lv_core/lv_disp.h | 42 +++++++++++++++++++++++++++++++ lv_core/lv_obj.c | 4 +-- lv_core/lv_obj.h | 2 +- lv_core/lv_refr.c | 6 ++--- lv_draw/lv_draw_rbasic.c | 2 +- lv_draw/lv_draw_vbasic.c | 2 +- lv_hal/lv_hal_disp.h | 1 + lv_objx/lv_btnm.c | 2 +- lv_objx/lv_chart.c | 2 +- lv_objx/lv_kb.c | 2 +- lv_objx/lv_mbox.c | 2 +- lv_objx/lv_tabview.c | 4 +-- lv_objx/lv_tileview.c | 6 ++--- lv_objx/lv_win.c | 3 +-- lvgl.h | 1 + 17 files changed, 118 insertions(+), 21 deletions(-) create mode 100644 lv_core/lv_disp.c create mode 100644 lv_core/lv_disp.h diff --git a/lv_conf_checker.h b/lv_conf_checker.h index e4caa9480169..10f6a14364d2 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -62,10 +62,10 @@ /* Horizontal and vertical resolution of the library.*/ #ifndef LV_HOR_RES -#define LV_HOR_RES (480) +//#define LV_HOR_RES (480) #endif #ifndef LV_VER_RES -#define LV_VER_RES (320) +//#define LV_VER_RES (320) #endif /* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide diff --git a/lv_core/lv_disp.c b/lv_core/lv_disp.c new file mode 100644 index 000000000000..d4fc22e25a5e --- /dev/null +++ b/lv_core/lv_disp.c @@ -0,0 +1,54 @@ +/** + * @file lv_disp.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_disp.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) +{ + if(disp == NULL) disp = lv_disp_get_active(); + + if(disp == NULL) return LV_HOR_RES_MAX; + else return disp->driver.hor_res; +} + + +lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) +{ + if(disp == NULL) disp = lv_disp_get_active(); + + if(disp == NULL) return LV_VER_RES_MAX; + else return disp->driver.ver_res; +} + +/********************** + * STATIC FUNCTIONS + **********************/ diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h new file mode 100644 index 000000000000..89db388f9e97 --- /dev/null +++ b/lv_core/lv_disp.h @@ -0,0 +1,42 @@ +/** + * @file lv_disp.h + * + */ + +#ifndef LV_DISP_H +#define LV_DISP_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#include "../lv_hal/lv_hal_disp.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); +lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); + +/********************** + * MACROS + **********************/ + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_TEMPL_H*/ diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index a58ead8c2c29..ae8f45178ca0 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -144,8 +144,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Set coordinates to full screen size*/ new_obj->coords.x1 = 0; new_obj->coords.y1 = 0; - new_obj->coords.x2 = LV_HOR_RES - 1; - new_obj->coords.y2 = LV_VER_RES - 1; + new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1; + new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; new_obj->ext_size = 0; /*Init realign*/ diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index cfd8a8ac3892..7f8f848ab89c 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -33,7 +33,7 @@ extern "C" { *********************/ /*Error check of lv_conf.h*/ -#if LV_HOR_RES == 0 || LV_VER_RES == 0 +#if LV_HOR_RES_MAX == 0 || LV_VER_RES_MAX == 0 #error "LittlevGL: LV_HOR_RES and LV_VER_RES must be greater than 0" #endif diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index d6987832a7bf..98c3a27092b0 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -102,8 +102,8 @@ void lv_inv_area(const lv_area_t * area_p) lv_area_t scr_area; scr_area.x1 = 0; scr_area.y1 = 0; - scr_area.x2 = LV_HOR_RES - 1; - scr_area.y2 = LV_VER_RES - 1; + scr_area.x2 = LV_HOR_RES_MAX - 1; + scr_area.y2 = LV_VER_RES_MAX - 1; lv_area_t com_area; bool suc; @@ -346,7 +346,7 @@ static void lv_refr_area_with_vdb(const lv_area_t * area_p) /*Calculate the max row num*/ lv_coord_t w = lv_area_get_width(area_p); lv_coord_t h = lv_area_get_height(area_p); - lv_coord_t y2 = area_p->y2 >= LV_VER_RES ? y2 = LV_VER_RES - 1 : area_p->y2; + lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(NULL) ? y2 = lv_disp_get_ver_res(NULL) - 1 : area_p->y2; int32_t max_row = (uint32_t) LV_VDB_SIZE / w; diff --git a/lv_draw/lv_draw_rbasic.c b/lv_draw/lv_draw_rbasic.c index 369adf5239bc..64755492447c 100644 --- a/lv_draw/lv_draw_rbasic.c +++ b/lv_draw/lv_draw_rbasic.c @@ -79,7 +79,7 @@ void lv_rfill(const lv_area_t * cords_p, const lv_area_t * mask_p, union_ok = lv_area_intersect(&masked_area, cords_p, mask_p); } else { lv_area_t scr_area; - lv_area_set(&scr_area, 0, 0, LV_HOR_RES - 1, LV_VER_RES - 1); + lv_area_set(&scr_area, 0, 0, lv_disp_get_hor_res(NULL) - 1, lv_disp_get_ver_res(NULL) - 1); union_ok = lv_area_intersect(&masked_area, cords_p, &scr_area); } diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_vbasic.c index c8b2fab558ba..8ab12785687a 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_vbasic.c @@ -147,7 +147,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, #if USE_LV_GPU - static lv_color_t color_array_tmp[LV_HOR_RES]; /*Used by 'lv_disp_mem_blend'*/ + static lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ static lv_coord_t last_width = -1; lv_coord_t w = lv_area_get_width(&vdb_rel_a); diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 15019ef43986..e298b4ac863d 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -20,6 +20,7 @@ extern "C" { #include "lv_hal.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" +#include "../lv_core/lv_obj.h" /********************* * DEFINES diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 07e6a72b289a..33abbf20c90a 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -97,7 +97,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new button matrix object*/ if(copy == NULL) { - lv_obj_set_size(new_btnm, LV_HOR_RES / 2, LV_VER_RES / 4); + lv_obj_set_size(new_btnm, LV_DPI * 3, LV_DPI * 2); lv_btnm_set_map(new_btnm, lv_btnm_def_map); /*Set the default styles*/ diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 1dedaa7a4424..0904bb91fa93 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -90,7 +90,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new chart background object*/ if(copy == NULL) { - lv_obj_set_size(new_chart, LV_HOR_RES / 3, LV_VER_RES / 3); + lv_obj_set_size(new_chart, LV_DPI * 3, LV_DPI * 2); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 395fc8d5d41e..d41b5962d30e 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -102,7 +102,7 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new keyboard keyboard*/ if(copy == NULL) { - lv_obj_set_size(new_kb, LV_HOR_RES, LV_VER_RES / 2); + lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_btnm_set_action(new_kb, lv_kb_def_action); lv_btnm_set_map(new_kb, kb_map_lc); diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index af53ddd4dbaf..ac355d10a757 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -91,7 +91,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_cont_set_layout(new_mbox, LV_LAYOUT_COL_M); lv_cont_set_fit(new_mbox, false, true); - lv_obj_set_width(new_mbox, LV_HOR_RES / 2); + lv_obj_set_width(new_mbox, LV_DPI * 2); lv_obj_align(new_mbox, NULL, LV_ALIGN_CENTER, 0, 0); /*Set the default styles*/ diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 8b16ec8785c3..c09560fbded4 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -106,7 +106,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_name_ptr[0] = ""; ext->tab_cnt = 0; - lv_obj_set_size(new_tabview, LV_HOR_RES, LV_VER_RES); + lv_obj_set_size(new_tabview, LV_DPI * 3, LV_DPI * 2); ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); @@ -123,7 +123,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_cont_set_fit(ext->content, true, false); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); lv_cont_set_style(ext->content, &lv_style_transp_tight); - lv_obj_set_height(ext->content, LV_VER_RES - lv_obj_get_height(ext->btns)); + lv_obj_set_height(ext->content, lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); /*Set the default styles*/ diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index c80cfecad477..447534f321f9 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -89,7 +89,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new tileview*/ if(copy == NULL) { - lv_obj_set_size(new_tileview, LV_HOR_RES, LV_VER_RES); + lv_obj_set_size(new_tileview, LV_DPI * 3, LV_DPI * 3); lv_obj_set_drag_throw(lv_page_get_scrl(new_tileview), false); lv_page_set_scrl_fit(new_tileview, true, true); /*Set the default styles*/ @@ -506,8 +506,8 @@ static void drag_end_handler(lv_obj_t * tileview) lv_obj_t * scrl = lv_page_get_scrl(tileview); lv_point_t p; - p.x = - (scrl->coords.x1 - LV_HOR_RES / 2); - p.y = - (scrl->coords.y1 - LV_VER_RES / 2); + p.x = - (scrl->coords.x1 - lv_obj_get_width(tileview) / 2); + p.y = - (scrl->coords.y1 - lv_obj_get_height(tileview) / 2); /*From the drag vector (drag throw) predict the end position*/ if(ext->drag_hor) { diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 3bc968dda2d6..60dfe4784f5b 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -70,7 +70,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new window object*/ if(copy == NULL) { - lv_obj_set_size(new_win, LV_HOR_RES, LV_VER_RES); + lv_obj_set_size(new_win, LV_DPI * 3, LV_DPI * 3); lv_obj_set_pos(new_win, 0, 0); lv_obj_set_style(new_win, &lv_style_pretty); @@ -107,7 +107,6 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) } lv_obj_set_signal_func(new_win, lv_win_signal); - lv_obj_set_size(new_win, LV_HOR_RES, LV_VER_RES); } /*Copy an existing object*/ else { diff --git a/lvgl.h b/lvgl.h index 2d0dd560d361..6aab3e4e0b95 100644 --- a/lvgl.h +++ b/lvgl.h @@ -26,6 +26,7 @@ extern "C" { #include "lv_core/lv_lang.h" #include "lv_core/lv_vdb.h" #include "lv_core/lv_refr.h" +#include "lv_core/lv_disp.h" #include "lv_themes/lv_theme.h" From 5b92b4d01bca2f7123a881f2e3e83c31df34f5e9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 10 Feb 2019 11:06:47 +0100 Subject: [PATCH 013/590] move basic descriptors to lv_disp_t --- lv_core/lv_disp.c | 17 ------- lv_core/lv_disp.h | 2 +- lv_core/lv_indev.c | 47 ++++++++++-------- lv_core/lv_obj.c | 103 ++++++++++++++++++++++----------------- lv_core/lv_obj.h | 14 ++---- lv_draw/lv_draw_rbasic.c | 2 +- lv_draw/lv_draw_vbasic.c | 2 +- lv_hal/lv_hal.h | 6 +-- lv_hal/lv_hal_disp.c | 72 ++++++++++++++------------- lv_hal/lv_hal_disp.h | 26 ++++------ lv_hal/lv_hal_indev.c | 36 ++++++-------- lv_hal/lv_hal_indev.h | 16 +++--- lv_misc/lv_gc.h | 9 +--- 13 files changed, 167 insertions(+), 185 deletions(-) diff --git a/lv_core/lv_disp.c b/lv_core/lv_disp.c index d4fc22e25a5e..29861b769111 100644 --- a/lv_core/lv_disp.c +++ b/lv_core/lv_disp.c @@ -32,23 +32,6 @@ * GLOBAL FUNCTIONS **********************/ -lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) -{ - if(disp == NULL) disp = lv_disp_get_active(); - - if(disp == NULL) return LV_HOR_RES_MAX; - else return disp->driver.hor_res; -} - - -lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) -{ - if(disp == NULL) disp = lv_disp_get_active(); - - if(disp == NULL) return LV_VER_RES_MAX; - else return disp->driver.ver_res; -} - /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index 89db388f9e97..952caf564970 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -13,7 +13,7 @@ extern "C" { /********************* * INCLUDES *********************/ -#include "../lv_hal/lv_hal_disp.h" +#include "../lv_hal/lv_hal.h" /********************* * DEFINES diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 1c2480ccedee..8be40082b717 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -121,12 +121,13 @@ void lv_indev_reset_lpr(lv_indev_t * indev) */ void lv_indev_enable(lv_hal_indev_type_t type, bool enable) { - lv_indev_t * i = lv_indev_next(NULL); - while(i) { - if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0; - i = lv_indev_next(i); - } +// lv_indev_t * i = lv_indev_next(NULL); +// +// while(i) { +// if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0; +// i = lv_indev_next(i); +// } } /** @@ -244,19 +245,23 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) */ uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev) { - uint32_t t; - - if(indev) return t = lv_tick_elaps(indev->last_activity_time); - - lv_indev_t * i; - t = UINT16_MAX; - i = lv_indev_next(NULL); - while(i) { - t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time)); - i = lv_indev_next(i); - } - return t; + //TODO +// uint32_t t; +// +// if(indev) return t = lv_tick_elaps(indev->last_activity_time); +// +// lv_indev_t * i; +// t = UINT16_MAX; +// i = lv_indev_next(NULL); +// while(i) { +// t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time)); +// i = lv_indev_next(i); +// } +// +// return t; + + return 0; } /** @@ -583,14 +588,14 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is no last object then search*/ if(proc->act_obj == NULL) { - pr_obj = indev_search_obj(proc, lv_layer_top()); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act()); + pr_obj = indev_search_obj(proc, lv_layer_top(NULL)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act(NULL)); } /*If there is last object but it is not dragged and not protected also search*/ else if(proc->drag_in_prog == 0 && lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now act_obj != NULL*/ - pr_obj = indev_search_obj(proc, lv_layer_top()); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act()); + pr_obj = indev_search_obj(proc, lv_layer_top(NULL)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act(NULL)); } /*If a dragable or a protected object was the last then keep it*/ else { diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index ae8f45178ca0..4588ab424db3 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -17,6 +17,7 @@ #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_ufs.h" +#include "../lv_hal/lv_hal.h" #include #include #include "../lv_misc/lv_gc.h" @@ -62,13 +63,6 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); */ void lv_init(void) { - LV_GC_ROOT(_lv_def_scr) = NULL; - LV_GC_ROOT(_lv_act_scr) = NULL; - LV_GC_ROOT(_lv_top_layer) = NULL; - LV_GC_ROOT(_lv_sys_layer) = NULL; - LV_GC_ROOT(_lv_disp_list) = NULL; - LV_GC_ROOT(_lv_indev_list) = NULL; - LV_LOG_TRACE("lv_init started"); /*Initialize the lv_misc modules*/ @@ -91,20 +85,9 @@ void lv_init(void) /*Initialize the screen refresh system*/ lv_refr_init(); - /*Create the default screen*/ - lv_ll_init(&LV_GC_ROOT(_lv_scr_ll), sizeof(lv_obj_t)); - LV_GC_ROOT(_lv_def_scr) = lv_obj_create(NULL, NULL); - - LV_GC_ROOT(_lv_act_scr) = LV_GC_ROOT(_lv_def_scr); - - LV_GC_ROOT(_lv_top_layer) = lv_obj_create(NULL, NULL); - lv_obj_set_style(LV_GC_ROOT(_lv_top_layer), &lv_style_transp_fit); - - LV_GC_ROOT(_lv_sys_layer) = lv_obj_create(NULL, NULL); - lv_obj_set_style(LV_GC_ROOT(_lv_sys_layer), &lv_style_transp_fit); + lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t)); + lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t)); - /*Refresh the screen*/ - lv_obj_invalidate(LV_GC_ROOT(_lv_act_scr)); #if LV_INDEV_READ_PERIOD != 0 /*Init the input device handling*/ @@ -133,8 +116,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Create a screen if the parent is NULL*/ if(parent == NULL) { LV_LOG_TRACE("Screen create started"); + lv_disp_t * disp = lv_disp_get_last(); + if(!disp) { + LV_LOG_WARN("lv_obj_create: not display created to so far. No place to assign the new screen") + } - new_obj = lv_ll_ins_head(&LV_GC_ROOT(_lv_scr_ll)); + new_obj = lv_ll_ins_head(&disp->scr_ll); lv_mem_assert(new_obj); if(new_obj == NULL) return NULL; @@ -357,7 +344,8 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Remove the object from parent's children list*/ lv_obj_t * par = lv_obj_get_parent(obj); if(par == NULL) { /*It is a screen*/ - lv_ll_rem(&LV_GC_ROOT(_lv_scr_ll), obj); + lv_disp_t * d = lv_scr_get_disp(obj); + lv_ll_rem(&d->scr_ll, obj); } else { lv_ll_rem(&(par->child_ll), obj); } @@ -415,9 +403,9 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*Invalidate the object only if it belongs to the 'LV_GC_ROOT(_lv_act_scr)'*/ lv_obj_t * obj_scr = lv_obj_get_screen(obj); - if(obj_scr == lv_scr_act() || - obj_scr == lv_layer_top() || - obj_scr == lv_layer_sys()) { + lv_disp_t * disp = lv_scr_get_disp(obj_scr); + if(obj_scr == lv_scr_act(disp) || + obj_scr == lv_layer_top(disp)) { /*Truncate recursively to the parents*/ lv_area_t area_trunc; lv_obj_t * par = lv_obj_get_parent(obj); @@ -448,9 +436,24 @@ void lv_obj_invalidate(const lv_obj_t * obj) * Setter functions *====================*/ + /*-------------- * Screen set *--------------*/ +lv_disp_t * lv_scr_get_disp(lv_obj_t * scr) +{ + lv_disp_t * d; + + LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { + lv_obj_t * s; + LL_READ(d->scr_ll, s) { + if(s == scr) return d; + } + } + + LV_LOG_WARN("lv_scr_get_disp: screen not found") + return NULL; +} /** * Load a new screen @@ -458,9 +461,11 @@ void lv_obj_invalidate(const lv_obj_t * obj) */ void lv_scr_load(lv_obj_t * scr) { - LV_GC_ROOT(_lv_act_scr) = scr; + lv_disp_t * d = lv_scr_get_disp(scr); + + d->act_scr = scr; - lv_obj_invalidate(LV_GC_ROOT(_lv_act_scr)); + lv_obj_invalidate(scr); } /*-------------------- @@ -1006,13 +1011,17 @@ void lv_obj_refresh_style(lv_obj_t * obj) */ void lv_obj_report_style_mod(lv_style_t * style) { - lv_obj_t * i; - LL_READ(LV_GC_ROOT(_lv_scr_ll), i) { - if(i->style_p == style || style == NULL) { - lv_obj_refresh_style(i); - } + lv_disp_t * d = lv_disp_get_next(NULL); - report_style_mod_core(style, i); + while(d) { + lv_obj_t * i; + LL_READ(d->scr_ll, i) { + if(i->style_p == style || style == NULL) { + lv_obj_refresh_style(i); + } + + report_style_mod_core(style, i); + } } } @@ -1302,28 +1311,30 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 * Return with a pointer to the active screen * @return pointer to the active screen object (loaded by 'lv_scr_load()') */ -lv_obj_t * lv_scr_act(void) +lv_obj_t * lv_scr_act(lv_disp_t * disp) { - return LV_GC_ROOT(_lv_act_scr); + if(!disp) disp = lv_disp_get_last(); + if(!disp) { + LV_LOG_WARN("lv_layer_top: no display registered to get its top layer"); + return NULL; + } + + return disp->act_scr; } /** * Return with the top layer. (Same on every screen and it is above the normal screen layer) * @return pointer to the top layer object (transparent screen sized lv_obj) */ -lv_obj_t * lv_layer_top(void) +lv_obj_t * lv_layer_top(lv_disp_t * disp) { - return LV_GC_ROOT(_lv_top_layer); -} + if(!disp) disp = lv_disp_get_last(); + if(!disp) { + LV_LOG_WARN("lv_layer_top: no display registered to get its top layer"); + return NULL; + } -/** - * Return with the system layer. (Same on every screen and it is above the all other layers) - * It is used for example by the cursor - * @return pointer to the system layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_sys(void) -{ - return LV_GC_ROOT(_lv_sys_layer); + return disp->top_layer; } /** diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 7f8f848ab89c..2d476b3079c0 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -27,6 +27,7 @@ extern "C" { #include "../lv_misc/lv_ll.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_log.h" +#include "../lv_hal/lv_hal.h" /********************* * DEFINES @@ -277,6 +278,8 @@ void lv_obj_invalidate(const lv_obj_t * obj); * Screen set *--------------*/ +lv_disp_t * lv_scr_get_disp(lv_obj_t * scr); + /** * Load a new screen * @param scr pointer to a screen @@ -560,20 +563,13 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 * Return with a pointer to the active screen * @return pointer to the active screen object (loaded by 'lv_scr_load()') */ -lv_obj_t * lv_scr_act(void); +lv_obj_t * lv_scr_act(lv_disp_t * disp); /** * Return with the top layer. (Same on every screen and it is above the normal screen layer) * @return pointer to the top layer object (transparent screen sized lv_obj) */ -lv_obj_t * lv_layer_top(void); - -/** - * Return with the system layer. (Same on every screen and it is above the all other layers) - * It is used for example by the cursor - * @return pointer to the system layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_sys(void); +lv_obj_t * lv_layer_top(lv_disp_t * disp); /** * Return with the screen of an object diff --git a/lv_draw/lv_draw_rbasic.c b/lv_draw/lv_draw_rbasic.c index 64755492447c..47fb5938f940 100644 --- a/lv_draw/lv_draw_rbasic.c +++ b/lv_draw/lv_draw_rbasic.c @@ -9,7 +9,7 @@ #include "lv_draw_rbasic.h" #if USE_LV_REAL_DRAW != 0 -#include "../lv_hal/lv_hal_disp.h" +#include "../lv_hal/lv_hal.h" #include "../lv_misc/lv_font.h" #include "lv_draw.h" diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_vbasic.c index 8ab12785687a..9e37563aa27d 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_vbasic.c @@ -9,7 +9,7 @@ #include #include -#include "../lv_hal/lv_hal_disp.h" +#include "../lv_hal/lv_hal.h" #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_font.h" #include "../lv_misc/lv_color.h" diff --git a/lv_hal/lv_hal.h b/lv_hal/lv_hal.h index 5ab28f2a6a66..a5e0a1dd57f1 100644 --- a/lv_hal/lv_hal.h +++ b/lv_hal/lv_hal.h @@ -1,10 +1,10 @@ /** - * @file hal.h + * @file lv_hal.h * */ -#ifndef HAL_H -#define HAL_H +#ifndef LV_HAL_H +#define LV_HAL_H #ifdef __cplusplus extern "C" { diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 3be8b927ec53..f08a9d7f0bfe 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -11,7 +11,7 @@ *********************/ #include #include -#include "../lv_hal/lv_hal_disp.h" +#include "lv_hal.h" #include "../lv_misc/lv_mem.h" #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_gc.h" @@ -57,6 +57,8 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->disp_fill = NULL; driver->disp_map = NULL; driver->disp_flush = NULL; + driver->hor_res = LV_HOR_RES_MAX; + driver->ver_res = LV_VER_RES_MAX; #if USE_LV_GPU driver->mem_blend = NULL; @@ -76,47 +78,36 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) */ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) { - lv_disp_t * node; - node = lv_mem_alloc(sizeof(lv_disp_t)); - lv_mem_assert(node); - if(node == NULL) return NULL; + lv_disp_t * node = lv_ll_ins_head(&LV_GC_ROOT(_lv_disp_ll)); + if(!node) { + lv_mem_assert(node); + return NULL; + } memcpy(&node->driver, driver, sizeof(lv_disp_drv_t)); - node->next = NULL; - /* Set first display as active by default */ - if(LV_GC_ROOT(_lv_disp_list) == NULL) { - LV_GC_ROOT(_lv_disp_list) = node; - active = node; - lv_obj_invalidate(lv_scr_act()); - } else { - ((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next = node; - } + lv_ll_init(&node->scr_ll, sizeof(lv_obj_t)); + + node->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ + node->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ return node; } - -/** - * Set the active display - * @param disp pointer to a display (return value of 'lv_disp_register') - */ -void lv_disp_set_active(lv_disp_t * disp) +void * lv_disp_get_next(lv_disp_t * disp) { - active = disp; - lv_obj_invalidate(lv_scr_act()); + if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); + else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); } -/** - * Get a pointer to the active display - * @return pointer to the active display - */ -lv_disp_t * lv_disp_get_active(void) + +lv_disp_t * lv_disp_get_last(void) { - return active; + return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); } + /** * Get the next display. * @param disp pointer to the current display. NULL to initialize. @@ -124,12 +115,25 @@ lv_disp_t * lv_disp_get_active(void) */ lv_disp_t * lv_disp_next(lv_disp_t * disp) { - if(disp == NULL) { - return LV_GC_ROOT(_lv_disp_list); - } else { - if(((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next == NULL) return NULL; - else return ((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next; - } + if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); + else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); +} + +lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) +{ + if(disp == NULL) disp = lv_disp_get_active(); + + if(disp == NULL) return LV_HOR_RES_MAX; + else return disp->driver.hor_res; +} + + +lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) +{ + if(disp == NULL) disp = lv_disp_get_active(); + + if(disp == NULL) return LV_VER_RES_MAX; + else return disp->driver.ver_res; } /** diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index e298b4ac863d..4266c09384a2 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -1,12 +1,12 @@ /** - * @file hal_disp.h + * @file lv_hal_disp.h * * @description Display Driver HAL interface header file * */ -#ifndef HAL_DISP_H -#define HAL_DISP_H +#ifndef LV_HAL_DISP_H +#define LV_HAL_DISP_H #ifdef __cplusplus extern "C" { @@ -20,7 +20,7 @@ extern "C" { #include "lv_hal.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" -#include "../lv_core/lv_obj.h" +#include "../lv_misc/lv_ll.h" /********************* * DEFINES @@ -62,14 +62,15 @@ typedef struct _disp_drv_t { #endif } lv_disp_drv_t; +struct _lv_obj_t; + typedef struct _disp_t { lv_disp_drv_t driver; lv_area_t inv_buf[32]; lv_ll_t scr_ll; - lv_obj_t * act_scr; - lv_obj_t * top_scr; + struct _lv_obj_t * act_scr; + struct _lv_obj_t * top_layer; uint8_t orientation:2; - struct _disp_t *next; } lv_disp_t; /********************** @@ -92,17 +93,8 @@ void lv_disp_drv_init(lv_disp_drv_t *driver); */ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t *driver); -/** - * Set the active display - * @param disp pointer to a display (return value of 'lv_disp_register') - */ -void lv_disp_set_active(lv_disp_t * disp); -/** - * Get a pointer to the active display - * @return pointer to the active display - */ -lv_disp_t * lv_disp_get_active(void); +lv_disp_t * lv_disp_get_last(void); /** * Get the next display. diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 6083c3fd2fb3..601695e2ea66 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -51,6 +51,7 @@ void lv_indev_drv_init(lv_indev_drv_t * driver) { driver->read = NULL; driver->type = LV_INDEV_TYPE_NONE; + driver->disp = NULL; driver->user_data = NULL; } @@ -61,30 +62,28 @@ void lv_indev_drv_init(lv_indev_drv_t * driver) */ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) { - lv_indev_t * node; - node = lv_mem_alloc(sizeof(lv_indev_t)); - if(!node) return NULL; + if(driver->disp == NULL) driver->disp = lv_disp_get_last(); + + if(driver->disp == NULL) { + LV_LOG_WARN("lv_indev_drv_register: no display registered hence can't attache the indev to a display"); + return NULL; + } + + lv_indev_t * node = lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll)); + if(!node) { + lv_mem_assert(node); + return NULL; + } memset(node, 0, sizeof(lv_indev_t)); memcpy(&node->driver, driver, sizeof(lv_indev_drv_t)); - node->next = NULL; node->proc.reset_query = 1; node->cursor = NULL; node->group = NULL; node->btn_points = NULL; - if(LV_GC_ROOT(_lv_indev_list) == NULL) { - LV_GC_ROOT(_lv_indev_list) = node; - } else { - lv_indev_t * last = LV_GC_ROOT(_lv_indev_list); - while(last->next) - last = last->next; - - last->next = node; - } - return node; } @@ -95,13 +94,8 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) */ lv_indev_t * lv_indev_next(lv_indev_t * indev) { - - if(indev == NULL) { - return LV_GC_ROOT(_lv_indev_list); - } else { - if(indev->next == NULL) return NULL; - else return indev->next; - } + if(indev == NULL) return lv_ll_get_head(LV_GC_ROOT(&_lv_indev_ll)); + else return lv_ll_get_next(LV_GC_ROOT(&_lv_indev_ll), indev); } /** diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 214b02754578..977ae3e2169b 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -1,12 +1,12 @@ /** - * @file hal_indev.h + * @file lv_hal_indev.h * * @description Input Device HAL interface layer header file * */ -#ifndef HAL_INDEV_H -#define HAL_INDEV_H +#ifndef LV_HAL_INDEV_H +#define LV_HAL_INDEV_H #ifdef __cplusplus extern "C" { @@ -19,7 +19,7 @@ extern "C" { #include #include "lv_hal.h" #include "../lv_misc/lv_area.h" -#include "../lv_core/lv_obj.h" +//#include "../lv_core/lv_obj.h" /********************* * DEFINES @@ -62,7 +62,9 @@ typedef struct { typedef struct { lv_hal_indev_type_t type; /*Input device type*/ bool (*read)(lv_indev_data_t *data); /*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/ + lv_disp_t * disp; void *user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ + } lv_indev_drv_t; struct _lv_obj_t; @@ -101,7 +103,7 @@ typedef struct _lv_indev_proc_t { struct _lv_indev_t; -typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, lv_signal_t); +typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); struct _lv_obj_t; struct _lv_group_t; @@ -112,13 +114,13 @@ typedef struct _lv_indev_t { lv_indev_proc_t proc; lv_indev_feedback_t feedback; uint32_t last_activity_time; + lv_disp_t * disp; union { struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ struct _lv_group_t *group; /*Keypad destination group*/ const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ }; - struct _lv_indev_t *next; } lv_indev_t; /********************** @@ -143,7 +145,7 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t *driver); /** * Get the next input device. * @param indev pointer to the current input device. NULL to initialize. - * @return the next input devise or NULL if no more. Gives the first input device when the parameter is NULL + * @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL */ lv_indev_t * lv_indev_next(lv_indev_t * indev); diff --git a/lv_misc/lv_gc.h b/lv_misc/lv_gc.h index 72b10fc45ffd..2ba405fc308d 100644 --- a/lv_misc/lv_gc.h +++ b/lv_misc/lv_gc.h @@ -31,17 +31,12 @@ extern "C" { #define LV_GC_ROOTS(prefix) \ prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \ - prefix lv_ll_t _lv_scr_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_disp_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_indev_ll; /*Linked list of screens*/ \ prefix lv_ll_t _lv_drv_ll;\ prefix lv_ll_t _lv_file_ll;\ prefix lv_ll_t _lv_anim_ll;\ - prefix void * _lv_def_scr;\ - prefix void * _lv_act_scr;\ - prefix void * _lv_top_layer;\ - prefix void * _lv_sys_layer;\ prefix void * _lv_task_act;\ - prefix void * _lv_indev_list;\ - prefix void * _lv_disp_list;\ #define LV_NO_PREFIX From 44e5cc446c9a82043acc3cbaa963d8b409a3c4dc Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 11 Feb 2019 09:35:06 +0100 Subject: [PATCH 014/590] moved theme styles into substructure within lv_theme_t https://github.com/littlevgl/lvgl/issues/806 --- lv_core/lv_obj.c | 4 +- lv_objx/lv_arc.c | 2 +- lv_objx/lv_bar.c | 4 +- lv_objx/lv_btn.c | 10 +- lv_objx/lv_btnm.c | 12 +- lv_objx/lv_calendar.c | 16 +- lv_objx/lv_cb.c | 12 +- lv_objx/lv_chart.c | 2 +- lv_objx/lv_cont.c | 2 +- lv_objx/lv_ddlist.c | 6 +- lv_objx/lv_gauge.c | 2 +- lv_objx/lv_kb.c | 12 +- lv_objx/lv_led.c | 2 +- lv_objx/lv_list.c | 16 +- lv_objx/lv_lmeter.c | 2 +- lv_objx/lv_mbox.c | 8 +- lv_objx/lv_page.c | 8 +- lv_objx/lv_preload.c | 2 +- lv_objx/lv_roller.c | 4 +- lv_objx/lv_slider.c | 6 +- lv_objx/lv_spinbox.c | 6 +- lv_objx/lv_sw.c | 8 +- lv_objx/lv_ta.c | 4 +- lv_objx/lv_table.c | 10 +- lv_objx/lv_tabview.c | 14 +- lv_objx/lv_tileview.c | 6 +- lv_objx/lv_win.c | 14 +- lv_themes/lv_theme.c | 6 +- lv_themes/lv_theme.h | 320 +++++++++++++++++----------------- lv_themes/lv_theme_alien.c | 200 ++++++++++----------- lv_themes/lv_theme_default.c | 164 ++++++++--------- lv_themes/lv_theme_material.c | 228 ++++++++++++------------ lv_themes/lv_theme_mono.c | 172 +++++++++--------- lv_themes/lv_theme_nemo.c | 200 ++++++++++----------- lv_themes/lv_theme_night.c | 200 ++++++++++----------- lv_themes/lv_theme_templ.c | 196 ++++++++++----------- lv_themes/lv_theme_zen.c | 230 ++++++++++++------------ 37 files changed, 1056 insertions(+), 1054 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index a58ead8c2c29..23330e592676 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -160,7 +160,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - new_obj->style_p = th->bg; + new_obj->style_p = th->style.bg; } else { new_obj->style_p = &lv_style_scr; } @@ -227,7 +227,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Set appearance*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - new_obj->style_p = th->panel; + new_obj->style_p = th->style.panel; } else { new_obj->style_p = &lv_style_plain_color; } diff --git a/lv_objx/lv_arc.c b/lv_objx/lv_arc.c index 683d34345c89..8f5ed9a6cc8b 100644 --- a/lv_objx/lv_arc.c +++ b/lv_objx/lv_arc.c @@ -80,7 +80,7 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_arc_set_style(new_arc, LV_ARC_STYLE_MAIN, th->arc); + lv_arc_set_style(new_arc, LV_ARC_STYLE_MAIN, th->style.arc); } else { lv_arc_set_style(new_arc, LV_ARC_STYLE_MAIN, &lv_style_plain_color); } diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index d83a60934415..656225eb467e 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -84,8 +84,8 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_bar_set_style(new_bar, LV_BAR_STYLE_BG, th->bar.bg); - lv_bar_set_style(new_bar, LV_BAR_STYLE_INDIC, th->bar.indic); + lv_bar_set_style(new_bar, LV_BAR_STYLE_BG, th->style.bar.bg); + lv_bar_set_style(new_bar, LV_BAR_STYLE_INDIC, th->style.bar.indic); } else { lv_obj_set_style(new_bar, &lv_style_pretty); } diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index 2bf8314b35f8..f96607683caf 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -123,11 +123,11 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_btn_set_style(new_btn, LV_BTN_STYLE_REL, th->btn.rel); - lv_btn_set_style(new_btn, LV_BTN_STYLE_PR, th->btn.pr); - lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_REL, th->btn.tgl_rel); - lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_PR, th->btn.tgl_pr); - lv_btn_set_style(new_btn, LV_BTN_STYLE_INA, th->btn.ina); + lv_btn_set_style(new_btn, LV_BTN_STYLE_REL, th->style.btn.rel); + lv_btn_set_style(new_btn, LV_BTN_STYLE_PR, th->style.btn.pr); + lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_REL, th->style.btn.tgl_rel); + lv_btn_set_style(new_btn, LV_BTN_STYLE_TGL_PR, th->style.btn.tgl_pr); + lv_btn_set_style(new_btn, LV_BTN_STYLE_INA, th->style.btn.ina); } else { lv_obj_set_style(new_btn, ext->styles[LV_BTN_STATE_REL]); } diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 07e6a72b289a..0128614f7c8a 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -103,12 +103,12 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BG, th->btnm.bg); - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_REL, th->btnm.btn.rel); - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_PR, th->btnm.btn.pr); - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_REL, th->btnm.btn.tgl_rel); - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_PR, th->btnm.btn.tgl_pr); - lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_INA, th->btnm.btn.ina); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BG, th->style.btnm.bg); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_REL, th->style.btnm.btn.rel); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_PR, th->style.btnm.btn.pr); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_REL, th->style.btnm.btn.tgl_rel); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_TGL_PR, th->style.btnm.btn.tgl_pr); + lv_btnm_set_style(new_btnm, LV_BTNM_STYLE_BTN_INA, th->style.btnm.btn.ina); } else { lv_obj_set_style(new_btnm, &lv_style_pretty); } diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 217c08d56eff..f8260cf4c8e6 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -130,14 +130,14 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, th->calendar.bg); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, th->calendar.header); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, th->calendar.header_pr); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, th->calendar.day_names); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, th->calendar.week_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, th->calendar.today_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, th->calendar.highlighted_days); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, th->calendar.inactive_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, th->style.calendar.bg); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, th->style.calendar.header); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, th->style.calendar.header_pr); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, th->style.calendar.day_names); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, th->style.calendar.week_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, th->style.calendar.today_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, th->style.calendar.highlighted_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, th->style.calendar.inactive_days); } else { lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, &lv_style_pretty); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, ext->style_header); diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 6b0277e148b9..7943ba6b2c43 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -88,12 +88,12 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_cb_set_style(new_cb, LV_CB_STYLE_BG, th->cb.bg); - lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_REL, th->cb.box.rel); - lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_PR, th->cb.box.pr); - lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_REL, th->cb.box.tgl_rel); - lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_PR, th->cb.box.tgl_pr); - lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_INA, th->cb.box.ina); + lv_cb_set_style(new_cb, LV_CB_STYLE_BG, th->style.cb.bg); + lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_REL, th->style.cb.box.rel); + lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_PR, th->style.cb.box.pr); + lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_REL, th->style.cb.box.tgl_rel); + lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_TGL_PR, th->style.cb.box.tgl_pr); + lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_INA, th->style.cb.box.ina); } else { lv_cb_set_style(new_cb, LV_CB_STYLE_BG, &lv_style_transp); lv_cb_set_style(new_cb, LV_CB_STYLE_BOX_REL, &lv_style_pretty); diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 1dedaa7a4424..3e581382cc9f 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -95,7 +95,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_chart_set_style(new_chart, th->chart); + lv_chart_set_style(new_chart, th->style.chart); } else { lv_chart_set_style(new_chart, &lv_style_pretty); } diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 304852a22eb7..b6bbe012827d 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -89,7 +89,7 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_cont_set_style(new_cont, th->cont); + lv_cont_set_style(new_cont, th->style.cont); } else { lv_cont_set_style(new_cont, &lv_style_pretty); } diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index c8805d591c10..11867e15b9ed 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -118,9 +118,9 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, th->ddlist.bg); - lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, th->ddlist.sel); - lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SB, th->ddlist.sb); + lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, th->style.ddlist.bg); + lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, th->style.ddlist.sel); + lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SB, th->style.ddlist.sb); } else { lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_BG, &lv_style_pretty); lv_ddlist_set_style(new_ddlist, LV_DDLIST_STYLE_SEL, &lv_style_plain_color); diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index ad2ef8d92929..bdc6a179abb5 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -95,7 +95,7 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_gauge_set_style(new_gauge, th->gauge); + lv_gauge_set_style(new_gauge, th->style.gauge); } else { lv_gauge_set_style(new_gauge, &lv_style_pretty_color); } diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 395fc8d5d41e..3259ffe598f5 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -110,12 +110,12 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_kb_set_style(new_kb, LV_KB_STYLE_BG, th->kb.bg); - lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_REL, th->kb.btn.rel); - lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_PR, th->kb.btn.pr); - lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_REL, th->kb.btn.tgl_rel); - lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_PR, th->kb.btn.tgl_pr); - lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_INA, th->kb.btn.ina); + lv_kb_set_style(new_kb, LV_KB_STYLE_BG, th->style.kb.bg); + lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_REL, th->style.kb.btn.rel); + lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_PR, th->style.kb.btn.pr); + lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_REL, th->style.kb.btn.tgl_rel); + lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_TGL_PR, th->style.kb.btn.tgl_pr); + lv_kb_set_style(new_kb, LV_KB_STYLE_BTN_INA, th->style.kb.btn.ina); } else { /*Let the button matrix's styles*/ } diff --git a/lv_objx/lv_led.c b/lv_objx/lv_led.c index 29fc967ee427..3529eb5455ef 100644 --- a/lv_objx/lv_led.c +++ b/lv_objx/lv_led.c @@ -79,7 +79,7 @@ lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_led_set_style(new_led, th->led); + lv_led_set_style(new_led, th->style.led); } else { lv_led_set_style(new_led, &lv_style_pretty_color); } diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 8accb665afee..275519c11bf6 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -109,14 +109,14 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_list_set_style(new_list, LV_LIST_STYLE_BG, th->list.bg); - lv_list_set_style(new_list, LV_LIST_STYLE_SCRL, th->list.scrl); - lv_list_set_style(new_list, LV_LIST_STYLE_SB, th->list.sb); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, th->list.btn.rel); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, th->list.btn.pr); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, th->list.btn.tgl_rel); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, th->list.btn.tgl_pr); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, th->list.btn.ina); + lv_list_set_style(new_list, LV_LIST_STYLE_BG, th->style.list.bg); + lv_list_set_style(new_list, LV_LIST_STYLE_SCRL, th->style.list.scrl); + lv_list_set_style(new_list, LV_LIST_STYLE_SB, th->style.list.sb); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, th->style.list.btn.rel); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, th->style.list.btn.pr); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, th->style.list.btn.tgl_rel); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, th->style.list.btn.tgl_pr); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, th->style.list.btn.ina); } else { lv_list_set_style(new_list, LV_LIST_STYLE_BG, &lv_style_transp_fit); lv_list_set_style(new_list, LV_LIST_STYLE_SCRL, &lv_style_pretty); diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index 4d78d8ee2fcf..e86e4aa54af1 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -84,7 +84,7 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_lmeter_set_style(new_lmeter, th->lmeter); + lv_lmeter_set_style(new_lmeter, th->style.lmeter); } else { lv_lmeter_set_style(new_lmeter, &lv_style_pretty_color); } diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index af53ddd4dbaf..06f15d01557d 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -97,7 +97,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_mbox_set_style(new_mbox, LV_MBOX_STYLE_BG, th->mbox.bg); + lv_mbox_set_style(new_mbox, LV_MBOX_STYLE_BG, th->style.mbox.bg); } else { lv_mbox_set_style(new_mbox, LV_MBOX_STYLE_BG, &lv_style_pretty); } @@ -144,9 +144,9 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map, lv_btnm_action_t a /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_BG, th->mbox.btn.bg); - lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_REL, th->mbox.btn.rel); - lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_PR, th->mbox.btn.pr); + lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_BG, th->style.mbox.btn.bg); + lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_REL, th->style.mbox.btn.rel); + lv_mbox_set_style(mbox, LV_MBOX_STYLE_BTN_PR, th->style.mbox.btn.pr); } else { lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, &lv_style_transp_fit); } diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index f01418d1042c..47647cc30203 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -116,14 +116,14 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_theme_t * th = lv_theme_get_current(); if(th) { if(par == NULL) { /*Different styles if it is screen*/ - lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->bg); + lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.bg); lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_transp); } else { - lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->page.bg); - lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, th->page.scrl); + lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.page.bg); + lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, th->style.page.scrl); } - lv_page_set_style(new_page, LV_PAGE_STYLE_SB, th->page.sb); + lv_page_set_style(new_page, LV_PAGE_STYLE_SB, th->style.page.sb); } else { lv_page_set_style(new_page, LV_PAGE_STYLE_BG, &lv_style_pretty_color); lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, &lv_style_pretty); diff --git a/lv_objx/lv_preload.c b/lv_objx/lv_preload.c index 1700a4dabe63..9532e53c8b0f 100644 --- a/lv_objx/lv_preload.c +++ b/lv_objx/lv_preload.c @@ -93,7 +93,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_preload_set_style(new_preload, LV_PRELOAD_STYLE_MAIN, th->preload); + lv_preload_set_style(new_preload, LV_PRELOAD_STYLE_MAIN, th->style.preload); } else { lv_obj_set_style(new_preload, &lv_style_pretty_color); } diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index ae3419ddb3c8..5eaafaeeab2d 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -96,8 +96,8 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_roller_set_style(new_roller, LV_ROLLER_STYLE_BG, th->roller.bg); - lv_roller_set_style(new_roller, LV_ROLLER_STYLE_SEL, th->roller.sel); + lv_roller_set_style(new_roller, LV_ROLLER_STYLE_BG, th->style.roller.bg); + lv_roller_set_style(new_roller, LV_ROLLER_STYLE_SEL, th->style.roller.sel); } else { /*Let the ddlist's style*/ lv_obj_refresh_style(new_roller); /*To set scrollable size automatically*/ diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index eaf04e8c2c1c..d75f84bd1cd2 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -86,9 +86,9 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_slider_set_style(new_slider, LV_SLIDER_STYLE_BG, th->slider.bg); - lv_slider_set_style(new_slider, LV_SLIDER_STYLE_INDIC, th->slider.indic); - lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, th->slider.knob); + lv_slider_set_style(new_slider, LV_SLIDER_STYLE_BG, th->style.slider.bg); + lv_slider_set_style(new_slider, LV_SLIDER_STYLE_INDIC, th->style.slider.indic); + lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, th->style.slider.knob); } else { lv_slider_set_style(new_slider, LV_SLIDER_STYLE_KNOB, ext->style_knob); } diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index dc4c6086bced..720286b36589 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -87,9 +87,9 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_BG, th->spinbox.bg); - lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_CURSOR, th->spinbox.cursor); - lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_SB, th->spinbox.sb); + lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_BG, th->style.spinbox.bg); + lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_CURSOR, th->style.spinbox.cursor); + lv_spinbox_set_style(new_spinbox, LV_SPINBOX_STYLE_SB, th->style.spinbox.sb); } } /*Copy an existing spinbox*/ diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index 2b09354ae148..35fe47674922 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -88,10 +88,10 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_sw_set_style(new_sw, LV_SW_STYLE_BG, th->sw.bg); - lv_sw_set_style(new_sw, LV_SW_STYLE_INDIC, th->sw.indic); - lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_OFF, th->sw.knob_off); - lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_ON, th->sw.knob_on); + lv_sw_set_style(new_sw, LV_SW_STYLE_BG, th->style.sw.bg); + lv_sw_set_style(new_sw, LV_SW_STYLE_INDIC, th->style.sw.indic); + lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_OFF, th->style.sw.knob_off); + lv_sw_set_style(new_sw, LV_SW_STYLE_KNOB_ON, th->style.sw.knob_on); } else { /*Let the slider' style*/ } diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 8199cd3e3356..6ec094b7d157 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -129,8 +129,8 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_ta_set_style(new_ta, LV_TA_STYLE_BG, th->ta.area); - lv_ta_set_style(new_ta, LV_TA_STYLE_SB, th->ta.sb); + lv_ta_set_style(new_ta, LV_TA_STYLE_BG, th->style.ta.area); + lv_ta_set_style(new_ta, LV_TA_STYLE_SB, th->style.ta.sb); } else { lv_ta_set_style(new_ta, LV_TA_STYLE_BG, &lv_style_pretty); } diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index f1446ce337e1..55cb128963ac 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -89,11 +89,11 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_table_set_style(new_table, LV_TABLE_STYLE_BG, th->table.bg); - lv_table_set_style(new_table, LV_TABLE_STYLE_CELL1, th->table.cell); - lv_table_set_style(new_table, LV_TABLE_STYLE_CELL2, th->table.cell); - lv_table_set_style(new_table, LV_TABLE_STYLE_CELL3, th->table.cell); - lv_table_set_style(new_table, LV_TABLE_STYLE_CELL4, th->table.cell); + lv_table_set_style(new_table, LV_TABLE_STYLE_BG, th->style.table.bg); + lv_table_set_style(new_table, LV_TABLE_STYLE_CELL1, th->style.table.cell); + lv_table_set_style(new_table, LV_TABLE_STYLE_CELL2, th->style.table.cell); + lv_table_set_style(new_table, LV_TABLE_STYLE_CELL3, th->style.table.cell); + lv_table_set_style(new_table, LV_TABLE_STYLE_CELL4, th->style.table.cell); } else { lv_table_set_style(new_table, LV_TABLE_STYLE_BG, &lv_style_plain_color); } diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 8b16ec8785c3..774c7a7a3dc9 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -129,13 +129,13 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, th->tabview.bg); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_INDIC, th->tabview.indic); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, th->tabview.btn.bg); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_REL, th->tabview.btn.rel); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_PR, th->tabview.btn.pr); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, th->tabview.btn.tgl_rel); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, th->tabview.btn.tgl_pr); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, th->style.tabview.bg); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_INDIC, th->style.tabview.indic); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, th->style.tabview.btn.bg); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_REL, th->style.tabview.btn.rel); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_PR, th->style.tabview.btn.pr); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, th->style.tabview.btn.tgl_rel); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, th->style.tabview.btn.tgl_pr); } else { lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, &lv_style_plain); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, &lv_style_transp); diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index c80cfecad477..c6c0ed98abad 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -95,9 +95,9 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, th->tileview.bg); - lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, th->tileview.scrl); - lv_page_set_style(new_tileview, LV_PAGE_STYLE_SB, th->tileview.sb); + lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, th->style.tileview.bg); + lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, th->style.tileview.scrl); + lv_page_set_style(new_tileview, LV_PAGE_STYLE_SB, th->style.tileview.sb); } else { lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, &lv_style_transp_tight); lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight); diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 3bc968dda2d6..db7205ae9a63 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -92,13 +92,13 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_win_set_style(new_win, LV_WIN_STYLE_BG, th->win.bg); - lv_win_set_style(new_win, LV_WIN_STYLE_SB, th->win.sb); - lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, th->win.header); - lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, th->win.content.bg); - lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, th->win.content.scrl); - lv_win_set_style(new_win, LV_WIN_STYLE_BTN_REL, th->win.btn.rel); - lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->win.btn.pr); + lv_win_set_style(new_win, LV_WIN_STYLE_BG, th->style.win.bg); + lv_win_set_style(new_win, LV_WIN_STYLE_SB, th->style.win.sb); + lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, th->style.win.header); + lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, th->style.win.content.bg); + lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, th->style.win.content.scrl); + lv_win_set_style(new_win, LV_WIN_STYLE_BTN_REL, th->style.win.btn.rel); + lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->style.win.btn.pr); } else { lv_win_set_style(new_win, LV_WIN_STYLE_BG, &lv_style_plain); lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, &lv_style_plain); diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 59a0489919dc..2090529f626f 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -60,7 +60,7 @@ void lv_theme_set_current(lv_theme_t * th) #if LV_THEME_LIVE_UPDATE == 0 current_theme = th; #else - uint32_t style_num = sizeof(lv_theme_t) / sizeof(lv_style_t *); /*Number of styles in a theme*/ + uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/ if(!inited) { /*It's not sure `th_styles` is big enough. Check it now!*/ @@ -71,7 +71,7 @@ void lv_theme_set_current(lv_theme_t * th) /*Initialize the style pointers `current_theme` to point to the `th_styles` style array */ uint16_t i; - lv_style_t ** cur_th_style_p = (lv_style_t **) ¤t_theme; + lv_style_t ** cur_th_style_p = (lv_style_t **) ¤t_theme.style; for(i = 0; i < style_num; i++) { uintptr_t adr = (uintptr_t)&th_styles[i]; memcpy(&cur_th_style_p[i], &adr, sizeof(lv_style_t *)); @@ -82,7 +82,7 @@ void lv_theme_set_current(lv_theme_t * th) /*Copy the styles pointed by the new theme to the `th_styles` style array*/ uint16_t i; - lv_style_t ** th_style = (lv_style_t **) th; + lv_style_t ** th_style = (lv_style_t **) &th->style; for(i = 0; i < style_num; i++) { uintptr_t s = (uintptr_t)th_style[i]; if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 72c40aec5deb..cdb0771f8284 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -30,265 +30,267 @@ extern "C" { **********************/ typedef struct { - lv_style_t *bg; - lv_style_t *panel; + struct { + lv_style_t *bg; + lv_style_t *panel; #if USE_LV_CONT != 0 - lv_style_t *cont; + lv_style_t *cont; #endif #if USE_LV_BTN != 0 - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } btn; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } btn; #endif #if USE_LV_IMGBTN != 0 - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } imgbtn; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } imgbtn; #endif #if USE_LV_LABEL != 0 - struct { - lv_style_t *prim; - lv_style_t *sec; - lv_style_t *hint; - } label; + struct { + lv_style_t *prim; + lv_style_t *sec; + lv_style_t *hint; + } label; #endif #if USE_LV_IMG != 0 - struct { - lv_style_t *light; - lv_style_t *dark; - } img; + struct { + lv_style_t *light; + lv_style_t *dark; + } img; #endif #if USE_LV_LINE != 0 - struct { - lv_style_t *decor; - } line; + struct { + lv_style_t *decor; + } line; #endif #if USE_LV_LED != 0 - lv_style_t *led; + lv_style_t *led; #endif #if USE_LV_BAR != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - } bar; + struct { + lv_style_t *bg; + lv_style_t *indic; + } bar; #endif #if USE_LV_SLIDER != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - lv_style_t *knob; - } slider; + struct { + lv_style_t *bg; + lv_style_t *indic; + lv_style_t *knob; + } slider; #endif #if USE_LV_LMETER != 0 - lv_style_t *lmeter; + lv_style_t *lmeter; #endif #if USE_LV_GAUGE != 0 - lv_style_t *gauge; + lv_style_t *gauge; #endif #if USE_LV_ARC != 0 - lv_style_t *arc; + lv_style_t *arc; #endif #if USE_LV_PRELOAD != 0 - lv_style_t *preload; + lv_style_t *preload; #endif #if USE_LV_SW != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - lv_style_t *knob_off; - lv_style_t *knob_on; - } sw; + struct { + lv_style_t *bg; + lv_style_t *indic; + lv_style_t *knob_off; + lv_style_t *knob_on; + } sw; #endif #if USE_LV_CHART != 0 - lv_style_t *chart; + lv_style_t *chart; #endif #if USE_LV_CALENDAR != 0 - struct { - lv_style_t *bg; - lv_style_t *header; - lv_style_t *header_pr; - lv_style_t *day_names; - lv_style_t *highlighted_days; - lv_style_t *inactive_days; - lv_style_t *week_box; - lv_style_t *today_box; - } calendar; + struct { + lv_style_t *bg; + lv_style_t *header; + lv_style_t *header_pr; + lv_style_t *day_names; + lv_style_t *highlighted_days; + lv_style_t *inactive_days; + lv_style_t *week_box; + lv_style_t *today_box; + } calendar; #endif #if USE_LV_CB != 0 - struct { - lv_style_t *bg; struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } box; - } cb; + lv_style_t *bg; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } box; + } cb; #endif #if USE_LV_BTNM != 0 - struct { - lv_style_t *bg; struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } btn; - } btnm; + lv_style_t *bg; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } btn; + } btnm; #endif #if USE_LV_KB != 0 - struct { - lv_style_t *bg; struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } btn; - } kb; + lv_style_t *bg; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } btn; + } kb; #endif #if USE_LV_MBOX != 0 - struct { - lv_style_t *bg; struct { lv_style_t *bg; - lv_style_t *rel; - lv_style_t *pr; - } btn; - } mbox; + struct { + lv_style_t *bg; + lv_style_t *rel; + lv_style_t *pr; + } btn; + } mbox; #endif #if USE_LV_PAGE != 0 - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; - } page; + struct { + lv_style_t *bg; + lv_style_t *scrl; + lv_style_t *sb; + } page; #endif #if USE_LV_TA != 0 - struct { - lv_style_t *area; - lv_style_t *oneline; - lv_style_t *cursor; - lv_style_t *sb; - } ta; + struct { + lv_style_t *area; + lv_style_t *oneline; + lv_style_t *cursor; + lv_style_t *sb; + } ta; #endif #if USE_LV_SPINBOX != 0 - struct { - lv_style_t *bg; - lv_style_t *cursor; - lv_style_t *sb; - } spinbox; + struct { + lv_style_t *bg; + lv_style_t *cursor; + lv_style_t *sb; + } spinbox; #endif #if USE_LV_LIST - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; - } btn; - } list; + lv_style_t *bg; + lv_style_t *scrl; + lv_style_t *sb; + struct { + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + lv_style_t *ina; + } btn; + } list; #endif #if USE_LV_DDLIST != 0 - struct { - lv_style_t *bg; - lv_style_t *sel; - lv_style_t *sb; - } ddlist; + struct { + lv_style_t *bg; + lv_style_t *sel; + lv_style_t *sb; + } ddlist; #endif #if USE_LV_ROLLER != 0 - struct { - lv_style_t *bg; - lv_style_t *sel; - } roller; + struct { + lv_style_t *bg; + lv_style_t *sel; + } roller; #endif #if USE_LV_TABVIEW != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; struct { lv_style_t *bg; - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - } btn; - } tabview; + lv_style_t *indic; + struct { + lv_style_t *bg; + lv_style_t *rel; + lv_style_t *pr; + lv_style_t *tgl_rel; + lv_style_t *tgl_pr; + } btn; + } tabview; #endif #if USE_LV_TILEVIEW != 0 - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; - } tileview; + struct { + lv_style_t *bg; + lv_style_t *scrl; + lv_style_t *sb; + } tileview; #endif #if USE_LV_TABLE != 0 - struct { - lv_style_t *bg; - lv_style_t *cell; - } table; + struct { + lv_style_t *bg; + lv_style_t *cell; + } table; #endif #if USE_LV_WIN != 0 - struct { - lv_style_t *bg; - lv_style_t *sb; - lv_style_t *header; struct { lv_style_t *bg; - lv_style_t *scrl; - } content; - struct { - lv_style_t *rel; - lv_style_t *pr; - } btn; - } win; -#endif + lv_style_t *sb; + lv_style_t *header; + struct { + lv_style_t *bg; + lv_style_t *scrl; + } content; + struct { + lv_style_t *rel; + lv_style_t *pr; + } btn; + } win; +#endif + } style; } lv_theme_t; /********************** diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 7b4ea602667d..8b5f469a9a86 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -129,15 +129,15 @@ static void basic_init(void) sb.body.padding.ver = 1; sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ - theme.bg = &bg; - theme.panel = &panel; + theme.style.bg = &bg; + theme.style.panel = &panel; } static void cont_init(void) { #if USE_LV_CONT != 0 - theme.cont = &panel; + theme.style.cont = &panel; #endif } @@ -192,11 +192,11 @@ static void btn_init(void) btn_ina.text.font = _font; btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - theme.btn.rel = &btn_rel; - theme.btn.pr = &btn_pr; - theme.btn.tgl_rel = &btn_trel; - theme.btn.tgl_pr = &btn_tpr; - theme.btn.ina = &btn_ina; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; + theme.style.btn.tgl_rel = &btn_trel; + theme.style.btn.tgl_pr = &btn_tpr; + theme.style.btn.ina = &btn_ina; #endif } @@ -216,9 +216,9 @@ static void label_init(void) lv_style_copy(&label_hint, &label_prim); label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); - theme.label.prim = &label_prim; - theme.label.sec = &label_sec; - theme.label.hint = &label_hint; + theme.style.label.prim = &label_prim; + theme.style.label.sec = &label_sec; + theme.style.label.hint = &label_hint; #endif } @@ -250,8 +250,8 @@ static void bar_init(void) bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); - theme.bar.bg = &bar_bg; - theme.bar.indic = &bar_indic; + theme.style.bar.bg = &bar_bg; + theme.style.bar.indic = &bar_indic; #endif } @@ -267,8 +267,8 @@ static void img_init(void) img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); img_light.image.intense = LV_OPA_80; - theme.img.light = &img_light; - theme.img.dark = &img_dark; + theme.style.img.light = &img_light; + theme.style.img.dark = &img_dark; #endif } @@ -280,7 +280,7 @@ static void line_init(void) line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); line_decor.line.width = 1; - theme.line.decor = &line_decor; + theme.style.line.decor = &line_decor; #endif } @@ -298,7 +298,7 @@ static void led_init(void) led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); - theme.led = &led; + theme.style.led = &led; #endif } @@ -314,9 +314,9 @@ static void slider_init(void) slider_knob.body.border.color = LV_COLOR_GRAY; slider_knob.body.border.opa = LV_OPA_50; - theme.slider.bg = &bar_bg; - theme.slider.indic = &bar_indic; - theme.slider.knob = &slider_knob; + theme.style.slider.bg = &bar_bg; + theme.style.slider.indic = &bar_indic; + theme.style.slider.knob = &slider_knob; #endif } @@ -341,10 +341,10 @@ static void sw_init(void) lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; - theme.sw.bg = &sw_bg; - theme.sw.indic = &sw_indic; - theme.sw.knob_off = &sw_knob; - theme.sw.knob_on = &sw_knob; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; + theme.style.sw.knob_off = &sw_knob; + theme.style.sw.knob_on = &sw_knob; #endif } @@ -359,7 +359,7 @@ static void lmeter_init(void) lmeter_bg.line.color = LV_COLOR_HEX3(0x222); lmeter_bg.line.width = 2; - theme.lmeter = &lmeter_bg; + theme.style.lmeter = &lmeter_bg; #endif } @@ -380,7 +380,7 @@ static void gauge_init(void) gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); gauge_bg.text.font = _font; - theme.gauge = &gauge_bg; + theme.style.gauge = &gauge_bg; #endif } @@ -400,7 +400,7 @@ static void arc_init(void) arc.body.padding.hor = 3; arc.body.padding.ver = 3; - theme.arc = &arc; + theme.style.arc = &arc; #endif } @@ -408,14 +408,14 @@ static void preload_init(void) { #if USE_LV_PRELOAD != 0 - theme.preload = theme.arc; + theme.style.preload = theme.style.arc; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = &panel; + theme.style.chart = &panel; #endif } @@ -449,13 +449,13 @@ static void calendar_init(void) lv_style_copy(&gray_text, &def); gray_text.text.color = lv_color_hsv_to_rgb(_hue, 10, 65); - theme.calendar.bg = &panel; - theme.calendar.header = &header; - theme.calendar.week_box = &header; - theme.calendar.today_box = &today_box; - theme.calendar.day_names = &color_text; - theme.calendar.highlighted_days = &color_text; - theme.calendar.inactive_days = &gray_text; + theme.style.calendar.bg = &panel; + theme.style.calendar.header = &header; + theme.style.calendar.week_box = &header; + theme.style.calendar.today_box = &today_box; + theme.style.calendar.day_names = &color_text; + theme.style.calendar.highlighted_days = &color_text; + theme.style.calendar.inactive_days = &gray_text; #endif } @@ -501,12 +501,12 @@ static void cb_init(void) cb_ina.body.main_color = LV_COLOR_SILVER; cb_ina.body.grad_color = LV_COLOR_SILVER; - theme.cb.bg = &cb_bg; - theme.cb.box.rel = &cb_rel; - theme.cb.box.pr = &cb_pr; - theme.cb.box.tgl_rel = &cb_trel; - theme.cb.box.tgl_pr = &cb_tpr; - theme.cb.box.ina = &cb_ina; + theme.style.cb.bg = &cb_bg; + theme.style.cb.box.rel = &cb_rel; + theme.style.cb.box.pr = &cb_pr; + theme.style.cb.box.tgl_rel = &cb_trel; + theme.style.cb.box.tgl_pr = &cb_tpr; + theme.style.cb.box.ina = &cb_ina; #endif } @@ -540,24 +540,24 @@ static void btnm_init(void) lv_style_copy(&btnm_ina, &btnm_rel); btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60); - theme.btnm.bg = &btnm_bg; - theme.btnm.btn.rel = &btnm_rel; - theme.btnm.btn.pr = &btnm_pr; - theme.btnm.btn.tgl_rel = &btnm_trel; - theme.btnm.btn.tgl_pr = &btnm_pr; - theme.btnm.btn.ina = &btnm_ina; + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &btnm_rel; + theme.style.btnm.btn.pr = &btnm_pr; + theme.style.btnm.btn.tgl_rel = &btnm_trel; + theme.style.btnm.btn.tgl_pr = &btnm_pr; + theme.style.btnm.btn.ina = &btnm_ina; #endif } static void kb_init(void) { #if USE_LV_KB - theme.kb.bg = &btnm_bg; - theme.kb.btn.rel = &btnm_rel; - theme.kb.btn.pr = &btnm_pr; - theme.kb.btn.tgl_rel = &btnm_trel; - theme.kb.btn.tgl_pr = &btnm_pr; - theme.kb.btn.ina = &btnm_ina; + theme.style.kb.bg = &btnm_bg; + theme.style.kb.btn.rel = &btnm_rel; + theme.style.kb.btn.pr = &btnm_pr; + theme.style.kb.btn.tgl_rel = &btnm_trel; + theme.style.kb.btn.tgl_pr = &btnm_pr; + theme.style.kb.btn.ina = &btnm_ina; #endif } @@ -569,38 +569,38 @@ static void mbox_init(void) lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; - theme.mbox.bg = &mbox_bg; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &btn_trel; - theme.mbox.btn.pr = &btn_tpr; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &btn_trel; + theme.style.mbox.btn.pr = &btn_tpr; #endif } static void page_init(void) { #if USE_LV_PAGE - theme.page.bg = &panel; - theme.page.scrl = &lv_style_transp_fit; - theme.page.sb = &sb; + theme.style.page.bg = &panel; + theme.style.page.scrl = &lv_style_transp_fit; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if USE_LV_TA - theme.ta.area = &panel; - theme.ta.oneline = &panel; - theme.ta.cursor = NULL; - theme.ta.sb = &sb; + theme.style.ta.area = &panel; + theme.style.ta.oneline = &panel; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if USE_LV_SPINBOX - theme.spinbox.bg= &panel; - theme.spinbox.cursor = theme.ta.cursor; - theme.spinbox.sb = theme.ta.sb; + theme.style.spinbox.bg= &panel; + theme.style.spinbox.cursor = theme.style.ta.cursor; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -631,14 +631,14 @@ static void list_init(void) list_bg.body.padding.hor = 0; list_bg.body.padding.ver = 0; - theme.list.sb = &sb; - theme.list.bg = &list_bg; - theme.list.scrl = &lv_style_transp_tight; - theme.list.btn.rel = &list_rel; - theme.list.btn.pr = &list_pr; - theme.list.btn.tgl_rel = &list_trel; - theme.list.btn.tgl_pr = &list_tpr; - theme.list.btn.ina = &list_ina; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_rel; + theme.style.list.btn.pr = &list_pr; + theme.style.list.btn.tgl_rel = &list_trel; + theme.style.list.btn.tgl_pr = &list_tpr; + theme.style.list.btn.ina = &list_ina; #endif } @@ -656,9 +656,9 @@ static void ddlist_init(void) ddlist_sel.body.opa = LV_OPA_COVER; ddlist_sel.body.radius = 0; - theme.ddlist.bg = &ddlist_bg; - theme.ddlist.sel = &ddlist_sel; - theme.ddlist.sb = &sb; + theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.sel = &ddlist_sel; + theme.style.ddlist.sb = &sb; #endif } @@ -682,8 +682,8 @@ static void roller_init(void) roller_sel.text.opa = LV_OPA_COVER; roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); - theme.roller.bg = &roller_bg; - theme.roller.sel = &roller_sel; + theme.style.roller.bg = &roller_bg; + theme.style.roller.sel = &roller_sel; #endif } @@ -736,22 +736,22 @@ static void tabview_init(void) tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/ - theme.tabview.bg = &bg; - theme.tabview.indic = &tab_indic; - theme.tabview.btn.bg = &lv_style_transp_tight; - theme.tabview.btn.rel = &tab_rel; - theme.tabview.btn.pr = &tab_pr; - theme.tabview.btn.tgl_rel = &tab_trel; - theme.tabview.btn.tgl_pr = &tab_tpr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &tab_indic; + theme.style.tabview.btn.bg = &lv_style_transp_tight; + theme.style.tabview.btn.rel = &tab_rel; + theme.style.tabview.btn.pr = &tab_pr; + theme.style.tabview.btn.tgl_rel = &tab_trel; + theme.style.tabview.btn.tgl_pr = &tab_tpr; #endif } static void tileview_init(void) { #if USE_LV_TILEVIEW != 0 - theme.tileview.bg = &lv_style_transp_tight; - theme.tileview.scrl = &lv_style_transp_tight; - theme.tileview.sb = theme.page.sb; + theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.scrl = &lv_style_transp_tight; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -766,8 +766,8 @@ static void table_init(void) cell.body.padding.ver = LV_DPI / 12; - theme.table.bg = &lv_style_transp_tight; - theme.table.cell = &cell; + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &cell; #endif } @@ -788,13 +788,13 @@ static void win_init(void) header.body.border.part = LV_BORDER_BOTTOM; header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); - theme.win.bg = &bg; - theme.win.sb = &sb; - theme.win.header = &header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &btn_rel; - theme.win.btn.pr = &btn_pr; + theme.style.win.bg = &bg; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &btn_rel; + theme.style.win.btn.pr = &btn_pr; #endif } diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index a6ddb727658d..9a972571a3ee 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -63,19 +63,19 @@ static void basic_init(void) plain_bordered.body.border.width = 2; plain_bordered.body.border.color = LV_COLOR_HEX3(0xbbb); - theme.bg = &lv_style_plain; - theme.panel = &lv_style_pretty; + theme.style.bg = &lv_style_plain; + theme.style.panel = &lv_style_pretty; } static void btn_init(void) { #if USE_LV_BTN != 0 - theme.btn.rel = &lv_style_btn_rel; - theme.btn.pr = &lv_style_btn_pr; - theme.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.btn.ina = &lv_style_btn_ina; + theme.style.btn.rel = &lv_style_btn_rel; + theme.style.btn.pr = &lv_style_btn_pr; + theme.style.btn.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.btn.ina = &lv_style_btn_ina; #endif } @@ -92,9 +92,9 @@ static void label_init(void) label_hint.text.color = LV_COLOR_HEX3(0xaaa); - theme.label.prim = &label_prim; - theme.label.sec = &label_sec; - theme.label.hint = &label_hint; + theme.style.label.prim = &label_prim; + theme.style.label.sec = &label_sec; + theme.style.label.hint = &label_hint; #endif } @@ -104,8 +104,8 @@ static void img_init(void) #if USE_LV_IMG != 0 - theme.img.light = &def; - theme.img.dark = &def; + theme.style.img.light = &def; + theme.style.img.dark = &def; #endif } @@ -113,7 +113,7 @@ static void line_init(void) { #if USE_LV_LINE != 0 - theme.line.decor = &def; + theme.style.line.decor = &def; #endif } @@ -130,7 +130,7 @@ static void led_init(void) led.body.shadow.color = led.body.main_color; - theme.led = &led; + theme.style.led = &led; #endif } @@ -138,8 +138,8 @@ static void bar_init(void) { #if USE_LV_BAR - theme.bar.bg = &lv_style_pretty; - theme.bar.indic = &lv_style_pretty_color; + theme.style.bar.bg = &lv_style_pretty; + theme.style.bar.indic = &lv_style_pretty_color; #endif } @@ -150,9 +150,9 @@ static void slider_init(void) slider_bg.body.padding.hor = LV_DPI / 20; slider_bg.body.padding.ver = LV_DPI / 20; - theme.slider.bg = &slider_bg; - theme.slider.indic = &lv_style_pretty_color; - theme.slider.knob = &lv_style_pretty; + theme.style.slider.bg = &slider_bg; + theme.style.slider.indic = &lv_style_pretty_color; + theme.style.slider.knob = &lv_style_pretty; #endif } @@ -163,10 +163,10 @@ static void sw_init(void) sw_bg.body.padding.hor = 3; sw_bg.body.padding.ver = 3; - theme.sw.bg = &sw_bg; - theme.sw.indic = &lv_style_pretty_color; - theme.sw.knob_off = &lv_style_pretty; - theme.sw.knob_on = &lv_style_pretty; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &lv_style_pretty_color; + theme.style.sw.knob_off = &lv_style_pretty; + theme.style.sw.knob_on = &lv_style_pretty; #endif } @@ -181,7 +181,7 @@ static void lmeter_init(void) lmeter.body.main_color = lv_color_mix(lmeter.body.main_color, LV_COLOR_WHITE, LV_OPA_50); lmeter.body.grad_color = lv_color_mix(lmeter.body.grad_color, LV_COLOR_BLACK, LV_OPA_50); - theme.lmeter = &lmeter; + theme.style.lmeter = &lmeter; #endif } @@ -196,7 +196,7 @@ static void gauge_init(void) gauge.body.grad_color = lmeter.body.main_color; gauge.text.color = LV_COLOR_HEX3(0x888); - theme.gauge = &gauge; + theme.style.gauge = &gauge; #endif } @@ -205,7 +205,7 @@ static void chart_init(void) #if USE_LV_CHART - theme.chart = &lv_style_pretty; + theme.style.chart = &lv_style_pretty; #endif } @@ -214,12 +214,12 @@ static void cb_init(void) #if USE_LV_CB != 0 - theme.cb.bg = &lv_style_transp; - theme.cb.box.rel = &lv_style_pretty; - theme.cb.box.pr = &lv_style_btn_pr; - theme.cb.box.tgl_rel = &lv_style_btn_tgl_rel; - theme.cb.box.tgl_pr = &lv_style_btn_tgl_pr; - theme.cb.box.ina = &lv_style_btn_ina; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &lv_style_pretty; + theme.style.cb.box.pr = &lv_style_btn_pr; + theme.style.cb.box.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.cb.box.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.cb.box.ina = &lv_style_btn_ina; #endif } @@ -229,12 +229,12 @@ static void btnm_init(void) #if USE_LV_BTNM - theme.btnm.bg = &lv_style_pretty; - theme.btnm.btn.rel = &lv_style_btn_rel; - theme.btnm.btn.pr = &lv_style_btn_pr; - theme.btnm.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.btnm.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.btnm.btn.ina = &lv_style_btn_ina; + theme.style.btnm.bg = &lv_style_pretty; + theme.style.btnm.btn.rel = &lv_style_btn_rel; + theme.style.btnm.btn.pr = &lv_style_btn_pr; + theme.style.btnm.btn.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.btnm.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.btnm.btn.ina = &lv_style_btn_ina; #endif } @@ -243,12 +243,12 @@ static void kb_init(void) #if USE_LV_KB - theme.kb.bg = &lv_style_pretty; - theme.kb.btn.rel = &lv_style_btn_rel; - theme.kb.btn.pr = &lv_style_btn_pr; - theme.kb.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.kb.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.kb.btn.ina = &lv_style_btn_ina; + theme.style.kb.bg = &lv_style_pretty; + theme.style.kb.btn.rel = &lv_style_btn_rel; + theme.style.kb.btn.pr = &lv_style_btn_pr; + theme.style.kb.btn.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.kb.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.kb.btn.ina = &lv_style_btn_ina; #endif } @@ -258,10 +258,10 @@ static void mbox_init(void) #if USE_LV_MBOX - theme.mbox.bg = &lv_style_pretty; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &lv_style_btn_rel; - theme.mbox.btn.pr = &lv_style_btn_tgl_pr; + theme.style.mbox.bg = &lv_style_pretty; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &lv_style_btn_rel; + theme.style.mbox.btn.pr = &lv_style_btn_tgl_pr; #endif } @@ -270,9 +270,9 @@ static void page_init(void) #if USE_LV_PAGE - theme.page.bg = &lv_style_pretty; - theme.page.scrl = &lv_style_transp_tight; - theme.page.sb = &sb; + theme.style.page.bg = &lv_style_pretty; + theme.style.page.scrl = &lv_style_transp_tight; + theme.style.page.sb = &sb; #endif } @@ -281,10 +281,10 @@ static void ta_init(void) #if USE_LV_TA - theme.ta.area = &lv_style_pretty; - theme.ta.oneline = &lv_style_pretty; - theme.ta.cursor = NULL; - theme.ta.sb = &sb; + theme.style.ta.area = &lv_style_pretty; + theme.style.ta.oneline = &lv_style_pretty; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } @@ -292,14 +292,14 @@ static void list_init(void) { #if USE_LV_LIST != 0 - theme.list.bg = &lv_style_pretty; - theme.list.scrl = &lv_style_transp_fit; - theme.list.sb = &sb; - theme.list.btn.rel = &lv_style_btn_rel; - theme.list.btn.pr = &lv_style_btn_pr; - theme.list.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.list.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.list.btn.ina = &lv_style_btn_ina; + theme.style.list.bg = &lv_style_pretty; + theme.style.list.scrl = &lv_style_transp_fit; + theme.style.list.sb = &sb; + theme.style.list.btn.rel = &lv_style_btn_rel; + theme.style.list.btn.pr = &lv_style_btn_pr; + theme.style.list.btn.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.list.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.list.btn.ina = &lv_style_btn_ina; #endif } @@ -308,9 +308,9 @@ static void ddlist_init(void) #if USE_LV_DDLIST != 0 - theme.ddlist.bg = &lv_style_pretty; - theme.ddlist.sel = &lv_style_plain_color; - theme.ddlist.sb = &sb; + theme.style.ddlist.bg = &lv_style_pretty; + theme.style.ddlist.sel = &lv_style_plain_color; + theme.style.ddlist.sb = &sb; #endif } @@ -319,8 +319,8 @@ static void roller_init(void) #if USE_LV_ROLLER != 0 - theme.roller.bg = &lv_style_pretty; - theme.roller.sel = &lv_style_plain_color; + theme.style.roller.bg = &lv_style_pretty; + theme.style.roller.sel = &lv_style_plain_color; #endif } @@ -329,13 +329,13 @@ static void tabview_init(void) #if USE_LV_TABVIEW != 0 - theme.tabview.bg = &plain_bordered; - theme.tabview.indic = &lv_style_plain_color; - theme.tabview.btn.bg = &lv_style_transp; - theme.tabview.btn.rel = &lv_style_btn_rel; - theme.tabview.btn.pr = &lv_style_btn_pr; - theme.tabview.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.tabview.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.tabview.bg = &plain_bordered; + theme.style.tabview.indic = &lv_style_plain_color; + theme.style.tabview.btn.bg = &lv_style_transp; + theme.style.tabview.btn.rel = &lv_style_btn_rel; + theme.style.tabview.btn.pr = &lv_style_btn_pr; + theme.style.tabview.btn.tgl_rel = &lv_style_btn_tgl_rel; + theme.style.tabview.btn.tgl_pr = &lv_style_btn_tgl_pr; #endif } @@ -345,13 +345,13 @@ static void win_init(void) #if USE_LV_WIN != 0 - theme.win.bg = &plain_bordered; - theme.win.sb = &sb; - theme.win.header = &lv_style_plain_color; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &lv_style_btn_rel; - theme.win.btn.pr = &lv_style_btn_pr; + theme.style.win.bg = &plain_bordered; + theme.style.win.sb = &sb; + theme.style.win.header = &lv_style_plain_color; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &lv_style_btn_rel; + theme.style.win.btn.pr = &lv_style_btn_pr; #endif } diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index e46c94391547..6cfe501048bf 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -79,8 +79,8 @@ static void basic_init(void) sb.body.opa = LV_OPA_40; sb.body.padding.hor = LV_DPI / 25; - theme.bg = &bg; - theme.panel = &panel; + theme.style.bg = &bg; + theme.style.panel = &panel; } @@ -89,7 +89,7 @@ static void cont_init(void) #if USE_LV_CONT != 0 - theme.cont = theme.panel; + theme.style.cont = theme.style.panel; #endif } @@ -132,11 +132,11 @@ static void btn_init(void) ina.body.shadow.width = 0; ina.text.color = lv_color_hsv_to_rgb(_hue, 95, 5); - theme.btn.rel = &rel; - theme.btn.pr = ≺ - theme.btn.tgl_rel = &tgl_rel; - theme.btn.tgl_pr = &tgl_pr; - theme.btn.ina = &ina; + theme.style.btn.rel = &rel; + theme.style.btn.pr = ≺ + theme.style.btn.tgl_rel = &tgl_rel; + theme.style.btn.tgl_pr = &tgl_pr; + theme.style.btn.ina = &ina; #endif } @@ -156,9 +156,9 @@ static void label_init(void) lv_style_copy(&hint, &prim); hint.text.color = lv_color_hsv_to_rgb(_hue, 40, 90); - theme.label.prim = &prim; - theme.label.sec = &sec; - theme.label.hint = &hint; + theme.style.label.prim = &prim; + theme.style.label.sec = &sec; + theme.style.label.hint = &hint; #endif } @@ -175,8 +175,8 @@ static void img_init(void) img_light.image.intense = LV_OPA_80; - theme.img.light = &def; - theme.img.dark = &def; + theme.style.img.light = &def; + theme.style.img.dark = &def; #endif } @@ -185,7 +185,7 @@ static void line_init(void) #if USE_LV_LINE != 0 - theme.line.decor = &def; + theme.style.line.decor = &def; #endif } @@ -204,7 +204,7 @@ static void led_init(void) led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); - theme.led = &led; + theme.style.led = &led; #endif } @@ -227,8 +227,8 @@ static void bar_init(void) bar_indic.body.padding.hor = 0; bar_indic.body.padding.ver = 0; - theme.bar.bg = &bar_bg; - theme.bar.indic = &bar_indic; + theme.style.bar.bg = &bar_bg; + theme.style.bar.indic = &bar_indic; #endif } @@ -240,12 +240,12 @@ static void slider_init(void) lv_style_copy(&knob, &def); knob.body.radius = LV_RADIUS_CIRCLE; knob.body.border.width = 0; - knob.body.main_color = theme.bar.indic->body.main_color; + knob.body.main_color = theme.style.bar.indic->body.main_color; knob.body.grad_color = knob.body.main_color; - theme.slider.bg = theme.bar.bg; - theme.slider.indic = theme.bar.indic; - theme.slider.knob = &knob; + theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.indic = theme.style.bar.indic; + theme.style.slider.knob = &knob; #endif } @@ -253,13 +253,13 @@ static void sw_init(void) { #if USE_LV_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob_off, sw_knob_on; - lv_style_copy(&sw_bg, theme.slider.bg); + lv_style_copy(&sw_bg, theme.style.slider.bg); sw_bg.body.radius = LV_RADIUS_CIRCLE; - lv_style_copy(&sw_indic, theme.slider.bg); + lv_style_copy(&sw_indic, theme.style.slider.bg); sw_indic.body.radius = LV_RADIUS_CIRCLE; - lv_style_copy(&sw_knob_on, theme.slider.knob); + lv_style_copy(&sw_knob_on, theme.style.slider.knob); sw_knob_on.body.shadow.width = 3; sw_knob_on.body.shadow.type = LV_SHADOW_BOTTOM; sw_knob_on.body.shadow.color = DEF_SHADOW_COLOR; @@ -272,10 +272,10 @@ static void sw_init(void) sw_knob_off.body.border.color = LV_COLOR_HEX3(0x999); sw_knob_off.body.border.opa = LV_OPA_COVER; - theme.sw.bg = &sw_bg; - theme.sw.indic = &sw_indic; - theme.sw.knob_off = &sw_knob_off; - theme.sw.knob_on = &sw_knob_on; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; + theme.style.sw.knob_off = &sw_knob_off; + theme.style.sw.knob_on = &sw_knob_on; #endif } @@ -291,7 +291,7 @@ static void lmeter_init(void) lmeter.line.color = LV_COLOR_HEX3(0x999); lmeter.line.width = 2; - theme.lmeter = &lmeter; + theme.style.lmeter = &lmeter; #endif } @@ -310,7 +310,7 @@ static void gauge_init(void) gauge.line.width = 3; gauge.line.color = lv_color_hsv_to_rgb(_hue, 95, 70); - theme.gauge = &gauge; + theme.style.gauge = &gauge; #endif } @@ -329,7 +329,7 @@ static void arc_init(void) arc.body.padding.hor = 0; arc.body.padding.ver = 0; - theme.arc = &arc; + theme.style.arc = &arc; #endif } @@ -337,14 +337,14 @@ static void preload_init(void) { #if USE_LV_PRELOAD != 0 - theme.preload = theme.arc; + theme.style.preload = theme.style.arc; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = theme.panel; + theme.style.chart = theme.style.panel; #endif } @@ -364,9 +364,9 @@ static void calendar_init(void) week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 100); week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 100); week_box.body.padding.ver = LV_DPI / 20; - week_box.body.padding.hor = theme.panel->body.padding.hor; - week_box.body.border.color = theme.panel->body.border.color; - week_box.body.border.width = theme.panel->body.border.width; + week_box.body.padding.hor = theme.style.panel->body.padding.hor; + week_box.body.border.color = theme.style.panel->body.border.color; + week_box.body.border.width = theme.style.panel->body.border.width; week_box.body.border.part = LV_BORDER_LEFT | LV_BORDER_RIGHT; week_box.body.radius = 0; @@ -377,12 +377,12 @@ static void calendar_init(void) today_box.body.padding.ver = LV_DPI / 20; today_box.body.radius = 0; - theme.calendar.bg = theme.panel; - theme.calendar.header = &lv_style_transp; - theme.calendar.inactive_days = &ina_days; - theme.calendar.highlighted_days = &high_days; - theme.calendar.week_box = &week_box; - theme.calendar.today_box = &today_box; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &lv_style_transp; + theme.style.calendar.inactive_days = &ina_days; + theme.style.calendar.highlighted_days = &high_days; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &today_box; #endif } @@ -390,7 +390,7 @@ static void cb_init(void) { #if USE_LV_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; - lv_style_copy(&rel, theme.panel); + lv_style_copy(&rel, theme.style.panel); rel.body.shadow.type = LV_SHADOW_BOTTOM; rel.body.shadow.width = 3; @@ -410,14 +410,14 @@ static void cb_init(void) tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.shadow.width = 0; - lv_style_copy(&ina, theme.btn.ina); + lv_style_copy(&ina, theme.style.btn.ina); - theme.cb.bg = &lv_style_transp; - theme.cb.box.rel = &rel; - theme.cb.box.pr = ≺ - theme.cb.box.tgl_rel = &tgl_rel; - theme.cb.box.tgl_pr = &tgl_pr; - theme.cb.box.ina = &ina; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ + theme.style.cb.box.tgl_rel = &tgl_rel; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &ina; #endif } @@ -427,13 +427,13 @@ static void btnm_init(void) #if USE_LV_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; - lv_style_copy(&bg, theme.panel); + lv_style_copy(&bg, theme.style.panel); bg.body.padding.hor = 0; bg.body.padding.ver = 0; bg.body.padding.inner = 0; bg.text.color = LV_COLOR_HEX3(0x555); - lv_style_copy(&rel, theme.panel); + lv_style_copy(&rel, theme.style.panel); rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; rel.body.border.width = 1; rel.body.border.color = LV_COLOR_HEX3(0xbbb); @@ -462,12 +462,12 @@ static void btnm_init(void) ina.body.main_color = LV_COLOR_HEX3(0xccc); ina.body.grad_color = ina.body.main_color; - theme.btnm.bg = &bg; - theme.btnm.btn.rel = &rel; - theme.btnm.btn.pr = ≺ - theme.btnm.btn.tgl_rel = &tgl_rel; - theme.btnm.btn.tgl_pr = &tgl_pr; - theme.btnm.btn.ina = &def; + theme.style.btnm.bg = &bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ + theme.style.btnm.btn.tgl_rel = &tgl_rel; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &def; #endif } @@ -479,12 +479,12 @@ static void kb_init(void) lv_style_copy(&rel, &lv_style_transp); rel.text.font = _font; - theme.kb.bg = theme.btnm.bg; - theme.kb.btn.rel = &rel; - theme.kb.btn.pr = theme.btnm.btn.pr; - theme.kb.btn.tgl_rel = theme.btnm.btn.tgl_rel; - theme.kb.btn.tgl_pr = theme.btnm.btn.tgl_pr; - theme.kb.btn.ina = theme.btnm.btn.ina; + theme.style.kb.bg = theme.style.btnm.bg; + theme.style.kb.btn.rel = &rel; + theme.style.kb.btn.pr = theme.style.btnm.btn.pr; + theme.style.kb.btn.tgl_rel = theme.style.btnm.btn.tgl_rel; + theme.style.kb.btn.tgl_pr = theme.style.btnm.btn.tgl_pr; + theme.style.kb.btn.ina = theme.style.btnm.btn.ina; #endif } @@ -499,13 +499,13 @@ static void mbox_init(void) rel.text.font = _font; rel.text.color = lv_color_hsv_to_rgb(_hue, 85, 75); - lv_style_copy(&pr, theme.btnm.btn.pr); + lv_style_copy(&pr, theme.style.btnm.btn.pr); pr.text.color = lv_color_hsv_to_rgb(_hue, 85, 60); - theme.mbox.bg = theme.panel; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &rel; - theme.mbox.btn.pr = ≺ + theme.style.mbox.bg = theme.style.panel; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &rel; + theme.style.mbox.btn.pr = ≺ #endif } @@ -514,9 +514,9 @@ static void page_init(void) #if USE_LV_PAGE - theme.page.bg = theme.panel; - theme.page.scrl = &lv_style_transp; - theme.page.sb = &sb; + theme.style.page.bg = theme.style.panel; + theme.style.page.scrl = &lv_style_transp; + theme.style.page.sb = &sb; #endif } @@ -534,19 +534,19 @@ static void ta_init(void) oneline.body.border.opa = LV_OPA_COVER; oneline.text.color = LV_COLOR_HEX3(0x333); - theme.ta.area = theme.panel; - theme.ta.oneline = &oneline; - theme.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.ta.sb = &sb; + theme.style.ta.area = theme.style.panel; + theme.style.ta.oneline = &oneline; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if USE_LV_SPINBOX - theme.spinbox.bg= theme.panel; - theme.spinbox.cursor = theme.ta.cursor; - theme.spinbox.sb = theme.ta.sb; + theme.style.spinbox.bg= theme.style.panel; + theme.style.spinbox.cursor = theme.style.ta.cursor; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -556,7 +556,7 @@ static void list_init(void) static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina; - lv_style_copy(&list_bg, theme.panel); + lv_style_copy(&list_bg, theme.style.panel); list_bg.body.padding.hor = 0; list_bg.body.padding.ver = 0; list_bg.body.padding.inner = 0; @@ -594,14 +594,14 @@ static void list_init(void) ina.body.grad_color = ina.body.main_color; - theme.list.sb = &sb; - theme.list.bg = &list_bg; - theme.list.scrl = &lv_style_transp_tight; - theme.list.btn.rel = &rel; - theme.list.btn.pr = ≺ - theme.list.btn.tgl_rel = &tgl_rel; - theme.list.btn.tgl_pr = &tgl_pr; - theme.list.btn.ina = &ina; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &rel; + theme.style.list.btn.pr = ≺ + theme.style.list.btn.tgl_rel = &tgl_rel; + theme.style.list.btn.tgl_pr = &tgl_pr; + theme.style.list.btn.ina = &ina; #endif } @@ -609,7 +609,7 @@ static void ddlist_init(void) { #if USE_LV_DDLIST != 0 static lv_style_t bg, sel; - lv_style_copy(&bg, theme.panel); + lv_style_copy(&bg, theme.style.panel); bg.body.padding.hor = LV_DPI / 6; bg.body.padding.ver = LV_DPI / 6; bg.text.line_space = LV_DPI / 8; @@ -623,9 +623,9 @@ static void ddlist_init(void) sel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - theme.ddlist.bg = &bg; - theme.ddlist.sel = &sel; - theme.ddlist.sb = &sb; + theme.style.ddlist.bg = &bg; + theme.style.ddlist.sel = &sel; + theme.style.ddlist.sb = &sb; #endif } @@ -645,8 +645,8 @@ static void roller_init(void) roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 90, 70); - theme.roller.bg = &roller_bg; - theme.roller.sel = &roller_sel; + theme.style.roller.bg = &roller_bg; + theme.style.roller.sel = &roller_sel; #endif } @@ -708,22 +708,22 @@ static void tabview_init(void) tgl_pr.body.radius = 0; tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 90, 60); - theme.tabview.bg = theme.bg; - theme.tabview.indic = &indic; - theme.tabview.btn.bg = &btn_bg; - theme.tabview.btn.rel = &rel; - theme.tabview.btn.pr = ≺ - theme.tabview.btn.tgl_rel = &tgl_rel; - theme.tabview.btn.tgl_pr = &tgl_pr; + theme.style.tabview.bg = theme.style.bg; + theme.style.tabview.indic = &indic; + theme.style.tabview.btn.bg = &btn_bg; + theme.style.tabview.btn.rel = &rel; + theme.style.tabview.btn.pr = ≺ + theme.style.tabview.btn.tgl_rel = &tgl_rel; + theme.style.tabview.btn.tgl_pr = &tgl_pr; #endif } static void tileview_init(void) { #if USE_LV_TILEVIEW != 0 - theme.tileview.bg = &lv_style_transp_tight; - theme.tileview.scrl = &lv_style_transp_tight; - theme.tileview.sb = theme.page.sb; + theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.scrl = &lv_style_transp_tight; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -731,15 +731,15 @@ static void table_init(void) { #if USE_LV_TABLE != 0 static lv_style_t cell; - lv_style_copy(&cell, theme.panel); + lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; cell.body.border.width = 1; cell.body.padding.hor = LV_DPI / 12; cell.body.padding.ver = LV_DPI / 12; - theme.table.bg = &lv_style_transp_tight; - theme.table.cell = &cell; + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &cell; #endif } @@ -770,13 +770,13 @@ static void win_init(void) pr.text.color = LV_COLOR_HEX3(0x111); - theme.win.bg = theme.panel; - theme.win.sb = &sb; - theme.win.header = &header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &lv_style_transp; - theme.win.btn.pr = ≺ + theme.style.win.bg = theme.style.panel; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &lv_style_transp; + theme.style.win.btn.pr = ≺ #endif } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index af18f8a5da82..44c02754f2bb 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -91,8 +91,8 @@ static void basic_init(void) lv_style_copy(&dark_frame, &dark_plain); dark_frame.body.radius = LV_DPI / 20; - theme.bg = &def; - theme.panel = &light_frame; + theme.style.bg = &def; + theme.style.panel = &light_frame; } @@ -101,7 +101,7 @@ static void cont_init(void) #if USE_LV_CONT != 0 - theme.cont = &def; + theme.style.cont = &def; #endif } @@ -110,11 +110,11 @@ static void btn_init(void) #if USE_LV_BTN != 0 - theme.btn.rel = &light_frame; - theme.btn.pr = &dark_frame; - theme.btn.tgl_rel = &dark_frame; - theme.btn.tgl_pr = &light_frame; - theme.btn.ina = &light_frame; + theme.style.btn.rel = &light_frame; + theme.style.btn.pr = &dark_frame; + theme.style.btn.tgl_rel = &dark_frame; + theme.style.btn.tgl_pr = &light_frame; + theme.style.btn.ina = &light_frame; #endif } @@ -124,9 +124,9 @@ static void label_init(void) #if USE_LV_LABEL != 0 - theme.label.prim = NULL; - theme.label.sec = NULL; - theme.label.hint = NULL; + theme.style.label.prim = NULL; + theme.style.label.sec = NULL; + theme.style.label.hint = NULL; #endif } @@ -135,15 +135,15 @@ static void img_init(void) #if USE_LV_IMG != 0 - theme.img.light = &def; - theme.img.dark = &def; + theme.style.img.light = &def; + theme.style.img.dark = &def; #endif } static void line_init(void) { #if USE_LV_LINE != 0 - theme.line.decor = NULL; + theme.style.line.decor = NULL; #endif } @@ -157,7 +157,7 @@ static void led_init(void) led.body.shadow.color = LV_COLOR_BLACK; led.body.shadow.type = LV_SHADOW_FULL; - theme.led = &led; + theme.style.led = &led; #endif } @@ -177,8 +177,8 @@ static void bar_init(void) bar_indic.body.padding.ver = LV_DPI / 30; bar_indic.body.radius = LV_RADIUS_CIRCLE; - theme.bar.bg = &bar_bg; - theme.bar.indic = &bar_indic; + theme.style.bar.bg = &bar_bg; + theme.style.bar.indic = &bar_indic; #endif } @@ -191,9 +191,9 @@ static void slider_init(void) slider_knob.body.padding.hor = LV_DPI / 30; slider_knob.body.padding.ver = LV_DPI / 30; - theme.slider.bg = theme.bar.bg; - theme.slider.indic = theme.bar.indic; - theme.slider.knob = &slider_knob; + theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.indic = theme.style.bar.indic; + theme.style.slider.knob = &slider_knob; #endif } @@ -202,10 +202,10 @@ static void sw_init(void) #if USE_LV_SW != 0 - theme.sw.bg = theme.slider.bg; - theme.sw.indic = theme.slider.indic; - theme.sw.knob_off = theme.slider.knob; - theme.sw.knob_on = theme.slider.knob; + theme.style.sw.bg = theme.style.slider.bg; + theme.style.sw.indic = theme.style.slider.indic; + theme.style.sw.knob_off = theme.style.slider.knob; + theme.style.sw.knob_on = theme.style.slider.knob; #endif } @@ -223,7 +223,7 @@ static void lmeter_init(void) lmeter_bg.line.color = LV_COLOR_WHITE; lmeter_bg.line.width = 1; - theme.lmeter = &lmeter_bg; + theme.style.lmeter = &lmeter_bg; #endif } @@ -231,19 +231,19 @@ static void gauge_init(void) { #if USE_LV_GAUGE != 0 static lv_style_t gauge_bg; - lv_style_copy(&gauge_bg, theme.lmeter); + lv_style_copy(&gauge_bg, theme.style.lmeter); gauge_bg.line.color = LV_COLOR_BLACK; gauge_bg.line.width = 1; - theme.gauge = &gauge_bg; + theme.style.gauge = &gauge_bg; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = &light_frame; + theme.style.chart = &light_frame; #endif } @@ -255,8 +255,8 @@ static void calendar_init(void) box.body.padding.ver = LV_DPI / 20; /*Can't handle highlighted dates in this theme*/ - theme.calendar.week_box = &box; - theme.calendar.today_box = &box; + theme.style.calendar.week_box = &box; + theme.style.calendar.today_box = &box; #endif } @@ -265,12 +265,12 @@ static void cb_init(void) #if USE_LV_CB != 0 - theme.cb.bg = &lv_style_transp; - theme.cb.box.rel = &light_frame; - theme.cb.box.pr = &dark_frame; - theme.cb.box.tgl_rel = &dark_frame; - theme.cb.box.tgl_pr = &light_frame; - theme.cb.box.ina = &light_frame; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &light_frame; + theme.style.cb.box.pr = &dark_frame; + theme.style.cb.box.tgl_rel = &dark_frame; + theme.style.cb.box.tgl_pr = &light_frame; + theme.style.cb.box.ina = &light_frame; #endif } @@ -280,24 +280,24 @@ static void btnm_init(void) #if USE_LV_BTNM - theme.btnm.bg = &light_frame; - theme.btnm.btn.rel = &light_frame; - theme.btnm.btn.pr = &dark_frame; - theme.btnm.btn.tgl_rel = &dark_frame; - theme.btnm.btn.tgl_pr = &light_frame; - theme.btnm.btn.ina = &light_frame; + theme.style.btnm.bg = &light_frame; + theme.style.btnm.btn.rel = &light_frame; + theme.style.btnm.btn.pr = &dark_frame; + theme.style.btnm.btn.tgl_rel = &dark_frame; + theme.style.btnm.btn.tgl_pr = &light_frame; + theme.style.btnm.btn.ina = &light_frame; #endif } static void kb_init(void) { #if USE_LV_KB - theme.kb.bg = &lv_style_transp_fit; - theme.kb.btn.rel = &light_frame; - theme.kb.btn.pr = &light_frame; - theme.kb.btn.tgl_rel = &dark_frame; - theme.kb.btn.tgl_pr = &dark_frame; - theme.kb.btn.ina = &light_frame; + theme.style.kb.bg = &lv_style_transp_fit; + theme.style.kb.btn.rel = &light_frame; + theme.style.kb.btn.pr = &light_frame; + theme.style.kb.btn.tgl_rel = &dark_frame; + theme.style.kb.btn.tgl_pr = &dark_frame; + theme.style.kb.btn.ina = &light_frame; #endif } @@ -307,10 +307,10 @@ static void mbox_init(void) #if USE_LV_MBOX - theme.mbox.bg = &dark_frame; - theme.mbox.btn.bg = &lv_style_transp_fit; - theme.mbox.btn.rel = &light_frame; - theme.mbox.btn.pr = &dark_frame; + theme.style.mbox.bg = &dark_frame; + theme.style.mbox.btn.bg = &lv_style_transp_fit; + theme.style.mbox.btn.rel = &light_frame; + theme.style.mbox.btn.pr = &dark_frame; #endif } @@ -319,9 +319,9 @@ static void page_init(void) #if USE_LV_PAGE - theme.page.bg = &light_frame; - theme.page.scrl = &light_frame; - theme.page.sb = &dark_frame; + theme.style.page.bg = &light_frame; + theme.style.page.scrl = &light_frame; + theme.style.page.sb = &dark_frame; #endif } @@ -330,10 +330,10 @@ static void ta_init(void) #if USE_LV_TA - theme.ta.area = &light_frame; - theme.ta.oneline = &light_frame; - theme.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.ta.sb = &dark_frame; + theme.style.ta.area = &light_frame; + theme.style.ta.oneline = &light_frame; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &dark_frame; #endif } @@ -342,14 +342,14 @@ static void list_init(void) #if USE_LV_LIST != 0 - theme.list.sb = &dark_frame; - theme.list.bg = &light_frame; - theme.list.scrl = &lv_style_transp_fit; - theme.list.btn.rel = &light_plain; - theme.list.btn.pr = &dark_plain; - theme.list.btn.tgl_rel = &dark_plain; - theme.list.btn.tgl_pr = &light_plain; - theme.list.btn.ina = &light_plain; + theme.style.list.sb = &dark_frame; + theme.style.list.bg = &light_frame; + theme.style.list.scrl = &lv_style_transp_fit; + theme.style.list.btn.rel = &light_plain; + theme.style.list.btn.pr = &dark_plain; + theme.style.list.btn.tgl_rel = &dark_plain; + theme.style.list.btn.tgl_pr = &light_plain; + theme.style.list.btn.ina = &light_plain; #endif } @@ -360,9 +360,9 @@ static void ddlist_init(void) lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; - theme.ddlist.bg = &bg; - theme.ddlist.sel = &dark_plain; - theme.ddlist.sb = &dark_frame; + theme.style.ddlist.bg = &bg; + theme.style.ddlist.sel = &dark_plain; + theme.style.ddlist.sb = &dark_frame; #endif } @@ -373,8 +373,8 @@ static void roller_init(void) lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; - theme.roller.bg = &bg; - theme.roller.sel = &dark_frame; + theme.style.roller.bg = &bg; + theme.style.roller.sel = &dark_frame; #endif } @@ -383,13 +383,13 @@ static void tabview_init(void) #if USE_LV_TABVIEW != 0 - theme.tabview.bg = &light_frame; - theme.tabview.indic = &light_plain; - theme.tabview.btn.bg = &lv_style_transp_fit; - theme.tabview.btn.rel = &light_frame; - theme.tabview.btn.pr = &dark_frame; - theme.tabview.btn.tgl_rel = &dark_frame; - theme.tabview.btn.tgl_pr = &light_frame; + theme.style.tabview.bg = &light_frame; + theme.style.tabview.indic = &light_plain; + theme.style.tabview.btn.bg = &lv_style_transp_fit; + theme.style.tabview.btn.rel = &light_frame; + theme.style.tabview.btn.pr = &dark_frame; + theme.style.tabview.btn.tgl_rel = &dark_frame; + theme.style.tabview.btn.tgl_pr = &light_frame; #endif } @@ -402,13 +402,13 @@ static void win_init(void) win_header.body.padding.hor = LV_DPI / 30; win_header.body.padding.ver = LV_DPI / 30; - theme.win.bg = &light_frame; - theme.win.sb = &dark_frame; - theme.win.header = &win_header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &light_frame; - theme.win.btn.pr = &dark_frame; + theme.style.win.bg = &light_frame; + theme.style.win.sb = &dark_frame; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &light_frame; + theme.style.win.btn.pr = &dark_frame; #endif } diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 0e6cb0a88e09..339682ad2923 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -132,8 +132,8 @@ static void basic_init(void) sb.body.padding.ver = 1; sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ - theme.bg = &bg; - theme.panel = &panel; + theme.style.bg = &bg; + theme.style.panel = &panel; } @@ -188,11 +188,11 @@ static void btn_init(void) btn_ina.text.font = _font; btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - theme.btn.rel = &btn_rel; - theme.btn.pr = &btn_pr; - theme.btn.tgl_rel = &btn_trel; - theme.btn.tgl_pr = &btn_tpr; - theme.btn.ina = &btn_ina; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; + theme.style.btn.tgl_rel = &btn_trel; + theme.style.btn.tgl_pr = &btn_tpr; + theme.style.btn.ina = &btn_ina; #endif } @@ -214,9 +214,9 @@ static void label_init(void) lv_style_copy(&label_hint, &label_prim); label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); - theme.label.prim = &label_prim; - theme.label.sec = &label_sec; - theme.label.hint = &label_hint; + theme.style.label.prim = &label_prim; + theme.style.label.sec = &label_sec; + theme.style.label.hint = &label_hint; #endif } @@ -248,8 +248,8 @@ static void bar_init(void) bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); - theme.bar.bg = &bar_bg; - theme.bar.indic = &bar_indic; + theme.style.bar.bg = &bar_bg; + theme.style.bar.indic = &bar_indic; #endif } @@ -265,8 +265,8 @@ static void img_init(void) img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); img_light.image.intense = LV_OPA_80; - theme.img.light = &img_light; - theme.img.dark = &img_dark; + theme.style.img.light = &img_light; + theme.style.img.dark = &img_dark; #endif } @@ -278,7 +278,7 @@ static void line_init(void) line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); line_decor.line.width = 1; - theme.line.decor = &line_decor; + theme.style.line.decor = &line_decor; #endif } @@ -296,7 +296,7 @@ static void led_init(void) led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); - theme.led = &led; + theme.style.led = &led; #endif } @@ -312,9 +312,9 @@ static void slider_init(void) slider_knob.body.border.color = LV_COLOR_ORANGE; slider_knob.body.border.opa = LV_OPA_50; - theme.slider.bg = &bar_bg; - theme.slider.indic = &bar_indic; - theme.slider.knob = &slider_knob; + theme.style.slider.bg = &bar_bg; + theme.style.slider.indic = &bar_indic; + theme.style.slider.knob = &slider_knob; #endif } @@ -339,10 +339,10 @@ static void sw_init(void) lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; - theme.sw.bg = &sw_bg; - theme.sw.indic = &sw_indic; - theme.sw.knob_off = &sw_knob; - theme.sw.knob_on = &sw_knob; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; + theme.style.sw.knob_off = &sw_knob; + theme.style.sw.knob_on = &sw_knob; #endif } @@ -357,7 +357,7 @@ static void lmeter_init(void) lmeter_bg.line.color = LV_COLOR_HEX3(0x500); lmeter_bg.line.width = 2; - theme.lmeter = &lmeter_bg; + theme.style.lmeter = &lmeter_bg; #endif } @@ -378,7 +378,7 @@ static void gauge_init(void) gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); gauge_bg.text.font = _font; - theme.gauge = &gauge_bg; + theme.style.gauge = &gauge_bg; #endif } @@ -395,7 +395,7 @@ static void arc_init(void) /*For preloader*/ arc.body.border.width = 0; - theme.arc = &arc; + theme.style.arc = &arc; #endif } @@ -403,14 +403,14 @@ static void preload_init(void) { #if USE_LV_PRELOAD != 0 - theme.preload = theme.arc; + theme.style.preload = theme.style.arc; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = &panel; + theme.style.chart = &panel; #endif } @@ -428,7 +428,7 @@ static void calendar_init(void) static lv_style_t week_box; lv_style_copy(&week_box, &def); week_box.body.empty = 1; - week_box.body.border.color = theme.panel->body.border.color; + week_box.body.border.color = theme.style.panel->body.border.color; week_box.body.padding.ver = LV_DPI / 20; static lv_style_t today_box; @@ -438,13 +438,13 @@ static void calendar_init(void) today_box.body.padding.ver = LV_DPI / 20; today_box.body.radius = 0; - theme.calendar.bg = theme.panel; - theme.calendar.header = theme.label.prim; - theme.calendar.inactive_days = theme.label.hint; - theme.calendar.highlighted_days = theme.label.sec; - theme.calendar.week_box = &week_box; - theme.calendar.today_box = &week_box; - theme.calendar.header_pr = theme.label.prim; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = theme.style.label.prim; + theme.style.calendar.inactive_days = theme.style.label.hint; + theme.style.calendar.highlighted_days = theme.style.label.sec; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &week_box; + theme.style.calendar.header_pr = theme.style.label.prim; #endif } @@ -490,12 +490,12 @@ static void cb_init(void) cb_ina.body.main_color = LV_COLOR_PURPLE; cb_ina.body.grad_color = LV_COLOR_SILVER; - theme.cb.bg = &cb_bg; - theme.cb.box.rel = &cb_rel; - theme.cb.box.pr = &cb_pr; - theme.cb.box.tgl_rel = &cb_trel; - theme.cb.box.tgl_pr = &cb_tpr; - theme.cb.box.ina = &cb_ina; + theme.style.cb.bg = &cb_bg; + theme.style.cb.box.rel = &cb_rel; + theme.style.cb.box.pr = &cb_pr; + theme.style.cb.box.tgl_rel = &cb_trel; + theme.style.cb.box.tgl_pr = &cb_tpr; + theme.style.cb.box.ina = &cb_ina; #endif } @@ -529,24 +529,24 @@ static void btnm_init(void) lv_style_copy(&btnm_ina, &btnm_rel); btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60); - theme.btnm.bg = &btnm_bg; - theme.btnm.btn.rel = &btnm_rel; - theme.btnm.btn.pr = &btnm_pr; - theme.btnm.btn.tgl_rel = &btnm_trel; - theme.btnm.btn.tgl_pr = &btnm_pr; - theme.btnm.btn.ina = &btnm_ina; + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &btnm_rel; + theme.style.btnm.btn.pr = &btnm_pr; + theme.style.btnm.btn.tgl_rel = &btnm_trel; + theme.style.btnm.btn.tgl_pr = &btnm_pr; + theme.style.btnm.btn.ina = &btnm_ina; #endif } static void kb_init(void) { #if USE_LV_KB - theme.kb.bg = &btnm_bg; - theme.kb.btn.rel = &btnm_rel; - theme.kb.btn.pr = &btnm_pr; - theme.kb.btn.tgl_rel = &btnm_trel; - theme.kb.btn.tgl_pr = &btnm_pr; - theme.kb.btn.ina = &btnm_ina; + theme.style.kb.bg = &btnm_bg; + theme.style.kb.btn.rel = &btnm_rel; + theme.style.kb.btn.pr = &btnm_pr; + theme.style.kb.btn.tgl_rel = &btnm_trel; + theme.style.kb.btn.tgl_pr = &btnm_pr; + theme.style.kb.btn.ina = &btnm_ina; #endif } @@ -558,38 +558,38 @@ static void mbox_init(void) lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; - theme.mbox.bg = &mbox_bg; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &btn_trel; - theme.mbox.btn.pr = &btn_tpr; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &btn_trel; + theme.style.mbox.btn.pr = &btn_tpr; #endif } static void page_init(void) { #if USE_LV_PAGE - theme.page.bg = &panel; - theme.page.scrl = &lv_style_transp_fit; - theme.page.sb = &sb; + theme.style.page.bg = &panel; + theme.style.page.scrl = &lv_style_transp_fit; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if USE_LV_TA - theme.ta.area = &panel; - theme.ta.oneline = &panel; - theme.ta.cursor = NULL; - theme.ta.sb = &sb; + theme.style.ta.area = &panel; + theme.style.ta.oneline = &panel; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if USE_LV_SPINBOX - theme.spinbox.bg= &panel; - theme.spinbox.cursor = theme.ta.cursor; - theme.spinbox.sb = theme.ta.sb; + theme.style.spinbox.bg= &panel; + theme.style.spinbox.cursor = theme.style.ta.cursor; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -620,14 +620,14 @@ static void list_init(void) list_bg.body.padding.hor = 0; list_bg.body.padding.ver = 0; - theme.list.sb = &sb; - theme.list.bg = &list_bg; - theme.list.scrl = &lv_style_transp_tight; - theme.list.btn.rel = &list_rel; - theme.list.btn.pr = &list_pr; - theme.list.btn.tgl_rel = &list_trel; - theme.list.btn.tgl_pr = &list_tpr; - theme.list.btn.ina = &list_ina; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_rel; + theme.style.list.btn.pr = &list_pr; + theme.style.list.btn.tgl_rel = &list_trel; + theme.style.list.btn.tgl_pr = &list_tpr; + theme.style.list.btn.ina = &list_ina; #endif } @@ -645,9 +645,9 @@ static void ddlist_init(void) ddlist_sel.body.opa = LV_OPA_COVER; ddlist_sel.body.radius = 0; - theme.ddlist.bg = &ddlist_bg; - theme.ddlist.sel = &ddlist_sel; - theme.ddlist.sb = &sb; + theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.sel = &ddlist_sel; + theme.style.ddlist.sb = &sb; #endif } @@ -671,8 +671,8 @@ static void roller_init(void) roller_sel.text.opa = LV_OPA_COVER; roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); - theme.roller.bg = &roller_bg; - theme.roller.sel = &roller_sel; + theme.style.roller.bg = &roller_bg; + theme.style.roller.sel = &roller_sel; #endif } @@ -725,22 +725,22 @@ static void tabview_init(void) tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/ - theme.tabview.bg = &bg; - theme.tabview.indic = &tab_indic; - theme.tabview.btn.bg = &lv_style_transp_tight; - theme.tabview.btn.rel = &tab_rel; - theme.tabview.btn.pr = &tab_pr; - theme.tabview.btn.tgl_rel = &tab_trel; - theme.tabview.btn.tgl_pr = &tab_tpr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &tab_indic; + theme.style.tabview.btn.bg = &lv_style_transp_tight; + theme.style.tabview.btn.rel = &tab_rel; + theme.style.tabview.btn.pr = &tab_pr; + theme.style.tabview.btn.tgl_rel = &tab_trel; + theme.style.tabview.btn.tgl_pr = &tab_tpr; #endif } static void tileview_init(void) { #if USE_LV_TILEVIEW != 0 - theme.tileview.bg = &lv_style_transp_tight; - theme.tileview.scrl = &lv_style_transp_tight; - theme.tileview.sb = theme.page.sb; + theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.scrl = &lv_style_transp_tight; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -752,8 +752,8 @@ static void table_init(void) cell.body.radius = 0; cell.body.border.width = 1; - theme.table.bg = &lv_style_transp_tight; - theme.table.cell = &cell; + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &cell; #endif } @@ -771,13 +771,13 @@ static void win_init(void) win_header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); win_header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); - theme.win.bg = &bg; - theme.win.sb = &sb; - theme.win.header = &win_header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &btn_rel; - theme.win.btn.pr = &btn_pr; + theme.style.win.bg = &bg; + theme.style.win.sb = &sb; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &btn_rel; + theme.style.win.btn.pr = &btn_pr; #endif } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index ed3823fdc26d..4f86bd032e9e 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -81,8 +81,8 @@ static void basic_init(void) panel.body.padding.hor = LV_DPI / 10; panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40); panel.line.width = 1; - theme.bg = &bg; - theme.panel = &def; + theme.style.bg = &bg; + theme.style.panel = &def; } static void cont_init(void) @@ -90,7 +90,7 @@ static void cont_init(void) #if USE_LV_CONT != 0 - theme.cont = &panel; + theme.style.cont = &panel; #endif } static void btn_init(void) @@ -132,11 +132,11 @@ static void btn_init(void) btn_ina.text.color = LV_COLOR_HEX3(0xaaa); btn_ina.body.shadow.width = 0; - theme.btn.rel = &btn_rel; - theme.btn.pr = &btn_pr; - theme.btn.tgl_rel = &btn_tgl_rel; - theme.btn.tgl_pr = &btn_tgl_pr; - theme.btn.ina = &btn_ina; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; + theme.style.btn.tgl_rel = &btn_tgl_rel; + theme.style.btn.tgl_pr = &btn_tgl_pr; + theme.style.btn.ina = &btn_ina; #endif } @@ -154,9 +154,9 @@ static void label_init(void) lv_style_copy(&hint, &bg); hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 55); - theme.label.prim = &prim; - theme.label.sec = &sec; - theme.label.hint = &hint; + theme.style.label.prim = &prim; + theme.style.label.sec = &sec; + theme.style.label.hint = &hint; #endif } @@ -165,7 +165,7 @@ static void line_init(void) #if USE_LV_LINE != 0 - theme.line.decor = &def; + theme.style.line.decor = &def; #endif } @@ -183,7 +183,7 @@ static void led_init(void) led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); - theme.led = &led; + theme.style.led = &led; #endif } @@ -192,8 +192,8 @@ static void img_init(void) #if USE_LV_IMG != 0 - theme.img.light = &def; - theme.img.dark = &def; + theme.style.img.light = &def; + theme.style.img.dark = &def; #endif } @@ -215,8 +215,8 @@ static void bar_init(void) bar_indic.body.padding.hor = 0; bar_indic.body.padding.ver = 0; - theme.bar.bg = &bar_bg; - theme.bar.indic = &bar_indic; + theme.style.bar.bg = &bar_bg; + theme.style.bar.indic = &bar_indic; #endif } @@ -227,9 +227,9 @@ static void slider_init(void) lv_style_copy(&slider_knob, &btn_rel); slider_knob.body.radius = LV_RADIUS_CIRCLE; - theme.slider.bg = &bar_bg; - theme.slider.indic = &bar_indic; - theme.slider.knob = &slider_knob; + theme.style.slider.bg = &bar_bg; + theme.style.slider.indic = &bar_indic; + theme.style.slider.knob = &slider_knob; #endif } @@ -238,10 +238,10 @@ static void sw_init(void) #if USE_LV_SW != 0 - theme.sw.bg = &bar_bg; - theme.sw.indic = &bar_indic; - theme.sw.knob_off = &slider_knob; - theme.sw.knob_on = &slider_knob; + theme.style.sw.bg = &bar_bg; + theme.style.sw.indic = &bar_indic; + theme.style.sw.knob_off = &slider_knob; + theme.style.sw.knob_on = &slider_knob; #endif } @@ -259,7 +259,7 @@ static void lmeter_init(void) lmeter_bg.line.width = 1; lmeter_bg.text.color = LV_COLOR_HEX3(0xddd); - theme.lmeter = &lmeter_bg; + theme.style.lmeter = &lmeter_bg; #endif } @@ -274,7 +274,7 @@ static void gauge_init(void) gauge_bg.line.width = 1; gauge_bg.text.color = LV_COLOR_HEX3(0xddd); - theme.gauge = &gauge_bg; + theme.style.gauge = &gauge_bg; #endif } @@ -294,7 +294,7 @@ static void arc_init(void) arc.body.padding.hor = 1; arc.body.padding.ver = 1; - theme.arc = &arc; + theme.style.arc = &arc; #endif } @@ -302,14 +302,14 @@ static void preload_init(void) { #if USE_LV_PRELOAD != 0 - theme.preload = theme.arc; + theme.style.preload = theme.style.arc; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = &panel; + theme.style.chart = &panel; #endif } @@ -361,13 +361,13 @@ static void calendar_init(void) lv_style_copy(&ina_days, &bg); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 60); - theme.calendar.bg = &cal_bg; - theme.calendar.header = &cal_header; - theme.calendar.week_box = &week_box; - theme.calendar.today_box = &today_box; - theme.calendar.highlighted_days = &highlighted_days; - theme.calendar.day_names = &cal_bg; - theme.calendar.inactive_days = &ina_days; + theme.style.calendar.bg = &cal_bg; + theme.style.calendar.header = &cal_header; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &today_box; + theme.style.calendar.highlighted_days = &highlighted_days; + theme.style.calendar.day_names = &cal_bg; + theme.style.calendar.inactive_days = &ina_days; #endif } @@ -407,12 +407,12 @@ static void cb_init(void) ina.body.grad_color = LV_COLOR_HEX3(0x777); ina.body.border.width = 0; - theme.cb.bg = &lv_style_transp; - theme.cb.box.rel = &rel; - theme.cb.box.pr = ≺ - theme.cb.box.tgl_rel = &tgl_rel; - theme.cb.box.tgl_pr = &tgl_pr; - theme.cb.box.ina = &def; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ + theme.style.cb.box.tgl_rel = &tgl_rel; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &def; #endif } @@ -453,24 +453,24 @@ static void btnm_init(void) ina.body.border.width = rel.body.border.width; ina.body.radius = rel.body.radius; - theme.btnm.bg = &btnm_bg; - theme.btnm.btn.rel = &rel; - theme.btnm.btn.pr = ≺ - theme.btnm.btn.tgl_rel = &tgl_rel; - theme.btnm.btn.tgl_pr = &tgl_pr; - theme.btnm.btn.ina = &ina; + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ + theme.style.btnm.btn.tgl_rel = &tgl_rel; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &ina; #endif } static void kb_init(void) { #if USE_LV_KB - theme.kb.bg = &bg; - theme.kb.btn.rel = &btn_rel; - theme.kb.btn.pr = &btn_pr; - theme.kb.btn.tgl_rel = &btn_tgl_rel; - theme.kb.btn.tgl_pr = &btn_tgl_pr; - theme.kb.btn.ina = &btn_ina; + theme.style.kb.bg = &bg; + theme.style.kb.btn.rel = &btn_rel; + theme.style.kb.btn.pr = &btn_pr; + theme.style.kb.btn.tgl_rel = &btn_tgl_rel; + theme.style.kb.btn.tgl_pr = &btn_tgl_pr; + theme.style.kb.btn.ina = &btn_ina; #endif } @@ -487,10 +487,10 @@ static void mbox_init(void) mbox_bg.body.shadow.width = LV_DPI / 10; mbox_bg.body.shadow.color = LV_COLOR_HEX3(0x222); mbox_bg.body.radius = LV_DPI / 20; - theme.mbox.bg = &mbox_bg; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &btn_rel; - theme.mbox.btn.pr = &btn_pr; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &btn_rel; + theme.style.mbox.btn.pr = &btn_pr; #endif } @@ -506,28 +506,28 @@ static void page_init(void) page_scrl.body.border.width = 1; page_scrl.body.radius = LV_DPI / 20; - theme.page.bg = &panel; - theme.page.scrl = &page_scrl; - theme.page.sb = &sb; + theme.style.page.bg = &panel; + theme.style.page.scrl = &page_scrl; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if USE_LV_TA - theme.ta.area = &panel; - theme.ta.oneline = &panel; - theme.ta.cursor = NULL; - theme.ta.sb = &def; + theme.style.ta.area = &panel; + theme.style.ta.oneline = &panel; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &def; #endif } static void spinbox_init(void) { #if USE_LV_SPINBOX - theme.spinbox.bg= &panel; - theme.spinbox.cursor = theme.ta.cursor; - theme.spinbox.sb = theme.ta.sb; + theme.style.spinbox.bg= &panel; + theme.style.spinbox.cursor = theme.style.ta.cursor; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -571,14 +571,14 @@ static void list_init(void) list_btn_tgl_pr.body.main_color = btn_tgl_pr.body.main_color; list_btn_tgl_pr.body.grad_color = btn_tgl_pr.body.grad_color; - theme.list.sb = &sb; - theme.list.bg = &list_bg; - theme.list.scrl = &lv_style_transp_tight; - theme.list.btn.rel = &list_btn_rel; - theme.list.btn.pr = &list_btn_pr; - theme.list.btn.tgl_rel = &list_btn_tgl_rel; - theme.list.btn.tgl_pr = &list_btn_tgl_pr; - theme.list.btn.ina = &def; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_btn_rel; + theme.style.list.btn.pr = &list_btn_pr; + theme.style.list.btn.tgl_rel = &list_btn_tgl_rel; + theme.style.list.btn.tgl_pr = &list_btn_tgl_pr; + theme.style.list.btn.ina = &def; #endif } @@ -596,9 +596,9 @@ static void ddlist_init(void) ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 20, 50); ddlist_sel.body.radius = 0; - theme.ddlist.bg = &ddlist_bg; - theme.ddlist.sel = &ddlist_sel; - theme.ddlist.sb = &def; + theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.sel = &ddlist_sel; + theme.style.ddlist.sb = &def; #endif } @@ -613,30 +613,30 @@ static void roller_init(void) roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 70); roller_bg.text.opa = LV_OPA_60; - theme.roller.bg = &roller_bg; - theme.roller.sel = &ddlist_sel; + theme.style.roller.bg = &roller_bg; + theme.style.roller.sel = &ddlist_sel; #endif } static void tabview_init(void) { #if USE_LV_TABVIEW != 0 - theme.tabview.bg = &bg; - theme.tabview.indic = &lv_style_transp; - theme.tabview.btn.bg = &lv_style_transp; - theme.tabview.btn.rel = &btn_rel; - theme.tabview.btn.pr = &btn_pr; - theme.tabview.btn.tgl_rel = &btn_tgl_rel; - theme.tabview.btn.tgl_pr = &btn_tgl_pr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &lv_style_transp; + theme.style.tabview.btn.bg = &lv_style_transp; + theme.style.tabview.btn.rel = &btn_rel; + theme.style.tabview.btn.pr = &btn_pr; + theme.style.tabview.btn.tgl_rel = &btn_tgl_rel; + theme.style.tabview.btn.tgl_pr = &btn_tgl_pr; #endif } static void tileview_init(void) { #if USE_LV_TILEVIEW != 0 - theme.tileview.bg = &lv_style_transp_tight; - theme.tileview.scrl = &lv_style_transp_tight; - theme.tileview.sb = theme.page.sb; + theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.scrl = &lv_style_transp_tight; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -651,8 +651,8 @@ static void table_init(void) cell.body.padding.ver = LV_DPI / 12; - theme.table.bg = &lv_style_transp_tight; - theme.table.cell = &cell; + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &cell; #endif } @@ -679,13 +679,13 @@ static void win_init(void) win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10); win_btn_pr.text.color = LV_COLOR_HEX3(0xaaa); - theme.win.bg = &win_bg; - theme.win.sb = &sb; - theme.win.header = &win_header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &lv_style_transp; - theme.win.btn.pr = &win_btn_pr; + theme.style.win.bg = &win_bg; + theme.style.win.sb = &sb; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &lv_style_transp; + theme.style.win.btn.pr = &win_btn_pr; #endif } diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index b9359d4bc907..eb2e0747c34e 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -47,8 +47,8 @@ static void basic_init(void) lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ def.text.font = _font; - theme.bg = &def; - theme.panel = &def; + theme.style.bg = &def; + theme.style.panel = &def; } @@ -57,7 +57,7 @@ static void cont_init(void) #if USE_LV_CONT != 0 - theme.cont = &def; + theme.style.cont = &def; #endif } @@ -66,22 +66,22 @@ static void btn_init(void) #if USE_LV_BTN != 0 - theme.btn.rel = &def; - theme.btn.pr = &def; - theme.btn.tgl_rel = &def; - theme.btn.tgl_pr = &def; - theme.btn.ina = &def; + theme.style.btn.rel = &def; + theme.style.btn.pr = &def; + theme.style.btn.tgl_rel = &def; + theme.style.btn.tgl_pr = &def; + theme.style.btn.ina = &def; #endif } static void imgbtn_init(void) { #if USE_LV_IMGBTN != 0 - theme.imgbtn.rel = &def; - theme.imgbtn.pr = &def; - theme.imgbtn.tgl_rel = &def; - theme.imgbtn.tgl_pr = &def; - theme.imgbtn.ina = &def; + theme.style.imgbtn.rel = &def; + theme.style.imgbtn.pr = &def; + theme.style.imgbtn.tgl_rel = &def; + theme.style.imgbtn.tgl_pr = &def; + theme.style.imgbtn.ina = &def; #endif } @@ -90,9 +90,9 @@ static void label_init(void) #if USE_LV_LABEL != 0 - theme.label.prim = &def; - theme.label.sec = &def; - theme.label.hint = &def; + theme.style.label.prim = &def; + theme.style.label.sec = &def; + theme.style.label.hint = &def; #endif } @@ -101,8 +101,8 @@ static void img_init(void) #if USE_LV_IMG != 0 - theme.img.light = &def; - theme.img.dark = &def; + theme.style.img.light = &def; + theme.style.img.dark = &def; #endif } @@ -111,7 +111,7 @@ static void line_init(void) #if USE_LV_LINE != 0 - theme.line.decor = &def; + theme.style.line.decor = &def; #endif } @@ -120,7 +120,7 @@ static void led_init(void) #if USE_LV_LED != 0 - theme.led = &def; + theme.style.led = &def; #endif } @@ -129,8 +129,8 @@ static void bar_init(void) #if USE_LV_BAR - theme.bar.bg = &def; - theme.bar.indic = &def; + theme.style.bar.bg = &def; + theme.style.bar.indic = &def; #endif } @@ -139,9 +139,9 @@ static void slider_init(void) #if USE_LV_SLIDER != 0 - theme.slider.bg = &def; - theme.slider.indic = &def; - theme.slider.knob = &def; + theme.style.slider.bg = &def; + theme.style.slider.indic = &def; + theme.style.slider.knob = &def; #endif } @@ -150,10 +150,10 @@ static void sw_init(void) #if USE_LV_SW != 0 - theme.sw.bg = &def; - theme.sw.indic = &def; - theme.sw.knob_off = &def; - theme.sw.knob_on = &def; + theme.style.sw.bg = &def; + theme.style.sw.indic = &def; + theme.style.sw.knob_off = &def; + theme.style.sw.knob_on = &def; #endif } @@ -163,7 +163,7 @@ static void lmeter_init(void) #if USE_LV_LMETER != 0 - theme.lmeter = &def; + theme.style.lmeter = &def; #endif } @@ -172,7 +172,7 @@ static void gauge_init(void) #if USE_LV_GAUGE != 0 - theme.gauge = &def; + theme.style.gauge = &def; #endif } @@ -181,7 +181,7 @@ static void arc_init(void) #if USE_LV_ARC != 0 - theme.arc = &def; + theme.style.arc = &def; #endif } @@ -190,7 +190,7 @@ static void preload_init(void) #if USE_LV_PRELOAD != 0 - theme.preload = &def; + theme.style.preload = &def; #endif } @@ -198,7 +198,7 @@ static void chart_init(void) { #if USE_LV_CHART - theme.chart = &def; + theme.style.chart = &def; #endif } @@ -206,14 +206,14 @@ static void calendar_init(void) { #if USE_LV_CALENDAR - theme.calendar.bg = theme.panel; - theme.calendar.header = &def; - theme.calendar.inactive_days = &def; - theme.calendar.highlighted_days = &def; - theme.calendar.week_box = &def; - theme.calendar.today_box = &def; - theme.calendar.header_pr = &def; - theme.calendar.day_names = &def; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &def; + theme.style.calendar.inactive_days = &def; + theme.style.calendar.highlighted_days = &def; + theme.style.calendar.week_box = &def; + theme.style.calendar.today_box = &def; + theme.style.calendar.header_pr = &def; + theme.style.calendar.day_names = &def; #endif } @@ -222,12 +222,12 @@ static void cb_init(void) #if USE_LV_CB != 0 - theme.cb.bg = &def; - theme.cb.box.rel = &def; - theme.cb.box.pr = &def; - theme.cb.box.tgl_rel = &def; - theme.cb.box.tgl_pr = &def; - theme.cb.box.ina = &def; + theme.style.cb.bg = &def; + theme.style.cb.box.rel = &def; + theme.style.cb.box.pr = &def; + theme.style.cb.box.tgl_rel = &def; + theme.style.cb.box.tgl_pr = &def; + theme.style.cb.box.ina = &def; #endif } @@ -237,12 +237,12 @@ static void btnm_init(void) #if USE_LV_BTNM - theme.btnm.bg = &def; - theme.btnm.btn.rel = &def; - theme.btnm.btn.pr = &def; - theme.btnm.btn.tgl_rel = &def; - theme.btnm.btn.tgl_pr = &def; - theme.btnm.btn.ina = &def; + theme.style.btnm.bg = &def; + theme.style.btnm.btn.rel = &def; + theme.style.btnm.btn.pr = &def; + theme.style.btnm.btn.tgl_rel = &def; + theme.style.btnm.btn.tgl_pr = &def; + theme.style.btnm.btn.ina = &def; #endif } @@ -251,12 +251,12 @@ static void kb_init(void) #if USE_LV_KB - theme.kb.bg = &def; - theme.kb.btn.rel = &def; - theme.kb.btn.pr = &def; - theme.kb.btn.tgl_rel = &def; - theme.kb.btn.tgl_pr = &def; - theme.kb.btn.ina = &def; + theme.style.kb.bg = &def; + theme.style.kb.btn.rel = &def; + theme.style.kb.btn.pr = &def; + theme.style.kb.btn.tgl_rel = &def; + theme.style.kb.btn.tgl_pr = &def; + theme.style.kb.btn.ina = &def; #endif } @@ -266,10 +266,10 @@ static void mbox_init(void) #if USE_LV_MBOX - theme.mbox.bg = &def; - theme.mbox.btn.bg = &def; - theme.mbox.btn.rel = &def; - theme.mbox.btn.pr = &def; + theme.style.mbox.bg = &def; + theme.style.mbox.btn.bg = &def; + theme.style.mbox.btn.rel = &def; + theme.style.mbox.btn.pr = &def; #endif } @@ -278,9 +278,9 @@ static void page_init(void) #if USE_LV_PAGE - theme.page.bg = &def; - theme.page.scrl = &def; - theme.page.sb = &def; + theme.style.page.bg = &def; + theme.style.page.scrl = &def; + theme.style.page.sb = &def; #endif } @@ -289,10 +289,10 @@ static void ta_init(void) #if USE_LV_TA - theme.ta.area = &def; - theme.ta.oneline = &def; - theme.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.ta.sb = &def; + theme.style.ta.area = &def; + theme.style.ta.oneline = &def; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &def; #endif } @@ -301,14 +301,14 @@ static void list_init(void) #if USE_LV_LIST != 0 - theme.list.sb = &def; - theme.list.bg = &def; - theme.list.scrl = &def; - theme.list.btn.rel = &def; - theme.list.btn.pr = &def; - theme.list.btn.tgl_rel = &def; - theme.list.btn.tgl_pr = &def; - theme.list.btn.ina = &def; + theme.style.list.sb = &def; + theme.style.list.bg = &def; + theme.style.list.scrl = &def; + theme.style.list.btn.rel = &def; + theme.style.list.btn.pr = &def; + theme.style.list.btn.tgl_rel = &def; + theme.style.list.btn.tgl_pr = &def; + theme.style.list.btn.ina = &def; #endif } @@ -317,9 +317,9 @@ static void ddlist_init(void) #if USE_LV_DDLIST != 0 - theme.ddlist.bg = &def; - theme.ddlist.sel = &def; - theme.ddlist.sb = &def; + theme.style.ddlist.bg = &def; + theme.style.ddlist.sel = &def; + theme.style.ddlist.sb = &def; #endif } @@ -328,8 +328,8 @@ static void roller_init(void) #if USE_LV_ROLLER != 0 - theme.roller.bg = &def; - theme.roller.sel = &def; + theme.style.roller.bg = &def; + theme.style.roller.sel = &def; #endif } @@ -338,13 +338,13 @@ static void tabview_init(void) #if USE_LV_TABVIEW != 0 - theme.tabview.bg = &def; - theme.tabview.indic = &def; - theme.tabview.btn.bg = &def; - theme.tabview.btn.rel = &def; - theme.tabview.btn.pr = &def; - theme.tabview.btn.tgl_rel = &def; - theme.tabview.btn.tgl_pr = &def; + theme.style.tabview.bg = &def; + theme.style.tabview.indic = &def; + theme.style.tabview.btn.bg = &def; + theme.style.tabview.btn.rel = &def; + theme.style.tabview.btn.pr = &def; + theme.style.tabview.btn.tgl_rel = &def; + theme.style.tabview.btn.tgl_pr = &def; #endif } @@ -354,13 +354,13 @@ static void win_init(void) #if USE_LV_WIN != 0 - theme.win.bg = &def; - theme.win.sb = &def; - theme.win.header = &def; - theme.win.content.bg = &def; - theme.win.content.scrl = &def; - theme.win.btn.rel = &def; - theme.win.btn.pr = &def; + theme.style.win.bg = &def; + theme.style.win.sb = &def; + theme.style.win.header = &def; + theme.style.win.content.bg = &def; + theme.style.win.content.scrl = &def; + theme.style.win.btn.rel = &def; + theme.style.win.btn.pr = &def; #endif } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 7cdf5a10c745..f04be7bcc03b 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -78,8 +78,8 @@ static void basic_init(void) sb.body.radius = LV_RADIUS_CIRCLE; sb.body.padding.inner = LV_DPI / 10; - theme.bg = &bg; - theme.panel = &panel; + theme.style.bg = &bg; + theme.style.panel = &panel; } static void cont_init(void) @@ -87,7 +87,7 @@ static void cont_init(void) #if USE_LV_CONT != 0 - theme.cont = theme.panel; + theme.style.cont = theme.style.panel; #endif } @@ -120,11 +120,11 @@ static void btn_init(void) ina.body.border.color = LV_COLOR_HEX3(0xbbb); ina.text.color = LV_COLOR_HEX3(0xbbb); - theme.btn.rel = &rel; - theme.btn.pr = ≺ - theme.btn.tgl_rel = ≺ - theme.btn.tgl_pr = &tgl_pr; - theme.btn.ina = &ina; + theme.style.btn.rel = &rel; + theme.style.btn.pr = ≺ + theme.style.btn.tgl_rel = ≺ + theme.style.btn.tgl_pr = &tgl_pr; + theme.style.btn.ina = &ina; #endif } @@ -140,9 +140,9 @@ static void label_init(void) sec.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); hint.text.color = lv_color_hsv_to_rgb(_hue, 25, 85); - theme.label.prim = &prim; - theme.label.sec = &sec; - theme.label.hint = &hint; + theme.style.label.prim = &prim; + theme.style.label.sec = &sec; + theme.style.label.hint = &hint; #endif } @@ -158,8 +158,8 @@ static void img_init(void) img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 55); img_light.image.intense = LV_OPA_80; - theme.img.light = &img_light; - theme.img.dark = &img_dark; + theme.style.img.light = &img_light; + theme.style.img.dark = &img_dark; #endif } @@ -168,7 +168,7 @@ static void line_init(void) #if USE_LV_LINE != 0 - theme.line.decor = &def; + theme.style.line.decor = &def; #endif } @@ -187,7 +187,7 @@ static void led_init(void) led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 80, 100); - theme.led = &led; + theme.style.led = &led; #endif } @@ -212,8 +212,8 @@ static void bar_init(void) indic.body.padding.ver = LV_DPI / 20; - theme.bar.bg = &bg; - theme.bar.indic = &indic; + theme.style.bar.bg = &bg; + theme.style.bar.indic = &indic; #endif } @@ -223,14 +223,14 @@ static void slider_init(void) static lv_style_t knob; lv_style_copy(&knob, &def); - knob.body.main_color = theme.bar.indic->body.main_color; + knob.body.main_color = theme.style.bar.indic->body.main_color; knob.body.grad_color = knob.body.main_color; knob.body.radius = LV_RADIUS_CIRCLE; knob.body.border.width = 0; - theme.slider.bg = theme.bar.bg; - theme.slider.indic = theme.bar.indic; - theme.slider.knob = &knob; + theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.indic = theme.style.bar.indic; + theme.style.slider.knob = &knob; #endif } @@ -239,22 +239,22 @@ static void sw_init(void) #if USE_LV_SW != 0 static lv_style_t indic; - lv_style_copy(&indic, theme.slider.indic); + lv_style_copy(&indic, theme.style.slider.indic); indic.body.radius = LV_RADIUS_CIRCLE; indic.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); indic.body.grad_color = indic.body.main_color; - indic.body.border.width = theme.slider.bg->body.border.width; - indic.body.border.color = theme.slider.bg->body.border.color; - indic.body.border.opa = theme.slider.bg->body.border.opa; + indic.body.border.width = theme.style.slider.bg->body.border.width; + indic.body.border.color = theme.style.slider.bg->body.border.color; + indic.body.border.opa = theme.style.slider.bg->body.border.opa; indic.body.padding.hor = 0; indic.body.padding.ver = 0; - theme.sw.bg = theme.slider.bg; - theme.sw.indic = &indic; - theme.sw.knob_off = theme.slider.knob; - theme.sw.knob_on = theme.slider.knob; + theme.style.sw.bg = theme.style.slider.bg; + theme.style.sw.indic = &indic; + theme.style.sw.knob_off = theme.style.slider.knob; + theme.style.sw.knob_on = theme.style.slider.knob; #endif } @@ -271,7 +271,7 @@ static void lmeter_init(void) lmeter.body.grad_color = lmeter.body.main_color; lmeter.body.padding.hor = LV_DPI / 8; - theme.lmeter = &lmeter; + theme.style.lmeter = &lmeter; #endif } @@ -288,7 +288,7 @@ static void gauge_init(void) gauge.body.padding.hor = LV_DPI / 16; gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/ - theme.gauge = &gauge; + theme.style.gauge = &gauge; #endif } @@ -305,7 +305,7 @@ static void arc_init(void) /*For preloader*/ arc.body.border.width = 0; - theme.arc = &arc; + theme.style.arc = &arc; #endif } @@ -313,14 +313,14 @@ static void preload_init(void) { #if USE_LV_PRELOAD != 0 - theme.preload = theme.arc; + theme.style.preload = theme.style.arc; #endif } static void chart_init(void) { #if USE_LV_CHART - theme.chart = theme.panel; + theme.style.chart = theme.style.panel; #endif } @@ -338,16 +338,16 @@ static void calendar_init(void) static lv_style_t today_box; lv_style_copy(&today_box, &def); today_box.body.empty = 1; - today_box.body.border.color = theme.panel->body.border.color; + today_box.body.border.color = theme.style.panel->body.border.color; today_box.body.padding.ver = LV_DPI / 20; today_box.body.radius = LV_RADIUS_CIRCLE; - theme.calendar.bg = theme.panel; - theme.calendar.header = &lv_style_transp; - theme.calendar.inactive_days = &ina_days; - theme.calendar.highlighted_days = &high_days; - theme.calendar.week_box = &lv_style_transp_fit; - theme.calendar.today_box = &today_box; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &lv_style_transp; + theme.style.calendar.inactive_days = &ina_days; + theme.style.calendar.highlighted_days = &high_days; + theme.style.calendar.week_box = &lv_style_transp_fit; + theme.style.calendar.today_box = &today_box; #endif } @@ -384,12 +384,12 @@ static void cb_init(void) ina.body.border.color = LV_COLOR_HEX3(0xaaa); - theme.cb.bg = &lv_style_transp; - theme.cb.box.rel = &rel; - theme.cb.box.pr = ≺ - theme.cb.box.tgl_rel = &tgl_rel; - theme.cb.box.tgl_pr = &tgl_pr; - theme.cb.box.ina = &ina; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ + theme.style.cb.box.tgl_rel = &tgl_rel; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &ina; #endif } @@ -434,12 +434,12 @@ static void btnm_init(void) ina.body.grad_color = tgl_pr.body.main_color; ina.text.color = LV_COLOR_HEX3(0x888);; - theme.btnm.bg = &bg; - theme.btnm.btn.rel = &rel; - theme.btnm.btn.pr = ≺ - theme.btnm.btn.tgl_rel = &tgl_rel; - theme.btnm.btn.tgl_pr = &tgl_pr; - theme.btnm.btn.ina = &ina; + theme.style.btnm.bg = &bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ + theme.style.btnm.btn.tgl_rel = &tgl_rel; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &ina; #endif } @@ -489,12 +489,12 @@ static void kb_init(void) ina.body.grad_color = ina.body.main_color; ina.text.color = LV_COLOR_HEX3(0xbbb); - theme.kb.bg = &bg; - theme.kb.btn.rel = &rel; - theme.kb.btn.pr = ≺ - theme.kb.btn.tgl_rel = &tgl_rel; - theme.kb.btn.tgl_pr = &tgl_pr; - theme.kb.btn.ina = &ina; + theme.style.kb.bg = &bg; + theme.style.kb.btn.rel = &rel; + theme.style.kb.btn.pr = ≺ + theme.style.kb.btn.tgl_rel = &tgl_rel; + theme.style.kb.btn.tgl_pr = &tgl_pr; + theme.style.kb.btn.ina = &ina; #endif } @@ -503,7 +503,7 @@ static void mbox_init(void) { #if USE_LV_MBOX static lv_style_t bg, rel, pr; - lv_style_copy(&bg, theme.panel); + lv_style_copy(&bg, theme.style.panel); bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); bg.body.grad_color = bg.body.main_color; bg.text.color = lv_color_hsv_to_rgb(_hue, 40, 25); @@ -525,10 +525,10 @@ static void mbox_init(void) pr.body.grad_color = pr.body.main_color; - theme.mbox.bg = &bg; - theme.mbox.btn.bg = &lv_style_transp; - theme.mbox.btn.rel = &rel; - theme.mbox.btn.pr = ≺ + theme.style.mbox.bg = &bg; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &rel; + theme.style.mbox.btn.pr = ≺ #endif } @@ -537,9 +537,9 @@ static void page_init(void) #if USE_LV_PAGE - theme.page.bg = theme.panel; - theme.page.scrl = &lv_style_transp; - theme.page.sb = &sb; + theme.style.page.bg = theme.style.panel; + theme.style.page.scrl = &lv_style_transp; + theme.style.page.sb = &sb; #endif } @@ -547,25 +547,25 @@ static void ta_init(void) { #if USE_LV_TA static lv_style_t oneline; - lv_style_copy(&oneline, theme.panel); + lv_style_copy(&oneline, theme.style.panel); oneline.body.radius = LV_RADIUS_CIRCLE; oneline.body.padding.ver = LV_DPI / 10; oneline.body.shadow.width = 0; - theme.ta.area = theme.panel; - theme.ta.oneline = &oneline; - theme.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.ta.sb = &def; + theme.style.ta.area = theme.style.panel; + theme.style.ta.oneline = &oneline; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &def; #endif } static void spinbox_init(void) { #if USE_LV_SPINBOX - theme.spinbox.bg= theme.panel; - theme.spinbox.cursor = theme.ta.cursor; - theme.spinbox.sb = theme.ta.sb; + theme.style.spinbox.bg= theme.style.panel; + theme.style.spinbox.cursor = theme.style.ta.cursor; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -574,7 +574,7 @@ static void list_init(void) #if USE_LV_LIST != 0 static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; - lv_style_copy(&bg, theme.panel); + lv_style_copy(&bg, theme.style.panel); bg.body.padding.hor = 0; bg.body.padding.ver = 0; @@ -586,25 +586,25 @@ static void list_init(void) rel.text.color = LV_COLOR_HEX3(0x666); lv_style_copy(&pr, &rel); - pr.text.color = theme.btn.pr->text.color; + pr.text.color = theme.style.btn.pr->text.color; lv_style_copy(&tgl_rel, &rel); tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 90); lv_style_copy(&tgl_pr, &rel); - tgl_pr.text.color = theme.btn.tgl_pr->text.color; + tgl_pr.text.color = theme.style.btn.tgl_pr->text.color; lv_style_copy(&ina, &rel); - ina.text.color = theme.btn.ina->text.color; - - theme.list.sb = &sb; - theme.list.bg = &bg; - theme.list.scrl = &lv_style_transp_tight; - theme.list.btn.rel = &rel; - theme.list.btn.pr = ≺ - theme.list.btn.tgl_rel = &tgl_rel; - theme.list.btn.tgl_pr = &tgl_pr; - theme.list.btn.ina = &ina; + ina.text.color = theme.style.btn.ina->text.color; + + theme.style.list.sb = &sb; + theme.style.list.bg = &bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &rel; + theme.style.list.btn.pr = ≺ + theme.style.list.btn.tgl_rel = &tgl_rel; + theme.style.list.btn.tgl_pr = &tgl_pr; + theme.style.list.btn.ina = &ina; #endif } @@ -612,7 +612,7 @@ static void ddlist_init(void) { #if USE_LV_DDLIST != 0 static lv_style_t bg, sel; - lv_style_copy(&bg, theme.panel); + lv_style_copy(&bg, theme.style.panel); bg.text.line_space = LV_DPI / 8; bg.body.padding.hor = LV_DPI / 6; bg.body.padding.ver = LV_DPI / 8; @@ -623,9 +623,9 @@ static void ddlist_init(void) sel.body.border.width = 0; sel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); - theme.ddlist.bg = &bg; - theme.ddlist.sel = &sel; - theme.ddlist.sb = &def; + theme.style.ddlist.bg = &bg; + theme.style.ddlist.sel = &sel; + theme.style.ddlist.sb = &def; #endif } @@ -639,12 +639,12 @@ static void roller_init(void) bg.text.line_space = LV_DPI / 6; bg.text.color = LV_COLOR_HEX3(0x999); - lv_style_copy(&sel, theme.panel); + lv_style_copy(&sel, theme.style.panel); sel.body.radius = LV_RADIUS_CIRCLE; sel.body.empty = 1; - theme.roller.bg = &bg; - theme.roller.sel = &sel; + theme.style.roller.bg = &bg; + theme.style.roller.sel = &sel; #endif } @@ -681,22 +681,22 @@ static void tabview_init(void) lv_style_copy(&tgl_pr, &rel); tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 50, 70); - theme.tabview.bg = theme.bg; - theme.tabview.indic = &indic; - theme.tabview.btn.bg = &btn_bg; - theme.tabview.btn.rel = &rel; - theme.tabview.btn.pr = ≺ - theme.tabview.btn.tgl_rel = &tgl_rel; - theme.tabview.btn.tgl_pr = &tgl_pr; + theme.style.tabview.bg = theme.style.bg; + theme.style.tabview.indic = &indic; + theme.style.tabview.btn.bg = &btn_bg; + theme.style.tabview.btn.rel = &rel; + theme.style.tabview.btn.pr = ≺ + theme.style.tabview.btn.tgl_rel = &tgl_rel; + theme.style.tabview.btn.tgl_pr = &tgl_pr; #endif } static void tileview_init(void) { #if USE_LV_TILEVIEW != 0 - theme.tileview.bg = &lv_style_transp_tight; - theme.tileview.scrl = &lv_style_transp_tight; - theme.tileview.sb = theme.page.sb; + theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.scrl = &lv_style_transp_tight; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -704,15 +704,15 @@ static void table_init(void) { #if USE_LV_TABLE != 0 static lv_style_t cell; - lv_style_copy(&cell, theme.panel); + lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; cell.body.border.width = 1; cell.body.shadow.width = 0; cell.body.padding.hor = LV_DPI / 12; cell.body.padding.ver = LV_DPI / 12; - theme.table.bg = &lv_style_transp_tight; - theme.table.cell = &cell; + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &cell; #endif } @@ -736,13 +736,13 @@ static void win_init(void) lv_style_copy(&pr, &rel); pr.text.color = LV_COLOR_HEX3(0x333); - theme.win.bg = theme.panel; - theme.win.sb = &sb; - theme.win.header = &header; - theme.win.content.bg = &lv_style_transp; - theme.win.content.scrl = &lv_style_transp; - theme.win.btn.rel = &rel; - theme.win.btn.pr = ≺ + theme.style.win.bg = theme.style.panel; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; + theme.style.win.content.scrl = &lv_style_transp; + theme.style.win.btn.rel = &rel; + theme.style.win.btn.pr = ≺ #endif } From 728cd172752a5b123353e1c0cdc5c6b455b3b04a Mon Sep 17 00:00:00 2001 From: manison Date: Tue, 12 Feb 2019 09:04:24 +0100 Subject: [PATCH 015/590] determine required size of the th_styles array at compile time and remove runtime assertion https://github.com/littlevgl/lvgl/issues/806 --- lv_themes/lv_theme.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 2090529f626f..bbdca6e4c5b8 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -34,10 +34,8 @@ static lv_theme_t * current_theme; * This way the theme styles will always point to the same memory address even after theme is change. * (The pointers in the theme points to the styles declared by the theme itself) */ -/* Store the styles in this array. - * Can't determine the size in compile time because sizeof is not evaluated (should be `sizeof(lv_theme_t) / sizeof(lv_style_t*)`). - * Error will be generated in run time if too small.*/ -static lv_style_t th_styles[120]; +/* Store the styles in this array. */ +static lv_style_t th_styles[sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *)]; static bool inited = false; static lv_theme_t current_theme; #endif @@ -63,12 +61,6 @@ void lv_theme_set_current(lv_theme_t * th) uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/ if(!inited) { - /*It's not sure `th_styles` is big enough. Check it now!*/ - if(style_num > sizeof(th_styles) / sizeof(lv_style_t)) { - LV_LOG_ERROR("Themes: th_styles array is too small. Increase it's size!"); - while(1); - } - /*Initialize the style pointers `current_theme` to point to the `th_styles` style array */ uint16_t i; lv_style_t ** cur_th_style_p = (lv_style_t **) ¤t_theme.style; From fa736411e3c168137d827f2fc0e8cbab1d4196ab Mon Sep 17 00:00:00 2001 From: canardos Date: Tue, 12 Feb 2019 16:55:30 +0800 Subject: [PATCH 016/590] Move control byte to separate array and add functions to modify dynamically --- lv_objx/lv_btnm.c | 300 ++++++++++++++++++++++++++++++++++------------ lv_objx/lv_btnm.h | 55 ++++++++- 2 files changed, 275 insertions(+), 80 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 07e6a72b289a..62003d414f60 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -28,14 +28,17 @@ **********************/ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param); static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mode_t mode); -static uint8_t get_button_width(const char * btn_str); -static bool button_is_hidden(const char * btn_str); -static bool button_is_repeat_disabled(const char * btn_str); -static bool button_is_inactive(const char * btn_str); +static uint8_t get_button_width(lv_btn_ctrl_t ctrl_bits); +static bool button_is_hidden(lv_btn_ctrl_t ctrl_bits); +static bool button_is_repeat_disabled(lv_btn_ctrl_t ctrl_bits); +static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits); const char * cut_ctrl_byte(const char * btn_str); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id); -static void allocate_btn_areas(lv_obj_t * btnm, const char ** map); +static void parse_control_bytes(lv_obj_t * btnm, const char ** map); +static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map); +static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); +static bool maps_are_identical(const char ** map1, const char ** map2); /********************** * STATIC VARIABLES @@ -81,6 +84,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) ext->btn_id_pr = LV_BTNM_PR_NONE; ext->btn_id_tgl = LV_BTNM_PR_NONE; ext->button_areas = NULL; + ext->ctrl_bits = NULL; ext->action = NULL; ext->map_p = NULL; ext->toggle = 0; @@ -133,7 +137,9 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) *====================*/ /** - * Set a new map. Buttons will be created/deleted according to the map. + * Set a new map. Buttons will be created/deleted according to the map. The + * button matrix keeps a reference to the map and so the string array must not + * be deallocated during the life of the matrix. * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". * Use "\n" to begin a new line. @@ -144,17 +150,34 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * - bit 4: no repeat (on long press) (\22x) * - bit 3: hidden (\21x) * - bit 2..0: button relative width - * Example (practically use octal numbers): "\224abc": "abc" text with 4 width and no long press + * Example (practically use octal numbers): "\224abc": "abc" text + * with 4 width and no long press. */ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) { if(map == NULL) return; + /* + * lv_btnm_set_map is called on receipt of signals such as + * LV_SIGNAL_CORD_CHG regardless of whether the map has changed (e.g. + * calling lv_obj_align on the map will trigger this). + * + * We check if the map has changed here to avoid overwriting changes made + * to hidden/longpress/disabled states after the map was originally set. + * + * TODO: separate all map set/allocation from layout code below and skip + * set/allocation when map hasn't changed. + */ lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - ext->map_p = map; + if (!maps_are_identical(ext->map_p, map)) { + + /*Analyze the map and create the required number of buttons*/ + allocate_btn_areas_and_controls(btnm, map); - /*Analyze the map and create the required number of buttons*/ - allocate_btn_areas(btnm, map); + /*Set the control bytes*/ + parse_control_bytes(btnm, map); + } + ext->map_p = map; /*Set size and positions of the buttons*/ lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); @@ -189,7 +212,7 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) /*Count the buttons in a line*/ while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ - unit_cnt += get_button_width(map_p_tmp[btn_cnt]); + unit_cnt += get_button_width(ext->ctrl_bits[btn_cnt]); btn_cnt ++; } @@ -212,7 +235,7 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) /* one_unit_w = all_unit_w / unit_cnt * act_unit_w = one_unit_w * button_width * do this two operations but the multiply first to divide a greater number */ - act_unit_w = (all_unit_w * get_button_width(map_p_tmp[i])) / unit_cnt; + act_unit_w = (all_unit_w * get_button_width(ext->ctrl_bits[i])) / unit_cnt; act_unit_w --; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/ /*Always recalculate act_x because of rounding errors */ @@ -228,7 +251,7 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) act_x + act_unit_w, act_y + btn_h); } - unit_act_cnt += get_button_width(map_p_tmp[i]); + unit_act_cnt += get_button_width(ext->ctrl_bits[i]); i_tot ++; btn_i ++; @@ -322,6 +345,105 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) lv_obj_invalidate(btnm); } +/** + * Show/hide a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to hide/show + * @param hidden true: hide the button + */ +void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_idx >= ext->btn_cnt) return; + if (hidden) + ext->ctrl_bits[btn_idx] |= LV_BTNM_HIDE_MASK; + else + ext->ctrl_bits[btn_idx] &= (~LV_BTNM_HIDE_MASK); + + invalidate_button_area(btnm, btn_idx); +} + +/** + * Enable/disable a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to enable/disable + * @param disabled true: disable the button + */ +void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_idx >= ext->btn_cnt) return; + if (disabled) + ext->ctrl_bits[btn_idx] |= LV_BTNM_INACTIVE_MASK; + else + ext->ctrl_bits[btn_idx] &= (~LV_BTNM_INACTIVE_MASK); + + invalidate_button_area(btnm, btn_idx); +} + +/** + * Enable/disable long press for a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param disabled true: disable repeat + */ +void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_idx >= ext->btn_cnt) return; + if (disabled) + ext->ctrl_bits[btn_idx] |= LV_BTNM_REPEAT_DISABLE_MASK; + else + ext->ctrl_bits[btn_idx] &= (~LV_BTNM_REPEAT_DISABLE_MASK); + + invalidate_button_area(btnm, btn_idx); +} + +/*** + * Set hidden/disabled/repeat flags for a single button. + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param hidden true: hide the button + * @param disabled true: disable the button + * @param disable_repeat true: disable repeat + */ +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, bool disabled, bool disable_repeat) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_idx >= ext->btn_cnt) return; + + uint8_t flags = ext->ctrl_bits[btn_idx]; + + flags = hidden ? flags | LV_BTNM_HIDE_MASK : flags & (~LV_BTNM_HIDE_MASK); + flags = disabled ? flags | LV_BTNM_INACTIVE_MASK : flags & (~LV_BTNM_INACTIVE_MASK); + flags = disable_repeat ? flags | LV_BTNM_REPEAT_DISABLE_MASK : flags & (~LV_BTNM_REPEAT_DISABLE_MASK); + + ext->ctrl_bits[btn_idx] = flags; + invalidate_button_area(btnm, btn_idx); +} + + +/** + * Set a single buttons relative width. + * This method will cause the matrix be regenerated and is a relatively + * expensive operation. It is recommended that initial width be specified using + * the control characters when calling lv_btnm_set_map and this method only be + * used for dynamic changes. + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param width Relative width compared to the buttons in the same row. [1..7] + */ +void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width) { + + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_idx >= ext->btn_cnt) return; + ext->ctrl_bits[btn_idx] &= (~LV_BTNM_WIDTH_MASK); + ext->ctrl_bits[btn_idx] |= (LV_BTNM_WIDTH_MASK & width); + + lv_btnm_set_map(btnm, ext->map_p); +} + + /*===================== * Getter functions *====================*/ @@ -468,7 +590,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo } /*Skip hidden buttons*/ - if(button_is_hidden(ext->map_p[txt_i])) continue; + if(button_is_hidden(ext->ctrl_bits[txt_i])) continue; lv_area_copy(&area_tmp, &ext->button_areas[btn_i]); area_tmp.x1 += area_btnm.x1; @@ -480,7 +602,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo btn_h = lv_area_get_height(&area_tmp); /*Load the style*/ - if(button_is_inactive(ext->map_p[txt_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); + if(button_is_inactive(ext->ctrl_bits[txt_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); else if(btn_i != ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); else if(btn_i == ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); else if(btn_i != ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); @@ -546,11 +668,12 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - lv_area_t btnm_area; + //lv_area_t btnm_area; lv_area_t btn_area; lv_point_t p; if(sign == LV_SIGNAL_CLEANUP) { lv_mem_free(ext->button_areas); + lv_mem_free(ext->ctrl_bits); } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) { lv_btnm_set_map(btnm, ext->map_p); } else if(sign == LV_SIGNAL_PRESSING) { @@ -559,24 +682,14 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_indev_get_point(param, &p); btn_pr = get_button_from_point(btnm, &p); /*Invalidate to old and the new areas*/; - lv_obj_get_coords(btnm, &btnm_area); + //lv_obj_get_coords(btnm, &btnm_area); if(btn_pr != ext->btn_id_pr) { lv_indev_reset_lpr(param); if(ext->btn_id_pr != LV_BTNM_PR_NONE) { - lv_area_copy(&btn_area, &ext->button_areas[ext->btn_id_pr]); - btn_area.x1 += btnm_area.x1; - btn_area.y1 += btnm_area.y1; - btn_area.x2 += btnm_area.x1; - btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + invalidate_button_area(btnm, ext->btn_id_pr); } if(btn_pr != LV_BTNM_PR_NONE) { - lv_area_copy(&btn_area, &ext->button_areas[btn_pr]); - btn_area.x1 += btnm_area.x1; - btn_area.y1 += btnm_area.y1; - btn_area.x2 += btnm_area.x1; - btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + invalidate_button_area(btnm, btn_pr); } } @@ -587,8 +700,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(ext->action && ext->btn_id_pr != LV_BTNM_PR_NONE) { uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); if(txt_i != LV_BTNM_PR_NONE) { - if(button_is_repeat_disabled(ext->map_p[txt_i]) == false && - button_is_inactive(ext->map_p[txt_i]) == false) { + if(button_is_repeat_disabled(ext->ctrl_bits[txt_i]) == false && + button_is_inactive(ext->ctrl_bits[txt_i]) == false) { res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); } } @@ -596,27 +709,16 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { if(ext->btn_id_pr != LV_BTNM_PR_NONE) { uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); - if(button_is_inactive(ext->map_p[txt_i]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons anf click between the buttons*/ + if(button_is_inactive(ext->ctrl_bits[txt_i]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons anf click between the buttons*/ if(ext->action) res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); if(res == LV_RES_OK) { /*Invalidate to old pressed area*/; - lv_obj_get_coords(btnm, &btnm_area); - lv_area_copy(&btn_area, &ext->button_areas[ext->btn_id_pr]); - btn_area.x1 += btnm_area.x1; - btn_area.y1 += btnm_area.y1; - btn_area.x2 += btnm_area.x1; - btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + invalidate_button_area(btnm, ext->btn_id_pr); if(ext->toggle != 0) { /*Invalidate to old toggled area*/; - lv_area_copy(&btn_area, &ext->button_areas[ext->btn_id_tgl]); - btn_area.x1 += btnm_area.x1; - btn_area.y1 += btnm_area.y1; - btn_area.x2 += btnm_area.x1; - btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + invalidate_button_area(btnm, ext->btn_id_tgl); ext->btn_id_tgl = ext->btn_id_pr; } @@ -734,11 +836,11 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } /** - * Create the required number of buttons according to a map + * Create the required number of buttons and control bytes according to a map * @param btnm pointer to button matrix object * @param map_p pointer to a string array */ -static void allocate_btn_areas(lv_obj_t * btnm, const char ** map) +static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map) { /*Count the buttons in the map*/ uint16_t btn_cnt = 0; @@ -756,59 +858,60 @@ static void allocate_btn_areas(lv_obj_t * btnm, const char ** map) lv_mem_free(ext->button_areas); ext->button_areas = NULL; } + if(ext->ctrl_bits != NULL) { + lv_mem_free(ext->ctrl_bits); + ext->ctrl_bits = NULL; + } ext->button_areas = lv_mem_alloc(sizeof(lv_area_t) * btn_cnt); lv_mem_assert(ext->button_areas); - if(ext->button_areas == NULL) btn_cnt = 0; + ext->ctrl_bits = lv_mem_alloc(sizeof(lv_btn_ctrl_t) * btn_cnt); + lv_mem_assert(ext->ctrl_bits); + if(ext->button_areas == NULL || ext->ctrl_bits == NULL) btn_cnt = 0; ext->btn_cnt = btn_cnt; } /** - * Get the width of a button in units. It comes from the first "letter". - * @param btn_str The descriptor string of a button. E.g. "apple" or "\004banana" - * @return the width of the button in units + * Set the control bytes as provided in the map strings + * @param btnm pointer to button matrix object + * @param map_p pointer to a string array */ -static uint8_t get_button_width(const char * btn_str) +static void parse_control_bytes(lv_obj_t * btnm, const char ** map) { - if((btn_str[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) { - return btn_str[0] & LV_BTNM_WIDTH_MASK; - } + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return 1; /*Default width is 1*/ + for (uint16_t i = 0; i < ext->btn_cnt; i++) { + ext->ctrl_bits[i] = ((map[i][0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) + ? map[i][0] + : 0; + } } -static bool button_is_hidden(const char * btn_str) -{ - /*If control byte presents and hidden bit is '1' then the button is hidden*/ - if(((btn_str[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) && - (btn_str[0] & LV_BTNM_HIDE_MASK)) { - return true; - } - return false; +/** + * Get the width of a button in units (default is 1). + * @param ctrl_bits least significant 3 bits used (1..7 valid values) + * @return the width of the button in units + */ +static uint8_t get_button_width(lv_btn_ctrl_t ctrl_bits) +{ + return ctrl_bits ? ctrl_bits & LV_BTNM_WIDTH_MASK : 1; } -static bool button_is_repeat_disabled(const char * btn_str) +static bool button_is_hidden(lv_btn_ctrl_t ctrl_bits) { - /*If control byte presents and hidden bit is '1' then the button is hidden*/ - if(((btn_str[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) && - (btn_str[0] & LV_BTNM_REPEAT_DISABLE_MASK)) { - return true; - } - - return false; + return ctrl_bits & LV_BTNM_HIDE_MASK; } -static bool button_is_inactive(const char * btn_str) +static bool button_is_repeat_disabled(lv_btn_ctrl_t ctrl_bits) { - /*If control byte presents and hidden bit is '1' then the button is hidden*/ - if(((btn_str[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) && - (btn_str[0] & LV_BTNM_INACTIVE_MASK)) { - return true; - } + return ctrl_bits & LV_BTNM_REPEAT_DISABLE_MASK; +} - return false; +static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits) +{ + return ctrl_bits & LV_BTNM_INACTIVE_MASK; } @@ -876,5 +979,44 @@ static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id) return txt_i; } +static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx) +{ + lv_area_t btn_area; + lv_area_t btnm_area; + + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + lv_area_copy(&btn_area, &ext->button_areas[btn_idx]); + lv_obj_get_coords(btnm, &btnm_area); + + /* Convert relative coordinates to absolute */ + btn_area.x1 += btnm_area.x1; + btn_area.y1 += btnm_area.y1; + btn_area.x2 += btnm_area.x1; + btn_area.y2 += btnm_area.y1; + + lv_inv_area(&btn_area); +} + +/** + * Compares two button matrix maps for equality + * @param map1 map to compare + * @param map2 map to compare + * @return true if maps are identical in length and content + */ +static bool maps_are_identical(const char ** map1, const char ** map2) +{ + if (map1 == map2) + return true; + if (map1 == NULL || map2 == NULL) + return map1 == map2; + + uint16_t i = 0; + while (map1[i][0] != '\0' && map2[i][0] != '\0') { + if (strcmp(map1[i], map2[i]) !=0 ) + return false; + } + return map1[i][0] == '\0' && map2[i][0] == '\0'; +} + #endif diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index de334b7533df..f0abfe550e6e 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -49,6 +49,9 @@ extern "C" { * return LV_ACTION_RES_INV if the button matrix is deleted else LV_ACTION_RES_OK*/ typedef lv_res_t (*lv_btnm_action_t) (lv_obj_t *, const char *txt); +/* Type to store button control bits (disabled, hidden etc.) */ +typedef uint8_t lv_btn_ctrl_t; + /*Data of button matrix*/ typedef struct { @@ -56,6 +59,7 @@ typedef struct /*New data for this type */ const char ** map_p; /*Pointer to the current map*/ lv_area_t *button_areas; /*Array of areas of buttons*/ + lv_btn_ctrl_t *ctrl_bits; /*Array of control bytes*/ lv_btnm_action_t action; /*A function to call when a button is releases*/ lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ @@ -92,7 +96,9 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); *====================*/ /** - * Set a new map. Buttons will be created/deleted according to the map. + * Set a new map. Buttons will be created/deleted according to the map. The + * button matrix keeps a reference to the map and so the string array must not + * be deallocated during the life of the matrix. * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". * Use "\n" to begin a new line. @@ -137,6 +143,53 @@ void lv_btnm_set_style(lv_obj_t *btnm, lv_btnm_style_t type, lv_style_t *style); */ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); +/** + * Show/hide a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to hide/show + * @param hidden true: hide the button + */ +void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden); + +/** + * Enable/disable a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to enable/disable + * @param disabled true: disable the button + */ +void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); + +/** + * Enable/disable long press for a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param disabled true: disable repeat + */ +void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); + +/*** + * Set hidden/disabled/repeat flags for a single button. + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param hidden true: hide the button + * @param disabled true: disable the button + * @param disable_repeat true: disable repeat + */ +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, bool disabled, bool disable_repeat); + +/** + * Set a single buttons relative width. + * This method will cause the matrix be regenerated and is a relatively + * expensive operation. It is recommended that initial width be specified using + * the control characters when calling lv_btnm_set_map and this method only be + * used for dynamic changes. + * @param btnm pointer to button matrix object + * @param btn_idx 0 based index of the button to modify + * @param width Relative width compared to the buttons in the same row. [1..7] + */ +void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width); + + /*===================== * Getter functions *====================*/ From c94fb96bb257dfdd38ab86660b3398b599613e62 Mon Sep 17 00:00:00 2001 From: manison Date: Tue, 12 Feb 2019 15:02:43 +0100 Subject: [PATCH 017/590] fix theme initialization --- lv_themes/lv_theme.c | 2 +- lv_themes/lv_theme.h | 3 +++ lv_themes/lv_theme_alien.c | 4 ++-- lv_themes/lv_theme_default.c | 4 ++-- lv_themes/lv_theme_material.c | 4 ++-- lv_themes/lv_theme_mono.c | 4 ++-- lv_themes/lv_theme_nemo.c | 4 ++-- lv_themes/lv_theme_night.c | 4 ++-- lv_themes/lv_theme_templ.c | 4 ++-- lv_themes/lv_theme_zen.c | 4 ++-- 10 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index bbdca6e4c5b8..4b76c8b787a9 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -35,7 +35,7 @@ static lv_theme_t * current_theme; * (The pointers in the theme points to the styles declared by the theme itself) */ /* Store the styles in this array. */ -static lv_style_t th_styles[sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *)]; +static lv_style_t th_styles[LV_THEME_STYLE_COUNT]; static bool inited = false; static lv_theme_t current_theme; #endif diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index cdb0771f8284..24db3d5e6069 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -314,6 +314,9 @@ lv_theme_t * lv_theme_get_current(void); * MACROS **********************/ +/* Returns number of styles within the `lv_theme_t` structure. */ +#define LV_THEME_STYLE_COUNT (sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *)) + /********************** * POST INCLUDE *********************/ diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 8b5f469a9a86..c3dc48daca9f 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -817,8 +817,8 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index 9a972571a3ee..f16e47a9d477 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -376,8 +376,8 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 6cfe501048bf..e5d5d5d422d6 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -801,8 +801,8 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 44c02754f2bb..babfc499884e 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -435,8 +435,8 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 339682ad2923..c10fc303f7da 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -800,8 +800,8 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 4f86bd032e9e..c65efba97a88 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -710,8 +710,8 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index eb2e0747c34e..906ec52a2831 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -385,8 +385,8 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index f04be7bcc03b..3f3f2992303a 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -767,8 +767,8 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme; - for(i = 0; i < sizeof(lv_theme_t) / sizeof(lv_style_t *); i++) { + lv_style_t ** style_p = (lv_style_t **) &theme.style; + for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; } From b15ffa3d8991b082149e3e06a0fa43a3d7c8a4f9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Feb 2019 15:38:13 +0100 Subject: [PATCH 018/590] multi-disp: add unique inv_buf to each display --- lv_core/lv_disp.c | 20 +++++++++ lv_core/lv_disp.h | 12 ++++++ lv_core/lv_indev.c | 9 ++-- lv_core/lv_obj.c | 40 ++++++++++-------- lv_core/lv_obj.h | 7 +++- lv_core/lv_refr.c | 98 ++++++++++++++++---------------------------- lv_core/lv_refr.h | 7 ++-- lv_hal/lv_hal_disp.c | 2 + lv_hal/lv_hal_disp.h | 7 +++- lv_objx/lv_btnm.c | 10 +++-- lv_objx/lv_page.c | 14 ++++--- lv_objx/lv_ta.c | 8 ++-- lv_objx/lv_tabview.c | 3 +- 13 files changed, 135 insertions(+), 102 deletions(-) diff --git a/lv_core/lv_disp.c b/lv_core/lv_disp.c index 29861b769111..5c108cd1f4f0 100644 --- a/lv_core/lv_disp.c +++ b/lv_core/lv_disp.c @@ -32,6 +32,26 @@ * GLOBAL FUNCTIONS **********************/ +/** + * Get the number of areas in the buffer + * @return number of invalid areas + */ +uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp) +{ + return disp->inv_p; +} + +/** + * Pop (delete) the last 'num' invalidated areas from the buffer + * @param num number of areas to delete + */ +void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) +{ + + if(disp->inv_p < num) disp->inv_p = 0; + else disp->inv_p -= num; +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index 8579fdd34a03..aff3ce11042b 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -27,6 +27,18 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ +/** + * Get the number of areas in the buffer + * @return number of invalid areas + */ +uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp); + +/** + * Pop (delete) the last 'num' invalidated areas from the buffer + * @param num number of areas to delete + */ +void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num); + /********************** * MACROS **********************/ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index a0d2ec508286..666372fcf96a 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -7,6 +7,8 @@ * INCLUDES ********************/ #include "lv_indev.h" +#include "lv_disp.h" +#include "lv_obj.h" #include "../lv_hal/lv_hal_tick.h" #include "../lv_core/lv_group.h" @@ -14,7 +16,6 @@ #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_rbasic.h" -#include "lv_obj.h" /********************* * DEFINES @@ -877,7 +878,7 @@ static void indev_drag(lv_indev_proc_t * state) /*Get the coordinates of the object and modify them*/ lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); - uint16_t inv_buf_size = lv_refr_get_buf_size(); /*Get the number of currently invalidated areas*/ + uint16_t inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); /*Get the number of currently invalidated areas*/ lv_coord_t prev_x = drag_obj->coords.x1; lv_coord_t prev_y = drag_obj->coords.y1; @@ -903,8 +904,8 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t act_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); if(act_par_w == prev_par_w && act_par_h == prev_par_h) { - uint16_t new_inv_buf_size = lv_refr_get_buf_size(); - lv_refr_pop_from_buf(new_inv_buf_size - inv_buf_size); + uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); + lv_disp_pop_from_inv_buf(indev_act->driver.disp, new_inv_buf_size - inv_buf_size); } } } diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 6f571ddc9727..b54f9bea6c98 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -436,7 +436,7 @@ void lv_obj_invalidate(const lv_obj_t * obj) par = lv_obj_get_parent(par); } - if(union_ok != false) lv_inv_area(&area_trunc); + if(union_ok) lv_inv_area(disp, &area_trunc); } } @@ -449,21 +449,6 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*-------------- * Screen set *--------------*/ -lv_disp_t * lv_scr_get_disp(lv_obj_t * scr) -{ - lv_disp_t * d; - - LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { - lv_obj_t * s; - LL_READ(d->scr_ll, s) { - if(s == scr) return d; - } - } - - LV_LOG_WARN("lv_scr_get_disp: screen not found") - return NULL; -} - /** * Load a new screen * @param scr pointer to a screen @@ -1379,6 +1364,29 @@ lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj) return (lv_obj_t *)act_p; } +lv_disp_t * lv_scr_get_disp(lv_obj_t * scr) +{ + lv_disp_t * d; + + LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { + lv_obj_t * s; + LL_READ(d->scr_ll, s) { + if(s == scr) return d; + } + } + + LV_LOG_WARN("lv_scr_get_disp: screen not found") + return NULL; +} + + + +lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) +{ + lv_obj_t * scr = lv_obj_get_screen(obj); + return lv_scr_get_disp(scr); +} + /*--------------------- * Parent/children get *--------------------*/ diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 13a86559fe4d..f291c36340e5 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -278,8 +278,6 @@ void lv_obj_invalidate(const lv_obj_t * obj); * Screen set *--------------*/ -lv_disp_t * lv_scr_get_disp(lv_obj_t * scr); - /** * Load a new screen * @param scr pointer to a screen @@ -584,6 +582,11 @@ lv_obj_t * lv_layer_sys(lv_disp_t * disp); */ lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); + +lv_disp_t * lv_scr_get_disp(lv_obj_t * scr); + +lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj); + /*--------------------- * Parent/children get *--------------------*/ diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index d6325035432f..c83737282338 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -19,17 +19,10 @@ /********************* * DEFINES *********************/ -#ifndef LV_INV_FIFO_SIZE -#define LV_INV_FIFO_SIZE 32 /*The average count of objects on a screen */ -#endif /********************** * TYPEDEFS **********************/ -typedef struct { - lv_area_t area; - uint8_t joined; -} lv_join_t; /********************** * STATIC PROTOTYPES @@ -50,8 +43,6 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p); /********************** * STATIC VARIABLES **********************/ -static lv_join_t inv_buf[LV_INV_FIFO_SIZE]; -static uint16_t inv_buf_p; static void (*monitor_cb)(uint32_t, uint32_t); /*Monitor the rendering time*/ static void (*round_cb)(lv_area_t *); /*If set then called to modify invalidated areas for special display controllers*/ static uint32_t px_num; @@ -70,9 +61,6 @@ static lv_disp_t * disp_refr; /*Display being refreshed*/ */ void lv_refr_init(void) { - inv_buf_p = 0; - memset(inv_buf, 0, sizeof(inv_buf)); - lv_task_t * task; task = lv_task_create(lv_refr_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, NULL); lv_task_ready(task); /*Be sure the screen will be refreshed immediately on start up*/ @@ -91,22 +79,26 @@ void lv_refr_now(void) /** - * Invalidate an area - * @param area_p pointer to area which should be invalidated + * Invalidate an area on display to redraw it + * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas) + * @param disp pointer to display where the area should be invalidated (NULL can be used if there is only one display) */ -void lv_inv_area(const lv_area_t * area_p) +void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) { + if(!disp) disp = lv_disp_get_last(); + if(!disp) return; + /*Clear the invalidate buffer if the parameter is NULL*/ if(area_p == NULL) { - inv_buf_p = 0; + disp->inv_p = 0; return; } lv_area_t scr_area; scr_area.x1 = 0; scr_area.y1 = 0; - scr_area.x2 = LV_HOR_RES_MAX - 1; - scr_area.y2 = LV_VER_RES_MAX - 1; + scr_area.x2 = disp->driver.hor_res - 1; + scr_area.y2 = disp->driver.ver_res - 1; lv_area_t com_area; bool suc; @@ -119,18 +111,18 @@ void lv_inv_area(const lv_area_t * area_p) /*Save only if this area is not in one of the saved areas*/ uint16_t i; - for(i = 0; i < inv_buf_p; i++) { - if(lv_area_is_in(&com_area, &inv_buf[i].area) != false) return; + for(i = 0; i < disp->inv_p; i++) { + if(lv_area_is_in(&com_area, &disp->inv_areas[i]) != false) return; } /*Save the area*/ - if(inv_buf_p < LV_INV_FIFO_SIZE) { - lv_area_copy(&inv_buf[inv_buf_p].area, &com_area); + if(disp->inv_p < LV_INV_BUF_SIZE) { + lv_area_copy(&disp->inv_areas[disp->inv_p], &com_area); } else {/*If no place for the area add the screen*/ - inv_buf_p = 0; - lv_area_copy(&inv_buf[inv_buf_p].area, &scr_area); + disp->inv_p = 0; + lv_area_copy(&disp->inv_areas[disp->inv_p], &scr_area); } - inv_buf_p ++; + disp->inv_p ++; } } @@ -156,25 +148,6 @@ void lv_refr_set_round_cb(void(*cb)(lv_area_t *)) round_cb = cb; } -/** - * Get the number of areas in the buffer - * @return number of invalid areas - */ -uint16_t lv_refr_get_buf_size(void) -{ - return inv_buf_p; -} - -/** - * Pop (delete) the last 'num' invalidated areas from the buffer - * @param num number of areas to delete - */ -void lv_refr_pop_from_buf(uint16_t num) -{ - if(inv_buf_p < num) inv_buf_p = 0; - else inv_buf_p -= num; -} - /** * Get the display which is being refreshed * @return the display being refreshed @@ -208,7 +181,7 @@ static void lv_refr_task(void * param) lv_refr_areas(); /*If refresh happened ...*/ - if(inv_buf_p != 0) { + if(disp_refr->inv_p != 0) { /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ #if LV_VDB_TRUE_DOUBLE_BUFFERED @@ -247,8 +220,9 @@ static void lv_refr_task(void * param) #endif /*Clean up*/ - memset(inv_buf, 0, sizeof(inv_buf)); - inv_buf_p = 0; + memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas)); + memset(disp_refr->inv_area_joined, 0, sizeof(disp_refr->inv_area_joined)); + disp_refr->inv_p = 0; /*Call monitor cb if present*/ if(monitor_cb != NULL) { @@ -269,32 +243,32 @@ static void lv_refr_join_area(void) uint32_t join_from; uint32_t join_in; lv_area_t joined_area; - for(join_in = 0; join_in < inv_buf_p; join_in++) { - if(inv_buf[join_in].joined != 0) continue; + for(join_in = 0; join_in < disp_refr->inv_p; join_in++) { + if(disp_refr->inv_area_joined[join_in] != 0) continue; /*Check all areas to join them in 'join_in'*/ - for(join_from = 0; join_from < inv_buf_p; join_from++) { + for(join_from = 0; join_from < disp_refr->inv_p; join_from++) { /*Handle only unjoined areas and ignore itself*/ - if(inv_buf[join_from].joined != 0 || join_in == join_from) { + if(disp_refr->inv_area_joined[join_from] != 0 || join_in == join_from) { continue; } /*Check if the areas are on each other*/ - if(lv_area_is_on(&inv_buf[join_in].area, - &inv_buf[join_from].area) == false) { + if(lv_area_is_on(&disp_refr->inv_areas[join_in], + &disp_refr->inv_areas[join_from]) == false) { continue; } - lv_area_join(&joined_area, &inv_buf[join_in].area, - &inv_buf[join_from].area); + lv_area_join(&joined_area, &disp_refr->inv_areas[join_in], + &disp_refr->inv_areas[join_from]); /*Join two area only if the joined area size is smaller*/ if(lv_area_get_size(&joined_area) < - (lv_area_get_size(&inv_buf[join_in].area) + lv_area_get_size(&inv_buf[join_from].area))) { - lv_area_copy(&inv_buf[join_in].area, &joined_area); + (lv_area_get_size(&disp_refr->inv_areas[join_in]) + lv_area_get_size(&disp_refr->inv_areas[join_from]))) { + lv_area_copy(&disp_refr->inv_areas[join_in], &joined_area); /*Mark 'join_form' is joined into 'join_in'*/ - inv_buf[join_from].joined = 1; + disp_refr->inv_area_joined[join_from] = 1; } } } @@ -308,17 +282,17 @@ static void lv_refr_areas(void) px_num = 0; uint32_t i; - for(i = 0; i < inv_buf_p; i++) { + for(i = 0; i < disp_refr->inv_p; i++) { /*Refresh the unjoined areas*/ - if(inv_buf[i].joined == 0) { + if(disp_refr->inv_area_joined[i] == 0) { /*If there is no VDB do simple drawing*/ #if LV_VDB_SIZE == 0 lv_refr_area_no_vdb(&inv_buf[i].area); #else /*If VDB is used...*/ - lv_refr_area_with_vdb(&inv_buf[i].area); + lv_refr_area_with_vdb(&disp_refr->inv_areas[i]); #endif - if(monitor_cb != NULL) px_num += lv_area_get_size(&inv_buf[i].area); + if(monitor_cb != NULL) px_num += lv_area_get_size(&disp_refr->inv_areas[i]); } } diff --git a/lv_core/lv_refr.h b/lv_core/lv_refr.h index cc979aa76cf6..14f75dd160d7 100644 --- a/lv_core/lv_refr.h +++ b/lv_core/lv_refr.h @@ -54,10 +54,11 @@ void lv_refr_init(void); void lv_refr_now(void); /** - * Invalidate an area - * @param area_p pointer to area which should be invalidated + * Invalidate an area on display to redraw it + * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas) + * @param disp pointer to display where the area should be invalidated (NULL can be used if there is only one display) */ -void lv_inv_area(const lv_area_t * area_p); +void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); /** * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 7e959d49e6dc..5df2643865c1 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -94,6 +94,8 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) lv_obj_set_style(node->top_layer, &lv_style_transp); lv_obj_set_style(node->sys_layer, &lv_style_transp); + node->inv_p = 0; + return node; } diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 936b938c77ce..dd1060640d63 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -25,6 +25,9 @@ extern "C" { /********************* * DEFINES *********************/ +#ifndef LV_INV_BUF_SIZE +#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */ +#endif /********************** * TYPEDEFS @@ -66,7 +69,9 @@ struct _lv_obj_t; typedef struct _disp_t { lv_disp_drv_t driver; - lv_area_t inv_buf[32]; + lv_area_t inv_areas[LV_INV_BUF_SIZE]; + uint8_t inv_area_joined[LV_INV_BUF_SIZE]; + uint16_t inv_p; lv_ll_t scr_ll; struct _lv_obj_t * act_scr; struct _lv_obj_t * top_layer; diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 33abbf20c90a..0ce1bba3a02c 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -561,6 +561,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) /*Invalidate to old and the new areas*/; lv_obj_get_coords(btnm, &btnm_area); if(btn_pr != ext->btn_id_pr) { + lv_disp_t * disp = lv_obj_get_disp(btnm); lv_indev_reset_lpr(param); if(ext->btn_id_pr != LV_BTNM_PR_NONE) { lv_area_copy(&btn_area, &ext->button_areas[ext->btn_id_pr]); @@ -568,7 +569,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_area.y1 += btnm_area.y1; btn_area.x2 += btnm_area.x1; btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + lv_inv_area(disp, &btn_area); } if(btn_pr != LV_BTNM_PR_NONE) { lv_area_copy(&btn_area, &ext->button_areas[btn_pr]); @@ -576,7 +577,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_area.y1 += btnm_area.y1; btn_area.x2 += btnm_area.x1; btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + lv_inv_area(disp, &btn_area); } } @@ -599,6 +600,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(button_is_inactive(ext->map_p[txt_i]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons anf click between the buttons*/ if(ext->action) res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); if(res == LV_RES_OK) { + lv_disp_t * disp = lv_obj_get_disp(btnm); /*Invalidate to old pressed area*/; lv_obj_get_coords(btnm, &btnm_area); @@ -607,7 +609,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_area.y1 += btnm_area.y1; btn_area.x2 += btnm_area.x1; btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + lv_inv_area(disp, &btn_area); if(ext->toggle != 0) { /*Invalidate to old toggled area*/; @@ -616,7 +618,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_area.y1 += btnm_area.y1; btn_area.x2 += btnm_area.x1; btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + lv_inv_area(disp, &btn_area); ext->btn_id_tgl = ext->btn_id_pr; } diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 4058c494a058..46c3a21604c0 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -1000,6 +1000,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi /*Hide scrollbars if required*/ if(page_ext->sb.mode == LV_SB_MODE_DRAG) { + lv_disp_t * disp = lv_obj_get_disp(page); lv_area_t sb_area_tmp; if(page_ext->sb.hor_draw) { lv_area_copy(&sb_area_tmp, &page_ext->sb.hor_area); @@ -1007,7 +1008,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); page_ext->sb.hor_draw = 0; } if(page_ext->sb.ver_draw) { @@ -1016,7 +1017,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); page_ext->sb.ver_draw = 0; } } @@ -1068,6 +1069,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) } /*Invalidate the current (old) scrollbar areas*/ + lv_disp_t * disp = lv_obj_get_disp(page); lv_area_t sb_area_tmp; if(ext->sb.hor_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.hor_area); @@ -1075,7 +1077,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); } if(ext->sb.ver_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.ver_area); @@ -1083,7 +1085,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); } @@ -1137,7 +1139,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); } if(ext->sb.ver_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.ver_area); @@ -1145,7 +1147,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y1 += page->coords.y1; sb_area_tmp.x2 += page->coords.x1; sb_area_tmp.y2 += page->coords.y1; - lv_inv_area(&sb_area_tmp); + lv_inv_area(disp, &sb_area_tmp); } } diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 69c12ce030d3..8427891a6587 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1136,13 +1136,14 @@ static void cursor_blink_anim(lv_obj_t * ta, uint8_t show) if(ext->cursor.type != LV_CURSOR_NONE && (ext->cursor.type & LV_CURSOR_HIDDEN) == 0) { + lv_disp_t * disp = lv_obj_get_disp(ta); lv_area_t area_tmp; lv_area_copy(&area_tmp, &ext->cursor.area); area_tmp.x1 += ext->label->coords.x1; area_tmp.y1 += ext->label->coords.y1; area_tmp.x2 += ext->label->coords.x1; area_tmp.y2 += ext->label->coords.y1; - lv_inv_area(&area_tmp); + lv_inv_area(disp, &area_tmp); } } } @@ -1327,13 +1328,14 @@ static void refr_cursor_area(lv_obj_t * ta) } /*Save the new area*/ + lv_disp_t * disp = lv_obj_get_disp(ta); lv_area_t area_tmp; lv_area_copy(&area_tmp, &ext->cursor.area); area_tmp.x1 += ext->label->coords.x1; area_tmp.y1 += ext->label->coords.y1; area_tmp.x2 += ext->label->coords.x1; area_tmp.y2 += ext->label->coords.y1; - lv_inv_area(&area_tmp); + lv_inv_area(disp, &area_tmp); lv_area_copy(&ext->cursor.area, &cur_area); @@ -1342,7 +1344,7 @@ static void refr_cursor_area(lv_obj_t * ta) area_tmp.y1 += ext->label->coords.y1; area_tmp.x2 += ext->label->coords.x1; area_tmp.y2 += ext->label->coords.y1; - lv_inv_area(&area_tmp); + lv_inv_area(disp, &area_tmp); } #endif diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index c09560fbded4..ffe6f214719a 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -106,7 +106,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_name_ptr[0] = ""; ext->tab_cnt = 0; - lv_obj_set_size(new_tabview, LV_DPI * 3, LV_DPI * 2); + lv_disp_t * disp = lv_obj_get_disp(par); + lv_obj_set_size(new_tabview, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); From 7571bedc46e887ccbe968d2a44251db7b0928e51 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Feb 2019 16:20:59 +0100 Subject: [PATCH 019/590] multi-disp: minor updates --- lv_core/lv_disp.c | 12 ++++++++++++ lv_core/lv_disp.h | 2 ++ lv_core/lv_vdb.c | 2 +- lv_hal/lv_hal_disp.h | 13 ++++++++----- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/lv_core/lv_disp.c b/lv_core/lv_disp.c index 5c108cd1f4f0..6017ba27cf1c 100644 --- a/lv_core/lv_disp.c +++ b/lv_core/lv_disp.c @@ -52,6 +52,18 @@ void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) else disp->inv_p -= num; } +void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) +{ + lv_disp_t * old_disp = lv_scr_get_disp(scr); + + if(old_disp == disp) { + LV_LOG_WARN("lv_disp_assign_screen: tried to assign to the same screen") + return; + } + + lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr); +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index aff3ce11042b..62690f551b6f 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -14,6 +14,7 @@ extern "C" { * INCLUDES *********************/ #include "../lv_hal/lv_hal.h" +#include "lv_obj.h" /********************* * DEFINES @@ -26,6 +27,7 @@ extern "C" { /********************** * GLOBAL PROTOTYPES **********************/ +void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); /** * Get the number of areas in the buffer diff --git a/lv_core/lv_vdb.c b/lv_core/lv_vdb.c index 6ab6a92438a1..12523b2a2a1d 100644 --- a/lv_core/lv_vdb.c +++ b/lv_core/lv_vdb.c @@ -111,7 +111,7 @@ void lv_vdb_flush(void) /*Flush the rendered content to the display*/ lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.disp_flush) disp->driver.disp_flush(vdb_act->area.x1, vdb_act->area.y1, vdb_act->area.x2, vdb_act->area.y2, vdb_act->buf); + if(disp->driver.disp_flush) disp->driver.disp_flush(disp, &vdb_act->area, vdb_act->buf); #if LV_VDB_DOUBLE diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index dd1060640d63..6480824a2864 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -33,6 +33,8 @@ extern "C" { * TYPEDEFS **********************/ +struct _disp_t; + /** * Display Driver structure to be registered by HAL */ @@ -42,7 +44,7 @@ typedef struct _disp_drv_t { lv_coord_t ver_res; /*Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished*/ - void (*disp_flush)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); + void (*disp_flush)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); /*Fill an area with a color on the display*/ void (*disp_fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); @@ -68,15 +70,16 @@ typedef struct _disp_drv_t { struct _lv_obj_t; typedef struct _disp_t { + void * user_data; lv_disp_drv_t driver; - lv_area_t inv_areas[LV_INV_BUF_SIZE]; - uint8_t inv_area_joined[LV_INV_BUF_SIZE]; - uint16_t inv_p; lv_ll_t scr_ll; struct _lv_obj_t * act_scr; struct _lv_obj_t * top_layer; struct _lv_obj_t * sys_layer; - uint8_t orientation:2; + lv_area_t inv_areas[LV_INV_BUF_SIZE]; + uint8_t inv_area_joined[LV_INV_BUF_SIZE]; + uint16_t inv_p :10; + uint16_t orientation :2; } lv_disp_t; /********************** From 327d7c84caea08a3b2a15e5657104c3058fd974e Mon Sep 17 00:00:00 2001 From: manison Date: Tue, 12 Feb 2019 16:35:17 +0100 Subject: [PATCH 020/590] added style modification callbacks to lv_theme_t struct https://github.com/littlevgl/lvgl/issues/806 --- lv_core/lv_group.c | 23 +++++++++++++++++++++-- lv_core/lv_group.h | 6 ++++++ lv_themes/lv_theme.c | 3 +++ lv_themes/lv_theme.h | 7 +++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 46b71d15f240..f5c585adef90 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -8,6 +8,7 @@ *********************/ #include "lv_group.h" #if USE_LV_GROUP != 0 +#include "../lv_themes/lv_theme.h" #include /********************* @@ -48,14 +49,15 @@ lv_group_t * lv_group_create(void) if(group == NULL) return NULL; lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *)); - group->style_mod = style_mod_def; - group->style_mod_edit = style_mod_edit_def; group->obj_focus = NULL; group->frozen = 0; group->focus_cb = NULL; group->click_focus = 1; group->editing = 0; + /*Initialize style modification callbacks from current theme*/ + lv_group_report_style_mod(group); + return group; } @@ -522,4 +524,21 @@ static void style_mod_edit_def(lv_style_t * style) } +/** + * Notify the group that current theme changed and style modification callbacks need to be refreshed. + * @param group pointer to group + */ +void lv_group_report_style_mod(lv_group_t * group) +{ + group->style_mod = style_mod_def; + group->style_mod_edit = style_mod_edit_def; + lv_theme_t * th = lv_theme_get_current(); + if(th) { + if (th->group.style_mod) + group->style_mod = th->group.style_mod; + if (th->group.style_mod_edit) + group->style_mod_edit = th->group.style_mod_edit; + } +} + #endif /*USE_LV_GROUP != 0*/ diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 133d5954e288..38fcfe009450 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -236,6 +236,12 @@ bool lv_group_get_click_focus(const lv_group_t * group); */ bool lv_group_get_wrap(lv_group_t * group); +/** + * Notify the group that current theme changed and style modification callbacks need to be refreshed. + * @param group pointer to group + */ +void lv_group_report_style_mod(lv_group_t * group); + /********************** * MACROS **********************/ diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 4b76c8b787a9..1b192af62004 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -80,6 +80,9 @@ void lv_theme_set_current(lv_theme_t * th) if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); } + /*Copy group style modification callback functions*/ + current_theme.group = th->group; + /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); #endif diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 24db3d5e6069..8d681feae98d 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -20,6 +20,7 @@ extern "C" { #endif #include "../lv_core/lv_style.h" +#include "../lv_core/lv_group.h" /********************* * DEFINES @@ -291,6 +292,12 @@ typedef struct { } win; #endif } style; + + struct + { + lv_group_style_mod_func_t style_mod; + lv_group_style_mod_func_t style_mod_edit; + } group; } lv_theme_t; /********************** From cfa7d22d332e9353028ff8799f5d7520bf1c054c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Feb 2019 22:35:59 +0100 Subject: [PATCH 021/590] multi-disp: display level vdb experiment --- lv_core/lv_vdb.c | 3 +++ lv_hal/lv_hal_disp.c | 31 ++++++++++++++++++------------- lv_hal/lv_hal_disp.h | 14 +++++++++++--- lv_hal/lv_hal_indev.h | 2 +- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/lv_core/lv_vdb.c b/lv_core/lv_vdb.c index 12523b2a2a1d..ffde701e20fb 100644 --- a/lv_core/lv_vdb.c +++ b/lv_core/lv_vdb.c @@ -79,9 +79,12 @@ static volatile bool vdb_flushing = false; */ lv_vdb_t * lv_vdb_get(void) { + lv_disp_t * disp = lv_refr_get_disp_refreshing(); + #if LV_VDB_DOUBLE == 0 /* Wait until VDB is flushing. * (Until this user calls of 'lv_flush_ready()' in the display drivers's flush function*/ + while(vdb_flushing); return &vdb; diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 5df2643865c1..8169a551b665 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -66,6 +66,10 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) #if LV_VDB_SIZE driver->vdb_wr = NULL; + driver->vdb = NULL; + driver->vdb2 = NULL; + driver->vdb_size = 0; + driver->vdb_double = 0; #endif } @@ -77,26 +81,27 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) */ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) { - - lv_disp_t * node = lv_ll_ins_head(&LV_GC_ROOT(_lv_disp_ll)); - if(!node) { - lv_mem_assert(node); + lv_disp_t * disp = lv_ll_ins_head(&LV_GC_ROOT(_lv_disp_ll)); + if(!disp) { + lv_mem_assert(disp); return NULL; } - memcpy(&node->driver, driver, sizeof(lv_disp_drv_t)); + memcpy(&disp->driver, driver, sizeof(lv_disp_drv_t)); - lv_ll_init(&node->scr_ll, sizeof(lv_obj_t)); + lv_ll_init(&disp->scr_ll, sizeof(lv_obj_t)); - node->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ - node->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ - node->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ - lv_obj_set_style(node->top_layer, &lv_style_transp); - lv_obj_set_style(node->sys_layer, &lv_style_transp); + disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ + disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ + disp->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ + lv_obj_set_style(disp->top_layer, &lv_style_transp); + lv_obj_set_style(disp->sys_layer, &lv_style_transp); - node->inv_p = 0; + disp->inv_p = 0; + disp->vdb_act = 0; + disp->vdb_flushing = 0; - return node; + return disp; } lv_disp_t * lv_disp_get_next(lv_disp_t * disp) diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 6480824a2864..4d1601e19ca8 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -39,6 +39,8 @@ struct _disp_t; * Display Driver structure to be registered by HAL */ typedef struct _disp_drv_t { + void * user_data; + lv_coord_t hor_res; lv_coord_t ver_res; @@ -62,6 +64,11 @@ typedef struct _disp_drv_t { #endif #if LV_VDB_SIZE + void * vdb; + void * vdb2; + uint32_t vdb_size; + uint32_t vdb_double :1; + /*Optional: Set a pixel in a buffer according to the requirements of the display*/ void (*vdb_wr)(uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); #endif @@ -70,7 +77,6 @@ typedef struct _disp_drv_t { struct _lv_obj_t; typedef struct _disp_t { - void * user_data; lv_disp_drv_t driver; lv_ll_t scr_ll; struct _lv_obj_t * act_scr; @@ -78,8 +84,10 @@ typedef struct _disp_t { struct _lv_obj_t * sys_layer; lv_area_t inv_areas[LV_INV_BUF_SIZE]; uint8_t inv_area_joined[LV_INV_BUF_SIZE]; - uint16_t inv_p :10; - uint16_t orientation :2; + uint32_t inv_p :10; + uint32_t orientation :2; + uint32_t vdb_flushing :1; + uint32_t vdb_act :1; } lv_disp_t; /********************** diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index b67a7c3ebfc5..2186e2dabe35 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -48,13 +48,13 @@ typedef uint8_t lv_indev_state_t; /*Data type when an input device is read */ typedef struct { + void *user_data; /*'lv_indev_drv_t.priv' for this driver*/ union { lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ }; - void *user_data; /*'lv_indev_drv_t.priv' for this driver*/ lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ } lv_indev_data_t; From 673892cd8092625303f1baf7cd931cfa0b9e14b4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 13 Feb 2019 01:40:22 +0100 Subject: [PATCH 022/590] multi-disp: unique VDB to displays --- lv_conf_checker.h | 4 +- lv_core/lv_indev.c | 9 - lv_core/lv_obj.c | 1 - lv_core/lv_obj.h | 13 - lv_core/lv_refr.c | 308 +++++++++--------- lv_core/lv_refr.h | 9 + lv_core/lv_vdb.c | 212 ------------ lv_core/lv_vdb.h | 119 ------- lv_draw/lv_draw.c | 25 +- lv_draw/lv_draw.h | 7 +- lv_draw/lv_draw_arc.c | 4 +- lv_draw/{lv_draw_vbasic.c => lv_draw_basic.c} | 110 +++---- lv_draw/{lv_draw_vbasic.h => lv_draw_basic.h} | 20 +- lv_draw/lv_draw_img.c | 4 +- lv_draw/lv_draw_label.c | 9 +- lv_draw/lv_draw_line.c | 20 +- lv_draw/lv_draw_rbasic.c | 277 ---------------- lv_draw/lv_draw_rbasic.h | 96 ------ lv_draw/lv_draw_rect.c | 212 ++++++------ lv_draw/lv_draw_triangle.c | 2 +- lv_hal/lv_hal_disp.c | 36 +- lv_hal/lv_hal_disp.h | 38 ++- lv_objx/lv_cont.c | 2 +- lvgl.h | 1 - 24 files changed, 386 insertions(+), 1152 deletions(-) delete mode 100644 lv_core/lv_vdb.c delete mode 100644 lv_core/lv_vdb.h rename lv_draw/{lv_draw_vbasic.c => lv_draw_basic.c} (89%) rename lv_draw/{lv_draw_vbasic.h => lv_draw_basic.h} (80%) delete mode 100644 lv_draw/lv_draw_rbasic.c delete mode 100644 lv_draw/lv_draw_rbasic.h diff --git a/lv_conf_checker.h b/lv_conf_checker.h index 6805efc660c5..fa8748d8f886 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -100,7 +100,7 @@ * Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions * will be called to draw to the frame buffer directly*/ #ifndef LV_VDB_SIZE -#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10) +//#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10) #endif /* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays. @@ -113,7 +113,7 @@ * 0: allocate automatically into RAM * LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/ #ifndef LV_VDB_ADR -#define LV_VDB_ADR 0 +//#define LV_VDB_ADR 0 #endif /* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 666372fcf96a..bdf348d5b227 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -15,7 +15,6 @@ #include "../lv_core/lv_refr.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_math.h" -#include "../lv_draw/lv_draw_rbasic.h" /********************* * DEFINES @@ -367,14 +366,6 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.act_point.y = data->point.y; if(i->proc.state == LV_INDEV_STATE_PR) { -#if LV_INDEV_POINT_MARKER != 0 - lv_area_t area; - area.x1 = i->proc.act_point.x - (LV_INDEV_POINT_MARKER >> 1); - area.y1 = i->proc.act_point.y - (LV_INDEV_POINT_MARKER >> 1); - area.x2 = i->proc.act_point.x + ((LV_INDEV_POINT_MARKER >> 1) | 0x1); - area.y2 = i->proc.act_point.y + ((LV_INDEV_POINT_MARKER >> 1) | 0x1); - lv_rfill(&area, NULL, LV_COLOR_MAKE(0xFF, 0, 0), LV_OPA_COVER); -#endif indev_proc_press(&i->proc); } else { indev_proc_release(&i->proc); diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index b54f9bea6c98..891428e04b8d 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -12,7 +12,6 @@ #include "lv_group.h" #include "../lv_themes/lv_theme.h" #include "../lv_draw/lv_draw.h" -#include "../lv_draw/lv_draw_rbasic.h" #include "../lv_misc/lv_anim.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_fs.h" diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index f291c36340e5..29f3ac9dd451 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -42,19 +42,6 @@ extern "C" { #error "LittlevGL: LV_ANTIALIAS can be only 0 or 1" #endif -#if LV_VDB_SIZE == 0 && LV_ANTIALIAS != 0 -#error "LittlevGL: If LV_VDB_SIZE == 0 the anti-aliasing must be disabled" -#endif - -#if LV_VDB_SIZE > 0 && LV_VDB_SIZE < LV_HOR_RES -#error "LittlevGL: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= LV_HOR_RES)" -#endif - -#if LV_VDB_SIZE == 0 && USE_LV_REAL_DRAW == 0 -#error "LittlevGL: If LV_VDB_SIZE = 0 Real drawing function are required (lv_conf.h: USE_LV_REAL_DRAW 1)" -#endif - - #define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/ #define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/ #define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/ diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index c83737282338..8d833017e192 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -8,7 +8,6 @@ *********************/ #include #include "lv_refr.h" -#include "lv_vdb.h" #include "lv_disp.h" #include "../lv_hal/lv_hal_tick.h" #include "../lv_hal/lv_hal_disp.h" @@ -30,15 +29,12 @@ static void lv_refr_task(void * param); static void lv_refr_join_area(void); static void lv_refr_areas(void); -#if LV_VDB_SIZE == 0 -static void lv_refr_area_no_vdb(const lv_area_t * area_p); -#else -static void lv_refr_area_with_vdb(const lv_area_t * area_p); -static void lv_refr_area_part_vdb(const lv_area_t * area_p); -#endif +static void lv_refr_area(const lv_area_t * area_p); +static void lv_refr_area_part(const lv_area_t * area_p); static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj); static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p); static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p); +static void lv_refr_vdb_flush(void); /********************** * STATIC VARIABLES @@ -66,6 +62,19 @@ void lv_refr_init(void) lv_task_ready(task); /*Be sure the screen will be refreshed immediately on start up*/ } +/** + * Call in the display driver's 'disp_flush' function when the flushing is finished + */ +LV_ATTRIBUTE_FLUSH_READY void lv_flush_ready(lv_disp_t * disp) +{ + disp->driver.buffer->internal.flushing = 0; + + /*If the screen is transparent initialize it when the flushing is ready*/ +#if LV_VDB_DOUBLE == 0 && LV_COLOR_SCREEN_TRANSP + memset(vdb_buf, 0x00, LV_VDB_SIZE_IN_BYTES); +#endif +} + /** * Redraw the invalidated areas now. * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can @@ -126,6 +135,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) } } + /** * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels * @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num)) @@ -182,42 +192,35 @@ static void lv_refr_task(void * param) /*If refresh happened ...*/ if(disp_refr->inv_p != 0) { - /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ - #if LV_VDB_TRUE_DOUBLE_BUFFERED - lv_vdb_t * vdb_p = lv_vdb_get(); - vdb_p->area.x1 = 0; - vdb_p->area.x2 = LV_HOR_RES-1; - vdb_p->area.y1 = 0; - vdb_p->area.y2 = LV_VER_RES - 1; - - /*Flush the content of the VDB*/ - lv_vdb_flush(); - - /* With true double buffering the flushing should be only the address change of the current frame buffer - * Wait until the address change is ready and copy the active content to the other frame buffer (new active VDB) - * The changes will be written to the new VDB.*/ - lv_vdb_t * vdb_act = lv_vdb_get_active(); - lv_vdb_t * vdb_ina = lv_vdb_get_inactive(); - - uint8_t * buf_act = (uint8_t *) vdb_act->buf; - uint8_t * buf_ina = (uint8_t *) vdb_ina->buf; - - uint16_t a; - for(a = 0; a < inv_buf_p; a++) { - if(inv_buf[a].joined == 0) { - lv_coord_t y; - uint32_t start_offs = ((LV_HOR_RES * inv_buf[a].area.y1 + inv_buf[a].area.x1) * LV_VDB_PX_BPP) >> 3; - uint32_t line_length = (lv_area_get_width(&inv_buf[a].area) * LV_VDB_PX_BPP) >> 3; - - for(y = inv_buf[a].area.y1; y <= inv_buf[a].area.y2; y++) { - memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); - start_offs += (LV_HOR_RES * LV_VDB_PX_BPP) >> 3; + if(lv_disp_is_true_double_buffered(disp_refr)) { + lv_vdb_t * vdb = lv_disp_get_vdb(disp_refr); + + /*Flush the content of the VDB*/ + lv_refr_vdb_flush(); + + /* With true double buffering the flushing should be only the address change of the current frame buffer. + * Wait until the address change is ready and copy the changed content to the other frame buffer (new active VDB) + * to keep the buffers synchronized*/ + while(vdb->internal.flushing); + + uint8_t * buf_act = (uint8_t *) vdb->buf_act; + uint8_t * buf_ina = (uint8_t *) vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; + + uint16_t a; + for(a = 0; a < disp_refr->inv_p; a++) { + if(disp_refr->inv_area_joined[a] == 0) { + lv_coord_t y; + uint32_t start_offs = ((disp_refr->driver.hor_res * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * LV_VDB_PX_BPP) >> 3; + uint32_t line_length = (lv_area_get_width(&disp_refr->inv_areas[a]) * LV_VDB_PX_BPP) >> 3; + + for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { + memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); + start_offs += (LV_HOR_RES * LV_VDB_PX_BPP) >> 3; + } } } - } - - #endif + } /*End of true double buffer handling*/ /*Clean up*/ memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas)); @@ -285,146 +288,112 @@ static void lv_refr_areas(void) for(i = 0; i < disp_refr->inv_p; i++) { /*Refresh the unjoined areas*/ if(disp_refr->inv_area_joined[i] == 0) { - /*If there is no VDB do simple drawing*/ -#if LV_VDB_SIZE == 0 - lv_refr_area_no_vdb(&inv_buf[i].area); -#else - /*If VDB is used...*/ - lv_refr_area_with_vdb(&disp_refr->inv_areas[i]); -#endif + + lv_refr_area(&disp_refr->inv_areas[i]); + if(monitor_cb != NULL) px_num += lv_area_get_size(&disp_refr->inv_areas[i]); } } - -} - -#if LV_VDB_SIZE == 0 -/** - * Refresh an area if there is no Virtual Display Buffer - * @param area_p pointer to an area to refresh - */ -static void lv_refr_area_no_vdb(const lv_area_t * area_p) -{ - lv_obj_t * top_p; - - /*Get top object which is not covered by others*/ - top_p = lv_refr_get_top_obj(area_p, lv_scr_act()); - - /*Do the refreshing*/ - lv_refr_obj_and_children(top_p, area_p); - - /*Also refresh top and sys layer unconditionally*/ - lv_refr_obj_and_children(lv_layer_top(), area_p); - lv_refr_obj_and_children(lv_layer_sys(), area_p); } -#else - /** * Refresh an area if there is Virtual Display Buffer * @param area_p pointer to an area to refresh */ -static void lv_refr_area_with_vdb(const lv_area_t * area_p) +static void lv_refr_area(const lv_area_t * area_p) { - -#if LV_VDB_TRUE_DOUBLE_BUFFERED == 0 - /*Calculate the max row num*/ - lv_coord_t w = lv_area_get_width(area_p); - lv_coord_t h = lv_area_get_height(area_p); - lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(NULL) ? y2 = lv_disp_get_ver_res(NULL) - 1 : area_p->y2; - - int32_t max_row = (uint32_t) LV_VDB_SIZE / w; - - if(max_row > h) max_row = h; - - - /*Round down the lines of VDB if rounding is added*/ - if(round_cb) { - lv_area_t tmp; - tmp.x1 = 0; - tmp.x2 = 0; - tmp.y1 = 0; - tmp.y2 = max_row; - - lv_coord_t y_tmp = max_row; - do { - tmp.y2 = y_tmp; - round_cb(&tmp); - y_tmp --; /*Decrement the number of line until it is rounded to a smaller (or equal) value then the original. */ - } while(lv_area_get_height(&tmp) > max_row && y_tmp != 0); - - if(y_tmp == 0) { - LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to small VDB)"); - return; - } else { - max_row = tmp.y2 + 1; - } + /*True double buffering: there are two screen sized buffers. Just redraw directly into a buffer*/ + if(lv_disp_is_true_double_buffered(disp_refr)) { + lv_vdb_t * vdb = lv_disp_get_vdb(disp_refr); + vdb->area.x1 = 0; + vdb->area.x2 = LV_HOR_RES-1; + vdb->area.y1 = 0; + vdb->area.y2 = LV_VER_RES - 1; + lv_refr_area_part(area_p); } - - /*Always use the full row*/ - lv_coord_t row; - lv_coord_t row_last = 0; - for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) { - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; + /*The buffer is smaller: refresh the area in parts*/ + else { + lv_vdb_t * vdb = lv_disp_get_vdb(disp_refr); + /*Calculate the max row num*/ + lv_coord_t w = lv_area_get_width(area_p); + lv_coord_t h = lv_area_get_height(area_p); + lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(NULL) ? y2 = lv_disp_get_ver_res(NULL) - 1 : area_p->y2; + + int32_t max_row = (uint32_t) vdb->size / w; + + if(max_row > h) max_row = h; + + /*Round down the lines of VDB if rounding is added*/ + if(round_cb) { + lv_area_t tmp; + tmp.x1 = 0; + tmp.x2 = 0; + tmp.y1 = 0; + tmp.y2 = max_row; + + lv_coord_t y_tmp = max_row; + do { + tmp.y2 = y_tmp; + round_cb(&tmp); + y_tmp --; /*Decrement the number of line until it is rounded to a smaller (or equal) value then the original. */ + } while(lv_area_get_height(&tmp) > max_row && y_tmp != 0); + + if(y_tmp == 0) { + LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to small VDB)"); + return; + } else { + max_row = tmp.y2 + 1; + } } - /*Calc. the next y coordinates of VDB*/ - vdb_p->area.x1 = area_p->x1; - vdb_p->area.x2 = area_p->x2; - vdb_p->area.y1 = row; - vdb_p->area.y2 = row + max_row - 1; - if(vdb_p->area.y2 > y2) vdb_p->area.y2 = y2; - row_last = vdb_p->area.y2; - lv_refr_area_part_vdb(area_p); - } - - /*If the last y coordinates are not handled yet ...*/ - if(y2 != row_last) { - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; + /*Always use the full row*/ + lv_coord_t row; + lv_coord_t row_last = 0; + for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) { + /*Calc. the next y coordinates of VDB*/ + vdb->area.x1 = area_p->x1; + vdb->area.x2 = area_p->x2; + vdb->area.y1 = row; + vdb->area.y2 = row + max_row - 1; + if(vdb->area.y2 > y2) vdb->area.y2 = y2; + row_last = vdb->area.y2; + lv_refr_area_part(area_p); } - /*Calc. the next y coordinates of VDB*/ - vdb_p->area.x1 = area_p->x1; - vdb_p->area.x2 = area_p->x2; - vdb_p->area.y1 = row; - vdb_p->area.y2 = y2; + /*If the last y coordinates are not handled yet ...*/ + if(y2 != row_last) { + /*Calc. the next y coordinates of VDB*/ + vdb->area.x1 = area_p->x1; + vdb->area.x2 = area_p->x2; + vdb->area.y1 = row; + vdb->area.y2 = y2; - /*Refresh this part too*/ - lv_refr_area_part_vdb(area_p); + /*Refresh this part too*/ + lv_refr_area_part(area_p); + } } -#else - lv_vdb_t * vdb_p = lv_vdb_get(); - vdb_p->area.x1 = 0; - vdb_p->area.x2 = LV_HOR_RES-1; - vdb_p->area.y1 = 0; - vdb_p->area.y2 = LV_VER_RES - 1; - lv_refr_area_part_vdb(area_p); -#endif } /** * Refresh a part of an area which is on the actual Virtual Display Buffer * @param area_p pointer to an area to refresh */ -static void lv_refr_area_part_vdb(const lv_area_t * area_p) +static void lv_refr_area_part(const lv_area_t * area_p) { - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; + + lv_vdb_t * vdb = lv_disp_get_vdb(disp_refr); + + /*In non double buffered mode, before rendering the next part wait until the previous image is flushed*/ + if(lv_disp_is_double_vdb(disp_refr) == false) { + while(vdb->internal.flushing); } + lv_obj_t * top_p; /*Get the new mask from the original area and the act. VDB It will be a part of 'area_p'*/ lv_area_t start_mask; - lv_area_intersect(&start_mask, area_p, &vdb_p->area); + lv_area_intersect(&start_mask, area_p, &vdb->area); /*Get the most top object which is not covered by others*/ top_p = lv_refr_get_top_obj(&start_mask, lv_scr_act(disp_refr)); @@ -438,14 +407,11 @@ static void lv_refr_area_part_vdb(const lv_area_t * area_p) /* In true double buffered mode flush only once when all areas were rendered. * In normal mode flush after every area */ -#if LV_VDB_TRUE_DOUBLE_BUFFERED == 0 - /*Flush the content of the VDB*/ - lv_vdb_flush(); -#endif + if(lv_disp_is_true_double_buffered(disp_refr) == false) { + lv_refr_vdb_flush(); + } } -#endif /*LV_VDB_SIZE == 0*/ - /** * Search the most top object which fully covers an area * @param area_p pointer to an area @@ -593,3 +559,33 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) } } + +/** + * Flush the content of the VDB + */ +static void lv_refr_vdb_flush(void) +{ + lv_vdb_t * vdb = lv_disp_get_vdb(lv_refr_get_disp_refreshing()); + + /*In double buffered mode wait until the other buffer is flushed before flushing the current one*/ + if(vdb->buf1 && vdb->buf2) { + while(vdb->internal.flushing); + } + + vdb->internal.flushing = 1; + + /*Flush the rendered content to the display*/ + lv_disp_t * disp = lv_refr_get_disp_refreshing(); + if(disp->driver.disp_flush) disp->driver.disp_flush(disp, &vdb->area, vdb->buf_act); + + + if(vdb->buf1 && vdb->buf2) { + if(vdb->buf_act == vdb->buf1) vdb->buf_act = vdb->buf2; + else vdb->buf_act = vdb->buf1; + + /*If the screen is transparent initialize it when the new VDB is selected*/ +# if LV_COLOR_SCREEN_TRANSP + memset(vdb[vdb_active].buf, 0x00, LV_VDB_SIZE_IN_BYTES); +# endif /*LV_COLOR_SCREEN_TRANSP*/ + } +} diff --git a/lv_core/lv_refr.h b/lv_core/lv_refr.h index 14f75dd160d7..e27252bc7878 100644 --- a/lv_core/lv_refr.h +++ b/lv_core/lv_refr.h @@ -19,6 +19,9 @@ extern "C" { /********************* * DEFINES *********************/ +#ifndef LV_ATTRIBUTE_FLUSH_READY +# define LV_ATTRIBUTE_FLUSH_READY +#endif /********************** * TYPEDEFS @@ -45,6 +48,11 @@ extern "C" { */ void lv_refr_init(void); +/** + * Call in the display driver's 'disp_flush' function when the flushing is finished + */ +LV_ATTRIBUTE_FLUSH_READY void lv_flush_ready(lv_disp_t * disp); + /** * Redraw the invalidated areas now. * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can @@ -60,6 +68,7 @@ void lv_refr_now(void); */ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); + /** * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels * @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num)) diff --git a/lv_core/lv_vdb.c b/lv_core/lv_vdb.c deleted file mode 100644 index ffde701e20fb..000000000000 --- a/lv_core/lv_vdb.c +++ /dev/null @@ -1,212 +0,0 @@ -/** - * @file lv_vdb.c - * - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_vdb.h" -#if LV_VDB_SIZE != 0 - -#include "../lv_hal/lv_hal_disp.h" -#include "../lv_misc/lv_log.h" -#include "../lv_core/lv_refr.h" -#include - -/********************* - * DEFINES - *********************/ -#ifndef LV_ATTRIBUTE_FLUSH_READY -#define LV_ATTRIBUTE_FLUSH_READY -#endif - -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN -#endif - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ - -/********************** - * STATIC VARIABLES - **********************/ - -/*Simple VDB*/ -#if LV_VDB_DOUBLE == 0 -# if LV_VDB_ADR == 0 -/*If the buffer address is not specified simply allocate it*/ -static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf[LV_VDB_SIZE_IN_BYTES]; -static lv_vdb_t vdb = {.buf = (lv_color_t *)vdb_buf}; -# else /*LV_VDB_ADR != 0*/ -/*If the buffer address is specified use that address*/ -static lv_vdb_t vdb = {.buf = (lv_color_t *)LV_VDB_ADR}; -# endif - -/*LV_VDB_DOUBLE != 0*/ -#else -/*Double VDB*/ -static uint8_t vdb_active = 0; -# if LV_VDB_ADR == 0 -/*If the buffer address is not specified simply allocate it*/ -static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf1[LV_VDB_SIZE_IN_BYTES]; -static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf2[LV_VDB_SIZE_IN_BYTES]; -static lv_vdb_t vdb[2] = {{.buf = (lv_color_t *) vdb_buf1}, {.buf = (lv_color_t *) vdb_buf2}}; -# else /*LV_VDB_ADR != 0*/ -/*If the buffer address is specified use that address*/ -static lv_vdb_t vdb[2] = {{.buf = (lv_color_t *)LV_VDB_ADR}, {.buf = (lv_color_t *)LV_VDB2_ADR}}; -# endif -#endif - -static volatile bool vdb_flushing = false; - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode - * @return pointer to a 'vdb' variable - */ -lv_vdb_t * lv_vdb_get(void) -{ - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - -#if LV_VDB_DOUBLE == 0 - /* Wait until VDB is flushing. - * (Until this user calls of 'lv_flush_ready()' in the display drivers's flush function*/ - - while(vdb_flushing); - - return &vdb; -#else - /*If already there is an active do nothing*/ - return &vdb[vdb_active]; -#endif -} - -/** - * Flush the content of the VDB - */ -void lv_vdb_flush(void) -{ - lv_vdb_t * vdb_act = lv_vdb_get(); - if(!vdb_act) { - LV_LOG_WARN("Invalid VDB pointer"); - return; - } - - /*Don't start a new flush while the previous is not finished*/ -#if LV_VDB_DOUBLE - while(vdb_flushing); -#endif /*LV_VDB_DOUBLE*/ - - vdb_flushing = true; - - /*Flush the rendered content to the display*/ - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.disp_flush) disp->driver.disp_flush(disp, &vdb_act->area, vdb_act->buf); - - -#if LV_VDB_DOUBLE - /*Make the other VDB active. The content of the current will be kept until the next flush*/ - vdb_active++; - vdb_active &= 0x1; - - /*If the screen is transparent initialize it when the new VDB is selected*/ -# if LV_COLOR_SCREEN_TRANSP - memset(vdb[vdb_active].buf, 0x00, LV_VDB_SIZE_IN_BYTES); -# endif /*LV_COLOR_SCREEN_TRANSP*/ - -#endif /*#if LV_VDB_DOUBLE*/ - -} - -/** - * Set the address of VDB buffer(s) manually. To use this set `LV_VDB_ADR` (and `LV_VDB2_ADR`) to `LV_VDB_ADR_INV` in `lv_conf.h`. - * It should be called before `lv_init()`. The size of the buffer should be: `LV_VDB_SIZE_IN_BYTES` - * @param buf1 address of the VDB. - * @param buf2 address of the second buffer. `NULL` if `LV_VDB_DOUBLE 0` - */ -void lv_vdb_set_adr(void * buf1, void * buf2) -{ -#if LV_VDB_DOUBLE == 0 - (void) buf2; /*unused*/ - vdb.buf = buf1; -#else - vdb[0].buf = buf1; - vdb[1].buf = buf2; -#endif -} - -/** - * Call in the display driver's 'disp_flush' function when the flushing is finished - */ -LV_ATTRIBUTE_FLUSH_READY void lv_flush_ready(void) -{ - vdb_flushing = false; - - /*If the screen is transparent initialize it when the flushing is ready*/ -#if LV_VDB_DOUBLE == 0 && LV_COLOR_SCREEN_TRANSP - memset(vdb_buf, 0x00, LV_VDB_SIZE_IN_BYTES); -#endif -} - -/** - * Get currently active VDB, where the drawing happens. Used with `LV_VDB_DOUBLE 1` - * @return pointer to the active VDB. If `LV_VDB_DOUBLE 0` give the single VDB - */ -lv_vdb_t * lv_vdb_get_active(void) -{ -#if LV_VDB_DOUBLE == 0 - return &vdb; -#else - return &vdb[vdb_active]; -#endif -} - -/** - * Get currently inactive VDB, which is being displayed or being flushed. Used with `LV_VDB_DOUBLE 1` - * @return pointer to the inactive VDB. If `LV_VDB_DOUBLE 0` give the single VDB - */ -lv_vdb_t * lv_vdb_get_inactive(void) -{ -#if LV_VDB_DOUBLE == 0 - return &vdb; -#else - return &vdb[(vdb_active + 1) & 0x1]; -#endif -} - -/** - * Whether the flushing is in progress or not - * @return true: flushing is in progress; false: flushing ready - */ -bool lv_vdb_is_flushing(void) -{ - return vdb_flushing; -} - -/********************** - * STATIC FUNCTIONS - **********************/ - -#else - -/** - * Just for compatibility - */ -void lv_flush_ready(void) -{ - /*Do nothing. It is used only for VDB*/ -} -#endif diff --git a/lv_core/lv_vdb.h b/lv_core/lv_vdb.h deleted file mode 100644 index e94ba1980126..000000000000 --- a/lv_core/lv_vdb.h +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @file lv_vdb.h - * - */ - -#ifndef LV_VDB_H -#define LV_VDB_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../lv_conf.h" -#endif - -#if LV_VDB_SIZE != 0 - -#include "../lv_misc/lv_color.h" -#include "../lv_misc/lv_area.h" - -/********************* - * DEFINES - *********************/ -/*Can be used in `lv_conf.h` the set an invalid address for the VDB. It should be replaced later by a valid address using `lv_vdb_set_adr()`*/ -#define LV_VDB_ADR_INV 8 /*8 is still too small to be valid but it's aligned on 64 bit machines as well*/ - -#ifndef LV_VDB_PX_BPP -#define LV_VDB_PX_BPP LV_COLOR_SIZE /* Default is LV_COLOR_SIZE */ -#endif - - -#if LV_VDB_TRUE_DOUBLE_BUFFERED && (LV_VDB_SIZE != LV_HOR_RES * LV_VER_RES || LV_VDB_DOUBLE == 0) -#error "With LV_VDB_TRUE_DOUBLE_BUFFERED: (LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES and LV_VDB_DOUBLE = 1 is required" -#endif - - -/* The size of VDB in bytes. - * (LV_VDB_SIZE * LV_VDB_PX_BPP) >> 3): just divide by 8 to convert bits to bytes - * (((LV_VDB_SIZE * LV_VDB_PX_BPP) & 0x7) ? 1 : 0): add an extra byte to round up. - * E.g. if LV_VDB_SIZE = 10 and LV_VDB_PX_BPP = 1 -> 10 bits -> 2 bytes*/ -#define LV_VDB_SIZE_IN_BYTES ((LV_VDB_SIZE * LV_VDB_PX_BPP) >> 3) + (((LV_VDB_SIZE * LV_VDB_PX_BPP) & 0x7) ? 1 : 0) - -/********************** - * TYPEDEFS - **********************/ - -typedef struct -{ - lv_area_t area; - lv_color_t *buf; -} lv_vdb_t; - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/** - * Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode - * @return pointer to a 'vdb' variable - */ -lv_vdb_t * lv_vdb_get(void); - -/** - * Flush the content of the vdb - */ -void lv_vdb_flush(void); - -/** - * Set the address of VDB buffer(s) manually. To use this set `LV_VDB_ADR` (and `LV_VDB2_ADR`) to `LV_VDB_ADR_INV` in `lv_conf.h`. - * It should be called before `lv_init()`. The size of the buffer should be: `LV_VDB_SIZE_IN_BYTES` - * @param buf1 address of the VDB. - * @param buf2 address of the second buffer. `NULL` if `LV_VDB_DOUBLE 0` - */ -void lv_vdb_set_adr(void * buf1, void * buf2); - -/** - * Call in the display driver's 'disp_flush' function when the flushing is finished - */ -void lv_flush_ready(void); - -/** - * Get currently active VDB, where the drawing happens. Used with `LV_VDB_DOUBLE 1` - * @return pointer to the active VDB. If `LV_VDB_DOUBLE 0` give the single VDB - */ -lv_vdb_t * lv_vdb_get_active(void); - -/** - * Get currently inactive VDB, which is being displayed or being flushed. Used with `LV_VDB_DOUBLE 1` - * @return pointer to the inactive VDB. If `LV_VDB_DOUBLE 0` give the single VDB - */ -lv_vdb_t * lv_vdb_get_inactive(void); - -/** - * Whether the flushing is in progress or not - * @return true: flushing is in progress; false: flushing ready - */ -bool lv_vdb_is_flushing(void); - -/********************** - * MACROS - **********************/ - -#else /*LV_VDB_SIZE != 0*/ - -/*Just for compatibility*/ -void lv_flush_ready(void); -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*LV_VDB_H*/ diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index f1137ceb6172..af7c8a384062 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -10,12 +10,7 @@ #include #include #include "lv_draw.h" -#include "lv_draw_rbasic.h" -#include "lv_draw_vbasic.h" -#include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_math.h" -#include "../lv_misc/lv_ufs.h" -#include "../lv_objx/lv_img.h" /********************* * DEFINES @@ -33,22 +28,6 @@ * STATIC VARIABLES **********************/ -#if LV_VDB_SIZE != 0 -void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_vpx; -void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_vfill; -void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) = lv_vletter; -void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa) = lv_vmap; -#else -void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_rpx; -void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_rfill; -void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) = lv_rletter; -void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa) = lv_rmap; -#endif - /********************** * MACROS **********************/ @@ -132,7 +111,7 @@ void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ for(i = 0; i < length; i++) { lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa); if(aa_inv) px_opa = opa - px_opa; - px_fp(x, y + i, mask, color, px_opa); + lv_draw_px(x, y + i, mask, color, px_opa); } } @@ -157,7 +136,7 @@ void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ for(i = 0; i < length; i++) { lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa); if(aa_inv) px_opa = opa - px_opa; - px_fp(x + i, y, mask, color, px_opa); + lv_draw_px(x + i, y, mask, color, px_opa); } } diff --git a/lv_draw/lv_draw.h b/lv_draw/lv_draw.h index cf50e98ce054..ccd7b2ce478a 100644 --- a/lv_draw/lv_draw.h +++ b/lv_draw/lv_draw.h @@ -88,12 +88,6 @@ void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ /********************** * GLOBAL VARIABLES **********************/ -extern void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa); -extern void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa); -extern void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa); -extern void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa); /********************** * MACROS @@ -102,6 +96,7 @@ extern void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p, /********************** * POST INCLUDES *********************/ +#include "lv_draw_basic.h" #include "lv_draw_rect.h" #include "lv_draw_label.h" #include "lv_draw_img.h" diff --git a/lv_draw/lv_draw_arc.c b/lv_draw/lv_draw_arc.c index 525e56b79b64..0177d1449faa 100644 --- a/lv_draw/lv_draw_arc.c +++ b/lv_draw/lv_draw_arc.c @@ -239,7 +239,7 @@ static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coor lv_area_t area; lv_area_set(&area, x, y, x, y + len); - fill_fp(&area, mask, color, opa); + lv_draw_fill(&area, mask, color, opa); } static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa) @@ -247,7 +247,7 @@ static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coor lv_area_t area; lv_area_set(&area, x, y, x + len, y); - fill_fp(&area, mask, color, opa); + lv_draw_fill(&area, mask, color, opa); } static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end) diff --git a/lv_draw/lv_draw_vbasic.c b/lv_draw/lv_draw_basic.c similarity index 89% rename from lv_draw/lv_draw_vbasic.c rename to lv_draw/lv_draw_basic.c index e3ead254156e..7e7a6d1ed655 100644 --- a/lv_draw/lv_draw_vbasic.c +++ b/lv_draw/lv_draw_basic.c @@ -1,9 +1,9 @@ /** - * @file lv_vdraw.c + * @file lv_draw_basic.c * */ -#include "lv_draw_vbasic.h" +#include "lv_draw_basic.h" #include #include @@ -16,10 +16,7 @@ #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_log.h" -#if LV_VDB_SIZE != 0 - #include -#include "../lv_core/lv_vdb.h" #include "lv_draw.h" /********************* @@ -69,16 +66,11 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, * @param color pixel color * @param opa opacity of the area (0..255) */ -void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) { if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; - } /*Pixel out of the mask*/ if(x < mask_p->x1 || x > mask_p->x2 || @@ -86,17 +78,19 @@ void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t col return; } - uint32_t vdb_width = lv_area_get_width(&vdb_p->area); + lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_vdb_t * vdb = lv_disp_get_vdb(disp); + uint32_t vdb_width = lv_area_get_width(&vdb->area); /*Make the coordinates relative to VDB*/ - x -= vdb_p->area.x1; - y -= vdb_p->area.y1; + x -= vdb->area.x1; + y -= vdb->area.y1; - lv_disp_t * disp = lv_refr_get_disp_refreshing(); if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, x, y, color, opa); + disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa); } else { - lv_color_t * vdb_px_p = vdb_p->buf + y * vdb_width + x; + lv_color_t * vdb_px_p = vdb->buf_act; + vdb_px_p += y * vdb_width + x; #if LV_COLOR_SCREEN_TRANSP == 0 if(opa == LV_OPA_COVER) { *vdb_px_p = color; @@ -117,7 +111,7 @@ void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t col * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) { if(opa < LV_OPA_MIN) return; @@ -125,11 +119,6 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_area_t res_a; bool union_ok; - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; - } /*Get the union of cord and mask*/ /* The mask is already truncated to the vdb size @@ -140,15 +129,16 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, if(union_ok == false) return; lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_vdb_t * vdb = lv_disp_get_vdb(disp); lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/ - vdb_rel_a.x1 = res_a.x1 - vdb_p->area.x1; - vdb_rel_a.y1 = res_a.y1 - vdb_p->area.y1; - vdb_rel_a.x2 = res_a.x2 - vdb_p->area.x1; - vdb_rel_a.y2 = res_a.y2 - vdb_p->area.y1; + vdb_rel_a.x1 = res_a.x1 - vdb->area.x1; + vdb_rel_a.y1 = res_a.y1 - vdb->area.y1; + vdb_rel_a.x2 = res_a.x2 - vdb->area.x1; + vdb_rel_a.y2 = res_a.y2 - vdb->area.y1; - lv_color_t * vdb_buf_tmp = vdb_p->buf; - uint32_t vdb_width = lv_area_get_width(&vdb_p->area); + lv_color_t * vdb_buf_tmp = vdb->buf_act; + uint32_t vdb_width = lv_area_get_width(&vdb->area); /*Move the vdb_tmp to the first row*/ vdb_buf_tmp += vdb_width * vdb_rel_a.y1; @@ -160,7 +150,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_coord_t w = lv_area_get_width(&vdb_rel_a); /*Don't use hw. acc. for every small fill (because of the init overhead)*/ if(w < VFILL_HW_ACC_SIZE_LIMIT) { - sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa); + sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); } /*Not opaque fill*/ else if(opa == LV_OPA_COVER) { @@ -194,7 +184,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, } /*Else use sw fill if no better option*/ else { - sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa); + sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); } } @@ -219,12 +209,12 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, } /*Use sw fill with opa if no better option*/ else { - sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa); + sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); } } #else - sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa); + sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); #endif } @@ -237,7 +227,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) { @@ -299,14 +289,11 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, if(pos_x + letter_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + letter_h < mask_p->y1 || pos_y > mask_p->y2) return; - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; - } + lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_vdb_t * vdb = lv_disp_get_vdb(disp); - lv_coord_t vdb_width = lv_area_get_width(&vdb_p->area); - lv_color_t * vdb_buf_tmp = vdb_p->buf; + lv_coord_t vdb_width = lv_area_get_width(&vdb->area); + lv_color_t * vdb_buf_tmp = vdb->buf_act; lv_coord_t col, row; uint8_t col_bit; uint8_t col_byte_cnt; @@ -322,8 +309,8 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, lv_coord_t row_end = pos_y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_y + 1; /*Set a pointer on VDB to the first pixel of the letter*/ - vdb_buf_tmp += ((pos_y - vdb_p->area.y1) * vdb_width) - + pos_x - vdb_p->area.x1; + vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + + pos_x - vdb->area.x1; /*If the letter is partially out of mask the move there on VDB*/ vdb_buf_tmp += (row_start * vdb_width) + col_start; @@ -331,8 +318,6 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, /*Move on the map too*/ map_p += (row_start * width_byte_bpp) + ((col_start * bpp) >> 3); - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - uint8_t letter_px; lv_opa_t px_opa; for(row = row_start; row < row_end; row ++) { @@ -351,8 +336,8 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, } if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, - (col + pos_x) - vdb_p->area.x1, (row + pos_y) - vdb_p->area.y1, + disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, + (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); } else { #if LV_COLOR_SCREEN_TRANSP == 0 @@ -392,7 +377,7 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa) { @@ -402,11 +387,6 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_area_t masked_a; bool union_ok; - lv_vdb_t * vdb_p = lv_vdb_get(); - if(!vdb_p) { - LV_LOG_WARN("Invalid VDB pointer"); - return; - } /*Get the union of map size and mask*/ /* The mask is already truncated to the vdb size @@ -428,22 +408,23 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, map_p += (masked_a.x1 - cords_p->x1) * px_size_byte; } + lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_vdb_t * vdb = lv_disp_get_vdb(disp); + /*Stores coordinates relative to the current VDB*/ - masked_a.x1 = masked_a.x1 - vdb_p->area.x1; - masked_a.y1 = masked_a.y1 - vdb_p->area.y1; - masked_a.x2 = masked_a.x2 - vdb_p->area.x1; - masked_a.y2 = masked_a.y2 - vdb_p->area.y1; + masked_a.x1 = masked_a.x1 - vdb->area.x1; + masked_a.y1 = masked_a.y1 - vdb->area.y1; + masked_a.x2 = masked_a.x2 - vdb->area.x1; + masked_a.y2 = masked_a.y2 - vdb->area.y1; - lv_coord_t vdb_width = lv_area_get_width(&vdb_p->area); - lv_color_t * vdb_buf_tmp = vdb_p->buf; + lv_coord_t vdb_width = lv_area_get_width(&vdb->area); + lv_color_t * vdb_buf_tmp = vdb->buf_act; vdb_buf_tmp += (uint32_t) vdb_width * masked_a.y1; /*Move to the first row*/ vdb_buf_tmp += (uint32_t) masked_a.x1; /*Move to the first col*/ lv_coord_t row; lv_coord_t map_useful_w = lv_area_get_width(&masked_a); - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - /*The simplest case just copy the pixels into the VDB*/ if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) { @@ -453,7 +434,7 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]); - disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, px_color, opa); + disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); } map_p += map_width * px_size_byte; /*Next row on the map*/ } @@ -516,7 +497,7 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, } /*Handle custom VDB write is present*/ if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); + disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); } /*Normal native VDB write*/ else { @@ -526,7 +507,7 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, } else { /*Handle custom VDB write is present*/ if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, px_color, opa_result); + disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); } /*Normal native VDB write*/ else { @@ -692,4 +673,3 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, } #endif /*LV_COLOR_SCREEN_TRANSP*/ -#endif diff --git a/lv_draw/lv_draw_vbasic.h b/lv_draw/lv_draw_basic.h similarity index 80% rename from lv_draw/lv_draw_vbasic.h rename to lv_draw/lv_draw_basic.h index 88838b7c7594..2e52d29d8db8 100644 --- a/lv_draw/lv_draw_vbasic.h +++ b/lv_draw/lv_draw_basic.h @@ -1,10 +1,10 @@ /** - * @file lv_draw_vbasic.h + * @file lv_draw_basic.h * */ -#ifndef LV_DRAW_VBASIC_H -#define LV_DRAW_VBASIC_H +#ifndef LV_DRAW_BASIC_H +#define LV_DRAW_BASIC_H #ifdef __cplusplus extern "C" { @@ -19,8 +19,6 @@ extern "C" { #include "../../lv_conf.h" #endif -#if LV_VDB_SIZE != 0 - #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_font.h" @@ -37,7 +35,7 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ -void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); /** * Fill an area in the Virtual Display Buffer * @param cords_p coordinates of the area to fill @@ -45,7 +43,7 @@ void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t col * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); /** @@ -57,7 +55,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p, * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa); @@ -72,7 +70,7 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p, * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa); @@ -80,10 +78,8 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, * MACROS **********************/ -#endif /*LV_VDB_SIZE != 0*/ - #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_DRAW_RBASIC_H*/ +#endif /*LV_DRAW_BASIC_H*/ diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index 5c24aa89d176..0f3d94fe8dbc 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -316,7 +316,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas /* The decoder open could open the image and gave the entire uncompressed image. * Just draw it!*/ if(img_data) { - map_fp(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); + lv_draw_map(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); } /* The whole uncompressed image is not available. Try to read it line-by-line*/ else { @@ -341,7 +341,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas LV_LOG_WARN("Image draw can't read the line"); return LV_RES_INV; } - map_fp(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); + lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); line.y1++; line.y2++; y++; diff --git a/lv_draw/lv_draw_label.c b/lv_draw/lv_draw_label.c index d80c9a0c2f1c..72faf34c6aa5 100644 --- a/lv_draw/lv_draw_label.c +++ b/lv_draw/lv_draw_label.c @@ -7,7 +7,6 @@ * INCLUDES *********************/ #include "lv_draw_label.h" -#include "lv_draw_rbasic.h" #include "../lv_misc/lv_math.h" /********************* @@ -123,12 +122,6 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st pos.y += y_ofs; } - /*Real draw need a background color for higher bpp letter*/ -#if LV_VDB_SIZE == 0 - lv_rletter_set_background(style->body.main_color); -#endif - - /*Write out all lines*/ while(txt[line_start] != '\0') { if(offset != NULL) { @@ -182,7 +175,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st if(cmd_state == CMD_STATE_IN) color = recolor; - letter_fp(&pos, mask, font, letter, color, opa); + lv_draw_letter(&pos, mask, font, letter, color, opa); letter_w = lv_font_get_width(font, letter); if(letter_w > 0){ diff --git a/lv_draw/lv_draw_line.c b/lv_draw/lv_draw_line.c index 0d2c389c21c6..c456095c5944 100644 --- a/lv_draw/lv_draw_line.c +++ b/lv_draw/lv_draw_line.c @@ -192,7 +192,7 @@ static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); } static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) @@ -214,7 +214,7 @@ static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); } static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) @@ -436,12 +436,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ draw_area.y1 = prev_p.y + pattern[i].y; draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x - 1; draw_area.y2 = draw_area.y1; - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps * When stepping in y one pixel remains empty on every corner (don't do this on the first segment ) */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - px_fp(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); } } @@ -463,12 +463,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ draw_area.y1 = prev_p.y + pattern[i].y; draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x; draw_area.y2 = draw_area.y1; - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps * When stepping in y one pixel remains empty on every corner */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - px_fp(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); } } @@ -489,12 +489,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ draw_area.x2 = draw_area.x1; draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y - 1; - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps * When stepping in x one pixel remains empty on every corner (don't do this on the first segment ) */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - px_fp(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); } } @@ -519,12 +519,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ draw_area.x2 = draw_area.x1; draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y; - fill_fp(&draw_area, mask, style->line.color, opa); + lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps * When stepping in x one pixel remains empty on every corner */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - px_fp(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); } } diff --git a/lv_draw/lv_draw_rbasic.c b/lv_draw/lv_draw_rbasic.c deleted file mode 100644 index f0cd9c0e137e..000000000000 --- a/lv_draw/lv_draw_rbasic.c +++ /dev/null @@ -1,277 +0,0 @@ -/** - * @file lv_draw_rbasic.c - * - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_draw_rbasic.h" -#if USE_LV_REAL_DRAW != 0 - -#include "../lv_hal/lv_hal.h" -#include "../lv_misc/lv_font.h" -#include "../lv_core/lv_refr.h" -#include "lv_draw.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ - -/********************** - * STATIC VARIABLES - **********************/ -static lv_color_t letter_bg_color; - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Put a pixel to the display - * @param x x coordinate of the pixel - * @param y y coordinate of the pixel - * @param mask_p the pixel will be drawn on this area - * @param color color of the pixel - * @param opa opacity (ignored, only for compatibility with lv_vpx) - */ -void lv_rpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) -{ - (void)opa; /*Opa is used only for compatibility with lv_vpx*/ - - lv_area_t area; - area.x1 = x; - area.y1 = y; - area.x2 = x; - area.y2 = y; - - lv_rfill(&area, mask_p, color, LV_OPA_COVER); -} - -/** - * Fill an area on the display - * @param cords_p coordinates of the area to fill - * @param mask_p fill only o this mask - * @param color fill color - * @param opa opacity (ignored, only for compatibility with lv_vfill) - */ -void lv_rfill(const lv_area_t * cords_p, const lv_area_t * mask_p, - lv_color_t color, lv_opa_t opa) -{ - - (void)opa; /*Opa is used only for compatibility with lv_vfill*/ - - lv_area_t masked_area; - bool union_ok = true; - - if(mask_p != NULL) { - union_ok = lv_area_intersect(&masked_area, cords_p, mask_p); - } else { - lv_area_t scr_area; - lv_area_set(&scr_area, 0, 0, lv_disp_get_hor_res(NULL) - 1, lv_disp_get_ver_res(NULL) - 1); - union_ok = lv_area_intersect(&masked_area, cords_p, &scr_area); - } - - if(union_ok != false) { - - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.disp_fill) { - disp->driver.disp_fill(masked_area.x1, masked_area.y1, masked_area.x2, masked_area.y2, color); - } - } -} - -/** - * Draw a letter to the display - * @param pos_p left-top coordinate of the latter - * @param mask_p the letter will be drawn only on this area - * @param font_p pointer to font - * @param letter a letter to draw - * @param color color of letter - * @param opa opacity of letter (ignored, only for compatibility with lv_vletter) - */ -void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p, - const lv_font_t * font_p, uint32_t letter, - lv_color_t color, lv_opa_t opa) -{ - (void)opa; /*Opa is used only for compatibility with lv_vletter*/ - - static uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ - static uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ - static uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255 - }; - - if(font_p == NULL) return; - - uint8_t letter_w = lv_font_get_width(font_p, letter); - uint8_t letter_h = lv_font_get_height(font_p); - uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ - uint8_t * bpp_opa_table; - uint8_t mask_init; - uint8_t mask; - - switch(bpp) { - case 1: - bpp_opa_table = bpp1_opa_table; - mask_init = 0x80; - break; - case 2: - bpp_opa_table = bpp2_opa_table; - mask_init = 0xC0; - break; - case 4: - bpp_opa_table = bpp4_opa_table; - mask_init = 0xF0; - break; - case 8: - bpp_opa_table = NULL; - mask_init = 0xFF; - break; /*No opa table, pixel value will be used directly*/ - default: - return; /*Invalid bpp. Can't render the letter*/ - } - - const uint8_t * map_p = lv_font_get_bitmap(font_p, letter); - - if(map_p == NULL) return; - - /*If the letter is completely out of mask don't draw it */ - if(pos_p->x + letter_w < mask_p->x1 || pos_p->x > mask_p->x2 || - pos_p->y + letter_h < mask_p->y1 || pos_p->y > mask_p->y2) return; - - lv_coord_t col, row; - uint8_t col_bit; - uint8_t col_byte_cnt; - uint8_t width_byte_scr = letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ - if(letter_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ - if((letter_w * bpp) & 0x7) width_byte_bpp++; - - /* Calculate the col/row start/end on the map*/ - lv_coord_t col_start = pos_p->x >= mask_p->x1 ? 0 : mask_p->x1 - pos_p->x; - lv_coord_t col_end = pos_p->x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_p->x + 1; - lv_coord_t row_start = pos_p->y >= mask_p->y1 ? 0 : mask_p->y1 - pos_p->y; - lv_coord_t row_end = pos_p->y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_p->y + 1; - - /*Move on the map too*/ - map_p += (row_start * width_byte_bpp) + ((col_start * bpp) >> 3); - - uint8_t letter_px; - for(row = row_start; row < row_end; row ++) { - col_byte_cnt = 0; - col_bit = (col_start * bpp) % 8; - mask = mask_init >> col_bit; - for(col = col_start; col < col_end; col ++) { - letter_px = (*map_p & mask) >> (8 - col_bit - bpp); - if(letter_px != 0) { - lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, lv_color_mix(color, letter_bg_color, bpp == 8 ? letter_px : bpp_opa_table[letter_px]), LV_OPA_COVER); - } - - if(col_bit < 8 - bpp) { - col_bit += bpp; - mask = mask >> bpp; - } else { - col_bit = 0; - col_byte_cnt ++; - mask = mask_init; - map_p ++; - } - } - - map_p += (width_byte_bpp) - col_byte_cnt; - } -} - -/** - * When the letter is ant-aliased it needs to know the background color - * @param bg_color the background color of the currently drawn letter - */ -void lv_rletter_set_background(lv_color_t color) -{ - letter_bg_color = color; -} - -/** - * Draw a color map to the display (image) - * @param cords_p coordinates the color map - * @param mask_p the map will drawn only on this area - * @param map_p pointer to a lv_color_t array - * @param opa opacity of the map (ignored, only for compatibility with 'lv_vmap') - * @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels - * @param alpha_byte true: extra alpha byte is inserted for every pixel (not supported, only l'v_vmap' can draw it) - * @param recolor mix the pixels with this color - * @param recolor_opa the intense of recoloring - */ -void lv_rmap(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa) -{ - if(alpha_byte) return; /*Pixel level opacity i not supported in real map drawing*/ - - (void)opa; /*opa is used only for compatibility with lv_vmap*/ - lv_area_t masked_a; - bool union_ok; - - union_ok = lv_area_intersect(&masked_a, cords_p, mask_p); - - /*If there are common part of the mask and map then draw the map*/ - if(union_ok == false) return; - - lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.disp_map == NULL) return; - - /*Go to the first pixel*/ - lv_coord_t map_width = lv_area_get_width(cords_p); - map_p += (masked_a.y1 - cords_p->y1) * map_width * sizeof(lv_color_t); - map_p += (masked_a.x1 - cords_p->x1) * sizeof(lv_color_t); - - lv_coord_t row; - if(recolor_opa == LV_OPA_TRANSP && chroma_key == false) { - lv_coord_t mask_w = lv_area_get_width(&masked_a) - 1; - for(row = masked_a.y1; row <= masked_a.y2; row++) { - disp->driver.disp_map(masked_a.x1, row, masked_a.x1 + mask_w, row, (lv_color_t *)map_p); - map_p += map_width * sizeof(lv_color_t); /*Next row on the map*/ - } - } else { - lv_color_t chroma_key_color = LV_COLOR_TRANSP; - lv_coord_t col; - for(row = masked_a.y1; row <= masked_a.y2; row++) { - for(col = masked_a.x1; col <= masked_a.x2; col++) { - lv_color_t * px_color = (lv_color_t *) &map_p[(uint32_t)(col - masked_a.x1) * sizeof(lv_color_t)]; - - if(chroma_key && chroma_key_color.full == px_color->full) continue; - - if(recolor_opa != LV_OPA_TRANSP) { - lv_color_t recolored_px = lv_color_mix(recolor, *px_color, recolor_opa); - - lv_rpx(col, row, mask_p, recolored_px, LV_OPA_COVER); - } else { - lv_rpx(col, row, mask_p, *px_color, LV_OPA_COVER); - } - - } - map_p += map_width * sizeof(lv_color_t); /*Next row on the map*/ - } - } -} - -/********************** - * STATIC FUNCTIONS - **********************/ - -#endif /*USE_LV_REAL_DRAW*/ diff --git a/lv_draw/lv_draw_rbasic.h b/lv_draw/lv_draw_rbasic.h deleted file mode 100644 index b1d62f3fbc05..000000000000 --- a/lv_draw/lv_draw_rbasic.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @file lv_draw_rbasic..h - * - */ - -#ifndef LV_DRAW_RBASIC_H -#define LV_DRAW_RBASIC_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../lv_conf.h" -#endif - -#if USE_LV_REAL_DRAW != 0 - -#include "../lv_misc/lv_color.h" -#include "../lv_misc/lv_area.h" -#include "../lv_misc/lv_font.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -void lv_rpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); - -/** - * Fill an area on the display - * @param cords_p coordinates of the area to fill - * @param mask_p fill only o this mask - * @param color fill color - * @param opa opacity (ignored, only for compatibility with lv_vfill) - */ -void lv_rfill(const lv_area_t * cords_p, const lv_area_t * mask_p, - lv_color_t color, lv_opa_t opa); - -/** - * Draw a letter to the display - * @param pos_p left-top coordinate of the latter - * @param mask_p the letter will be drawn only on this area - * @param font_p pointer to font - * @param letter a letter to draw - * @param color color of letter - * @param opa opacity of letter (ignored, only for compatibility with lv_vletter) - */ -void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p, - const lv_font_t * font_p, uint32_t letter, - lv_color_t color, lv_opa_t opa); - -/** - * When the letter is ant-aliased it needs to know the background color - * @param bg_color the background color of the currently drawn letter - */ -void lv_rletter_set_background(lv_color_t color); - - -/** - * Draw a color map to the display (image) - * @param cords_p coordinates the color map - * @param mask_p the map will drawn only on this area - * @param map_p pointer to a lv_color_t array - * @param opa opacity of the map (ignored, only for compatibility with 'lv_vmap') - * @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels - * @param alpha_byte true: extra alpha byte is inserted for every pixel (not supported, only l'v_vmap' can draw it) - * @param recolor mix the pixels with this color - * @param recolor_opa the intense of recoloring - */ -void lv_rmap(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa); -/********************** - * MACROS - **********************/ - -#endif /*USE_LV_REAL_DRAW*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*LV_DRAW_RBASIC_H*/ diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index 5b4ef166502b..0d2e5cfa4381 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -30,7 +30,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -#if USE_LV_SHADOW && LV_VDB_SIZE +#if USE_LV_SHADOW static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); @@ -66,7 +66,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; -#if USE_LV_SHADOW && LV_VDB_SIZE +#if USE_LV_SHADOW if(style->body.shadow.width != 0) { lv_draw_shadow(coords, mask, style, opa_scale); } @@ -133,7 +133,7 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma #endif } - fill_fp(&work_area, mask, mcolor, opa); + lv_draw_fill(&work_area, mask, mcolor, opa); } else { lv_coord_t row; lv_coord_t row_start = coords->y1 + radius; @@ -157,7 +157,7 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma mix = (uint32_t)((uint32_t)(coords->y2 - work_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); - fill_fp(&work_area, mask, act_color, opa); + lv_draw_fill(&work_area, mask, act_color, opa); } } } @@ -263,19 +263,19 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); } - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); } out_x_last = cir.x; @@ -304,7 +304,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&edge_top_area, mask, act_color, opa); + lv_draw_fill(&edge_top_area, mask, act_color, opa); } if(mid_top_refr != 0) { @@ -313,7 +313,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&mid_top_area, mask, act_color, opa); + lv_draw_fill(&mid_top_area, mask, act_color, opa); } if(mid_bot_refr != 0) { @@ -322,7 +322,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&mid_bot_area, mask, act_color, opa); + lv_draw_fill(&mid_bot_area, mask, act_color, opa); } if(edge_bot_refr != 0) { @@ -332,7 +332,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&edge_bot_area, mask, act_color, opa); + lv_draw_fill(&edge_bot_area, mask, act_color, opa); } /*Save the current coordinates*/ @@ -364,7 +364,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&edge_top_area, mask, act_color, opa); + lv_draw_fill(&edge_top_area, mask, act_color, opa); if(edge_top_area.y1 != mid_top_area.y1) { @@ -373,7 +373,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&mid_top_area, mask, act_color, opa); + lv_draw_fill(&mid_top_area, mask, act_color, opa); } if(mcolor.full == gcolor.full) act_color = mcolor; @@ -381,7 +381,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&mid_bot_area, mask, act_color, opa); + lv_draw_fill(&mid_bot_area, mask, act_color, opa); if(edge_bot_area.y1 != mid_bot_area.y1) { @@ -390,7 +390,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } - fill_fp(&edge_bot_area, mask, act_color, opa); + lv_draw_fill(&edge_bot_area, mask, act_color, opa); } @@ -400,11 +400,11 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * edge_top_area.x2 = coords->x2 - radius - 2; edge_top_area.y1 = coords->y1; edge_top_area.y2 = coords->y1; - fill_fp(&edge_top_area, mask, style->body.main_color, opa); + lv_draw_fill(&edge_top_area, mask, style->body.main_color, opa); edge_top_area.y1 = coords->y2; edge_top_area.y2 = coords->y2; - fill_fp(&edge_top_area, mask, style->body.grad_color, opa); + lv_draw_fill(&edge_top_area, mask, style->body.grad_color, opa); /*Last parts of the anti-alias*/ out_y_seg_end = cir.y; @@ -421,19 +421,19 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_coord_t i; for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); } /*In some cases the last pixel is not drawn*/ @@ -446,10 +446,10 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); lv_opa_t aa_opa = opa >> 1; - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, aa_opa); } #endif @@ -498,7 +498,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y1; work_area.y2 = coords->y1 + bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right top corner*/ @@ -507,7 +507,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y1 + (part & LV_BORDER_TOP ? bwidth + 1 : 0); work_area.y2 = coords->y2 - (part & LV_BORDER_BOTTOM ? bwidth + 1 : 0); - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Left bottom corner*/ @@ -516,7 +516,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x1 + bwidth; work_area.y1 = coords->y1 + (part & LV_BORDER_TOP ? bwidth + 1 : 0); work_area.y2 = coords->y2 - (part & LV_BORDER_BOTTOM ? bwidth + 1 : 0); - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right bottom corner*/ @@ -525,7 +525,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y2 - bwidth; work_area.y2 = coords->y2; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } return; } @@ -544,14 +544,14 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area if(part & LV_BORDER_LEFT) { work_area.x1 = coords->x1; work_area.x2 = work_area.x1 + bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right border*/ if(part & LV_BORDER_RIGHT) { work_area.x2 = coords->x2; work_area.x1 = work_area.x2 - bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } work_area.x1 = coords->x1 + corner_size - length_corr; @@ -561,14 +561,14 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area if(part & LV_BORDER_TOP) { work_area.y1 = coords->y1; work_area.y2 = coords->y1 + bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Lower border*/ if(part & LV_BORDER_BOTTOM) { work_area.y2 = coords->y2; work_area.y1 = work_area.y2 - bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Draw the a remaining rectangles if the radius is smaller then bwidth */ @@ -579,7 +579,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x1 + radius + LV_ANTIALIAS; work_area.y1 = coords->y1 + radius + 1 + LV_ANTIALIAS; work_area.y2 = coords->y1 + bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right top correction*/ @@ -588,7 +588,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y1 + radius + 1 + LV_ANTIALIAS; work_area.y2 = coords->y1 + bwidth; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Left bottom correction*/ @@ -597,7 +597,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x1 + radius + LV_ANTIALIAS; work_area.y1 = coords->y2 - bwidth; work_area.y2 = coords->y2 - radius - 1 - LV_ANTIALIAS; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right bottom correction*/ @@ -606,7 +606,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y2 - bwidth; work_area.y2 = coords->y2 - radius - 1 - LV_ANTIALIAS; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } } @@ -618,7 +618,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x1 + LV_ANTIALIAS; work_area.y1 = coords->y1; work_area.y2 = coords->y1 + LV_ANTIALIAS; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right top corner*/ @@ -627,7 +627,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y1; work_area.y2 = coords->y1 + LV_ANTIALIAS; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Left bottom corner*/ @@ -636,7 +636,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x1 + LV_ANTIALIAS; work_area.y1 = coords->y2 - LV_ANTIALIAS; work_area.y2 = coords->y2; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } /*Right bottom corner*/ @@ -645,7 +645,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area work_area.x2 = coords->x2; work_area.y1 = coords->y2 - LV_ANTIALIAS; work_area.y2 = coords->y2; - fill_fp(&work_area, mask, color, opa); + lv_draw_fill(&work_area, mask, color, opa); } } } @@ -756,24 +756,24 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } @@ -801,37 +801,37 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } /*Be sure the pixels on the middle are not drawn twice*/ if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } @@ -851,13 +851,13 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t circ_area.x2 = rb_origo.x + LV_CIRC_OCT1_X(cir_out); circ_area.y1 = rb_origo.y + LV_CIRC_OCT1_Y(cir_out); circ_area.y2 = rb_origo.y + LV_CIRC_OCT1_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); circ_area.x1 = rb_origo.x + LV_CIRC_OCT2_X(cir_out); circ_area.x2 = rb_origo.x + LV_CIRC_OCT2_X(cir_out); circ_area.y1 = rb_origo.y + LV_CIRC_OCT2_Y(cir_out) - act_w1; circ_area.y2 = rb_origo.y + LV_CIRC_OCT2_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); } /*Draw the octets to the left bottom corner*/ @@ -866,13 +866,13 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t circ_area.x2 = lb_origo.x + LV_CIRC_OCT3_X(cir_out); circ_area.y1 = lb_origo.y + LV_CIRC_OCT3_Y(cir_out) - act_w2; circ_area.y2 = lb_origo.y + LV_CIRC_OCT3_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); circ_area.x1 = lb_origo.x + LV_CIRC_OCT4_X(cir_out); circ_area.x2 = lb_origo.x + LV_CIRC_OCT4_X(cir_out) + act_w1; circ_area.y1 = lb_origo.y + LV_CIRC_OCT4_Y(cir_out); circ_area.y2 = lb_origo.y + LV_CIRC_OCT4_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); } /*Draw the octets to the left top corner*/ @@ -883,14 +883,14 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t circ_area.x2 = lt_origo.x + LV_CIRC_OCT5_X(cir_out) + act_w2; circ_area.y1 = lt_origo.y + LV_CIRC_OCT5_Y(cir_out); circ_area.y2 = lt_origo.y + LV_CIRC_OCT5_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); } circ_area.x1 = lt_origo.x + LV_CIRC_OCT6_X(cir_out); circ_area.x2 = lt_origo.x + LV_CIRC_OCT6_X(cir_out); circ_area.y1 = lt_origo.y + LV_CIRC_OCT6_Y(cir_out); circ_area.y2 = lt_origo.y + LV_CIRC_OCT6_Y(cir_out) + act_w1; - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); } /*Draw the octets to the right top corner*/ @@ -899,7 +899,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t circ_area.x2 = rt_origo.x + LV_CIRC_OCT7_X(cir_out); circ_area.y1 = rt_origo.y + LV_CIRC_OCT7_Y(cir_out); circ_area.y2 = rt_origo.y + LV_CIRC_OCT7_Y(cir_out) + act_w2; - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); /*Don't draw if the lines are common in the middle*/ if(rb_origo.y + LV_CIRC_OCT1_Y(cir_out) > rt_origo.y + LV_CIRC_OCT8_Y(cir_out)) { @@ -907,7 +907,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t circ_area.x2 = rt_origo.x + LV_CIRC_OCT8_X(cir_out); circ_area.y1 = rt_origo.y + LV_CIRC_OCT8_Y(cir_out); circ_area.y2 = rt_origo.y + LV_CIRC_OCT8_Y(cir_out); - fill_fp(&circ_area, mask, color, opa); + lv_draw_fill(&circ_area, mask, color, opa); } } lv_circ_next(&cir_out, &tmp_out); @@ -934,23 +934,23 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } @@ -962,19 +962,19 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t lv_opa_t aa_opa = opa >> 1; if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, style->body.border.color, aa_opa); } } @@ -987,36 +987,36 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - px_fp(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - px_fp(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - px_fp(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - px_fp(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } } @@ -1025,7 +1025,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } -#if USE_LV_SHADOW && LV_VDB_SIZE +#if USE_LV_SHADOW /** * Draw a shadow @@ -1203,19 +1203,19 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask for(d = 1; d < col; d++) { if(point_lt.x < ofs_lt.x && point_lt.y < ofs_lt.y) { - px_fp(point_lt.x, point_lt.y, mask, style->body.shadow.color, line_2d_blur[d]); + lv_draw_px(point_lt.x, point_lt.y, mask, style->body.shadow.color, line_2d_blur[d]); } if(point_lb.x < ofs_lb.x && point_lb.y > ofs_lb.y) { - px_fp(point_lb.x, point_lb.y, mask, style->body.shadow.color, line_2d_blur[d]); + lv_draw_px(point_lb.x, point_lb.y, mask, style->body.shadow.color, line_2d_blur[d]); } if(point_rt.x > ofs_rt.x && point_rt.y < ofs_rt.y) { - px_fp(point_rt.x, point_rt.y, mask, style->body.shadow.color, line_2d_blur[d]); + lv_draw_px(point_rt.x, point_rt.y, mask, style->body.shadow.color, line_2d_blur[d]); } if(point_rb.x > ofs_rb.x && point_rb.y > ofs_rb.y) { - px_fp(point_rb.x, point_rb.y, mask, style->body.shadow.color, line_2d_blur[d]); + lv_draw_px(point_rb.x, point_rb.y, mask, style->body.shadow.color, line_2d_blur[d]); } point_rb.x++; @@ -1306,12 +1306,12 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma } else { px_opa = (uint16_t)((uint16_t)line_1d_blur[d] + line_1d_blur[d - diff]) >> 1; } - px_fp(point_l.x, point_l.y, mask, style->body.shadow.color, px_opa); + lv_draw_px(point_l.x, point_l.y, mask, style->body.shadow.color, px_opa); point_l.y ++; /*Don't overdraw the pixel on the middle*/ if(point_r.x > ofs_l.x) { - px_fp(point_r.x, point_r.y, mask, style->body.shadow.color, px_opa); + lv_draw_px(point_r.x, point_r.y, mask, style->body.shadow.color, px_opa); } point_r.y ++; } @@ -1325,7 +1325,7 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma uint16_t d; for(d = 0; d < swidth; d++) { - fill_fp(&area_mid, mask, style->body.shadow.color, line_1d_blur[d]); + lv_draw_fill(&area_mid, mask, style->body.shadow.color, line_1d_blur[d]); area_mid.y1 ++; area_mid.y2 ++; } @@ -1370,19 +1370,19 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area for(d = 1 /*+ LV_ANTIALIAS*/; d <= swidth/* - LV_ANTIALIAS*/; d++) { opa_act = map[d]; - fill_fp(&right_area, mask, style->body.shadow.color, opa_act); + lv_draw_fill(&right_area, mask, style->body.shadow.color, opa_act); right_area.x1++; right_area.x2++; - fill_fp(&left_area, mask, style->body.shadow.color, opa_act); + lv_draw_fill(&left_area, mask, style->body.shadow.color, opa_act); left_area.x1--; left_area.x2--; - fill_fp(&top_area, mask, style->body.shadow.color, opa_act); + lv_draw_fill(&top_area, mask, style->body.shadow.color, opa_act); top_area.y1--; top_area.y2--; - fill_fp(&bottom_area, mask, style->body.shadow.color, opa_act); + lv_draw_fill(&bottom_area, mask, style->body.shadow.color, opa_act); bottom_area.y1++; bottom_area.y2++; } diff --git a/lv_draw/lv_draw_triangle.c b/lv_draw/lv_draw_triangle.c index 84c9d3f31bd5..954d3541b164 100644 --- a/lv_draw/lv_draw_triangle.c +++ b/lv_draw/lv_draw_triangle.c @@ -98,7 +98,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent triangle*/ - fill_fp(&draw_area, mask, color, LV_OPA_50); + lv_draw_fill(&draw_area, mask, color, LV_OPA_COVER); /*Calc. the next point of edge1*/ y1_tmp = edge1.y; diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 8169a551b665..4c15f28bfc8b 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -53,8 +53,6 @@ */ void lv_disp_drv_init(lv_disp_drv_t * driver) { - driver->disp_fill = NULL; - driver->disp_map = NULL; driver->disp_flush = NULL; driver->hor_res = LV_HOR_RES_MAX; driver->ver_res = LV_VER_RES_MAX; @@ -64,13 +62,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->mem_fill = NULL; #endif -#if LV_VDB_SIZE driver->vdb_wr = NULL; - driver->vdb = NULL; - driver->vdb2 = NULL; - driver->vdb_size = 0; - driver->vdb_double = 0; -#endif } /** @@ -104,6 +96,11 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) return disp; } +/** + * Get the next display. + * @param disp pointer to the current display. NULL to initialize. + * @return the next display or NULL if no more. Give the first display when the parameter is NULL + */ lv_disp_t * lv_disp_get_next(lv_disp_t * disp) { if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); @@ -116,16 +113,9 @@ lv_disp_t * lv_disp_get_last(void) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); } - -/** - * Get the next display. - * @param disp pointer to the current display. NULL to initialize. - * @return the next display or NULL if no more. Give the first display when the parameter is NULL - */ -lv_disp_t * lv_disp_next(lv_disp_t * disp) +lv_vdb_t * lv_disp_get_vdb(lv_disp_t * disp) { - if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); - else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); + return disp->driver.buffer; } lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) @@ -145,6 +135,18 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) else return disp->driver.ver_res; } +bool lv_disp_is_double_vdb(lv_disp_t * disp) +{ + if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2) return true; + else return false; +} + +bool lv_disp_is_true_double_buffered(lv_disp_t * disp) +{ + if(lv_disp_is_double_vdb(disp) && disp->driver.buffer->size == disp->driver.hor_res * disp->driver.ver_res) return true; + else return false; +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 4d1601e19ca8..08fbbfd5f94e 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -35,6 +35,25 @@ extern "C" { struct _disp_t; + +typedef struct +{ + void * buf_act; + void * buf1; + void * buf2; + uint32_t size; /*In pixel count*/ + struct { + uint32_t double_buffered :1; + uint32_t true_double_buffered :1; + }mode; + + lv_area_t area; + struct { + uint32_t flushing :1; + }internal; +}lv_vdb_t; + + /** * Display Driver structure to be registered by HAL */ @@ -45,15 +64,11 @@ typedef struct _disp_drv_t { lv_coord_t ver_res; + lv_vdb_t * buffer; + /*Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished*/ void (*disp_flush)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); - /*Fill an area with a color on the display*/ - void (*disp_fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); - - /*Write pixel map (e.g. image) to the display*/ - void (*disp_map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); - /*Optional interface functions to use GPU*/ #if USE_LV_GPU /*Blend two memories using opacity (GPU only)*/ @@ -63,15 +78,8 @@ typedef struct _disp_drv_t { void (*mem_fill)(lv_color_t * dest, uint32_t length, lv_color_t color); #endif -#if LV_VDB_SIZE - void * vdb; - void * vdb2; - uint32_t vdb_size; - uint32_t vdb_double :1; - /*Optional: Set a pixel in a buffer according to the requirements of the display*/ void (*vdb_wr)(uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); -#endif } lv_disp_drv_t; struct _lv_obj_t; @@ -113,6 +121,7 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t *driver); lv_disp_t * lv_disp_get_last(void); +lv_vdb_t * lv_disp_get_vdb(lv_disp_t * disp); /** * Get the next display. * @param disp pointer to the current display. NULL to initialize. @@ -124,6 +133,9 @@ lv_disp_t * lv_disp_get_next(lv_disp_t * disp); lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); +bool lv_disp_is_double_vdb(lv_disp_t * disp); + +bool lv_disp_is_true_double_buffered(lv_disp_t * disp); /********************** * MACROS **********************/ diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 304852a22eb7..c21511befeeb 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -15,7 +15,7 @@ #include #include "../lv_draw/lv_draw.h" -#include "../lv_draw/lv_draw_vbasic.h" +#include "../lv_draw/lv_draw_basic.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_color.h" diff --git a/lvgl.h b/lvgl.h index 6aab3e4e0b95..527ded834ead 100644 --- a/lvgl.h +++ b/lvgl.h @@ -24,7 +24,6 @@ extern "C" { #include "lv_core/lv_obj.h" #include "lv_core/lv_group.h" #include "lv_core/lv_lang.h" -#include "lv_core/lv_vdb.h" #include "lv_core/lv_refr.h" #include "lv_core/lv_disp.h" From 533d39b4c2c3bb29e032da99a0d73ceaf6d20fc6 Mon Sep 17 00:00:00 2001 From: Muhammet Asan Date: Thu, 14 Feb 2019 13:25:34 +0100 Subject: [PATCH 023/590] 10 times faster int to string implementation --- lv_misc/lv_math.c | 64 ++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 42 deletions(-) diff --git a/lv_misc/lv_math.c b/lv_misc/lv_math.c index a0d26053efa2..39424691636c 100644 --- a/lv_misc/lv_math.c +++ b/lv_misc/lv_math.c @@ -34,7 +34,7 @@ static int16_t sin0_90_table[] = { 28377, 28659, 28932, 29196, 29451, 29697, 29934, 30162, 30381, 30591, 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, 32051, 32165, 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, - 32767 + 32767 }; @@ -54,53 +54,33 @@ static int16_t sin0_90_table[] = { */ char * lv_math_num_to_str(int32_t num, char * buf) { - char * buf_ori = buf; - if(num == 0) { + if (num == 0) { buf[0] = '0'; buf[1] = '\0'; return buf; - } else if(num < 0) { - (*buf) = '-'; - buf++; - num = LV_MATH_ABS(num); } - uint32_t output = 0; - int8_t i; - - for(i = 31; i >= 0; i--) { - if((output & 0xF) >= 5) - output += 3; - if(((output & 0xF0) >> 4) >= 5) - output += (3 << 4); - if(((output & 0xF00) >> 8) >= 5) - output += (3 << 8); - if(((output & 0xF000) >> 12) >= 5) - output += (3 << 12); - if(((output & 0xF0000) >> 16) >= 5) - output += (3 << 16); - if(((output & 0xF00000) >> 20) >= 5) - output += (3 << 20); - if(((output & 0xF000000) >> 24) >= 5) - output += (3 << 24); - if(((output & 0xF0000000) >> 28) >= 5) - output += (3 << 28); - output = (output << 1) | ((num >> i) & 1); + int8_t digitCount = 0; + int8_t i = 0; + if (num < 0) { + buf[digitCount++] = '-'; + num = abs(num); + ++i; } - - uint8_t digit; - bool leading_zero_ready = false; - for(i = 28; i >= 0; i -= 4) { - digit = ((output >> i) & 0xF) + '0'; - if(digit == '0' && leading_zero_ready == false) continue; - - leading_zero_ready = true; - (*buf) = digit; - buf++; + while (num) { + char digit = num % 10; + buf[digitCount++] = digit + 48; + num /= 10; } - - (*buf) = '\0'; - - return buf_ori; + buf[digitCount] = '\0'; + digitCount--; + while (digitCount > i) { + char temp = buf[i]; + buf[i] = buf[digitCount]; + buf[digitCount] = temp; + digitCount--; + i++; + } + return buf; } /** From ef8563c9bd3d347fb6306813c442b4658915965d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Feb 2019 06:20:48 +0100 Subject: [PATCH 024/590] multi-disp_: minor fixes --- lv_core/lv_lang.c | 2 +- lv_objx/lv_tabview.c | 2 +- lv_objx/lv_win.c | 5 ++++- lv_porting/lv_port_indev_templ.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lv_core/lv_lang.c b/lv_core/lv_lang.c index c96ed7883647..ab35c2508ffb 100644 --- a/lv_core/lv_lang.c +++ b/lv_core/lv_lang.c @@ -54,7 +54,7 @@ void lv_lang_set(uint8_t lang_id) lang_set_core(i); } - lang_set_core(lv_scr_act()); + lang_set_core(lv_scr_act(NULL)); } /** diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index ffe6f214719a..44e166807dcb 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -106,7 +106,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_name_ptr[0] = ""; ext->tab_cnt = 0; - lv_disp_t * disp = lv_obj_get_disp(par); + lv_disp_t * disp = lv_obj_get_disp(new_tabview); lv_obj_set_size(new_tabview, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); ext->btns = lv_btnm_create(new_tabview, NULL); diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 60dfe4784f5b..c2abebb9e8d5 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -70,7 +70,10 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new window object*/ if(copy == NULL) { - lv_obj_set_size(new_win, LV_DPI * 3, LV_DPI * 3); + lv_obj_t * disp = lv_obj_get_disp(new_win); + lv_coord_t hres = lv_disp_get_hor_res(disp); + lv_coord_t vres = lv_disp_get_ver_res(disp); + lv_obj_set_size(new_win, hres, vres); lv_obj_set_pos(new_win, 0, 0); lv_obj_set_style(new_win, &lv_style_pretty); diff --git a/lv_porting/lv_port_indev_templ.c b/lv_porting/lv_port_indev_templ.c index 102c16f907e1..60089270e2d6 100644 --- a/lv_porting/lv_port_indev_templ.c +++ b/lv_porting/lv_port_indev_templ.c @@ -109,7 +109,7 @@ void lv_port_indev_init(void) indev_mouse = lv_indev_drv_register(&indev_drv); /*Set cursor. For simplicity set a HOME symbol now.*/ - lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act(), NULL); + lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act(NULL), NULL); lv_img_set_src(mouse_cursor, SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); From 8ec60fbe3ed2deb0fdef49cb278aba01ef3c2f67 Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 15 Feb 2019 08:46:12 +0100 Subject: [PATCH 025/590] add groups to the linked list https://github.com/littlevgl/lvgl/issues/806 --- lv_core/lv_group.c | 54 ++++++++++++++++++++++++++++++++------------ lv_core/lv_group.h | 8 ++++++- lv_core/lv_obj.c | 4 ++++ lv_misc/lv_gc.h | 1 + lv_themes/lv_theme.c | 5 ++++ 5 files changed, 56 insertions(+), 16 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index f5c585adef90..83c22ca76601 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -10,6 +10,7 @@ #if USE_LV_GROUP != 0 #include "../lv_themes/lv_theme.h" #include +#include "../lv_misc/lv_gc.h" /********************* * DEFINES @@ -24,7 +25,8 @@ **********************/ static void style_mod_def(lv_style_t * style); static void style_mod_edit_def(lv_style_t * style); -static void lv_group_refocus(lv_group_t *g); +static void refresh_theme(lv_group_t * g, lv_theme_t * th); +static void lv_group_refocus(lv_group_t * g); /********************** * STATIC VARIABLES @@ -38,13 +40,21 @@ static void lv_group_refocus(lv_group_t *g); * GLOBAL FUNCTIONS **********************/ +/** + * Init. the group module + */ +void lv_group_init(void) +{ + lv_ll_init(&LV_GC_ROOT(_lv_group_ll), sizeof(lv_group_t)); +} + /** * Create a new object group * @return pointer to the new object group */ lv_group_t * lv_group_create(void) { - lv_group_t * group = lv_mem_alloc(sizeof(lv_group_t)); + lv_group_t * group = lv_ll_ins_head(&LV_GC_ROOT(_lv_group_ll)); lv_mem_assert(group); if(group == NULL) return NULL; lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *)); @@ -56,7 +66,7 @@ lv_group_t * lv_group_create(void) group->editing = 0; /*Initialize style modification callbacks from current theme*/ - lv_group_report_style_mod(group); + refresh_theme(group, lv_theme_get_current()); return group; } @@ -462,6 +472,25 @@ bool lv_group_get_wrap(lv_group_t * group) return group->wrap ? true : false; } +/** + * Notify the group that current theme changed and style modification callbacks need to be refreshed. + * @param group pointer to group. If NULL then all groups are notified. + */ +void lv_group_report_style_mod(lv_group_t * group) +{ + lv_theme_t * th = lv_theme_get_current(); + + if(group != NULL) { + refresh_theme(group, th); + return; + } + + lv_group_t * i; + LL_READ(LV_GC_ROOT(_lv_group_ll), i) { + refresh_theme(i, th); + } +} + /********************** * STATIC FUNCTIONS **********************/ @@ -524,20 +553,15 @@ static void style_mod_edit_def(lv_style_t * style) } -/** - * Notify the group that current theme changed and style modification callbacks need to be refreshed. - * @param group pointer to group - */ -void lv_group_report_style_mod(lv_group_t * group) +static void refresh_theme(lv_group_t * g, lv_theme_t * th) { - group->style_mod = style_mod_def; - group->style_mod_edit = style_mod_edit_def; - lv_theme_t * th = lv_theme_get_current(); + g->style_mod = style_mod_def; + g->style_mod_edit = style_mod_edit_def; if(th) { - if (th->group.style_mod) - group->style_mod = th->group.style_mod; - if (th->group.style_mod_edit) - group->style_mod_edit = th->group.style_mod_edit; + if(th->group.style_mod) + g->style_mod = th->group.style_mod; + if(th->group.style_mod_edit) + g->style_mod_edit = th->group.style_mod_edit; } } diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 38fcfe009450..7b3a6d4826fd 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -72,6 +72,12 @@ typedef enum _lv_group_refocus_policy_t { * GLOBAL PROTOTYPES **********************/ +/** +* Init. the group module +* @remarks Internal function, do not call directly. +*/ +void lv_group_init(void); + /** * Create a new object group * @return pointer to the new object group @@ -238,7 +244,7 @@ bool lv_group_get_wrap(lv_group_t * group); /** * Notify the group that current theme changed and style modification callbacks need to be refreshed. - * @param group pointer to group + * @param group pointer to group. If NULL then all groups are notified. */ void lv_group_report_style_mod(lv_group_t * group); diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index f379e16352f6..41049bdfd6b7 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -91,6 +91,10 @@ void lv_init(void) lv_anim_init(); #endif +#if USE_LV_GROUP + lv_group_init(); +#endif + /*Init. the sstyles*/ lv_style_init(); diff --git a/lv_misc/lv_gc.h b/lv_misc/lv_gc.h index 72b10fc45ffd..38090f044e88 100644 --- a/lv_misc/lv_gc.h +++ b/lv_misc/lv_gc.h @@ -35,6 +35,7 @@ extern "C" { prefix lv_ll_t _lv_drv_ll;\ prefix lv_ll_t _lv_file_ll;\ prefix lv_ll_t _lv_anim_ll;\ + prefix lv_ll_t _lv_group_ll;\ prefix void * _lv_def_scr;\ prefix void * _lv_act_scr;\ prefix void * _lv_top_layer;\ diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 1b192af62004..b27e035a7101 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -85,6 +85,11 @@ void lv_theme_set_current(lv_theme_t * th) /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); + +#if USE_LV_GROUP + lv_group_report_style_mod(NULL); +#endif + #endif } From 3c7b6ae94cfa8a739133fc9d992f63f0b0c4c5bb Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 15 Feb 2019 08:59:53 +0100 Subject: [PATCH 026/590] copy default style modifiers to all themes --- lv_themes/lv_theme_alien.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_default.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_material.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_mono.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_nemo.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_night.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_templ.c | 47 +++++++++++++++++++++++++++++++++++ lv_themes/lv_theme_zen.c | 47 +++++++++++++++++++++++++++++++++++ 8 files changed, 376 insertions(+) diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index e660c9dba73b..2babbb1e3fb2 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -806,6 +806,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -862,6 +906,9 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index f16e47a9d477..cc6dd3d609c3 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -355,6 +355,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -406,6 +450,9 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index d59b781f191d..5912f826fb94 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -785,6 +785,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -843,6 +887,9 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index babfc499884e..5ed43c209648 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -412,6 +412,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -467,6 +511,9 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index c10fc303f7da..8d62e2e83476 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -781,6 +781,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -836,6 +880,9 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 00be1dae2220..abbbc493cd46 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -695,6 +695,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -753,6 +797,9 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 906ec52a2831..8cbb1b307874 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -364,6 +364,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -419,6 +463,9 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 769032d5a572..da7ac37db4e6 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -758,6 +758,50 @@ static void win_init(void) #endif } +static void style_mod(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_ORANGE; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 2; +#endif +} + +static void style_mod_edit(lv_style_t * style) +{ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + /********************** * GLOBAL FUNCTIONS **********************/ @@ -816,6 +860,9 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); + theme.group.style_mod = style_mod; + theme.group.style_mod_edit = style_mod_edit; + return &theme; } From f9d8269274e384e9e6f5e375530ac5d687ed113d Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 15 Feb 2019 09:54:47 +0100 Subject: [PATCH 027/590] update theme focus styles --- lv_themes/lv_theme_alien.c | 11 +-------- lv_themes/lv_theme_material.c | 10 ++++---- lv_themes/lv_theme_mono.c | 16 ++----------- lv_themes/lv_theme_nemo.c | 45 ++++++++--------------------------- lv_themes/lv_theme_night.c | 14 +---------- lv_themes/lv_theme_zen.c | 8 +------ 6 files changed, 20 insertions(+), 84 deletions(-) diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 2babbb1e3fb2..90d699d8a41a 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -811,16 +811,7 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 5912f826fb94..2fc54789c8a1 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -790,16 +790,16 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 90, 70); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); + style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 5ed43c209648..982e7703f622 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -417,16 +417,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -439,16 +433,10 @@ static void style_mod_edit(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_GREEN; + style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 8d62e2e83476..b9bd21fc3096 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -784,44 +784,19 @@ static void win_init(void) static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 - /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); -#else - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; -#endif -} - -static void style_mod_edit(lv_style_t * style) -{ -#if LV_COLOR_DEPTH != 1 - /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_GREEN; - - /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); + style->body.border.color = LV_COLOR_SILVER; + style->body.border.opa = LV_OPA_70; + style->body.padding.hor = 0; + style->body.padding.ver = 0; + style->body.shadow.width = LV_DPI / 20; + style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); + style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + style->body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; - style->body.border.width = 3; + style->body.border.width = 2; #endif } @@ -881,7 +856,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) win_init(); theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_edit = style_mod; return &theme; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index abbbc493cd46..ee99285c90a7 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -700,16 +700,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -726,12 +720,6 @@ static void style_mod_edit(lv_style_t * style) /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index da7ac37db4e6..4419ebc6b3f1 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -763,16 +763,10 @@ static void style_mod(lv_style_t * style) #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; - style->body.border.color = LV_COLOR_ORANGE; + style->body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50); /*If not empty or has border then emphasis the border*/ if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; From 5dfac5a92be890d58414df3d0bb319875f24ef7a Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Feb 2019 08:24:51 +0100 Subject: [PATCH 028/590] use memcpy rather than structure assignment, since this might not be supported by all compilers --- lv_themes/lv_theme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index b27e035a7101..4c76cb00ea8e 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -81,7 +81,7 @@ void lv_theme_set_current(lv_theme_t * th) } /*Copy group style modification callback functions*/ - current_theme.group = th->group; + memcpy(¤t_theme.group, &th->group, sizeof(th->group)); /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); From df88e319a8ef76d8bb03b7a4a025584ba91e59e4 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Feb 2019 08:34:41 +0100 Subject: [PATCH 029/590] fixed compilation errors when USE_LV_GROUP == 0 --- lv_themes/lv_theme.c | 2 ++ lv_themes/lv_theme.h | 2 ++ lv_themes/lv_theme_alien.c | 6 ++++++ lv_themes/lv_theme_default.c | 6 ++++++ lv_themes/lv_theme_material.c | 6 ++++++ lv_themes/lv_theme_mono.c | 6 ++++++ lv_themes/lv_theme_nemo.c | 6 ++++++ lv_themes/lv_theme_night.c | 6 ++++++ lv_themes/lv_theme_templ.c | 6 ++++++ lv_themes/lv_theme_zen.c | 6 ++++++ 10 files changed, 52 insertions(+) diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 4c76cb00ea8e..3db5a4cdcdca 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -80,8 +80,10 @@ void lv_theme_set_current(lv_theme_t * th) if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); } +#if USE_LV_GROUP /*Copy group style modification callback functions*/ memcpy(¤t_theme.group, &th->group, sizeof(th->group)); +#endif /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 8d681feae98d..66bbd3d2db7d 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -293,11 +293,13 @@ typedef struct { #endif } style; +#if USE_LV_GROUP struct { lv_group_style_mod_func_t style_mod; lv_group_style_mod_func_t style_mod_edit; } group; +#endif } lv_theme_t; /********************** diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 90d699d8a41a..45f706ee4233 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -806,6 +806,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -841,6 +843,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -897,8 +901,10 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index cc6dd3d609c3..3a65455d447b 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -355,6 +355,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -399,6 +401,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -450,8 +454,10 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 2fc54789c8a1..812dfd362aee 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -785,6 +785,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -829,6 +831,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -887,8 +891,10 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 982e7703f622..25ce93f89088 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -412,6 +412,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -444,6 +446,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -499,8 +503,10 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index b9bd21fc3096..5550a5352366 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -781,6 +781,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -800,6 +802,8 @@ static void style_mod(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -855,8 +859,10 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod; +#endif return &theme; } diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index ee99285c90a7..047c811a603e 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -695,6 +695,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -727,6 +729,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -785,8 +789,10 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 8cbb1b307874..46f3793b7e14 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -364,6 +364,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -408,6 +410,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -463,8 +467,10 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 4419ebc6b3f1..c55e8c8de4d4 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -758,6 +758,8 @@ static void win_init(void) #endif } +#if USE_LV_GROUP + static void style_mod(lv_style_t * style) { #if LV_COLOR_DEPTH != 1 @@ -796,6 +798,8 @@ static void style_mod_edit(lv_style_t * style) #endif } +#endif /*USE_LV_GROUP*/ + /********************** * GLOBAL FUNCTIONS **********************/ @@ -854,8 +858,10 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); +#if USE_LV_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; +#endif return &theme; } From a6d8d1cbc5303598e84208b92a68cb939f3cc7df Mon Sep 17 00:00:00 2001 From: canardos Date: Tue, 19 Feb 2019 14:56:45 +0800 Subject: [PATCH 030/590] Implement lv_btnm_set_ctrl_map. Update function documentation --- lv_objx/lv_btnm.c | 48 ++++++++++++++++++++++++++++++++++++++++------- lv_objx/lv_btnm.h | 45 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 79 insertions(+), 14 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 62003d414f60..fb6712998291 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -268,6 +268,30 @@ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) lv_obj_invalidate(btnm); } +/** + * Set the button control map (hidden, disabled etc.) for a button matrix. The + * control map array will be copied and so may be deallocated after this + * function returns. + * @param btnm pointer to a button matrix object + * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The + * length of the array and position of the elements must match + * that when the map was set via `lv_btnm_set_map` (i.e. one + * element for each button AND new line). + * The control bits are: + * - bit 5 : 1 = inactive (disabled) + * - bit 4 : 1 = no repeat (on long press) + * - bit 3 : 1 = hidden + * - bit 2..0: Relative width compared to the buttons in the + * same row. [1..7] + */ +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, lv_btn_ctrl_t * ctrl_map) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btn_ctrl_t) * ext->btn_cnt); + + lv_btnm_set_map(btnm, ext->map_p); +} + /** * Set a new callback function for the buttons (It will be called when a button is released) * @param btnm: pointer to button matrix object @@ -348,7 +372,9 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) /** * Show/hide a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to hide/show + * @param btn_idx 0 based index of the button to hide/show. The index must + * match the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param hidden true: hide the button */ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden) @@ -366,7 +392,9 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to enable/disable + * @param btn_idx 0 based index of the button to enable/disable. The index must + * match the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param disabled true: disable the button */ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) @@ -384,7 +412,9 @@ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disa /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param disabled true: disable repeat */ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) @@ -402,7 +432,9 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo /*** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param hidden true: hide the button * @param disabled true: disable the button * @param disable_repeat true: disable repeat @@ -427,10 +459,12 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively * expensive operation. It is recommended that initial width be specified using - * the control characters when calling lv_btnm_set_map and this method only be - * used for dynamic changes. + * the control characters when calling `lv_btnm_set_map` or via + * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param width Relative width compared to the buttons in the same row. [1..7] */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width) { diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index f0abfe550e6e..a60c31720756 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -32,6 +32,9 @@ extern "C" { /*Control byte*/ #define LV_BTNM_CTRL_CODE 0x80 /*The control byte has to begin (if present) with 0b10xxxxxx*/ + /*This is only true when using control chars in calls to */ + /*`lv_btnm_set_map`. These bits are ignored in when calling */ + /*`lv_btnm_set_ctrl_map` */ #define LV_BTNM_CTRL_MASK 0xC0 #define LV_BTNM_WIDTH_MASK 0x07 #define LV_BTNM_HIDE_MASK 0x08 @@ -113,6 +116,24 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); */ void lv_btnm_set_map(lv_obj_t * btnm, const char ** map); +/** + * Set the button control map (hidden, disabled etc.) for a button matrix. The + * control map array will be copied and so may be deallocated after this + * function returns. + * @param btnm pointer to a button matrix object + * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The + * length of the array and position of the elements must match + * that when the map was set via `lv_btnm_set_map` (i.e. one + * element for each button AND new line). + * The control bits are: + * - bit 5 : 1 = inactive (disabled) + * - bit 4 : 1 = no repeat (on long press) + * - bit 3 : 1 = hidden + * - bit 2..0: Relative width compared to the buttons in the + * same row. [1..7] + */ +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, lv_btn_ctrl_t * ctrl_map); + /** * Set a new callback function for the buttons (It will be called when a button is released) * @param btnm: pointer to button matrix object @@ -146,7 +167,9 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); /** * Show/hide a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to hide/show + * @param btn_idx 0 based index of the button to hide/show. The index must + * match the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param hidden true: hide the button */ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden); @@ -154,7 +177,9 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to enable/disable + * @param btn_idx 0 based index of the button to enable/disable. The index must + * match the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param disabled true: disable the button */ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); @@ -162,7 +187,9 @@ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disa /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param disabled true: disable repeat */ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); @@ -170,7 +197,9 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo /*** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param hidden true: hide the button * @param disabled true: disable the button * @param disable_repeat true: disable repeat @@ -181,10 +210,12 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively * expensive operation. It is recommended that initial width be specified using - * the control characters when calling lv_btnm_set_map and this method only be - * used for dynamic changes. + * the control characters when calling `lv_btnm_set_map` or via + * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify + * @param btn_idx 0 based index of the button to modify. The index must match + * the index of the element in the map that was passed to + * `lv_btnm_set_map`. * @param width Relative width compared to the buttons in the same row. [1..7] */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width); From 1b519cd1044112e928a17ed020e7b165232ab74a Mon Sep 17 00:00:00 2001 From: canardos Date: Tue, 19 Feb 2019 15:06:23 +0800 Subject: [PATCH 031/590] Add const qualifier to lv_btnm_set_map / static functions --- lv_objx/lv_btnm.c | 10 +++++----- lv_objx/lv_btnm.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index fb6712998291..c1f8cfcc39fd 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -35,8 +35,8 @@ static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits); const char * cut_ctrl_byte(const char * btn_str); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id); -static void parse_control_bytes(lv_obj_t * btnm, const char ** map); -static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map); +static void parse_control_bytes(const lv_obj_t * btnm, const char ** map); +static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); @@ -153,7 +153,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * Example (practically use octal numbers): "\224abc": "abc" text * with 4 width and no long press. */ -void lv_btnm_set_map(lv_obj_t * btnm, const char ** map) +void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) { if(map == NULL) return; @@ -874,7 +874,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) * @param btnm pointer to button matrix object * @param map_p pointer to a string array */ -static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map) +static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map) { /*Count the buttons in the map*/ uint16_t btn_cnt = 0; @@ -911,7 +911,7 @@ static void allocate_btn_areas_and_controls(lv_obj_t * btnm, const char ** map) * @param btnm pointer to button matrix object * @param map_p pointer to a string array */ -static void parse_control_bytes(lv_obj_t * btnm, const char ** map) +static void parse_control_bytes(const lv_obj_t * btnm, const char ** map) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index a60c31720756..8da2a80065ae 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -114,7 +114,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); * - bit 2..0: button relative width * Example (practically use octal numbers): "\224abc": "abc" text with 4 width and no long press */ -void lv_btnm_set_map(lv_obj_t * btnm, const char ** map); +void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); /** * Set the button control map (hidden, disabled etc.) for a button matrix. The From d5f7f3d51c41e7b81e850162c4425496ad0032ba Mon Sep 17 00:00:00 2001 From: canardos Date: Wed, 20 Feb 2019 03:29:53 +0800 Subject: [PATCH 032/590] Fix incorrect iterators --- lv_objx/lv_btnm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index c1f8cfcc39fd..9ce899bd0671 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -212,7 +212,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /*Count the buttons in a line*/ while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ - unit_cnt += get_button_width(ext->ctrl_bits[btn_cnt]); + unit_cnt += get_button_width(ext->ctrl_bits[btn_i + btn_cnt]); btn_cnt ++; } @@ -235,7 +235,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /* one_unit_w = all_unit_w / unit_cnt * act_unit_w = one_unit_w * button_width * do this two operations but the multiply first to divide a greater number */ - act_unit_w = (all_unit_w * get_button_width(ext->ctrl_bits[i])) / unit_cnt; + act_unit_w = (all_unit_w * get_button_width(ext->ctrl_bits[btn_i])) / unit_cnt; act_unit_w --; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/ /*Always recalculate act_x because of rounding errors */ @@ -251,7 +251,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) act_x + act_unit_w, act_y + btn_h); } - unit_act_cnt += get_button_width(ext->ctrl_bits[i]); + unit_act_cnt += get_button_width(ext->ctrl_bits[btn_i]); i_tot ++; btn_i ++; @@ -624,7 +624,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo } /*Skip hidden buttons*/ - if(button_is_hidden(ext->ctrl_bits[txt_i])) continue; + if(button_is_hidden(ext->ctrl_bits[btn_i])) continue; lv_area_copy(&area_tmp, &ext->button_areas[btn_i]); area_tmp.x1 += area_btnm.x1; @@ -636,7 +636,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo btn_h = lv_area_get_height(&area_tmp); /*Load the style*/ - if(button_is_inactive(ext->ctrl_bits[txt_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); + if(button_is_inactive(ext->ctrl_bits[btn_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); else if(btn_i != ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); else if(btn_i == ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); else if(btn_i != ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); @@ -734,8 +734,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(ext->action && ext->btn_id_pr != LV_BTNM_PR_NONE) { uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); if(txt_i != LV_BTNM_PR_NONE) { - if(button_is_repeat_disabled(ext->ctrl_bits[txt_i]) == false && - button_is_inactive(ext->ctrl_bits[txt_i]) == false) { + if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_pr]) == false && + button_is_inactive(ext->ctrl_bits[ext->btn_id_pr]) == false) { res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); } } @@ -743,7 +743,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { if(ext->btn_id_pr != LV_BTNM_PR_NONE) { uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); - if(button_is_inactive(ext->ctrl_bits[txt_i]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons anf click between the buttons*/ + if(button_is_inactive(ext->ctrl_bits[ext->btn_id_pr]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons and clicks between the buttons*/ if(ext->action) res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); if(res == LV_RES_OK) { From 688cd79a550e058aee0c9ad95cf5043bb7575887 Mon Sep 17 00:00:00 2001 From: canardos Date: Wed, 20 Feb 2019 03:32:37 +0800 Subject: [PATCH 033/590] Update function documentation for clarity --- lv_objx/lv_btnm.c | 20 +++++--------------- lv_objx/lv_btnm.h | 20 +++++--------------- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 9ce899bd0671..18d078dc7f95 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -372,9 +372,7 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) /** * Show/hide a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to hide/show. The index must - * match the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param hidden true: hide the button */ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden) @@ -392,9 +390,7 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to enable/disable. The index must - * match the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param disabled true: disable the button */ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) @@ -412,9 +408,7 @@ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disa /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param disabled true: disable repeat */ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) @@ -432,9 +426,7 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo /*** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param hidden true: hide the button * @param disabled true: disable the button * @param disable_repeat true: disable repeat @@ -462,9 +454,7 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, * the control characters when calling `lv_btnm_set_map` or via * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param width Relative width compared to the buttons in the same row. [1..7] */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width) { diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 8da2a80065ae..daf15d7377e6 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -167,9 +167,7 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); /** * Show/hide a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to hide/show. The index must - * match the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param hidden true: hide the button */ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden); @@ -177,9 +175,7 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to enable/disable. The index must - * match the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param disabled true: disable the button */ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); @@ -187,9 +183,7 @@ void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disa /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param disabled true: disable repeat */ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); @@ -197,9 +191,7 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo /*** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param hidden true: hide the button * @param disabled true: disable the button * @param disable_repeat true: disable repeat @@ -213,9 +205,7 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, * the control characters when calling `lv_btnm_set_map` or via * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. The index must match - * the index of the element in the map that was passed to - * `lv_btnm_set_map`. + * @param btn_idx 0 based index of the button to modify. * @param width Relative width compared to the buttons in the same row. [1..7] */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width); From 8581a249bde2d630de1aef375a56abf6201cb848 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Feb 2019 06:20:29 +0100 Subject: [PATCH 034/590] lv_group_create: inititalize missing fields --- lv_core/lv_group.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 83c22ca76601..16235f32d01e 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -64,6 +64,8 @@ lv_group_t * lv_group_create(void) group->focus_cb = NULL; group->click_focus = 1; group->editing = 0; + group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; + group->wrap = 1; /*Initialize style modification callbacks from current theme*/ refresh_theme(group, lv_theme_get_current()); From fcf1d52e4a9a19d6a2e737b67edb4d6ba6f546db Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Feb 2019 12:55:21 +0100 Subject: [PATCH 035/590] replace lv_lang with more advanced lv_i18n --- lv_conf_templ.h | 2 +- lv_core/lv_i18n.c | 250 +++++++++++++++++++++++++++++++++++++++++++++ lv_core/lv_i18n.h | 104 +++++++++++++++++++ lv_core/lv_lang.c | 117 --------------------- lv_core/lv_lang.h | 74 -------------- lv_core/lv_obj.h | 1 - lv_objx/lv_img.c | 45 +------- lv_objx/lv_img.h | 21 ---- lv_objx/lv_label.c | 45 +------- lv_objx/lv_label.h | 21 ---- lvgl.h | 2 +- 11 files changed, 358 insertions(+), 324 deletions(-) create mode 100644 lv_core/lv_i18n.c create mode 100644 lv_core/lv_i18n.h delete mode 100644 lv_core/lv_lang.c delete mode 100644 lv_core/lv_lang.h diff --git a/lv_conf_templ.h b/lv_conf_templ.h index a4712fea6023..5db47b1eeb71 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -131,7 +131,7 @@ #define USE_LV_GPU 1 /*1: Enable GPU interface*/ #define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define USE_LV_MULTI_LANG 0 /* Number of languages for labels to store (0: to disable this feature)*/ +#define USE_LV_I18N 0 /*1: Enable InternationalizatioN (multi-language) support*/ /*Compiler settings*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c new file mode 100644 index 000000000000..a9a50cef4212 --- /dev/null +++ b/lv_core/lv_i18n.c @@ -0,0 +1,250 @@ +/** + * @file lv_i18n.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_i18n.h" +#if USE_LV_I18N + +#include "lv_obj.h" +#include "../lv_misc/lv_gc.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ +static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id); + +/********************** + * STATIC VARIABLES + **********************/ +static lv_i18n_lang_t ** languages; +static lv_i18n_lang_t * local_lang; + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Set the languages for internationalization + * @param langs pointer to the array of languages. (Last element has to be `NULL`) + */ +void lv_i18n_init(const lv_i18n_lang_t ** langs) +{ + if(langs == NULL) { + LV_LOG_WARN("lv_i18n_init: `langs` can't be NULL"); + return; + } + + if(langs[0] == NULL) { + LV_LOG_WARN("lv_i18n_init: `langs` need to contain at lest one translation"); + return; + } + + languages = langs; + local_lang = langs[0]; /*Automatically select the first language*/ +} + +/** + * Change the localization (language) + * @param lang_code name of the translation to use. E.g. "en_GB" + */ +void lv_i18n_set_local(const char * lang_code) +{ + if(languages == NULL) { + LV_LOG_WARN("lv_i18n_set_local: The languages are not set with lv_i18n_init() yet"); + return; + } + + + uint16_t i; + for(i = 0; languages[i] != NULL; i++) { + if(strcmp(languages[i]->name, lang_code) == 0) break; /*A language has found*/ + } + + /*The language wasn't found*/ + if(languages[i] == NULL) { + LV_LOG_WARN("lv_i18n_set_local: The selected language doesn't found"); + return; + } + + local_lang = languages[i]; + + LV_LOG_INFO("lv_i18n_set_local: new local selected") +} + +/** + * Get the translation from a message ID + * @param msg_id message ID + * @return the translation of `msg_id` on the set local + */ +const void * lv_i18n_get_text(const char * msg_id) +{ + if(local_lang == NULL) { + LV_LOG_WARN("lv_i18n_get_text: No language selected"); + return msg_id; + } + + lv_i18n_lang_t * lang = local_lang; + + if(lang->simple == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text: No translations are specified on the current local. Fallback to the default language"); + lang = languages[0]; + } + + if(lang->simple == NULL) { + LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); + return msg_id; + } + } + + /*Find the translation*/ + const void * txt = lv_i18n_get_text_core(lang->simple, msg_id); + if(txt == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text: No translation found even on the default language"); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text: No translation found on this language. Fallback to the default language"); + lang = languages[0]; + } + } + + /*Try again with the default language*/ + if(lang->simple == NULL) { + LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); + return msg_id; + } + + txt = lv_i18n_get_text_core(lang->simple, msg_id); + if(txt == NULL) { + LV_LOG_WARN("lv_i18n_get_text: No translation found even on the default language"); + return msg_id; + } + + return txt; +} + +/** + * Get the translation from a message ID and apply the language's plural rule to get correct form + * @param msg_id message ID + * @param num an integer to select the correct plural form + * @return the translation of `msg_id` on the set local + */ +const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) +{ + if(local_lang == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); + return msg_id; + } + + lv_i18n_lang_t * lang = local_lang; + if(lang->plurals == NULL || lang->plural_rule == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined for the language. Fallback to the default language"); + lang = languages[0]; + } + + if(lang->plurals == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined even on the default language"); + return msg_id; + } + } + + lv_i18n_plural_type_t ptype = lang->plural_rule(num); + + if(lang->plurals[ptype] == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural:No translations of the required plural form for the language. Fallback to the default language"); + lang = languages[0]; + } + } + + /*Find the translation*/ + const void * txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); + if(txt == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found on this language. Fallback to the default language"); + lang = languages[0]; + } + } + + /*Try again with the default language*/ + if(lang->plurals == NULL || lang->plural_rule == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); + return msg_id; + } + + ptype = lang->plural_rule(num); + if(lang->plurals[ptype] == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); + return msg_id; + } + + txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); + + if(txt == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); + return msg_id; + } + + return txt; +} + +/** + * Get the name of the currently used localization. + * @return name of the currently used localization. E.g. "en_GB" + */ +const void * lv_i18n_get_current_local(void) +{ + if(local_lang) return local_lang->name; + else return NULL; +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id) +{ + uint16_t i; + for(i = 0; trans[i].msg_id != NULL; i++) { + if(strcmp(trans[i].msg_id, msg_id) == 0) { + /*The msg_id has found. Check the translation*/ + if(trans[i].txt_trans) return trans[i].txt_trans; + } + } + + LV_LOG_TRACE("lv_i18n_get_text_core: `msg_id` wasn't found"); + return NULL; + +} + +#endif /*USE_LV_I18N*/ diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h new file mode 100644 index 000000000000..25a6e7f2103d --- /dev/null +++ b/lv_core/lv_i18n.h @@ -0,0 +1,104 @@ +/** + * @file lv_lang.h + * + */ + +#ifndef LV_I18N_H +#define LV_I18N_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + +#if USE_LV_I18N + +#include + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +typedef enum { + LV_I18N_PLURAL_TYPE_ZERO, + LV_I18N_PLURAL_TYPE_ONE, + LV_I18N_PLURAL_TYPE_TWO, + LV_I18N_PLURAL_TYPE_FEW, + LV_I18N_PLURAL_TYPE_MANY, + LV_I18N_PLURAL_TYPE_OTHER, + _LV_I18N_PLURAL_TYPE_NUM, +}lv_i18n_plural_type_t; + +typedef struct { + const char * msg_id; + const char * txt_trans; +}lv_i18n_trans_t; + + +typedef struct { + const char * name; /*E.g. "en_GB"*/ + lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ + lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ + uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ +}lv_i18n_lang_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Set the languages for internationalization + * @param langs pointer to the array of languages. (Last element has to be `NULL`) + */ +void lv_i18n_init(const lv_i18n_lang_t ** langs); + +/** + * Change the localization (language) + * @param lang_code name of the translation to use. E.g. "en_GB" + */ +void lv_i18n_set_local(const char * lang_code); + +/** + * Get the translation from a message ID + * @param msg_id message ID + * @return the translation of `msg_id` on the set local + */ +const void * lv_i18n_get_text(const char * msg_id); + +/** + * Get the translation from a message ID and apply the language's plural rule to get correct form + * @param msg_id message ID + * @param num an integer to select the correct plural form + * @return the translation of `msg_id` on the set local + */ +const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num); + +/** + * Get the name of the currently used localization. + * @return name of the currently used localization. E.g. "en_GB" + */ +const void * lv_i18n_get_current_local(void); + +/********************** + * MACROS + **********************/ + +#endif /*USE_LV_I18N*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_LANG_H*/ diff --git a/lv_core/lv_lang.c b/lv_core/lv_lang.c deleted file mode 100644 index c96ed7883647..000000000000 --- a/lv_core/lv_lang.c +++ /dev/null @@ -1,117 +0,0 @@ -/** - * @file lv_lang.c - * - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_lang.h" -#if USE_LV_MULTI_LANG - -#include "lv_obj.h" -#include "../lv_misc/lv_gc.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ -static void lang_set_core(lv_obj_t * obj); - -/********************** - * STATIC VARIABLES - **********************/ -static uint8_t lang_act = 0; -static const void * (*get_txt)(uint16_t); - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Change the language - * @param lang_id the id of the - */ -void lv_lang_set(uint8_t lang_id) -{ - lang_act = lang_id; - - lv_obj_t * i; - LL_READ(LV_GC_ROOT(_lv_scr_ll), i) { - i->signal_func(i, LV_SIGNAL_LANG_CHG, NULL); - - lang_set_core(i); - } - - lang_set_core(lv_scr_act()); -} - -/** - * Set a function to get the texts of the set languages from a `txt_id` - * @param fp a function pointer to get the texts - */ -void lv_lang_set_text_func(const void * (*fp)(uint16_t)) -{ - get_txt = fp; -} - -/** - * Use the function set by `lv_lang_set_text_func` to get the `txt_id` text in the set language - * @param txt_id an ID of the text to get - * @return the `txt_id` txt on the set language - */ -const void * lv_lang_get_text(uint16_t txt_id) -{ - if(get_txt == NULL) { - LV_LOG_WARN("lv_lang_get_text: text_func is not specified"); - return NULL; /*No text_get function specified */ - } - if(txt_id == LV_LANG_TXT_ID_NONE) { - LV_LOG_WARN("lv_lang_get_text: attempts to get invalid text ID"); - return NULL; /*Invalid txt_id*/ - } - - return get_txt(txt_id); -} - - -/** - * Return with ID of the currently selected language - * @return pointer to the active screen object (loaded by 'lv_scr_load()') - */ -uint8_t lv_lang_act(void) -{ - return lang_act; -} - - -/********************** - * STATIC FUNCTIONS - **********************/ - -/** - * Change the language of the children. (Called recursively) - * @param obj pointer to an object - */ -static void lang_set_core(lv_obj_t * obj) -{ - lv_obj_t * i; - LL_READ(obj->child_ll, i) { - i->signal_func(i, LV_SIGNAL_LANG_CHG, NULL); - - lang_set_core(i); - } -} - -#endif /*USE_LV_MULTI_LANG*/ diff --git a/lv_core/lv_lang.h b/lv_core/lv_lang.h deleted file mode 100644 index 5d76f647fedd..000000000000 --- a/lv_core/lv_lang.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @file lv_lang.h - * - */ - -#ifndef LV_LANG_H -#define LV_LANG_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../lv_conf.h" -#endif - -#if USE_LV_MULTI_LANG - -#include - -/********************* - * DEFINES - *********************/ -#define LV_LANG_TXT_ID_NONE 0xFFFF /*Used to not assign any text IDs for a multi-language object.*/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/** - * Change the language - * @param lang_id the id of the - */ -void lv_lang_set(uint8_t lang_id); - -/** - * Set a function to get the texts of the set languages from a `txt_id` - * @param fp a function pointer to get the texts - */ -void lv_lang_set_text_func(const void * (*fp)(uint16_t)); - -/** - * Use the function set by `lv_lang_set_text_func` to get the `txt_id` text in the set language - * @param txt_id an ID of the text to get - * @return the `txt_id` txt on the set language - */ -const void * lv_lang_get_text(uint16_t txt_id); - -/** - * Return with ID of the currently selected language - * @return pointer to the active screen object (loaded by 'lv_scr_load()') - */ -uint8_t lv_lang_act(void); - -/********************** - * MACROS - **********************/ - -#endif /*USE_LV_MULTI_LANG*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*LV_LANG_H*/ diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index cfd8a8ac3892..37e9a00c797a 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -91,7 +91,6 @@ enum LV_SIGNAL_CORD_CHG, LV_SIGNAL_STYLE_CHG, LV_SIGNAL_REFR_EXT_SIZE, - LV_SIGNAL_LANG_CHG, LV_SIGNAL_GET_TYPE, _LV_SIGNAL_FEEDBACK_SECTION_START, diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index c9fb42875e53..e308437a0d4a 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -14,7 +14,7 @@ #error "lv_img: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " #endif -#include "../lv_core/lv_lang.h" +#include "../lv_core/lv_i18n.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_ufs.h" @@ -78,9 +78,6 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) ext->w = lv_obj_get_width(new_img); ext->h = lv_obj_get_height(new_img); ext->auto_size = 1; -#if USE_LV_MULTI_LANG - ext->lang_txt_id = LV_LANG_TXT_ID_NONE; -#endif /*Init the new object*/ lv_obj_set_signal_func(new_img, lv_img_signal); @@ -206,22 +203,6 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) lv_obj_invalidate(img); } -#if USE_LV_MULTI_LANG -/** - * Set an ID which means a the same source but in different languages - * @param img pointer to an image object - * @param src_id ID of the source - */ -void lv_img_set_src_id(lv_obj_t * img, uint32_t src_id) -{ - lv_img_ext_t * ext = lv_obj_get_ext_attr(img); - ext->lang_txt_id = src_id; - - /*Apply the new language*/ - img->signal_func(img, LV_SIGNAL_LANG_CHG, NULL); -} -#endif - /** * Enable the auto size feature. * If enabled the object size will be same as the picture size. @@ -266,19 +247,6 @@ const char * lv_img_get_file_name(const lv_obj_t * img) else return ""; } -#if USE_LV_MULTI_LANG -/** - * Get the source ID of the image. (Used by the multi-language feature) - * @param img pointer to an image - * @return ID of the source - */ -uint16_t lv_img_get_src_id(lv_obj_t * img) -{ - lv_img_ext_t * ext = lv_obj_get_ext_attr(img); - return ext->lang_txt_id; -} -#endif - /** * Get the auto size enable attribute * @param img pointer to an image @@ -382,17 +350,6 @@ static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param) lv_img_set_src(img, ext->src); } - } else if(sign == LV_SIGNAL_LANG_CHG) { -#if USE_LV_MULTI_LANG - if(ext->lang_txt_id != LV_LANG_TXT_ID_NONE) { - const char * lang_src = lv_lang_get_text(ext->lang_txt_id); - if(lang_src) { - lv_img_set_src(img, lang_src); - } else { - LV_LOG_WARN("lv_lang_get_text return NULL for an image's source"); - } - } -#endif } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 8ee86167925f..86c2170b9487 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -43,9 +43,6 @@ typedef struct lv_coord_t w; /*Width of the image (Handled by the library)*/ lv_coord_t h; /*Height of the image (Handled by the library)*/ -#if USE_LV_MULTI_LANG - uint16_t lang_txt_id; /*The ID of the image to display. */ -#endif uint8_t src_type :2; /*See: lv_img_src_t*/ uint8_t auto_size :1; /*1: automatically set the object size to the image size*/ uint8_t cf :5; /*Color format from `lv_img_color_format_t`*/ @@ -74,15 +71,6 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy); */ void lv_img_set_src(lv_obj_t * img, const void * src_img); -#if USE_LV_MULTI_LANG -/** - * Set an ID which means a the same source but on different languages - * @param img pointer to an image object - * @param src_id ID of the source - */ -void lv_img_set_src_id(lv_obj_t * img, uint32_t txt_id); -#endif - /** * Obsolete since v5.1. Just for compatibility with v5.0. Will be removed in v6.0. * Use 'lv_img_set_src()' instead. @@ -142,15 +130,6 @@ const void * lv_img_get_src(lv_obj_t * img); */ const char * lv_img_get_file_name(const lv_obj_t * img); -#if USE_LV_MULTI_LANG -/** - * Get the source ID of the image. (Used by the multi-language feature) - * @param img pointer to an image - * @return ID of the source - */ -uint16_t lv_img_get_src_id(lv_obj_t * img); -#endif - /** * Get the auto size enable attribute * @param img pointer to an image diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index 1ef781cafb27..a0d1963d33a4 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -11,7 +11,7 @@ #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" -#include "../lv_core/lv_lang.h" +#include "../lv_core/lv_i18n.h" #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_math.h" @@ -91,9 +91,6 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_speed = LV_LABEL_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; -#if USE_LV_MULTI_LANG - ext->lang_txt_id = LV_LANG_TXT_ID_NONE; -#endif lv_obj_set_design_func(new_label, lv_label_design); lv_obj_set_signal_func(new_label, lv_label_signal); @@ -237,22 +234,6 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text) lv_label_refr_text(label); } -#if USE_LV_MULTI_LANG -/** - *Set a text ID which refers a the same text but in a different languages - * @param label pointer to a label object - * @param txt_id ID of the text - */ -void lv_label_set_text_id(lv_obj_t * label, uint32_t txt_id) -{ - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - ext->lang_txt_id = txt_id; - - /*Apply the new language*/ - label->signal_func(label, LV_SIGNAL_LANG_CHG, NULL); -} -#endif - /** * Set the behavior of the label with longer text then the object size * @param label pointer to a label object @@ -365,19 +346,6 @@ char * lv_label_get_text(const lv_obj_t * label) return ext->text; } -#if USE_LV_MULTI_LANG -/** - * Get the text ID of the label. (Used by the multi-language feature) - * @param label pointer to a label object - * @return ID of the text - */ -uint16_t lv_label_get_text_id(lv_obj_t * label) -{ - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - return ext->lang_txt_id; -} -#endif - /** * Get the long mode of a label * @param label pointer to a label object @@ -753,17 +721,6 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.hor); label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.ver); } - } else if(sign == LV_SIGNAL_LANG_CHG) { -#if USE_LV_MULTI_LANG - if(ext->lang_txt_id != LV_LANG_TXT_ID_NONE) { - const char * lang_txt = lv_lang_get_text(ext->lang_txt_id); - if(lang_txt) { - lv_label_set_text(label, lang_txt); - } else { - LV_LOG_WARN("lv_lang_get_text return NULL for a label's text"); - } - } -#endif } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index a2ee1268478a..84f5b5e5a82f 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -69,9 +69,6 @@ typedef struct char dot_tmp[LV_LABEL_DOT_NUM * 4 + 1]; /*Store the character which are replaced by dots (Handled by the library)*/ #endif -#if USE_LV_MULTI_LANG - uint16_t lang_txt_id; /*The ID of the text to display*/ -#endif uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ @@ -123,15 +120,6 @@ void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size */ void lv_label_set_static_text(lv_obj_t * label, const char * text); -/** - *Set a text ID which means a the same text but on different languages - * @param label pointer to a label object - * @param txt_id ID of the text - */ -#if USE_LV_MULTI_LANG -void lv_label_set_text_id(lv_obj_t * label, uint32_t txt_id); -#endif - /** * Set the behavior of the label with longer text then the object size * @param label pointer to a label object @@ -188,15 +176,6 @@ static inline void lv_label_set_style(lv_obj_t *label, lv_style_t *style) */ char * lv_label_get_text(const lv_obj_t * label); -#if USE_LV_MULTI_LANG -/** - * Get the text ID of the label. (Used by the multi-language feature) - * @param label pointer to a label object - * @return ID of the text - */ -uint16_t lv_label_get_text_id(lv_obj_t * label); -#endif - /** * Get the long mode of a label * @param label pointer to a label object diff --git a/lvgl.h b/lvgl.h index 2d0dd560d361..967d94f9dd04 100644 --- a/lvgl.h +++ b/lvgl.h @@ -23,7 +23,7 @@ extern "C" { #include "lv_core/lv_obj.h" #include "lv_core/lv_group.h" -#include "lv_core/lv_lang.h" +#include "lv_core/lv_i18n.h" #include "lv_core/lv_vdb.h" #include "lv_core/lv_refr.h" From 236f9291be9f044abbb0bd14a837ee24749bd989 Mon Sep 17 00:00:00 2001 From: manison Date: Wed, 20 Feb 2019 17:08:38 +0100 Subject: [PATCH 036/590] ta ignores presses generated by keypad input device fixes bug introduced in 4f50a5a: when the LV_SIGNAL_PRESSED is generated by keypad input device (through LV_GROUP_KEY_ENTER key), it does not carry information about position (the position information is overlayed with key information in lv_indev_proc_t struct in this case), so we cannot touch it --- lv_objx/lv_ta.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 6ec094b7d157..c7d66dc450f5 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1470,9 +1470,12 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_so lv_obj_get_coords(ext->label, &label_coords); + lv_point_t point_act; + lv_indev_get_point(click_source, &point_act); + if(point_act.x < 0 || point_act.y < 0) return; /*Ignore event from keypad*/ lv_point_t relative_position; - relative_position.x = click_source->proc.act_point.x - label_coords.x1; - relative_position.y = click_source->proc.act_point.y - label_coords.y1; + relative_position.x = point_act.x - label_coords.x1; + relative_position.y = point_act.y - label_coords.y1; lv_coord_t label_width = lv_obj_get_width(ext->label); From 030fe60b34129d2faf2cdb3b5d4bc7a829283eac Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Feb 2019 23:58:13 +0100 Subject: [PATCH 037/590] multi-disp: API updates --- README.md | 21 +++-- lv_core/lv_core.mk | 2 +- lv_core/lv_disp.c | 74 ++++++++++++++--- lv_core/lv_disp.h | 35 ++++++-- lv_core/lv_indev.c | 59 +++++++------- lv_core/lv_obj.c | 98 ++++------------------ lv_core/lv_obj.h | 40 ++------- lv_core/lv_refr.c | 76 ++++++----------- lv_core/lv_refr.h | 14 ---- lv_draw/lv_draw.mk | 3 +- lv_draw/lv_draw_basic.c | 32 ++++---- lv_hal/lv_hal_disp.c | 136 +++++++++++++++++++++---------- lv_hal/lv_hal_disp.h | 119 +++++++++++++++++++++------ lv_hal/lv_hal_indev.c | 11 +-- lv_hal/lv_hal_indev.h | 26 +++--- lv_objx/lv_win.c | 3 +- lv_porting/lv_port_disp_templ.c | 96 ++++++++++------------ lv_porting/lv_port_indev_templ.c | 34 ++++---- lv_version.h | 6 +- 19 files changed, 469 insertions(+), 416 deletions(-) diff --git a/README.md b/README.md index cb9a005275e5..6bfd28d7ddfb 100644 --- a/README.md +++ b/README.md @@ -72,24 +72,31 @@ In the most simple case you need to do these steps: 1. Copy `lv_conf_templ.h` as `lv_conf.h` next to `lvgl` and set at least `LV_HOR_RES`, `LV_VER_RES` and `LV_COLOR_DEPTH`. 2. Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10) 3. Call `lv_init()` -4. Register a function which can **copy a pixel array** to an area of the screen: +4. Create a buffer for LittlevGL +```c +static lv_disp_buf_t disp_buf; +static lv_color_t buf[LV_HOR_RES_MAX * 10]; /*Declare a buffer for 10 lines*/ +v_disp_buf_init(&disp_buf1, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/ +``` +4. Implement and register a function which can **copy a pixel array** to an area of your diplay: ```c lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ lv_disp_drv_init(&disp_drv); /*Basic initialization*/ -disp_drv.disp_flush = disp_flush; /*Set your driver function*/ +disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/ +disp_drv.buffer = &disp_buf; /*Assign the buffer to teh display*/ lv_disp_drv_register(&disp_drv); /*Finally register the driver*/ -void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p) +void my_disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p) { int32_t x, y; - for(y = y1; y <= y2; y++) { - for(x = x1; x <= x2; x++) { - sep_pixel(x, y, *color_p); /* Put a pixel to the display.*/ + for(y = area->y1; y <= area->y2; y++) { + for(x = area->x1; x <= area->x2; x++) { + set_pixel(x, y, *color_p); /* Put a pixel to the display.*/ color_p++; } } - lv_flush_ready(); /* Tell you are ready with the flushing*/ + lv_disp_flush_ready(disp); /* Tell you are ready with the flushing*/ } ``` diff --git a/lv_core/lv_core.mk b/lv_core/lv_core.mk index 9992e3fe72ed..ac69f25e3079 100644 --- a/lv_core/lv_core.mk +++ b/lv_core/lv_core.mk @@ -1,9 +1,9 @@ CSRCS += lv_group.c CSRCS += lv_indev.c +CSRCS += lv_disp.c CSRCS += lv_obj.c CSRCS += lv_refr.c CSRCS += lv_style.c -CSRCS += lv_vdb.c CSRCS += lv_lang.c DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_core diff --git a/lv_core/lv_disp.c b/lv_core/lv_disp.c index 6017ba27cf1c..dc4578d17e25 100644 --- a/lv_core/lv_disp.c +++ b/lv_core/lv_disp.c @@ -33,34 +33,82 @@ **********************/ /** - * Get the number of areas in the buffer - * @return number of invalid areas + * Return with a pointer to the active screen + * @param disp pointer to display which active screen should be get. (NULL to use the default screen) + * @return pointer to the active screen object (loaded by 'lv_scr_load()') */ -uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp) +lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp) { - return disp->inv_p; + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_scr_act: no display registered to get its top layer"); + return NULL; + } + + return disp->act_scr; } /** - * Pop (delete) the last 'num' invalidated areas from the buffer - * @param num number of areas to delete + * Make a screen active + * @param scr pointer to a screen */ -void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) +void lv_disp_set_scr_act(lv_obj_t * scr) { + lv_disp_t * d = lv_obj_get_disp(scr); + + d->act_scr = scr; - if(disp->inv_p < num) disp->inv_p = 0; - else disp->inv_p -= num; + lv_obj_invalidate(scr); } -void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) +/** + * Return with the top layer. (Same on every screen and it is above the normal screen layer) + * @param disp pointer to display which top layer should be get. (NULL to use the default screen) + * @return pointer to the top layer object (transparent screen sized lv_obj) + */ +lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp) +{ + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_layer_top: no display registered to get its top layer"); + return NULL; + } + + return disp->top_layer; +} + +/** + * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) + * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen) + * @return pointer to the sys layer object (transparent screen sized lv_obj) + */ +lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp) { - lv_disp_t * old_disp = lv_scr_get_disp(scr); + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_layer_sys: no display registered to get its top layer"); + return NULL; + } - if(old_disp == disp) { - LV_LOG_WARN("lv_disp_assign_screen: tried to assign to the same screen") + return disp->sys_layer; +} + +/** + * Assign a screen to a display. + * @param disp pointer to a display where to assign the screen + * @param scr pointer to a screen object to assign + */ +void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) +{ + if(lv_obj_get_parent(scr) != NULL) { + LV_LOG_WARN("lv_disp_assign_screen: try to assign a non-screen object"); return; } + lv_disp_t * old_disp = lv_obj_get_disp(scr); + + if(old_disp == disp) return; + lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr); } diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index 62690f551b6f..def7bceed30c 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -27,19 +27,40 @@ extern "C" { /********************** * GLOBAL PROTOTYPES **********************/ -void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); /** - * Get the number of areas in the buffer - * @return number of invalid areas + * Return with a pointer to the active screen + * @param disp pointer to display which active screen should be get. (NULL to use the default screen) + * @return pointer to the active screen object (loaded by 'lv_scr_load()') + */ +lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp); + +/** + * Make a screen active + * @param scr pointer to a screen */ -uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp); +void lv_disp_set_scr_act(lv_obj_t * scr); /** - * Pop (delete) the last 'num' invalidated areas from the buffer - * @param num number of areas to delete + * Return with the top layer. (Same on every screen and it is above the normal screen layer) + * @param disp pointer to display which top layer should be get. (NULL to use the default screen) + * @return pointer to the top layer object (transparent screen sized lv_obj) */ -void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num); +lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp); + +/** + * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) + * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen) + * @return pointer to the sys layer object (transparent screen sized lv_obj) + */ +lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp); + +/** + * Assign a screen to a display. + * @param disp pointer to a display where to assign the screen + * @param scr pointer to a screen object to assign + */ +void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); /********************** * MACROS diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 01d1f03cecdb..989277c64549 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -126,12 +126,12 @@ void lv_indev_reset_lpr(lv_indev_t * indev) void lv_indev_enable(lv_hal_indev_type_t type, bool enable) { -// lv_indev_t * i = lv_indev_next(NULL); -// -// while(i) { -// if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0; -// i = lv_indev_next(i); -// } + lv_indev_t * i = lv_indev_next(NULL); + + while(i) { + if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0; + i = lv_indev_next(i); + } } /** @@ -144,7 +144,7 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) if(indev->driver.type != LV_INDEV_TYPE_POINTER) return; indev->cursor = cur_obj; - lv_obj_set_parent(indev->cursor, lv_layer_sys(indev->driver.disp)); + lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y); } @@ -250,22 +250,19 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev) { - //TODO -// uint32_t t; -// -// if(indev) return t = lv_tick_elaps(indev->last_activity_time); -// -// lv_indev_t * i; -// t = UINT16_MAX; -// i = lv_indev_next(NULL); -// while(i) { -// t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time)); -// i = lv_indev_next(i); -// } -// -// return t; - - return 0; + uint32_t t; + + if(indev) return t = lv_tick_elaps(indev->last_activity_time); + + lv_indev_t * i; + t = UINT16_MAX; + i = lv_indev_next(NULL); + while(i) { + t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time)); + i = lv_indev_next(i); + } + + return t; } /** @@ -547,8 +544,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) { - i->proc.act_point.x = i->btn_points[data->btn].x; - i->proc.act_point.y = i->btn_points[data->btn].y; + i->proc.act_point.x = i->btn_points[data->btn_id].x; + i->proc.act_point.y = i->btn_points[data->btn_id].y; /*Still the same point is pressed*/ if(i->proc.last_point.x == i->proc.act_point.x && @@ -586,16 +583,16 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is no last object then search*/ if(proc->act_obj == NULL) { - pr_obj = indev_search_obj(proc, lv_layer_sys(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_layer_top(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act(disp)); + pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If there is last object but it is not dragged and not protected also search*/ else if(proc->drag_in_prog == 0 && lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now act_obj != NULL*/ - pr_obj = indev_search_obj(proc, lv_layer_sys(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_layer_top(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act(disp)); + pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); + if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If a dragable or a protected object was the last then keep it*/ else { diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 59c3d2c0f0bb..16798ff87441 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -10,6 +10,7 @@ #include "lv_indev.h" #include "lv_refr.h" #include "lv_group.h" +#include "lv_disp.h" #include "../lv_themes/lv_theme.h" #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_anim.h" @@ -356,7 +357,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Remove the object from parent's children list*/ lv_obj_t * par = lv_obj_get_parent(obj); if(par == NULL) { /*It is a screen*/ - lv_disp_t * d = lv_scr_get_disp(obj); + lv_disp_t * d = lv_obj_get_disp(obj); lv_ll_rem(&d->scr_ll, obj); } else { lv_ll_rem(&(par->child_ll), obj); @@ -415,10 +416,10 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*Invalidate the object only if it belongs to the 'LV_GC_ROOT(_lv_act_scr)'*/ lv_obj_t * obj_scr = lv_obj_get_screen(obj); - lv_disp_t * disp = lv_scr_get_disp(obj_scr); - if(obj_scr == lv_scr_act(disp) || - obj_scr == lv_layer_top(disp)|| - obj_scr == lv_layer_sys(disp)) { + lv_disp_t * disp = lv_obj_get_disp(obj_scr); + if(obj_scr == lv_disp_get_scr_act(disp) || + obj_scr == lv_disp_get_layer_top(disp)|| + obj_scr == lv_disp_get_layer_sys(disp)) { /*Truncate recursively to the parents*/ lv_area_t area_trunc; lv_obj_t * par = lv_obj_get_parent(obj); @@ -449,23 +450,6 @@ void lv_obj_invalidate(const lv_obj_t * obj) * Setter functions *====================*/ - -/*-------------- - * Screen set - *--------------*/ -/** - * Load a new screen - * @param scr pointer to a screen - */ -void lv_scr_load(lv_obj_t * scr) -{ - lv_disp_t * d = lv_scr_get_disp(scr); - - d->act_scr = scr; - - lv_obj_invalidate(scr); -} - /*-------------------- * Parent/children set *--------------------*/ @@ -1302,55 +1286,6 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 * Getter functions *======================*/ -/*------------------ - * Screen get - *-----------------*/ - -/** - * Return with a pointer to the active screen - * @return pointer to the active screen object (loaded by 'lv_scr_load()') - */ -lv_obj_t * lv_scr_act(lv_disp_t * disp) -{ - if(!disp) disp = lv_disp_get_default(); - if(!disp) { - LV_LOG_WARN("lv_scr_act: no display registered to get its top layer"); - return NULL; - } - - return disp->act_scr; -} - -/** - * Return with the top layer. (Same on every screen and it is above the normal screen layer) - * @return pointer to the top layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_top(lv_disp_t * disp) -{ - if(!disp) disp = lv_disp_get_default(); - if(!disp) { - LV_LOG_WARN("lv_layer_top: no display registered to get its top layer"); - return NULL; - } - - return disp->top_layer; -} - -/** - * Return with the sys. layer. (Same on every screen and it is above the normal screen layer) - * @return pointer to the sys layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_sys(lv_disp_t * disp) -{ - if(!disp) disp = lv_disp_get_default(); - if(!disp) { - LV_LOG_WARN("lv_layer_sys: no display registered to get its top layer"); - return NULL; - } - - return disp->sys_layer; -} - /** * Return with the screen of an object * @param obj pointer to an object @@ -1369,10 +1304,19 @@ lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj) return (lv_obj_t *)act_p; } -lv_disp_t * lv_scr_get_disp(lv_obj_t * scr) +/** + * Get the display of an object + * @param scr pointer to an object + * @return pointer the object's display + */ +lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) { - lv_disp_t * d; + const lv_obj_t * scr; + if(obj->par == NULL) scr = obj; /*`obj` is a screen*/ + else scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/ + + lv_disp_t * d; LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { lv_obj_t * s; LL_READ(d->scr_ll, s) { @@ -1384,14 +1328,6 @@ lv_disp_t * lv_scr_get_disp(lv_obj_t * scr) return NULL; } - - -lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) -{ - lv_obj_t * scr = lv_obj_get_screen(obj); - return lv_scr_get_disp(scr); -} - /*--------------------- * Parent/children get *--------------------*/ diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 29f3ac9dd451..ca4380c0bbb5 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -261,16 +261,6 @@ void lv_obj_invalidate(const lv_obj_t * obj); * Setter functions *====================*/ -/*-------------- - * Screen set - *--------------*/ - -/** - * Load a new screen - * @param scr pointer to a screen - */ -void lv_scr_load(lv_obj_t * scr); - /*-------------------- * Parent/children set *--------------------*/ @@ -540,28 +530,6 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 * Getter functions *======================*/ -/*------------------ - * Screen get - *-----------------*/ - -/** - * Return with a pointer to the active screen - * @return pointer to the active screen object (loaded by 'lv_scr_load()') - */ -lv_obj_t * lv_scr_act(lv_disp_t * disp); - -/** - * Return with the top layer. (Same on every screen and it is above the normal screen layer) - * @return pointer to the top layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_top(lv_disp_t * disp); - -/** - * Return with the sys. layer. (Same on every screen and it is above the normal screen layer) - * @return pointer to the sys layer object (transparent screen sized lv_obj) - */ -lv_obj_t * lv_layer_sys(lv_disp_t * disp); - /** * Return with the screen of an object * @param obj pointer to an object @@ -569,9 +537,11 @@ lv_obj_t * lv_layer_sys(lv_disp_t * disp); */ lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); - -lv_disp_t * lv_scr_get_disp(lv_obj_t * scr); - +/** + * Get the display of an object + * @param scr pointer to an object + * @return pointer the object's display + */ lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj); /*--------------------- diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 3f854c1ad462..e665e1a1144e 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -39,8 +39,6 @@ static void lv_refr_vdb_flush(void); /********************** * STATIC VARIABLES **********************/ -static void (*monitor_cb)(uint32_t, uint32_t); /*Monitor the rendering time*/ -static void (*round_cb)(lv_area_t *); /*If set then called to modify invalidated areas for special display controllers*/ static uint32_t px_num; static lv_disp_t * disp_refr; /*Display being refreshed*/ @@ -103,7 +101,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) /*The area is truncated to the screen*/ if(suc != false) { - if(round_cb) round_cb(&com_area); + if(disp_refr->driver.rounder_cb) disp_refr->driver.rounder_cb(disp_refr, &com_area); /*Save only if this area is not in one of the saved areas*/ uint16_t i; @@ -122,29 +120,6 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) } } - -/** - * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels - * @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num)) - * time_ms: refresh time in [ms] - * px_num: not the drawn pixels but the number of affected pixels of the screen - * (more pixels are drawn because of overlapping objects) - */ -void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t)) -{ - monitor_cb = cb; -} - -/** - * Called when an area is invalidated to modify the coordinates of the area. - * Special display controllers may require special coordinate rounding - * @param cb pointer to the a function which will modify the area - */ -void lv_refr_set_round_cb(void(*cb)(lv_area_t *)) -{ - round_cb = cb; -} - /** * Get the display which is being refreshed * @return the display being refreshed @@ -180,8 +155,8 @@ static void lv_refr_task(void * param) /*If refresh happened ...*/ if(disp_refr->inv_p != 0) { /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ - if(lv_disp_is_true_double_buffered(disp_refr)) { - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp_refr); + if(lv_disp_is_true_double_buf(disp_refr)) { + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*Flush the content of the VDB*/ lv_refr_vdb_flush(); @@ -194,16 +169,17 @@ static void lv_refr_task(void * param) uint8_t * buf_act = (uint8_t *) vdb->buf_act; uint8_t * buf_ina = (uint8_t *) vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; + lv_coord_t hres = lv_disp_get_hor_res(disp_refr); uint16_t a; for(a = 0; a < disp_refr->inv_p; a++) { if(disp_refr->inv_area_joined[a] == 0) { lv_coord_t y; - uint32_t start_offs = ((disp_refr->driver.hor_res * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * LV_VDB_PX_BPP) >> 3; - uint32_t line_length = (lv_area_get_width(&disp_refr->inv_areas[a]) * LV_VDB_PX_BPP) >> 3; + uint32_t start_offs = (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t); + uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); - start_offs += (LV_HOR_RES * LV_VDB_PX_BPP) >> 3; + start_offs += hres * sizeof(lv_color_t); } } } @@ -215,8 +191,8 @@ static void lv_refr_task(void * param) disp_refr->inv_p = 0; /*Call monitor cb if present*/ - if(monitor_cb != NULL) { - monitor_cb(lv_tick_elaps(start), px_num); + if(disp_refr->driver.monitor_cb) { + disp_refr->driver.monitor_cb(disp_refr, lv_tick_elaps(start), px_num); } } } @@ -278,7 +254,7 @@ static void lv_refr_areas(void) lv_refr_area(&disp_refr->inv_areas[i]); - if(monitor_cb != NULL) px_num += lv_area_get_size(&disp_refr->inv_areas[i]); + if(disp_refr->driver.monitor_cb) px_num += lv_area_get_size(&disp_refr->inv_areas[i]); } } } @@ -290,17 +266,17 @@ static void lv_refr_areas(void) static void lv_refr_area(const lv_area_t * area_p) { /*True double buffering: there are two screen sized buffers. Just redraw directly into a buffer*/ - if(lv_disp_is_true_double_buffered(disp_refr)) { - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp_refr); + if(lv_disp_is_true_double_buf(disp_refr)) { + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); vdb->area.x1 = 0; - vdb->area.x2 = LV_HOR_RES-1; + vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1; vdb->area.y1 = 0; - vdb->area.y2 = LV_VER_RES - 1; + vdb->area.y2 = lv_disp_get_ver_res(disp_refr) - 1; lv_refr_area_part(area_p); } /*The buffer is smaller: refresh the area in parts*/ else { - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp_refr); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*Calculate the max row num*/ lv_coord_t w = lv_area_get_width(area_p); lv_coord_t h = lv_area_get_height(area_p); @@ -311,7 +287,7 @@ static void lv_refr_area(const lv_area_t * area_p) if(max_row > h) max_row = h; /*Round down the lines of VDB if rounding is added*/ - if(round_cb) { + if(disp_refr->driver.rounder_cb) { lv_area_t tmp; tmp.x1 = 0; tmp.x2 = 0; @@ -321,7 +297,7 @@ static void lv_refr_area(const lv_area_t * area_p) lv_coord_t y_tmp = max_row; do { tmp.y2 = y_tmp; - round_cb(&tmp); + disp_refr->driver.rounder_cb(disp_refr, &tmp); y_tmp --; /*Decrement the number of line until it is rounded to a smaller (or equal) value then the original. */ } while(lv_area_get_height(&tmp) > max_row && y_tmp != 0); @@ -368,10 +344,10 @@ static void lv_refr_area(const lv_area_t * area_p) static void lv_refr_area_part(const lv_area_t * area_p) { - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp_refr); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*In non double buffered mode, before rendering the next part wait until the previous image is flushed*/ - if(lv_disp_is_double_vdb(disp_refr) == false) { + if(lv_disp_is_double_buf(disp_refr) == false) { while(vdb->flushing); } @@ -383,18 +359,18 @@ static void lv_refr_area_part(const lv_area_t * area_p) lv_area_intersect(&start_mask, area_p, &vdb->area); /*Get the most top object which is not covered by others*/ - top_p = lv_refr_get_top_obj(&start_mask, lv_scr_act(disp_refr)); + top_p = lv_refr_get_top_obj(&start_mask, lv_disp_get_scr_act(disp_refr)); /*Do the refreshing from the top object*/ lv_refr_obj_and_children(top_p, &start_mask); /*Also refresh top and sys layer unconditionally*/ - lv_refr_obj_and_children(lv_layer_top(disp_refr), &start_mask); - lv_refr_obj_and_children(lv_layer_sys(disp_refr), &start_mask); + lv_refr_obj_and_children(lv_disp_get_layer_top(disp_refr), &start_mask); + lv_refr_obj_and_children(lv_disp_get_layer_sys(disp_refr), &start_mask); /* In true double buffered mode flush only once when all areas were rendered. * In normal mode flush after every area */ - if(lv_disp_is_true_double_buffered(disp_refr) == false) { + if(lv_disp_is_true_double_buf(disp_refr) == false) { lv_refr_vdb_flush(); } } @@ -445,7 +421,7 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) /* Normally always will be a top_obj (at least the screen) * but in special cases (e.g. if the screen has alpha) it won't. * In this case use the screen directly */ - if(top_p == NULL) top_p = lv_scr_act(disp_refr); + if(top_p == NULL) top_p = lv_disp_get_scr_act(disp_refr); /*Refresh the top object and its children*/ lv_refr_obj(top_p, mask_p); @@ -552,7 +528,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) */ static void lv_refr_vdb_flush(void) { - lv_disp_buf_t * vdb = lv_disp_get_vdb(lv_refr_get_disp_refreshing()); + lv_disp_buf_t * vdb = lv_disp_get_buf(lv_refr_get_disp_refreshing()); /*In double buffered mode wait until the other buffer is flushed before flushing the current one*/ if(vdb->buf1 && vdb->buf2) { @@ -563,7 +539,7 @@ static void lv_refr_vdb_flush(void) /*Flush the rendered content to the display*/ lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.disp_flush) disp->driver.disp_flush(disp, &vdb->area, vdb->buf_act); + if(disp->driver.flush_cb) disp->driver.flush_cb(disp, &vdb->area, vdb->buf_act); if(vdb->buf1 && vdb->buf2) { diff --git a/lv_core/lv_refr.h b/lv_core/lv_refr.h index a00e6ef927c4..2bd7d2b63b71 100644 --- a/lv_core/lv_refr.h +++ b/lv_core/lv_refr.h @@ -60,20 +60,6 @@ void lv_refr_now(void); */ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); - -/** - * Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels - * @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num)) - */ -void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t)); - -/** - * Called when an area is invalidated to modify the coordinates of the area. - * Special display controllers may require special coordinate rounding - * @param cb pointer to the a function which will modify the area - */ -void lv_refr_set_round_cb(void(*cb)(lv_area_t*)); - /** * Get the number of areas in the buffer * @return number of invalid areas diff --git a/lv_draw/lv_draw.mk b/lv_draw/lv_draw.mk index a384eefeacdb..70fa7103f4a6 100644 --- a/lv_draw/lv_draw.mk +++ b/lv_draw/lv_draw.mk @@ -1,5 +1,4 @@ -CSRCS += lv_draw_vbasic.c -CSRCS += lv_draw_rbasic.c +CSRCS += lv_draw_basic.c CSRCS += lv_draw.c CSRCS += lv_draw_rect.c CSRCS += lv_draw_label.c diff --git a/lv_draw/lv_draw_basic.c b/lv_draw/lv_draw_basic.c index 516af1b9ee4a..f675e54b5481 100644 --- a/lv_draw/lv_draw_basic.c +++ b/lv_draw/lv_draw_basic.c @@ -79,15 +79,15 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t } lv_disp_t * disp = lv_refr_get_disp_refreshing(); - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp); uint32_t vdb_width = lv_area_get_width(&vdb->area); /*Make the coordinates relative to VDB*/ x -= vdb->area.x1; y -= vdb->area.y1; - if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa); + if(disp->driver.set_px_cb) { + disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa); } else { lv_color_t * vdb_px_p = vdb->buf_act; vdb_px_p += y * vdb_width + x; @@ -129,7 +129,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, if(union_ok == false) return; lv_disp_t * disp = lv_refr_get_disp_refreshing(); - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp); lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/ vdb_rel_a.x1 = res_a.x1 - vdb->area.x1; @@ -290,7 +290,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, pos_y + letter_h < mask_p->y1 || pos_y > mask_p->y2) return; lv_disp_t * disp = lv_refr_get_disp_refreshing(); - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp); lv_coord_t vdb_width = lv_area_get_width(&vdb->area); lv_color_t * vdb_buf_tmp = vdb->buf_act; @@ -335,8 +335,8 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; } - if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, + if(disp->driver.set_px_cb) { + disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); } else { @@ -409,7 +409,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, } lv_disp_t * disp = lv_refr_get_disp_refreshing(); - lv_disp_buf_t * vdb = lv_disp_get_vdb(disp); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp); /*Stores coordinates relative to the current VDB*/ masked_a.x1 = masked_a.x1 - vdb->area.x1; @@ -429,12 +429,12 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) { /*Use the custom VDB write function is exists*/ - if(disp->driver.vdb_wr) { + if(disp->driver.set_px_cb) { lv_coord_t col; for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]); - disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); + disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); } map_p += map_width * px_size_byte; /*Next row on the map*/ } @@ -496,8 +496,8 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa); } /*Handle custom VDB write is present*/ - if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); + if(disp->driver.set_px_cb) { + disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); } /*Normal native VDB write*/ else { @@ -506,8 +506,8 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, } } else { /*Handle custom VDB write is present*/ - if(disp->driver.vdb_wr) { - disp->driver.vdb_wr((uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); + if(disp->driver.set_px_cb) { + disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); } /*Normal native VDB write*/ else { @@ -568,10 +568,10 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ lv_coord_t mem_width = lv_area_get_width(mem_area); lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.vdb_wr) { + if(disp->driver.set_px_cb) { for(col = fill_area->x1; col <= fill_area->x2; col++) { for(row = fill_area->y1; row <= fill_area->y2; row++) { - disp->driver.vdb_wr((uint8_t *)mem, mem_width, col, row, color, opa); + disp->driver.set_px_cb(disp, (uint8_t *)mem, mem_width, col, row, color, opa); } } } else { diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 9e02c1fabdac..82e597fb38f6 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -24,9 +24,6 @@ /********************* * DEFINES *********************/ -#ifndef LV_ATTRIBUTE_FLUSH_READY -# define LV_ATTRIBUTE_FLUSH_READY -#endif /********************** * TYPEDEFS @@ -59,7 +56,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) { memset(driver, 0, sizeof(lv_disp_drv_t)); - driver->disp_flush = NULL; + driver->flush_cb = NULL; driver->hor_res = LV_HOR_RES_MAX; driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; @@ -69,7 +66,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->mem_fill = NULL; #endif - driver->vdb_wr = NULL; + driver->set_px_cb = NULL; } @@ -119,54 +116,48 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) if(disp_def == NULL) disp_def = disp; + lv_disp_t * disp_def_tmp = disp_def; + disp_def = disp; /*Temporarily change the default screen to create the default screens on the new display*/ + disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ disp->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ lv_obj_set_style(disp->top_layer, &lv_style_transp); lv_obj_set_style(disp->sys_layer, &lv_style_transp); - lv_disp_assign_screen(disp, disp->act_scr); - lv_disp_assign_screen(disp, disp->top_layer); - lv_disp_assign_screen(disp, disp->sys_layer); - disp->inv_p = 0; - disp->vdb_act = 0; - disp->vdb_flushing = 0; lv_obj_invalidate(disp->act_scr); + disp_def = disp_def_tmp; /*Revert the default display*/ + return disp; } /** - * Get the next display. - * @param disp pointer to the current display. NULL to initialize. - * @return the next display or NULL if no more. Give the first display when the parameter is NULL + * Set a default screen. The new screens will be created on it by default. + * @param disp pointer to a display */ -lv_disp_t * lv_disp_get_next(lv_disp_t * disp) -{ - if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); - else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); -} - - void lv_disp_set_default(lv_disp_t * disp) { disp_def = disp; } - +/** + * Get the default display + * @return pointer to the default display + */ lv_disp_t * lv_disp_get_default(void) { return disp_def; } -lv_disp_buf_t * lv_disp_get_vdb(lv_disp_t * disp) -{ - return disp->driver.buffer; -} - +/** + * Get the horizontal resolution of a display + * @param disp pointer to a display (NULL to use the default display) + * @return the horizontal resolution of the display + */ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); @@ -175,7 +166,11 @@ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) else return disp->driver.hor_res; } - +/** + * Get the vertical resolution of a display + * @param disp pointer to a display (NULL to use the default display) + * @return the vertical resolution of the display + */ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); @@ -184,19 +179,6 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) else return disp->driver.ver_res; } -bool lv_disp_is_double_vdb(lv_disp_t * disp) -{ - if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2) return true; - else return false; -} - -bool lv_disp_is_true_double_buffered(lv_disp_t * disp) -{ - if(lv_disp_is_double_vdb(disp) && disp->driver.buffer->size == disp->driver.hor_res * disp->driver.ver_res) return true; - else return false; -} - - /** * Call in the display driver's `flush` function when the flushing is finished */ @@ -211,7 +193,77 @@ LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_t * disp) } +/** + * Get the next display. + * @param disp pointer to the current display. NULL to initialize. + * @return the next display or NULL if no more. Give the first display when the parameter is NULL + */ +lv_disp_t * lv_disp_get_next(lv_disp_t * disp) +{ + if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); + else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); +} + +/** + * Get the internal buffer of a display + * @param disp pointer to a display + * @return pointer to the internal buffers + */ +lv_disp_buf_t * lv_disp_get_buf(lv_disp_t * disp) +{ + return disp->driver.buffer; +} + +/** + * Get the number of areas in the buffer + * @return number of invalid areas + */ +uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp) +{ + return disp->inv_p; +} + +/** + * Pop (delete) the last 'num' invalidated areas from the buffer + * @param num number of areas to delete + */ +void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) +{ + + if(disp->inv_p < num) disp->inv_p = 0; + else disp->inv_p -= num; +} + +/** + * Check the driver configuration if it's double buffered (both `buf1` and `buf2` are set) + * @param disp pointer to to display to check + * @return true: double buffered; false: not double buffered + */ +bool lv_disp_is_double_buf(lv_disp_t * disp) +{ + if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2) return true; + else return false; +} + +/** + * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and `size` is screen sized) + * @param disp pointer to to display to check + * @return true: double buffered; false: not double buffered + */ +bool lv_disp_is_true_double_buf(lv_disp_t * disp) +{ + uint32_t scr_size = disp->driver.hor_res * disp->driver.ver_res; + + if(lv_disp_is_double_buf(disp) && + disp->driver.buffer->size == scr_size) { + return true; + } + else { + return false; + } +} + + /********************** * STATIC FUNCTIONS **********************/ - diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 01be7003ab34..256e377f1595 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -29,6 +29,10 @@ extern "C" { #define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */ #endif +#ifndef LV_ATTRIBUTE_FLUSH_READY +# define LV_ATTRIBUTE_FLUSH_READY +#endif + /********************** * TYPEDEFS **********************/ @@ -53,28 +57,42 @@ typedef struct * Display Driver structure to be registered by HAL */ typedef struct _disp_drv_t { - int user_data; + /*Horizontal and vertical resolution*/ lv_coord_t hor_res; - lv_coord_t ver_res; + /* Pointer to a buffer initialized with `lv_disp_buf_init()`. + * LittlevGL will use this buffer(s) to draw the screens contents */ lv_disp_buf_t * buffer; - /*Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished*/ - void (*disp_flush)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); + /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ + void (*flush_cb)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); + lv_disp_user_data_t flush_user_data; + + /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ + void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px); + lv_disp_user_data_t monitor_user_data; + + /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements + * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ + void (*rounder_cb)(struct _disp_t * disp, lv_area_t * area); + lv_disp_user_data_t rounder_user_data; + + /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display + * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales + * Note: Much slower then drawing with supported color formats. */ + void (*set_px_cb)(struct _disp_t * disp, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); + lv_disp_user_data_t set_px_user_data; - /*Optional interface functions to use GPU*/ #if USE_LV_GPU - /*Blend two memories using opacity (GPU only)*/ + /*OPTIONAL: Blend two memories using opacity (GPU only)*/ void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); - /*Fill a memory with a color (GPU only)*/ + /*OPTIONAL: Fill a memory with a color (GPU only)*/ void (*mem_fill)(lv_color_t * dest, uint32_t length, lv_color_t color); #endif - /*Optional: Set a pixel in a buffer according to the requirements of the display*/ - void (*vdb_wr)(uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); } lv_disp_drv_t; struct _lv_obj_t; @@ -88,9 +106,6 @@ typedef struct _disp_t { lv_area_t inv_areas[LV_INV_BUF_SIZE]; uint8_t inv_area_joined[LV_INV_BUF_SIZE]; uint32_t inv_p :10; - uint32_t orientation :2; - uint32_t vdb_flushing :1; - uint32_t vdb_act :1; } lv_disp_t; /********************** @@ -103,15 +118,7 @@ typedef struct _disp_t { * After it you can set the fields. * @param driver pointer to driver variable to initialize */ -void lv_disp_drv_init(lv_disp_drv_t *driver); - -/** - * Register an initialized display driver. - * Automatically set the first display as active. - * @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable) - * @return pointer to the new display or NULL on error - */ -lv_disp_t * lv_disp_drv_register(lv_disp_drv_t *driver); +void lv_disp_drv_init(lv_disp_drv_t * driver); /** @@ -131,12 +138,46 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t *driver); */ void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size); +/** + * Register an initialized display driver. + * Automatically set the first display as active. + * @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable) + * @return pointer to the new display or NULL on error + */ +lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver); +/** + * Set a default screen. The new screens will be created on it by default. + * @param disp pointer to a display + */ void lv_disp_set_default(lv_disp_t * disp); +/** + * Get the default display + * @return pointer to the default display + */ lv_disp_t * lv_disp_get_default(void); -lv_disp_buf_t * lv_disp_get_vdb(lv_disp_t * disp); +/** + * Get the horizontal resolution of a display + * @param disp pointer to a display (NULL to use the default display) + * @return the horizontal resolution of the display + */ +lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); + +/** + * Get the vertical resolution of a display + * @param disp pointer to a display (NULL to use the default display) + * @return the vertical resolution of the display + */ +lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); + +/** + * Call in the display driver's `flush` function when the flushing is finished + */ +LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_t * disp); + + /** * Get the next display. * @param disp pointer to the current display. NULL to initialize. @@ -144,13 +185,39 @@ lv_disp_buf_t * lv_disp_get_vdb(lv_disp_t * disp); */ lv_disp_t * lv_disp_get_next(lv_disp_t * disp); +/** + * Get the internal buffer of a display + * @param disp pointer to a display + * @return pointer to the internal buffers + */ +lv_disp_buf_t * lv_disp_get_buf(lv_disp_t * disp); + +/** + * Get the number of areas in the buffer + * @return number of invalid areas + */ +uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp); -lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); -lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); +/** + * Pop (delete) the last 'num' invalidated areas from the buffer + * @param num number of areas to delete + */ +void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num); + +/** + * Check the driver configuration if it's double buffered (both `buf1` and `buf2` are set) + * @param disp pointer to to display to check + * @return true: double buffered; false: not double buffered + */ +bool lv_disp_is_double_buf(lv_disp_t * disp); -bool lv_disp_is_double_vdb(lv_disp_t * disp); +/** + * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and `size` is screen sized) + * @param disp pointer to to display to check + * @return true: double buffered; false: not double buffered + */ +bool lv_disp_is_true_double_buf(lv_disp_t * disp); -bool lv_disp_is_true_double_buffered(lv_disp_t * disp); /********************** * MACROS **********************/ diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 6adb4be96b89..2604bc08c311 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -50,10 +50,9 @@ */ void lv_indev_drv_init(lv_indev_drv_t * driver) { - driver->read = NULL; + memset(driver, 0, sizeof(lv_indev_drv_t)); + driver->type = LV_INDEV_TYPE_NONE; - driver->disp = NULL; - driver->user_data = NULL; } /** @@ -110,13 +109,11 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data) bool cont = false; memset(data, 0, sizeof(lv_indev_data_t)); - data->state = LV_INDEV_STATE_REL; - if(indev->driver.read) { - data->user_data = indev->driver.user_data; + if(indev->driver.read_cb) { LV_LOG_TRACE("idnev read started"); - cont = indev->driver.read(data); + cont = indev->driver.read_cb(indev, data); LV_LOG_TRACE("idnev read finished"); } else { LV_LOG_WARN("indev function registered"); diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 2186e2dabe35..a9208d997a30 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -15,6 +15,12 @@ extern "C" { /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../lv_conf.h" +#endif + #include #include #include "../lv_misc/lv_area.h" @@ -28,6 +34,7 @@ extern "C" { **********************/ struct _disp_t; +struct _lv_indev_t; /*Possible input device types*/ enum { @@ -48,22 +55,23 @@ typedef uint8_t lv_indev_state_t; /*Data type when an input device is read */ typedef struct { - void *user_data; /*'lv_indev_drv_t.priv' for this driver*/ union { - lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ - uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ - uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ - int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ + lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ + uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ + uint32_t btn_id; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ + int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ }; + lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ + } lv_indev_data_t; /*Initialized by the user and registered by 'lv_indev_add()'*/ typedef struct { - lv_hal_indev_type_t type; /*Input device type*/ - bool (*read)(lv_indev_data_t *data); /*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/ + lv_hal_indev_type_t type; /*Input device type*/ + bool (*read_cb)(struct _lv_indev_t * indev, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ + lv_indev_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ struct _disp_t * disp; - void *user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ } lv_indev_drv_t; struct _lv_obj_t; @@ -100,8 +108,6 @@ typedef struct _lv_indev_proc_t { uint8_t disabled :1; } lv_indev_proc_t; -struct _lv_indev_t; - typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); struct _lv_obj_t; diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 49fb3eb1c387..bbeee6736d54 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -10,6 +10,7 @@ #if USE_LV_WIN != 0 #include "../lv_themes/lv_theme.h" +#include "../lv_core/lv_disp.h" /********************* * DEFINES @@ -70,7 +71,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new window object*/ if(copy == NULL) { - lv_obj_t * disp = lv_obj_get_disp(new_win); + lv_disp_t * disp = lv_obj_get_disp(new_win); lv_coord_t hres = lv_disp_get_hor_res(disp); lv_coord_t vres = lv_disp_get_ver_res(disp); lv_obj_set_size(new_win, hres, vres); diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index 18e676372a9a..c2d819027559 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -24,9 +24,7 @@ **********************/ static void disp_init(void); -static void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); -static void disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); -static void disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); +static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p); #if USE_LV_GPU static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color); @@ -51,6 +49,41 @@ void lv_port_disp_init(void) * -----------------------*/ disp_init(); + /*----------------------------- + * Create a buffer for drawing + *----------------------------*/ + + /* LittlevGL requires a buffer where it draw the objects. The buffer's has to be greater than 1 display row + * + * There are three buffering configurations: + * 1. Create ONE buffer some rows: LittlevGL will draw the display's content here and writes it to your display + * 2. Create TWO buffer some rows: LittlevGL will draw the display's content to a buffer and writes it your display. + * You should use DMA to write the buffer's content to the display. + * It will enable LittlevGL to draw the next part of the screen to the other buffer while + * the data is being sent form the first buffer. It makes rendering and flushing parallel. + * 3. Create TWO screen buffer: Similar to 2) but the buffer have to be screen sized. When LittlevGL is ready it will give the + * whole frame to display. This way you only need to change the frame buffer's address instead of + * copying the pixels. + * */ + + /* Example for 1) */ + static lv_disp_buf_t disp_buf_1; + static lv_color_t buf1_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/ + lv_disp_buf_init(&disp_buf_1, buf1_1, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/ + + /* Example for 2) */ + static lv_disp_buf_t disp_buf_2; + static lv_color_t buf2_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/ + static lv_color_t buf2_2[LV_HOR_RES_MAX * 10]; /*An other buffer for 10 rows*/ + lv_disp_buf_init(&disp_buf_2, buf2_1, buf2_2, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/ + + /* Example for 3) */ + static lv_disp_buf_t disp_buf_3; + static lv_color_t buf3_1[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*A screen sized buffer*/ + static lv_color_t buf3_2[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*An other screen sized buffer*/ + lv_disp_buf_init(&disp_buf_3, buf3_1, buf3_2, LV_HOR_RES_MAX * LV_VER_RES_MAX); /*Initialize the display buffer*/ + + /*----------------------------------- * Register the display in LittlevGL *----------------------------------*/ @@ -60,14 +93,8 @@ void lv_port_disp_init(void) /*Set up the functions to access to your display*/ - /*Used in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ - disp_drv.disp_flush = disp_flush; - - /*Used in unbuffered mode (LV_VDB_SIZE == 0 in lv_conf.h)*/ - disp_drv.disp_fill = disp_fill; - - /*Used in unbuffered mode (LV_VDB_SIZE == 0 in lv_conf.h)*/ - disp_drv.disp_map = disp_map; + /*Used to copy the buffer's content to the display*/ + disp_drv.flush_cb = disp_flush; #if USE_LV_GPU /*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/ @@ -95,16 +122,15 @@ static void disp_init(void) /* Flush the content of the internal buffer the specific area on the display * You can use DMA or any hardware acceleration to do this operation in the background but - * 'lv_flush_ready()' has to be called when finished - * This function is required only when LV_VDB_SIZE != 0 in lv_conf.h*/ -static void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p) + * 'lv_disp_flush_ready()' has to be called when finished. */ +static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p) { /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/ int32_t x; int32_t y; - for(y = y1; y <= y2; y++) { - for(x = x1; x <= x2; x++) { + for(y = area->y1; y <= area->y2; y++) { + for(x = area->x1; x <= area->x2; x++) { /* Put a pixel to the display. For example: */ /* put_px(x, y, *color_p)*/ color_p++; @@ -113,46 +139,10 @@ static void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_ /* IMPORTANT!!! * Inform the graphics library that you are ready with the flushing*/ - lv_flush_ready(); -} - - -/* Write a pixel array (called 'map') to the a specific area on the display - * This function is required only when LV_VDB_SIZE == 0 in lv_conf.h*/ -static void disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p) -{ - /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/ - - int32_t x; - int32_t y; - for(y = y1; y <= y2; y++) { - for(x = x1; x <= x2; x++) { - /* Put a pixel to the display. For example: */ - /* put_px(x, y, *color_p)*/ - color_p++; - } - } + lv_disp_flush_ready(disp); } -/* Write a pixel array (called 'map') to the a specific area on the display - * This function is required only when LV_VDB_SIZE == 0 in lv_conf.h*/ -static void disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color) -{ - /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/ - - int32_t x; - int32_t y; - for(y = y1; y <= y2; y++) { - for(x = x1; x <= x2; x++) { - /* Put a pixel to the display. For example: */ - /* put_px(x, y, *color)*/ - } - } - - (void)color; /*Just to avid warnings*/ -} - /*OPTIONAL: GPU INTERFACE*/ #if USE_LV_GPU diff --git a/lv_porting/lv_port_indev_templ.c b/lv_porting/lv_port_indev_templ.c index 60089270e2d6..c89eb0744508 100644 --- a/lv_porting/lv_port_indev_templ.c +++ b/lv_porting/lv_port_indev_templ.c @@ -24,25 +24,25 @@ **********************/ static void touchpad_init(void); -static bool touchpad_read(lv_indev_data_t * data); +static bool touchpad_read(lv_indev_t * indev, lv_indev_data_t * data); static bool touchpad_is_pressed(void); static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y); static void mouse_init(void); -static bool mouse_read(lv_indev_data_t * data); +static bool mouse_read(lv_indev_t * indev, lv_indev_data_t * data); static bool mouse_is_pressed(void); static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y); static void keypad_init(void); -static bool keypad_read(lv_indev_data_t * data); +static bool keypad_read(lv_indev_t * indev, lv_indev_data_t * data); static uint32_t keypad_get_key(void); static void encoder_init(void); -static bool encoder_read(lv_indev_data_t * data); +static bool encoder_read(lv_indev_t * indev, lv_indev_data_t * data); static void encoder_handler(void); static void button_init(void); -static bool button_read(lv_indev_data_t * data); +static bool button_read(lv_indev_t * indev, lv_indev_data_t * data); static int8_t button_get_pressed_id(void); static bool button_is_pressed(uint8_t id); @@ -92,7 +92,7 @@ void lv_port_indev_init(void) /*Register a touchpad input device*/ lv_indev_drv_init(&indev_drv); indev_drv.type = LV_INDEV_TYPE_POINTER; - indev_drv.read = touchpad_read; + indev_drv.read_cb = touchpad_read; indev_touchpad = lv_indev_drv_register(&indev_drv); /*------------------ @@ -105,11 +105,11 @@ void lv_port_indev_init(void) /*Register a mouse input device*/ lv_indev_drv_init(&indev_drv); indev_drv.type = LV_INDEV_TYPE_POINTER; - indev_drv.read = mouse_read; + indev_drv.read_cb = mouse_read; indev_mouse = lv_indev_drv_register(&indev_drv); /*Set cursor. For simplicity set a HOME symbol now.*/ - lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act(NULL), NULL); + lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL); lv_img_set_src(mouse_cursor, SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); @@ -123,7 +123,7 @@ void lv_port_indev_init(void) /*Register a keypad input device*/ lv_indev_drv_init(&indev_drv); indev_drv.type = LV_INDEV_TYPE_KEYPAD; - indev_drv.read = keypad_read; + indev_drv.read_cb = keypad_read; indev_keypad = lv_indev_drv_register(&indev_drv); /* Later you should create group(s) with `lv_group_t * group = lv_group_create()`, @@ -141,7 +141,7 @@ void lv_port_indev_init(void) /*Register a encoder input device*/ lv_indev_drv_init(&indev_drv); indev_drv.type = LV_INDEV_TYPE_KEYPAD; - indev_drv.read = encoder_read; + indev_drv.read_cb = encoder_read; indev_encoder = lv_indev_drv_register(&indev_drv); /* Later you should create group(s) with `lv_group_t * group = lv_group_create()`, @@ -159,7 +159,7 @@ void lv_port_indev_init(void) /*Register a button input device*/ lv_indev_drv_init(&indev_drv); indev_drv.type = LV_INDEV_TYPE_BUTTON; - indev_drv.read = button_read; + indev_drv.read_cb = button_read; indev_button = lv_indev_drv_register(&indev_drv); /*Assign buttons to points on the screen*/ @@ -187,7 +187,7 @@ static void touchpad_init(void) } /* Will be called by the library to read the touchpad */ -static bool touchpad_read(lv_indev_data_t * data) +static bool touchpad_read(lv_indev_t * indev, lv_indev_data_t * data) { static lv_coord_t last_x = 0; static lv_coord_t last_y = 0; @@ -237,7 +237,7 @@ static void mouse_init(void) } /* Will be called by the library to read the mouse */ -static bool mouse_read(lv_indev_data_t * data) +static bool mouse_read(lv_indev_t * indev, lv_indev_data_t * data) { /*Get the current x and y coordinates*/ mouse_get_xy(&data->point.x, &data->point.y); @@ -281,7 +281,7 @@ static void keypad_init(void) } /* Will be called by the library to read the mouse */ -static bool keypad_read(lv_indev_data_t * data) +static bool keypad_read(lv_indev_t * indev, lv_indev_data_t * data) { static uint32_t last_key = 0; @@ -342,7 +342,7 @@ static void encoder_init(void) } /* Will be called by the library to read the encoder */ -static bool encoder_read(lv_indev_data_t * data) +static bool encoder_read(lv_indev_t * indev, lv_indev_data_t * data) { data->enc_diff = encoder_diff; @@ -373,7 +373,7 @@ static void button_init(void) } /* Will be called by the library to read the button */ -static bool button_read(lv_indev_data_t * data) +static bool button_read(lv_indev_t * indev, lv_indev_data_t * data) { static uint8_t last_btn = 0; @@ -389,7 +389,7 @@ static bool button_read(lv_indev_data_t * data) } /*Save the last pressed button's ID*/ - data->btn = last_btn; + data->btn_id = last_btn; /*Return `false` because we are not buffering and no more data to read*/ return false; diff --git a/lv_version.h b/lv_version.h index 1e62e1e2bbde..b718be951d8e 100644 --- a/lv_version.h +++ b/lv_version.h @@ -14,10 +14,10 @@ extern "C" { * INCLUDES *********************/ /*Current version of LittlevGL*/ -#define LVGL_VERSION_MAJOR 5 -#define LVGL_VERSION_MINOR 3 +#define LVGL_VERSION_MAJOR 6 +#define LVGL_VERSION_MINOR 0 #define LVGL_VERSION_PATCH 0 -#define LVGL_VERSION_INFO "" +#define LVGL_VERSION_INFO "dev" /********************* From 0ccaac4e002897a9e135d78a0269c93de37dbecf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Feb 2019 00:21:59 +0100 Subject: [PATCH 038/590] updade lv_conf_templ.h --- lv_conf_templ.h | 47 ++------------------------------------------ lv_core/lv_refr.c | 2 +- lv_hal/lv_hal_disp.h | 13 ++++++++---- 3 files changed, 12 insertions(+), 50 deletions(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index a4712fea6023..79064806724b 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -43,8 +43,8 @@ *===================*/ /* Horizontal and vertical resolution of the library.*/ -#define LV_HOR_RES (480) -#define LV_VER_RES (320) +#define LV_HOR_RES_MAX (480) +#define LV_VER_RES_MAX (320) /* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide * (Not so important, you can adjust it to modify default sizes and spaces)*/ @@ -56,49 +56,6 @@ /*Screen refresh period in milliseconds*/ #define LV_REFR_PERIOD 30 -/*----------------- - * VDB settings - *----------------*/ - -/* VDB (Virtual Display Buffer) is an internal graphics buffer. - * The GUI will be drawn into this buffer first and then - * the buffer will be passed to your `disp_drv.disp_flush` function to - * copy it to your frame buffer. - * VDB is required for: buffered drawing, opacity, anti-aliasing and shadows - * Learn more: https://docs.littlevgl.com/#Drawing*/ - -/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES - * Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions - * will be called to draw to the frame buffer directly*/ -#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10) - - /* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays. - * Special formats are handled with `disp_drv.vdb_wr`)*/ -#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */ - - /* Place VDB to a specific address (e.g. in external RAM) - * 0: allocate automatically into RAM - * LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/ -#define LV_VDB_ADR 0 - -/* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing - * The flushing should use DMA to write the frame buffer in the background */ -#define LV_VDB_DOUBLE 0 - -/* Place VDB2 to a specific address (e.g. in external RAM) - * 0: allocate automatically into RAM - * LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/ -#define LV_VDB2_ADR 0 - -/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen. - * Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display. - * The best if you do in the blank period of you display to avoid tearing effect. - * Requires: - * - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES - * - LV_VDB_DOUBLE = 1 - */ -#define LV_VDB_TRUE_DOUBLE_BUFFERED 0 - /*================= Misc. setting *=================*/ diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index e665e1a1144e..d17d83917411 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -101,7 +101,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) /*The area is truncated to the screen*/ if(suc != false) { - if(disp_refr->driver.rounder_cb) disp_refr->driver.rounder_cb(disp_refr, &com_area); + if(disp->driver.rounder_cb) disp->driver.rounder_cb(disp_refr, &com_area); /*Save only if this area is not in one of the saved areas*/ uint16_t i; diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 256e377f1595..0f83d82a26b2 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -70,10 +70,6 @@ typedef struct _disp_drv_t { void (*flush_cb)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); lv_disp_user_data_t flush_user_data; - /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ - void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px); - lv_disp_user_data_t monitor_user_data; - /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ void (*rounder_cb)(struct _disp_t * disp, lv_area_t * area); @@ -85,6 +81,10 @@ typedef struct _disp_drv_t { void (*set_px_cb)(struct _disp_t * disp, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); lv_disp_user_data_t set_px_user_data; + /* Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ + void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px); + lv_disp_user_data_t monitor_user_data; + #if USE_LV_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); @@ -98,11 +98,16 @@ typedef struct _disp_drv_t { struct _lv_obj_t; typedef struct _disp_t { + /*Driver to the display*/ lv_disp_drv_t driver; + + /*Screens of the display*/ lv_ll_t scr_ll; struct _lv_obj_t * act_scr; struct _lv_obj_t * top_layer; struct _lv_obj_t * sys_layer; + + /*Invalidated (marked to redraw) areas*/ lv_area_t inv_areas[LV_INV_BUF_SIZE]; uint8_t inv_area_joined[LV_INV_BUF_SIZE]; uint32_t inv_p :10; From d27dfbd6d77d4e32021c407ac779686cb0cbabd1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Feb 2019 00:50:06 +0100 Subject: [PATCH 039/590] update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6bfd28d7ddfb..b98d36152e28 100644 --- a/README.md +++ b/README.md @@ -104,10 +104,10 @@ void my_disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_ ```c lv_indev_drv_init(&indev_drv); /*Descriptor of a input device driver*/ indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/ -indev_drv.read = touchpad_read; /*Set your driver function*/ +indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/ lv_indev_drv_register(&indev_drv); /*Finally register the driver*/ -bool touchpad_read(lv_indev_data_t * data) +bool my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data) { static lv_coord_t last_x = 0; static lv_coord_t last_y = 0; @@ -123,9 +123,9 @@ bool touchpad_read(lv_indev_data_t * data) return false; /*Return `false` because we are not buffering and no more data to read*/ } ``` -6. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in Timer interrupt or in an Operation system task. +6. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in a Timer interrupt or in an Operation system task. -For a detailed description check the [Documentation](https://docs.littlevgl.com/#Porting) or the [Porting tutorial](https://github.com/littlevgl/lv_examples/blob/master/lv_tutorial/0_porting/lv_tutorial_porting.c) +For a detailed description check the [Documentation](https://docs.littlevgl.com/#Porting) or the [Porting examples](https://github.com/littlevgl/lvgl/tree/multi-disp/lv_porting). ### Code examples From 69456cd3f5b81f287ae8b5ac081ffa8b54d551f8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Feb 2019 00:50:14 +0100 Subject: [PATCH 040/590] minor fixes --- lv_porting/lv_port_disp_templ.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index c2d819027559..bcd251a8ab57 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -96,6 +96,9 @@ void lv_port_disp_init(void) /*Used to copy the buffer's content to the display*/ disp_drv.flush_cb = disp_flush; + /*Set a display buffer*/ + disp_drv.buffer = &disp_buf_2; + #if USE_LV_GPU /*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/ From 000cc9d92f8715291aac4f044c7fd03589c3e738 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 21 Feb 2019 10:18:17 +0100 Subject: [PATCH 041/590] modify lv_group_focus_next/prev so that hidden objects don't receive focus --- lv_core/lv_group.c | 107 +++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 47 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 16235f32d01e..62156f28da40 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -26,6 +26,7 @@ static void style_mod_def(lv_style_t * style); static void style_mod_edit_def(lv_style_t * style); static void refresh_theme(lv_group_t * g, lv_theme_t * th); +static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), void * (*move)(const lv_ll_t *, const void *)); static void lv_group_refocus(lv_group_t * g); /********************** @@ -207,29 +208,7 @@ void lv_group_focus_obj(lv_obj_t * obj) */ void lv_group_focus_next(lv_group_t * group) { - if(group->frozen) return; - - if(group->obj_focus) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_obj_invalidate(*group->obj_focus); - } - - lv_obj_t ** obj_next; - if(group->obj_focus == NULL) obj_next = lv_ll_get_head(&group->obj_ll); - else obj_next = lv_ll_get_next(&group->obj_ll, group->obj_focus); - - if(obj_next == NULL) { - if(group->wrap) obj_next = lv_ll_get_head(&group->obj_ll); - else obj_next = lv_ll_get_tail(&group->obj_ll); - } - group->obj_focus = obj_next; - - if(group->obj_focus) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); - lv_obj_invalidate(*group->obj_focus); - - if(group->focus_cb) group->focus_cb(group); - } + focus_next_core(group, lv_ll_get_head, lv_ll_get_next); } /** @@ -238,30 +217,7 @@ void lv_group_focus_next(lv_group_t * group) */ void lv_group_focus_prev(lv_group_t * group) { - if(group->frozen) return; - - if(group->obj_focus) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_obj_invalidate(*group->obj_focus); - } - - lv_obj_t ** obj_next; - if(group->obj_focus == NULL) obj_next = lv_ll_get_tail(&group->obj_ll); - else obj_next = lv_ll_get_prev(&group->obj_ll, group->obj_focus); - - if(obj_next == NULL) { - if(group->wrap) obj_next = lv_ll_get_tail(&group->obj_ll); - else obj_next = lv_ll_get_head(&group->obj_ll); - } - group->obj_focus = obj_next; - - if(group->obj_focus != NULL) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); - lv_obj_invalidate(*group->obj_focus); - - if(group->focus_cb) group->focus_cb(group); - } - + focus_next_core(group, lv_ll_get_tail, lv_ll_get_prev); } /** @@ -567,4 +523,61 @@ static void refresh_theme(lv_group_t * g, lv_theme_t * th) } } +static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), void * (*move)(const lv_ll_t *, const void *)) +{ + if (group->frozen) return; + + lv_obj_t ** obj_next = group->obj_focus; + lv_obj_t ** obj_sentinel = NULL; + bool can_move = true; + bool can_begin = true; + + for(;;) { + if(obj_next == NULL) { + if(group->wrap || obj_sentinel == NULL) { + if(!can_begin) return; + obj_next = begin(&group->obj_ll); + can_move = false; + can_begin = false; + } else { + /*Currently focused object is the last/first in the group, keep it that way*/ + return; + } + } + + if(obj_sentinel == NULL) { + obj_sentinel = obj_next; + if(obj_sentinel == NULL) return; /*Group is empty*/ + } + + if(can_move) { + obj_next = move(&group->obj_ll, obj_next); + + /*Give up if we walked the entire list and haven't found another visible object*/ + if(obj_next == obj_sentinel) return; + } + + can_move = true; + + if(obj_next == NULL) continue; + + /*Hidden objects don't receive focus*/ + if(!lv_obj_get_hidden(*obj_next)) break; + } + + if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/ + + if(group->obj_focus) { + (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + lv_obj_invalidate(*group->obj_focus); + } + + group->obj_focus = obj_next; + + (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); + lv_obj_invalidate(*group->obj_focus); + + if(group->focus_cb) group->focus_cb(group); +} + #endif /*USE_LV_GROUP != 0*/ From b9ed89a976ec680223cb0310c04139c5a8f3be5d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 21 Feb 2019 12:37:33 +0100 Subject: [PATCH 042/590] i18n add const prefixes where required --- lv_core/lv_i18n.c | 136 +++++++++++++++++++++++----------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index a9a50cef4212..307656cff42e 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -28,8 +28,8 @@ static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * /********************** * STATIC VARIABLES **********************/ -static lv_i18n_lang_t ** languages; -static lv_i18n_lang_t * local_lang; +static const lv_i18n_lang_t ** languages; +static const lv_i18n_lang_t * local_lang; /********************** * MACROS @@ -70,7 +70,6 @@ void lv_i18n_set_local(const char * lang_code) return; } - uint16_t i; for(i = 0; languages[i] != NULL; i++) { if(strcmp(languages[i]->name, lang_code) == 0) break; /*A language has found*/ @@ -99,7 +98,7 @@ const void * lv_i18n_get_text(const char * msg_id) return msg_id; } - lv_i18n_lang_t * lang = local_lang; + const lv_i18n_lang_t * lang = local_lang; if(lang->simple == NULL) { if(lang == languages[0]) { @@ -152,70 +151,71 @@ const void * lv_i18n_get_text(const char * msg_id) const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) { if(local_lang == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); - return msg_id; - } - - lv_i18n_lang_t * lang = local_lang; - if(lang->plurals == NULL || lang->plural_rule == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined for the language. Fallback to the default language"); - lang = languages[0]; - } - - if(lang->plurals == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined even on the default language"); - return msg_id; - } - } - - lv_i18n_plural_type_t ptype = lang->plural_rule(num); - - if(lang->plurals[ptype] == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural:No translations of the required plural form for the language. Fallback to the default language"); - lang = languages[0]; - } - } - - /*Find the translation*/ - const void * txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); - if(txt == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found on this language. Fallback to the default language"); - lang = languages[0]; - } - } - - /*Try again with the default language*/ - if(lang->plurals == NULL || lang->plural_rule == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); - return msg_id; - } - - ptype = lang->plural_rule(num); - if(lang->plurals[ptype] == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); - return msg_id; - } - - txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); - - if(txt == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); - return msg_id; - } - - return txt; + LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); + return msg_id; + } + + const lv_i18n_lang_t * lang = local_lang; + + if(lang->plurals == NULL || lang->plural_rule == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined for the language. Fallback to the default language"); + lang = languages[0]; + } + + if(lang->plurals == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined even on the default language"); + return msg_id; + } + } + + lv_i18n_plural_type_t ptype = lang->plural_rule(num); + + if(lang->plurals[ptype] == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural:No translations of the required plural form for the language. Fallback to the default language"); + lang = languages[0]; + } + } + + /*Find the translation*/ + const void * txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); + if(txt == NULL) { + if(lang == languages[0]) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); + return msg_id; + } else { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found on this language. Fallback to the default language"); + lang = languages[0]; + } + } + + /*Try again with the default language*/ + if(lang->plurals == NULL || lang->plural_rule == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); + return msg_id; + } + + ptype = lang->plural_rule(num); + if(lang->plurals[ptype] == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); + return msg_id; + } + + txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); + + if(txt == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); + return msg_id; + } + + return txt; } /** From fd6e5ae3ef564244bc5dd44d8fc56ff9bfa2d490 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 21 Feb 2019 13:46:32 +0100 Subject: [PATCH 043/590] fix compilation errors when compiler does not support VLAs --- lv_draw/lv_draw_img.c | 2 +- lv_draw/lv_draw_rect.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index 0f3d94fe8dbc..369fbb7610e7 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -325,7 +325,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas #if LV_COMPILER_VLA_SUPPORTED uint8_t buf[(lv_area_get_width(&mask_com) * ((LV_COLOR_DEPTH >> 3) + 1))]; #else - uint8_t buf[LV_HOR_RES * ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ + uint8_t buf[LV_HOR_RES_MAX * ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ #endif lv_area_t line; lv_area_copy(&line, &mask_com); diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index 0d2e5cfa4381..b1d341ad8389 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -1089,9 +1089,9 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask lv_coord_t curve_x[radius + swidth + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else # if LV_HOR_RES > LV_VER_RES - lv_coord_t curve_x[LV_HOR_RES]; + lv_coord_t curve_x[LV_HOR_RES_MAX]; # else - lv_coord_t curve_x[LV_VER_RES]; + lv_coord_t curve_x[LV_VER_RES_MAX]; # endif #endif memset(curve_x, 0, sizeof(curve_x)); @@ -1110,9 +1110,9 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask uint32_t line_1d_blur[filter_width]; #else # if LV_HOR_RES > LV_VER_RES - uint32_t line_1d_blur[LV_HOR_RES]; + uint32_t line_1d_blur[LV_HOR_RES_MAX]; # else - uint32_t line_1d_blur[LV_VER_RES]; + uint32_t line_1d_blur[LV_VER_RES_MAX]; # endif #endif /*1D Blur horizontally*/ @@ -1126,9 +1126,9 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask lv_opa_t line_2d_blur[radius + swidth + 1]; #else # if LV_HOR_RES > LV_VER_RES - lv_opa_t line_2d_blur[LV_HOR_RES]; + lv_opa_t line_2d_blur[LV_HOR_RES_MAX]; # else - lv_opa_t line_2d_blur[LV_VER_RES]; + lv_opa_t line_2d_blur[LV_VER_RES_MAX]; # endif #endif @@ -1247,9 +1247,9 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma lv_coord_t curve_x[radius + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else # if LV_HOR_RES > LV_VER_RES - lv_coord_t curve_x[LV_HOR_RES]; + lv_coord_t curve_x[LV_HOR_RES_MAX]; # else - lv_coord_t curve_x[LV_VER_RES]; + lv_coord_t curve_x[LV_VER_RES_MAX]; # endif #endif lv_point_t circ; @@ -1266,9 +1266,9 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma lv_opa_t line_1d_blur[swidth]; #else # if LV_HOR_RES > LV_VER_RES - lv_opa_t line_1d_blur[LV_HOR_RES]; + lv_opa_t line_1d_blur[LV_HOR_RES_MAX]; # else - lv_opa_t line_1d_blur[LV_VER_RES]; + lv_opa_t line_1d_blur[LV_VER_RES_MAX]; # endif #endif From a1e062bc492b83b1a154a176c80a2f9ac77f7577 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 21 Feb 2019 15:21:53 +0100 Subject: [PATCH 044/590] ta: fix crash on uninitialized field --- lv_objx/lv_ta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index c7d66dc450f5..52b10520a080 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -108,6 +108,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->cursor.valid_x = 0; ext->one_line = 0; ext->label = NULL; + ext->placeholder = NULL; lv_obj_set_signal_func(new_ta, lv_ta_signal); lv_obj_set_signal_func(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal); From c34d5a4f6b3b49242d6c4e807874a61e6705de5f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Feb 2019 14:22:11 +0100 Subject: [PATCH 045/590] init disp resolution --- README.md | 2 ++ lv_porting/lv_port_disp_templ.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index b98d36152e28..980785eb4d7f 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ v_disp_buf_init(&disp_buf1, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the ```c lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ lv_disp_drv_init(&disp_drv); /*Basic initialization*/ +disp_drv.hor_res = 480; /*Set the horizontal resolution*/ +disp_drv.ver_res = 320; /*Set the vertical resolution*/ disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/ disp_drv.buffer = &disp_buf; /*Assign the buffer to teh display*/ lv_disp_drv_register(&disp_drv); /*Finally register the driver*/ diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index bcd251a8ab57..39f928d2381b 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -93,6 +93,10 @@ void lv_port_disp_init(void) /*Set up the functions to access to your display*/ + /*Set the resolution of the display*/ + disp_drv.hor_res = 480; + disp_drv.ver_res = 320; + /*Used to copy the buffer's content to the display*/ disp_drv.flush_cb = disp_flush; From 5f94480bfb8a745968dd03f29d37cb5fd5bcdd5c Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Feb 2019 12:10:17 -0500 Subject: [PATCH 046/590] Don't check LV_LOG_LEVEL unless USE_LV_LOG is enabled --- lv_objx/lv_img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index c9fb42875e53..b73bff0825a5 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -129,7 +129,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) lv_img_src_t src_type = lv_img_src_get_type(src_img); lv_img_ext_t * ext = lv_obj_get_ext_attr(img); -#if LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO +#if USE_LV_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); From 285ff7d3b428af50b94cb9ab11a038d79522e676 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 06:24:36 +0100 Subject: [PATCH 047/590] lv_cont: improve fit with TIGHT, FLOOD, FILL --- lv_core/lv_obj.c | 7 ++ lv_core/lv_obj.h | 1 + lv_misc/lv_ll.c | 15 +++ lv_misc/lv_ll.h | 7 ++ lv_objx/lv_btn.h | 74 ++++++++++++--- lv_objx/lv_cb.c | 2 +- lv_objx/lv_cont.c | 210 ++++++++++++++++++++++++++++-------------- lv_objx/lv_cont.h | 78 +++++++++++++--- lv_objx/lv_ddlist.c | 11 +-- lv_objx/lv_ddlist.h | 5 +- lv_objx/lv_list.c | 3 +- lv_objx/lv_mbox.c | 4 +- lv_objx/lv_page.c | 14 +-- lv_objx/lv_page.h | 83 +++++++++++++---- lv_objx/lv_roller.c | 6 +- lv_objx/lv_ta.c | 13 +-- lv_objx/lv_tabview.c | 2 +- lv_objx/lv_tileview.c | 2 +- 18 files changed, 387 insertions(+), 150 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 41049bdfd6b7..16e7433f222c 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -624,6 +624,13 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) lv_obj_t * par = lv_obj_get_parent(obj); if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj); + + /*Tell the children the paren's size has changed*/ + lv_obj_t * i; + LL_READ(obj->child_ll, i) { + i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + } + /*Invalidate the new area*/ lv_obj_invalidate(obj); diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index cfd8a8ac3892..c5e6068a3bd0 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -89,6 +89,7 @@ enum LV_SIGNAL_CLEANUP, LV_SIGNAL_CHILD_CHG, LV_SIGNAL_CORD_CHG, + LV_SIGNAL_PARENT_SIZE_CHG, LV_SIGNAL_STYLE_CHG, LV_SIGNAL_REFR_EXT_SIZE, LV_SIGNAL_LANG_CHG, diff --git a/lv_misc/lv_ll.c b/lv_misc/lv_ll.c index 43d8847d43f0..297b5a5f0038 100644 --- a/lv_misc/lv_ll.c +++ b/lv_misc/lv_ll.c @@ -340,6 +340,21 @@ void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after) if(n_after == NULL) ll_p->tail = n_act; } +/** + * Check if a linked list is empty + * @param ll_p pointer to a linked list + * @return true: the linked list is empty; false: not empty + */ +bool lv_ll_is_empty(lv_ll_t * ll_p) +{ + if(ll_p == NULL) return true; + + if(ll_p->head == NULL && ll_p->tail == NULL) return true; + + return false; +} + + /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_misc/lv_ll.h b/lv_misc/lv_ll.h index 086ba405718f..b49d0ea363a5 100644 --- a/lv_misc/lv_ll.h +++ b/lv_misc/lv_ll.h @@ -17,6 +17,7 @@ extern "C" { #include "lv_mem.h" #include #include +#include /********************* * DEFINES @@ -130,6 +131,12 @@ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act); */ void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after); +/** + * Check if a linked list is empty + * @param ll_p pointer to a linked list + * @return true: the linked list is empty; false: not empty + */ +bool lv_ll_is_empty(lv_ll_t * ll_p); /********************** * MACROS **********************/ diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index 097aff32b03b..b8e6932f8066 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -142,15 +142,40 @@ static inline void lv_btn_set_layout(lv_obj_t * btn, lv_layout_t layout) } /** - * Enable the horizontal or vertical fit. - * The button size will be set to involve the children horizontally or vertically. + * Set the fit policy in all 4 directions separately. + * It tell how to change the button size automatically. * @param btn pointer to a button object - * @param hor_en true: enable the horizontal fit - * @param ver_en true: enable the vertical fit + * @param left left fit policy from `lv_fit_t` + * @param right right fit policy from `lv_fit_t` + * @param top bottom fit policy from `lv_fit_t` + * @param bottom bottom fit policy from `lv_fit_t` */ -static inline void lv_btn_set_fit(lv_obj_t * btn, bool hor_en, bool ver_en) +static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) { - lv_cont_set_fit(btn, hor_en, ver_en); + lv_cont_set_fit4(btn, left, right, top, bottom); +} + +/** + * Set the fit policy horizontally and vertically separately. + * It tell how to change the button size automatically. + * @param btn pointer to a button object + * @param hot horizontal fit policy from `lv_fit_t` + * @param ver vertical fit policy from `lv_fit_t` + */ +static inline void lv_btn_set_fit2(lv_obj_t * btn, lv_fit_t hor, lv_fit_t ver) +{ + lv_cont_set_fit2(btn, hor, ver); +} + +/** + * Set the fit policy in all 4 direction at once. + * It tell how to change the button size automatically. + * @param btn pointer to a button object + * @param fit fit policy from `lv_fit_t` + */ +static inline void lv_btn_set_fit(lv_obj_t * cont, lv_fit_t fit) +{ + lv_cont_set_fit(cont, fit); } /** @@ -218,25 +243,46 @@ static inline lv_layout_t lv_btn_get_layout(const lv_obj_t * btn) } /** - * Get horizontal fit enable attribute of a button + * Get the left fit mode * @param btn pointer to a button object - * @return true: horizontal fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -static inline bool lv_btn_get_hor_fit(const lv_obj_t * btn) +static inline lv_fit_t lv_btn_get_fit_left(const lv_obj_t * btn) { - return lv_cont_get_hor_fit(btn); + return lv_cont_get_fit_left(btn); } /** - * Get vertical fit enable attribute of a container + * Get the right fit mode * @param btn pointer to a button object - * @return true: vertical fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -static inline bool lv_btn_get_ver_fit(const lv_obj_t * btn) +static inline lv_fit_t lv_btn_get_fit_right(const lv_obj_t * btn) { - return lv_cont_get_ver_fit(btn); + return lv_cont_get_fit_right(btn); } +/** + * Get the top fit mode + * @param btn pointer to a button object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_btn_get_fit_top(const lv_obj_t * btn) +{ + return lv_cont_get_fit_top(btn); +} + +/** + * Get the bottom fit mode + * @param btn pointer to a button object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_btn_get_fit_bottom(const lv_obj_t * btn) +{ + return lv_cont_get_fit_bottom(btn); +} + + /** * Get time of the ink in effect (draw a circle on click to animate in the new state) * @param btn pointer to a button object diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 7943ba6b2c43..e6fc49454d20 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -81,7 +81,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) lv_cb_set_text(new_cb, "Check box"); lv_btn_set_layout(new_cb, LV_LAYOUT_ROW_M); - lv_btn_set_fit(new_cb, true, true); + lv_btn_set_fit(new_cb, LV_FIT_TIGHT); lv_btn_set_toggle(new_cb, true); lv_obj_set_protect(new_cb, LV_PROTECT_PRESS_LOST); diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index b6bbe012827d..41255b789612 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -78,8 +78,10 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; lv_mem_assert(ext); - ext->hor_fit = 0; - ext->ver_fit = 0; + ext->fit_left = LV_FIT_NONE; + ext->fit_right = LV_FIT_NONE; + ext->fit_top = LV_FIT_NONE; + ext->fit_bottom = LV_FIT_NONE; ext->layout = LV_LAYOUT_OFF; lv_obj_set_signal_func(new_cont, lv_cont_signal); @@ -97,8 +99,10 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing object*/ else { lv_cont_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->hor_fit = copy_ext->hor_fit; - ext->ver_fit = copy_ext->ver_fit; + ext->fit_left = copy_ext->fit_left; + ext->fit_right = copy_ext->fit_right; + ext->fit_top = copy_ext->fit_top; + ext->fit_bottom = copy_ext->fit_bottom; ext->layout = copy_ext->layout; /*Refresh the style with new signal function*/ @@ -107,7 +111,6 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) LV_LOG_INFO("container created"); - return new_cont; } @@ -131,22 +134,31 @@ void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout) cont->signal_func(cont, LV_SIGNAL_CHILD_CHG, NULL); } - /** - * Enable the horizontal or vertical fit. - * The container size will be set to involve the children horizontally or vertically. + * Set the fit policy in all 4 directions separately. + * It tell how to change the container's size automatically. * @param cont pointer to a container object - * @param hor_en true: enable the horizontal fit - * @param ver_en true: enable the vertical fit + * @param left left fit policy from `lv_fit_t` + * @param right right fit policy from `lv_fit_t` + * @param top bottom fit policy from `lv_fit_t` + * @param bottom bottom fit policy from `lv_fit_t` */ -void lv_cont_set_fit(lv_obj_t * cont, bool hor_en, bool ver_en) +void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) { lv_obj_invalidate(cont); lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->hor_fit == hor_en && ext->ver_fit == ver_en) return; + if(ext->fit_left == left && + ext->fit_right == right && + ext->fit_top == top && + ext->fit_bottom == bottom) + { + return; + } - ext->hor_fit = hor_en == false ? 0 : 1; - ext->ver_fit = ver_en == false ? 0 : 1; + ext->fit_left = left; + ext->fit_right = right; + ext->fit_top = top; + ext->fit_bottom = bottom; /*Send a signal to refresh the layout*/ cont->signal_func(cont, LV_SIGNAL_CHILD_CHG, NULL); @@ -168,25 +180,47 @@ lv_layout_t lv_cont_get_layout(const lv_obj_t * cont) } /** - * Get horizontal fit enable attribute of a container + * Get left fit mode of a container * @param cont pointer to a container object - * @return true: horizontal fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -bool lv_cont_get_hor_fit(const lv_obj_t * cont) +lv_fit_t lv_cont_get_fit_left(const lv_obj_t * cont) { lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - return ext->hor_fit == 0 ? false : true; + return ext->fit_left; } /** - * Get vertical fit enable attribute of a container + * Get right fit mode of a container * @param cont pointer to a container object - * @return true: vertical fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -bool lv_cont_get_ver_fit(const lv_obj_t * cont) +lv_fit_t lv_cont_get_fit_right(const lv_obj_t * cont) { lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - return ext->ver_fit == 0 ? false : true; + return ext->fit_right; +} + +/** + * Get top fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont) +{ + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_top; +} + +/** + * Get bottom fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont) +{ + lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); + return ext->fit_bottom; } /** @@ -244,6 +278,10 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) lv_cont_refr_layout(cont); lv_cont_refr_autofit(cont); } + } else if(sign == LV_SIGNAL_PARENT_SIZE_CHG) { + /*FLOOD and FILL fit needs to be refreshed if the parent size has changed*/ + lv_cont_refr_autofit(cont); + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; @@ -574,70 +612,106 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) { lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->hor_fit == 0 && - ext->ver_fit == 0) { + if(ext->fit_left == LV_FIT_NONE && + ext->fit_right == LV_FIT_NONE && + ext->fit_top == LV_FIT_NONE && + ext->fit_bottom == LV_FIT_NONE) + { return; } - lv_area_t new_cords; + lv_area_t tight_area; lv_area_t ori; lv_style_t * style = lv_obj_get_style(cont); lv_obj_t * i; lv_coord_t hpad = style->body.padding.hor; lv_coord_t vpad = style->body.padding.ver; + lv_obj_t * par = lv_obj_get_parent(cont); + lv_style_t * par_style = lv_obj_get_style(par); + lv_area_t flood_area; + lv_area_copy(&flood_area, &par->coords); + flood_area.x1 += par_style->body.padding.hor; + flood_area.x2 -= par_style->body.padding.hor; + flood_area.y1 += par_style->body.padding.ver; + flood_area.y2 -= par_style->body.padding.ver; + /*Search the side coordinates of the children*/ lv_obj_get_coords(cont, &ori); - lv_obj_get_coords(cont, &new_cords); - - new_cords.x1 = LV_COORD_MAX; - new_cords.y1 = LV_COORD_MAX; - new_cords.x2 = LV_COORD_MIN; - new_cords.y2 = LV_COORD_MIN; - - LL_READ(cont->child_ll, i) { - if(lv_obj_get_hidden(i) != false) continue; - new_cords.x1 = LV_MATH_MIN(new_cords.x1, i->coords.x1); - new_cords.y1 = LV_MATH_MIN(new_cords.y1, i->coords.y1); - new_cords.x2 = LV_MATH_MAX(new_cords.x2, i->coords.x2); - new_cords.y2 = LV_MATH_MAX(new_cords.y2, i->coords.y2); + lv_obj_get_coords(cont, &tight_area); + + bool has_children = lv_ll_is_empty(&cont->child_ll) ? false : true; + + if(has_children) { + tight_area.x1 = LV_COORD_MAX; + tight_area.y1 = LV_COORD_MAX; + tight_area.x2 = LV_COORD_MIN; + tight_area.y2 = LV_COORD_MIN; + + LL_READ(cont->child_ll, i) { + if(lv_obj_get_hidden(i) != false) continue; + tight_area.x1 = LV_MATH_MIN(tight_area.x1, i->coords.x1); + tight_area.y1 = LV_MATH_MIN(tight_area.y1, i->coords.y1); + tight_area.x2 = LV_MATH_MAX(tight_area.x2, i->coords.x2); + tight_area.y2 = LV_MATH_MAX(tight_area.y2, i->coords.y2); + } + + tight_area.x1 -= hpad; + tight_area.x2 += hpad; + tight_area.y1 -= vpad; + tight_area.y2 += vpad; } - /*If the value is not the init value then the page has >=1 child.*/ - if(new_cords.x1 != LV_COORD_MAX) { - if(ext->hor_fit != 0) { - new_cords.x1 -= hpad; - new_cords.x2 += hpad; - } else { - new_cords.x1 = cont->coords.x1; - new_cords.x2 = cont->coords.x2; - } - if(ext->ver_fit != 0) { - new_cords.y1 -= vpad; - new_cords.y2 += vpad; - } else { - new_cords.y1 = cont->coords.y1; - new_cords.y2 = cont->coords.y2; - } + lv_area_t new_area; + lv_area_copy(&new_area, &ori); + + switch(ext->fit_left) { + case LV_FIT_TIGHT: new_area.x1 = tight_area.x1; break; + case LV_FIT_FLOOD: new_area.x1 = flood_area.x1; break; + case LV_FIT_FILL: new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; break; + default: break; + } - /*Do nothing if the coordinates are not changed*/ - if(cont->coords.x1 != new_cords.x1 || - cont->coords.y1 != new_cords.y1 || - cont->coords.x2 != new_cords.x2 || - cont->coords.y2 != new_cords.y2) { + switch(ext->fit_right) { + case LV_FIT_TIGHT: new_area.x2 = tight_area.x2; break; + case LV_FIT_FLOOD: new_area.x2 = flood_area.x2; break; + case LV_FIT_FILL: new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; break; + default: break; + } - lv_obj_invalidate(cont); - lv_area_copy(&cont->coords, &new_cords); - lv_obj_invalidate(cont); + switch(ext->fit_top) { + case LV_FIT_TIGHT: new_area.y1 = tight_area.y1; break; + case LV_FIT_FLOOD: new_area.y1 = flood_area.y1; break; + case LV_FIT_FILL: new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; break; + default: break; + } - /*Notify the object about its new coordinates*/ - cont->signal_func(cont, LV_SIGNAL_CORD_CHG, &ori); + switch(ext->fit_bottom) { + case LV_FIT_TIGHT: new_area.y2 = tight_area.y2; break; + case LV_FIT_FLOOD: new_area.y2 = flood_area.y2; break; + case LV_FIT_FILL: new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; break; + default: break; + } - /*Inform the parent about the new coordinates*/ - lv_obj_t * par = lv_obj_get_parent(cont); - par->signal_func(par, LV_SIGNAL_CHILD_CHG, cont); - } + /*Do nothing if the coordinates are not changed*/ + if(cont->coords.x1 != new_area.x1 || + cont->coords.y1 != new_area.y1 || + cont->coords.x2 != new_area.x2 || + cont->coords.y2 != new_area.y2) + { + + lv_obj_invalidate(cont); + lv_area_copy(&cont->coords, &new_area); + lv_obj_invalidate(cont); + + /*Notify the object about its new coordinates*/ + cont->signal_func(cont, LV_SIGNAL_CORD_CHG, &ori); + + /*Inform the parent about the new coordinates*/ + lv_obj_t * par = lv_obj_get_parent(cont); + par->signal_func(par, LV_SIGNAL_CHILD_CHG, cont); } + } #endif diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index 3259c772f633..7fa5370c221e 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -47,13 +47,23 @@ enum }; typedef uint8_t lv_layout_t; + +typedef enum { + LV_FIT_NONE, + LV_FIT_TIGHT, + LV_FIT_FLOOD, + LV_FIT_FILL, +}lv_fit_t; + typedef struct { /*Inherited from 'base_obj' so no inherited ext. */ /*Ext. of ancestor*/ /*New data for this type */ - uint8_t layout :4; /*A layout from 'lv_cont_layout_t' enum*/ - uint8_t hor_fit :1; /*1: Enable horizontal fit to involve all children*/ - uint8_t ver_fit :1; /*1: Enable horizontal fit to involve all children*/ + uint8_t layout :4; /*A layout from 'lv_layout_t' enum*/ + uint8_t fit_left :2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_right :2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_top :2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_bottom :2; /*A fit type from `lv_fit_t` enum */ } lv_cont_ext_t; @@ -80,15 +90,41 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy); */ void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout); +/** + * Set the fit policy in all 4 directions separately. + * It tell how to change the container's size automatically. + * @param cont pointer to a container object + * @param left left fit policy from `lv_fit_t` + * @param right right fit policy from `lv_fit_t` + * @param top bottom fit policy from `lv_fit_t` + * @param bottom bottom fit policy from `lv_fit_t` + */ +void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom); /** - * Enable the horizontal or vertical fit. - * The container size will be set to involve the children horizontally or vertically. + * Set the fit policy horizontally and vertically separately. + * It tell how to change the container's size automatically. * @param cont pointer to a container object - * @param hor_en true: enable the horizontal fit - * @param ver_en true: enable the vertical fit + * @param hot horizontal fit policy from `lv_fit_t` + * @param ver vertical fit policy from `lv_fit_t` */ -void lv_cont_set_fit(lv_obj_t * cont, bool hor_en, bool ver_en); +static inline void lv_cont_set_fit2(lv_obj_t * cont, lv_fit_t hor, lv_fit_t ver) +{ + lv_cont_set_fit4(cont, hor, hor, ver, ver); +} + + +/** + * Set the fit policyin all 4 direction at once. + * It tell how to change the container's size automatically. + * @param cont pointer to a container object + * @param fit fit policy from `lv_fit_t` + */ +static inline void lv_cont_set_fit(lv_obj_t * cont, lv_fit_t fit) +{ + lv_cont_set_fit4(cont, fit, fit, fit, fit); +} + /** * Set the style of a container @@ -112,18 +148,32 @@ static inline void lv_cont_set_style(lv_obj_t *cont, lv_style_t * style) lv_layout_t lv_cont_get_layout(const lv_obj_t * cont); /** - * Get horizontal fit enable attribute of a container + * Get left fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_left(const lv_obj_t * cont); + +/** + * Get right fit mode of a container + * @param cont pointer to a container object + * @return an element of `lv_fit_t` + */ +lv_fit_t lv_cont_get_fit_right(const lv_obj_t * cont); + +/** + * Get top fit mode of a container * @param cont pointer to a container object - * @return true: horizontal fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -bool lv_cont_get_hor_fit(const lv_obj_t * cont); +lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont); /** - * Get vertical fit enable attribute of a container + * Get bottom fit mode of a container * @param cont pointer to a container object - * @return true: vertical fit is enabled; false: disabled + * @return an element of `lv_fit_t` */ -bool lv_cont_get_ver_fit(const lv_obj_t * cont); +lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont); /** diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index bd506c705ae1..96ff47e6ed24 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -104,10 +104,10 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_ddlist); lv_obj_set_drag(scrl, false); - lv_page_set_scrl_fit(new_ddlist, true, true); + lv_page_set_scrl_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); ext->label = lv_label_create(new_ddlist, NULL); - lv_cont_set_fit(new_ddlist, true, false); + lv_cont_set_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_NONE); lv_page_set_rel_action(new_ddlist, lv_ddlist_release_action); lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_DRAG); lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_HIDE); @@ -238,12 +238,11 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h) /** * Enable or disable the horizontal fit to the content * @param ddlist pointer to a drop down list - * @param en true: enable auto fit; false: disable auto fit + * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, bool en) +void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit) { - lv_cont_set_fit(ddlist, en, lv_cont_get_ver_fit(ddlist)); - lv_page_set_scrl_fit(ddlist, en, lv_page_get_scrl_fit_ver(ddlist)); + lv_cont_set_fit2(ddlist, fit, lv_cont_get_fit_top(ddlist)); lv_ddlist_refr_size(ddlist, false); } diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index a0aa62cbb54a..8d3a6599fcf1 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -117,12 +117,13 @@ void lv_ddlist_set_action(lv_obj_t * ddlist, lv_action_t action); */ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); + /** * Enable or disable the horizontal fit to the content * @param ddlist pointer to a drop down list - * @param en true: enable auto fit; false: disable auto fit + * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, bool en); +void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit); /** * Set the scroll bar mode of a drop down list diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 9bfdb2379420..04cf51f06765 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -102,6 +102,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new list object*/ if(copy == NULL) { + lv_page_set_scrl_fit2(new_list, LV_FIT_FLOOD, LV_FIT_TIGHT); lv_obj_set_size(new_list, 2 * LV_DPI, 3 * LV_DPI); lv_page_set_scrl_layout(new_list, LV_LIST_LAYOUT_DEF); lv_list_set_sb_mode(new_list, LV_SB_MODE_DRAG); @@ -198,7 +199,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_btn_set_action(liste, LV_BTN_ACTION_CLICK, rel_action); lv_page_glue_obj(liste, true); lv_btn_set_layout(liste, LV_LAYOUT_ROW_M); - lv_btn_set_fit(liste, false, true); + lv_btn_set_fit2(liste, LV_FIT_FLOOD, LV_FIT_TIGHT); lv_obj_set_protect(liste, LV_PROTECT_PRESS_LOST); lv_obj_set_signal_func(liste, lv_list_btn_signal); diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 06f15d01557d..1f09c1dbdd81 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -90,7 +90,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_label_set_text(ext->text, "Message"); lv_cont_set_layout(new_mbox, LV_LAYOUT_COL_M); - lv_cont_set_fit(new_mbox, false, true); + lv_cont_set_fit2(new_mbox, LV_FIT_NONE, LV_FIT_TIGHT); lv_obj_set_width(new_mbox, LV_HOR_RES / 2); lv_obj_align(new_mbox, NULL, LV_ALIGN_CENTER, 0, 0); @@ -220,7 +220,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) lv_obj_animate(mbox, LV_ANIM_GROW_V | LV_ANIM_OUT, ext->anim_time, delay, lv_mbox_close_end_cb); /*Disable fit to let shrinking work*/ - lv_cont_set_fit(mbox, false, false); + lv_cont_set_fit(mbox, LV_FIT_NONE); } else { lv_obj_animate(mbox, LV_ANIM_NONE, ext->anim_time, delay, lv_mbox_close_end_cb); } diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index e36ca7f48795..26d517cf60ef 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -103,7 +103,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_drag(ext->scrl, true); lv_obj_set_drag_throw(ext->scrl, true); lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST); - lv_cont_set_fit(ext->scrl, false, true); + lv_cont_set_fit4(ext->scrl, LV_FIT_NONE, LV_FIT_FILL, LV_FIT_NONE, LV_FIT_FILL); /* Add the signal function only if 'scrolling' is created * because everything has to be ready before any signal is received*/ @@ -765,7 +765,6 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - lv_style_t * style = lv_obj_get_style(page); lv_obj_t * child; if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/ child = lv_obj_get_child(page, NULL); @@ -779,12 +778,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } } } else if(sign == LV_SIGNAL_STYLE_CHG) { - /*If no hor_fit enabled set the scrollable's width to the page's width*/ - if(lv_cont_get_hor_fit(ext->scrl) == false) { - lv_obj_set_width(ext->scrl, lv_obj_get_width(page) - 2 * style->body.padding.hor); - } else { - ext->scrl->signal_func(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); - } + ext->scrl->signal_func(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); /*The scrollbars are important only if they are visible now*/ if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page); @@ -796,10 +790,6 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(ext->scrl != NULL && (lv_obj_get_width(page) != lv_area_get_width(param) || lv_obj_get_height(page) != lv_area_get_height(param))) { /*If no hor_fit enabled set the scrollable's width to the page's width*/ - if(lv_cont_get_hor_fit(ext->scrl) == false) { - lv_obj_set_width(ext->scrl, lv_obj_get_width(page) - 2 * style->body.padding.hor); - } - ext->scrl->signal_func(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); /*The scrollbars are important only if they are visible now*/ diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index 32f6104db99a..4382aafc97b9 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -173,17 +173,42 @@ void lv_page_set_scroll_propagation(lv_obj_t * page, bool en); */ void lv_page_set_edge_flash(lv_obj_t * page, bool en); + +/** + * Set the fit policy in all 4 directions separately. + * It tell how to change the page size automatically. + * @param page pointer to a page object + * @param left left fit policy from `lv_fit_t` + * @param right right fit policy from `lv_fit_t` + * @param top bottom fit policy from `lv_fit_t` + * @param bottom bottom fit policy from `lv_fit_t` + */ +static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) +{ + lv_cont_set_fit4(lv_page_get_scrl(page), left, right, top, bottom); +} + /** - * Set the fit attribute of the scrollable part of a page. - * It means it can set its size automatically to involve all children. - * (Can be set separately horizontally and vertically) + * Set the fit policy horizontally and vertically separately. + * It tell how to change the page size automatically. * @param page pointer to a page object - * @param hor_en true: enable horizontal fit - * @param ver_en true: enable vertical fit + * @param hot horizontal fit policy from `lv_fit_t` + * @param ver vertical fit policy from `lv_fit_t` + */ +static inline void lv_page_set_scrl_fit2(lv_obj_t * page, lv_fit_t hor, lv_fit_t ver) +{ + lv_cont_set_fit2(lv_page_get_scrl(page), hor, ver); +} + +/** + * Set the fit policyin all 4 direction at once. + * It tell how to change the page size automatically. + * @param page pointer to a button object + * @param fit fit policy from `lv_fit_t` */ -static inline void lv_page_set_scrl_fit(lv_obj_t *page, bool hor_en, bool ver_en) +static inline void lv_page_set_scrl_fit(lv_obj_t * page, lv_fit_t fit) { - lv_cont_set_fit(lv_page_get_scrl(page), hor_en, ver_en); + lv_cont_set_fit(lv_page_get_scrl(page), fit); } /** @@ -303,23 +328,43 @@ static inline lv_layout_t lv_page_get_scrl_layout(const lv_obj_t * page) } /** -* Get horizontal fit attribute of the scrollable part of a page -* @param page pointer to a page object -* @return true: horizontal fit is enabled; false: disabled -*/ -static inline bool lv_page_get_scrl_hor_fit(const lv_obj_t * page) + * Get the left fit mode + * @param page pointer to a page object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_page_get_scrl_fit_left(const lv_obj_t * page) { - return lv_cont_get_hor_fit(lv_page_get_scrl(page)); + return lv_cont_get_fit_left(lv_page_get_scrl(page)); } /** -* Get vertical fit attribute of the scrollable part of a page -* @param page pointer to a page object -* @return true: vertical fit is enabled; false: disabled -*/ -static inline bool lv_page_get_scrl_fit_ver(const lv_obj_t * page) + * Get the right fit mode + * @param page pointer to a page object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_page_get_scrl_fit_right(const lv_obj_t * page) +{ + return lv_cont_get_fit_right(lv_page_get_scrl(page)); +} + +/** + * Get the top fit mode + * @param page pointer to a page object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_page_get_scrl_get_fit_top(const lv_obj_t * page) +{ + return lv_cont_get_fit_top(lv_page_get_scrl(page)); +} + +/** + * Get the bottom fit mode + * @param page pointer to a page object + * @return an element of `lv_fit_t` + */ +static inline lv_fit_t lv_page_get_scrl_fit_bottom(const lv_obj_t * page) { - return lv_cont_get_ver_fit(lv_page_get_scrl(page)); + return lv_cont_get_fit_bottom(lv_page_get_scrl(page)); } /** diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 1f8a75e2e12b..cb5960d20638 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -84,8 +84,8 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_roller); lv_obj_set_drag(scrl, true); /*In ddlist is might be disabled*/ - lv_page_set_rel_action(new_roller, NULL); /*Roller don't uses it (like ddlist)*/ - lv_page_set_scrl_fit(new_roller, true, false); /*Height is specified directly*/ + lv_page_set_rel_action(new_roller, NULL); /*Roller don't uses it (like ddlist)*/ + lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_ANIM_TIME); lv_roller_set_visible_row_count(new_roller, 3); @@ -209,7 +209,7 @@ lv_label_align_t lv_roller_get_align(const lv_obj_t * roller) */ bool lv_roller_get_hor_fit(const lv_obj_t * roller) { - return lv_page_get_scrl_hor_fit(roller); + return lv_page_get_scrl_fit_left(roller); } /** diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 6ec094b7d157..43e12c0727bc 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -115,6 +115,8 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new text area object*/ if(copy == NULL) { + lv_page_set_scrl_fit2(new_ta, LV_FIT_FLOOD, LV_FIT_TIGHT); + ext->label = lv_label_create(new_ta, NULL); lv_obj_set_design_func(ext->page.scrl, lv_ta_scrollable_design); @@ -607,7 +609,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) lv_coord_t font_h = lv_font_get_height(style_label->text.font); ext->one_line = 1; - lv_page_set_scrl_fit(ta, true, true); + lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); lv_obj_set_height(ta, font_h + (style_ta->body.padding.ver + style_scrl->body.padding.ver) * 2); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND); if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND); @@ -616,7 +618,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) lv_style_t * style_ta = lv_obj_get_style(ta); ext->one_line = 0; - lv_page_set_scrl_fit(ta, false, true); + lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_TIGHT); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_BREAK); if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK); @@ -645,19 +647,18 @@ void lv_ta_set_text_align(lv_obj_t * ta, lv_label_align_t align) /*Normal left align. Just let the text expand*/ if(align == LV_LABEL_ALIGN_LEFT) { lv_label_set_long_mode(label, LV_LABEL_LONG_EXPAND); - lv_page_set_scrl_fit(ta, true, false); + lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); lv_label_set_align(label, align); } /*Else use fix label width equal to the Text area width*/ else { lv_label_set_long_mode(label, LV_LABEL_LONG_CROP); - lv_page_set_scrl_fit(ta, false, false); - lv_page_set_scrl_width(ta, 1); /*To refresh the scrollable's width*/ + lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_FLOOD); lv_label_set_align(label, align); lv_style_t * bg_style = lv_ta_get_style(ta, LV_TA_STYLE_BG); - lv_obj_set_width(label, lv_obj_get_width(ta) - 2 * bg_style->body.padding.hor); + lv_obj_set_width(label, lv_page_get_fit_width(ta)); } } diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 9c66e622431b..1ba09268f472 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -120,7 +120,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_click(ext->indic, false); ext->content = lv_cont_create(new_tabview, NULL); - lv_cont_set_fit(ext->content, true, false); + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); lv_cont_set_style(ext->content, &lv_style_transp_tight); lv_obj_set_height(ext->content, LV_VER_RES - lv_obj_get_height(ext->btns)); diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index c6c0ed98abad..9528a17ed4a3 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -91,7 +91,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_set_size(new_tileview, LV_HOR_RES, LV_VER_RES); lv_obj_set_drag_throw(lv_page_get_scrl(new_tileview), false); - lv_page_set_scrl_fit(new_tileview, true, true); + lv_page_set_scrl_fit(new_tileview, LV_FIT_TIGHT); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { From ddbd8386d2b9b77aa9474ede5abee0393ba60a00 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 06:41:00 +0100 Subject: [PATCH 048/590] lv_page: fixes when child is added --- lv_objx/lv_cont.h | 8 ++++---- lv_objx/lv_page.c | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index 7fa5370c221e..cf78574b5867 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -49,10 +49,10 @@ typedef uint8_t lv_layout_t; typedef enum { - LV_FIT_NONE, - LV_FIT_TIGHT, - LV_FIT_FLOOD, - LV_FIT_FILL, + LV_FIT_NONE, /*Do not change the size automatically*/ + LV_FIT_TIGHT, /*Involve the children*/ + LV_FIT_FLOOD, /*Align the size to the parent's edge*/ + LV_FIT_FILL, /*Align the size to the parent's edge first but if there is an object out of it then involve it*/ }lv_fit_t; typedef struct diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 26d517cf60ef..46b9a2c33704 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -103,7 +103,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_drag(ext->scrl, true); lv_obj_set_drag_throw(ext->scrl, true); lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST); - lv_cont_set_fit4(ext->scrl, LV_FIT_NONE, LV_FIT_FILL, LV_FIT_NONE, LV_FIT_FILL); + lv_cont_set_fit4(ext->scrl, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL); /* Add the signal function only if 'scrolling' is created * because everything has to be ready before any signal is received*/ @@ -772,6 +772,14 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) { lv_obj_t * tmp = child; child = lv_obj_get_child(page, child); /*Get the next child before move this*/ + + /*Reposition the child to take padding into account*/ + lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + child->coords.x1 += style->body.padding.hor; + child->coords.x2 += style->body.padding.hor; + child->coords.y1 += style->body.padding.ver; + child->coords.y2 += style->body.padding.ver; + lv_obj_set_parent(tmp, ext->scrl); } else { child = lv_obj_get_child(page, child); From 9141d95865a84b0d225b3d293d8803e10a414de7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 07:06:22 +0100 Subject: [PATCH 049/590] lv_cont: inform children about parent size change on autofit --- lv_core/lv_obj.c | 3 +-- lv_objx/lv_cont.c | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 16e7433f222c..914ef64dee99 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -624,8 +624,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) lv_obj_t * par = lv_obj_get_parent(obj); if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj); - - /*Tell the children the paren's size has changed*/ + /*Tell the children the parent's size has changed*/ lv_obj_t * i; LL_READ(obj->child_ll, i) { i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 41255b789612..f45a9cb010be 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -710,6 +710,12 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) /*Inform the parent about the new coordinates*/ lv_obj_t * par = lv_obj_get_parent(cont); par->signal_func(par, LV_SIGNAL_CHILD_CHG, cont); + + /*Tell the children the parent's size has changed*/ + lv_obj_t * i; + LL_READ(cont->child_ll, i) { + i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + } } } From 054e43e6e9bdfbf0f15193c494844fa11e8f6cd9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 21:20:51 +0100 Subject: [PATCH 050/590] indev/disp cb: pass driver as first argument --- lv_core/lv_refr.c | 8 ++++---- lv_draw/lv_draw_basic.c | 12 ++++++------ lv_hal/lv_hal_disp.c | 7 ++++--- lv_hal/lv_hal_disp.h | 16 +++++++++------- lv_hal/lv_hal_indev.c | 2 +- lv_hal/lv_hal_indev.h | 13 +++++++------ 6 files changed, 31 insertions(+), 27 deletions(-) diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index d17d83917411..7ac2c6c14551 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -101,7 +101,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) /*The area is truncated to the screen*/ if(suc != false) { - if(disp->driver.rounder_cb) disp->driver.rounder_cb(disp_refr, &com_area); + if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp_refr->driver, &com_area); /*Save only if this area is not in one of the saved areas*/ uint16_t i; @@ -192,7 +192,7 @@ static void lv_refr_task(void * param) /*Call monitor cb if present*/ if(disp_refr->driver.monitor_cb) { - disp_refr->driver.monitor_cb(disp_refr, lv_tick_elaps(start), px_num); + disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num); } } } @@ -297,7 +297,7 @@ static void lv_refr_area(const lv_area_t * area_p) lv_coord_t y_tmp = max_row; do { tmp.y2 = y_tmp; - disp_refr->driver.rounder_cb(disp_refr, &tmp); + disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp); y_tmp --; /*Decrement the number of line until it is rounded to a smaller (or equal) value then the original. */ } while(lv_area_get_height(&tmp) > max_row && y_tmp != 0); @@ -539,7 +539,7 @@ static void lv_refr_vdb_flush(void) /*Flush the rendered content to the display*/ lv_disp_t * disp = lv_refr_get_disp_refreshing(); - if(disp->driver.flush_cb) disp->driver.flush_cb(disp, &vdb->area, vdb->buf_act); + if(disp->driver.flush_cb) disp->driver.flush_cb(&disp->driver, &vdb->area, vdb->buf_act); if(vdb->buf1 && vdb->buf2) { diff --git a/lv_draw/lv_draw_basic.c b/lv_draw/lv_draw_basic.c index f675e54b5481..31b8ba481082 100644 --- a/lv_draw/lv_draw_basic.c +++ b/lv_draw/lv_draw_basic.c @@ -87,7 +87,7 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t y -= vdb->area.y1; if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, x, y, color, opa); } else { lv_color_t * vdb_px_p = vdb->buf_act; vdb_px_p += y * vdb_width + x; @@ -336,7 +336,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, } if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); } else { @@ -434,7 +434,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]); - disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); } map_p += map_width * px_size_byte; /*Next row on the map*/ } @@ -497,7 +497,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, } /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); } /*Normal native VDB write*/ else { @@ -507,7 +507,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, } else { /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(disp, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); } /*Normal native VDB write*/ else { @@ -571,7 +571,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ if(disp->driver.set_px_cb) { for(col = fill_area->x1; col <= fill_area->x2; col++) { for(row = fill_area->y1; row <= fill_area->y2; row++) { - disp->driver.set_px_cb(disp, (uint8_t *)mem, mem_width, col, row, color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, opa); } } } else { diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 82e597fb38f6..339f2853e755 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -180,11 +180,12 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) } /** - * Call in the display driver's `flush` function when the flushing is finished + * Call in the display driver's `flush_cb` function when the flushing is finished + * @param disp_drv pointer to display driver in `flush_cb` where this function is called */ -LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_t * disp) +LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv) { - disp->driver.buffer->flushing = 0; + disp_drv->buffer->flushing = 0; /*If the screen is transparent initialize it when the flushing is ready*/ #if LV_COLOR_SCREEN_TRANSP diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 0f83d82a26b2..0fed2c4549a0 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -38,6 +38,7 @@ extern "C" { **********************/ struct _disp_t; +struct _disp_drv_t; typedef struct @@ -67,22 +68,22 @@ typedef struct _disp_drv_t { lv_disp_buf_t * buffer; /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ - void (*flush_cb)(struct _disp_t * disp, const lv_area_t * area, lv_color_t * color_p); + void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); lv_disp_user_data_t flush_user_data; /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ - void (*rounder_cb)(struct _disp_t * disp, lv_area_t * area); + void (*rounder_cb)(struct _disp_drv_t * disp_drv, lv_area_t * area); lv_disp_user_data_t rounder_user_data; /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * Note: Much slower then drawing with supported color formats. */ - void (*set_px_cb)(struct _disp_t * disp, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); + void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); lv_disp_user_data_t set_px_user_data; - /* Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ - void (*monitor_cb)(struct _disp_t * disp, uint32_t time, uint32_t px); + /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ + void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); lv_disp_user_data_t monitor_user_data; #if USE_LV_GPU @@ -178,9 +179,10 @@ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); /** - * Call in the display driver's `flush` function when the flushing is finished + * Call in the display driver's `flush_cb` function when the flushing is finished + * @param disp_drv pointer to display driver in `flush_cb` where this function is called */ -LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_t * disp); +LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv); /** diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 2604bc08c311..7ee8530e3ac4 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -113,7 +113,7 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data) if(indev->driver.read_cb) { LV_LOG_TRACE("idnev read started"); - cont = indev->driver.read_cb(indev, data); + cont = indev->driver.read_cb(&indev->driver, data); LV_LOG_TRACE("idnev read finished"); } else { LV_LOG_WARN("indev function registered"); diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index a9208d997a30..ed488ba96dd5 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -33,8 +33,10 @@ extern "C" { * TYPEDEFS **********************/ +struct _lv_obj_t; struct _disp_t; struct _lv_indev_t; +struct _lv_indev_drv_t; /*Possible input device types*/ enum { @@ -67,14 +69,13 @@ typedef struct { } lv_indev_data_t; /*Initialized by the user and registered by 'lv_indev_add()'*/ -typedef struct { - lv_hal_indev_type_t type; /*Input device type*/ - bool (*read_cb)(struct _lv_indev_t * indev, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ - lv_indev_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ - struct _disp_t * disp; +typedef struct _lv_indev_drv_t { + lv_hal_indev_type_t type; /*Input device type*/ + bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ + lv_indev_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ + struct _disp_t * disp; /*Pointer to the assigned display*/ } lv_indev_drv_t; -struct _lv_obj_t; /*Run time data of input devices*/ typedef struct _lv_indev_proc_t { From 408ba8d574395dde724b717405c978d9f7d67fd0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 22:22:37 +0100 Subject: [PATCH 051/590] i18n: minor API updates --- lv_core/lv_i18n.c | 22 ++++++++++++++-------- lv_core/lv_i18n.h | 8 ++++++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 307656cff42e..8d7cf1b664a0 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -28,7 +28,7 @@ static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * /********************** * STATIC VARIABLES **********************/ -static const lv_i18n_lang_t ** languages; +static const lv_i18n_lang_pack_t * languages; static const lv_i18n_lang_t * local_lang; /********************** @@ -42,32 +42,36 @@ static const lv_i18n_lang_t * local_lang; /** * Set the languages for internationalization * @param langs pointer to the array of languages. (Last element has to be `NULL`) + * @return 0: no error; < 0: error */ -void lv_i18n_init(const lv_i18n_lang_t ** langs) +int lv_i18n_init(const lv_i18n_lang_pack_t * langs) { if(langs == NULL) { LV_LOG_WARN("lv_i18n_init: `langs` can't be NULL"); - return; + return -1; } if(langs[0] == NULL) { - LV_LOG_WARN("lv_i18n_init: `langs` need to contain at lest one translation"); - return; + LV_LOG_WARN("lv_i18n_init: `langs` need to contain at least one translation"); + return -1; } languages = langs; local_lang = langs[0]; /*Automatically select the first language*/ + + return 0; } /** * Change the localization (language) * @param lang_code name of the translation to use. E.g. "en_GB" + * @return 0: no error; < 0: error */ -void lv_i18n_set_local(const char * lang_code) +int lv_i18n_set_local(const char * lang_code) { if(languages == NULL) { LV_LOG_WARN("lv_i18n_set_local: The languages are not set with lv_i18n_init() yet"); - return; + return -1; } uint16_t i; @@ -78,12 +82,14 @@ void lv_i18n_set_local(const char * lang_code) /*The language wasn't found*/ if(languages[i] == NULL) { LV_LOG_WARN("lv_i18n_set_local: The selected language doesn't found"); - return; + return -1; } local_lang = languages[i]; LV_LOG_INFO("lv_i18n_set_local: new local selected") + + return 0; } /** diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 25a6e7f2103d..043a493490b6 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -54,6 +54,8 @@ typedef struct { uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ }lv_i18n_lang_t; +typedef lv_i18n_lang_t * lv_i18n_lang_pack_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -61,14 +63,16 @@ typedef struct { /** * Set the languages for internationalization * @param langs pointer to the array of languages. (Last element has to be `NULL`) + * @return 0: no error; < 0: error */ -void lv_i18n_init(const lv_i18n_lang_t ** langs); +int lv_i18n_init(const lv_i18n_lang_pack_t * langs); /** * Change the localization (language) * @param lang_code name of the translation to use. E.g. "en_GB" + * @return 0: no error; < 0: error */ -void lv_i18n_set_local(const char * lang_code); +int lv_i18n_set_local(const char * lang_code); /** * Get the translation from a message ID From 72288f445051442ccbb1db2c7e0ccec1faddf499 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Feb 2019 22:27:51 +0100 Subject: [PATCH 052/590] i18n: fix warnings --- lv_core/lv_i18n.c | 4 ++-- lv_core/lv_i18n.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 8d7cf1b664a0..1a75869de0ca 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -23,7 +23,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id); +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id); /********************** * STATIC VARIABLES @@ -238,7 +238,7 @@ const void * lv_i18n_get_current_local(void) * STATIC FUNCTIONS **********************/ -static const void * lv_i18n_get_text_core(lv_i18n_trans_t * trans, const char * msg_id) +static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id) { uint16_t i; for(i = 0; trans[i].msg_id != NULL; i++) { diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 043a493490b6..894213bc0790 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -49,12 +49,12 @@ typedef struct { typedef struct { const char * name; /*E.g. "en_GB"*/ - lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ - lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ + const lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ + const lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ }lv_i18n_lang_t; -typedef lv_i18n_lang_t * lv_i18n_lang_pack_t; +typedef const lv_i18n_lang_t * lv_i18n_lang_pack_t; /********************** * GLOBAL PROTOTYPES From 54778eb3037fc767e56d1eb99f5204b2d5f5455f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Feb 2019 06:50:20 +0100 Subject: [PATCH 053/590] update lv_conf files --- lv_conf_checker.h | 191 +++++++++++++++--------------------------- lv_conf_templ.h | 105 +++++++++++------------ lv_core/lv_disp.h | 40 +++++++++ lv_core/lv_indev.c | 11 +-- lv_hal/lv_hal_disp.h | 8 +- lv_hal/lv_hal_indev.h | 2 +- 6 files changed, 165 insertions(+), 192 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index fa8748d8f886..a04afe74511c 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -6,6 +6,50 @@ #ifndef LV_CONF_CHECKER_H #define LV_CONF_CHECKER_H + +/*=================== + Graphical settings + *===================*/ + +/* Horizontal and vertical resolution of the library.*/ +#ifndef LV_HOR_RES_MAX +#define LV_HOR_RES_MAX (480) +#endif +#ifndef LV_VER_RES_MAX +#define LV_VER_RES_MAX (320) +#endif + +/*Color settings*/ +#ifndef LV_COLOR_DEPTH +#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ +#endif +#ifndef LV_COLOR_16_SWAP +#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ +#endif +#ifndef LV_COLOR_SCREEN_TRANSP +#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ +#endif +#ifndef LV_COLOR_TRANSP +#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ +#endif + +/* Enable anti-aliasing (lines, and radiuses will be smoothed) */ +#ifndef LV_ANTIALIAS +#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ +#endif + + +/*Screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ +#ifndef LV_REFR_PERIOD +#define LV_REFR_PERIOD 30 /*[ms]*/ +#endif + +/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide + * (Not so important, you can adjust it to modify default sizes and spaces)*/ +#ifndef LV_DPI +#define LV_DPI 100 /*[px]*/ +#endif + /*=================== Dynamic memory *===================*/ @@ -17,7 +61,7 @@ #endif #if LV_MEM_CUSTOM == 0 #ifndef LV_MEM_SIZE -# define LV_MEM_SIZE (64U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (16U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ #endif #ifndef LV_MEM_ATTR # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ @@ -57,96 +101,13 @@ #endif #endif /* LV_ENABLE_GC */ -/*=================== - Graphical settings - *===================*/ - -/* Horizontal and vertical resolution of the library.*/ -#ifndef LV_HOR_RES -//#define LV_HOR_RES (480) -#endif -#ifndef LV_VER_RES -//#define LV_VER_RES (320) -#endif - -/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide - * (Not so important, you can adjust it to modify default sizes and spaces)*/ -#ifndef LV_DPI -#define LV_DPI 100 -#endif - -/* Enable anti-aliasing (lines, and radiuses will be smoothed) */ -#ifndef LV_ANTIALIAS -#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ -#endif - -/*Screen refresh period in milliseconds*/ -#ifndef LV_REFR_PERIOD -#define LV_REFR_PERIOD 30 -#endif - -/*----------------- - * VDB settings - *----------------*/ - -/* VDB (Virtual Display Buffer) is an internal graphics buffer. - * The GUI will be drawn into this buffer first and then - * the buffer will be passed to your `disp_drv.disp_flush` function to - * copy it to your frame buffer. - * VDB is required for: buffered drawing, opacity, anti-aliasing and shadows - * Learn more: https://docs.littlevgl.com/#Drawing*/ - -/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES - * Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions - * will be called to draw to the frame buffer directly*/ -#ifndef LV_VDB_SIZE -//#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10) -#endif - - /* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays. - * Special formats are handled with `disp_drv.vdb_wr`)*/ -#ifndef LV_VDB_PX_BPP -#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */ -#endif - - /* Place VDB to a specific address (e.g. in external RAM) - * 0: allocate automatically into RAM - * LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/ -#ifndef LV_VDB_ADR -//#define LV_VDB_ADR 0 -#endif - -/* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing - * The flushing should use DMA to write the frame buffer in the background */ -#ifndef LV_VDB_DOUBLE -#define LV_VDB_DOUBLE 0 -#endif - -/* Place VDB2 to a specific address (e.g. in external RAM) - * 0: allocate automatically into RAM - * LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/ -#ifndef LV_VDB2_ADR -#define LV_VDB2_ADR 0 -#endif - -/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen. - * Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display. - * The best if you do in the blank period of you display to avoid tearing effect. - * Requires: - * - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES - * - LV_VDB_DOUBLE = 1 - */ -#ifndef LV_VDB_TRUE_DOUBLE_BUFFERED -#define LV_VDB_TRUE_DOUBLE_BUFFERED 0 -#endif - /*================= Misc. setting *=================*/ /*Input device settings*/ #ifndef LV_INDEV_READ_PERIOD -#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/ +#define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ #endif #ifndef LV_INDEV_POINT_MARKER #define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ @@ -164,20 +125,6 @@ #define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ #endif -/*Color settings*/ -#ifndef LV_COLOR_DEPTH -#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ -#endif -#ifndef LV_COLOR_16_SWAP -#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ -#endif -#ifndef LV_COLOR_SCREEN_TRANSP -#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ -#endif -#ifndef LV_COLOR_TRANSP -#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ -#endif - /*Text settings*/ #ifndef LV_TXT_UTF8 #define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */ @@ -208,14 +155,11 @@ #ifndef USE_LV_GPU #define USE_LV_GPU 1 /*1: Enable GPU interface*/ #endif -#ifndef USE_LV_REAL_DRAW -#define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/ -#endif #ifndef USE_LV_FILESYSTEM #define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #endif -#ifndef USE_LV_MULTI_LANG -#define USE_LV_MULTI_LANG 0 /* Number of languages for labels to store (0: to disable this feature)*/ +#ifndef USE_LV_I18N +#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ #endif /*Compiler settings*/ @@ -225,9 +169,6 @@ #ifndef LV_ATTRIBUTE_TASK_HANDLER #define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */ #endif -#ifndef LV_ATTRIBUTE_MEM_ALIGN -#define LV_ATTRIBUTE_MEM_ALIGN /* With size optimization (-Os) the compiler might not align data to 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/ -#endif #ifndef LV_COMPILER_VLA_SUPPORTED #define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/ #endif @@ -241,13 +182,15 @@ #endif #if LV_TICK_CUSTOM == 1 #ifndef LV_TICK_CUSTOM_INCLUDE -#define LV_TICK_CUSTOM_INCLUDE "sonething.h" /*Header for the sys time function*/ +#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/ #endif #ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/ #endif -#endif /*LV_TICK_CUSTOM*/ +#endif /*LV_TICK_CUSTOM*/ +typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ /*Log settings*/ #ifndef USE_LV_LOG @@ -257,14 +200,14 @@ /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events - * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem + * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail */ #ifndef LV_LOG_LEVEL # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN #endif -/* 1: Print the log with 'printf'; 0: user need to register a callback*/ +/* 1: Print the log with 'printf'; 0: user need to register a callback*/ #ifndef LV_LOG_PRINTF # define LV_LOG_PRINTF 0 #endif @@ -274,7 +217,7 @@ * THEME USAGE *================*/ #ifndef LV_THEME_LIVE_UPDATE -#define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ +#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #endif #ifndef USE_LV_THEME_TEMPL @@ -310,16 +253,16 @@ * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ #ifndef USE_LV_FONT_DEJAVU_10 -#define USE_LV_FONT_DEJAVU_10 4 +#define USE_LV_FONT_DEJAVU_10 0 #endif #ifndef USE_LV_FONT_DEJAVU_10_LATIN_SUP -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 4 +#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 #endif #ifndef USE_LV_FONT_DEJAVU_10_CYRILLIC -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 4 +#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 #endif #ifndef USE_LV_FONT_SYMBOL_10 -#define USE_LV_FONT_SYMBOL_10 4 +#define USE_LV_FONT_SYMBOL_10 0 #endif #ifndef USE_LV_FONT_DEJAVU_20 @@ -336,29 +279,29 @@ #endif #ifndef USE_LV_FONT_DEJAVU_30 -#define USE_LV_FONT_DEJAVU_30 4 +#define USE_LV_FONT_DEJAVU_30 0 #endif #ifndef USE_LV_FONT_DEJAVU_30_LATIN_SUP -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 4 +#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 #endif #ifndef USE_LV_FONT_DEJAVU_30_CYRILLIC -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 4 +#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 #endif #ifndef USE_LV_FONT_SYMBOL_30 -#define USE_LV_FONT_SYMBOL_30 4 +#define USE_LV_FONT_SYMBOL_30 0 #endif #ifndef USE_LV_FONT_DEJAVU_40 -#define USE_LV_FONT_DEJAVU_40 4 +#define USE_LV_FONT_DEJAVU_40 0 #endif #ifndef USE_LV_FONT_DEJAVU_40_LATIN_SUP -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 4 +#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 #endif #ifndef USE_LV_FONT_DEJAVU_40_CYRILLIC -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 4 +#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 #endif #ifndef USE_LV_FONT_SYMBOL_40 -#define USE_LV_FONT_SYMBOL_40 4 +#define USE_LV_FONT_SYMBOL_40 0 #endif #ifndef USE_LV_FONT_MONOSPACE_8 diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 79064806724b..80c7bc397137 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -9,8 +9,35 @@ #if 0 /*Set it to "1" to enable content*/ + #ifndef LV_CONF_H #define LV_CONF_H + +/*=================== + Graphical settings + *===================*/ + +/* Horizontal and vertical resolution of the library.*/ +#define LV_HOR_RES_MAX (480) +#define LV_VER_RES_MAX (320) + +/*Color settings*/ +#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ +#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ +#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ +#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ + +/* Enable anti-aliasing (lines, and radiuses will be smoothed) */ +#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ + + +/*Screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ +#define LV_REFR_PERIOD 30 /*[ms]*/ + +/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide + * (Not so important, you can adjust it to modify default sizes and spaces)*/ +#define LV_DPI 100 /*[px]*/ + /*=================== Dynamic memory *===================*/ @@ -19,7 +46,7 @@ * to store the graphical objects and other data */ #define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ #if LV_MEM_CUSTOM == 0 -# define LV_MEM_SIZE (64U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (16U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ # define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/ # define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ @@ -38,42 +65,18 @@ # define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ #endif /* LV_ENABLE_GC */ -/*=================== - Graphical settings - *===================*/ - -/* Horizontal and vertical resolution of the library.*/ -#define LV_HOR_RES_MAX (480) -#define LV_VER_RES_MAX (320) - -/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide - * (Not so important, you can adjust it to modify default sizes and spaces)*/ -#define LV_DPI 100 - -/* Enable anti-aliasing (lines, and radiuses will be smoothed) */ -#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ - -/*Screen refresh period in milliseconds*/ -#define LV_REFR_PERIOD 30 - /*================= Misc. setting *=================*/ /*Input device settings*/ -#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/ +#define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ #define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ -#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%] (must be > 0). Greater value means faster slow-down */ +#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ #define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ #define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ -/*Color settings*/ -#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ -#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ -#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ -#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ - /*Text settings*/ #define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */ #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ @@ -86,24 +89,24 @@ #define USE_LV_SHADOW 1 /*1: Enable shadows*/ #define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ #define USE_LV_GPU 1 /*1: Enable GPU interface*/ -#define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define USE_LV_MULTI_LANG 0 /* Number of languages for labels to store (0: to disable this feature)*/ +#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ /*Compiler settings*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ #define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */ -#define LV_ATTRIBUTE_MEM_ALIGN /* With size optimization (-Os) the compiler might not align data to 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/ #define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/ #define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */ /*HAL settings*/ #define LV_TICK_CUSTOM 0 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */ #if LV_TICK_CUSTOM == 1 -#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/ +#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/ -#endif /*LV_TICK_CUSTOM*/ +#endif /*LV_TICK_CUSTOM*/ +typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ /*Log settings*/ #define USE_LV_LOG 1 /*Enable/disable the log module*/ @@ -111,19 +114,19 @@ /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events - * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem + * LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem * LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail */ # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN -/* 1: Print the log with 'printf'; 0: user need to register a callback*/ +/* 1: Print the log with 'printf'; 0: user need to register a callback*/ # define LV_LOG_PRINTF 0 #endif /*USE_LV_LOG*/ /*================ * THEME USAGE *================*/ -#define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ +#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #define USE_LV_THEME_TEMPL 0 /*Just for test*/ #define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ @@ -141,25 +144,25 @@ /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#define USE_LV_FONT_DEJAVU_10 4 -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 4 -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 4 -#define USE_LV_FONT_SYMBOL_10 4 +#define USE_LV_FONT_DEJAVU_10 0 +#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 +#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 +#define USE_LV_FONT_SYMBOL_10 0 #define USE_LV_FONT_DEJAVU_20 4 #define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 #define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 #define USE_LV_FONT_SYMBOL_20 4 -#define USE_LV_FONT_DEJAVU_30 4 -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 4 -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 4 -#define USE_LV_FONT_SYMBOL_30 4 +#define USE_LV_FONT_DEJAVU_30 0 +#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 +#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 +#define USE_LV_FONT_SYMBOL_30 0 -#define USE_LV_FONT_DEJAVU_40 4 -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 4 -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 4 -#define USE_LV_FONT_SYMBOL_40 4 +#define USE_LV_FONT_DEJAVU_40 0 +#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 +#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 +#define USE_LV_FONT_SYMBOL_40 0 #define USE_LV_FONT_MONOSPACE_8 1 @@ -339,13 +342,6 @@ /************************* * Non-user section *************************/ - -#if LV_INDEV_DRAG_THROW <= 0 -#warning "LV_INDEV_DRAG_THROW must be greater than 0" -#undef LV_INDEV_DRAG_THROW -#define LV_INDEV_DRAG_THROW 1 -#endif - #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ # define _CRT_SECURE_NO_WARNINGS #endif @@ -357,4 +353,5 @@ #endif /*LV_CONF_H*/ + #endif /*End of "Content enable"*/ diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index def7bceed30c..e304fc43e2b0 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -62,10 +62,50 @@ lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp); */ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); +/*------------------------------------------------ + * To improve backward compatibility + * Recommended only if you have one display + *------------------------------------------------*/ + +/** + * Get the active screen of the default display + * @return pointer to the active screen + */ +static inline lv_obj_t * lv_scr_act(void) +{ + return lv_disp_get_scr_act(lv_disp_get_default()); + +} + +/** + * Get the top layer of the default display + * @return pointer to the top layer + */ +static inline lv_obj_t * lv_top_layer(void) +{ + return lv_disp_get_layer_top(lv_disp_get_default()); +} + +/** + * Get the active screen of the deafult display + * @return pointer to the sys layer + */ +static inline lv_obj_t * lv_sys_layer(void) +{ + return lv_disp_get_layer_sys(lv_disp_get_default()); +} + /********************** * MACROS **********************/ +/*------------------------------------------------ + * To improve backward compatibility + * Recommended only if you have one display + *------------------------------------------------*/ + +#define LV_HOR_RES (lv_disp_get_hor_res(lv_disp_get_default());) +#define LV_VER_RES (lv_disp_get_ver_res(lv_disp_get_default());) #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 989277c64549..15ddf39ad676 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -550,15 +550,8 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) /*Still the same point is pressed*/ if(i->proc.last_point.x == i->proc.act_point.x && i->proc.last_point.y == i->proc.act_point.y && - data->state == LV_INDEV_STATE_PR) { -#if LV_INDEV_POINT_MARKER != 0 - lv_area_t area; - area.x1 = i->proc.act_point.x - (LV_INDEV_POINT_MARKER >> 1); - area.y1 = i->proc.act_point.y - (LV_INDEV_POINT_MARKER >> 1); - area.x2 = i->proc.act_point.x + ((LV_INDEV_POINT_MARKER >> 1) | 0x1); - area.y2 = i->proc.act_point.y + ((LV_INDEV_POINT_MARKER >> 1) | 0x1); - lv_rfill(&area, NULL, LV_COLOR_MAKE(0xFF, 0, 0), LV_OPA_COVER); -#endif + data->state == LV_INDEV_STATE_PR) + { indev_proc_press(&i->proc); } else { /*If a new point comes always make a release*/ diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 0fed2c4549a0..4b820e49c45a 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -69,22 +69,22 @@ typedef struct _disp_drv_t { /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); - lv_disp_user_data_t flush_user_data; + lv_disp_drv_user_data_t flush_user_data; /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ void (*rounder_cb)(struct _disp_drv_t * disp_drv, lv_area_t * area); - lv_disp_user_data_t rounder_user_data; + lv_disp_drv_user_data_t rounder_user_data; /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * Note: Much slower then drawing with supported color formats. */ void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); - lv_disp_user_data_t set_px_user_data; + lv_disp_drv_user_data_t set_px_user_data; /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); - lv_disp_user_data_t monitor_user_data; + lv_disp_drv_user_data_t monitor_user_data; #if USE_LV_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index ed488ba96dd5..7fb63870614e 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -72,7 +72,7 @@ typedef struct { typedef struct _lv_indev_drv_t { lv_hal_indev_type_t type; /*Input device type*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ - lv_indev_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ + lv_indev_drv_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ struct _disp_t * disp; /*Pointer to the assigned display*/ } lv_indev_drv_t; From eb33596d0224e9ea04490e5806cc547e305bf330 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Feb 2019 07:06:05 +0100 Subject: [PATCH 054/590] add USE_LV_USER_DATA_SINGLE/MULTI --- lv_conf_checker.h | 6 ++++++ lv_conf_templ.h | 6 ++---- lv_hal/lv_hal_disp.h | 14 +++++++++++--- lv_hal/lv_hal_indev.h | 7 +++++++ 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index a04afe74511c..b818dd1c8564 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -161,6 +161,12 @@ #ifndef USE_LV_I18N #define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ #endif +#ifndef USE_LV_USER_DATA_SINGLE +#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#endif +#ifndef USE_LV_USER_DATA_MULTI +#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#endif /*Compiler settings*/ #ifndef LV_ATTRIBUTE_TICK_INC diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 41ce92743e87..cce4c48b7957 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -90,11 +90,9 @@ #define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ #define USE_LV_GPU 1 /*1: Enable GPU interface*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -<<<<<<< HEAD #define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ -======= -#define USE_LV_I18N 0 /*1: Enable InternationalizatioN (multi-language) support*/ ->>>>>>> i18n +#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ /*Compiler settings*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 4b820e49c45a..a7e337a702c6 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -69,22 +69,30 @@ typedef struct _disp_drv_t { /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); - lv_disp_drv_user_data_t flush_user_data; /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements * E.g. round `y` to, 8, 16 ..) on a monochrome display*/ void (*rounder_cb)(struct _disp_drv_t * disp_drv, lv_area_t * area); - lv_disp_drv_user_data_t rounder_user_data; /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * Note: Much slower then drawing with supported color formats. */ void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); - lv_disp_drv_user_data_t set_px_user_data; /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); + + +#if USE_LV_USER_DATA_SINGLE + lv_disp_drv_user_data_t user_data; +#endif + +#if USE_LV_USER_DATA_MULTI + lv_disp_drv_user_data_t flush_user_data; + lv_disp_drv_user_data_t rounder_user_data; + lv_disp_drv_user_data_t set_px_user_data; lv_disp_drv_user_data_t monitor_user_data; +#endif #if USE_LV_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 7fb63870614e..42cadc6ea4b1 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -72,7 +72,14 @@ typedef struct { typedef struct _lv_indev_drv_t { lv_hal_indev_type_t type; /*Input device type*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ + +#if USE_LV_USER_DATA_MULTI lv_indev_drv_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ +#endif + +#if USE_LV_USER_DATA_SINGLE + lv_indev_drv_user_data_t user_data; +#endif struct _disp_t * disp; /*Pointer to the assigned display*/ } lv_indev_drv_t; From 2aa5f67381fdb29e5be3ebbfcad7de467267f629 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 25 Feb 2019 09:26:27 +0100 Subject: [PATCH 055/590] remove unused variable --- lv_objx/lv_ta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 2465524a1818..a5a50c99f739 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -658,7 +658,6 @@ void lv_ta_set_text_align(lv_obj_t * ta, lv_label_align_t align) lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_FLOOD); lv_label_set_align(label, align); - lv_style_t * bg_style = lv_ta_get_style(ta, LV_TA_STYLE_BG); lv_obj_set_width(label, lv_page_get_fit_width(ta)); } } From a6821a6cb8b070af6024c76d97197b6601d99648 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Feb 2019 15:21:41 +0100 Subject: [PATCH 056/590] lv_i18n: update void returns to char --- lv_core/lv_i18n.c | 6 +++--- lv_core/lv_i18n.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 1a75869de0ca..c7fdb647d56c 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -97,7 +97,7 @@ int lv_i18n_set_local(const char * lang_code) * @param msg_id message ID * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text(const char * msg_id) +const char * lv_i18n_get_text(const char * msg_id) { if(local_lang == NULL) { LV_LOG_WARN("lv_i18n_get_text: No language selected"); @@ -154,7 +154,7 @@ const void * lv_i18n_get_text(const char * msg_id) * @param num an integer to select the correct plural form * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) +const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num) { if(local_lang == NULL) { LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); @@ -228,7 +228,7 @@ const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) * Get the name of the currently used localization. * @return name of the currently used localization. E.g. "en_GB" */ -const void * lv_i18n_get_current_local(void) +const char * lv_i18n_get_current_local(void) { if(local_lang) return local_lang->name; else return NULL; diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 894213bc0790..15b822c41b94 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -79,7 +79,7 @@ int lv_i18n_set_local(const char * lang_code); * @param msg_id message ID * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text(const char * msg_id); +const char * lv_i18n_get_text(const char * msg_id); /** * Get the translation from a message ID and apply the language's plural rule to get correct form @@ -87,13 +87,13 @@ const void * lv_i18n_get_text(const char * msg_id); * @param num an integer to select the correct plural form * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num); +const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num); /** * Get the name of the currently used localization. * @return name of the currently used localization. E.g. "en_GB" */ -const void * lv_i18n_get_current_local(void); +const char * lv_i18n_get_current_local(void); /********************** * MACROS From cc3ef640da69b9c197b2c3bc2d7a7aee7c3602d0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Feb 2019 15:34:35 +0100 Subject: [PATCH 057/590] rename lv_fs_free to lv_fs_free_space to avoid collosion woth free() --- lv_misc/lv_fs.c | 6 +++--- lv_misc/lv_fs.h | 4 ++-- lv_misc/lv_ufs.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_misc/lv_fs.c b/lv_misc/lv_fs.c index 64edc1032a5f..1e75ab28bed1 100644 --- a/lv_misc/lv_fs.c +++ b/lv_misc/lv_fs.c @@ -434,7 +434,7 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p) * @param free_p pointer to store the free size [kB] * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_free(char letter, uint32_t * total_p, uint32_t * free_p) +lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) { lv_fs_drv_t * drv = lv_fs_get_drv(letter); @@ -444,12 +444,12 @@ lv_fs_res_t lv_fs_free(char letter, uint32_t * total_p, uint32_t * free_p) lv_fs_res_t res; - if(drv->free == NULL) { + if(drv->free_space == NULL) { res = LV_FS_RES_NOT_IMP; } else { uint32_t total_tmp = 0; uint32_t free_tmp = 0; - res = drv->free(&total_tmp, &free_tmp); + res = drv->free_space(&total_tmp, &free_tmp); if(total_p != NULL) *total_p = total_tmp; if(free_p != NULL) *free_p = free_tmp; diff --git a/lv_misc/lv_fs.h b/lv_misc/lv_fs.h index d4e4e6a7bc63..e7180022b197 100644 --- a/lv_misc/lv_fs.h +++ b/lv_misc/lv_fs.h @@ -90,7 +90,7 @@ typedef struct __lv_fs_drv_t lv_fs_res_t (*trunc) (void * file_p); lv_fs_res_t (*size) (void * file_p, uint32_t * size_p); lv_fs_res_t (*rename) (const char * oldname, const char * newname); - lv_fs_res_t (*free) (uint32_t * total_p, uint32_t * free_p); + lv_fs_res_t (*free_space) (uint32_t * total_p, uint32_t * free_p); lv_fs_res_t (*dir_open) (void * rddir_p, const char * path); lv_fs_res_t (*dir_read) (void * rddir_p, char * fn); @@ -234,7 +234,7 @@ lv_fs_res_t lv_fs_dir_close (lv_fs_dir_t * rddir_p); * @param free_p pointer to store the free size [kB] * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_free (char letter, uint32_t * total_p, uint32_t * free_p); +lv_fs_res_t lv_fs_free_space (char letter, uint32_t * total_p, uint32_t * free_p); /** * Fill a buffer with the letters of existing drivers diff --git a/lv_misc/lv_ufs.c b/lv_misc/lv_ufs.c index ef1a1653a4f6..417ed45ef2e4 100644 --- a/lv_misc/lv_ufs.c +++ b/lv_misc/lv_ufs.c @@ -72,7 +72,7 @@ void lv_ufs_init(void) ufs_drv.tell = lv_ufs_tell; ufs_drv.size = lv_ufs_size; ufs_drv.trunc = lv_ufs_trunc; - ufs_drv.free = lv_ufs_free; + ufs_drv.free_space = lv_ufs_free; ufs_drv.dir_open = lv_ufs_dir_open; ufs_drv.dir_read = lv_ufs_dir_read; From 50e69bab6bfc66197c13d372e25a07fd72298f25 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 26 Feb 2019 09:25:46 +0100 Subject: [PATCH 058/590] start to implement the new generic event system --- lv_core/lv_group.c | 16 +++--- lv_core/lv_indev.c | 63 +++++++++++++++-------- lv_core/lv_obj.c | 91 ++++++++++++++++++++++----------- lv_core/lv_obj.h | 71 +++++++++++++++++++++----- lv_core/lv_refr.c | 8 +-- lv_objx/lv_arc.c | 8 +-- lv_objx/lv_bar.c | 8 +-- lv_objx/lv_btn.c | 83 ++++-------------------------- lv_objx/lv_btn.h | 27 ---------- lv_objx/lv_btnm.c | 8 +-- lv_objx/lv_calendar.c | 72 ++------------------------ lv_objx/lv_calendar.h | 23 --------- lv_objx/lv_canvas.c | 6 +-- lv_objx/lv_cb.c | 12 ++--- lv_objx/lv_cb.h | 21 -------- lv_objx/lv_chart.c | 8 +-- lv_objx/lv_cont.c | 14 ++--- lv_objx/lv_ddlist.c | 60 ++++++++-------------- lv_objx/lv_ddlist.h | 14 ----- lv_objx/lv_gauge.c | 8 +-- lv_objx/lv_img.c | 6 +-- lv_objx/lv_imgbtn.c | 8 +-- lv_objx/lv_imgbtn.h | 20 -------- lv_objx/lv_kb.c | 56 ++------------------ lv_objx/lv_kb.h | 30 ----------- lv_objx/lv_label.c | 6 +-- lv_objx/lv_led.c | 8 +-- lv_objx/lv_line.c | 6 +-- lv_objx/lv_list.c | 31 +++++------ lv_objx/lv_list.h | 4 +- lv_objx/lv_lmeter.c | 6 +-- lv_objx/lv_mbox.c | 6 +-- lv_objx/lv_page.c | 116 ++++++++++++++---------------------------- lv_objx/lv_page.h | 30 ----------- lv_objx/lv_preload.c | 8 +-- lv_objx/lv_roller.c | 21 ++++---- lv_objx/lv_roller.h | 20 -------- lv_objx/lv_slider.c | 42 ++++----------- lv_objx/lv_slider.h | 15 ------ lv_objx/lv_spinbox.c | 8 +-- lv_objx/lv_sw.c | 21 +++----- lv_objx/lv_sw.h | 20 -------- lv_objx/lv_ta.c | 24 +++++---- lv_objx/lv_ta.h | 20 -------- lv_objx/lv_table.c | 8 +-- lv_objx/lv_tabview.c | 14 ++--- lv_objx/lv_tileview.c | 16 +++--- lv_objx/lv_win.c | 14 ++--- lv_objx/lv_win.h | 4 +- 49 files changed, 403 insertions(+), 806 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 62156f28da40..a2de32fd40a4 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -82,7 +82,7 @@ void lv_group_del(lv_group_t * group) { /*Defocus the the currently focused object*/ if(group->obj_focus != NULL) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); lv_obj_invalidate(*group->obj_focus); } @@ -141,7 +141,7 @@ void lv_group_remove_obj(lv_obj_t * obj) if(*g->obj_focus == obj) { /*If this is the only object in the group then focus to nothing.*/ if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) { - (*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); } /*If there more objects in the group then focus to the next/prev object*/ else { @@ -186,14 +186,14 @@ void lv_group_focus_obj(lv_obj_t * obj) if(*i == obj) { if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { - (*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); lv_obj_invalidate(*g->obj_focus); } g->obj_focus = i; if(g->obj_focus != NULL) { - (*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_FOCUS, NULL); + (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL); if(g->focus_cb) g->focus_cb(g); lv_obj_invalidate(*g->obj_focus); } @@ -242,7 +242,7 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c) lv_obj_t * act = lv_group_get_focused(group); if(act == NULL) return LV_RES_OK; - return act->signal_func(act, LV_SIGNAL_CONTROLL, &c); + return act->signal_cb(act, LV_SIGNAL_CONTROLL, &c); } /** @@ -291,7 +291,7 @@ void lv_group_set_editing(lv_group_t * group, bool edit) group->editing = en_val; lv_obj_t * focused = lv_group_get_focused(group); - if(focused) focused->signal_func(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave edit mode*/ + if(focused) focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave edit mode*/ lv_obj_invalidate(focused); } @@ -568,13 +568,13 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/ if(group->obj_focus) { - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); lv_obj_invalidate(*group->obj_focus); } group->obj_focus = obj_next; - (*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); + (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); lv_obj_invalidate(*group->obj_focus); if(group->focus_cb) group->focus_cb(group); diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 15ddf39ad676..c8011dde554b 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -382,13 +382,15 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) #if USE_LV_GROUP if(i->group == NULL) return; + lv_obj_t * focused = lv_group_get_focused(i->group); + /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); - lv_obj_t * focused = lv_group_get_focused(i->group); if(focused && data->key == LV_GROUP_KEY_ENTER) { - focused->signal_func(focused, LV_SIGNAL_PRESSED, indev_act); + focused->signal_cb(focused, LV_SIGNAL_PRESSED, indev_act); + lv_obj_send_event(focused, LV_EVENT_PRESSED); } } /*Pressing*/ @@ -399,8 +401,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*On enter long press leave edit mode.*/ lv_obj_t * focused = lv_group_get_focused(i->group); if(focused) { - focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); i->proc.long_pr_sent = 1; + lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); } } } @@ -421,7 +424,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_focus_prev(i->group); } else if(data->key == LV_GROUP_KEY_ENTER) { if(!i->proc.long_pr_sent) { - lv_group_send_data(i->group, data->key); + focused->signal_cb(focused, LV_SIGNAL_RELEASED, indev_act); + lv_obj_send_event(focused, LV_EVENT_RELEASED); + lv_obj_send_event(focused, LV_EVENT_CLICKED); } } else { lv_group_send_data(i->group, data->key); @@ -486,18 +491,18 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_obj_t * focused = lv_group_get_focused(i->group); bool editable = false; - if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable); + if(focused) focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); if(editable) { if(i->group->obj_ll.head != i->group->obj_ll.tail) lv_group_set_editing(i->group, lv_group_get_editing(i->group) ? false : true); /*Toggle edit mode on long press*/ else if(focused) - focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); } /*If not editable then just send a long press signal*/ else { if(focused) - focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); } i->proc.long_pr_sent = 1; } @@ -506,7 +511,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) else if(data->state == LV_INDEV_STATE_REL && i->proc.last_state == LV_INDEV_STATE_PR) { lv_obj_t * focused = lv_group_get_focused(i->group); bool editable = false; - if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable); + if(focused) focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ if(!editable) { @@ -600,7 +605,8 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If a new object found the previous was lost, so send a signal*/ if(proc->act_obj != NULL) { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + lv_obj_send_event(proc->act_obj, LV_EVENT_PRESS_LOST); if(proc->reset_query != 0) return; } @@ -636,7 +642,8 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*Send a signal about the press*/ - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSED, indev_act); + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_PRESSED, indev_act); + lv_obj_send_event(proc->act_obj, LV_EVENT_PRESSED); if(proc->reset_query != 0) return; } } @@ -647,7 +654,8 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is active object and it can be dragged run the drag*/ if(proc->act_obj != NULL) { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSING, indev_act); + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_PRESSING, indev_act); + lv_obj_send_event(proc->act_obj, LV_EVENT_PRESSING); if(proc->reset_query != 0) return; indev_drag(proc); @@ -657,7 +665,8 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { - pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); + pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); + lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED); if(proc->reset_query != 0) return; /*Mark the signal sending to do not send it again*/ @@ -671,7 +680,8 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->drag_in_prog == 0 && proc->long_pr_sent == 1) { /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { - pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); + pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); + lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT); if(proc->reset_query != 0) return; proc->longpr_rep_timestamp = lv_tick_get(); @@ -703,14 +713,27 @@ static void indev_proc_release(lv_indev_proc_t * proc) /* Search the object on the current current coordinates. * The start object is the object itself. If not ON it the the result will be NULL*/ lv_obj_t * obj_on = indev_search_obj(proc, proc->act_obj); - if(obj_on == proc->act_obj) proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); - else proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + if(obj_on == proc->act_obj) { + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); + lv_obj_send_event(proc->act_obj, LV_EVENT_RELEASED); + if(proc->long_pr_sent == 0 && proc->drag_in_prog == 0) { + lv_obj_send_event(proc->act_obj, LV_EVENT_CLICKED); + } + } + else { + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + lv_obj_send_event(proc->act_obj, LV_SIGNAL_PRESS_LOST); + } } /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was handled in `indev_proc_press`*/ else { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); + proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); + lv_obj_send_event(proc->act_obj, LV_SIGNAL_RELEASED); + if(proc->long_pr_sent == 0 && proc->drag_in_prog == 0) { + lv_obj_send_event(proc->act_obj, LV_EVENT_CLICKED); + } } if(proc->reset_query != 0) return; @@ -874,7 +897,7 @@ static void indev_drag(lv_indev_proc_t * state) if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { if(state->drag_range_out != 0) { /*Send the drag begin signal on first move*/ - drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; } state->drag_in_prog = 1; @@ -917,7 +940,7 @@ static void indev_drag_throw(lv_indev_proc_t * state) /*Return if the drag throw is not enabled*/ if(lv_obj_get_drag_throw(drag_obj) == false) { state->drag_in_prog = 0; - drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); return; } @@ -943,14 +966,14 @@ static void indev_drag_throw(lv_indev_proc_t * state) state->drag_in_prog = 0; state->vect.x = 0; state->vect.y = 0; - drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } } /*If the vectors become 0 -> drag_in_prog = 0 and send a drag end signal*/ else { state->drag_in_prog = 0; - drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } } #endif diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 45c5404cd688..f94bfc4d766d 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -165,8 +165,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->style_p = &lv_style_scr; } /*Set virtual functions*/ - lv_obj_set_signal_func(new_obj, lv_obj_signal); - lv_obj_set_design_func(new_obj, lv_obj_design); + lv_obj_set_signal_cb(new_obj, lv_obj_signal); + lv_obj_set_design_cb(new_obj, lv_obj_design); /*Set free data*/ #ifdef LV_OBJ_FREE_NUM_TYPE @@ -233,8 +233,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) } /*Set virtual functions*/ - lv_obj_set_signal_func(new_obj, lv_obj_signal); - lv_obj_set_design_func(new_obj, lv_obj_design); + lv_obj_set_signal_cb(new_obj, lv_obj_signal); + lv_obj_set_design_cb(new_obj, lv_obj_design); /*Set free data*/ #ifdef LV_OBJ_FREE_NUM_TYPE @@ -311,7 +311,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Send a signal to the parent to notify it about the new child*/ if(parent != NULL) { - parent->signal_func(parent, LV_SIGNAL_CHILD_CHG, new_obj); + parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, new_obj); /*Invalidate the area if not screen created*/ lv_obj_invalidate(new_obj); @@ -375,7 +375,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /* All children deleted. * Now clean up the object specific data*/ - obj->signal_func(obj, LV_SIGNAL_CLEANUP, NULL); + obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL); /*Delete the base objects*/ if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); @@ -383,7 +383,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Send a signal to the parent to notify it about the child delete*/ if(par != NULL) { - par->signal_func(par, LV_SIGNAL_CHILD_CHG, NULL); + par->signal_cb(par, LV_SIGNAL_CHILD_CHG, NULL); } return LV_RES_INV; @@ -485,10 +485,10 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent) lv_obj_set_pos(obj, old_pos.x, old_pos.y); /*Notify the original parent because one of its children is lost*/ - old_par->signal_func(old_par, LV_SIGNAL_CHILD_CHG, NULL); + old_par->signal_cb(old_par, LV_SIGNAL_CHILD_CHG, NULL); /*Notify the new parent about the child*/ - parent->signal_func(parent, LV_SIGNAL_CHILD_CHG, obj); + parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj); lv_obj_invalidate(obj); } @@ -535,10 +535,10 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) refresh_children_position(obj, diff.x, diff.y); /*Inform the object about its new coordinates*/ - obj->signal_func(obj, LV_SIGNAL_CORD_CHG, &ori); + obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori); /*Send a signal to the parent too*/ - par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj); + par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj); /*Invalidate the new area*/ lv_obj_invalidate(obj); @@ -595,16 +595,16 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) /*Send a signal to the object with its new coordinates*/ - obj->signal_func(obj, LV_SIGNAL_CORD_CHG, &ori); + obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori); /*Send a signal to the parent too*/ lv_obj_t * par = lv_obj_get_parent(obj); - if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj); + if(par != NULL) par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj); /*Tell the children the parent's size has changed*/ lv_obj_t * i; LL_READ(obj->child_ll, i) { - i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } /*Invalidate the new area*/ @@ -987,7 +987,7 @@ void lv_obj_set_style(lv_obj_t * obj, lv_style_t * style) void lv_obj_refresh_style(lv_obj_t * obj) { lv_obj_invalidate(obj); - obj->signal_func(obj, LV_SIGNAL_STYLE_CHG, NULL); + obj->signal_cb(obj, LV_SIGNAL_STYLE_CHG, NULL); lv_obj_invalidate(obj); } @@ -1032,7 +1032,7 @@ void lv_obj_set_hidden(lv_obj_t * obj, bool en) if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ lv_obj_t * par = lv_obj_get_parent(obj); - par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj); + par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj); } @@ -1132,24 +1132,55 @@ void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot) } /** - * Set the signal function of an object. + * Set a an event handler function for an object. + * Used by the user to react on event which happens with the object. + * @param obj pointer to an object + * @param cb the new event function + */ +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) +{ + obj->event_cb = cb; +} + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. + */ +void lv_obj_send_event(lv_obj_t * obj, lv_event_t event) +{ + if(obj->event_cb) obj->event_cb(obj, event); +} + +/** + * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. * @param obj pointer to an object - * @param fp the new signal function + * @param cb the new signal function + */ +void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb) +{ + obj->signal_cb = cb; +} + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. */ -void lv_obj_set_signal_func(lv_obj_t * obj, lv_signal_func_t fp) +void lv_obj_send_signal(lv_obj_t * obj, lv_signal_t signal, void * param) { - obj->signal_func = fp; + if(obj->signal_cb) obj->signal_cb(obj, signal, param); } /** * Set a new design function for an object * @param obj pointer to an object - * @param fp the new design function + * @param cb the new design function */ -void lv_obj_set_design_func(lv_obj_t * obj, lv_design_func_t fp) +void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t cb) { - obj->design_func = fp; + obj->design_cb = cb; } /*---------------- @@ -1176,7 +1207,7 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size) void lv_obj_refresh_ext_size(lv_obj_t * obj) { obj->ext_size = 0; - obj->signal_func(obj, LV_SIGNAL_REFR_EXT_SIZE, NULL); + obj->signal_cb(obj, LV_SIGNAL_REFR_EXT_SIZE, NULL); lv_obj_invalidate(obj); } @@ -1656,9 +1687,9 @@ bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot) * @param obj pointer to an object * @return the signal function */ -lv_signal_func_t lv_obj_get_signal_func(const lv_obj_t * obj) +lv_signal_cb_t lv_obj_get_signal_func(const lv_obj_t * obj) { - return obj->signal_func; + return obj->signal_cb; } /** @@ -1666,9 +1697,9 @@ lv_signal_func_t lv_obj_get_signal_func(const lv_obj_t * obj) * @param obj pointer to an object * @return the design function */ -lv_design_func_t lv_obj_get_design_func(const lv_obj_t * obj) +lv_design_cb_t lv_obj_get_design_func(const lv_obj_t * obj) { - return obj->design_func; + return obj->design_cb; } /*------------------ @@ -1699,7 +1730,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) memset(buf, 0, sizeof(lv_obj_type_t)); memset(&tmp, 0, sizeof(lv_obj_type_t)); - obj->signal_func(obj, LV_SIGNAL_GET_TYPE, &tmp); + obj->signal_cb(obj, LV_SIGNAL_GET_TYPE, &tmp); uint8_t cnt; for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { @@ -1956,7 +1987,7 @@ static void delete_children(lv_obj_t * obj) lv_ll_rem(&(par->child_ll), obj); /* Clean up the object specific data*/ - obj->signal_func(obj, LV_SIGNAL_CLEANUP, NULL); + obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL); /*Delete the base objects*/ if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 5e46f007ee5a..656c5cb39ece 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -62,7 +62,7 @@ enum }; typedef uint8_t lv_design_mode_t; -typedef bool (* lv_design_func_t) (struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); +typedef bool (* lv_design_cb_t) (struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); enum { @@ -71,6 +71,30 @@ enum }; typedef uint8_t lv_res_t; + +typedef enum { + LV_EVENT_PRESSED, + LV_EVENT_PRESSING, + LV_EVENT_PRESS_LOST, + LV_EVENT_RELEASED, + LV_EVENT_CLICKED, + LV_EVENT_LONG_PRESSED, + LV_EVENT_LONG_PRESSED_REPEAT, + LV_EVENT_LONG_HOVER_IN, + LV_EVENT_LONG_HOVER_OUT, + LV_EVENT_DRAG_BEGIN, + LV_EVENT_DRAG_END, + LV_EVENT_DRAG_THROW_BEGIN, + LV_EVENT_FOCUSED, + LV_EVENT_DEFOCUSED, + LV_EVENT_VALUE_CHANGED, + LV_EVENT_REFRESH, + LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ + LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ +}lv_event_t; + +typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); + enum { /*General signals*/ @@ -102,7 +126,7 @@ enum }; typedef uint8_t lv_signal_t; -typedef lv_res_t (* lv_signal_func_t) (struct _lv_obj_t * obj, lv_signal_t sign, void * param); +typedef lv_res_t (* lv_signal_cb_t) (struct _lv_obj_t * obj, lv_signal_t sign, void * param); enum { @@ -149,8 +173,9 @@ typedef struct _lv_obj_t lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ - lv_signal_func_t signal_func; /*Object type specific signal function*/ - lv_design_func_t design_func; /*Object type specific design function*/ + lv_event_cb_t event_cb; + lv_signal_cb_t signal_cb; /*Object type specific signal function*/ + lv_design_cb_t design_cb; /*Object type specific design function*/ void * ext_attr; /*Object type specific extended data*/ lv_style_t * style_p; /*Pointer to the object's style*/ @@ -183,8 +208,6 @@ typedef struct _lv_obj_t #endif } lv_obj_t; -typedef lv_res_t (*lv_action_t) (struct _lv_obj_t * obj); - /*Protect some attributes (max. 8 bit)*/ enum { @@ -462,19 +485,41 @@ void lv_obj_set_protect(lv_obj_t * obj, uint8_t prot); void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot); /** - * Set the signal function of an object. + * Set a an event handler function for an object. + * Used by the user to react on event which happens with the object. + * @param obj pointer to an object + * @param cb the new event function + */ +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb); + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. + */ +void lv_obj_send_event(lv_obj_t * obj, lv_event_t event); + +/** + * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. * @param obj pointer to an object - * @param fp the new signal function + * @param cb the new signal function + */ +void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb); + +/** + * Send an event to the object + * @param obj pointer to an object + * @param event the type of the event from `lv_event_t`. */ -void lv_obj_set_signal_func(lv_obj_t * obj, lv_signal_func_t fp); +void lv_obj_send_signal(lv_obj_t * obj, lv_signal_t signal, void * param); /** * Set a new design function for an object * @param obj pointer to an object - * @param fp the new design function + * @param cb the new design function */ -void lv_obj_set_design_func(lv_obj_t * obj, lv_design_func_t fp); +void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t cb); /*---------------- * Other set @@ -725,14 +770,14 @@ bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot); * @param obj pointer to an object * @return the signal function */ -lv_signal_func_t lv_obj_get_signal_func(const lv_obj_t * obj); +lv_signal_cb_t lv_obj_get_signal_func(const lv_obj_t * obj); /** * Get the design function of an object * @param obj pointer to an object * @return the design function */ -lv_design_func_t lv_obj_get_design_func(const lv_obj_t * obj); +lv_design_cb_t lv_obj_get_design_func(const lv_obj_t * obj); /*------------------ * Other get diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 7ac2c6c14551..1d50ee17b59a 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -401,7 +401,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) if(found_p == NULL) { lv_style_t * style = lv_obj_get_style(obj); if(style->body.opa == LV_OPA_COVER && - obj->design_func(obj, area_p, LV_DESIGN_COVER_CHK) != false && + obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && lv_obj_get_opa_scale(obj) == LV_OPA_COVER) { found_p = obj; } @@ -454,7 +454,7 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) /*Call the post draw design function of the parents of the to object*/ par = lv_obj_get_parent(top_p); while(par != NULL) { - par->design_func(par, mask_p, LV_DESIGN_DRAW_POST); + par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST); par = lv_obj_get_parent(par); } } @@ -487,7 +487,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) if(union_ok != false) { /* Redraw the object */ - obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN); + obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN); //usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/ @@ -518,7 +518,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) } /* If all the children are redrawn make 'post draw' design */ - obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST); + obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST); } } diff --git a/lv_objx/lv_arc.c b/lv_objx/lv_arc.c index 8f5ed9a6cc8b..7f4d677e3282 100644 --- a/lv_objx/lv_arc.c +++ b/lv_objx/lv_arc.c @@ -32,8 +32,8 @@ static lv_res_t lv_arc_signal(lv_obj_t * arc, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -72,8 +72,8 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) ext->angle_end = 315; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_arc, lv_arc_signal); - lv_obj_set_design_func(new_arc, lv_arc_design); + lv_obj_set_signal_cb(new_arc, lv_arc_signal); + lv_obj_set_design_cb(new_arc, lv_arc_design); /*Init the new arc arc*/ if(copy == NULL) { diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 656225eb467e..3f546d795369 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -33,8 +33,8 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design_f; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design_f; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -73,8 +73,8 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) ext->sym = 0; ext->style_indic = &lv_style_pretty_color; - lv_obj_set_signal_func(new_bar, lv_bar_signal); - lv_obj_set_design_func(new_bar, lv_bar_design); + lv_obj_set_signal_cb(new_bar, lv_bar_signal); + lv_obj_set_design_cb(new_bar, lv_bar_design); /*Init the new bar object*/ if(copy == NULL) { diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index f96607683caf..aebee87df9b6 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -42,8 +42,8 @@ static void lv_btn_ink_effect_anim_ready(void * p); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT static lv_coord_t ink_act_value; @@ -89,18 +89,12 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->state = LV_BTN_STATE_REL; - ext->actions[LV_BTN_ACTION_PR] = NULL; - ext->actions[LV_BTN_ACTION_CLICK] = NULL; - ext->actions[LV_BTN_ACTION_LONG_PR] = NULL; - ext->actions[LV_BTN_ACTION_LONG_PR_REPEAT] = NULL; - ext->styles[LV_BTN_STATE_REL] = &lv_style_btn_rel; ext->styles[LV_BTN_STATE_PR] = &lv_style_btn_pr; ext->styles[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; ext->styles[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina; - ext->long_pr_action_executed = 0; ext->toggle = 0; #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT ext->ink_in_time = 0; @@ -108,8 +102,8 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->ink_out_time = 0; #endif - lv_obj_set_signal_func(new_btn, lv_btn_signal); - lv_obj_set_design_func(new_btn, lv_btn_design); + lv_obj_set_signal_cb(new_btn, lv_btn_signal); + lv_obj_set_design_cb(new_btn, lv_btn_design); /*If no copy do the basic initialization*/ if(copy == NULL) { @@ -142,7 +136,6 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->ink_wait_time = copy_ext->ink_wait_time; ext->ink_out_time = copy_ext->ink_out_time; #endif - memcpy(ext->actions, copy_ext->actions, sizeof(ext->actions)); memcpy(ext->styles, copy_ext->styles, sizeof(ext->styles)); /*Refresh the style with new signal function*/ @@ -209,19 +202,6 @@ void lv_btn_toggle(lv_obj_t * btn) } } -/** - * Set a function to call when a button event happens - * @param btn pointer to a button object - * @param action type of event form 'lv_action_t' (press, release, long press, long press repeat) - */ -void lv_btn_set_action(lv_obj_t * btn, lv_btn_action_t type, lv_action_t action) -{ - if(type >= LV_BTN_ACTION_NUM) return; - - lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - ext->actions[type] = action; -} - /** * Set time of the ink effect (draw a circle on click to animate in the new state) * @param btn pointer to a button object @@ -334,19 +314,6 @@ bool lv_btn_get_toggle(const lv_obj_t * btn) return ext->toggle != 0 ? true : false; } -/** - * Get the release action of a button - * @param btn pointer to a button object - * @return pointer to the release action function - */ -lv_action_t lv_btn_get_action(const lv_obj_t * btn, lv_btn_action_t type) -{ - if(type >= LV_BTN_ACTION_NUM) return NULL; - - lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - return ext->actions[type]; -} - /** * Get time of the ink in effect (draw a circle on click to animate in the new state) * @param btn pointer to a button object @@ -552,8 +519,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) #endif } - ext->long_pr_action_executed = 0; - #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT /*Forget the old inked button*/ if(ink_obj != NULL && ink_obj != btn) { @@ -584,10 +549,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) lv_anim_create(&a); } #endif - /*Call the press action, 'param' is the caller indev_proc*/ - if(ext->actions[LV_BTN_ACTION_PR] && state != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_PR](btn); - } } else if(sign == LV_SIGNAL_PRESS_LOST) { /*Refresh the state*/ if(ext->state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); @@ -601,7 +562,8 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { /*If not dragged and it was not long press action then *change state and run the action*/ - if(lv_indev_is_dragging(param) == false && ext->long_pr_action_executed == 0) { + lv_indev_t * indev = lv_indev_get_act(); + if(lv_indev_is_dragging(param) == false && indev->proc.long_pr_sent == 0) { if(ext->state == LV_BTN_STATE_PR && tgl == false) { lv_btn_set_state(btn, LV_BTN_STATE_REL); } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == false) { @@ -611,10 +573,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == true) { lv_btn_set_state(btn, LV_BTN_STATE_REL); } - - if(ext->actions[LV_BTN_ACTION_CLICK] && state != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_CLICK](btn); - } } else { /*If dragged change back the state*/ if(ext->state == LV_BTN_STATE_PR) { lv_btn_set_state(btn, LV_BTN_STATE_REL); @@ -650,29 +608,16 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) lv_anim_create(&a); } #endif - } else if(sign == LV_SIGNAL_LONG_PRESS) { - if(ext->actions[LV_BTN_ACTION_LONG_PR] && state != LV_BTN_STATE_INA) { - ext->long_pr_action_executed = 1; - res = ext->actions[LV_BTN_ACTION_LONG_PR](btn); - } - } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - if(ext->actions[LV_BTN_ACTION_LONG_PR_REPEAT] && state != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_LONG_PR_REPEAT](btn); - } } else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { - if(lv_btn_get_toggle(btn) != false) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - if(ext->actions[LV_BTN_ACTION_CLICK] && lv_btn_get_state(btn) != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_CLICK](btn); - } + if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); + } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { - if(lv_btn_get_toggle(btn) != false) lv_btn_set_state(btn, LV_BTN_STATE_REL); - if(ext->actions[LV_BTN_ACTION_CLICK] && lv_btn_get_state(btn) != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_CLICK](btn); - } + if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); } else if(c == LV_GROUP_KEY_ENTER) { - if(!ext->long_pr_action_executed) { + lv_indev_t * indev = lv_indev_get_act(); + if(!indev->proc.long_pr_sent) { if(lv_btn_get_toggle(btn)) { if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); @@ -680,12 +625,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); } - if(ext->actions[LV_BTN_ACTION_CLICK] && state != LV_BTN_STATE_INA) { - res = ext->actions[LV_BTN_ACTION_CLICK](btn); - } - } - if(res != LV_RES_INV) { - ext->long_pr_action_executed = 0; } } } else if(sign == LV_SIGNAL_CLEANUP) { diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index b8e6932f8066..c49b0b176c8d 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -50,23 +50,11 @@ enum }; typedef uint8_t lv_btn_state_t; -enum -{ - LV_BTN_ACTION_CLICK, - LV_BTN_ACTION_PR, - LV_BTN_ACTION_LONG_PR, - LV_BTN_ACTION_LONG_PR_REPEAT, - LV_BTN_ACTION_NUM, -}; -typedef uint8_t lv_btn_action_t; - - /*Data of button*/ typedef struct { lv_cont_ext_t cont; /*Ext. of ancestor*/ /*New data for this type */ - lv_action_t actions[LV_BTN_ACTION_NUM]; lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/ #if LV_BTN_INK_EFFECT @@ -75,7 +63,6 @@ typedef struct uint16_t ink_out_time; /*[ms] Time of ink disappearing*/ #endif uint8_t toggle :1; /*1: Toggle enabled*/ - uint8_t long_pr_action_executed :1; /*1: Long press action executed (Handled by the library)*/ } lv_btn_ext_t; /*Styles*/ @@ -124,13 +111,6 @@ void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state); */ void lv_btn_toggle(lv_obj_t * btn); -/** - * Set a function to call when a button event happens - * @param btn pointer to a button object - * @param action type of event form 'lv_action_t' (press, release, long press, long press repeat) - */ -void lv_btn_set_action(lv_obj_t * btn, lv_btn_action_t type, lv_action_t action); - /** * Set the layout on a button * @param btn pointer to a button object @@ -225,13 +205,6 @@ lv_btn_state_t lv_btn_get_state(const lv_obj_t * btn); */ bool lv_btn_get_toggle(const lv_obj_t * btn); -/** - * Get the release action of a button - * @param btn pointer to a button object - * @return pointer to the release action function - */ -lv_action_t lv_btn_get_action(const lv_obj_t * btn, lv_btn_action_t type); - /** * Get the layout of a button * @param btn pointer to button object diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index dca929111f29..16d910a57f4d 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -44,8 +44,8 @@ static const char * lv_btnm_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "\002Btn4", "Btn5", "" }; -static lv_design_func_t ancestor_design_f; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design_f; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -92,8 +92,8 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_btnm); - lv_obj_set_signal_func(new_btnm, lv_btnm_signal); - lv_obj_set_design_func(new_btnm, lv_btnm_design); + lv_obj_set_signal_cb(new_btnm, lv_btnm_signal); + lv_obj_set_design_cb(new_btnm, lv_btnm_design); /*Init the new button matrix object*/ if(copy == NULL) { diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index f8260cf4c8e6..971609407a15 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -52,8 +52,8 @@ static uint8_t is_leap_year(uint32_t year); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}; static const char * month_name[12] = {"January", "February", "March", "April", "May", "June", "July", "August", @@ -107,10 +107,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) ext->highlighted_dates_num = 0; ext->day_names = NULL; ext->month_names = NULL; - ext->actions[LV_CALENDAR_ACTION_PR] = NULL; - ext->actions[LV_CALENDAR_ACTION_CLICK] = NULL; - ext->actions[LV_CALENDAR_ACTION_LONG_PR] = NULL; - ext->actions[LV_CALENDAR_ACTION_LONG_PR_REPEAT] = NULL; ext->style_header = &lv_style_plain_color; ext->style_header_pr = &lv_style_pretty_color; ext->style_highlighted_days = &lv_style_plain_color; @@ -120,8 +116,8 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) ext->style_day_names = &lv_style_pretty; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_calendar, lv_calendar_signal); - lv_obj_set_design_func(new_calendar, lv_calendar_design); + lv_obj_set_signal_cb(new_calendar, lv_calendar_signal); + lv_obj_set_design_cb(new_calendar, lv_calendar_design); /*Init the new calendar calendar*/ if(copy == NULL) { @@ -147,9 +143,7 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, ext->style_today_box); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, ext->style_highlighted_days); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, ext->style_inactive_days); - } - } /*Copy an existing calendar*/ else { @@ -166,8 +160,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) ext->highlighted_dates_num = copy_ext->highlighted_dates_num; ext->day_names = copy_ext->day_names; - memcpy(ext->actions, copy_ext->actions, sizeof(ext->actions)); - ext->month_names = copy_ext->month_names; ext->style_header = copy_ext->style_header; ext->style_header_pr = copy_ext->style_header_pr; @@ -198,19 +190,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) * Setter functions *====================*/ -/** - * Set a function to call when a calendar event happens - * @param calendar pointer to a calendar object - * @param action type of event form 'lv_action_t' (press, release, long press, long press repeat) - */ -void lv_calendar_set_action(lv_obj_t * calendar, lv_calendar_action_t type, lv_action_t action) -{ - if(type >= LV_CALENDAR_ACTION_NUM) return; - - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->actions[type] = action; -} - /** * Set the today's date * @param calendar pointer to a calendar object @@ -327,19 +306,6 @@ void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_sty * Getter functions *====================*/ -/** - * Get the action of a calendar - * @param calendar pointer to a calendar object - * @return pointer to the action function - */ -lv_action_t lv_calendar_get_action(const lv_obj_t * calendar, lv_calendar_action_t type) -{ - if(type >= LV_CALENDAR_ACTION_NUM) return NULL; - - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return ext->actions[type]; -} - /** * Get the today's date * @param calendar pointer to a calendar object @@ -525,20 +491,6 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } else if(sign == LV_SIGNAL_PRESSED) { - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - /*Call the press action, 'param' is the caller indev_proc*/ - if(ext->actions[LV_CALENDAR_ACTION_PR]) { - lv_indev_t * indev = lv_indev_get_act(); - lv_point_t p; - lv_indev_get_point(indev, &p); - - if(calculate_touched_day(calendar, &p)){ - if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); - ext->btn_pressing = 0; - res = ext->actions[LV_CALENDAR_ACTION_PR](calendar); - } - } } else if(sign == LV_SIGNAL_PRESSING) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); lv_area_t header_area; @@ -592,26 +544,12 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * } else if(ext->pressed_date.year != 0) { - if(ext->actions[LV_CALENDAR_ACTION_CLICK]) { - res = ext->actions[LV_CALENDAR_ACTION_CLICK](calendar); - } + lv_obj_send_event(calendar, LV_EVENT_VALUE_CHANGED); } ext->pressed_date.year = 0; ext->btn_pressing = 0; lv_obj_invalidate(calendar); - - - } else if(sign == LV_SIGNAL_LONG_PRESS) { - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(ext->actions[LV_CALENDAR_ACTION_LONG_PR] && (ext->pressed_date.year != 0)) { - res = ext->actions[LV_CALENDAR_ACTION_LONG_PR](calendar); - } - } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(ext->actions[LV_CALENDAR_ACTION_LONG_PR_REPEAT] && (ext->pressed_date.year != 0)) { - res = ext->actions[LV_CALENDAR_ACTION_LONG_PR_REPEAT](calendar); - } } else if(sign == LV_SIGNAL_CONTROLL) { uint8_t c = *((uint8_t *) param); lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); diff --git a/lv_objx/lv_calendar.h b/lv_objx/lv_calendar.h index e573ae5d47a1..e82c909b4f18 100644 --- a/lv_objx/lv_calendar.h +++ b/lv_objx/lv_calendar.h @@ -37,16 +37,6 @@ typedef struct { int8_t day; } lv_calendar_date_t; -enum -{ - LV_CALENDAR_ACTION_CLICK, - LV_CALENDAR_ACTION_PR, - LV_CALENDAR_ACTION_LONG_PR, - LV_CALENDAR_ACTION_LONG_PR_REPEAT, - LV_CALENDAR_ACTION_NUM, -}; -typedef uint8_t lv_calendar_action_t; - /*Data of calendar*/ typedef struct { /*None*/ /*Ext. of ancestor*/ @@ -59,7 +49,6 @@ typedef struct { lv_calendar_date_t pressed_date; const char ** day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/ const char ** month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ - lv_action_t actions[LV_CALENDAR_ACTION_NUM]; /*Styles*/ lv_style_t * style_header; @@ -107,12 +96,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy); /*===================== * Setter functions *====================*/ -/** - * Set a function to call when a calendar event happens - * @param calendar pointer to a calendar object - * @param action type of event form 'lv_action_t' (press, release, long press, long press repeat) - */ -void lv_calendar_set_action(lv_obj_t * calendar, lv_calendar_action_t type, lv_action_t action); /** * Set the today's date @@ -164,12 +147,6 @@ void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_sty /*===================== * Getter functions *====================*/ -/** - * Get the action of a calendar - * @param calendar pointer to a calendar object - * @return pointer to the action function - */ -lv_action_t lv_calendar_get_action(const lv_obj_t * calendar, lv_calendar_action_t type); /** * Get the today's date diff --git a/lv_objx/lv_canvas.c b/lv_objx/lv_canvas.c index 32e47b71a3e3..83f0b9bacf10 100644 --- a/lv_objx/lv_canvas.c +++ b/lv_objx/lv_canvas.c @@ -26,8 +26,8 @@ static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * par /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -70,7 +70,7 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy) lv_img_set_src(new_canvas, &ext->dsc); /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_canvas, lv_canvas_signal); + lv_obj_set_signal_cb(new_canvas, lv_canvas_signal); /*Init the new canvas canvas*/ if(copy == NULL) { diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index e6fc49454d20..248d5f86bbc9 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -30,9 +30,9 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_bg_design; -static lv_design_func_t ancestor_bullet_design; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_bg_design; +static lv_design_cb_t ancestor_bullet_design; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -68,8 +68,8 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) ext->bullet = NULL; ext->label = NULL; - lv_obj_set_signal_func(new_cb, lv_cb_signal); - lv_obj_set_design_func(new_cb, lv_cb_design); + lv_obj_set_signal_cb(new_cb, lv_cb_signal); + lv_obj_set_design_cb(new_cb, lv_cb_design); /*Init the new checkbox object*/ if(copy == NULL) { @@ -107,7 +107,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_cb); } - lv_obj_set_design_func(ext->bullet, lv_bullet_design); + lv_obj_set_design_cb(ext->bullet, lv_bullet_design); LV_LOG_INFO("check box created"); diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index b587733417a7..50938a836946 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -103,16 +103,6 @@ static inline void lv_cb_set_inactive(lv_obj_t * cb) lv_btn_set_state(cb, LV_BTN_STATE_INA); } -/** - * Set a function to call when the check box is clicked - * @param cb pointer to a check box object - */ -static inline void lv_cb_set_action(lv_obj_t * cb, lv_action_t action) -{ - lv_btn_set_action(cb, LV_BTN_ACTION_CLICK, action); -} - - /** * Set a style of a check box * @param cb pointer to check box object @@ -142,17 +132,6 @@ static inline bool lv_cb_is_checked(const lv_obj_t * cb) return lv_btn_get_state(cb) == LV_BTN_STATE_REL ? false : true; } -/** - * Get the action of a check box - * @param cb pointer to a button object - * @return pointer to the action function - */ -static inline lv_action_t lv_cb_get_action(const lv_obj_t * cb) -{ - return lv_btn_get_action(cb, LV_BTN_ACTION_CLICK); -} - - /** * Get a style of a button * @param cb pointer to check box object diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 8d3e9735980c..14e21fff0b1d 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -39,8 +39,8 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design_f; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design_f; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -85,8 +85,8 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_chart); if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_chart); - lv_obj_set_signal_func(new_chart, lv_chart_signal); - lv_obj_set_design_func(new_chart, lv_chart_design); + lv_obj_set_signal_cb(new_chart, lv_chart_signal); + lv_obj_set_design_cb(new_chart, lv_chart_design); /*Init the new chart background object*/ if(copy == NULL) { diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index b39b44e3b913..a8789fb97f18 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -44,7 +44,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -84,7 +84,7 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) ext->fit_bottom = LV_FIT_NONE; ext->layout = LV_LAYOUT_OFF; - lv_obj_set_signal_func(new_cont, lv_cont_signal); + lv_obj_set_signal_cb(new_cont, lv_cont_signal); /*Init the new container*/ if(copy == NULL) { @@ -131,7 +131,7 @@ void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout) ext->layout = layout; /*Send a signal to refresh the layout*/ - cont->signal_func(cont, LV_SIGNAL_CHILD_CHG, NULL); + cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL); } /** @@ -161,7 +161,7 @@ void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t t ext->fit_bottom = bottom; /*Send a signal to refresh the layout*/ - cont->signal_func(cont, LV_SIGNAL_CHILD_CHG, NULL); + cont->signal_cb(cont, LV_SIGNAL_CHILD_CHG, NULL); } /*===================== @@ -705,16 +705,16 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) lv_obj_invalidate(cont); /*Notify the object about its new coordinates*/ - cont->signal_func(cont, LV_SIGNAL_CORD_CHG, &ori); + cont->signal_cb(cont, LV_SIGNAL_CORD_CHG, &ori); /*Inform the parent about the new coordinates*/ lv_obj_t * par = lv_obj_get_parent(cont); - par->signal_func(par, LV_SIGNAL_CHILD_CHG, cont); + par->signal_cb(par, LV_SIGNAL_CHILD_CHG, cont); /*Tell the children the parent's size has changed*/ lv_obj_t * i; LL_READ(cont->child_ll, i) { - i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } } diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 96ff47e6ed24..d8e832761e60 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -40,16 +40,16 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * param); static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -static lv_res_t lv_ddlist_release_action(lv_obj_t * ddlist); +static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_signal_func_t ancestor_scrl_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t ancestor_scrl_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -85,7 +85,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->label = NULL; - ext->action = NULL; ext->opened = 0; ext->fix_height = 0; ext->sel_opt_id = 0; @@ -96,9 +95,9 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->draw_arrow = 0; /*Do not draw arrow by default*/ /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_ddlist, lv_ddlist_signal); - lv_obj_set_signal_func(lv_page_get_scrl(new_ddlist), lv_ddlist_scrl_signal); - lv_obj_set_design_func(new_ddlist, lv_ddlist_design); + lv_obj_set_signal_cb(new_ddlist, lv_ddlist_signal); + lv_obj_set_signal_cb(lv_page_get_scrl(new_ddlist), lv_ddlist_scrl_signal); + lv_obj_set_design_cb(new_ddlist, lv_ddlist_design); /*Init the new drop down list drop down list*/ if(copy == NULL) { @@ -108,7 +107,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = lv_label_create(new_ddlist, NULL); lv_cont_set_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_NONE); - lv_page_set_rel_action(new_ddlist, lv_ddlist_release_action); lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_DRAG); lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_HIDE); lv_page_set_style(new_ddlist, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight); @@ -134,7 +132,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) lv_label_set_text(ext->label, lv_label_get_text(copy_ext->label)); ext->sel_opt_id = copy_ext->sel_opt_id; ext->fix_height = copy_ext->fix_height; - ext->action = copy_ext->action; ext->option_cnt = copy_ext->option_cnt; ext->sel_style = copy_ext->sel_style; ext->anim_time = copy_ext->anim_time; @@ -208,17 +205,6 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt) } } -/** - * Set a function to call when a new option is chosen - * @param ddlist pointer to a drop down list - * @param action pointer to a call back function - */ -void lv_ddlist_set_action(lv_obj_t * ddlist, lv_action_t action) -{ - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - ext->action = action; -} - /** * Set the fix height for the drop down list * If 0 then the opened ddlist will be auto. sized else the set height will be applied. @@ -356,17 +342,6 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf) buf[c] = '\0'; } -/** - * Get the "option selected" callback function - * @param ddlist pointer to a drop down list - * @return pointer to the call back function - */ -lv_action_t lv_ddlist_get_action(const lv_obj_t * ddlist) -{ - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - return ext->action; -} - /** * Get the fix height value. * @param ddlist pointer to a drop down list object @@ -652,7 +627,11 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par } } #endif - } else if(sign == LV_SIGNAL_DEFOCUS) { + } + else if(sign == LV_SIGNAL_RELEASED) { + release_handler(ddlist); + } + else if(sign == LV_SIGNAL_DEFOCUS) { if(ext->opened) { ext->opened = false; ext->sel_opt_id = ext->sel_opt_id_ori; @@ -685,8 +664,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par if(ext->opened) { ext->sel_opt_id_ori = ext->sel_opt_id; ext->opened = 0; - if(ext->action) ext->action(ddlist); - + lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); #if USE_LV_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); @@ -740,7 +718,11 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); if(scrl->ext_size < style->body.padding.hor) scrl->ext_size = style->body.padding.hor; - } else if(sign == LV_SIGNAL_CLEANUP) { + } + else if(sign == LV_SIGNAL_RELEASED) { + release_handler(ddlist); + } + else if(sign == LV_SIGNAL_CLEANUP) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); ext->label = NULL; /*The label is already deleted*/ } @@ -753,7 +735,7 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * * @param ddlist pointer to a drop down list object * @return LV_ACTION_RES_INV if the ddlist it deleted in the user callback else LV_ACTION_RES_OK */ -static lv_res_t lv_ddlist_release_action(lv_obj_t * ddlist) +static lv_res_t release_handler(lv_obj_t * ddlist) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -785,9 +767,7 @@ static lv_res_t lv_ddlist_release_action(lv_obj_t * ddlist) ext->sel_opt_id = new_opt; - if(ext->action != NULL) { - ext->action(ddlist); - } + lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); } lv_ddlist_refr_size(ddlist, true); diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 8d3a6599fcf1..0f143eccee20 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -48,7 +48,6 @@ typedef struct /*New data for this type */ lv_obj_t *label; /*Label for the options*/ lv_style_t * sel_style; /*Style of the selected option*/ - lv_action_t action; /*Pointer to function to call when an option is selected*/ uint16_t option_cnt; /*Number of options*/ uint16_t sel_opt_id; /*Index of the current option*/ uint16_t sel_opt_id_ori; /*Store the original index on focus*/ @@ -102,13 +101,6 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options); */ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt); -/** - * Set a function to call when a new option is chosen - * @param ddlist pointer to a drop down list - * @param action pointer to a call back function - */ -void lv_ddlist_set_action(lv_obj_t * ddlist, lv_action_t action); - /** * Set the fix height for the drop down list * If 0 then the opened ddlist will be auto. sized else the set height will be applied. @@ -189,12 +181,6 @@ uint16_t lv_ddlist_get_selected(const lv_obj_t * ddlist); */ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf); -/** - * Get the "option selected" callback function - * @param ddlist pointer to a drop down list - * @return pointer to the call back function - */ -lv_action_t lv_ddlist_get_action(const lv_obj_t * ddlist); /** * Get the fix height value. diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index bdc6a179abb5..34da4bd1ee10 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -42,8 +42,8 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask); /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -82,8 +82,8 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_gauge); /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_gauge, lv_gauge_signal); - lv_obj_set_design_func(new_gauge, lv_gauge_design); + lv_obj_set_signal_cb(new_gauge, lv_gauge_signal); + lv_obj_set_design_cb(new_gauge, lv_gauge_design); /*Init the new gauge gauge*/ if(copy == NULL) { diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 981c2919b374..df3193aa3a52 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -38,7 +38,7 @@ static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -80,8 +80,8 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) ext->auto_size = 1; /*Init the new object*/ - lv_obj_set_signal_func(new_img, lv_img_signal); - lv_obj_set_design_func(new_img, lv_img_design); + lv_obj_set_signal_cb(new_img, lv_img_signal); + lv_obj_set_design_cb(new_img, lv_img_design); if(copy == NULL) { lv_obj_set_click(new_img, false); diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index ed1d72b426ab..a4f367fb528b 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -27,8 +27,8 @@ static void refr_img(lv_obj_t * imgbtn); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -72,8 +72,8 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) ext->act_cf = LV_IMG_CF_UNKOWN; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_imgbtn, lv_imgbtn_signal); - lv_obj_set_design_func(new_imgbtn, lv_imgbtn_design); + lv_obj_set_signal_cb(new_imgbtn, lv_imgbtn_signal); + lv_obj_set_design_cb(new_imgbtn, lv_imgbtn_design); /*Init the new image button image button*/ if(copy == NULL) { diff --git a/lv_objx/lv_imgbtn.h b/lv_objx/lv_imgbtn.h index 169a161d1a1f..09b5dc045d00 100644 --- a/lv_objx/lv_imgbtn.h +++ b/lv_objx/lv_imgbtn.h @@ -134,16 +134,6 @@ static inline void lv_imgbtn_toggle(lv_obj_t * imgbtn) lv_btn_toggle(imgbtn); } -/** - * Set a function to call when a button event happens - * @param imgbtn pointer to an image button object - * @param action type of event form 'lv_action_t' (press, release, long press, long press repeat) - */ -static inline void lv_imgbtn_set_action(lv_obj_t * imgbtn, lv_btn_action_t type, lv_action_t action) -{ - lv_btn_set_action(imgbtn, type, action); -} - /** * Set a style of a image button. * @param imgbtn pointer to image button object @@ -213,16 +203,6 @@ static inline bool lv_imgbtn_get_toggle(const lv_obj_t * imgbtn) return lv_btn_get_toggle(imgbtn); } -/** - * Get the release action of a image button - * @param imgbtn pointer to a image button object - * @return pointer to the release action function - */ -static inline lv_action_t lv_imgbtn_get_action(const lv_obj_t * imgbtn, lv_btn_action_t type) -{ - return lv_btn_get_action(imgbtn, type); -} - /** * Get style of a image button. * @param imgbtn pointer to image button object diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index be7684760fc7..e39f1eb1d360 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -30,7 +30,7 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; static const char * kb_map_lc[] = { "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Bksp", "\n", @@ -94,11 +94,9 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) ext->ta = NULL; ext->mode = LV_KB_MODE_TEXT; ext->cursor_mng = 0; - ext->hide_action = NULL; - ext->ok_action = NULL; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_kb, lv_kb_signal); + lv_obj_set_signal_cb(new_kb, lv_kb_signal); /*Init the new keyboard keyboard*/ if(copy == NULL) { @@ -127,8 +125,6 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) ext->ta = copy_ext->ta; ext->mode = copy_ext->mode; ext->cursor_mng = copy_ext->cursor_mng; - ext->hide_action = copy_ext->hide_action; - ext->ok_action = copy_ext->ok_action; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_kb); @@ -210,28 +206,6 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en) } } -/** - * Set call back to call when the "Ok" button is pressed - * @param kb pointer to Keyboard object - * @param action a callback with 'lv_action_t' type - */ -void lv_kb_set_ok_action(lv_obj_t * kb, lv_action_t action) -{ - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - ext->ok_action = action; -} - -/** - * Set call back to call when the "Hide" button is pressed - * @param kb pointer to Keyboard object - * @param action a callback with 'lv_action_t' type - */ -void lv_kb_set_hide_action(lv_obj_t * kb, lv_action_t action) -{ - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - ext->hide_action = action; -} - /** * Set a style of a keyboard * @param kb pointer to a keyboard object @@ -300,28 +274,6 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb) return ext->cursor_mng == 0 ? false : true; } -/** - * Get the callback to call when the "Ok" button is pressed - * @param kb pointer to Keyboard object - * @return the ok callback - */ -lv_action_t lv_kb_get_ok_action(const lv_obj_t * kb) -{ - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - return ext->ok_action; -} - -/** - * Get the callback to call when the "Hide" button is pressed - * @param kb pointer to Keyboard object - * @return the close callback - */ -lv_action_t lv_kb_get_hide_action(const lv_obj_t * kb) -{ - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - return ext->hide_action; -} - /** * Get a style of a keyboard * @param kb pointer to a keyboard object @@ -414,14 +366,14 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) lv_btnm_set_map(kb, kb_map_spec); return LV_RES_OK; } else if(strcmp(txt, SYMBOL_CLOSE) == 0) { - if(ext->hide_action) res = ext->hide_action(kb); + if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_CANCEL); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return res; } else if(strcmp(txt, SYMBOL_OK) == 0) { - if(ext->ok_action) res = ext->ok_action(kb); + if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ res = lv_obj_del(kb); diff --git a/lv_objx/lv_kb.h b/lv_objx/lv_kb.h index c729a4e68912..335df1eef35b 100644 --- a/lv_objx/lv_kb.h +++ b/lv_objx/lv_kb.h @@ -54,8 +54,6 @@ typedef struct { lv_obj_t *ta; /*Pointer to the assigned text area*/ lv_kb_mode_t mode; /*Key map type*/ uint8_t cursor_mng :1; /*1: automatically show/hide cursor when a text area is assigned or left*/ - lv_action_t ok_action; /*Called when the "Ok" button is clicked*/ - lv_action_t hide_action; /*Called when the "Hide" button is clicked*/ } lv_kb_ext_t; enum { @@ -106,20 +104,6 @@ void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode); */ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); -/** - * Set call back to call when the "Ok" button is pressed - * @param kb pointer to Keyboard object - * @param action a callback with 'lv_action_t' type - */ -void lv_kb_set_ok_action(lv_obj_t * kb, lv_action_t action); - -/** - * Set call back to call when the "Hide" button is pressed - * @param kb pointer to Keyboard object - * @param action a callback with 'lv_action_t' type - */ -void lv_kb_set_hide_action(lv_obj_t * kb, lv_action_t action); - /** * Set a new map for the keyboard * @param kb pointer to a Keyboard object @@ -164,20 +148,6 @@ lv_kb_mode_t lv_kb_get_mode(const lv_obj_t * kb); */ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); -/** - * Get the callback to call when the "Ok" button is pressed - * @param kb pointer to Keyboard object - * @return the ok callback - */ -lv_action_t lv_kb_get_ok_action(const lv_obj_t * kb); - -/** - * Get the callback to call when the "Hide" button is pressed - * @param kb pointer to Keyboard object - * @return the close callback - */ -lv_action_t lv_kb_get_hide_action(const lv_obj_t * kb); - /** * Get a style of a keyboard * @param kb pointer to a keyboard object diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index a0d1963d33a4..d166cd615800 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -47,7 +47,7 @@ static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -91,8 +91,8 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_speed = LV_LABEL_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; - lv_obj_set_design_func(new_label, lv_label_design); - lv_obj_set_signal_func(new_label, lv_label_signal); + lv_obj_set_design_cb(new_label, lv_label_design); + lv_obj_set_signal_cb(new_label, lv_label_signal); /*Init the new label*/ if(copy == NULL) { diff --git a/lv_objx/lv_led.c b/lv_objx/lv_led.c index 3529eb5455ef..839bcf588667 100644 --- a/lv_objx/lv_led.c +++ b/lv_objx/lv_led.c @@ -33,8 +33,8 @@ static lv_res_t lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design_f; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design_f; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -69,8 +69,8 @@ lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy) ext->bright = LV_LED_BRIGHT_ON; - lv_obj_set_signal_func(new_led, lv_led_signal); - lv_obj_set_design_func(new_led, lv_led_design); + lv_obj_set_signal_cb(new_led, lv_led_signal); + lv_obj_set_design_cb(new_led, lv_led_design); /*Init the new led object*/ if(copy == NULL) { diff --git a/lv_objx/lv_line.c b/lv_objx/lv_line.c index 1c8dd9957aba..882ba3620ca7 100644 --- a/lv_objx/lv_line.c +++ b/lv_objx/lv_line.c @@ -33,7 +33,7 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -69,8 +69,8 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) ext->auto_size = 1; ext->y_inv = 0; - lv_obj_set_design_func(new_line, lv_line_design); - lv_obj_set_signal_func(new_line, lv_line_signal); + lv_obj_set_design_cb(new_line, lv_line_design); + lv_obj_set_signal_cb(new_line, lv_line_signal); /*Init the new line*/ if(copy == NULL) { diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 17e1d865591f..097f2495f1f5 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -44,11 +44,11 @@ static void lv_list_btn_single_selected(lv_obj_t *btn); * STATIC VARIABLES **********************/ #if USE_LV_IMG -static lv_signal_func_t img_signal; +static lv_signal_cb_t img_signal; #endif -static lv_signal_func_t label_signal; -static lv_signal_func_t ancestor_page_signal; -static lv_signal_func_t ancestor_btn_signal; +static lv_signal_cb_t label_signal; +static lv_signal_cb_t ancestor_page_signal; +static lv_signal_cb_t ancestor_btn_signal; #if USE_LV_GROUP /*Used to make the last clicked button pressed (selected) when the list become focused and `click_focus == 1`*/ static lv_obj_t * last_clicked_btn; @@ -98,7 +98,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->selected_btn = NULL; #endif - lv_obj_set_signal_func(new_list, lv_list_signal); + lv_obj_set_signal_cb(new_list, lv_list_signal); /*Init the new list object*/ if(copy == NULL) { @@ -132,7 +132,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_t * copy_img = lv_list_get_btn_img(copy_btn); if(copy_img) img_src = lv_img_get_src(copy_img); #endif - lv_list_add(new_list, img_src, lv_list_get_btn_text(copy_btn), lv_btn_get_action(copy_btn, LV_BTN_ACTION_CLICK)); + lv_list_add(new_list, img_src, lv_list_get_btn_text(copy_btn), copy_btn->event_cb); copy_btn = lv_list_get_next_btn(copy, copy_btn); } @@ -174,10 +174,10 @@ void lv_list_clean(lv_obj_t * obj) * @param list pointer to list object * @param img_fn file name of an image before the text (NULL if unused) * @param txt text of the list element (NULL if unused) - * @param rel_action pointer to release action function (like with lv_btn) + * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_action_t rel_action) +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb) { lv_style_t * style = lv_obj_get_style(list); lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -196,12 +196,12 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_btn_set_style(liste, LV_BTN_STYLE_TGL_PR, ext->styles_btn[LV_BTN_STATE_TGL_PR]); lv_btn_set_style(liste, LV_BTN_STYLE_INA, ext->styles_btn[LV_BTN_STATE_INA]); - lv_btn_set_action(liste, LV_BTN_ACTION_CLICK, rel_action); + lv_obj_set_event_cb(liste, event_cb); lv_page_glue_obj(liste, true); lv_btn_set_layout(liste, LV_LAYOUT_ROW_M); lv_btn_set_fit2(liste, LV_FIT_FLOOD, LV_FIT_TIGHT); lv_obj_set_protect(liste, LV_PROTECT_PRESS_LOST); - lv_obj_set_signal_func(liste, lv_list_btn_signal); + lv_obj_set_signal_cb(liste, lv_list_btn_signal); /*Make the size adjustment*/ lv_coord_t w = lv_obj_get_width(list); @@ -431,7 +431,7 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn) lv_obj_t * label = lv_obj_get_child(btn, NULL); if(label == NULL) return NULL; - while(label->signal_func != label_signal) { + while(label->signal_cb != label_signal) { label = lv_obj_get_child(btn, label); if(label == NULL) break; } @@ -450,7 +450,7 @@ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn) lv_obj_t * img = lv_obj_get_child(btn, NULL); if(img == NULL) return NULL; - while(img->signal_func != img_signal) { + while(img->signal_cb != img_signal) { img = lv_obj_get_child(btn, img); if(img == NULL) break; } @@ -478,7 +478,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child(scrl, prev_btn); if(btn == NULL) return NULL; - while(btn->signal_func != lv_list_btn_signal) { + while(btn->signal_cb != lv_list_btn_signal) { btn = lv_obj_get_child(scrl, btn); if(btn == NULL) break; } @@ -505,7 +505,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child_back(scrl, prev_btn); if(btn == NULL) return NULL; - while(btn->signal_func != lv_list_btn_signal) { + while(btn->signal_cb != lv_list_btn_signal) { btn = lv_obj_get_child_back(scrl, btn); if(btn == NULL) break; } @@ -846,9 +846,6 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(btn != NULL) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->last_sel = btn; - lv_action_t rel_action; - rel_action = lv_btn_get_action(btn, LV_BTN_ACTION_CLICK); - if(rel_action != NULL) rel_action(btn); } } #endif diff --git a/lv_objx/lv_list.h b/lv_objx/lv_list.h index a318770821c7..5c6816f12f90 100644 --- a/lv_objx/lv_list.h +++ b/lv_objx/lv_list.h @@ -105,10 +105,10 @@ void lv_list_clean(lv_obj_t *obj); * @param list pointer to list object * @param img_fn file name of an image before the text (NULL if unused) * @param txt text of the list element (NULL if unused) - * @param rel_action pointer to release action function (like with lv_btn) + * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_action_t rel_action); +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb); /** * Remove the index of the button in the list diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index e86e4aa54af1..06b3fbed6bd4 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -34,7 +34,7 @@ static lv_coord_t lv_lmeter_coord_round(int32_t x); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -74,8 +74,8 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) ext->scale_angle = 240; /*(scale_num - 1) * N looks better */ /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_lmeter, lv_lmeter_signal); - lv_obj_set_design_func(new_lmeter, lv_lmeter_design); + lv_obj_set_signal_cb(new_lmeter, lv_lmeter_signal); + lv_obj_set_design_cb(new_lmeter, lv_lmeter_design); /*Init the new line meter line meter*/ if(copy == NULL) { diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index adaf4ad42505..f03dc68ab0b2 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -43,7 +43,7 @@ static void lv_mbox_close_end_cb(lv_obj_t * mbox); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -80,7 +80,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_mbox, lv_mbox_signal); + lv_obj_set_signal_cb(new_mbox, lv_mbox_signal); /*Init the new message box message box*/ if(copy == NULL) { @@ -431,7 +431,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL || sign == LV_SIGNAL_GET_EDITABLE) { if(ext->btnm) { - ext->btnm->signal_func(ext->btnm, sign, param); + ext->btnm->signal_cb(ext->btnm, sign, param); } /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't (Only the message box's container) diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 8b2f602d826e..c714c9873caa 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -39,12 +39,13 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); static void edge_flash_anim(void * page, int32_t v); static void edge_flash_anim_end(void * page); +static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event); /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -78,8 +79,6 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; ext->scrl = NULL; - ext->pr_action = NULL; - ext->rel_action = NULL; ext->sb.hor_draw = 0; ext->sb.ver_draw = 0; ext->sb.style = &lv_style_pretty; @@ -98,17 +97,18 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new page object*/ if(copy == NULL) { ext->scrl = lv_cont_create(new_page, NULL); - lv_obj_set_signal_func(ext->scrl, lv_page_scrollable_signal); - lv_obj_set_design_func(ext->scrl, lv_scrl_design); + lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal); + lv_obj_set_design_cb(ext->scrl, lv_scrl_design); lv_obj_set_drag(ext->scrl, true); lv_obj_set_drag_throw(ext->scrl, true); lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST); lv_cont_set_fit4(ext->scrl, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL); + lv_obj_set_event_cb(ext->scrl, scrl_def_event_cb); /*Propagate some event to the background object by default for convenience */ /* Add the signal function only if 'scrolling' is created * because everything has to be ready before any signal is received*/ - lv_obj_set_signal_func(new_page, lv_page_signal); - lv_obj_set_design_func(new_page, lv_page_design); + lv_obj_set_signal_cb(new_page, lv_page_signal); + lv_obj_set_design_cb(new_page, lv_page_design); lv_page_set_sb_mode(new_page, ext->sb.mode); @@ -133,10 +133,8 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) } else { lv_page_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->scrl = lv_cont_create(new_page, copy_ext->scrl); - lv_obj_set_signal_func(ext->scrl, lv_page_scrollable_signal); + lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal); - lv_page_set_pr_action(new_page, copy_ext->pr_action); - lv_page_set_rel_action(new_page, copy_ext->rel_action); lv_page_set_sb_mode(new_page, copy_ext->sb.mode); lv_page_set_arrow_scroll(new_page, copy_ext->arrow_scroll); @@ -147,8 +145,8 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) /* Add the signal function only if 'scrolling' is created * because everything has to be ready before any signal is received*/ - lv_obj_set_signal_func(new_page, lv_page_signal); - lv_obj_set_design_func(new_page, lv_page_design); + lv_obj_set_signal_cb(new_page, lv_page_signal); + lv_obj_set_design_cb(new_page, lv_page_design); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_page); @@ -175,28 +173,6 @@ void lv_page_clean(lv_obj_t * obj) * Setter functions *====================*/ -/** - * Set a release action for the page - * @param page pointer to a page object - * @param rel_action a function to call when the page is release - */ -void lv_page_set_rel_action(lv_obj_t * page, lv_action_t rel_action) -{ - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - ext->rel_action = rel_action; -} - -/** - * Set a press action for the page - * @param page pointer to a page object - * @param pr_action a function to call when the page is pressed - */ -void lv_page_set_pr_action(lv_obj_t * page, lv_action_t pr_action) -{ - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - ext->pr_action = pr_action; -} - /** * Set the scroll bar mode on a page * @param page pointer to a page object @@ -301,28 +277,6 @@ lv_obj_t * lv_page_get_scrl(const lv_obj_t * page) return ext->scrl; } -/** - * Get the press action of the page - * @param page pointer to a page object - * @return a function to call when the page is pressed - */ -lv_action_t lv_page_get_pr_action(lv_obj_t * page) -{ - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - return ext->pr_action; -} - -/** - * Get the release action of the page - * @param page pointer to a page object - * @return a function to call when the page is released - */ -lv_action_t lv_page_get_rel_action(lv_obj_t * page) -{ - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - return ext->rel_action; -} - /** * Set the scroll bar mode on a page * @param page pointer to a page object @@ -786,7 +740,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } } } else if(sign == LV_SIGNAL_STYLE_CHG) { - ext->scrl->signal_func(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); + ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); /*The scrollbars are important only if they are visible now*/ if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page); @@ -798,21 +752,11 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(ext->scrl != NULL && (lv_obj_get_width(page) != lv_area_get_width(param) || lv_obj_get_height(page) != lv_area_get_height(param))) { /*If no hor_fit enabled set the scrollable's width to the page's width*/ - ext->scrl->signal_func(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); + ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); /*The scrollbars are important only if they are visible now*/ if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page); } - } else if(sign == LV_SIGNAL_PRESSED) { - if(ext->pr_action != NULL) { - res = ext->pr_action(page); - } - } else if(sign == LV_SIGNAL_RELEASED) { - if(lv_indev_is_dragging(lv_indev_get_act()) == false) { - if(ext->rel_action != NULL) { - res = ext->rel_action(page); - } - } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { /*Ensure ext. size for the scrollbars if they are out of the page*/ if(page->ext_size < (-ext->sb.style->body.padding.hor)) page->ext_size = -ext->sb.style->body.padding.hor; @@ -1019,22 +963,36 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi page_ext->sb.ver_draw = 0; } } - } else if(sign == LV_SIGNAL_PRESSED) { - if(page_ext->pr_action != NULL) { - res = page_ext->pr_action(page); - } - } else if(sign == LV_SIGNAL_RELEASED) { - if(lv_indev_is_dragging(lv_indev_get_act()) == false) { - if(page_ext->rel_action != NULL) { - res = page_ext->rel_action(page); - } - } } return res; } +/** + * Propagate the input device related event of the scrollable to the parent page background + * It is used by default if the scrollable's event is not specified + * @param scrl pointer to the page's scrollable object + * @param event type of the event + */ +static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) +{ + lv_obj_t * page = lv_obj_get_parent(scrl); + + if(event == LV_EVENT_PRESSED || + event == LV_EVENT_PRESSING || + event == LV_EVENT_PRESS_LOST || + event == LV_EVENT_RELEASED || + event == LV_EVENT_CLICKED || + event == LV_EVENT_LONG_PRESSED || + event == LV_EVENT_LONG_PRESSED_REPEAT || + event == LV_EVENT_LONG_HOVER_IN || + event == LV_EVENT_LONG_HOVER_OUT) + { + lv_obj_send_event(page, event); + } +} + /** * Refresh the position and size of the scroll bars. * @param page pointer to a page object diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index 4382aafc97b9..917ec0b486d7 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -55,8 +55,6 @@ typedef struct lv_cont_ext_t bg; /*Ext. of ancestor*/ /*New data for this type */ lv_obj_t * scrl; /*The scrollable object on the background*/ - lv_action_t rel_action; /*Function to call when the page is released*/ - lv_action_t pr_action; /*Function to call when the page is pressed*/ struct { lv_style_t *style; /*Style of scrollbars*/ lv_area_t hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ @@ -106,20 +104,6 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy); */ void lv_page_clean(lv_obj_t *obj); -/** - * Get the press action of the page - * @param page pointer to a page object - * @return a function to call when the page is pressed - */ -lv_action_t lv_page_get_pr_action(lv_obj_t * page); - -/** - * Get the release action of the page - * @param page pointer to a page object - * @return a function to call when the page is released - */ -lv_action_t lv_page_get_rel_action(lv_obj_t * page); - /** * Get the scrollable object of a page * @param page pointer to a page object @@ -131,20 +115,6 @@ lv_obj_t * lv_page_get_scrl(const lv_obj_t * page); * Setter functions *====================*/ -/** - * Set a release action for the page - * @param page pointer to a page object - * @param rel_action a function to call when the page is released - */ -void lv_page_set_rel_action(lv_obj_t * page, lv_action_t rel_action); - -/** - * Set a press action for the page - * @param page pointer to a page object - * @param pr_action a function to call when the page is pressed - */ -void lv_page_set_pr_action(lv_obj_t * page, lv_action_t pr_action); - /** * Set the scroll bar mode on a page * @param page pointer to a page object diff --git a/lv_objx/lv_preload.c b/lv_objx/lv_preload.c index 9532e53c8b0f..8106c496a475 100644 --- a/lv_objx/lv_preload.c +++ b/lv_objx/lv_preload.c @@ -43,8 +43,8 @@ static lv_res_t lv_preload_signal(lv_obj_t * preload, lv_signal_t sign, void * p /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -82,8 +82,8 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_type = LV_PRELOAD_DEF_ANIM; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_preload, lv_preload_signal); - lv_obj_set_design_func(new_preload, lv_preload_design); + lv_obj_set_signal_cb(new_preload, lv_preload_signal); + lv_obj_set_design_cb(new_preload, lv_preload_design); /*Init the new pre loader pre loader*/ diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index cb5960d20638..81d404432708 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -41,8 +41,8 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_signal_func_t ancestor_scrl_signal; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t ancestor_scrl_signal; /********************** * MACROS @@ -77,21 +77,20 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/ /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_roller, lv_roller_signal); - lv_obj_set_design_func(new_roller, lv_roller_design); + lv_obj_set_signal_cb(new_roller, lv_roller_signal); + lv_obj_set_design_cb(new_roller, lv_roller_design); /*Init the new roller roller*/ if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_roller); - lv_obj_set_drag(scrl, true); /*In ddlist is might be disabled*/ - lv_page_set_rel_action(new_roller, NULL); /*Roller don't uses it (like ddlist)*/ + lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_ANIM_TIME); lv_roller_set_visible_row_count(new_roller, 3); lv_label_set_align(ext->ddlist.label, LV_LABEL_ALIGN_CENTER); - lv_obj_set_signal_func(scrl, lv_roller_scrl_signal); + lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -107,7 +106,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_obj_t * scrl = lv_page_get_scrl(new_roller); lv_ddlist_open(new_roller, false); - lv_obj_set_signal_func(scrl, lv_roller_scrl_signal); + lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal); lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/ } @@ -404,7 +403,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } } else if(c == LV_GROUP_KEY_ENTER) { ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/ - if(ext->ddlist.action) ext->ddlist.action(roller); + lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); #if USE_LV_GROUP lv_group_t * g = lv_obj_get_group(roller); @@ -459,7 +458,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; ext->ddlist.sel_opt_id = id; - if(ext->ddlist.action) ext->ddlist.action(roller); + lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); } else if(sign == LV_SIGNAL_RELEASED) { /*If picked an option by clicking then set it*/ if(!lv_indev_is_dragging(indev)) { @@ -470,7 +469,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; ext->ddlist.sel_opt_id = id; - if(ext->ddlist.action) ext->ddlist.action(roller); + lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); } } diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index 2f1b21c7c048..a4c268256ba3 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -90,16 +90,6 @@ static inline void lv_roller_set_options(lv_obj_t * roller, const char * options */ void lv_roller_set_selected(lv_obj_t *roller, uint16_t sel_opt, bool anim_en); -/** - * Set a function to call when a new option is chosen - * @param roller pointer to a roller - * @param action pointer to a callback function - */ -static inline void lv_roller_set_action(lv_obj_t * roller, lv_action_t action) -{ - lv_ddlist_set_action(roller, action); -} - /** * Set the height to show the given number of rows (options) * @param roller pointer to a roller object @@ -176,16 +166,6 @@ static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * bu lv_ddlist_get_selected_str(roller, buf); } -/** - * Get the "option selected" callback function - * @param roller pointer to a roller - * @return pointer to the call back function - */ -static inline lv_action_t lv_roller_get_action(const lv_obj_t * roller) -{ - return lv_ddlist_get_action(roller); -} - /** * Get the open/close animation time. * @param roller pointer to a roller diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index d75f84bd1cd2..ab73362df44c 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -34,8 +34,8 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design_f; -static lv_signal_func_t ancestor_signal; +static lv_design_cb_t ancestor_design_f; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -69,14 +69,13 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ - ext->action = NULL; ext->drag_value = LV_SLIDER_NOT_PRESSED; ext->style_knob = &lv_style_pretty; ext->knob_in = 0; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_slider, lv_slider_signal); - lv_obj_set_design_func(new_slider, lv_slider_design); + lv_obj_set_signal_cb(new_slider, lv_slider_signal); + lv_obj_set_design_cb(new_slider, lv_slider_design); /*Init the new slider slider*/ if(copy == NULL) { @@ -97,7 +96,6 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_slider_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->style_knob = copy_ext->style_knob; - ext->action = copy_ext->action; ext->knob_in = copy_ext->knob_in; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_slider); @@ -114,17 +112,6 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) * Setter functions *====================*/ -/** - * Set a function which will be called when a new value is set on the slider - * @param slider pointer to slider object - * @param action a callback function - */ -void lv_slider_set_action(lv_obj_t * slider, lv_action_t action) -{ - lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); - ext->action = action; -} - /** * Set the 'knob in' attribute of a slider * @param slider pointer to slider object @@ -181,17 +168,6 @@ int16_t lv_slider_get_value(const lv_obj_t * slider) else return lv_bar_get_value(slider); } -/** - * Get the slider action function - * @param slider pointer to slider object - * @return the callback function - */ -lv_action_t lv_slider_get_action(const lv_obj_t * slider) -{ - lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); - return ext->action; -} - /** * Give the slider is being dragged or not * @param slider pointer to a slider object @@ -454,18 +430,18 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(tmp != ext->drag_value) { ext->drag_value = tmp; lv_obj_invalidate(slider); - if(ext->action != NULL) res = ext->action(slider); + lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_slider_set_value(slider, ext->drag_value); ext->drag_value = LV_SLIDER_NOT_PRESSED; - if(ext->action != NULL) res = ext->action(slider); + lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); } else if(sign == LV_SIGNAL_CORD_CHG) { /* The knob size depends on slider size. * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/ if(lv_obj_get_width(slider) != lv_area_get_width(param) || lv_obj_get_height(slider) != lv_area_get_height(param)) { - slider->signal_func(slider, LV_SIGNAL_REFR_EXT_SIZE, NULL); + slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_SIZE, NULL); } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); @@ -498,10 +474,10 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par #endif if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(slider, lv_slider_get_value(slider) + 1); - if(ext->action != NULL) res = ext->action(slider); + lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { lv_slider_set_value(slider, lv_slider_get_value(slider) - 1); - if(ext->action != NULL) res = ext->action(slider); + lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index 6336ae8a818b..0eb1195159f0 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -41,7 +41,6 @@ typedef struct { lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ - lv_action_t action; /*Function to call when a new value is set*/ lv_style_t *style_knob; /*Style of the knob*/ int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ uint8_t knob_in :1; /*1: Draw the knob inside the bar*/ @@ -104,13 +103,6 @@ static inline void lv_slider_set_range(lv_obj_t *slider, int16_t min, int16_t ma lv_bar_set_range(slider, min, max); } -/** - * Set a function which will be called when a new value is set on the slider - * @param slider pointer to slider object - * @param action a callback function - */ -void lv_slider_set_action(lv_obj_t * slider, lv_action_t action); - /** * Set the 'knob in' attribute of a slider * @param slider pointer to slider object @@ -158,13 +150,6 @@ static inline int16_t lv_slider_get_max_value(const lv_obj_t * slider) return lv_bar_get_max_value(slider); } -/** - * Get the slider action function - * @param slider pointer to slider object - * @return the callback function - */ -lv_action_t lv_slider_get_action(const lv_obj_t * slider); - /** * Give the slider is being dragged or not * @param slider pointer to a slider object diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 0d5e4edbf31b..27df3e7d5c1f 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -29,8 +29,8 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -79,8 +79,8 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_ta_set_cursor_type(new_spinbox, LV_CURSOR_BLOCK | LV_CURSOR_HIDDEN); /*hidden by default*/ /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_spinbox, lv_spinbox_signal); - lv_obj_set_design_func(new_spinbox, ancestor_design); /*Leave the Text area's design function*/ + lv_obj_set_signal_cb(new_spinbox, lv_spinbox_signal); + lv_obj_set_design_cb(new_spinbox, ancestor_design); /*Leave the Text area's design function*/ /*Init the new spinbox spinbox*/ if(copy == NULL) { diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index 35fe47674922..585a6c07327a 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -35,7 +35,7 @@ static void lv_sw_anim_to_value(lv_obj_t * sw, int16_t value); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -76,7 +76,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) ext->style_knob_on = ext->slider.style_knob; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_sw, lv_sw_signal); + lv_obj_set_signal_cb(new_sw, lv_sw_signal); /*Init the new switch switch*/ if(copy == NULL) { @@ -310,10 +310,6 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_PRESSING) old_val = ext->slider.drag_value; else old_val = lv_slider_get_value(sw); - /*Do not let the slider to call the callback. The Switch will do it if required*/ - lv_action_t slider_action = ext->slider.action; - ext->slider.action = NULL; - lv_res_t res; /* Include the ancient signal function */ res = ancestor_signal(sw, sign, param); @@ -377,7 +373,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(lv_sw_get_state(sw)) lv_sw_off_anim(sw); else lv_sw_on_anim(sw); - if(slider_action != NULL) res = slider_action(sw); + lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); } /*If the switch was dragged then calculate the new state based on the current position*/ else { @@ -385,7 +381,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(v > LV_SWITCH_SLIDER_ANIM_MAX / 2) lv_sw_on_anim(sw); else lv_sw_off_anim(sw); - if(slider_action != NULL) res = slider_action(sw); + lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_CONTROLL) { @@ -395,13 +391,13 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(old_val) lv_sw_off_anim(sw); else lv_sw_on_anim(sw); - if(slider_action) res = slider_action(sw); + lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); } else if(c == LV_GROUP_KEY_UP || c == LV_GROUP_KEY_RIGHT) { lv_sw_on_anim(sw); - if(slider_action) res = slider_action(sw); + lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); } else if(c == LV_GROUP_KEY_DOWN || c == LV_GROUP_KEY_LEFT) { lv_sw_off_anim(sw); - if(slider_action) res = slider_action(sw); + lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; @@ -415,9 +411,6 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) buf->type[i] = "lv_sw"; } - /*Restore the callback*/ - if(res == LV_RES_OK) ext->slider.action = slider_action; - return res; } diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index 28b22f739047..453aac2a9dd4 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -114,16 +114,6 @@ void lv_sw_off_anim(lv_obj_t * sw); */ bool lv_sw_toggle_anim(lv_obj_t *sw); -/** - * Set a function which will be called when the switch is toggled by the user - * @param sw pointer to switch object - * @param action a callback function - */ -static inline void lv_sw_set_action(lv_obj_t * sw, lv_action_t action) -{ - lv_slider_set_action(sw, action); -} - /** * Set a style of a switch * @param sw pointer to a switch object @@ -156,16 +146,6 @@ static inline bool lv_sw_get_state(const lv_obj_t *sw) return lv_bar_get_value(sw) < LV_SWITCH_SLIDER_ANIM_MAX / 2 ? false : true; } -/** - * Get the switch action function - * @param slider pointer to a switch object - * @return the callback function - */ -static inline lv_action_t lv_sw_get_action(const lv_obj_t * slider) -{ - return lv_slider_get_action(slider); -} - /** * Get a style of a switch * @param sw pointer to a switch object diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index a5a50c99f739..b2e69bdbd8e8 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -59,10 +59,10 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_so /********************** * STATIC VARIABLES **********************/ -static lv_design_func_t ancestor_design; -static lv_design_func_t scrl_design; -static lv_signal_func_t ancestor_signal; -static lv_signal_func_t scrl_signal; +static lv_design_cb_t ancestor_design; +static lv_design_cb_t scrl_design; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t scrl_signal; /********************** * MACROS @@ -110,9 +110,9 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = NULL; ext->placeholder = NULL; - lv_obj_set_signal_func(new_ta, lv_ta_signal); - lv_obj_set_signal_func(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal); - lv_obj_set_design_func(new_ta, lv_ta_design); + lv_obj_set_signal_cb(new_ta, lv_ta_signal); + lv_obj_set_signal_cb(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal); + lv_obj_set_design_cb(new_ta, lv_ta_design); /*Init the new text area object*/ if(copy == NULL) { @@ -120,7 +120,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = lv_label_create(new_ta, NULL); - lv_obj_set_design_func(ext->page.scrl, lv_ta_scrollable_design); + lv_obj_set_design_cb(ext->page.scrl, lv_ta_scrollable_design); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_BREAK); lv_label_set_text(ext->label, "Text area"); @@ -140,7 +140,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) } /*Copy an existing object*/ else { - lv_obj_set_design_func(ext->page.scrl, lv_ta_scrollable_design); + lv_obj_set_design_cb(ext->page.scrl, lv_ta_scrollable_design); lv_ta_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->label = lv_label_create(new_ta, copy_ext->label); ext->pwd_mode = copy_ext->pwd_mode; @@ -254,6 +254,8 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) lv_ta_set_edge_flash(ta, edge_flash_en); placeholder_update(ta); + + lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); } /** @@ -319,6 +321,8 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) lv_ta_set_edge_flash(ta, edge_flash_en); placeholder_update(ta); + + lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); } /** @@ -360,6 +364,8 @@ void lv_ta_del_char(lv_obj_t * ta) lv_ta_set_cursor_pos(ta, ext->cursor.pos - 1); placeholder_update(ta); + + lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); } /** diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index a993459b11c6..f5d1b80679b0 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -201,16 +201,6 @@ void lv_ta_set_accepted_chars(lv_obj_t * ta, const char * list); */ void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num); -/** - * Set an action to call when the Text area is clicked - * @param ta pointer to a Text area - * @param action a function pointer - */ -static inline void lv_ta_set_action(lv_obj_t * ta, lv_action_t action) -{ - lv_page_set_rel_action(ta, action); -} - /** * Set the scroll bar mode of a text area * @param ta pointer to a text area object @@ -323,16 +313,6 @@ const char * lv_ta_get_accepted_chars(lv_obj_t * ta); */ uint16_t lv_ta_get_max_length(lv_obj_t * ta); -/** - * Set an action to call when the Text area is clicked - * @param ta pointer to a Text area - * @param action a function pointer - */ -static inline lv_action_t lv_ta_get_action(lv_obj_t * ta) -{ - return lv_page_get_rel_action(ta); -} - /** * Get the scroll bar mode of a text area * @param ta pointer to a text area object diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index 55cb128963ac..c584b3e9ec0c 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -33,8 +33,8 @@ static void refr_size(lv_obj_t * table); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_design_func_t ancestor_scrl_design; +static lv_signal_cb_t ancestor_signal; +static lv_design_cb_t ancestor_scrl_design; /********************** * MACROS @@ -81,8 +81,8 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) } /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_table, lv_table_signal); - lv_obj_set_design_func(new_table, lv_table_design); + lv_obj_set_signal_cb(new_table, lv_table_signal); + lv_obj_set_design_cb(new_table, lv_table_design); /*Init the new table table*/ if(copy == NULL) { diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index a777f33d5c99..51e9f0f6d500 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -45,9 +45,9 @@ static void tabview_realign(lv_obj_t * tabview); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_signal_func_t page_signal; -static lv_signal_func_t page_scrl_signal; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t page_signal; +static lv_signal_cb_t page_scrl_signal; static const char * tab_def[] = {""}; /********************** @@ -96,7 +96,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_tabview, lv_tabview_signal); + lv_obj_set_signal_cb(new_tabview, lv_tabview_signal); /*Init the new tab tab*/ if(copy == NULL) { @@ -214,8 +214,8 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) if(page_signal == NULL) page_signal = lv_obj_get_signal_func(h); if(page_scrl_signal == NULL) page_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(h)); - lv_obj_set_signal_func(h, tabpage_signal); - lv_obj_set_signal_func(lv_page_get_scrl(h), tabpage_scrl_signal); + lv_obj_set_signal_cb(h, tabpage_signal); + lv_obj_set_signal_cb(lv_page_get_scrl(h), tabpage_scrl_signal); /*Extend the button matrix map with the new name*/ char * name_dm; @@ -616,7 +616,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p /* The button matrix is not in a group (the tab view is in it) but it should handle the group signals. * So propagate the related signals to the button matrix manually*/ if(ext->btns) { - ext->btns->signal_func(ext->btns, sign, param); + ext->btns->signal_cb(ext->btns, sign, param); } if(sign == LV_SIGNAL_FOCUS) { lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index b1586a0baa66..0948272293b4 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -41,9 +41,9 @@ static bool set_valid_drag_dirs(lv_obj_t * tileview); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; -static lv_signal_func_t ancestor_scrl_signal; -static lv_design_func_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t ancestor_scrl_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -84,8 +84,8 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) ext->valid_pos = NULL; /*The signal and design functions are not copied so set them here*/ - lv_obj_set_signal_func(new_tileview, lv_tileview_signal); - lv_obj_set_signal_func(lv_page_get_scrl(new_tileview), lv_tileview_scrl_signal); + lv_obj_set_signal_cb(new_tileview, lv_tileview_signal); + lv_obj_set_signal_cb(lv_page_get_scrl(new_tileview), lv_tileview_scrl_signal); /*Init the new tileview*/ if(copy == NULL) { @@ -132,7 +132,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) void lv_tileview_add_element(lv_obj_t * element) { lv_obj_set_free_ptr(element, lv_obj_get_signal_func(element)); - lv_obj_set_signal_func(element, element_signal_func); + lv_obj_set_signal_cb(element, element_signal_func); lv_obj_set_drag_parent(element, true); } @@ -439,7 +439,7 @@ static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void * lv_res_t res; /* Include the ancient signal function */ - lv_signal_func_t sign_func = lv_obj_get_free_ptr(element); + lv_signal_cb_t sign_func = lv_obj_get_free_ptr(element); res = sign_func(element, sign, param); if(res != LV_RES_OK) return res; @@ -483,7 +483,7 @@ static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void * if(drag_obj == NULL) break; } indev->proc.drag_in_prog = 0; - if(drag_obj) drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, NULL); + if(drag_obj) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, NULL); } drag_end_handler(tileview); diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index bbeee6736d54..29945619b5ae 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -29,7 +29,7 @@ static void lv_win_realign(lv_obj_t * win); /********************** * STATIC VARIABLES **********************/ -static lv_signal_func_t ancestor_signal; +static lv_signal_cb_t ancestor_signal; /********************** * MACROS @@ -110,7 +110,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, &lv_style_plain_color); } - lv_obj_set_signal_func(new_win, lv_win_signal); + lv_obj_set_signal_cb(new_win, lv_win_signal); } /*Copy an existing object*/ else { @@ -132,7 +132,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) child = lv_obj_get_child_back(copy_ext->header, child); } - lv_obj_set_signal_func(new_win, lv_win_signal); + lv_obj_set_signal_cb(new_win, lv_win_signal); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_win); @@ -163,10 +163,10 @@ void lv_win_clean(lv_obj_t * obj) * Add control button to the header of the window * @param win pointer to a window object * @param img_src an image source ('lv_img_t' variable, path to file or a symbol) - * @param rel_action a function pointer to call when the button is released + * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the created button object */ -lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_action_t rel_action) +lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t event_cb) { lv_win_ext_t * ext = lv_obj_get_ext_attr(win); @@ -174,7 +174,7 @@ lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_action_t rel_ lv_btn_set_style(btn, LV_BTN_STYLE_REL, ext->style_btn_rel); lv_btn_set_style(btn, LV_BTN_STYLE_PR, ext->style_btn_pr); lv_obj_set_size(btn, ext->btn_size, ext->btn_size); - lv_btn_set_action(btn, LV_BTN_ACTION_CLICK, rel_action); + lv_obj_set_event_cb(btn, event_cb); lv_obj_t * img = lv_img_create(btn, NULL); lv_obj_set_click(img, false); @@ -508,7 +508,7 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param) ext->title = NULL; } else if(sign == LV_SIGNAL_CONTROLL) { /*Forward all the control signals to the page*/ - ext->page->signal_func(ext->page, sign, param); + ext->page->signal_cb(ext->page, sign, param); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/lv_objx/lv_win.h b/lv_objx/lv_win.h index 7534f5eccc69..28c5a1302e88 100644 --- a/lv_objx/lv_win.h +++ b/lv_objx/lv_win.h @@ -105,10 +105,10 @@ void lv_win_clean(lv_obj_t *obj); * Add control button to the header of the window * @param win pointer to a window object * @param img_src an image source ('lv_img_t' variable, path to file or a symbol) - * @param rel_action a function pointer to call when the button is released + * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the created button object */ -lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_action_t rel_action); +lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t event_cb); /*===================== * Setter functions From dc0ce46b0c8ac0da522d53fb748afd594079865d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 26 Feb 2019 16:07:40 +0100 Subject: [PATCH 059/590] update obejcts with the new event system --- lv_conf_templ.h | 2 +- lv_core/lv_group.c | 4 +- lv_core/lv_indev.c | 83 +++++++++++++++++++++++------------- lv_core/lv_obj.c | 12 ++++-- lv_core/lv_style.c | 10 ++--- lv_draw/lv_draw_rect.c | 2 +- lv_hal/lv_hal_indev.h | 3 +- lv_objx/lv_bar.c | 2 +- lv_objx/lv_cb.c | 4 +- lv_objx/lv_chart.c | 2 - lv_objx/lv_ddlist.c | 95 +++++++++++++++++++++++++++++------------- lv_objx/lv_ddlist.h | 42 ++++++++++++------- lv_objx/lv_page.c | 26 ++++++++---- lv_objx/lv_roller.c | 1 + lv_objx/lv_roller.h | 2 +- lv_objx/lv_spinbox.c | 3 +- lv_objx/lv_tabview.c | 3 +- lv_objx/lv_win.c | 8 ++-- 18 files changed, 193 insertions(+), 111 deletions(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index cce4c48b7957..f43efeda6c89 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -46,7 +46,7 @@ * to store the graphical objects and other data */ #define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ #if LV_MEM_CUSTOM == 0 -# define LV_MEM_SIZE (16U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ # define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/ # define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index a2de32fd40a4..6a455089061c 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -466,7 +466,7 @@ static void style_mod_def(lv_style_t * style) style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if(style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); @@ -495,7 +495,7 @@ static void style_mod_edit_def(lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index c8011dde554b..fa2bab6fd108 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -43,7 +43,7 @@ static void indev_proc_release(lv_indev_proc_t * proc); static void indev_proc_reset_query_handler(lv_indev_t * indev); static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj); static void indev_drag(lv_indev_proc_t * state); -static void indev_drag_throw(lv_indev_proc_t * state); +static void indev_drag_throw(lv_indev_proc_t * proc); #endif /********************** @@ -425,7 +425,6 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } else if(data->key == LV_GROUP_KEY_ENTER) { if(!i->proc.long_pr_sent) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, indev_act); - lv_obj_send_event(focused, LV_EVENT_RELEASED); lv_obj_send_event(focused, LV_EVENT_CLICKED); } } else { @@ -618,7 +617,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) * It is necessary to count the long press time.*/ proc->pr_timestamp = lv_tick_get(); proc->long_pr_sent = 0; - proc->drag_range_out = 0; + proc->drag_limit_out = 0; proc->drag_in_prog = 0; proc->drag_sum.x = 0; proc->drag_sum.y = 0; @@ -652,6 +651,21 @@ static void indev_proc_press(lv_indev_proc_t * proc) proc->vect.x = proc->act_point.x - proc->last_point.x; proc->vect.y = proc->act_point.y - proc->last_point.y; + proc->drawg_throw_vect.x = (proc->drawg_throw_vect.x * 5) >> 3; + proc->drawg_throw_vect.y = (proc->drawg_throw_vect.y * 5) >> 3; + + if(proc->drawg_throw_vect.x < 0) proc->drawg_throw_vect.x++; + else if(proc->drawg_throw_vect.x > 0) proc->drawg_throw_vect.x--; + + if(proc->drawg_throw_vect.y < 0) proc->drawg_throw_vect.y++; + else if(proc->drawg_throw_vect.y > 0) proc->drawg_throw_vect.y--; + + proc->drawg_throw_vect.x += (proc->vect.x * 4) >> 3; + proc->drawg_throw_vect.y += (proc->vect.y * 4) >> 3; + + printf("dtv:%d\n", proc->drawg_throw_vect.y); + + /*If there is active object and it can be dragged run the drag*/ if(proc->act_obj != NULL) { proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_PRESSING, indev_act); @@ -715,9 +729,10 @@ static void indev_proc_release(lv_indev_proc_t * proc) lv_obj_t * obj_on = indev_search_obj(proc, proc->act_obj); if(obj_on == proc->act_obj) { proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); - lv_obj_send_event(proc->act_obj, LV_EVENT_RELEASED); if(proc->long_pr_sent == 0 && proc->drag_in_prog == 0) { lv_obj_send_event(proc->act_obj, LV_EVENT_CLICKED); + } else { + lv_obj_send_event(proc->act_obj, LV_EVENT_RELEASED); } } else { @@ -730,9 +745,11 @@ static void indev_proc_release(lv_indev_proc_t * proc) * If it is already not pressed then was handled in `indev_proc_press`*/ else { proc->act_obj->signal_cb(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); - lv_obj_send_event(proc->act_obj, LV_SIGNAL_RELEASED); + if(proc->long_pr_sent == 0 && proc->drag_in_prog == 0) { lv_obj_send_event(proc->act_obj, LV_EVENT_CLICKED); + } else { + lv_obj_send_event(proc->act_obj, LV_SIGNAL_RELEASED); } } @@ -794,7 +811,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev) if(indev->proc.reset_query) { indev->proc.act_obj = NULL; indev->proc.last_obj = NULL; - indev->proc.drag_range_out = 0; + indev->proc.drag_limit_out = 0; indev->proc.drag_in_prog = 0; indev->proc.long_pr_sent = 0; indev->proc.pr_timestamp = 0; @@ -868,19 +885,20 @@ static void indev_drag(lv_indev_proc_t * state) state->drag_sum.y += state->vect.y; /*Enough move?*/ - if(state->drag_range_out == 0) { + if(state->drag_limit_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ if(LV_MATH_ABS(state->drag_sum.x) >= LV_INDEV_DRAG_LIMIT || LV_MATH_ABS(state->drag_sum.y) >= LV_INDEV_DRAG_LIMIT) { - state->drag_range_out = 1; + state->drag_limit_out = 1; } } - /*If the drag limit is stepped over then handle the dragging*/ - if(state->drag_range_out != 0) { + /*If the drag limit is exceeded handle the dragging*/ + if(state->drag_limit_out != 0) { /*Set new position if the vector is not zero*/ if(state->vect.x != 0 || - state->vect.y != 0) { + state->vect.y != 0) + { /*Get the coordinates of the object and modify them*/ lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); @@ -894,9 +912,8 @@ static void indev_drag(lv_indev_proc_t * state) lv_obj_set_pos(drag_obj, act_x + state->vect.x, act_y + state->vect.y); /*Set the drag in progress flag if the object is really moved*/ - if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { - if(state->drag_range_out != 0) { /*Send the drag begin signal on first move*/ + if(state->drag_in_prog != 0) { /*Send the drag begin signal on first move*/ drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; } @@ -922,12 +939,13 @@ static void indev_drag(lv_indev_proc_t * state) * Handle throwing by drag if the drag is ended * @param indev pointer to an input device state */ -static void indev_drag_throw(lv_indev_proc_t * state) +static void indev_drag_throw(lv_indev_proc_t * proc) { - if(state->drag_in_prog == 0) return; + if(proc->drag_in_prog == 0) return; /*Set new position if the vector is not zero*/ - lv_obj_t * drag_obj = state->last_obj; + lv_obj_t * drag_obj = proc->last_obj; + /*If drag parent is active check recursively the drag_parent attribute*/ while(lv_obj_get_drag_parent(drag_obj) != false && @@ -935,45 +953,50 @@ static void indev_drag_throw(lv_indev_proc_t * state) drag_obj = lv_obj_get_parent(drag_obj); } - if(drag_obj == NULL) return; + if(drag_obj == NULL) { + return; + } /*Return if the drag throw is not enabled*/ if(lv_obj_get_drag_throw(drag_obj) == false) { - state->drag_in_prog = 0; + proc->drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); return; } /*Reduce the vectors*/ - state->vect.x = state->vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; - state->vect.y = state->vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; + proc->drawg_throw_vect.x = proc->drawg_throw_vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; + proc->drawg_throw_vect.y = proc->drawg_throw_vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; - if(state->vect.x != 0 || - state->vect.y != 0) { + if(proc->drawg_throw_vect.x != 0 || + proc->drawg_throw_vect.y != 0) { /*Get the coordinates and modify them*/ lv_area_t coords_ori; lv_obj_get_coords(drag_obj, &coords_ori); - lv_coord_t act_x = lv_obj_get_x(drag_obj) + state->vect.x; - lv_coord_t act_y = lv_obj_get_y(drag_obj) + state->vect.y; + lv_coord_t act_x = lv_obj_get_x(drag_obj) + proc->drawg_throw_vect.x; + lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->drawg_throw_vect.y; lv_obj_set_pos(drag_obj, act_x, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); /*If non of the coordinates are changed then do not continue throwing*/ - if((coords_ori.x1 == coord_new.x1 || state->vect.x == 0) && - (coords_ori.y1 == coord_new.y1 || state->vect.y == 0)) { - state->drag_in_prog = 0; - state->vect.x = 0; - state->vect.y = 0; + if((coords_ori.x1 == coord_new.x1 || proc->drawg_throw_vect.x == 0) && + (coords_ori.y1 == coord_new.y1 || proc->drawg_throw_vect.y == 0)) { + proc->drag_in_prog = 0; + proc->vect.x = 0; + proc->vect.y = 0; + proc->drawg_throw_vect.x = 0; + proc->drawg_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } } /*If the vectors become 0 -> drag_in_prog = 0 and send a drag end signal*/ else { - state->drag_in_prog = 0; + proc->drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } + } #endif diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index f94bfc4d766d..c8eb0c9c98e2 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -232,7 +232,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->style_p = &lv_style_plain_color; } - /*Set virtual functions*/ + /*Set callbacks*/ lv_obj_set_signal_cb(new_obj, lv_obj_signal); lv_obj_set_design_cb(new_obj, lv_obj_design); @@ -1813,11 +1813,15 @@ static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_m { if(mode == LV_DESIGN_COVER_CHK) { - /* Because of the radius it is not sure the area is covered - * Check the areas where there is no radius*/ + /*Most trivial test. The mask is fully IN the object? If no it surely not covers it*/ + if(lv_area_is_in(mask_p, &obj->coords) == false) return false; + + /*Can cover the area only if fully solid (no opacity)*/ lv_style_t * style = lv_obj_get_style(obj); - if(style->body.empty != 0) return false; + if(style->body.opa != LV_OPA_COVER) return false; + /* Because of the radius it is not sure the area is covered + * Check the areas where there is no radius*/ uint16_t r = style->body.radius; if(r == LV_RADIUS_CIRCLE) return false; diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 02dc011bab23..487d2e1f102f 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -78,8 +78,8 @@ void lv_style_init(void) lv_style_scr.body.main_color = LV_COLOR_WHITE; lv_style_scr.body.grad_color = LV_COLOR_WHITE; lv_style_scr.body.radius = 0; - lv_style_scr.body.padding.ver = LV_DPI / 12; - lv_style_scr.body.padding.hor = LV_DPI / 12; + lv_style_scr.body.padding.ver = 0; + lv_style_scr.body.padding.hor = 0; lv_style_scr.body.padding.inner = LV_DPI / 12; lv_style_scr.body.border.color = LV_COLOR_BLACK; @@ -108,6 +108,8 @@ void lv_style_init(void) /*Plain style (by default near the same as the screen style)*/ memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t)); + lv_style_plain.body.padding.hor = LV_DPI / 12; + lv_style_plain.body.padding.ver = LV_DPI / 12; /*Plain color style*/ memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t)); @@ -140,9 +142,9 @@ void lv_style_init(void) /*Transparent style*/ memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t)); - lv_style_transp.body.empty = 1; lv_style_transp.glass = 1; lv_style_transp.body.border.width = 0; + lv_style_transp.body.opa = LV_OPA_TRANSP; /*Transparent fitting size*/ memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t)); @@ -252,14 +254,12 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res->line.color = lv_color_mix(end->line.color, start->line.color, opa); if(ratio < (STYLE_MIX_MAX >> 1)) { - res->body.empty = start->body.empty; res->body.border.part = start->body.border.part; res->glass = start->glass; res->text.font = start->text.font; res->body.shadow.type = start->body.shadow.type; res->line.rounded = start->line.rounded; } else { - res->body.empty = end->body.empty; res->body.border.part = end->body.border.part; res->glass = end->glass; res->text.font = end->text.font; diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index b1d341ad8389..7bde1d8831fb 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -71,7 +71,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty lv_draw_shadow(coords, mask, style, opa_scale); } #endif - if(style->body.empty == 0 && style->body.opa >= LV_OPA_MIN) { + if(style->body.opa > LV_OPA_MIN) { lv_draw_rect_main_mid(coords, mask, style, opa_scale); if(style->body.radius != 0) { diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 42cadc6ea4b1..0391fb52867c 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -93,11 +93,12 @@ typedef struct _lv_indev_proc_t { lv_point_t last_point; lv_point_t vect; lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/ + lv_point_t drawg_throw_vect; struct _lv_obj_t * act_obj; struct _lv_obj_t * last_obj; /*Flags*/ - uint8_t drag_range_out :1; + uint8_t drag_limit_out :1; uint8_t drag_in_prog :1; uint8_t wait_unil_release :1; }; diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 3f546d795369..1cad949633dd 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -385,7 +385,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); - style_tmp.body.empty = 1; + style_tmp.body.opa = LV_OPA_TRANSP; style_tmp.body.shadow.width = 0; lv_draw_rect(&bar->coords, mask, &style_tmp, opa_scale); } diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 248d5f86bbc9..b7b613984c95 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -273,13 +273,13 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig } else if(mode == LV_DESIGN_DRAW_MAIN) { #if USE_LV_GROUP /* If the check box is the active in a group and - * the background is not visible (transparent or empty) + * the background is not visible (transparent) * then activate the style of the bullet*/ lv_style_t * style_ori = lv_obj_get_style(bullet); lv_obj_t * bg = lv_obj_get_parent(bullet); lv_style_t * style_page = lv_obj_get_style(bg); lv_group_t * g = lv_obj_get_group(bg); - if(style_page->body.empty != 0 || style_page->body.opa == LV_OPA_TRANSP) { /*Background is visible?*/ + if(style_page->body.opa == LV_OPA_TRANSP) { /*Is the Background visible?*/ if(lv_group_get_focused(g) == bg) { lv_style_t * style_mod; style_mod = lv_group_mod_style(g, style_ori); diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 14e21fff0b1d..39e394ac2e40 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -674,7 +674,6 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) lv_style_copy(&style_point, &lv_style_plain); style_point.body.border.width = 0; - style_point.body.empty = 0; style_point.body.radius = LV_RADIUS_CIRCLE; style_point.body.opa = ext->series.opa; style_point.body.radius = ext->series.width; @@ -725,7 +724,6 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) lv_style_copy(&rects, &lv_style_plain); rects.body.border.width = 0; - rects.body.empty = 0; rects.body.radius = 0; rects.body.opa = ext->series.opa; diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index d8e832761e60..62c95c1be283 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -93,6 +93,7 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_time = LV_DDLIST_ANIM_TIME; ext->sel_style = &lv_style_plain_color; ext->draw_arrow = 0; /*Do not draw arrow by default*/ + ext->stay_open = 1; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_ddlist, lv_ddlist_signal); @@ -103,7 +104,7 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_ddlist); lv_obj_set_drag(scrl, false); - lv_page_set_scrl_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); + lv_page_set_scrl_fit2(new_ddlist, LV_FIT_FLOOD, LV_FIT_TIGHT); ext->label = lv_label_create(new_ddlist, NULL); lv_cont_set_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_NONE); @@ -151,19 +152,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) * Setter functions *====================*/ -/** - * Set arrow draw in a drop down list - * @param ddlist pointer to drop down list object - * @param en enable/disable a arrow draw. E.g. "true" for draw. - */ -void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en) -{ - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - - /*Set the flag*/ - ext->draw_arrow = en; -} - /** * Set the options in a drop down list from a string * @param ddlist pointer to drop down list object @@ -226,13 +214,40 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h) * @param ddlist pointer to a drop down list * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit) +void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit) { - lv_cont_set_fit2(ddlist, fit, lv_cont_get_fit_top(ddlist)); + lv_cont_set_fit2(ddlist, fit, LV_FIT_NONE); lv_ddlist_refr_size(ddlist, false); } +/** + * Set arrow draw in a drop down list + * @param ddlist pointer to drop down list object + * @param en enable/disable a arrow draw. E.g. "true" for draw. + */ +void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en) +{ + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + /*Set the flag*/ + ext->draw_arrow = en ? 1 : 0; +} + +/** + * Leave the list opened when a new value is selected + * @param ddlist pointer to drop down list object + * @param en enable/disable "stay open" feature + */ +void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en) +{ + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + /*Set the flag*/ + ext->stay_open = en ? 1 : 0; +} + + /** * Set the open/close animation time. * @param ddlist pointer to a drop down list @@ -283,16 +298,6 @@ void lv_ddlist_set_align(lv_obj_t *ddlist, lv_label_align_t align) * Getter functions *====================*/ -/** - * Get arrow draw in a drop down list - * @param ddlist pointer to drop down list object - */ -bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist) -{ - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - - return ext->draw_arrow; -} /** * Get the options of a drop down list @@ -353,6 +358,28 @@ lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist) return ext->fix_height; } +/** + * Get arrow draw in a drop down list + * @param ddlist pointer to drop down list object + */ +bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist) +{ + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + return ext->draw_arrow ? true : false; +} + +/** + * Get whether the drop down list stay open after selecting a value or not + * @param ddlist pointer to drop down list object + */ +bool lv_ddlist_get_stay_open(lv_obj_t * ddlist) +{ + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + return ext->stay_open ? true : false; +} + /** * Get the open/close animation time. * @param ddlist pointer to a drop down list @@ -720,7 +747,9 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * if(scrl->ext_size < style->body.padding.hor) scrl->ext_size = style->body.padding.hor; } else if(sign == LV_SIGNAL_RELEASED) { - release_handler(ddlist); + if(lv_indev_is_dragging(lv_indev_get_act()) == false) { + release_handler(ddlist); + } } else if(sign == LV_SIGNAL_CLEANUP) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -742,9 +771,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist) if(ext->opened == 0) { /*Open the list*/ ext->opened = 1; lv_obj_set_drag(lv_page_get_scrl(ddlist), true); + lv_ddlist_refr_size(ddlist, true); } else { - ext->opened = 0; - lv_obj_set_drag(lv_page_get_scrl(ddlist), false); /*Search the clicked option*/ lv_indev_t * indev = lv_indev_get_act(); @@ -768,8 +796,15 @@ static lv_res_t release_handler(lv_obj_t * ddlist) ext->sel_opt_id = new_opt; lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + + if(ext->stay_open == 0) { + ext->opened = 0; + lv_obj_set_drag(lv_page_get_scrl(ddlist), false); + lv_ddlist_refr_size(ddlist, true); + } else { + lv_obj_invalidate(ddlist); + } } - lv_ddlist_refr_size(ddlist, true); return LV_RES_OK; diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 0f143eccee20..5e5c6e60ce7a 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -54,7 +54,7 @@ typedef struct uint16_t anim_time; /*Open/Close animation time [ms]*/ uint8_t opened :1; /*1: The list is opened (handled by the library)*/ uint8_t draw_arrow :1; /*1: Draw arrow*/ - + uint8_t stay_open :1; /*1: Don't close the list when a new item is selected*/ lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ } lv_ddlist_ext_t; @@ -80,13 +80,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy); * Setter functions *====================*/ -/** - * Set arrow draw in a drop down list - * @param ddlist pointer to drop down list object - * @param en enable/disable a arrow draw. E.g. "true" for draw. - */ -void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en); - /** * Set the options in a drop down list from a string * @param ddlist pointer to drop down list object @@ -115,7 +108,21 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); * @param ddlist pointer to a drop down list * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit); +void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit); + +/** + * Set arrow draw in a drop down list + * @param ddlist pointer to drop down list object + * @param en enable/disable a arrow draw. E.g. "true" for draw. + */ +void lv_ddlist_set_draw_arrow(lv_obj_t * ddlist, bool en); + +/** + * Leave the list opened when a new value is selected + * @param ddlist pointer to drop down list object + * @param en enable/disable "stay open" feature + */ +void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en); /** * Set the scroll bar mode of a drop down list @@ -154,11 +161,6 @@ void lv_ddlist_set_align(lv_obj_t *ddlist, lv_label_align_t align); * Getter functions *====================*/ -/** - * Get arrow draw in a drop down list - * @param ddlist pointer to drop down list object - */ -bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist); /** * Get the options of a drop down list @@ -189,6 +191,18 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf); */ lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist); +/** + * Get arrow draw in a drop down list + * @param ddlist pointer to drop down list object + */ +bool lv_ddlist_get_draw_arrow(lv_obj_t * ddlist); + +/** + * Get whether the drop down list stay open after selecting a value or not + * @param ddlist pointer to drop down list object + */ +bool lv_ddlist_get_stay_open(lv_obj_t * ddlist); + /** * Get the scroll bar mode of a drop down list * @param ddlist pointer to a drop down list object diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index c714c9873caa..147a9319e58d 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -585,12 +585,12 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo /*Draw only a border*/ lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_coord_t shadow_width_tmp = style->body.shadow.width; - uint8_t empty_tmp = style->body.empty; + lv_opa_t opa_tmp = style->body.opa; style->body.shadow.width = 0; - style->body.empty = 1; + style->body.opa = LV_OPA_TRANSP; lv_draw_rect(&page->coords, mask, style, lv_obj_get_opa_scale(page)); style->body.shadow.width = shadow_width_tmp; - style->body.empty = empty_tmp; + style->body.opa = opa_tmp; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); @@ -677,16 +677,24 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo } else if(mode == LV_DESIGN_DRAW_MAIN) { #if USE_LV_GROUP /* If the page is focused in a group and - * the background object is not visible (transparent or empty) + * the background object is not visible (transparent) * then "activate" the style of the scrollable*/ lv_style_t * style_scrl_ori = lv_obj_get_style(scrl); lv_obj_t * page = lv_obj_get_parent(scrl); lv_style_t * style_page = lv_obj_get_style(page); lv_group_t * g = lv_obj_get_group(page); - if((style_page->body.empty || style_page->body.opa == LV_OPA_TRANSP) && style_page->body.border.width == 0) { /*Is the background visible?*/ + if((style_page->body.opa == LV_OPA_TRANSP) && style_page->body.border.width == 0) { /*Is the background visible?*/ if(lv_group_get_focused(g) == page) { lv_style_t * style_mod; style_mod = lv_group_mod_style(g, style_scrl_ori); + /*If still not visible modify the style a littel bit*/ + if((style_mod->body.opa == LV_OPA_TRANSP) && style_mod->body.border.width == 0) { + style_mod->body.opa = LV_OPA_50; + style_mod->body.border.width = 1; + style_mod = lv_group_mod_style(g, style_mod); + } + + scrl->style_p = style_mod; /*Temporally change the style to the activated */ } } @@ -729,10 +737,10 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) /*Reposition the child to take padding into account*/ lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - child->coords.x1 += style->body.padding.hor; - child->coords.x2 += style->body.padding.hor; - child->coords.y1 += style->body.padding.ver; - child->coords.y2 += style->body.padding.ver; + tmp->coords.x1 += style->body.padding.hor; + tmp->coords.x2 += style->body.padding.hor; + tmp->coords.y1 += style->body.padding.ver; + tmp->coords.y2 += style->body.padding.ver; lv_obj_set_parent(tmp, ext->scrl); } else { diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 81d404432708..4a6f41dd6bd1 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -87,6 +87,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_ANIM_TIME); + lv_ddlist_set_stay_open(new_roller, true); lv_roller_set_visible_row_count(new_roller, 3); lv_label_set_align(ext->ddlist.label, LV_LABEL_ALIGN_CENTER); diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index a4c268256ba3..40fce4a62133 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -104,7 +104,7 @@ void lv_roller_set_visible_row_count(lv_obj_t *roller, uint8_t row_cnt); */ static inline void lv_roller_set_hor_fit(lv_obj_t * roller, bool en) { - lv_ddlist_set_hor_fit(roller, en); + lv_ddlist_set_fit(roller, en); } /** diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 27df3e7d5c1f..7a237f5334e3 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -63,8 +63,6 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_spinbox); /*Initialize the allocated 'ext'*/ - ext->ta.one_line = 1; - ext->ta.pwd_mode = 0; ext->ta.accapted_chars = "1234567890+-. "; ext->value = 0; @@ -77,6 +75,7 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) ext->value_changed_cb = NULL; lv_ta_set_cursor_type(new_spinbox, LV_CURSOR_BLOCK | LV_CURSOR_HIDDEN); /*hidden by default*/ + lv_ta_set_one_line(new_spinbox, true); /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_spinbox, lv_spinbox_signal); diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 51e9f0f6d500..bf6fdae09095 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -106,8 +106,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_name_ptr[0] = ""; ext->tab_cnt = 0; - lv_disp_t * disp = lv_obj_get_disp(new_tabview); - lv_obj_set_size(new_tabview, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); + lv_obj_set_size(new_tabview, LV_DPI * 3, LV_DPI * 2); ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 29945619b5ae..65272f09c74a 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -105,7 +105,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) lv_win_set_style(new_win, LV_WIN_STYLE_BTN_PR, th->style.win.btn.pr); } else { lv_win_set_style(new_win, LV_WIN_STYLE_BG, &lv_style_plain); - lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, &lv_style_plain); + lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_BG, &lv_style_transp_fit); lv_win_set_style(new_win, LV_WIN_STYLE_CONTENT_SCRL, &lv_style_transp); lv_win_set_style(new_win, LV_WIN_STYLE_HEADER, &lv_style_plain_color); } @@ -133,11 +133,11 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) } lv_obj_set_signal_cb(new_win, lv_win_signal); - - /*Refresh the style with new signal function*/ - lv_obj_refresh_style(new_win); } + /*Refresh the style with new signal function*/ + lv_obj_refresh_style(new_win); + lv_win_realign(new_win); LV_LOG_INFO("window created"); From e85e4a8eb9a46be950a327cfeb9b2797e18bea4a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 26 Feb 2019 19:46:37 +0100 Subject: [PATCH 060/590] lv_hal_indev: remove unnamed stuct and union --- lv_core/lv_indev.c | 240 +++++++++++++++++++++--------------------- lv_core/lv_obj.c | 4 +- lv_hal/lv_hal_indev.h | 6 +- lv_objx/lv_tileview.c | 20 ++-- 4 files changed, 135 insertions(+), 135 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 15ddf39ad676..593527dcd6d2 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -145,7 +145,7 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) indev->cursor = cur_obj; lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y); + lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); } #if USE_LV_GROUP @@ -192,8 +192,8 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point) point->x = -1; point->y = -1; } else { - point->x = indev->proc.act_point.x; - point->y = indev->proc.act_point.y; + point->x = indev->proc.types.pointer.act_point.x; + point->y = indev->proc.types.pointer.act_point.y; } } @@ -205,7 +205,7 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point) uint32_t lv_indev_get_key(const lv_indev_t * indev) { if(indev->driver.type != LV_INDEV_TYPE_KEYPAD) return 0; - else return indev->proc.last_key; + else return indev->proc.types.keypad.last_key; } /** @@ -217,13 +217,13 @@ bool lv_indev_is_dragging(const lv_indev_t * indev) { if(indev == NULL) return false; if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) return false; - return indev->proc.drag_in_prog == 0 ? false : true; + return indev->proc.types.pointer.drag_in_prog == 0 ? false : true; } /** - * Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) + * Get the types.pointer.vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device - * @param point pointer to a point to store the vector + * @param point pointer to a point to store the types.pointer.vector */ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) { @@ -237,8 +237,8 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) point->x = 0; point->y = 0; } else { - point->x = indev->proc.vect.x; - point->y = indev->proc.vect.y; + point->x = indev->proc.types.pointer.vect.x; + point->y = indev->proc.types.pointer.vect.y; } } @@ -281,7 +281,7 @@ lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev) */ void lv_indev_wait_release(lv_indev_t * indev) { - indev->proc.wait_unil_release = 1; + indev->proc.types.pointer.wait_unil_release = 1; } /********************** @@ -354,13 +354,13 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ if(i->cursor != NULL && - (i->proc.last_point.x != data->point.x || - i->proc.last_point.y != data->point.y)) { + (i->proc.types.pointer.last_point.x != data->point.x || + i->proc.types.pointer.last_point.y != data->point.y)) { lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } - i->proc.act_point.x = data->point.x; - i->proc.act_point.y = data->point.y; + i->proc.types.pointer.act_point.x = data->point.x; + i->proc.types.pointer.act_point.y = data->point.y; if(i->proc.state == LV_INDEV_STATE_PR) { indev_proc_press(&i->proc); @@ -368,8 +368,8 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) indev_proc_release(&i->proc); } - i->proc.last_point.x = i->proc.act_point.x; - i->proc.last_point.y = i->proc.act_point.y; + i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x; + i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y; } /** @@ -384,7 +384,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && - i->proc.last_state == LV_INDEV_STATE_REL) { + i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); lv_obj_t * focused = lv_group_get_focused(i->group); if(focused && data->key == LV_GROUP_KEY_ENTER) { @@ -392,7 +392,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(data->key == LV_GROUP_KEY_ENTER && i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { @@ -405,9 +405,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && i->proc.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { /*The user might clear the key when it was released. Always release the pressed key*/ - data->key = i->proc.last_key; + data->key = i->proc.types.keypad.last_key; /* Edit mode is not used by KEYPAD devices. * So leave edit mode if we are in it before focusing on the next/prev object*/ @@ -433,8 +433,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 0; } - i->proc.last_state = data->state; - i->proc.last_key = data->key; + i->proc.types.keypad.last_state = data->state; + i->proc.types.keypad.last_key = data->key; #else (void)data; /*Unused*/ (void)i; /*Unused*/ @@ -475,11 +475,11 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && - i->proc.last_state == LV_INDEV_STATE_REL) { + i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { /*On enter long press leave edit mode.*/ @@ -503,7 +503,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && i->proc.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { lv_obj_t * focused = lv_group_get_focused(i->group); bool editable = false; if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -528,8 +528,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 0; } - i->proc.last_state = data->state; - i->proc.last_key = data->key; + i->proc.types.keypad.last_state = data->state; + i->proc.types.keypad.last_key = data->key; #else (void)data; /*Unused*/ (void)i; /*Unused*/ @@ -544,12 +544,12 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) { - i->proc.act_point.x = i->btn_points[data->btn_id].x; - i->proc.act_point.y = i->btn_points[data->btn_id].y; + i->proc.types.pointer.act_point.x = i->btn_points[data->btn_id].x; + i->proc.types.pointer.act_point.y = i->btn_points[data->btn_id].y; /*Still the same point is pressed*/ - if(i->proc.last_point.x == i->proc.act_point.x && - i->proc.last_point.y == i->proc.act_point.y && + if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && + i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && data->state == LV_INDEV_STATE_PR) { indev_proc_press(&i->proc); @@ -558,8 +558,8 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) indev_proc_release(&i->proc); } - i->proc.last_point.x = i->proc.act_point.x; - i->proc.last_point.y = i->proc.act_point.y; + i->proc.types.pointer.last_point.x = i->proc.types.pointer.act_point.x; + i->proc.types.pointer.last_point.y = i->proc.types.pointer.act_point.y; } /** @@ -568,21 +568,21 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_proc_press(lv_indev_proc_t * proc) { - lv_obj_t * pr_obj = proc->act_obj; + lv_obj_t * pr_obj = proc->types.pointer.act_obj; - if(proc->wait_unil_release != 0) return; + if(proc->types.pointer.wait_unil_release != 0) return; lv_disp_t * disp = indev_act->driver.disp; /*If there is no last object then search*/ - if(proc->act_obj == NULL) { + if(proc->types.pointer.act_obj == NULL) { pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If there is last object but it is not dragged and not protected also search*/ - else if(proc->drag_in_prog == 0 && - lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now act_obj != NULL*/ + else if(proc->types.pointer.drag_in_prog == 0 && + lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now types.pointer.act_obj != NULL*/ pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); @@ -593,34 +593,34 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*If a new object was found reset some variables and send a pressed signal*/ - if(pr_obj != proc->act_obj) { + if(pr_obj != proc->types.pointer.act_obj) { - proc->last_point.x = proc->act_point.x; - proc->last_point.y = proc->act_point.y; + proc->types.pointer.last_point.x = proc->types.pointer.act_point.x; + proc->types.pointer.last_point.y = proc->types.pointer.act_point.y; /*If a new object found the previous was lost, so send a signal*/ - if(proc->act_obj != NULL) { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + if(proc->types.pointer.act_obj != NULL) { + proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); if(proc->reset_query != 0) return; } - proc->act_obj = pr_obj; /*Save the pressed object*/ - proc->last_obj = proc->act_obj; /*Refresh the last_obj*/ + proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ + proc->types.pointer.last_obj = proc->types.pointer.act_obj; /*Refresh the types.pointer.last_obj*/ - if(proc->act_obj != NULL) { + if(proc->types.pointer.act_obj != NULL) { /* Save the time when the obj pressed. * It is necessary to count the long press time.*/ proc->pr_timestamp = lv_tick_get(); proc->long_pr_sent = 0; - proc->drag_range_out = 0; - proc->drag_in_prog = 0; - proc->drag_sum.x = 0; - proc->drag_sum.y = 0; - proc->vect.x = 0; - proc->vect.y = 0; + proc->types.pointer.drag_range_out = 0; + proc->types.pointer.drag_in_prog = 0; + proc->types.pointer.drag_sum.x = 0; + proc->types.pointer.drag_sum.y = 0; + proc->types.pointer.vect.x = 0; + proc->types.pointer.vect.y = 0; /*Search for 'top' attribute*/ - lv_obj_t * i = proc->act_obj; + lv_obj_t * i = proc->types.pointer.act_obj; lv_obj_t * last_top = NULL; while(i != NULL) { if(i->top != 0) last_top = i; @@ -636,25 +636,25 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*Send a signal about the press*/ - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSED, indev_act); + proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); if(proc->reset_query != 0) return; } } - /*Calculate the vector*/ - proc->vect.x = proc->act_point.x - proc->last_point.x; - proc->vect.y = proc->act_point.y - proc->last_point.y; + /*Calculate the types.pointer.vector*/ + proc->types.pointer.vect.x = proc->types.pointer.act_point.x - proc->types.pointer.last_point.x; + proc->types.pointer.vect.y = proc->types.pointer.act_point.y - proc->types.pointer.last_point.y; /*If there is active object and it can be dragged run the drag*/ - if(proc->act_obj != NULL) { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSING, indev_act); + if(proc->types.pointer.act_obj != NULL) { + proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); if(proc->reset_query != 0) return; indev_drag(proc); if(proc->reset_query != 0) return; /*If there is no drag then check for long press time*/ - if(proc->drag_in_prog == 0 && proc->long_pr_sent == 0) { + if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); @@ -668,7 +668,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) } } /*Send long press repeated signal*/ - if(proc->drag_in_prog == 0 && proc->long_pr_sent == 1) { + if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 1) { /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); @@ -686,31 +686,31 @@ static void indev_proc_press(lv_indev_proc_t * proc) */ static void indev_proc_release(lv_indev_proc_t * proc) { - if(proc->wait_unil_release != 0) { - proc->act_obj = NULL; - proc->last_obj = NULL; + if(proc->types.pointer.wait_unil_release != 0) { + proc->types.pointer.act_obj = NULL; + proc->types.pointer.last_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; - proc->wait_unil_release = 0; + proc->types.pointer.wait_unil_release = 0; } /*Forgot the act obj and send a released signal */ - if(proc->act_obj != NULL) { + if(proc->types.pointer.act_obj != NULL) { /* If the object was protected against press lost then it possible that - * the object is already not pressed but still it is the `act_obj`. - * In this case send the `LV_SIGNAL_RELEASED` if the indev is ON the `act_obj` */ - if(lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST)) { + * the object is already not pressed but still it is the `types.pointer.act_obj`. + * In this case send the `LV_SIGNAL_RELEASED` if the indev is ON the `types.pointer.act_obj` */ + if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { /* Search the object on the current current coordinates. * The start object is the object itself. If not ON it the the result will be NULL*/ - lv_obj_t * obj_on = indev_search_obj(proc, proc->act_obj); - if(obj_on == proc->act_obj) proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); - else proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + lv_obj_t * obj_on = indev_search_obj(proc, proc->types.pointer.act_obj); + if(obj_on == proc->types.pointer.act_obj) proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); + else proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); } - /* The simple case: `act_obj` was not protected against press lost. + /* The simple case: `types.pointer.act_obj` was not protected against press lost. * If it is already not pressed then was handled in `indev_proc_press`*/ else { - proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act); + proc->types.pointer.act_obj->signal_func(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); } if(proc->reset_query != 0) return; @@ -718,15 +718,15 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Handle click focus*/ #if USE_LV_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ - lv_group_t * act_g = lv_obj_get_group(proc->act_obj); + lv_group_t * act_g = lv_obj_get_group(proc->types.pointer.act_obj); if(lv_group_get_editing(act_g)) { lv_group_set_editing(act_g, false); } /*Check, if the parent is in a group focus on it.*/ - if(lv_obj_is_protected(proc->act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click protection*/ - lv_group_t * g = lv_obj_get_group(proc->act_obj); - lv_obj_t * parent = proc->act_obj; + if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click protection*/ + lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); + lv_obj_t * parent = proc->types.pointer.act_obj; while(g == NULL) { parent = lv_obj_get_parent(parent); @@ -746,14 +746,14 @@ static void indev_proc_release(lv_indev_proc_t * proc) #endif if(proc->reset_query != 0) return; - proc->act_obj = NULL; + proc->types.pointer.act_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; } /*The reset can be set in the signal function. * In case of reset query ignore the remaining parts.*/ - if(proc->last_obj != NULL && proc->reset_query == 0) { + if(proc->types.pointer.last_obj != NULL && proc->reset_query == 0) { indev_drag_throw(proc); if(proc->reset_query != 0) return; } @@ -769,15 +769,15 @@ static void indev_proc_release(lv_indev_proc_t * proc) static void indev_proc_reset_query_handler(lv_indev_t * indev) { if(indev->proc.reset_query) { - indev->proc.act_obj = NULL; - indev->proc.last_obj = NULL; - indev->proc.drag_range_out = 0; - indev->proc.drag_in_prog = 0; + indev->proc.types.pointer.act_obj = NULL; + indev->proc.types.pointer.last_obj = NULL; + indev->proc.types.pointer.drag_range_out = 0; + indev->proc.types.pointer.drag_in_prog = 0; indev->proc.long_pr_sent = 0; indev->proc.pr_timestamp = 0; indev->proc.longpr_rep_timestamp = 0; - indev->proc.drag_sum.x = 0; - indev->proc.drag_sum.y = 0; + indev->proc.types.pointer.drag_sum.x = 0; + indev->proc.types.pointer.drag_sum.y = 0; indev->proc.reset_query = 0; } } @@ -793,7 +793,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) /*If the point is on this object*/ /*Check its children too*/ - if(lv_area_is_point_on(&obj->coords, &proc->act_point)) { + if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { lv_obj_t * i; LL_READ(obj->child_ll, i) { @@ -823,12 +823,12 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) } /** - * Handle the dragging of indev_proc_p->act_obj + * Handle the dragging of indev_proc_p->types.pointer.act_obj * @param indev pointer to a input device state */ static void indev_drag(lv_indev_proc_t * state) { - lv_obj_t * drag_obj = state->act_obj; + lv_obj_t * drag_obj = state->types.pointer.act_obj; /*If drag parent is active check recursively the drag_parent attribute*/ while(lv_obj_get_drag_parent(drag_obj) != false && @@ -841,23 +841,23 @@ static void indev_drag(lv_indev_proc_t * state) if(lv_obj_get_drag(drag_obj) == false) return; /*Count the movement by drag*/ - state->drag_sum.x += state->vect.x; - state->drag_sum.y += state->vect.y; + state->types.pointer.drag_sum.x += state->types.pointer.vect.x; + state->types.pointer.drag_sum.y += state->types.pointer.vect.y; /*Enough move?*/ - if(state->drag_range_out == 0) { + if(state->types.pointer.drag_range_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ - if(LV_MATH_ABS(state->drag_sum.x) >= LV_INDEV_DRAG_LIMIT || - LV_MATH_ABS(state->drag_sum.y) >= LV_INDEV_DRAG_LIMIT) { - state->drag_range_out = 1; + if(LV_MATH_ABS(state->types.pointer.drag_sum.x) >= LV_INDEV_DRAG_LIMIT || + LV_MATH_ABS(state->types.pointer.drag_sum.y) >= LV_INDEV_DRAG_LIMIT) { + state->types.pointer.drag_range_out = 1; } } /*If the drag limit is stepped over then handle the dragging*/ - if(state->drag_range_out != 0) { - /*Set new position if the vector is not zero*/ - if(state->vect.x != 0 || - state->vect.y != 0) { + if(state->types.pointer.drag_range_out != 0) { + /*Set new position if the types.pointer.vector is not zero*/ + if(state->types.pointer.vect.x != 0 || + state->types.pointer.vect.y != 0) { /*Get the coordinates of the object and modify them*/ lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); @@ -868,16 +868,16 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); - lv_obj_set_pos(drag_obj, act_x + state->vect.x, act_y + state->vect.y); + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); /*Set the drag in progress flag if the object is really moved*/ if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { - if(state->drag_range_out != 0) { /*Send the drag begin signal on first move*/ + if(state->types.pointer.drag_range_out != 0) { /*Send the drag begin signal on first move*/ drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; } - state->drag_in_prog = 1; + state->types.pointer.drag_in_prog = 1; } /*If the object didn't moved then clear the invalidated areas*/ else { @@ -901,10 +901,10 @@ static void indev_drag(lv_indev_proc_t * state) */ static void indev_drag_throw(lv_indev_proc_t * state) { - if(state->drag_in_prog == 0) return; + if(state->types.pointer.drag_in_prog == 0) return; - /*Set new position if the vector is not zero*/ - lv_obj_t * drag_obj = state->last_obj; + /*Set new position if the types.pointer.vector is not zero*/ + lv_obj_t * drag_obj = state->types.pointer.last_obj; /*If drag parent is active check recursively the drag_parent attribute*/ while(lv_obj_get_drag_parent(drag_obj) != false && @@ -916,40 +916,40 @@ static void indev_drag_throw(lv_indev_proc_t * state) /*Return if the drag throw is not enabled*/ if(lv_obj_get_drag_throw(drag_obj) == false) { - state->drag_in_prog = 0; + state->types.pointer.drag_in_prog = 0; drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); return; } - /*Reduce the vectors*/ - state->vect.x = state->vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; - state->vect.y = state->vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; + /*Reduce the types.pointer.vectors*/ + state->types.pointer.vect.x = state->types.pointer.vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; + state->types.pointer.vect.y = state->types.pointer.vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; - if(state->vect.x != 0 || - state->vect.y != 0) { + if(state->types.pointer.vect.x != 0 || + state->types.pointer.vect.y != 0) { /*Get the coordinates and modify them*/ lv_area_t coords_ori; lv_obj_get_coords(drag_obj, &coords_ori); - lv_coord_t act_x = lv_obj_get_x(drag_obj) + state->vect.x; - lv_coord_t act_y = lv_obj_get_y(drag_obj) + state->vect.y; + lv_coord_t act_x = lv_obj_get_x(drag_obj) + state->types.pointer.vect.x; + lv_coord_t act_y = lv_obj_get_y(drag_obj) + state->types.pointer.vect.y; lv_obj_set_pos(drag_obj, act_x, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); /*If non of the coordinates are changed then do not continue throwing*/ - if((coords_ori.x1 == coord_new.x1 || state->vect.x == 0) && - (coords_ori.y1 == coord_new.y1 || state->vect.y == 0)) { - state->drag_in_prog = 0; - state->vect.x = 0; - state->vect.y = 0; + if((coords_ori.x1 == coord_new.x1 || state->types.pointer.vect.x == 0) && + (coords_ori.y1 == coord_new.y1 || state->types.pointer.vect.y == 0)) { + state->types.pointer.drag_in_prog = 0; + state->types.pointer.vect.x = 0; + state->types.pointer.vect.y = 0; drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } } - /*If the vectors become 0 -> drag_in_prog = 0 and send a drag end signal*/ + /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end signal*/ else { - state->drag_in_prog = 0; + state->types.pointer.drag_in_prog = 0; drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act); } } diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 45c5404cd688..4415b9300706 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -367,7 +367,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) * the currently pressed object is deleted*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { - if(indev->proc.act_obj == obj || indev->proc.last_obj == obj) { + if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } indev = lv_indev_next(indev); @@ -1945,7 +1945,7 @@ static void delete_children(lv_obj_t * obj) * the currently pressed object is deleted*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { - if(indev->proc.act_obj == obj || indev->proc.last_obj == obj) { + if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } indev = lv_indev_next(indev); diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 42cadc6ea4b1..d284958b1065 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -100,12 +100,12 @@ typedef struct _lv_indev_proc_t { uint8_t drag_range_out :1; uint8_t drag_in_prog :1; uint8_t wait_unil_release :1; - }; + }pointer; struct { /*Keypad data*/ lv_indev_state_t last_state; uint32_t last_key; - }; - }; + }keypad; + }types; uint32_t pr_timestamp; /*Pressed time stamp*/ uint32_t longpr_rep_timestamp; /*Long press repeat time stamp*/ diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index b1586a0baa66..4286a0470117 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -343,14 +343,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void /*Set horizontal drag constraint if no vertical constraint an dragged to valid x direction */ if(ext->drag_ver == 0 && - ((ext->drag_right_en && indev->proc.drag_sum.x <= -LV_INDEV_DRAG_LIMIT) || - (ext->drag_left_en && indev->proc.drag_sum.x >= LV_INDEV_DRAG_LIMIT))) { + ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DRAG_LIMIT) || + (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DRAG_LIMIT))) { ext->drag_hor = 1; } /*Set vertical drag constraint if no horizontal constraint an dragged to valid y direction */ if(ext->drag_hor == 0 && - ((ext->drag_bottom_en && indev->proc.drag_sum.y <= -LV_INDEV_DRAG_LIMIT) || - (ext->drag_top_en && indev->proc.drag_sum.y >= LV_INDEV_DRAG_LIMIT))) { + ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DRAG_LIMIT) || + (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DRAG_LIMIT))) { ext->drag_ver = 1; } @@ -369,7 +369,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_coord_t h = lv_obj_get_height(tileview); lv_coord_t w = lv_obj_get_width(tileview); if(ext->drag_top_en == 0) { - if(y > -(ext->act_id.y * h) && indev->proc.vect.y > 0 && ext->drag_hor == 0) { + if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) { if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { @@ -380,7 +380,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h); } } - if(ext->drag_bottom_en == 0 && indev->proc.vect.y < 0 && ext->drag_hor == 0) { + if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) { if(y < -(ext->act_id.y * h)) { if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && @@ -393,7 +393,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h); } if(ext->drag_left_en == 0) { - if(x > -(ext->act_id.x * w) && indev->proc.vect.x > 0 && ext->drag_ver == 0) { + if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) { if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { @@ -404,7 +404,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_x(scrl, -ext->act_id.x * w); } } - if(ext->drag_right_en == 0 && indev->proc.vect.x < 0 && ext->drag_ver == 0) { + if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) { if(x < -(ext->act_id.x * w)) { if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && @@ -475,14 +475,14 @@ static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void * * let the tileview to finish the move.*/ lv_indev_t * indev = lv_indev_get_act(); lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - if(indev->proc.drag_in_prog && (ext->drag_hor || ext->drag_ver)) { + if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) { lv_obj_t * drag_obj = element; while(lv_obj_get_drag_parent(drag_obj)) { drag_obj = lv_obj_get_parent(drag_obj); if(drag_obj == NULL) break; } - indev->proc.drag_in_prog = 0; + indev->proc.types.pointer.drag_in_prog = 0; if(drag_obj) drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, NULL); } From 53b80565022597e2d4738542967ca71d8d35162d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Feb 2019 06:17:37 +0100 Subject: [PATCH 061/590] btnm fixes --- lv_objx/lv_btnm.c | 30 +++++++++++++----------------- lv_objx/lv_btnm.h | 6 +++--- lv_objx/lv_kb.c | 41 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 7b5f49a15259..78a8f5a04a71 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -28,10 +28,10 @@ **********************/ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param); static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mode_t mode); -static uint8_t get_button_width(lv_btn_ctrl_t ctrl_bits); -static bool button_is_hidden(lv_btn_ctrl_t ctrl_bits); -static bool button_is_repeat_disabled(lv_btn_ctrl_t ctrl_bits); -static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits); +static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits); +static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits); +static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits); +static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits); const char * cut_ctrl_byte(const char * btn_str); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id); @@ -284,10 +284,10 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, lv_btn_ctrl_t * ctrl_map) +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btn_ctrl_t) * ext->btn_cnt); + memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btnm_ctrl_t) * ext->btn_cnt); lv_btnm_set_map(btnm, ext->map_p); } @@ -692,8 +692,6 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - //lv_area_t btnm_area; - lv_area_t btn_area; lv_point_t p; if(sign == LV_SIGNAL_CLEANUP) { lv_mem_free(ext->button_areas); @@ -708,7 +706,6 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) /*Invalidate to old and the new areas*/; //lv_obj_get_coords(btnm, &btnm_area); if(btn_pr != ext->btn_id_pr) { - lv_disp_t * disp = lv_obj_get_disp(btnm); lv_indev_reset_lpr(param); if(ext->btn_id_pr != LV_BTNM_PR_NONE) { invalidate_button_area(btnm, ext->btn_id_pr); @@ -737,8 +734,6 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(button_is_inactive(ext->ctrl_bits[ext->btn_id_pr]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons and clicks between the buttons*/ if(ext->action) res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); if(res == LV_RES_OK) { - lv_disp_t * disp = lv_obj_get_disp(btnm); - /*Invalidate to old pressed area*/; invalidate_button_area(btnm, ext->btn_id_pr); @@ -892,7 +887,7 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** ext->button_areas = lv_mem_alloc(sizeof(lv_area_t) * btn_cnt); lv_mem_assert(ext->button_areas); - ext->ctrl_bits = lv_mem_alloc(sizeof(lv_btn_ctrl_t) * btn_cnt); + ext->ctrl_bits = lv_mem_alloc(sizeof(lv_btnm_ctrl_t) * btn_cnt); lv_mem_assert(ext->ctrl_bits); if(ext->button_areas == NULL || ext->ctrl_bits == NULL) btn_cnt = 0; @@ -921,22 +916,22 @@ static void parse_control_bytes(const lv_obj_t * btnm, const char ** map) * @param ctrl_bits least significant 3 bits used (1..7 valid values) * @return the width of the button in units */ -static uint8_t get_button_width(lv_btn_ctrl_t ctrl_bits) +static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits) { return ctrl_bits ? ctrl_bits & LV_BTNM_WIDTH_MASK : 1; } -static bool button_is_hidden(lv_btn_ctrl_t ctrl_bits) +static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits) { return ctrl_bits & LV_BTNM_HIDE_MASK; } -static bool button_is_repeat_disabled(lv_btn_ctrl_t ctrl_bits) +static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits) { return ctrl_bits & LV_BTNM_REPEAT_DISABLE_MASK; } -static bool button_is_inactive(lv_btn_ctrl_t ctrl_bits) +static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits) { return ctrl_bits & LV_BTNM_INACTIVE_MASK; } @@ -1021,7 +1016,7 @@ static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx) btn_area.x2 += btnm_area.x1; btn_area.y2 += btnm_area.y1; - lv_inv_area(&btn_area); + lv_inv_area(lv_obj_get_disp(btnm), &btn_area); } /** @@ -1041,6 +1036,7 @@ static bool maps_are_identical(const char ** map1, const char ** map2) while (map1[i][0] != '\0' && map2[i][0] != '\0') { if (strcmp(map1[i], map2[i]) !=0 ) return false; + i++; } return map1[i][0] == '\0' && map2[i][0] == '\0'; } diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index daf15d7377e6..36f3241d5875 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -53,7 +53,7 @@ extern "C" { typedef lv_res_t (*lv_btnm_action_t) (lv_obj_t *, const char *txt); /* Type to store button control bits (disabled, hidden etc.) */ -typedef uint8_t lv_btn_ctrl_t; +typedef uint8_t lv_btnm_ctrl_t; /*Data of button matrix*/ typedef struct @@ -62,7 +62,7 @@ typedef struct /*New data for this type */ const char ** map_p; /*Pointer to the current map*/ lv_area_t *button_areas; /*Array of areas of buttons*/ - lv_btn_ctrl_t *ctrl_bits; /*Array of control bytes*/ + lv_btnm_ctrl_t *ctrl_bits; /*Array of control bytes*/ lv_btnm_action_t action; /*A function to call when a button is releases*/ lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ @@ -132,7 +132,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, lv_btn_ctrl_t * ctrl_map); +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map); /** * Set a new callback function for the buttons (It will be called when a button is released) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index be7684760fc7..01f654681d8d 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -39,6 +39,13 @@ static const char * kb_map_lc[] = { "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" }; +static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + (6 | LV_BTNM_REPEAT_DISABLE_MASK), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 6, 2, 2 +}; + static const char * kb_map_uc[] = { "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Bksp", "\n", "\226abc", "\203A", "\203S", "\203D", "\203F", "\203G", "\203H", "\203J", "\203K", "\203L", "\207Enter", "\n", @@ -46,6 +53,13 @@ static const char * kb_map_uc[] = { "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" }; +static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + (6 | LV_BTNM_REPEAT_DISABLE_MASK), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 6, 2, 2 +}; + static const char * kb_map_spec[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Bksp", "\n", "\222abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", @@ -53,12 +67,25 @@ static const char * kb_map_spec[] = { "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" }; +static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + (2 | LV_BTNM_REPEAT_DISABLE_MASK), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 6, 2, 2 +}; + static const char * kb_map_num[] = { "1", "2", "3", "\202"SYMBOL_CLOSE, "\n", "4", "5", "6", "\202"SYMBOL_OK, "\n", "7", "8", "9", "\202Bksp", "\n", "+/-", "0", ".", SYMBOL_LEFT, SYMBOL_RIGHT, "" }; + +static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { + 1, 1, 1, 2, + 1, 1, 1, 2, + 1, 1, 1, 1, 1 +}; /********************** * MACROS **********************/ @@ -106,6 +133,7 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_btnm_set_action(new_kb, lv_kb_def_action); lv_btnm_set_map(new_kb, kb_map_lc); + lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -181,8 +209,14 @@ void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode) if(ext->mode == mode) return; ext->mode = mode; - if(mode == LV_KB_MODE_TEXT) lv_btnm_set_map(kb, kb_map_lc); - else if(mode == LV_KB_MODE_NUM) lv_btnm_set_map(kb, kb_map_num); + if(mode == LV_KB_MODE_TEXT) { + lv_btnm_set_map(kb, kb_map_lc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); + } + else if(mode == LV_KB_MODE_NUM) { + lv_btnm_set_map(kb, kb_map_num); + lv_btnm_set_ctrl_map(kb, kb_ctrl_num_map); + } } @@ -406,12 +440,15 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) /*Do the corresponding action according to the text of the button*/ if(strcmp(txt, "abc") == 0) { lv_btnm_set_map(kb, kb_map_lc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); return LV_RES_OK; } else if(strcmp(txt, "ABC") == 0) { lv_btnm_set_map(kb, kb_map_uc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map); return LV_RES_OK; } else if(strcmp(txt, "1#") == 0) { lv_btnm_set_map(kb, kb_map_spec); + lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return LV_RES_OK; } else if(strcmp(txt, SYMBOL_CLOSE) == 0) { if(ext->hide_action) res = ext->hide_action(kb); From 3f4c1fe91b689453eb808ce2974b9776f0932beb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Feb 2019 10:25:21 +0100 Subject: [PATCH 062/590] imporve backward compatibility --- lv_core/lv_disp.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lv_core/lv_disp.h b/lv_core/lv_disp.h index e304fc43e2b0..b291213ed58c 100644 --- a/lv_core/lv_disp.h +++ b/lv_core/lv_disp.h @@ -81,7 +81,7 @@ static inline lv_obj_t * lv_scr_act(void) * Get the top layer of the default display * @return pointer to the top layer */ -static inline lv_obj_t * lv_top_layer(void) +static inline lv_obj_t * lv_layer_top(void) { return lv_disp_get_layer_top(lv_disp_get_default()); } @@ -90,11 +90,17 @@ static inline lv_obj_t * lv_top_layer(void) * Get the active screen of the deafult display * @return pointer to the sys layer */ -static inline lv_obj_t * lv_sys_layer(void) +static inline lv_obj_t * lv_layer_sys(void) { return lv_disp_get_layer_sys(lv_disp_get_default()); } +static inline void lv_scr_load(lv_obj_t * scr) +{ + lv_disp_set_scr_act(scr); +} + + /********************** * MACROS **********************/ @@ -104,8 +110,8 @@ static inline lv_obj_t * lv_sys_layer(void) * Recommended only if you have one display *------------------------------------------------*/ -#define LV_HOR_RES (lv_disp_get_hor_res(lv_disp_get_default());) -#define LV_VER_RES (lv_disp_get_ver_res(lv_disp_get_default());) +#define LV_HOR_RES lv_disp_get_hor_res(lv_disp_get_default()) +#define LV_VER_RES lv_disp_get_ver_res(lv_disp_get_default()) #ifdef __cplusplus } /* extern "C" */ From aa4b17900be4c7dcedf3cd93a22fc50b4d1776f3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Feb 2019 10:55:39 +0100 Subject: [PATCH 063/590] lv_ta: fix label auto size on lv_ta size change --- lv_objx/lv_ta.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index a5a50c99f739..73e5857594c4 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1208,6 +1208,21 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_coord_t font_h = lv_font_get_height(style_label->text.font); scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); } + else if(sign == LV_SIGNAL_CORD_CHG) { + /*Set the label width according to the text area width*/ + if(ext->label) { + if(lv_obj_get_width(ta) != lv_area_get_width(param) || + lv_obj_get_height(ta) != lv_area_get_height(param)) { + lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); + lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_label_set_text(ext->label, NULL); /*Refresh the label*/ + + refr_cursor_area(ta); + } + } + } else if(sign == LV_SIGNAL_PRESSED) { update_cursor_position_on_click(ta, (lv_indev_t *)param); } From 409a998df27bc4ebf0173cb3da82becf77221b60 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Feb 2019 10:58:18 +0100 Subject: [PATCH 064/590] add voaltile to 'disp_drv->flushing' to work with optimization --- lv_hal/lv_hal_disp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index a7e337a702c6..6725c854c1ae 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -50,7 +50,7 @@ typedef struct void * buf_act; uint32_t size; /*In pixel count*/ lv_area_t area; - uint32_t flushing :1; + volatile uint32_t flushing :1; }lv_disp_buf_t; From b0d3164ecf4c014a1c1eab2671e17e32fef45c75 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 28 Feb 2019 05:23:21 +0100 Subject: [PATCH 065/590] lv_1i8n: minor fixes --- lv_core/lv_i18n.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index c7fdb647d56c..f1816c0f2e4c 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -163,17 +163,17 @@ const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num) const lv_i18n_lang_t * lang = local_lang; - if(lang->plurals == NULL || lang->plural_rule == NULL) { + if(lang->plural_rule == NULL) { if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); + LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined even on the default language"); return msg_id; } else { - LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined for the language. Fallback to the default language"); + LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined for the language. Fallback to the default language"); lang = languages[0]; } - if(lang->plurals == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: o plurals or plural rule has defined even on the default language"); + if(lang->plural_rule == NULL) { + LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined even on the default language"); return msg_id; } } From 55197a2934336a0c7c4922103f759a437dd0d97a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 28 Feb 2019 06:08:15 +0100 Subject: [PATCH 066/590] name unamed structs in lv_color.h --- lv_draw/lv_draw_img.c | 2 +- lv_misc/lv_color.h | 120 +++++++++++++++++++++--------------------- lv_objx/lv_canvas.c | 24 ++++----- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index 369fbb7610e7..f3d73c0b8c7e 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -439,7 +439,7 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * uint32_t i; for(i = 0; i < palette_size; i++) { - decoder_index_map[i] = LV_COLOR_MAKE(palette_p[i].red, palette_p[i].green, palette_p[i].blue); + decoder_index_map[i] = LV_COLOR_MAKE(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); } return NULL; #else diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index 6afdc06b0393..1774f27906a9 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -107,7 +107,7 @@ typedef union uint8_t blue :2; uint8_t green :3; uint8_t red :3; - }; + }ch; uint8_t full; } lv_color8_t; @@ -125,7 +125,7 @@ typedef union uint16_t blue :5; uint16_t green_l :3; #endif - }; + }ch; uint16_t full; } lv_color16_t; @@ -137,7 +137,7 @@ typedef union uint8_t green; uint8_t red; uint8_t alpha; - }; + }ch; uint32_t full; } lv_color32_t; @@ -189,32 +189,32 @@ static inline uint8_t lv_color_to1(lv_color_t color) #if LV_COLOR_DEPTH == 1 return color.full; #elif LV_COLOR_DEPTH == 8 - if((color.red & 0x4) || - (color.green & 0x4) || - (color.blue & 0x2)) { + if((color.ch.red & 0x4) || + (color.ch.green & 0x4) || + (color.ch.blue & 0x2)) { return 1; } else { return 0; } #elif LV_COLOR_DEPTH == 16 # if LV_COLOR_16_SWAP == 0 - if((color.red & 0x10) || - (color.green & 0x20) || - (color.blue & 0x10)) { + if((color.ch.red & 0x10) || + (color.ch.green & 0x20) || + (color.ch.blue & 0x10)) { return 1; # else - if((color.red & 0x10) || - (color.green_h & 0x20) || - (color.blue & 0x10)) { + if((color.ch.red & 0x10) || + (color.ch.green_h & 0x20) || + (color.ch.blue & 0x10)) { return 1; # endif } else { return 0; } #elif LV_COLOR_DEPTH == 32 - if((color.red & 0x80) || - (color.green & 0x80) || - (color.blue & 0x80)) { + if((color.ch.red & 0x80) || + (color.ch.green & 0x80) || + (color.ch.blue & 0x80)) { return 1; } else { return 0; @@ -233,22 +233,22 @@ static inline uint8_t lv_color_to8(lv_color_t color) # if LV_COLOR_16_SWAP == 0 lv_color8_t ret; - ret.red = color.red >> 2; /* 5 - 3 = 2*/ - ret.green = color.green >> 3; /* 6 - 3 = 3*/ - ret.blue = color.blue >> 3; /* 5 - 2 = 3*/ + ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ + ret.ch.green = color.ch.green >> 3; /* 6 - 3 = 3*/ + ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ return ret.full; # else lv_color8_t ret; - ret.red = color.red >> 2; /* 5 - 3 = 2*/ - ret.green = color.green_h; /* 6 - 3 = 3*/ - ret.blue = color.blue >> 3; /* 5 - 2 = 3*/ + ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ + ret.ch.green = color.ch.green_h; /* 6 - 3 = 3*/ + ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ return ret.full; # endif #elif LV_COLOR_DEPTH == 32 lv_color8_t ret; - ret.red = color.red >> 5; /* 8 - 3 = 5*/ - ret.green = color.green >> 5; /* 8 - 3 = 5*/ - ret.blue = color.blue >> 6; /* 8 - 2 = 6*/ + ret.ch.red = color.ch.red >> 5; /* 8 - 3 = 5*/ + ret.ch.green = color.ch.green >> 5; /* 8 - 3 = 5*/ + ret.ch.blue = color.ch.blue >> 6; /* 8 - 2 = 6*/ return ret.full; #endif } @@ -261,15 +261,15 @@ static inline uint16_t lv_color_to16(lv_color_t color) #elif LV_COLOR_DEPTH == 8 lv_color16_t ret; # if LV_COLOR_16_SWAP == 0 - ret.red = color.red * 4; /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/ - ret.green = color.green * 9; /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/ - ret.blue = color.blue * 10; /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/ + ret.ch.red = color.ch.red * 4; /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/ + ret.ch.green = color.ch.green * 9; /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/ + ret.ch.blue = color.ch.blue * 10; /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/ # else - ret.red = color.red * 4; - uint8_t g_tmp = color.green * 9; - ret.green_h = (g_tmp & 0x1F) >> 3; - ret.green_l = g_tmp & 0x07; - ret.blue = color.blue * 10; + ret.red = color.ch.red * 4; + uint8_t g_tmp = color.ch.green * 9; + ret.ch.green_h = (g_tmp & 0x1F) >> 3; + ret.ch.green_l = g_tmp & 0x07; + ret.ch.blue = color.ch.blue * 10; # endif return ret.full; #elif LV_COLOR_DEPTH == 16 @@ -277,14 +277,14 @@ static inline uint16_t lv_color_to16(lv_color_t color) #elif LV_COLOR_DEPTH == 32 lv_color16_t ret; # if LV_COLOR_16_SWAP == 0 - ret.red = color.red >> 3; /* 8 - 5 = 3*/ - ret.green = color.green >> 2; /* 8 - 6 = 2*/ - ret.blue = color.blue >> 3; /* 8 - 5 = 3*/ + ret.ch.red = color.ch.red >> 3; /* 8 - 5 = 3*/ + ret.ch.green = color.ch.green >> 2; /* 8 - 6 = 2*/ + ret.ch.blue = color.ch.blue >> 3; /* 8 - 5 = 3*/ # else - ret.red = color.red >> 3; - ret.green_h = (color.green & 0xE0) >> 5; - ret.green_l = (color.green & 0x1C) >> 2; - ret.blue = color.blue >> 3; + ret.ch.red = color.ch.red >> 3; + ret.ch.green_h = (color.ch.green & 0xE0) >> 5; + ret.ch.green_l = (color.ch.green & 0x1C) >> 2; + ret.ch.blue = color.ch.blue >> 3; # endif return ret.full; #endif @@ -297,25 +297,25 @@ static inline uint32_t lv_color_to32(lv_color_t color) else return 0xFFFFFFFF; #elif LV_COLOR_DEPTH == 8 lv_color32_t ret; - ret.red = color.red * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ - ret.green = color.green * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ - ret.blue = color.blue * 85; /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/ - ret.alpha = 0xFF; + ret.ch.red = color.ch.red * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ + ret.ch.green = color.ch.green * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ + ret.ch.blue = color.ch.blue * 85; /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/ + ret.ch.alpha = 0xFF; return ret.full; #elif LV_COLOR_DEPTH == 16 # if LV_COLOR_16_SWAP == 0 lv_color32_t ret; - ret.red = color.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.green = color.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ - ret.blue = color.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.alpha = 0xFF; + ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.green = color.ch.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ + ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.alpha = 0xFF; return ret.full; # else lv_color32_t ret; - ret.red = color.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.green = ((color.green_h << 3) + color.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ - ret.blue = color.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.alpha = 0xFF; + ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.green = ((color.ch.green_h << 3) + color.ch.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ + ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.alpha = 0xFF; return ret.full; # endif #elif LV_COLOR_DEPTH == 32 @@ -328,20 +328,20 @@ static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) lv_color_t ret; #if LV_COLOR_DEPTH != 1 /*LV_COLOR_DEPTH == 8, 16 or 32*/ - ret.red = (uint16_t)((uint16_t) c1.red * mix + (c2.red * (255 - mix))) >> 8; + ret.ch.red = (uint16_t)((uint16_t) c1.ch.red * mix + (c2.ch.red * (255 - mix))) >> 8; # if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP /*If swapped Green is in 2 parts*/ - uint16_t g_1 = (c1.green_h << 3) + c1.green_l; - uint16_t g_2 = (c2.green_h << 3) + c2.green_l; + uint16_t g_1 = (c1.ch.green_h << 3) + c1.ch.green_l; + uint16_t g_2 = (c2.ch.green_h << 3) + c2.ch.green_l; uint16_t g_out = (uint16_t)((uint16_t) g_1 * mix + (g_2 * (255 - mix))) >> 8; - ret.green_h = g_out >> 3; - ret.green_l = g_out & 0x7; + ret.ch.green_h = g_out >> 3; + ret.ch.green_l = g_out & 0x7; # else - ret.green = (uint16_t)((uint16_t) c1.green * mix + (c2.green * (255 - mix))) >> 8; + ret.ch.green = (uint16_t)((uint16_t) c1.ch.green * mix + (c2.ch.green * (255 - mix))) >> 8; # endif - ret.blue = (uint16_t)((uint16_t) c1.blue * mix + (c2.blue * (255 - mix))) >> 8; + ret.ch.blue = (uint16_t)((uint16_t) c1.ch.blue * mix + (c2.ch.blue * (255 - mix))) >> 8; # if LV_COLOR_DEPTH == 32 - ret.alpha = 0xFF; + ret.ch.alpha = 0xFF; # endif #else /*LV_COLOR_DEPTH == 1*/ @@ -360,7 +360,7 @@ static inline uint8_t lv_color_brightness(lv_color_t color) { lv_color32_t c32; c32.full = lv_color_to32(color); - uint16_t bright = 3 * c32.red + c32.blue + 4 * c32.green; + uint16_t bright = 3 * c32.ch.red + c32.ch.blue + 4 * c32.ch.green; return (uint16_t) bright >> 3; } diff --git a/lv_objx/lv_canvas.c b/lv_objx/lv_canvas.c index 32e47b71a3e3..46ab04c65ed3 100644 --- a/lv_objx/lv_canvas.c +++ b/lv_objx/lv_canvas.c @@ -341,25 +341,25 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor for(i = 0; i < h; i++) { for(j = 0; j < w; j++) { #if LV_COLOR_DEPTH == 32 - canvas_buf_color[j].red = (uint16_t) ((uint16_t) canvas_buf_color[j].red * copy_buf_color[j].red) >> 8; - canvas_buf_color[j].green = (uint16_t) ((uint16_t) canvas_buf_color[j].green * copy_buf_color[j].green) >> 8; - canvas_buf_color[j].blue = (uint16_t) ((uint16_t) canvas_buf_color[j].blue * copy_buf_color[j].blue) >> 8; + canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 8; + canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 8; + canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 8; #elif LV_COLOR_DEPTH == 16 - canvas_buf_color[j].red = (uint16_t) ((uint16_t) canvas_buf_color[j].red * copy_buf_color[j].red) >> 5; - canvas_buf_color[j].blue = (uint16_t) ((uint16_t) canvas_buf_color[j].blue * copy_buf_color[j].blue) >> 5; + canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 5; + canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 5; # if LV_COLOR_16_SWAP == 0 - canvas_buf_color[j].green = (uint16_t) ((uint16_t) canvas_buf_color[j].green * copy_buf_color[j].green) >> 6; + canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 6; # else - canvas_buf_color[j].red = (uint16_t) ((uint16_t) canvas_buf_color[j].red * copy_buf_color[j].red) >> 6; - canvas_buf_color[j].blue = (uint16_t) ((uint16_t) canvas_buf_color[j].blue * copy_buf_color[j].blue) >> 6; - canvas_buf_color[j].red = (uint16_t) ((uint16_t) canvas_buf_color[j].red * copy_buf_color[j].red) >> 6; + canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; + canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 6; + canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; # endif /*LV_COLOR_16_SWAP*/ #elif LV_COLOR_DEPTH == 8 - canvas_buf_color[j].red = (uint16_t) ((uint16_t) canvas_buf_color[j].red * copy_buf_color[j].red) >> 3; - canvas_buf_color[j].green = (uint16_t) ((uint16_t) canvas_buf_color[j].green * copy_buf_color[j].green) >> 3; - canvas_buf_color[j].blue = (uint16_t) ((uint16_t) canvas_buf_color[j].blue * copy_buf_color[j].blue) >> 2; + canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 3; + canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 3; + canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 2; #endif } copy_buf_color += w; From 7ac2009f16b1143d8dd79b91e8ed04b3cc6aa3e1 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 28 Feb 2019 08:49:46 +0100 Subject: [PATCH 067/590] ta: remove unnecessary variable definition/initialization --- lv_objx/lv_ta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 73e5857594c4..32d73774199c 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1213,7 +1213,6 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->label) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); From a7338085ec52a5cdb297823886468f7b8bf4b8cb Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 28 Feb 2019 09:07:07 +0100 Subject: [PATCH 068/590] mbox: introduce lv_mbox_get_btnm API --- lv_objx/lv_mbox.c | 12 ++++++++++++ lv_objx/lv_mbox.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index adaf4ad42505..4fcdb5fc3496 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -390,6 +390,18 @@ bool lv_mbox_get_recolor(const lv_obj_t * mbox) return lv_btnm_get_recolor(ext->btnm); } +/** + * Get message box button matrix + * @param mbox pointer to a message box object + * @return pointer to button matrix object + * @remarks return value will be NULL unless `lv_mbox_add_btns` has been already called + */ +lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox) +{ + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + return ext->btnm; +} + /********************** * STATIC FUNCTIONS diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index 9a25a76e3407..2aa182b34674 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -189,6 +189,14 @@ lv_style_t * lv_mbox_get_style(const lv_obj_t *mbox, lv_mbox_style_t type); */ bool lv_mbox_get_recolor(const lv_obj_t * mbox); +/** + * Get message box button matrix + * @param mbox pointer to a message box object + * @return pointer to button matrix object + * @remarks return value will be NULL unless `lv_mbox_add_btns` has been already called + */ +lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox); + /********************** * MACROS **********************/ From 4a54b6e4faefc358abaf2471e586388767b4a95c Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 28 Feb 2019 09:08:53 +0100 Subject: [PATCH 069/590] fix argument documentation --- lv_objx/lv_mbox.c | 2 +- lv_objx/lv_mbox.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 4fcdb5fc3496..9948714b2628 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -377,7 +377,7 @@ lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) /** * Get whether recoloring is enabled - * @param btnm pointer to button matrix object + * @param mbox pointer to a message box object * @return whether recoloring is enabled */ bool lv_mbox_get_recolor(const lv_obj_t * mbox) diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index 2aa182b34674..0526fae88fc4 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -184,7 +184,7 @@ lv_style_t * lv_mbox_get_style(const lv_obj_t *mbox, lv_mbox_style_t type); /** * Get whether recoloring is enabled - * @param btnm pointer to button matrix object + * @param mbox pointer to a message box object * @return whether recoloring is enabled */ bool lv_mbox_get_recolor(const lv_obj_t * mbox); From 4e9df1679e10eb167e8e95914678e4c2758075b5 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 28 Feb 2019 09:09:58 +0100 Subject: [PATCH 070/590] fix formatting --- lv_objx/lv_mbox.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 9948714b2628..06f636d5ebf0 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -382,12 +382,12 @@ lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) */ bool lv_mbox_get_recolor(const lv_obj_t * mbox) { - lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - if(!ext->btnm) - return false; + if(!ext->btnm) + return false; - return lv_btnm_get_recolor(ext->btnm); + return lv_btnm_get_recolor(ext->btnm); } /** From 513a7e0a4e77052e220f1cdf312233c3463876b9 Mon Sep 17 00:00:00 2001 From: manison Date: Thu, 28 Feb 2019 09:27:25 +0100 Subject: [PATCH 071/590] btnm: introduce lv_btnm_set_pressed API --- lv_objx/lv_btnm.c | 19 +++++++++++++++++++ lv_objx/lv_btnm.h | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 78a8f5a04a71..1b750d909a63 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -303,6 +303,25 @@ void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_action_t action) ext->action = action; } +/** + * Set the pressed button + * @param btnm pointer to button matrix object + * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) + */ +void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + if (id >= ext->btn_cnt && id != LV_BTNM_PR_NONE) + return; + + if (id == ext->btn_id_pr) + return; + + ext->btn_id_pr = id; + lv_obj_invalidate(btnm); +} + /** * Enable or disable button toggling * @param btnm pointer to button matrix object diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 36f3241d5875..7eef895a55b3 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -141,6 +141,13 @@ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map */ void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_action_t action); +/** + * Set the pressed button + * @param btnm pointer to button matrix object + * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) + */ +void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id); + /** * Enable or disable button toggling * @param btnm pointer to button matrix object From 672626f225365b69581ce6e2808ad4d47b96f8f2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 28 Feb 2019 13:05:47 +0100 Subject: [PATCH 072/590] lv_indev: name unnamed struct and unions --- lv_core/lv_indev.c | 73 ++++++++++++++++++++++++------------------- lv_hal/lv_hal_indev.c | 6 ++-- lv_hal/lv_hal_indev.h | 12 +++---- 3 files changed, 48 insertions(+), 43 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 593527dcd6d2..98ca4862d766 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -143,9 +143,9 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) { if(indev->driver.type != LV_INDEV_TYPE_POINTER) return; - indev->cursor = cur_obj; - lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); + indev->custom_data.cursor = cur_obj; + lv_obj_set_parent(indev->custom_data.cursor, lv_disp_get_layer_sys(indev->driver.disp)); + lv_obj_set_pos(indev->custom_data.cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); } #if USE_LV_GROUP @@ -156,7 +156,9 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) */ void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) { - if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) indev->group = group; + if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) { + indev->custom_data.group = group; + } } #endif @@ -168,7 +170,9 @@ void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) */ void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) { - if(indev->driver.type == LV_INDEV_TYPE_BUTTON) indev->btn_points = points; + if(indev->driver.type == LV_INDEV_TYPE_BUTTON) { + indev->custom_data.btn_points = points; + } } /** @@ -353,10 +357,10 @@ static void indev_proc_task(void * param) static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ - if(i->cursor != NULL && + if(i->custom_data.cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) { - lv_obj_set_pos(i->cursor, data->point.x, data->point.y); + lv_obj_set_pos(i->custom_data.cursor, data->point.x, data->point.y); } i->proc.types.pointer.act_point.x = data->point.x; @@ -380,13 +384,14 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) { #if USE_LV_GROUP - if(i->group == NULL) return; + lv_group_t * g = i->custom_data.group; + if(g == NULL) return; /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); - lv_obj_t * focused = lv_group_get_focused(i->group); + lv_obj_t * focused = lv_group_get_focused(g); if(focused && data->key == LV_GROUP_KEY_ENTER) { focused->signal_func(focused, LV_SIGNAL_PRESSED, indev_act); } @@ -397,7 +402,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { /*On enter long press leave edit mode.*/ - lv_obj_t * focused = lv_group_get_focused(i->group); + lv_obj_t * focused = lv_group_get_focused(g); if(focused) { focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act); i->proc.long_pr_sent = 1; @@ -412,19 +417,19 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /* Edit mode is not used by KEYPAD devices. * So leave edit mode if we are in it before focusing on the next/prev object*/ if(data->key == LV_GROUP_KEY_NEXT || data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(i->group, false); + lv_group_set_editing(g, false); } if(data->key == LV_GROUP_KEY_NEXT) { - lv_group_focus_next(i->group); + lv_group_focus_next(g); } else if(data->key == LV_GROUP_KEY_PREV) { - lv_group_focus_prev(i->group); + lv_group_focus_prev(g); } else if(data->key == LV_GROUP_KEY_ENTER) { if(!i->proc.long_pr_sent) { - lv_group_send_data(i->group, data->key); + lv_group_send_data(g, data->key); } } else { - lv_group_send_data(i->group, data->key); + lv_group_send_data(g, data->key); } if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ @@ -449,26 +454,28 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { #if USE_LV_GROUP - if(i->group == NULL) return; + lv_group_t * g = i->custom_data.group; + + if(g == NULL) return; /*Process the steps first. They are valid only with released button*/ if(data->state == LV_INDEV_STATE_REL) { /*In edit mode send LEFT/RIGHT keys*/ - if(lv_group_get_editing(i->group)) { + if(lv_group_get_editing(g)) { int32_t s; if(data->enc_diff < 0) { - for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(i->group, LV_GROUP_KEY_LEFT); + for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_GROUP_KEY_LEFT); } else if(data->enc_diff > 0) { - for(s = 0; s < data->enc_diff; s++) lv_group_send_data(i->group, LV_GROUP_KEY_RIGHT); + for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_GROUP_KEY_RIGHT); } } /*In navigate mode focus on the next/prev objects*/ else { int32_t s; if(data->enc_diff < 0) { - for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(i->group); + for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(g); } else if(data->enc_diff > 0) { - for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(i->group); + for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(g); } } } @@ -483,14 +490,14 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { /*On enter long press leave edit mode.*/ - lv_obj_t * focused = lv_group_get_focused(i->group); + lv_obj_t * focused = lv_group_get_focused(g); bool editable = false; if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable); if(editable) { - if(i->group->obj_ll.head != i->group->obj_ll.tail) - lv_group_set_editing(i->group, lv_group_get_editing(i->group) ? false : true); /*Toggle edit mode on long press*/ + if(g->obj_ll.head != g->obj_ll.tail) + lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ else if(focused) focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act); } @@ -504,22 +511,22 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Release happened*/ else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { - lv_obj_t * focused = lv_group_get_focused(i->group); + lv_obj_t * focused = lv_group_get_focused(g); bool editable = false; if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ if(!editable) { - lv_group_send_data(i->group, LV_GROUP_KEY_ENTER); + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*An object is being edited and the button is releases. Just send enter */ - else if(i->group->editing) { - if(!i->proc.long_pr_sent || i->group->obj_ll.head == i->group->obj_ll.tail) - lv_group_send_data(i->group, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ + else if(g->editing) { + if(!i->proc.long_pr_sent || g->obj_ll.head == g->obj_ll.tail) + lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ } /*If the focused object is editable and now in navigate mode then enter edit mode*/ - else if(editable && !i->group->editing && !i->proc.long_pr_sent) { - lv_group_set_editing(i->group, lv_group_get_editing(i->group) ? false : true); /*Toggle edit mode on long press*/ + else if(editable && !g->editing && !i->proc.long_pr_sent) { + lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ } if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ @@ -544,8 +551,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) { - i->proc.types.pointer.act_point.x = i->btn_points[data->btn_id].x; - i->proc.types.pointer.act_point.y = i->btn_points[data->btn_id].y; + i->proc.types.pointer.act_point.x = i->custom_data.btn_points[data->btn_id].x; + i->proc.types.pointer.act_point.y = i->custom_data.btn_points[data->btn_id].y; /*Still the same point is pressed*/ if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 7ee8530e3ac4..5026f7f65331 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -80,9 +80,9 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) memcpy(&node->driver, driver, sizeof(lv_indev_drv_t)); node->proc.reset_query = 1; - node->cursor = NULL; - node->group = NULL; - node->btn_points = NULL; + node->custom_data.cursor = NULL; + node->custom_data.group = NULL; + node->custom_data.btn_points = NULL; return node; } diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index d284958b1065..e56840aeea80 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -57,12 +57,10 @@ typedef uint8_t lv_indev_state_t; /*Data type when an input device is read */ typedef struct { - union { - lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ - uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ - uint32_t btn_id; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ - int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ - }; + lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ + uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ + uint32_t btn_id; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ + int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ @@ -132,7 +130,7 @@ typedef struct _lv_indev_t { struct _lv_group_t *group; /*Keypad destination group*/ const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ - }; + }custom_data; } lv_indev_t; /********************** From 13fff73bdb8f64c0f61e6bbc0451d3349bbc967c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 06:26:03 +0100 Subject: [PATCH 073/590] event: use with keypad --- lv_core/lv_indev.c | 100 ++++++++++++++++++++++++++++++--------------- lv_objx/lv_btn.c | 30 +++++++++----- lv_objx/lv_list.c | 1 + 3 files changed, 87 insertions(+), 44 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 6cff598c3a8c..dc6564df0c64 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -388,58 +388,92 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); + if(focused == NULL) return; /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && - i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { + i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) + { i->proc.pr_timestamp = lv_tick_get(); - lv_obj_t * focused = lv_group_get_focused(g); - if(focused && data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_PRESSED, indev_act); + /*Simulate a press on the object if ENTER was pressed*/ + if(data->key == LV_GROUP_KEY_ENTER) { lv_obj_send_event(focused, LV_EVENT_PRESSED); + lv_group_send_data(g, LV_GROUP_KEY_ENTER); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Move the focus on NEXT*/ + else if(data->key == LV_GROUP_KEY_NEXT) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_next(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Move the focus on PREV*/ + else if(data->key == LV_GROUP_KEY_PREV) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_prev(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + else { + lv_group_send_data(g, data->key); } } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { - if(data->key == LV_GROUP_KEY_ENTER && - i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { - /*On enter long press leave edit mode.*/ - lv_obj_t * focused = lv_group_get_focused(g); - if(focused) { - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); - i->proc.long_pr_sent = 1; + else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) + { + /*Long press time has elapsed?*/ + if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + i->proc.long_pr_sent = 1; + if(data->key == LV_GROUP_KEY_ENTER) { + i->proc.longpr_rep_timestamp = lv_tick_get(); lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + } + /*Long press repeated time has elapsed?*/ + else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + + i->proc.longpr_rep_timestamp = lv_tick_get(); + + /*Send LONG_PRESS_REP on ENTER*/ + if(data->key == LV_GROUP_KEY_ENTER) { + lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED_REPEAT); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Move the focus on NEXT again*/ + else if(data->key == LV_GROUP_KEY_NEXT) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_next(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Move the focus on PREV again*/ + else if(data->key == LV_GROUP_KEY_PREV) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_prev(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + else { + lv_group_send_data(g, data->key); + if(i->proc.reset_query) return; /*The object might be deleted*/ } } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) + { /*The user might clear the key when it was released. Always release the pressed key*/ data->key = i->proc.types.keypad.last_key; + if(data->key == LV_GROUP_KEY_ENTER) { - /* Edit mode is not used by KEYPAD devices. - * So leave edit mode if we are in it before focusing on the next/prev object*/ - if(data->key == LV_GROUP_KEY_NEXT || data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(g, false); - } - - if(data->key == LV_GROUP_KEY_NEXT) { - lv_group_focus_next(g); - } else if(data->key == LV_GROUP_KEY_PREV) { - lv_group_focus_prev(g); - } else if(data->key == LV_GROUP_KEY_ENTER) { - if(!i->proc.long_pr_sent) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, indev_act); + if(i->proc.long_pr_sent == 0) { lv_obj_send_event(focused, LV_EVENT_CLICKED); + } else { + lv_obj_send_event(focused, LV_EVENT_RELEASED); } - } else { - lv_group_send_data(g, data->key); + if(i->proc.reset_query) return; /*The object might be deleted*/ } - - if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ - i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } @@ -754,7 +788,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED); + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); } } diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index aebee87df9b6..5f0d18735bbc 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -170,6 +170,11 @@ void lv_btn_set_toggle(lv_obj_t * btn, bool tgl) */ void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state) { + + if(state == LV_BTN_STATE_REL) { + printf("asd\n"); + } + lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); if(ext->state != state) { ext->state = state; @@ -493,6 +498,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode */ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) { + lv_res_t res; /* Include the ancient signal function */ @@ -562,8 +568,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { /*If not dragged and it was not long press action then *change state and run the action*/ - lv_indev_t * indev = lv_indev_get_act(); - if(lv_indev_is_dragging(param) == false && indev->proc.long_pr_sent == 0) { + if(lv_indev_is_dragging(param) == false) { if(ext->state == LV_BTN_STATE_PR && tgl == false) { lv_btn_set_state(btn, LV_BTN_STATE_REL); } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == false) { @@ -573,6 +578,11 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(ext->state == LV_BTN_STATE_TGL_PR && tgl == true) { lv_btn_set_state(btn, LV_BTN_STATE_REL); } + + if(tgl) { + lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + } + } else { /*If dragged change back the state*/ if(ext->state == LV_BTN_STATE_PR) { lv_btn_set_state(btn, LV_BTN_STATE_REL); @@ -616,16 +626,14 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); } else if(c == LV_GROUP_KEY_ENTER) { - lv_indev_t * indev = lv_indev_get_act(); - if(!indev->proc.long_pr_sent) { - if(lv_btn_get_toggle(btn)) { - if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - } else { - if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - } + if(lv_btn_get_toggle(btn)) { + if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); + else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); + } else { + if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); + else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); } + lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_CLEANUP) { #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 097f2495f1f5..67823f7d353f 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -846,6 +846,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(btn != NULL) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->last_sel = btn; + lv_obj_send_event(btn, LV_EVENT_CLICKED); } } #endif From 148cb16cd4fd3d863cbce61271171269f8ed37a4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 06:31:09 +0100 Subject: [PATCH 074/590] lv_roller_set_hor_fit: use the new fit system --- lv_objx/lv_ddlist.c | 2 +- lv_objx/lv_ddlist.h | 2 +- lv_objx/lv_roller.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 96ff47e6ed24..a992d0aae505 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -238,7 +238,7 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h) /** * Enable or disable the horizontal fit to the content * @param ddlist pointer to a drop down list - * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) + * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit) { diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 8d3a6599fcf1..2ec483bae0e8 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -121,7 +121,7 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); /** * Enable or disable the horizontal fit to the content * @param ddlist pointer to a drop down list - * @param fit fit mode fron `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) + * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit); diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index 2f1b21c7c048..f49e6fcab9cd 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -110,11 +110,11 @@ void lv_roller_set_visible_row_count(lv_obj_t *roller, uint8_t row_cnt); /** * Enable or disable the horizontal fit to the content * @param roller pointer to a roller - * @param en true: enable auto fit; false: disable auto fit + * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -static inline void lv_roller_set_hor_fit(lv_obj_t * roller, bool en) +static inline void lv_roller_set_hor_fit(lv_obj_t * roller, lv_fit_t fit) { - lv_ddlist_set_hor_fit(roller, en); + lv_ddlist_set_hor_fit(roller, fit); } /** From 25df5347aabfac4766f717929d25622773108c26 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 07:25:16 +0100 Subject: [PATCH 075/590] lv_btnm_set_ctrl_map: update comment --- lv_objx/lv_btnm.c | 4 ++-- lv_objx/lv_btnm.h | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 78a8f5a04a71..d5aaad9f0e26 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -275,8 +275,8 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) * @param btnm pointer to a button matrix object * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The * length of the array and position of the elements must match - * that when the map was set via `lv_btnm_set_map` (i.e. one - * element for each button AND new line). + * the number and order of the individual buttons (i.e. excludes + * newline entries). * The control bits are: * - bit 5 : 1 = inactive (disabled) * - bit 4 : 1 = no repeat (on long press) diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 36f3241d5875..0e07b2af9671 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -99,20 +99,20 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); *====================*/ /** - * Set a new map. Buttons will be created/deleted according to the map. The - * button matrix keeps a reference to the map and so the string array must not - * be deallocated during the life of the matrix. + * Set the button control map (hidden, disabled etc.) for a button matrix. The + * control map array will be copied and so may be deallocated after this + * function returns. * @param btnm pointer to a button matrix object - * @param map pointer a string array. The last string has to be: "". - * Use "\n" to begin a new line. - * The first byte can be a control data: - * - bit 7: always 1 - * - bit 6: always 0 - * - bit 5: inactive (disabled) - * - bit 4: no repeat (on long press) - * - bit 3: hidden - * - bit 2..0: button relative width - * Example (practically use octal numbers): "\224abc": "abc" text with 4 width and no long press + * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The + * length of the array and position of the elements must match + * the number and order of the individual buttons (i.e. excludes + * newline entries). + * The control bits are: + * - bit 5 : 1 = inactive (disabled) + * - bit 4 : 1 = no repeat (on long press) + * - bit 3 : 1 = hidden + * - bit 2..0: Relative width compared to the buttons in the + * same row. [1..7] */ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); From 4608f72098eff89856e3bc09c01bad788612109b Mon Sep 17 00:00:00 2001 From: canardos Date: Fri, 1 Mar 2019 15:25:29 +0800 Subject: [PATCH 076/590] add lv_cb_set_static_text function --- lv_objx/lv_cb.c | 16 ++++++++++++++-- lv_objx/lv_cb.h | 13 +++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index e6fc49454d20..63a8005ce933 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -120,9 +120,10 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) *====================*/ /** - * Set the text of a check box + * Set the text of a check box. `txt` will be copied and may be deallocated + * after this function returns. * @param cb pointer to a check box - * @param txt the text of the check box + * @param txt the text of the check box. NULL to refresh with the current text. */ void lv_cb_set_text(lv_obj_t * cb, const char * txt) { @@ -130,6 +131,17 @@ void lv_cb_set_text(lv_obj_t * cb, const char * txt) lv_label_set_text(ext->label, txt); } +/** + * Set the text of a check box. `txt` must not be deallocated during the life + * of this checkbox. + * @param cb pointer to a check box + * @param txt the text of the check box. NULL to refresh with the current text. + */ +void lv_cb_set_static_text(lv_obj_t * cb, const char * txt) { + lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); + lv_label_set_static_text(ext->label, txt); +} + /** * Set a style of a check box * @param cb pointer to check box object diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index b587733417a7..45f33ee875ec 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -78,12 +78,21 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy); *====================*/ /** - * Set the text of a check box + * Set the text of a check box. `txt` will be copied and may be deallocated + * after this function returns. * @param cb pointer to a check box - * @param txt the text of the check box + * @param txt the text of the check box. NULL to refresh with the current text. */ void lv_cb_set_text(lv_obj_t * cb, const char * txt); +/** + * Set the text of a check box. `txt` must not be deallocated during the life + * of this checkbox. + * @param cb pointer to a check box + * @param txt the text of the check box. NULL to refresh with the current text. + */ +void lv_cb_set_static_text(lv_obj_t * cb, const char * txt); + /** * Set the state of the check box * @param cb pointer to a check box object From 2ffb0a83b07e34e2e7b2d4599e0229269cfb4dfd Mon Sep 17 00:00:00 2001 From: canardos Date: Fri, 1 Mar 2019 15:56:27 +0800 Subject: [PATCH 077/590] Fix incorrect kb_ctrl_num_map --- lv_objx/lv_kb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 01f654681d8d..a5545bcfa877 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -82,6 +82,7 @@ static const char * kb_map_num[] = { }; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { + 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1 From 4743e119678b7401a50481878762e285835ccffe Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 15:25:47 +0100 Subject: [PATCH 078/590] lv_slider: experimental bar and slider animation update --- lv_objx/lv_bar.c | 74 +++++++++++++++++++++++++++++++++++++++------ lv_objx/lv_bar.h | 7 +++++ lv_objx/lv_slider.c | 32 +++++++++++++++----- 3 files changed, 97 insertions(+), 16 deletions(-) diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 656225eb467e..fa95e726ee4c 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -30,6 +30,9 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); +static void lv_bar_animate(void * bar, int32_t value); +static void lv_bar_anim_ready(void * bar); + /********************** * STATIC VARIABLES **********************/ @@ -70,6 +73,9 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) ext->min_value = 0; ext->max_value = 100; ext->cur_value = 0; + ext->anim_start = 0; + ext->anim_end = 0; + ext->anim_state = LV_BAR_ANIM_STATE_INV; ext->sym = 0; ext->style_indic = &lv_style_pretty_color; @@ -142,13 +148,26 @@ void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time) new_value = value > ext->max_value ? ext->max_value : value; new_value = new_value < ext->min_value ? ext->min_value : new_value; + if(ext->cur_value == new_value) return; + + /*NO animation in progress -> simply set the values*/ + if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { + ext->anim_start = ext->cur_value; + ext->anim_end = new_value; + } + /*Animation in progress. Start from the animation end value*/ + else { + ext->anim_start = ext->anim_end; + ext->anim_end = new_value; + } + lv_anim_t a; a.var = bar; - a.start = ext->cur_value; - a.end = new_value; - a.fp = (lv_anim_fp_t)lv_bar_set_value; + a.start = LV_BAR_ANIM_STATE_START; + a.end = LV_BAR_ANIM_STATE_END; + a.fp = (lv_anim_fp_t)lv_bar_animate; a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.end_cb = lv_bar_anim_ready; a.act_time = 0; a.time = anim_time; a.playback = 0; @@ -229,7 +248,10 @@ void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style) int16_t lv_bar_get_value(const lv_obj_t * bar) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - return ext->cur_value; + /*If animated tell that it's already at the end value*/ + if(ext->anim_state != LV_BAR_ANIM_STATE_INV) return ext->anim_end; + /*No animation, simple return the current value*/ + else return ext->cur_value; } /** @@ -330,7 +352,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - if(ext->cur_value != ext->min_value || ext->sym) { + if(ext->cur_value != ext->min_value || ext->sym || ext->anim_start != LV_BAR_ANIM_STATE_INV) { lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); @@ -344,9 +366,18 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(w >= h) { /*Horizontal*/ - indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); - indic_area.x2 = indic_area.x1 + indic_area.x2 - 1; + if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { + /*Calculate the coordinates of anim. start and end*/ + lv_coord_t anim_start_x = (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); + lv_coord_t anim_end_x = (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + indic_area.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + } else { + indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); + } + indic_area.x2 = indic_area.x1 + indic_area.x2 - 1; if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { /*Calculate the coordinate of the zero point*/ lv_coord_t zero; @@ -358,7 +389,17 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } } } else { - indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); + if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { + /*Calculate the coordinates of anim. start and end*/ + lv_coord_t anim_start_y = (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); + lv_coord_t anim_end_y = (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + indic_area.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + } else { + indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); + } + indic_area.y1 = indic_area.y2 - indic_area.y1 + 1; if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { @@ -426,4 +467,19 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) } +static void lv_bar_animate(void * bar, int32_t value) +{ + lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + ext->anim_state = value; + lv_obj_invalidate(bar); +} + +static void lv_bar_anim_ready(void * bar) +{ + lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + ext->anim_state = LV_BAR_ANIM_STATE_INV; + lv_bar_set_value(bar, ext->anim_end); + +} + #endif diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index 21903842cf5b..8ef3c4de0f23 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -29,6 +29,10 @@ extern "C" { /********************* * DEFINES *********************/ +#define LV_BAR_ANIM_STATE_START 0 +#define LV_BAR_ANIM_STATE_END 256 +#define LV_BAR_ANIM_STATE_INV -1 +#define LV_BAR_ANIM_STATE_NORM 8 /*log2(LV_BAR_ANIM_STATE_END) used to normalize data*/ /********************** * TYPEDEFS @@ -42,6 +46,9 @@ typedef struct int16_t cur_value; /*Current value of the bar*/ int16_t min_value; /*Minimum value of the bar*/ int16_t max_value; /*Maximum value of the bar*/ + int16_t anim_start; + int16_t anim_end; + int16_t anim_state; uint8_t sym :1; /*Symmetric: means the center is around zero value*/ lv_style_t *style_indic; /*Style of the indicator*/ } lv_bar_ext_t; diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index d75f84bd1cd2..29cd422afa2d 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -304,11 +304,10 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_bg.y2 -= slider_w > slider_h ? pad_ver_bg : 0; /*Pad only for horizontal slider*/ } - #if USE_LV_GROUP == 0 lv_draw_rect(&area_bg, mask, style_bg, lv_obj_get_opa_scale(slider)); #else - /* Draw the borders later if the bar is focused. + /* Draw the borders later if the slider is focused. * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ if(lv_obj_is_focused(slider)) { lv_style_t style_tmp; @@ -320,7 +319,6 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } #endif - /*Draw the indicator*/ lv_area_t area_indic; lv_area_copy(&area_indic, &area_bg); @@ -349,11 +347,31 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(ext->drag_value != LV_SLIDER_NOT_PRESSED) cur_value = ext->drag_value; if(slider_w >= slider_h) { - area_indic.x2 = (int32_t)((int32_t)(lv_area_get_width(&area_indic)) * (cur_value - min_value)) / (max_value - min_value); + lv_coord_t indic_w = lv_area_get_width(&area_indic); + if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { + /*Calculate the coordinates of anim. start and end*/ + lv_coord_t anim_start_x = (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / (max_value - min_value); + lv_coord_t anim_end_x = (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + area_indic.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else { + area_indic.x2 = (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); + } area_indic.x2 = area_indic.x1 + area_indic.x2 - 1; } else { - area_indic.y1 = (int32_t)((int32_t)(lv_area_get_height(&area_indic)) * (cur_value - min_value)) / (max_value - min_value); + lv_coord_t indic_h = lv_area_get_height(&area_indic); + if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { + /*Calculate the coordinates of anim. start and end*/ + lv_coord_t anim_start_y = (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / (max_value - min_value); + lv_coord_t anim_end_y = (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + area_indic.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); + } else { + area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); + } area_indic.y1 = area_indic.y2 - area_indic.y1 + 1; } @@ -497,10 +515,10 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par } #endif if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { - lv_slider_set_value(slider, lv_slider_get_value(slider) + 1); + lv_slider_set_value_anim(slider, lv_slider_get_value(slider) + 1, 200); if(ext->action != NULL) res = ext->action(slider); } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { - lv_slider_set_value(slider, lv_slider_get_value(slider) - 1); + lv_slider_set_value_anim(slider, lv_slider_get_value(slider) - 1, 200); if(ext->action != NULL) res = ext->action(slider); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { From 86d7f4c8887e35417a32ac938acf61a88167e627 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 22:23:59 +0100 Subject: [PATCH 079/590] imprve encoder event support --- lv_core/lv_indev.c | 56 ++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index dc6564df0c64..cb70311daf1a 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -466,7 +466,6 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*The user might clear the key when it was released. Always release the pressed key*/ data->key = i->proc.types.keypad.last_key; if(data->key == LV_GROUP_KEY_ENTER) { - if(i->proc.long_pr_sent == 0) { lv_obj_send_event(focused, LV_EVENT_CLICKED); } else { @@ -495,9 +494,11 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { #if USE_LV_GROUP lv_group_t * g = i->custom_data.group; - if(g == NULL) return; + lv_obj_t * focused = lv_group_get_focused(g); + if(focused == NULL) return; + /*Process the steps first. They are valid only with released button*/ if(data->state == LV_INDEV_STATE_REL) { /*In edit mode send LEFT/RIGHT keys*/ @@ -520,53 +521,64 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } } - /*Key press happened*/ + /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/ + focused = lv_group_get_focused(g); + if(focused == NULL) return; + + bool editable = false; + focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + + + /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && - i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { + i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) + { i->proc.pr_timestamp = lv_tick_get(); + if(lv_group_get_editing(g) == true || editable == false) lv_obj_send_event(focused, LV_EVENT_PRESSED); } /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { - /*On enter long press leave edit mode.*/ - lv_obj_t * focused = lv_group_get_focused(g); - - bool editable = false; - if(focused) focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); - + /*On enter long press toggle edit mode.*/ if(editable) { - if(g->obj_ll.head != g->obj_ll.tail) + if(lv_ll_is_empty(&g->obj_ll) == false) lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ - else if(focused) - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); + else { + /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ + lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + } } /*If not editable then just send a long press signal*/ else { - if(focused) - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, indev_act); + lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); } i->proc.long_pr_sent = 1; } } /*Release happened*/ else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { - lv_obj_t * focused = lv_group_get_focused(g); - bool editable = false; - if(focused) focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ - if(!editable) { + if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); + if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_CLICKED); + else lv_obj_send_event(focused, LV_EVENT_RELEASED); + + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*An object is being edited and the button is releases. Just send enter */ else if(g->editing) { - if(!i->proc.long_pr_sent || g->obj_ll.head == g->obj_ll.tail) + if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ + lv_obj_send_event(focused, LV_EVENT_CLICKED); + + if(i->proc.reset_query) return; /*The object might be deleted*/ + } } - /*If the focused object is editable and now in navigate mode then enter edit mode*/ + /*If the focused object is editable and now in navigate mode then on enter switch edit mode*/ else if(editable && !g->editing && !i->proc.long_pr_sent) { - lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ + lv_group_set_editing(g, true); /*Set edit mode*/ } if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ From cae61d4e3e966ed033731343eb0f2ce722e6e0c7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Mar 2019 23:50:30 +0100 Subject: [PATCH 080/590] bar/slider/sw anim updates --- lv_objx/lv_bar.c | 92 ++++++++++++-------------- lv_objx/lv_bar.h | 13 +--- lv_objx/lv_page.c | 37 +++++++++-- lv_objx/lv_slider.c | 39 ++++++++--- lv_objx/lv_slider.h | 22 ++---- lv_objx/lv_sw.c | 158 ++++++++++++-------------------------------- lv_objx/lv_sw.h | 32 +++------ 7 files changed, 167 insertions(+), 226 deletions(-) diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index fa95e726ee4c..f40c7f87efc3 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -73,6 +73,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) ext->min_value = 0; ext->max_value = 100; ext->cur_value = 0; + ext->anim_time = 500; ext->anim_start = 0; ext->anim_end = 0; ext->anim_state = LV_BAR_ANIM_STATE_INV; @@ -86,7 +87,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_set_click(new_bar, false); lv_obj_set_size(new_bar, LV_DPI * 2, LV_DPI / 3); - lv_bar_set_value(new_bar, ext->cur_value); + lv_bar_set_value(new_bar, ext->cur_value, false); lv_theme_t * th = lv_theme_get_current(); if(th) { @@ -105,7 +106,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_bar); - lv_bar_set_value(new_bar, ext->cur_value); + lv_bar_set_value(new_bar, ext->cur_value, false); } LV_LOG_INFO("bar created"); @@ -121,26 +122,13 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) * Set a new value on the bar * @param bar pointer to a bar object * @param value new value + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_bar_set_value(lv_obj_t * bar, int16_t value) -{ - lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - if(ext->cur_value == value) return; - - ext->cur_value = value > ext->max_value ? ext->max_value : value; - ext->cur_value = ext->cur_value < ext->min_value ? ext->min_value : ext->cur_value; - lv_obj_invalidate(bar); -} - -#if USE_LV_ANIMATION -/** - * Set a new value with animation on the bar - * @param bar pointer to a bar object - * @param value new value - * @param anim_time animation time in milliseconds - */ -void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time) +void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) { +#if USE_LV_ANIMATION == 0 + anim = false; +#endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); if(ext->cur_value == value) return; @@ -150,34 +138,40 @@ void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time) if(ext->cur_value == new_value) return; - /*NO animation in progress -> simply set the values*/ - if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { - ext->anim_start = ext->cur_value; - ext->anim_end = new_value; - } - /*Animation in progress. Start from the animation end value*/ - else { - ext->anim_start = ext->anim_end; - ext->anim_end = new_value; - } + if(anim == false) { + ext->cur_value = new_value; + lv_obj_invalidate(bar); + } else { +#if USE_LV_ANIMATION + /*No animation in progress -> simply set the values*/ + if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { + ext->anim_start = ext->cur_value; + ext->anim_end = new_value; + } + /*Animation in progress. Start from the animation end value*/ + else { + ext->anim_start = ext->anim_end; + ext->anim_end = new_value; + } - lv_anim_t a; - a.var = bar; - a.start = LV_BAR_ANIM_STATE_START; - a.end = LV_BAR_ANIM_STATE_END; - a.fp = (lv_anim_fp_t)lv_bar_animate; - a.path = lv_anim_path_linear; - a.end_cb = lv_bar_anim_ready; - a.act_time = 0; - a.time = anim_time; - a.playback = 0; - a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; - - lv_anim_create(&a); -} + lv_anim_t a; + a.var = bar; + a.start = LV_BAR_ANIM_STATE_START; + a.end = LV_BAR_ANIM_STATE_END; + a.fp = (lv_anim_fp_t)lv_bar_animate; + a.path = lv_anim_path_linear; + a.end_cb = lv_bar_anim_ready; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; + + lv_anim_create(&a); #endif + } +} /** @@ -195,11 +189,11 @@ void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max) ext->min_value = min; if(ext->cur_value > max) { ext->cur_value = max; - lv_bar_set_value(bar, ext->cur_value); + lv_bar_set_value(bar, ext->cur_value, false); } if(ext->cur_value < min) { ext->cur_value = min; - lv_bar_set_value(bar, ext->cur_value); + lv_bar_set_value(bar, ext->cur_value, false); } lv_obj_invalidate(bar); } @@ -478,7 +472,7 @@ static void lv_bar_anim_ready(void * bar) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); ext->anim_state = LV_BAR_ANIM_STATE_INV; - lv_bar_set_value(bar, ext->anim_end); + lv_bar_set_value(bar, ext->anim_end, false); } diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index 8ef3c4de0f23..0501f4cf3aef 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -49,6 +49,7 @@ typedef struct int16_t anim_start; int16_t anim_end; int16_t anim_state; + uint16_t anim_time; uint8_t sym :1; /*Symmetric: means the center is around zero value*/ lv_style_t *style_indic; /*Style of the indicator*/ } lv_bar_ext_t; @@ -79,17 +80,9 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy); * Set a new value on the bar * @param bar pointer to a bar object * @param value new value + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_bar_set_value(lv_obj_t * bar, int16_t value); - -/** - * Set a new value with animation on the bar - * @param bar pointer to a bar object - * @param value new value - * @param anim_time animation time in milliseconds - */ -void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time); - +void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim); /** * Set minimum and the maximum values of a bar diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 8b2f602d826e..536ef67b421e 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -464,6 +464,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + /*If obj is higher then the page focus where the "error" is smaller*/ lv_coord_t obj_y = obj->coords.y1 - ext->scrl->coords.y1; lv_coord_t obj_h = lv_obj_get_height(obj); lv_coord_t scrlable_y = lv_obj_get_y(ext->scrl); @@ -472,8 +473,6 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_coord_t top_err = -(scrlable_y + obj_y); lv_coord_t bot_err = scrlable_y + obj_y + obj_h - page_h; - /*If obj is higher then the page focus where the "error" is smaller*/ - /*Out of the page on the top*/ if((obj_h <= page_h && top_err > 0) || (obj_h > page_h && top_err < bot_err)) { @@ -488,13 +487,36 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) scrlable_y = -(obj_y + style_scrl->body.padding.ver + style->body.padding.ver); scrlable_y -= style_scrl->body.padding.ver; scrlable_y += page_h - obj_h; - } else { - /*Already in focus*/ - return; + } + + /*If obj is wider then the page focus where the "error" is smaller*/ + lv_coord_t obj_x = obj->coords.x1 - ext->scrl->coords.x1; + lv_coord_t obj_w = lv_obj_get_width(obj); + lv_coord_t scrlable_x = lv_obj_get_x(ext->scrl); + lv_coord_t page_w = lv_obj_get_width(page); + + lv_coord_t left_err = -(scrlable_x + obj_x); + lv_coord_t right_err = scrlable_x + obj_x + obj_w - page_w; + + /*Out of the page on the top*/ + if((obj_w <= page_w && left_err > 0) || + (obj_w > page_w && left_err < right_err)) { + /*Calculate a new position and let some space above*/ + scrlable_x = -(obj_x - style_scrl->body.padding.hor- style->body.padding.hor); + scrlable_x += style_scrl->body.padding.hor; + } + /*Out of the page on the bottom*/ + else if((obj_w <= page_w && right_err > 0) || + (obj_w > page_w && left_err >= right_err)) { + /*Calculate a new position and let some space below*/ + scrlable_x = -(obj_x + style_scrl->body.padding.hor + style->body.padding.hor); + scrlable_x -= style_scrl->body.padding.hor; + scrlable_x += page_w - obj_w; } if(anim_time == 0) { lv_obj_set_y(ext->scrl, scrlable_y); + lv_obj_set_x(ext->scrl, scrlable_x); #if USE_LV_ANIMATION } else { lv_anim_t a; @@ -509,6 +531,11 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) a.path = lv_anim_path_linear; a.fp = (lv_anim_fp_t) lv_obj_set_y; lv_anim_create(&a); + + a.start = lv_obj_get_x(ext->scrl); + a.end = scrlable_x; + a.fp = (lv_anim_fp_t) lv_obj_set_x; + lv_anim_create(&a); #endif } } diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 29cd422afa2d..c47742d285ef 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -338,7 +338,6 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_indic.y1 += pad_ver_indic; area_indic.y2 -= pad_ver_indic; - lv_coord_t cur_value = lv_slider_get_value(slider); lv_coord_t min_value = lv_slider_get_min_value(slider); lv_coord_t max_value = lv_slider_get_max_value(slider); @@ -360,6 +359,9 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } area_indic.x2 = area_indic.x1 + area_indic.x2 - 1; + /*Draw the indicator but don't draw an ugly 1px wide rectangle on the left on min. value*/ + if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + } else { lv_coord_t indic_h = lv_area_get_height(&area_indic); if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { @@ -373,9 +375,10 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); } area_indic.y1 = area_indic.y2 - area_indic.y1 + 1; - } - if(cur_value != min_value) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + /*Draw the indicator but don't draw an ugly 1px height rectangle on the bottom on min. value*/ + if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + } /*Before the knob add the border if required*/ #if USE_LV_GROUP @@ -399,7 +402,17 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig knob_area.x1 = area_indic.x2 - slider_h / 2; knob_area.x2 = knob_area.x1 + slider_h - 1; } else { - knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / (max_value - min_value); + if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { + lv_coord_t w = slider_w - slider_h - 1; + lv_coord_t anim_start_x = (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / (max_value - min_value); + lv_coord_t anim_end_x = (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + knob_area.x1 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else { + knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / (max_value - min_value); + } + knob_area.x1 += slider->coords.x1; knob_area.x2 = knob_area.x1 + slider_h - 1; } @@ -411,7 +424,17 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig knob_area.y1 = area_indic.y1 - slider_w / 2; knob_area.y2 = knob_area.y1 + slider_w - 1; } else { - knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / (max_value - min_value); + if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { + lv_coord_t h = slider_h - slider_w - 1; + lv_coord_t anim_start_x = (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / (max_value - min_value); + lv_coord_t anim_end_x = (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ + knob_area.y2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else { + knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / (max_value - min_value); + } + knob_area.y2 = slider->coords.y2 - knob_area.y2; knob_area.y1 = knob_area.y2 - slider_w - 1; } @@ -475,7 +498,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(ext->action != NULL) res = ext->action(slider); } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { - lv_slider_set_value(slider, ext->drag_value); + lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; if(ext->action != NULL) res = ext->action(slider); } else if(sign == LV_SIGNAL_CORD_CHG) { @@ -515,10 +538,10 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par } #endif if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { - lv_slider_set_value_anim(slider, lv_slider_get_value(slider) + 1, 200); + lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true); if(ext->action != NULL) res = ext->action(slider); } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { - lv_slider_set_value_anim(slider, lv_slider_get_value(slider) - 1, 200); + lv_slider_set_value(slider, lv_slider_get_value(slider) - 1, true); if(ext->action != NULL) res = ext->action(slider); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index 6336ae8a818b..532e2f5fab9d 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -41,9 +41,9 @@ typedef struct { lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ - lv_action_t action; /*Function to call when a new value is set*/ - lv_style_t *style_knob; /*Style of the knob*/ - int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ + lv_action_t action; /*Function to call when a new value is set*/ + lv_style_t *style_knob; /*Style of the knob*/ + int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ uint8_t knob_in :1; /*1: Draw the knob inside the bar*/ } lv_slider_ext_t; @@ -76,21 +76,11 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy); * Set a new value on the slider * @param slider pointer to a slider object * @param value new value + * @param anim true: set the value with an animation; false: change the value immediatelly */ -static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value) +static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value, bool anim) { - lv_bar_set_value(slider, value); -} - -/** - * Set a new value with animation on a slider - * @param slider pointer to a slider object - * @param value new value - * @param anim_time animation time in milliseconds - */ -static inline void lv_slider_set_value_anim(lv_obj_t * slider, int16_t value, uint16_t anim_time) -{ - lv_bar_set_value_anim(slider, value, anim_time); + lv_bar_set_value(slider, value, anim); } /** diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index 35fe47674922..34176edb4725 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -30,7 +30,6 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param); -static void lv_sw_anim_to_value(lv_obj_t * sw, int16_t value); /********************** * STATIC VARIABLES @@ -80,10 +79,9 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new switch switch*/ if(copy == NULL) { - lv_slider_set_range(new_sw, 0, 1); - lv_obj_set_size(new_sw, 2 * LV_DPI / 3, LV_DPI / 3); + lv_obj_set_size(new_sw, 2 * LV_DPI / 3, LV_DPI / 3); lv_slider_set_knob_in(new_sw, true); - lv_slider_set_range(new_sw, 0, LV_SWITCH_SLIDER_ANIM_MAX); + lv_slider_set_range(new_sw, 0, LV_SW_MAX_VALUE); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -125,83 +123,50 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /** * Turn ON the switch - * @param sw pointer to a switch object + * @param sw pointer to a switch objec + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_on(lv_obj_t * sw) +void lv_sw_on(lv_obj_t * sw, bool anim) { +#if USE_LV_ANIMATION == 0 + anim = false; +#endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - lv_slider_set_value(sw, LV_SWITCH_SLIDER_ANIM_MAX); - + lv_slider_set_value(sw, LV_SW_MAX_VALUE, anim); lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); } /** * Turn OFF the switch * @param sw pointer to a switch object + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_off(lv_obj_t * sw) +void lv_sw_off(lv_obj_t * sw, bool anim) { +#if USE_LV_ANIMATION == 0 + anim = false; +#endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - lv_slider_set_value(sw, 0); - + lv_slider_set_value(sw, 0, anim); lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); } /** * Toggle the position of the switch * @param sw pointer to a switch object + * @param anim true: set the value with an animation; false: change the value immediatelly * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t *sw) { - bool state = lv_sw_get_state(sw); - if(state) { - lv_sw_off(sw); - } - else { - lv_sw_on(sw); - } - return !state; -} - -/** - * Turn ON the switch with an animation - * @param sw pointer to a switch object - */ -void lv_sw_on_anim(lv_obj_t * sw) +bool lv_sw_toggle(lv_obj_t *sw, bool anim) { - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - if(lv_sw_get_anim_time(sw) > 0)lv_sw_anim_to_value(sw, LV_SWITCH_SLIDER_ANIM_MAX); - else lv_slider_set_value(sw, LV_SWITCH_SLIDER_ANIM_MAX); - - lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); -} - -/** - * Turn OFF the switch with an animation - * @param sw pointer to a switch object - */ -void lv_sw_off_anim(lv_obj_t * sw) -{ - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - if(lv_sw_get_anim_time(sw) > 0) lv_sw_anim_to_value(sw, 0); - else lv_slider_set_value(sw, 0); - - lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); -} +#if USE_LV_ANIMATION == 0 + anim = false; +#endif -/** - * Toggle the position of the switch with an animation - * @param sw pointer to a switch object - * @return resulting state of the switch. - */ -bool lv_sw_toggle_anim(lv_obj_t *sw) { bool state = lv_sw_get_state(sw); - if(state) { - lv_sw_off_anim(sw); - } - else { - lv_sw_on_anim(sw); - } + if(state) lv_sw_off(sw, anim); + else lv_sw_on(sw, anim); + return !state; } @@ -304,18 +269,18 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) { lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - /*Save the current (old) value before slider signal modifies it*/ + /*Save the current (old) value before slider signal modifies it. It will be required in the later colcualtions*/ int16_t old_val; - if(sign == LV_SIGNAL_PRESSING) old_val = ext->slider.drag_value; else old_val = lv_slider_get_value(sw); - /*Do not let the slider to call the callback. The Switch will do it if required*/ - lv_action_t slider_action = ext->slider.action; + /*Don't let the slider to call the action. Switch handles it differently*/ + lv_action_t action = ext->slider.action; ext->slider.action = NULL; lv_res_t res; /* Include the ancient signal function */ + res = ancestor_signal(sw, sign, param); if(res != LV_RES_OK) return res; @@ -335,7 +300,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) ext->changed = 0; } else if(sign == LV_SIGNAL_PRESSING) { - /*See if the switch was slid*/ + /*See if the switch was slid (moved at least a little)*/ lv_indev_t * indev = lv_indev_get_act(); if(indev) { lv_point_t p = {0,0}; @@ -345,12 +310,12 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) /*If didn't slide then revert the min/max value. So click without slide won't move the switch as a slider*/ if(ext->slided == 0) { - if(lv_sw_get_state(sw)) ext->slider.drag_value = LV_SWITCH_SLIDER_ANIM_MAX; + if(lv_sw_get_state(sw)) ext->slider.drag_value = LV_SW_MAX_VALUE; else ext->slider.drag_value = 0; } /*If explicitly changed (by slide) don't need to be toggled on release*/ - int16_t threshold = LV_SWITCH_SLIDER_ANIM_MAX / 2; + int16_t threshold = LV_SW_MAX_VALUE / 2; if((old_val < threshold && ext->slider.drag_value > threshold) || (old_val > threshold && ext->slider.drag_value < threshold)) { @@ -360,48 +325,34 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) else if(sign == LV_SIGNAL_PRESS_LOST) { if(lv_sw_get_state(sw)) { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); -#if USE_LV_ANIMATION - lv_sw_anim_to_value(sw, LV_SWITCH_SLIDER_ANIM_MAX); -#endif + lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); } else { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); -#if USE_LV_ANIMATION - lv_sw_anim_to_value(sw, 0); -#endif + lv_slider_set_value(sw, 0, true); } } else if(sign == LV_SIGNAL_RELEASED) { /*If not dragged then toggle the switch*/ if(ext->changed == 0) { - if(lv_sw_get_state(sw)) lv_sw_off_anim(sw); - else lv_sw_on_anim(sw); - - if(slider_action != NULL) res = slider_action(sw); + if(lv_sw_get_state(sw)) lv_sw_off(sw, true); + else lv_sw_on(sw, true); } /*If the switch was dragged then calculate the new state based on the current position*/ else { int16_t v = lv_slider_get_value(sw); - if(v > LV_SWITCH_SLIDER_ANIM_MAX / 2) lv_sw_on_anim(sw); - else lv_sw_off_anim(sw); - - if(slider_action != NULL) res = slider_action(sw); + if(v > LV_SW_MAX_VALUE / 2) lv_sw_on(sw, true); + else lv_sw_off(sw, true); } - } else if(sign == LV_SIGNAL_CONTROLL) { - char c = *((char *)param); if(c == LV_GROUP_KEY_ENTER) { - if(old_val) lv_sw_off_anim(sw); - else lv_sw_on_anim(sw); - - if(slider_action) res = slider_action(sw); - } else if(c == LV_GROUP_KEY_UP || c == LV_GROUP_KEY_RIGHT) { - lv_sw_on_anim(sw); - if(slider_action) res = slider_action(sw); - } else if(c == LV_GROUP_KEY_DOWN || c == LV_GROUP_KEY_LEFT) { - lv_sw_off_anim(sw); - if(slider_action) res = slider_action(sw); + if(old_val) lv_sw_off(sw, true); + else lv_sw_on(sw, true); + } else if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); + } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { + lv_slider_set_value(sw, 0, true); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; @@ -415,31 +366,10 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) buf->type[i] = "lv_sw"; } - /*Restore the callback*/ - if(res == LV_RES_OK) ext->slider.action = slider_action; + /*Revert the action*/ + ext->slider.action = action; return res; } -static void lv_sw_anim_to_value(lv_obj_t * sw, int16_t value) -{ -#if USE_LV_ANIMATION - lv_anim_t a; - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - a.var = sw; - a.start = ext->slider.bar.cur_value; - a.end = value; - a.fp = (lv_anim_fp_t)lv_slider_set_value; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = lv_sw_get_anim_time(sw); - a.playback = 0; - a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; - lv_anim_create(&a); -#endif -} - #endif diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index 28b22f739047..cc7e16643840 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -32,7 +32,7 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_SWITCH_SLIDER_ANIM_MAX 1000 +#define LV_SW_MAX_VALUE 100 /********************** * TYPEDEFS @@ -79,40 +79,24 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy); /** * Turn ON the switch * @param sw pointer to a switch object + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_on(lv_obj_t *sw); +void lv_sw_on(lv_obj_t *sw, bool anim); /** * Turn OFF the switch * @param sw pointer to a switch object + * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_off(lv_obj_t *sw); +void lv_sw_off(lv_obj_t *sw, bool anim); /** * Toggle the position of the switch * @param sw pointer to a switch object + * @param anim true: set the value with an animation; false: change the value immediatelly * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t *sw); - -/** - * Turn ON the switch with an animation - * @param sw pointer to a switch object - */ -void lv_sw_on_anim(lv_obj_t * sw); - -/** - * Turn OFF the switch with an animation - * @param sw pointer to a switch object - */ -void lv_sw_off_anim(lv_obj_t * sw); - -/** - * Toggle the position of the switch with an animation - * @param sw pointer to a switch object - * @return resulting state of the switch. - */ -bool lv_sw_toggle_anim(lv_obj_t *sw); +bool lv_sw_toggle(lv_obj_t *sw, bool anim); /** * Set a function which will be called when the switch is toggled by the user @@ -153,7 +137,7 @@ void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time); */ static inline bool lv_sw_get_state(const lv_obj_t *sw) { - return lv_bar_get_value(sw) < LV_SWITCH_SLIDER_ANIM_MAX / 2 ? false : true; + return lv_bar_get_value(sw) < LV_SW_MAX_VALUE / 2 ? false : true; } /** From 13f0b6195333053078cf364093e92953ae9e3837 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 2 Mar 2019 01:49:08 +0100 Subject: [PATCH 081/590] improve LV_PROTECT_PRESS_LOST --- lv_core/lv_indev.c | 25 ++++++++----------------- lv_objx/lv_slider.c | 1 - 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index cb70311daf1a..3dfaabbde102 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -773,27 +773,18 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Forgot the act obj and send a released signal */ if(proc->types.pointer.act_obj != NULL) { /* If the object was protected against press lost then it possible that - * the object is already not pressed but still it is the `types.pointer.act_obj`. - * In this case send the `LV_SIGNAL_RELEASED` if the indev is ON the `types.pointer.act_obj` */ + * the object is already not pressed but still it is the `act_obj`. + * In this case send the `LV_SIGNAL_RELEASED/CLICKED` of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { - /* Search the object on the current current coordinates. - * The start object is the object itself. If not ON it the the result will be NULL*/ - lv_obj_t * obj_on = indev_search_obj(proc, proc->types.pointer.act_obj); - if(obj_on == proc->types.pointer.act_obj) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); - } - } - else { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); - lv_obj_send_event(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST); + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); + if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + } else { + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); } } /* The simple case: `types.pointer.act_obj` was not protected against press lost. - * If it is already not pressed then was handled in `indev_proc_press`*/ + * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 8b803ccb591a..f91a0b7cec17 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -476,7 +476,6 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; - lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); } else if(sign == LV_SIGNAL_CORD_CHG) { /* The knob size depends on slider size. * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/ From e788907d9c43c3e15fe4ba1a6533a8c12ec199dd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 2 Mar 2019 20:53:51 +0100 Subject: [PATCH 082/590] remove free_data/ptr and relpace with user_data --- lv_conf_checker.h | 2 +- lv_conf_templ.h | 3 +- lv_core/lv_obj.c | 99 +++++++++++++++++-------------------------- lv_core/lv_obj.h | 52 ++++++----------------- lv_objx/lv_tileview.c | 84 ++++++++++-------------------------- 5 files changed, 76 insertions(+), 164 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index b818dd1c8564..f899fa5688fe 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -61,7 +61,7 @@ #endif #if LV_MEM_CUSTOM == 0 #ifndef LV_MEM_SIZE -# define LV_MEM_SIZE (16U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ #endif #ifndef LV_MEM_ATTR # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ diff --git a/lv_conf_templ.h b/lv_conf_templ.h index f43efeda6c89..fb60dbe3a9bd 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -182,8 +182,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /*=================== * LV_OBJ SETTINGS *==================*/ -#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ -#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ +typedef void * lv_obj_user_data_t; /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ #define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ /*================== diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index e63d43b2d556..2c057e6f0151 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -164,17 +164,19 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) } else { new_obj->style_p = &lv_style_scr; } - /*Set virtual functions*/ + /*Set the callbacks*/ lv_obj_set_signal_cb(new_obj, lv_obj_signal); lv_obj_set_design_cb(new_obj, lv_obj_design); + new_obj->event_cb = NULL; - /*Set free data*/ -#ifdef LV_OBJ_FREE_NUM_TYPE - new_obj->free_num = 0; + /*Init. user date*/ +#if USE_LV_USER_DATA_SINGLE + memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif - -#if LV_OBJ_FREE_PTR != 0 - new_obj->free_ptr = NULL; +#if USE_LV_USER_DATA_MULTI + memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); + memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); + memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif #if USE_LV_GROUP @@ -232,17 +234,21 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->style_p = &lv_style_plain_color; } - /*Set callbacks*/ + /*Set the callbacks*/ lv_obj_set_signal_cb(new_obj, lv_obj_signal); lv_obj_set_design_cb(new_obj, lv_obj_design); + new_obj->event_cb = NULL; - /*Set free data*/ -#ifdef LV_OBJ_FREE_NUM_TYPE - new_obj->free_num = 0; + /*Init. user date*/ +#if USE_LV_USER_DATA_SINGLE + memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if LV_OBJ_FREE_PTR != 0 - new_obj->free_ptr = NULL; +#if USE_LV_USER_DATA_MULTI + memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); + memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); + memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif + #if USE_LV_GROUP new_obj->group_p = NULL; #endif @@ -261,16 +267,19 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->ext_attr = NULL; } + /*Copy the attributes if required*/ if(copy != NULL) { lv_area_copy(&new_obj->coords, ©->coords); new_obj->ext_size = copy->ext_size; /*Set free data*/ -#ifdef LV_OBJ_FREE_NUM_TYPE - new_obj->free_num = copy->free_num; +#if USE_LV_USER_DATA_SINGLE + memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); #endif -#if LV_OBJ_FREE_PTR != 0 - new_obj->free_ptr = copy->free_ptr; +#if USE_LV_USER_DATA_MULTI + memcpy(&new_obj->event_user_data, ©->event_user_data, sizeof(lv_obj_user_data_t)); + memcpy(&new_obj->signal_user_data, ©->signal_user_data, sizeof(lv_obj_user_data_t)); + memcpy(&new_obj->design_user_data, ©->design_user_data, sizeof(lv_obj_user_data_t)); #endif /*Copy realign*/ @@ -282,7 +291,10 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->realign.auto_realign = copy->realign.auto_realign; #endif - /*Set attributes*/ + /*Only copy the `event_cb`. `signal_cb` and `design_cb` will be copied the the derived object type (e.g. `lv_btn`)*/ + new_obj-> event_cb = copy->event_cb; + + /*Copy attributes*/ new_obj->click = copy->click; new_obj->drag = copy->drag; new_obj->drag_throw = copy->drag_throw; @@ -1150,6 +1162,10 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) void lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { if(obj->event_cb) obj->event_cb(obj, event); + + if(obj->event_parent && obj->par) { + lv_obj_send_event(obj->par, event); + } } /** @@ -1212,32 +1228,6 @@ void lv_obj_refresh_ext_size(lv_obj_t * obj) lv_obj_invalidate(obj); } -#ifdef LV_OBJ_FREE_NUM_TYPE -/** - * Set an application specific number for an object. - * It can help to identify objects in the application. - * @param obj pointer to an object - * @param free_num the new free number - */ -void lv_obj_set_free_num(lv_obj_t * obj, LV_OBJ_FREE_NUM_TYPE free_num) -{ - obj->free_num = free_num; -} -#endif - -#if LV_OBJ_FREE_PTR != 0 -/** - * Set an application specific pointer for an object. - * It can help to identify objects in the application. - * @param obj pointer to an object - * @param free_p the new free pinter - */ -void lv_obj_set_free_ptr(lv_obj_t * obj, void * free_p) -{ - obj->free_ptr = free_p; -} -#endif - #if USE_LV_ANIMATION /** * Animate an object @@ -1745,31 +1735,18 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) } } -#ifdef LV_OBJ_FREE_NUM_TYPE +#if USE_LV_USER_DATA_SINGLE /** - * Get the free number + * Get a pointer to the pbject's user data * @param obj pointer to an object * @return the free number */ -LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(const lv_obj_t * obj) +lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) { - return obj->free_num; + return &obj->user_data; } #endif -#if LV_OBJ_FREE_PTR != 0 -/** - * Get the free pointer - * @param obj pointer to an object - * @return the free pointer - */ -void * lv_obj_get_free_ptr(const lv_obj_t * obj) -{ - return obj->free_ptr; -} -#endif - - #if USE_LV_GROUP /** * Get the group of the object diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 656c5cb39ece..6800914b84a8 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -180,10 +180,6 @@ typedef struct _lv_obj_t void * ext_attr; /*Object type specific extended data*/ lv_style_t * style_p; /*Pointer to the object's style*/ -#if LV_OBJ_FREE_PTR != 0 - void * free_ptr; /*Application specific pointer (set it freely)*/ -#endif - #if USE_LV_GROUP != 0 void * group_p; /*Pointer to the group of the object*/ #endif @@ -195,6 +191,7 @@ typedef struct _lv_obj_t uint8_t hidden :1; /*1: Object is hidden*/ uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/ uint8_t opa_scale_en :1; /*1: opa_scale is set*/ + uint8_t event_parent :1; /*1: Send the object's events to the parent too. */ uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from `lv_protect_t`*/ lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ @@ -203,9 +200,16 @@ typedef struct _lv_obj_t lv_reailgn_t realign; #endif -#ifdef LV_OBJ_FREE_NUM_TYPE - LV_OBJ_FREE_NUM_TYPE free_num; /*Application specific identifier (set it freely)*/ +#if USE_LV_USER_DATA_SINGLE + lv_obj_user_data_t user_data; +#endif + +#if USE_LV_USER_DATA_MULTI + lv_obj_user_data_t event_user_data; + lv_obj_user_data_t signal_user_data; + lv_obj_user_data_t design_user_data; #endif + } lv_obj_t; /*Protect some attributes (max. 8 bit)*/ @@ -539,26 +543,6 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); */ void lv_obj_refresh_ext_size(lv_obj_t * obj); -#ifdef LV_OBJ_FREE_NUM_TYPE -/** - * Set an application specific number for an object. - * It can help to identify objects in the application. - * @param obj pointer to an object - * @param free_num the new free number - */ -void lv_obj_set_free_num(lv_obj_t * obj, LV_OBJ_FREE_NUM_TYPE free_num); -#endif - -#if LV_OBJ_FREE_PTR != 0 -/** - * Set an application specific pointer for an object. - * It can help to identify objects in the application. - * @param obj pointer to an object - * @param free_p the new free pinter - */ -void lv_obj_set_free_ptr(lv_obj_t * obj, void * free_p); -#endif - #if USE_LV_ANIMATION /** * Animate an object @@ -799,22 +783,14 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); */ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); -#ifdef LV_OBJ_FREE_NUM_TYPE -/** - * Get the free number - * @param obj pointer to an object - * @return the free number - */ -LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(const lv_obj_t * obj); -#endif -#if LV_OBJ_FREE_PTR != 0 +#if USE_LV_USER_DATA_SINGLE /** - * Get the free pointer + * Get a pointer to the pbject's user data * @param obj pointer to an object - * @return the free pointer + * @return the free number */ -void * lv_obj_get_free_ptr(const lv_obj_t * obj); +lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); #endif #if USE_LV_GROUP diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index 33c1ac1ea1e3..3e27b2103b5c 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -34,7 +34,7 @@ **********************/ static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * param); static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void * param); +static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event); static void drag_end_handler(lv_obj_t * tileview); static bool set_valid_drag_dirs(lv_obj_t * tileview); @@ -92,6 +92,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_size(new_tileview, LV_DPI * 3, LV_DPI * 3); lv_obj_set_drag_throw(lv_page_get_scrl(new_tileview), false); lv_page_set_scrl_fit(new_tileview, LV_FIT_TIGHT); + lv_obj_set_event_cb(ext->page.scrl, tileview_scrl_event_cb); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { @@ -131,8 +132,9 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) */ void lv_tileview_add_element(lv_obj_t * element) { - lv_obj_set_free_ptr(element, lv_obj_get_signal_func(element)); - lv_obj_set_signal_cb(element, element_signal_func); + /* Let objects eventto propaget to the scrollable part of the tileview. + * It is required the handle dargging of the tileview with the element.*/ + element->event_parent = 1; lv_obj_set_drag_parent(element, true); } @@ -422,76 +424,34 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->drag_hor == 0) lv_obj_set_x(scrl, - ext->act_id.x * lv_obj_get_width(tileview)); } } - return res; - } -/** - * This function is applied called for the elements of the tileview. Used when the element is - * @param element - * @param sign - * @param param - * @return - */ -static lv_res_t element_signal_func(lv_obj_t * element, lv_signal_t sign, void * param) -{ - lv_res_t res; - /* Include the ancient signal function */ - lv_signal_cb_t sign_func = lv_obj_get_free_ptr(element); - res = sign_func(element, sign, param); - if(res != LV_RES_OK) return res; +static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event) +{ + lv_obj_t * tileview = lv_obj_get_parent(scrl); /*Initialize some variables on PRESS*/ - if(sign == LV_SIGNAL_PRESSED) { - /*Get the tileview from the element*/ - lv_obj_t * tileview = lv_obj_get_parent(element); - while(tileview) { - if(lv_obj_get_signal_func(tileview) != lv_tileview_signal) tileview = lv_obj_get_parent(tileview); - else break; - } - - if(tileview) { - lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - ext->drag_hor = 0; - ext->drag_ver = 0; - set_valid_drag_dirs(tileview); - } + if(event == LV_EVENT_PRESSED) { + lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); + ext->drag_hor = 0; + ext->drag_ver = 0; + set_valid_drag_dirs(tileview); } - /*Animate the tabview to the correct location on RELEASE*/ - else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { - - /*Get the tileview from the element*/ - lv_obj_t * tileview = lv_obj_get_parent(element); - while(tileview) { - if(lv_obj_get_signal_func(tileview) != lv_tileview_signal) tileview = lv_obj_get_parent(tileview); - else break; + else if(event == LV_EVENT_PRESS_LOST || event == LV_EVENT_RELEASED) { + /* If the element was dragged and it moved the tileview finish the drag manually to + * let the tileview to finish the move.*/ + lv_indev_t * indev = lv_indev_get_act(); + lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); + if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) { + indev->proc.types.pointer.drag_in_prog = 0; +// if(drag_obj) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, NULL); } - if(tileview) { - /* If the element was dragged and it moved the tileview finish the drag manually to - * let the tileview to finish the move.*/ - lv_indev_t * indev = lv_indev_get_act(); - lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) { - - lv_obj_t * drag_obj = element; - while(lv_obj_get_drag_parent(drag_obj)) { - drag_obj = lv_obj_get_parent(drag_obj); - if(drag_obj == NULL) break; - } - - indev->proc.types.pointer.drag_in_prog = 0; - if(drag_obj) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, NULL); - } - - drag_end_handler(tileview); - } + drag_end_handler(tileview); } - - return res; } /** From 2c4ea022b9e395b3ae1d8718349717f7f3808345 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 3 Mar 2019 04:28:54 +0100 Subject: [PATCH 083/590] lv_page_focus: minor fix --- lv_objx/lv_page.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 6dcf30105a8d..2b6247f6b395 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -409,8 +409,10 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) #else /* Be sure there is no position changing animation in progress * because it can overide the current changes*/ + lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_x); lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_y); lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_pos); + lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_x); lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_y); lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos); #endif From 9d72ced2b646c780271cb043f1fdf3aa1b89aecb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 3 Mar 2019 11:20:49 +0100 Subject: [PATCH 084/590] focus/defocus event updates --- lv_conf_checker.h | 8 -------- lv_conf_checker.py | 2 ++ lv_core/lv_group.c | 29 ++++++++++++++++++++++------- lv_core/lv_group.h | 12 +++++++++++- lv_core/lv_indev.c | 29 ++++++++++++++++++++--------- lv_core/lv_obj.c | 2 ++ lv_hal/lv_hal_indev.h | 5 +++-- lv_objx/lv_page.c | 4 +++- lv_themes/lv_theme_alien.c | 6 ++++-- lv_themes/lv_theme_default.c | 6 ++++-- lv_themes/lv_theme_material.c | 6 ++++-- lv_themes/lv_theme_mono.c | 6 ++++-- lv_themes/lv_theme_nemo.c | 28 ++++++++++++++++++++++++++-- lv_themes/lv_theme_night.c | 6 ++++-- 14 files changed, 109 insertions(+), 40 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index f899fa5688fe..3234833501f4 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -195,8 +195,6 @@ #endif #endif /*LV_TICK_CUSTOM*/ -typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ -typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ /*Log settings*/ #ifndef USE_LV_LOG @@ -332,12 +330,6 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /*=================== * LV_OBJ SETTINGS *==================*/ -#ifndef LV_OBJ_FREE_NUM_TYPE -#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ -#endif -#ifndef LV_OBJ_FREE_PTR -#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ -#endif #ifndef LV_OBJ_REALIGN #define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ #endif diff --git a/lv_conf_checker.py b/lv_conf_checker.py index 64fd2c8c073c..1c9cb421a9f3 100644 --- a/lv_conf_checker.py +++ b/lv_conf_checker.py @@ -42,6 +42,8 @@ fout.write('#ifndef ' + splitted[1] + '\n') fout.write(i + '\n') fout.write('#endif\n') + elif(re.search('^ *typedef .*;.*$', i)): + continue; #igonre typedefs to avoide redeclaration else: fout.write(i + '\n') diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 6a455089061c..c53078399a24 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -23,8 +23,8 @@ /********************** * STATIC PROTOTYPES **********************/ -static void style_mod_def(lv_style_t * style); -static void style_mod_edit_def(lv_style_t * style); +static void style_mod_def(lv_group_t * group, lv_style_t * style); +static void style_mod_edit_def(lv_group_t * group, lv_style_t * style); static void refresh_theme(lv_group_t * g, lv_theme_t * th); static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), void * (*move)(const lv_ll_t *, const void *)); static void lv_group_refocus(lv_group_t * g); @@ -68,6 +68,9 @@ lv_group_t * lv_group_create(void) group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; group->wrap = 1; + + + /*Initialize style modification callbacks from current theme*/ refresh_theme(group, lv_theme_get_current()); @@ -187,6 +190,7 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + lv_obj_send_event(*g->obj_focus, LV_EVENT_DEFOCUSED); lv_obj_invalidate(*g->obj_focus); } @@ -195,6 +199,7 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL); if(g->focus_cb) g->focus_cb(g); + lv_obj_send_event(*g->obj_focus, LV_EVENT_FOCUSED); lv_obj_invalidate(*g->obj_focus); } break; @@ -291,7 +296,10 @@ void lv_group_set_editing(lv_group_t * group, bool edit) group->editing = en_val; lv_obj_t * focused = lv_group_get_focused(group); - if(focused) focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave edit mode*/ + if(focused) { + focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/ + lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + } lv_obj_invalidate(focused); } @@ -341,12 +349,13 @@ void lv_group_set_wrap(lv_group_t * group, bool en) */ lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style) { + /*Load the current style. It will be modified by the callback*/ lv_style_copy(&group->style_tmp, style); if(group->editing) { - if(group->style_mod_edit) group->style_mod_edit(&group->style_tmp); + if(group->style_mod_edit) group->style_mod_edit(group, &group->style_tmp); } else { - if(group->style_mod) group->style_mod(&group->style_tmp); + if(group->style_mod) group->style_mod(group, &group->style_tmp); } return &group->style_tmp; } @@ -455,10 +464,12 @@ void lv_group_report_style_mod(lv_group_t * group) /** * Default style modifier function + * @param group pointer to the caller group * @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN. */ -static void style_mod_def(lv_style_t * style) +static void style_mod_def(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ @@ -484,10 +495,12 @@ static void style_mod_def(lv_style_t * style) /** * Default style modifier function + * @param group pointer to the caller group * @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN. */ -static void style_mod_edit_def(lv_style_t * style) +static void style_mod_edit_def(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ @@ -569,12 +582,14 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(group->obj_focus) { (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED); lv_obj_invalidate(*group->obj_focus); } group->obj_focus = obj_next; (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); + lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); lv_obj_invalidate(*group->obj_focus); if(group->focus_cb) group->focus_cb(group); diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 7b3a6d4826fd..710dd0583948 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -45,7 +45,7 @@ extern "C" { **********************/ struct _lv_group_t; -typedef void (*lv_group_style_mod_func_t)(lv_style_t *); +typedef void (*lv_group_style_mod_func_t)(struct _lv_group_t *, lv_style_t *); typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *); typedef struct _lv_group_t @@ -56,6 +56,16 @@ typedef struct _lv_group_t lv_group_style_mod_func_t style_mod_edit;/*A function which modifies the style of the focused object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ +#if USE_LV_USER_DATA_SINGLE + lv_group_user_data_t user_data; +#endif + +#if USE_LV_USER_DATA_MULTI + lv_group_user_data_t focus_user_data; + lv_group_user_data_t style_mod_user_data; + lv_group_user_data_t style_mod_edit_user_data; +#endif + uint8_t frozen :1; /*1: can't focus to new object*/ uint8_t editing :1; /*1: Edit mode, 0: Navigate mode*/ uint8_t click_focus :1; /*1: If an object in a group is clicked by an indev then it will be focused */ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 3dfaabbde102..107ecc8ebfd4 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -661,6 +661,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST); + if(proc->reset_query != 0) return; } @@ -770,8 +771,8 @@ static void indev_proc_release(lv_indev_proc_t * proc) proc->types.pointer.wait_unil_release = 0; } - /*Forgot the act obj and send a released signal */ - if(proc->types.pointer.act_obj != NULL) { + /*Forget the act obj and send a released signal */ + if(proc->types.pointer.act_obj) { /* If the object was protected against press lost then it possible that * the object is already not pressed but still it is the `act_obj`. * In this case send the `LV_SIGNAL_RELEASED/CLICKED` of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ @@ -800,14 +801,11 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Handle click focus*/ #if USE_LV_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ - lv_group_t * act_g = lv_obj_get_group(proc->types.pointer.act_obj); - if(lv_group_get_editing(act_g)) { - lv_group_set_editing(act_g, false); - } + lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); + if(lv_group_get_editing(g)) lv_group_set_editing(g, false); /*Check, if the parent is in a group focus on it.*/ - if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click protection*/ - lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); + if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click focus protection*/ lv_obj_t * parent = proc->types.pointer.act_obj; while(g == NULL) { @@ -820,13 +818,25 @@ static void indev_proc_release(lv_indev_proc_t * proc) g = lv_obj_get_group(parent); } - if(g != NULL && parent != NULL) + /* If a pareit is in a group make it focused. + * `LV_EVENT_FOCUSED/DEFOCUSED` will be sent by `lv_group_focus_obj`*/ + if(g && parent) { if(lv_group_get_click_focus(g)) { lv_group_focus_obj(parent); } + } } #endif + /* Send defocus to the lastly "active" object and foucus to the new one. + * If the one of them is in group then it possible that `lv_group_focus_obj` alraedy sent + * a focus/defucus signal because of `click focus`*/ + if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { + lv_obj_send_event(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED); + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_FOCUSED); + proc->types.pointer.last_pressed = proc->types.pointer.act_obj; + } + if(proc->reset_query != 0) return; proc->types.pointer.act_obj = NULL; proc->pr_timestamp = 0; @@ -853,6 +863,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev) if(indev->proc.reset_query) { indev->proc.types.pointer.act_obj = NULL; indev->proc.types.pointer.last_obj = NULL; + indev->proc.types.pointer.last_pressed = NULL; indev->proc.types.pointer.drag_limit_out = 0; indev->proc.types.pointer.drag_in_prog = 0; indev->proc.long_pr_sent = 0; diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 2c057e6f0151..9a11b12f7b24 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -1161,6 +1161,8 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) */ void lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { + if(obj == NULL) return; + if(obj->event_cb) obj->event_cb(obj, event); if(obj->event_parent && obj->par) { diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 11b903891f1b..63ad230685fe 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -92,8 +92,9 @@ typedef struct _lv_indev_proc_t { lv_point_t vect; lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/ lv_point_t drag_throw_vect; - struct _lv_obj_t * act_obj; - struct _lv_obj_t * last_obj; + struct _lv_obj_t * act_obj; /*The object being pressed*/ + struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and other post-release event)*/ + struct _lv_obj_t * last_pressed; /*The lastly pressed object*/ /*Flags*/ uint8_t drag_limit_out :1; diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 2b6247f6b395..b2fef00bb453 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -1024,7 +1024,9 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || event == LV_EVENT_LONG_HOVER_IN || - event == LV_EVENT_LONG_HOVER_OUT) + event == LV_EVENT_LONG_HOVER_OUT || + event == LV_EVENT_FOCUSED || + event == LV_EVENT_DEFOCUSED) { lv_obj_send_event(page, event); } diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index c4efff0b3052..a66f15d39232 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -803,8 +803,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -816,8 +817,9 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index fe87a6a6ba93..427532cf5123 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -357,8 +357,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -379,8 +380,9 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index aab198013262..6c8f71183688 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -786,8 +786,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -808,8 +809,9 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index b498db514f5b..51bd7f8e588f 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -414,8 +414,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -430,8 +431,9 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index c2204c2349bc..96a5d6fc26bf 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -777,8 +777,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 style->body.border.width = 2; style->body.border.color = LV_COLOR_SILVER; @@ -796,6 +797,29 @@ static void style_mod(lv_style_t * style) #endif } +static void style_mod_edit(lv_group_t * group, lv_style_t * style) +{ + (void) group; /*Unused*/ +#if LV_COLOR_DEPTH != 1 + /*Make the style to be a little bit orange*/ + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_GREEN; + + /*If not empty or has border then emphasis the border*/ + if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); +#else + style->body.border.opa = LV_OPA_COVER; + style->body.border.color = LV_COLOR_BLACK; + style->body.border.width = 3; +#endif +} + #endif /*USE_LV_GROUP*/ /********************** @@ -855,7 +879,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) #if USE_LV_GROUP theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod; + theme.group.style_mod_edit = style_mod_edit; #endif return &theme; diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index ef01ed4b0d46..5bd30cc905ad 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -697,8 +697,9 @@ static void win_init(void) #if USE_LV_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -713,8 +714,9 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; From e298f493cec6590370899194c247a88ee07d7f5a Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Mon, 4 Mar 2019 12:41:28 +0330 Subject: [PATCH 085/590] add offset function --- lv_objx/lv_img.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index c9fb42875e53..907f09e5dfb9 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -78,6 +78,8 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) ext->w = lv_obj_get_width(new_img); ext->h = lv_obj_get_height(new_img); ext->auto_size = 1; + ext->offset.x = 0; + ext->offset.y = 0; #if USE_LV_MULTI_LANG ext->lang_txt_id = LV_LANG_TXT_ID_NONE; #endif @@ -235,6 +237,19 @@ void lv_img_set_auto_size(lv_obj_t * img, bool en) ext->auto_size = (en == false ? 0 : 1); } +/** + * Set an offset for the source of an image. + * so the image will be displayed from this new origin. + * @param img pointer to an image + * @param en true: auto size enable, false: auto size disable + */ +void lv_img_set_offset(lv_obj_t *img, lv_point_t offset) +{ + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + + if((ext->offset.x < ext->w - 1) && (ext->offset.y < ext->h - 1)) + ext->offset = offset; +} /*===================== * Getter functions @@ -325,6 +340,9 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode lv_obj_get_coords(img, &coords); if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_VARIABLE) { + coords.x1 -= ext->offset.x; + coords.y1 -= ext->offset.y; + LV_LOG_TRACE("lv_img_design: start to draw image"); lv_area_t cords_tmp; cords_tmp.y1 = coords.y1; From c2e3e9d494f6b46f6f8ad65e34ad131044d08b91 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Mon, 4 Mar 2019 12:47:03 +0330 Subject: [PATCH 086/590] add offset member to lv_img_ext_t --- lv_objx/lv_img.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 8ee86167925f..59f42af46def 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -40,7 +40,7 @@ typedef struct /*No inherited ext. because inherited from the base object*/ /*Ext. of ancestor*/ /*New data for this type */ const void * src; /*Image source: Pointer to an array or a file or a symbol*/ - + lv_point_t offset; lv_coord_t w; /*Width of the image (Handled by the library)*/ lv_coord_t h; /*Height of the image (Handled by the library)*/ #if USE_LV_MULTI_LANG @@ -103,6 +103,14 @@ static inline void lv_img_set_file(lv_obj_t * img, const char * fn) */ void lv_img_set_auto_size(lv_obj_t * img, bool autosize_en); + /** + * Set an offset for the source of an image. + * so the image will be displayed from this new origin. + * @param img pointer to an image + * @param en true: auto size enable, false: auto size disable + */ +void lv_img_set_offset(lv_obj_t *img, lv_point_t offset); + /** * Set the style of an image * @param img pointer to an image object From cabbe414a539f65c4f161c9423fed653e938aea3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 4 Mar 2019 16:55:29 +0100 Subject: [PATCH 087/590] Update lv_port_disp_templ.c --- lv_porting/lv_port_disp_templ.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index 39f928d2381b..ace76501f793 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -56,14 +56,19 @@ void lv_port_disp_init(void) /* LittlevGL requires a buffer where it draw the objects. The buffer's has to be greater than 1 display row * * There are three buffering configurations: - * 1. Create ONE buffer some rows: LittlevGL will draw the display's content here and writes it to your display - * 2. Create TWO buffer some rows: LittlevGL will draw the display's content to a buffer and writes it your display. - * You should use DMA to write the buffer's content to the display. - * It will enable LittlevGL to draw the next part of the screen to the other buffer while - * the data is being sent form the first buffer. It makes rendering and flushing parallel. - * 3. Create TWO screen buffer: Similar to 2) but the buffer have to be screen sized. When LittlevGL is ready it will give the - * whole frame to display. This way you only need to change the frame buffer's address instead of - * copying the pixels. + * 1. Create ONE buffer with some rows: + * LittlevGL will draw the display's content here and writes it to your display + * + * 2. Create TWO buffer with some rows: + * LittlevGL will draw the display's content to a buffer and writes it your display. + * You should use DMA to write the buffer's content to the display. + * It will enable LittlevGL to draw the next part of the screen to the other buffer while + * the data is being sent form the first buffer. It makes rendering and flushing parallel. + * + * 3. Create TWO screen-sized buffer: + * Similar to 2) but the buffer have to be screen sized. When LittlevGL is ready it will give the + * whole frame to display. This way you only need to change the frame buffer's address instead of + * copying the pixels. * */ /* Example for 1) */ From 13a336465612a57a233a5ce713219f8785392c69 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 4 Mar 2019 16:56:02 +0100 Subject: [PATCH 088/590] Update lv_port_disp_templ.c --- lv_porting/lv_port_disp_templ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index ace76501f793..c8fc12323aab 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -53,7 +53,7 @@ void lv_port_disp_init(void) * Create a buffer for drawing *----------------------------*/ - /* LittlevGL requires a buffer where it draw the objects. The buffer's has to be greater than 1 display row + /* LittlevGL requires a buffer where it draws the objects. The buffer's has to be greater than 1 display row * * There are three buffering configurations: * 1. Create ONE buffer with some rows: From b30ca0da7667748c416768dcad7eb6c7335d2e82 Mon Sep 17 00:00:00 2001 From: manison Date: Tue, 5 Mar 2019 14:21:13 +0100 Subject: [PATCH 089/590] fix typo in constant name (LV_IMG_CF_UNK*N*OWN) --- lv_draw/lv_draw_img.c | 6 +++--- lv_draw/lv_draw_img.h | 4 ++-- lv_objx/lv_img.c | 2 +- lv_objx/lv_imgbtn.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index f3d73c0b8c7e..ea8ba8ceec80 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -124,7 +124,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { header->w = LV_DPI; header->h = LV_DPI; - header->cf = LV_IMG_CF_UNKOWN; + header->cf = LV_IMG_CF_UNKNOWN; } lv_fs_close(&file); @@ -150,7 +150,7 @@ uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf) uint8_t px_size = 0; switch(cf) { - case LV_IMG_CF_UNKOWN: + case LV_IMG_CF_UNKNOWN: case LV_IMG_CF_RAW: px_size = 0; break; @@ -234,7 +234,7 @@ bool lv_img_color_format_has_alpha(lv_img_cf_t cf) * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") * - or a symbol (e.g. SYMBOL_CLOSE) - * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKOWN + * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src) { diff --git a/lv_draw/lv_draw_img.h b/lv_draw/lv_draw_img.h index 31ed827d97c9..b6ebf814de29 100644 --- a/lv_draw/lv_draw_img.h +++ b/lv_draw/lv_draw_img.h @@ -41,7 +41,7 @@ typedef struct { /*Image color format*/ enum { - LV_IMG_CF_UNKOWN = 0, + LV_IMG_CF_UNKNOWN = 0, LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder function*/ @@ -132,7 +132,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") * - or a symbol (e.g. SYMBOL_CLOSE) - * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKOWN + * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src); diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 981c2919b374..75dec0a259bc 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -74,7 +74,7 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) ext->src = NULL; ext->src_type = LV_IMG_SRC_UNKNOWN; - ext->cf = LV_IMG_CF_UNKOWN; + ext->cf = LV_IMG_CF_UNKNOWN; ext->w = lv_obj_get_width(new_img); ext->h = lv_obj_get_height(new_img); ext->auto_size = 1; diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index ed1d72b426ab..9acacbaba251 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -69,7 +69,7 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) memset(ext->img_src_right, 0, sizeof(ext->img_src_right)); #endif - ext->act_cf = LV_IMG_CF_UNKOWN; + ext->act_cf = LV_IMG_CF_UNKNOWN; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_func(new_imgbtn, lv_imgbtn_signal); @@ -382,7 +382,7 @@ static void refr_img(lv_obj_t * imgbtn) lv_obj_set_height(imgbtn, header.h); #endif } else { - ext->act_cf = LV_IMG_CF_UNKOWN; + ext->act_cf = LV_IMG_CF_UNKNOWN; } lv_obj_invalidate(imgbtn); From cc190bbb2941cce233412c3e78016fd0318624f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Rubio=20G=C3=B3mez?= Date: Wed, 6 Mar 2019 11:14:06 +0100 Subject: [PATCH 090/590] Changed index search by binary search for sparse glyphs fonts. --- lv_misc/lv_font.c | 55 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/lv_misc/lv_font.c b/lv_misc/lv_font.c index 0aa7fe22a6e9..3482a533255b 100644 --- a/lv_misc/lv_font.c +++ b/lv_misc/lv_font.c @@ -7,6 +7,8 @@ * INCLUDES *********************/ #include + #include + #include "lv_font.h" #include "lv_log.h" @@ -22,6 +24,8 @@ * STATIC PROTOTYPES **********************/ +static int lv_font_codeCompare (const void* pRef, const void* pElement); + /********************** * STATIC VARIABLES **********************/ @@ -216,11 +220,17 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - uint32_t i; - for(i = 0; font->unicode_list[i] != 0; i++) { - if(font->unicode_list[i] == unicode_letter) { - return &font->glyph_bitmap[font->glyph_dsc[i].glyph_index]; - } + uint32_t* pUnicode; + + pUnicode = bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t*), + lv_font_codeCompare); + + if (pUnicode != NULL) { + uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); + return &font->glyph_bitmap[font->glyph_dsc[idx].glyph_index]; } return NULL; @@ -254,11 +264,17 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return -1; - uint32_t i; - for(i = 0; font->unicode_list[i] != 0; i++) { - if(font->unicode_list[i] == unicode_letter) { - return font->glyph_dsc[i].w_px; - } + uint32_t* pUnicode; + + pUnicode = bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t*), + lv_font_codeCompare); + + if (pUnicode != NULL) { + uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); + return font->glyph_dsc[idx].w_px; } return -1; @@ -267,3 +283,22 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter /********************** * STATIC FUNCTIONS **********************/ + +/** Code Comparator. + * + * Compares the value of both input arguments. + * + * @param[in] pRef Pointer to the reference. + * @param[in] pElement Pointer to the element to compare. + * + * @return Result of comparison. + * @retval < 0 Reference is greater than element. + * @retval = 0 Reference is equal to element. + * @retval > 0 Reference is less than element. + * + */ +static int lv_font_codeCompare (const void* pRef, + const void* pElement) +{ + return (*(uint32_t*) pRef) - (*(uint32_t*) pElement); +} From fc375fd115ab8d1566759a87de855cbd76ab8cd3 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Wed, 6 Mar 2019 17:33:14 +0330 Subject: [PATCH 091/590] define lv_img_set_offset() with new params --- lv_objx/lv_img.c | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 907f09e5dfb9..0a203eca51f8 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -239,16 +239,49 @@ void lv_img_set_auto_size(lv_obj_t * img, bool en) /** * Set an offset for the source of an image. - * so the image will be displayed from this new origin. + * so the image will be displayed from the new origin. * @param img pointer to an image - * @param en true: auto size enable, false: auto size disable + * @param x: the new offset along x axis. + * @param y: the new offset along y axis. + */ +void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y) +{ + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + + if((x < ext->w - 1) && (y < ext->h - 1)) { + ext->offset.x = x; + ext->offset.y = y; + } +} + +/** + * Set an offset for the source of an image. + * so the image will be displayed from the new origin. + * @param img pointer to an image + * @param x: the new offset along x axis. */ -void lv_img_set_offset(lv_obj_t *img, lv_point_t offset) +void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); - if((ext->offset.x < ext->w - 1) && (ext->offset.y < ext->h - 1)) - ext->offset = offset; + if(x < ext->w - 1) { + ext->offset.x = x; + } +} + +/** + * Set an offset for the source of an image. + * so the image will be displayed from the new origin. + * @param img pointer to an image + * @param y: the new offset along y axis. + */ +void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y) +{ + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + + if(y < ext->h - 1) { + ext->offset.y = y; + } } /*===================== From 0bce1876c198d94b6e4ab39de9217fc87443b864 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Wed, 6 Mar 2019 17:35:14 +0330 Subject: [PATCH 092/590] declare lv_img_set_offset() with new params. --- lv_objx/lv_img.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 59f42af46def..73a0d4246be8 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -103,13 +103,30 @@ static inline void lv_img_set_file(lv_obj_t * img, const char * fn) */ void lv_img_set_auto_size(lv_obj_t * img, bool autosize_en); - /** +/** * Set an offset for the source of an image. - * so the image will be displayed from this new origin. + * so the image will be displayed from the new origin. * @param img pointer to an image - * @param en true: auto size enable, false: auto size disable + * @param x: the new offset along x axis. + * @param y: the new offset along y axis. + */ +void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y); + +/** + * Set an offset for the source of an image. + * so the image will be displayed from the new origin. + * @param img pointer to an image + * @param x: the new offset along x axis. + */ +void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x); + +/** + * Set an offset for the source of an image. + * so the image will be displayed from the new origin. + * @param img pointer to an image + * @param y: the new offset along y axis. */ -void lv_img_set_offset(lv_obj_t *img, lv_point_t offset); +void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y); /** * Set the style of an image From 210de388d9a49a8ead419899e8ec67216ac1f20b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 6 Mar 2019 23:14:35 +0100 Subject: [PATCH 093/590] remove lv_ufs --- lv_conf_templ.h | 3 + lv_misc/lv_ufs.c | 516 ----------------------------------------------- lv_misc/lv_ufs.h | 214 -------------------- lv_objx/lv_img.c | 1 - 4 files changed, 3 insertions(+), 731 deletions(-) delete mode 100644 lv_misc/lv_ufs.c delete mode 100644 lv_misc/lv_ufs.h diff --git a/lv_conf_templ.h b/lv_conf_templ.h index fb60dbe3a9bd..a7a3b3ee382c 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -88,6 +88,9 @@ #define USE_LV_ANIMATION 1 /*1: Enable all animations*/ #define USE_LV_SHADOW 1 /*1: Enable shadows*/ #define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#if USE_LV_GROUP +typedef void * lv_group_user_data_t; +#endif /*USE_LV_GROUP*/ #define USE_LV_GPU 1 /*1: Enable GPU interface*/ #define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ diff --git a/lv_misc/lv_ufs.c b/lv_misc/lv_ufs.c deleted file mode 100644 index 417ed45ef2e4..000000000000 --- a/lv_misc/lv_ufs.c +++ /dev/null @@ -1,516 +0,0 @@ -/** - * @file lv_ufs.c - * Implementation of RAM file system which do NOT support directories. - * The API is compatible with the lv_fs_int module. - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_ufs.h" -#if USE_LV_FILESYSTEM - -#include "lv_ll.h" -#include -#include -#include -#include "lv_gc.h" - -#if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE -#endif /* LV_ENABLE_GC */ - - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ -static lv_ufs_ent_t * lv_ufs_ent_get(const char * fn); -static lv_ufs_ent_t * lv_ufs_ent_new(const char * fn); - -/********************** - * STATIC VARIABLES - **********************/ -static bool inited = false; - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Create a driver for ufs and initialize it. - */ -void lv_ufs_init(void) -{ - lv_ll_init(&LV_GC_ROOT(_lv_file_ll), sizeof(lv_ufs_ent_t)); - - lv_fs_drv_t ufs_drv; - memset(&ufs_drv, 0, sizeof(lv_fs_drv_t)); /*Initialization*/ - - ufs_drv.file_size = sizeof(lv_ufs_file_t); - ufs_drv.rddir_size = sizeof(lv_ufs_dir_t); - ufs_drv.letter = UFS_LETTER; - ufs_drv.ready = lv_ufs_ready; - - ufs_drv.open = lv_ufs_open; - ufs_drv.close = lv_ufs_close; - ufs_drv.remove = lv_ufs_remove; - ufs_drv.read = lv_ufs_read; - ufs_drv.write = lv_ufs_write; - ufs_drv.seek = lv_ufs_seek; - ufs_drv.tell = lv_ufs_tell; - ufs_drv.size = lv_ufs_size; - ufs_drv.trunc = lv_ufs_trunc; - ufs_drv.free_space = lv_ufs_free; - - ufs_drv.dir_open = lv_ufs_dir_open; - ufs_drv.dir_read = lv_ufs_dir_read; - ufs_drv.dir_close = lv_ufs_dir_close; - - lv_fs_add_drv(&ufs_drv); - - inited = true; -} - -/** - * Give the state of the ufs - * @return true if ufs is initialized and can be used else false - */ -bool lv_ufs_ready(void) -{ - return inited; -} - -/** - * Open a file in ufs - * @param file_p pointer to a lv_ufs_file_t variable - * @param fn name of the file. There are no directories so e.g. "myfile.txt" - * @param mode element of 'fs_mode_t' enum or its 'OR' connection (e.g. FS_MODE_WR | FS_MODE_RD) - * @return LV_FS_RES_OK: no error, the file is opened - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_open(void * file_p, const char * fn, lv_fs_mode_t mode) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - lv_ufs_ent_t * ent = lv_ufs_ent_get(fn); - - fp->ent = NULL; - - /*If the file not exists ...*/ - if(ent == NULL) { - if((mode & LV_FS_MODE_WR) != 0) { /*Create the file if opened for write*/ - ent = lv_ufs_ent_new(fn); - if(ent == NULL) return LV_FS_RES_FULL; /*No space for the new file*/ - } else { - return LV_FS_RES_NOT_EX; /*Can not read not existing file*/ - } - } - - /*Can not write already opened and const data files*/ - if((mode & LV_FS_MODE_WR) != 0) { - if(ent->oc != 0) return LV_FS_RES_LOCKED; - if(ent->const_data != 0) return LV_FS_RES_DENIED; - } - - /*No error, the file can be opened*/ - fp->ent = ent; - fp->ar = mode & LV_FS_MODE_RD ? 1 : 0; - fp->aw = mode & LV_FS_MODE_WR ? 1 : 0; - fp->rwp = 0; - ent->oc ++; - - return LV_FS_RES_OK; -} - - -/** - * Create a file with a constant data - * @param fn name of the file (directories are not supported) - * @param const_p pointer to a constant data - * @param len length of the data pointed by 'const_p' in bytes - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_create_const(const char * fn, const void * const_p, uint32_t len) -{ - lv_ufs_file_t file; - lv_fs_res_t res; - - /*Error if the file already exists*/ - res = lv_ufs_open(&file, fn, LV_FS_MODE_RD); - if(res == LV_FS_RES_OK) { - lv_ufs_close(&file); - return LV_FS_RES_DENIED; - } - - lv_ufs_close(&file); - - res = lv_ufs_open(&file, fn, LV_FS_MODE_WR); - if(res != LV_FS_RES_OK) return res; - - lv_ufs_ent_t * ent = file.ent; - - if(ent->data_d != NULL) return LV_FS_RES_DENIED; - - ent->data_d = (void *) const_p; - ent->size = len; - ent->const_data = 1; - - res = lv_ufs_close(&file); - if(res != LV_FS_RES_OK) return res; - - return LV_FS_RES_OK; -} - -/** - * Close an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_close(void * file_p) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - - if(fp->ent == NULL) return LV_FS_RES_OK; - - /*Decrement the Open counter*/ - if(fp->ent->oc > 0) { - fp->ent->oc--; - } - - return LV_FS_RES_OK; -} - -/** - * Remove a file. The file can not be opened. - * @param fn '\0' terminated string - * @return LV_FS_RES_OK: no error, the file is removed - * LV_FS_RES_DENIED: the file was opened, remove failed - */ -lv_fs_res_t lv_ufs_remove(const char * fn) -{ - lv_ufs_ent_t * ent = lv_ufs_ent_get(fn); - if(ent == NULL) return LV_FS_RES_DENIED; /*File not exists*/ - - /*Can not be deleted is opened*/ - if(ent->oc != 0) return LV_FS_RES_DENIED; - - lv_ll_rem(&LV_GC_ROOT(_lv_file_ll), ent); - lv_mem_free(ent->fn_d); - ent->fn_d = NULL; - if(ent->const_data == 0) { - lv_mem_free(ent->data_d); - ent->data_d = NULL; - } - - lv_mem_free(ent); - - return LV_FS_RES_OK; -} - -/** - * Read data from an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param buf pointer to a memory block where to store the read data - * @param btr number of Bytes To Read - * @param br the real number of read bytes (Byte Read) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_read(void * file_p, void * buf, uint32_t btr, uint32_t * br) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - - lv_ufs_ent_t * ent = fp->ent; - *br = 0; - - if(ent->data_d == NULL || ent->size == 0) { /*Don't read empty files*/ - return LV_FS_RES_OK; - } else if(fp->ar == 0) { /*The file is not opened for read*/ - return LV_FS_RES_DENIED; - } - - /*No error, read the file*/ - if(fp->rwp + btr > ent->size) { /*Check too much bytes read*/ - *br = ent->size - fp->rwp; - } else { - *br = btr; - } - - /*Read the data*/ - uint8_t * data8_p; - if(ent->const_data == 0) { - data8_p = (uint8_t *) ent->data_d; - } else { - data8_p = ent->data_d; - } - - data8_p += fp->rwp; - memcpy(buf, data8_p, *br); - - fp->rwp += *br; /*Refresh the read write pointer*/ - - return LV_FS_RES_OK; -} - -/** - * Write data to an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open) - * @param buf pointer to a memory block which content will be written - * @param btw the number Bytes To Write - * @param bw The real number of written bytes (Byte Written) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_write(void * file_p, const void * buf, uint32_t btw, uint32_t * bw) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - *bw = 0; - - if(fp->aw == 0) return LV_FS_RES_DENIED; /*Not opened for write*/ - - lv_ufs_ent_t * ent = fp->ent; - - /*Reallocate data array if it necessary*/ - uint32_t new_size = fp->rwp + btw; - if(new_size > ent->size) { - uint8_t * new_data = lv_mem_realloc(ent->data_d, new_size); - lv_mem_assert(new_data); - if(new_data == NULL) return LV_FS_RES_FULL; /*Cannot allocate the new memory*/ - - ent->data_d = new_data; - ent->size = new_size; - } - - /*Write the file*/ - uint8_t * data8_p = (uint8_t *) ent->data_d; - data8_p += fp->rwp; - memcpy(data8_p, buf, btw); - *bw = btw; - fp->rwp += *bw; - - return LV_FS_RES_OK; -} - -/** - * Set the read write pointer. Also expand the file size if necessary. - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param pos the new position of read write pointer - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_seek(void * file_p, uint32_t pos) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - lv_ufs_ent_t * ent = fp->ent; - - /*Simply move the rwp before EOF*/ - if(pos < ent->size) { - fp->rwp = pos; - } else { /*Expand the file size*/ - if(fp->aw == 0) return LV_FS_RES_DENIED; /*Not opened for write*/ - - uint8_t * new_data = lv_mem_realloc(ent->data_d, pos); - lv_mem_assert(new_data); - if(new_data == NULL) return LV_FS_RES_FULL; /*Out of memory*/ - - ent->data_d = new_data; - ent->size = pos; - fp->rwp = pos; - } - - return LV_FS_RES_OK; -} - -/** - * Give the position of the read write pointer - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param pos_p pointer to to store the result - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_tell(void * file_p, uint32_t * pos_p) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - - *pos_p = fp->rwp; - - return LV_FS_RES_OK; -} - -/** - * Truncate the file size to the current position of the read write pointer - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_trunc(void * file_p) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - lv_ufs_ent_t * ent = fp->ent; - - if(fp->aw == 0) return LV_FS_RES_DENIED; /*Not opened for write*/ - - void * new_data = lv_mem_realloc(ent->data_d, fp->rwp); - lv_mem_assert(new_data); - if(new_data == NULL) return LV_FS_RES_FULL; /*Out of memory*/ - - ent->data_d = new_data; - ent->size = fp->rwp; - - return LV_FS_RES_OK; -} - -/** - * Give the size of the file in bytes - * @param file_p file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param size_p pointer to store the size - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_size(void * file_p, uint32_t * size_p) -{ - lv_ufs_file_t * fp = file_p; /*Convert type*/ - lv_ufs_ent_t * ent = fp->ent; - - *size_p = ent->size; - - return LV_FS_RES_OK; -} - -/** - * Initialize a lv_ufs_read_dir_t variable to directory reading - * @param rddir_p pointer to a 'ufs_dir_t' variable - * @param path uFS doesn't support folders so it has to be "" - * @return LV_FS_RES_OK or any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_open(void * rddir_p, const char * path) -{ - lv_ufs_dir_t * lv_ufs_rddir_p = rddir_p; - - lv_ufs_rddir_p->last_ent = NULL; - - if(path[0] != '\0') return LV_FS_RES_NOT_EX; /*Must be "" */ - else return LV_FS_RES_OK; -} - -/** - * Read the next file name - * @param dir_p pointer to an initialized 'ufs_dir_t' variable - * @param fn pointer to buffer to sore the file name - * @return LV_FS_RES_OK or any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_read(void * dir_p, char * fn) -{ - lv_ufs_dir_t * ufs_dir_p = dir_p; - - if(ufs_dir_p->last_ent == NULL) { - ufs_dir_p->last_ent = lv_ll_get_head(&LV_GC_ROOT(_lv_file_ll)); - } else { - ufs_dir_p->last_ent = lv_ll_get_next(&LV_GC_ROOT(_lv_file_ll), ufs_dir_p->last_ent); - } - - if(ufs_dir_p->last_ent != NULL) { - strcpy(fn, ufs_dir_p->last_ent->fn_d); - } else { - fn[0] = '\0'; - } - - return LV_FS_RES_OK; -} - -/** - * Close the directory reading - * @param rddir_p pointer to an initialized 'ufs_dir_t' variable - * @return LV_FS_RES_OK or any error from lv__fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_close(void * rddir_p) -{ - (void)rddir_p; - return LV_FS_RES_OK; -} - -/** - * Give the size of a drive - * @param total_p pointer to store the total size [kB] - * @param free_p pointer to store the free site [kB] - * @return LV_FS_RES_OK or any error from 'lv_fs_res_t' - */ -lv_fs_res_t lv_ufs_free(uint32_t * total_p, uint32_t * free_p) -{ - -#if LV_MEM_CUSTOM == 0 - lv_mem_monitor_t mon; - - lv_mem_monitor(&mon); - *total_p = LV_MEM_SIZE >> 10; /*Convert bytes to kB*/ - *free_p = mon.free_size >> 10; -#else - *free_p = 0; -#endif - return LV_FS_RES_OK; -} - -/********************** - * STATIC FUNCTIONS - **********************/ - -/** - * Gives the lv_ufs_entry from a filename - * @param fn filename ('\0' terminated string) - * @return pointer to the dynamically allocated entry with 'fn' filename. - * NULL if no entry found with that name. - */ -static lv_ufs_ent_t * lv_ufs_ent_get(const char * fn) -{ - lv_ufs_ent_t * fp; - - LL_READ(LV_GC_ROOT(_lv_file_ll), fp) { - if(strcmp(fp->fn_d, fn) == 0) { - return fp; - } - } - - return NULL; -} - -/** - * Create a new entry with 'fn' filename - * @param fn filename ('\0' terminated string) - * @return pointer to the dynamically allocated new entry. - * NULL if no space for the entry. - */ -static lv_ufs_ent_t * lv_ufs_ent_new(const char * fn) -{ - lv_ufs_ent_t * new_ent = NULL; - new_ent = lv_ll_ins_head(&LV_GC_ROOT(_lv_file_ll)); /*Create a new file*/ - lv_mem_assert(new_ent); - if(new_ent == NULL) return NULL; - - new_ent->fn_d = lv_mem_alloc(strlen(fn) + 1); /*Save the name*/ - lv_mem_assert(new_ent->fn_d); - if(new_ent->fn_d == NULL) return NULL; - - strcpy(new_ent->fn_d, fn); - new_ent->data_d = NULL; - new_ent->size = 0; - new_ent->oc = 0; - new_ent->const_data = 0; - - return new_ent; -} - -#endif /*USE_LV_FILESYSTEM*/ - diff --git a/lv_misc/lv_ufs.h b/lv_misc/lv_ufs.h deleted file mode 100644 index 3ee1fa3fc9a9..000000000000 --- a/lv_misc/lv_ufs.h +++ /dev/null @@ -1,214 +0,0 @@ -/** - * @file lv_ufs.h - * Implementation of RAM file system which do NOT support directories. - * The API is compatible with the lv_fs_int module. - */ - -#ifndef LV_UFS_H -#define LV_UFS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../lv_conf.h" -#endif - -#if USE_LV_FILESYSTEM - -#include -#include "lv_fs.h" -#include "lv_mem.h" - -/********************* - * DEFINES - *********************/ -#define UFS_LETTER 'U' - -/********************** - * TYPEDEFS - **********************/ -/*Description of a file entry */ -typedef struct -{ - char * fn_d; - void * data_d; - uint32_t size; /*Data length in bytes*/ - uint16_t oc; /*Open Count*/ - uint8_t const_data :1; -} lv_ufs_ent_t; - -/*File descriptor, used to handle opening an entry more times simultaneously - Contains unique informations about the specific opening*/ -typedef struct -{ - lv_ufs_ent_t* ent; /*Pointer to the entry*/ - uint32_t rwp; /*Read Write Pointer*/ - uint8_t ar :1; /*1: Access for read is enabled */ - uint8_t aw :1; /*1: Access for write is enabled */ -} lv_ufs_file_t; - -/* Read directory descriptor. - * It is used to to iterate through the entries in a directory*/ -typedef struct -{ - lv_ufs_ent_t * last_ent; -} lv_ufs_dir_t; - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/** - * Create a driver for ufs and initialize it. - */ -void lv_ufs_init(void); - -/** - * Give the state of the ufs - * @return true if ufs is initialized and can be used else false - */ -bool lv_ufs_ready(void); - -/** - * Open a file in ufs - * @param file_p pointer to a lv_ufs_file_t variable - * @param fn name of the file. There are no directories so e.g. "myfile.txt" - * @param mode element of 'fs_mode_t' enum or its 'OR' connection (e.g. FS_MODE_WR | FS_MODE_RD) - * @return LV_FS_RES_OK: no error, the file is opened - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_open (void * file_p, const char * fn, lv_fs_mode_t mode); - -/** - * Create a file with a constant data - * @param fn name of the file (directories are not supported) - * @param const_p pointer to a constant data - * @param len length of the data pointed by 'const_p' in bytes - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_create_const(const char * fn, const void * const_p, uint32_t len); - -/** - * Close an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_close (void * file_p); - -/** - * Remove a file. The file can not be opened. - * @param fn '\0' terminated string - * @return LV_FS_RES_OK: no error, the file is removed - * LV_FS_RES_DENIED: the file was opened, remove failed - */ -lv_fs_res_t lv_ufs_remove(const char * fn); - -/** - * Read data from an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param buf pointer to a memory block where to store the read data - * @param btr number of Bytes To Read - * @param br the real number of read bytes (Byte Read) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_read (void * file_p, void * buf, uint32_t btr, uint32_t * br); - -/** - * Write data to an opened file - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open) - * @param buf pointer to a memory block which content will be written - * @param btw the number Bytes To Write - * @param bw The real number of written bytes (Byte Written) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_write (void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - -/** - * Set the read write pointer. Also expand the file size if necessary. - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param pos the new position of read write pointer - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_seek (void * file_p, uint32_t pos); - -/** - * Give the position of the read write pointer - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param pos_p pointer to to store the result - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_tell (void * file_p, uint32_t * pos_p); - -/** - * Truncate the file size to the current position of the read write pointer - * @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_trunc (void * file_p); - -/** - * Give the size of the file in bytes - * @param file_p file_p pointer to an 'ufs_file_t' variable. (opened with lv_ufs_open ) - * @param size_p pointer to store the size - * @return LV_FS_RES_OK: no error, the file is read - * any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_size (void * file_p, uint32_t * size_p); - -/** - * Initialize a lv_ufs_read_dir_t variable to directory reading - * @param rddir_p pointer to a 'ufs_read_dir_t' variable - * @param path uFS doesn't support folders so it has to be "" - * @return LV_FS_RES_OK or any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_open(void * rddir_p, const char * path); - -/** - * Read the next file name - * @param dir_p pointer to an initialized 'ufs_read_dir_t' variable - * @param fn pointer to buffer to sore the file name - * @return LV_FS_RES_OK or any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_read(void * dir_p, char * fn); - -/** - * Close the directory reading - * @param rddir_p pointer to an initialized 'ufs_read_dir_t' variable - * @return LV_FS_RES_OK or any error from lv_fs_res_t enum - */ -lv_fs_res_t lv_ufs_dir_close(void * rddir_p); - -/** - * Give the size of a drive - * @param total_p pointer to store the total size [kB] - * @param free_p pointer to store the free site [kB] - * @return LV_FS_RES_OK or any error from 'fs_res_t' - */ -lv_fs_res_t lv_ufs_free (uint32_t * total_p, uint32_t * free_p); - -/********************** - * MACROS - **********************/ - -#endif /*USE_LV_FILESYSTEM*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 21986bbd1bb3..72d19229be2f 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -17,7 +17,6 @@ #include "../lv_core/lv_i18n.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_fs.h" -#include "../lv_misc/lv_ufs.h" #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_log.h" From 702fb9565d04a3c49f9dd214f7d0ec74b23efecc Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Mar 2019 00:05:16 +0100 Subject: [PATCH 094/590] Add LV_ prefix to symbols and vhange USE_LV_... to LV_USE_... --- lv_conf_checker.h | 292 +++++++++++----------- lv_conf_templ.h | 166 ++++++------- lv_core/lv_group.c | 18 +- lv_core/lv_group.h | 16 +- lv_core/lv_i18n.c | 4 +- lv_core/lv_i18n.h | 4 +- lv_core/lv_indev.c | 83 ++++--- lv_core/lv_indev.h | 2 +- lv_core/lv_obj.c | 97 +++++--- lv_core/lv_obj.h | 15 +- lv_core/lv_refr.c | 6 +- lv_core/lv_style.c | 8 +- lv_core/lv_style.h | 4 +- lv_draw/lv_draw_basic.c | 4 +- lv_draw/lv_draw_img.c | 34 +-- lv_draw/lv_draw_img.h | 2 +- lv_draw/lv_draw_rect.c | 6 +- lv_draw/lv_draw_triangle.c | 4 +- lv_draw/lv_draw_triangle.h | 4 +- lv_fonts/lv_font_builtin.c | 56 ++--- lv_fonts/lv_font_builtin.h | 34 +-- lv_fonts/lv_font_dejavu_10.c | 28 +-- lv_fonts/lv_font_dejavu_10_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_10_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_20.c | 28 +-- lv_fonts/lv_font_dejavu_20_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_20_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_30.c | 28 +-- lv_fonts/lv_font_dejavu_30_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_30_latin_sup.c | 28 +-- lv_fonts/lv_font_dejavu_40.c | 28 +-- lv_fonts/lv_font_dejavu_40_cyrillic.c | 28 +-- lv_fonts/lv_font_dejavu_40_latin_sup.c | 28 +-- lv_fonts/lv_font_monospace_8.c | 28 +-- lv_fonts/lv_font_symbol_10.c | 28 +-- lv_fonts/lv_font_symbol_20.c | 28 +-- lv_fonts/lv_font_symbol_30.c | 28 +-- lv_fonts/lv_font_symbol_40.c | 28 +-- lv_hal/lv_hal_disp.c | 2 +- lv_hal/lv_hal_disp.h | 6 +- lv_hal/lv_hal_indev.c | 6 +- lv_hal/lv_hal_indev.h | 13 +- lv_misc/lv_anim.c | 6 +- lv_misc/lv_anim.h | 4 +- lv_misc/lv_fs.c | 8 +- lv_misc/lv_fs.h | 4 +- lv_misc/lv_ll.h | 4 +- lv_misc/lv_log.c | 4 +- lv_misc/lv_log.h | 10 +- lv_misc/lv_mem.h | 2 +- lv_misc/lv_symbol_def.h | 328 ++++++++++++------------- lv_misc/lv_task.c | 2 +- lv_objx/lv_arc.c | 2 +- lv_objx/lv_arc.h | 4 +- lv_objx/lv_bar.c | 10 +- lv_objx/lv_bar.h | 4 +- lv_objx/lv_btn.c | 44 ++-- lv_objx/lv_btn.h | 8 +- lv_objx/lv_btnm.c | 6 +- lv_objx/lv_btnm.h | 4 +- lv_objx/lv_calendar.c | 8 +- lv_objx/lv_calendar.h | 4 +- lv_objx/lv_canvas.c | 2 +- lv_objx/lv_canvas.h | 4 +- lv_objx/lv_cb.c | 6 +- lv_objx/lv_cb.h | 12 +- lv_objx/lv_chart.c | 14 +- lv_objx/lv_chart.h | 4 +- lv_objx/lv_cont.c | 16 +- lv_objx/lv_cont.h | 4 +- lv_objx/lv_ddlist.c | 22 +- lv_objx/lv_ddlist.h | 12 +- lv_objx/lv_gauge.c | 2 +- lv_objx/lv_gauge.h | 8 +- lv_objx/lv_img.c | 8 +- lv_objx/lv_img.h | 4 +- lv_objx/lv_imgbtn.c | 2 +- lv_objx/lv_imgbtn.h | 8 +- lv_objx/lv_kb.c | 22 +- lv_objx/lv_kb.h | 12 +- lv_objx/lv_label.c | 14 +- lv_objx/lv_label.h | 4 +- lv_objx/lv_led.c | 2 +- lv_objx/lv_led.h | 4 +- lv_objx/lv_line.c | 2 +- lv_objx/lv_line.h | 4 +- lv_objx/lv_list.c | 40 +-- lv_objx/lv_list.h | 22 +- lv_objx/lv_lmeter.c | 4 +- lv_objx/lv_lmeter.h | 4 +- lv_objx/lv_mbox.c | 12 +- lv_objx/lv_mbox.h | 16 +- lv_objx/lv_objx_templ.c | 2 +- lv_objx/lv_objx_templ.h | 4 +- lv_objx/lv_page.c | 16 +- lv_objx/lv_page.h | 8 +- lv_objx/lv_preload.c | 6 +- lv_objx/lv_preload.h | 12 +- lv_objx/lv_roller.c | 16 +- lv_objx/lv_roller.h | 8 +- lv_objx/lv_slider.c | 8 +- lv_objx/lv_slider.h | 8 +- lv_objx/lv_spinbox.c | 2 +- lv_objx/lv_spinbox.h | 8 +- lv_objx/lv_sw.c | 20 +- lv_objx/lv_sw.h | 12 +- lv_objx/lv_ta.c | 18 +- lv_objx/lv_ta.h | 12 +- lv_objx/lv_table.c | 2 +- lv_objx/lv_table.h | 8 +- lv_objx/lv_tabview.c | 14 +- lv_objx/lv_tabview.h | 12 +- lv_objx/lv_tileview.c | 8 +- lv_objx/lv_tileview.h | 4 +- lv_objx/lv_win.c | 18 +- lv_objx/lv_win.h | 28 +-- lv_porting/lv_port_disp_templ.c | 8 +- lv_porting/lv_port_indev_templ.c | 2 +- lv_themes/lv_theme.c | 4 +- lv_themes/lv_theme.h | 62 ++--- lv_themes/lv_theme_alien.c | 76 +++--- lv_themes/lv_theme_alien.h | 2 +- lv_themes/lv_theme_default.c | 52 ++-- lv_themes/lv_theme_default.h | 2 +- lv_themes/lv_theme_material.c | 66 ++--- lv_themes/lv_theme_material.h | 2 +- lv_themes/lv_theme_mono.c | 56 ++--- lv_themes/lv_theme_mono.h | 2 +- lv_themes/lv_theme_nemo.c | 74 +++--- lv_themes/lv_theme_nemo.h | 2 +- lv_themes/lv_theme_night.c | 66 ++--- lv_themes/lv_theme_night.h | 2 +- lv_themes/lv_theme_templ.c | 62 ++--- lv_themes/lv_theme_templ.h | 2 +- lv_themes/lv_theme_zen.c | 66 ++--- lv_themes/lv_theme_zen.h | 2 +- 136 files changed, 1505 insertions(+), 1477 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index 3234833501f4..969d79873c83 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -110,7 +110,7 @@ #define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ #endif #ifndef LV_INDEV_POINT_MARKER -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ +#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ #endif #ifndef LV_INDEV_DRAG_LIMIT #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ @@ -143,29 +143,29 @@ #endif /*Feature usage*/ -#ifndef USE_LV_ANIMATION -#define USE_LV_ANIMATION 1 /*1: Enable all animations*/ +#ifndef LV_USE_ANIMATION +#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ #endif -#ifndef USE_LV_SHADOW -#define USE_LV_SHADOW 1 /*1: Enable shadows*/ +#ifndef LV_USE_SHADOW +#define LV_USE_SHADOW 1 /*1: Enable shadows*/ #endif -#ifndef USE_LV_GROUP -#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#ifndef LV_USE_GROUP +#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ #endif -#ifndef USE_LV_GPU -#define USE_LV_GPU 1 /*1: Enable GPU interface*/ +#ifndef LV_USE_GPU +#define LV_USE_GPU 1 /*1: Enable GPU interface*/ #endif -#ifndef USE_LV_FILESYSTEM -#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ +#ifndef LV_USE_FILESYSTEM +#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #endif -#ifndef USE_LV_I18N -#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ +#ifndef LV_USE_I18N +#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ #endif -#ifndef USE_LV_USER_DATA_SINGLE -#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#ifndef LV_USE_USER_DATA_SINGLE +#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ #endif -#ifndef USE_LV_USER_DATA_MULTI -#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#ifndef LV_USE_USER_DATA_MULTI +#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ #endif /*Compiler settings*/ @@ -197,10 +197,10 @@ /*Log settings*/ -#ifndef USE_LV_LOG -#define USE_LV_LOG 1 /*Enable/disable the log module*/ +#ifndef LV_USE_LOG +#define LV_USE_LOG 1 /*Enable/disable the log module*/ #endif -#if USE_LV_LOG +#if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events @@ -215,7 +215,7 @@ #ifndef LV_LOG_PRINTF # define LV_LOG_PRINTF 0 #endif -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ /*================ * THEME USAGE @@ -224,29 +224,29 @@ #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #endif -#ifndef USE_LV_THEME_TEMPL -#define USE_LV_THEME_TEMPL 0 /*Just for test*/ +#ifndef LV_USE_THEME_TEMPL +#define LV_USE_THEME_TEMPL 0 /*Just for test*/ #endif -#ifndef USE_LV_THEME_DEFAULT -#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#ifndef LV_USE_THEME_DEFAULT +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ #endif -#ifndef USE_LV_THEME_ALIEN -#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/ +#ifndef LV_USE_THEME_ALIEN +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ #endif -#ifndef USE_LV_THEME_NIGHT -#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/ +#ifndef LV_USE_THEME_NIGHT +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ #endif -#ifndef USE_LV_THEME_MONO -#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#ifndef LV_USE_THEME_MONO +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ #endif -#ifndef USE_LV_THEME_MATERIAL -#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#ifndef LV_USE_THEME_MATERIAL +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ #endif -#ifndef USE_LV_THEME_ZEN -#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#ifndef LV_USE_THEME_ZEN +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ #endif -#ifndef USE_LV_THEME_NEMO -#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#ifndef LV_USE_THEME_NEMO +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ #endif /*================== @@ -256,60 +256,60 @@ /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#ifndef USE_LV_FONT_DEJAVU_10 -#define USE_LV_FONT_DEJAVU_10 0 +#ifndef LV_USE_FONT_DEJAVU_10 +#define LV_USE_FONT_DEJAVU_10 0 #endif -#ifndef USE_LV_FONT_DEJAVU_10_LATIN_SUP -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_10_LATIN_SUP +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_10_CYRILLIC -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_10_CYRILLIC +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_10 -#define USE_LV_FONT_SYMBOL_10 0 +#ifndef LV_USE_FONT_SYMBOL_10 +#define LV_USE_FONT_SYMBOL_10 0 #endif -#ifndef USE_LV_FONT_DEJAVU_20 -#define USE_LV_FONT_DEJAVU_20 4 +#ifndef LV_USE_FONT_DEJAVU_20 +#define LV_USE_FONT_DEJAVU_20 4 #endif -#ifndef USE_LV_FONT_DEJAVU_20_LATIN_SUP -#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 +#ifndef LV_USE_FONT_DEJAVU_20_LATIN_SUP +#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 #endif -#ifndef USE_LV_FONT_DEJAVU_20_CYRILLIC -#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 +#ifndef LV_USE_FONT_DEJAVU_20_CYRILLIC +#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 #endif -#ifndef USE_LV_FONT_SYMBOL_20 -#define USE_LV_FONT_SYMBOL_20 4 +#ifndef LV_USE_FONT_SYMBOL_20 +#define LV_USE_FONT_SYMBOL_20 4 #endif -#ifndef USE_LV_FONT_DEJAVU_30 -#define USE_LV_FONT_DEJAVU_30 0 +#ifndef LV_USE_FONT_DEJAVU_30 +#define LV_USE_FONT_DEJAVU_30 0 #endif -#ifndef USE_LV_FONT_DEJAVU_30_LATIN_SUP -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_30_LATIN_SUP +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_30_CYRILLIC -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_30_CYRILLIC +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_30 -#define USE_LV_FONT_SYMBOL_30 0 +#ifndef LV_USE_FONT_SYMBOL_30 +#define LV_USE_FONT_SYMBOL_30 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40 -#define USE_LV_FONT_DEJAVU_40 0 +#ifndef LV_USE_FONT_DEJAVU_40 +#define LV_USE_FONT_DEJAVU_40 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40_LATIN_SUP -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 +#ifndef LV_USE_FONT_DEJAVU_40_LATIN_SUP +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 #endif -#ifndef USE_LV_FONT_DEJAVU_40_CYRILLIC -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 +#ifndef LV_USE_FONT_DEJAVU_40_CYRILLIC +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 #endif -#ifndef USE_LV_FONT_SYMBOL_40 -#define USE_LV_FONT_SYMBOL_40 0 +#ifndef LV_USE_FONT_SYMBOL_40 +#define LV_USE_FONT_SYMBOL_40 0 #endif -#ifndef USE_LV_FONT_MONOSPACE_8 -#define USE_LV_FONT_MONOSPACE_8 1 +#ifndef LV_USE_FONT_MONOSPACE_8 +#define LV_USE_FONT_MONOSPACE_8 1 #endif /* Optionally declare your custom fonts here. @@ -346,20 +346,20 @@ *****************/ /*Label (dependencies: -*/ -#ifndef USE_LV_LABEL -#define USE_LV_LABEL 1 +#ifndef LV_USE_LABEL +#define LV_USE_LABEL 1 #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #ifndef LV_LABEL_SCROLL_SPEED # define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif #endif /*Image (dependencies: lv_label*/ -#ifndef USE_LV_IMG -#define USE_LV_IMG 1 +#ifndef LV_USE_IMG +#define LV_USE_IMG 1 #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 #ifndef LV_IMG_CF_INDEXED # define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ #endif @@ -369,13 +369,13 @@ #endif /*Line (dependencies: -*/ -#ifndef USE_LV_LINE -#define USE_LV_LINE 1 +#ifndef LV_USE_LINE +#define LV_USE_LINE 1 #endif /*Arc (dependencies: -)*/ -#ifndef USE_LV_ARC -#define USE_LV_ARC 1 +#ifndef LV_USE_ARC +#define LV_USE_ARC 1 #endif /******************* @@ -383,35 +383,35 @@ *******************/ /*Container (dependencies: -*/ -#ifndef USE_LV_CONT -#define USE_LV_CONT 1 +#ifndef LV_USE_CONT +#define LV_USE_CONT 1 #endif /*Page (dependencies: lv_cont)*/ -#ifndef USE_LV_PAGE -#define USE_LV_PAGE 1 +#ifndef LV_USE_PAGE +#define LV_USE_PAGE 1 #endif /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#ifndef USE_LV_WIN -#define USE_LV_WIN 1 +#ifndef LV_USE_WIN +#define LV_USE_WIN 1 #endif /*Tab (dependencies: lv_page, lv_btnm)*/ -#ifndef USE_LV_TABVIEW -#define USE_LV_TABVIEW 1 +#ifndef LV_USE_TABVIEW +#define LV_USE_TABVIEW 1 #endif -# if USE_LV_TABVIEW != 0 +# if LV_USE_TABVIEW != 0 #ifndef LV_TABVIEW_ANIM_TIME # define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif #endif /*Tileview (dependencies: lv_page) */ -#ifndef USE_LV_TILEVIEW -#define USE_LV_TILEVIEW 1 +#ifndef LV_USE_TILEVIEW +#define LV_USE_TILEVIEW 1 #endif -#if USE_LV_TILEVIEW +#if LV_USE_TILEVIEW #ifndef LV_TILEVIEW_ANIM_TIME # define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif @@ -422,50 +422,50 @@ *************************/ /*Bar (dependencies: -)*/ -#ifndef USE_LV_BAR -#define USE_LV_BAR 1 +#ifndef LV_USE_BAR +#define LV_USE_BAR 1 #endif /*Line meter (dependencies: *;)*/ -#ifndef USE_LV_LMETER -#define USE_LV_LMETER 1 +#ifndef LV_USE_LMETER +#define LV_USE_LMETER 1 #endif /*Gauge (dependencies:lv_bar, lv_lmeter)*/ -#ifndef USE_LV_GAUGE -#define USE_LV_GAUGE 1 +#ifndef LV_USE_GAUGE +#define LV_USE_GAUGE 1 #endif /*Chart (dependencies: -)*/ -#ifndef USE_LV_CHART -#define USE_LV_CHART 1 +#ifndef LV_USE_CHART +#define LV_USE_CHART 1 #endif /*Table (dependencies: lv_label)*/ -#ifndef USE_LV_TABLE -#define USE_LV_TABLE 1 +#ifndef LV_USE_TABLE +#define LV_USE_TABLE 1 #endif -#if USE_LV_TABLE +#if LV_USE_TABLE #ifndef LV_TABLE_COL_MAX # define LV_TABLE_COL_MAX 12 #endif #endif /*LED (dependencies: -)*/ -#ifndef USE_LV_LED -#define USE_LV_LED 1 +#ifndef LV_USE_LED +#define LV_USE_LED 1 #endif /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#ifndef USE_LV_MBOX -#define USE_LV_MBOX 1 +#ifndef LV_USE_MBOX +#define LV_USE_MBOX 1 #endif /*Text area (dependencies: lv_label, lv_page)*/ -#ifndef USE_LV_TA -#define USE_LV_TA 1 +#ifndef LV_USE_TA +#define LV_USE_TA 1 #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 #ifndef LV_TA_CURSOR_BLINK_TIME # define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ #endif @@ -475,20 +475,20 @@ #endif /*Spinbox (dependencies: lv_ta)*/ -#ifndef USE_LV_SPINBOX -#define USE_LV_SPINBOX 1 +#ifndef LV_USE_SPINBOX +#define LV_USE_SPINBOX 1 #endif /*Calendar (dependencies: -)*/ -#ifndef USE_LV_CALENDAR -#define USE_LV_CALENDAR 1 +#ifndef LV_USE_CALENDAR +#define LV_USE_CALENDAR 1 #endif /*Preload (dependencies: lv_arc)*/ -#ifndef USE_LV_PRELOAD -#define USE_LV_PRELOAD 1 +#ifndef LV_USE_PRELOAD +#define LV_USE_PRELOAD 1 #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 #ifndef LV_PRELOAD_DEF_ARC_LENGTH # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ #endif @@ -501,86 +501,86 @@ #endif /*Canvas (dependencies: lv_img)*/ -#ifndef USE_LV_CANVAS -#define USE_LV_CANVAS 1 +#ifndef LV_USE_CANVAS +#define LV_USE_CANVAS 1 #endif /************************* * User input objects *************************/ /*Button (dependencies: lv_cont*/ -#ifndef USE_LV_BTN -#define USE_LV_BTN 1 +#ifndef LV_USE_BTN +#define LV_USE_BTN 1 #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 #ifndef LV_BTN_INK_EFFECT -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/ +# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ #endif #endif /*Image Button (dependencies: lv_btn*/ -#ifndef USE_LV_IMGBTN -#define USE_LV_IMGBTN 1 +#ifndef LV_USE_IMGBTN +#define LV_USE_IMGBTN 1 #endif -#if USE_LV_IMGBTN +#if LV_USE_IMGBTN #ifndef LV_IMGBTN_TILED # define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ #endif #endif /*Button matrix (dependencies: -)*/ -#ifndef USE_LV_BTNM -#define USE_LV_BTNM 1 +#ifndef LV_USE_BTNM +#define LV_USE_BTNM 1 #endif /*Keyboard (dependencies: lv_btnm)*/ -#ifndef USE_LV_KB -#define USE_LV_KB 1 +#ifndef LV_USE_KB +#define LV_USE_KB 1 #endif /*Check box (dependencies: lv_btn, lv_label)*/ -#ifndef USE_LV_CB -#define USE_LV_CB 1 +#ifndef LV_USE_CB +#define LV_USE_CB 1 #endif /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#ifndef USE_LV_LIST -#define USE_LV_LIST 1 +#ifndef LV_USE_LIST +#define LV_USE_LIST 1 #endif -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 #ifndef LV_LIST_FOCUS_TIME # define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ #endif #endif /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#ifndef USE_LV_DDLIST -#define USE_LV_DDLIST 1 +#ifndef LV_USE_DDLIST +#define LV_USE_DDLIST 1 #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 #ifndef LV_DDLIST_ANIM_TIME # define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ #endif #endif /*Roller (dependencies: lv_ddlist)*/ -#ifndef USE_LV_ROLLER -#define USE_LV_ROLLER 1 +#ifndef LV_USE_ROLLER +#define LV_USE_ROLLER 1 #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 #ifndef LV_ROLLER_ANIM_TIME # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif #endif /*Slider (dependencies: lv_bar)*/ -#ifndef USE_LV_SLIDER -#define USE_LV_SLIDER 1 +#ifndef LV_USE_SLIDER +#define LV_USE_SLIDER 1 #endif /*Switch (dependencies: lv_slider)*/ -#ifndef USE_LV_SW -#define USE_LV_SW 1 +#ifndef LV_USE_SW +#define LV_USE_SW 1 #endif /************************* diff --git a/lv_conf_templ.h b/lv_conf_templ.h index a7a3b3ee382c..14918fb28f5d 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -71,7 +71,7 @@ /*Input device settings*/ #define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/ +#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ #define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ #define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ #define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ @@ -85,17 +85,17 @@ #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ /*Feature usage*/ -#define USE_LV_ANIMATION 1 /*1: Enable all animations*/ -#define USE_LV_SHADOW 1 /*1: Enable shadows*/ -#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/ -#if USE_LV_GROUP +#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ +#define LV_USE_SHADOW 1 /*1: Enable shadows*/ +#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#if LV_USE_GROUP typedef void * lv_group_user_data_t; -#endif /*USE_LV_GROUP*/ -#define USE_LV_GPU 1 /*1: Enable GPU interface*/ -#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define USE_LV_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ -#define USE_LV_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ -#define USE_LV_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#endif /*LV_USE_GROUP*/ +#define LV_USE_GPU 1 /*1: Enable GPU interface*/ +#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ +#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ +#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ /*Compiler settings*/ #define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ @@ -114,8 +114,8 @@ typedef void * lv_disp_drv_user_data_t; /*Type of user data in t typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ /*Log settings*/ -#define USE_LV_LOG 1 /*Enable/disable the log module*/ -#if USE_LV_LOG +#define LV_USE_LOG 1 /*Enable/disable the log module*/ +#if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information * LV_LOG_LEVEL_INFO Log important events @@ -126,21 +126,21 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /* 1: Print the log with 'printf'; 0: user need to register a callback*/ # define LV_LOG_PRINTF 0 -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ /*================ * THEME USAGE *================*/ #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ -#define USE_LV_THEME_TEMPL 0 /*Just for test*/ -#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ -#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/ -#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/ -#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/ -#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ -#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */ -#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_TEMPL 0 /*Just for test*/ +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ /*================== * FONT USAGE @@ -149,27 +149,27 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#define USE_LV_FONT_DEJAVU_10 0 -#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_10_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_10 0 +#define LV_USE_FONT_DEJAVU_10 0 +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_10 0 -#define USE_LV_FONT_DEJAVU_20 4 -#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4 -#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4 -#define USE_LV_FONT_SYMBOL_20 4 +#define LV_USE_FONT_DEJAVU_20 4 +#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 +#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 +#define LV_USE_FONT_SYMBOL_20 4 -#define USE_LV_FONT_DEJAVU_30 0 -#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_30_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_30 0 +#define LV_USE_FONT_DEJAVU_30 0 +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_30 0 -#define USE_LV_FONT_DEJAVU_40 0 -#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 0 -#define USE_LV_FONT_DEJAVU_40_CYRILLIC 0 -#define USE_LV_FONT_SYMBOL_40 0 +#define LV_USE_FONT_DEJAVU_40 0 +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 +#define LV_USE_FONT_SYMBOL_40 0 -#define USE_LV_FONT_MONOSPACE_8 1 +#define LV_USE_FONT_MONOSPACE_8 1 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -200,46 +200,46 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data *****************/ /*Label (dependencies: -*/ -#define USE_LV_LABEL 1 -#if USE_LV_LABEL != 0 +#define LV_USE_LABEL 1 +#if LV_USE_LABEL != 0 # define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif /*Image (dependencies: lv_label*/ -#define USE_LV_IMG 1 -#if USE_LV_IMG != 0 +#define LV_USE_IMG 1 +#if LV_USE_IMG != 0 # define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ # define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/ #endif /*Line (dependencies: -*/ -#define USE_LV_LINE 1 +#define LV_USE_LINE 1 /*Arc (dependencies: -)*/ -#define USE_LV_ARC 1 +#define LV_USE_ARC 1 /******************* * Container objects *******************/ /*Container (dependencies: -*/ -#define USE_LV_CONT 1 +#define LV_USE_CONT 1 /*Page (dependencies: lv_cont)*/ -#define USE_LV_PAGE 1 +#define LV_USE_PAGE 1 /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#define USE_LV_WIN 1 +#define LV_USE_WIN 1 /*Tab (dependencies: lv_page, lv_btnm)*/ -#define USE_LV_TABVIEW 1 -# if USE_LV_TABVIEW != 0 +#define LV_USE_TABVIEW 1 +# if LV_USE_TABVIEW != 0 # define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif /*Tileview (dependencies: lv_page) */ -#define USE_LV_TILEVIEW 1 -#if USE_LV_TILEVIEW +#define LV_USE_TILEVIEW 1 +#if LV_USE_TILEVIEW # define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif @@ -248,100 +248,100 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data *************************/ /*Bar (dependencies: -)*/ -#define USE_LV_BAR 1 +#define LV_USE_BAR 1 /*Line meter (dependencies: *;)*/ -#define USE_LV_LMETER 1 +#define LV_USE_LMETER 1 /*Gauge (dependencies:lv_bar, lv_lmeter)*/ -#define USE_LV_GAUGE 1 +#define LV_USE_GAUGE 1 /*Chart (dependencies: -)*/ -#define USE_LV_CHART 1 +#define LV_USE_CHART 1 /*Table (dependencies: lv_label)*/ -#define USE_LV_TABLE 1 -#if USE_LV_TABLE +#define LV_USE_TABLE 1 +#if LV_USE_TABLE # define LV_TABLE_COL_MAX 12 #endif /*LED (dependencies: -)*/ -#define USE_LV_LED 1 +#define LV_USE_LED 1 /*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#define USE_LV_MBOX 1 +#define LV_USE_MBOX 1 /*Text area (dependencies: lv_label, lv_page)*/ -#define USE_LV_TA 1 -#if USE_LV_TA != 0 +#define LV_USE_TA 1 +#if LV_USE_TA != 0 # define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ # define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif /*Spinbox (dependencies: lv_ta)*/ -#define USE_LV_SPINBOX 1 +#define LV_USE_SPINBOX 1 /*Calendar (dependencies: -)*/ -#define USE_LV_CALENDAR 1 +#define LV_USE_CALENDAR 1 /*Preload (dependencies: lv_arc)*/ -#define USE_LV_PRELOAD 1 -#if USE_LV_PRELOAD != 0 +#define LV_USE_PRELOAD 1 +#if LV_USE_PRELOAD != 0 # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ # define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ # define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC #endif /*Canvas (dependencies: lv_img)*/ -#define USE_LV_CANVAS 1 +#define LV_USE_CANVAS 1 /************************* * User input objects *************************/ /*Button (dependencies: lv_cont*/ -#define USE_LV_BTN 1 -#if USE_LV_BTN != 0 -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/ +#define LV_USE_BTN 1 +#if LV_USE_BTN != 0 +# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ #endif /*Image Button (dependencies: lv_btn*/ -#define USE_LV_IMGBTN 1 -#if USE_LV_IMGBTN +#define LV_USE_IMGBTN 1 +#if LV_USE_IMGBTN # define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ #endif /*Button matrix (dependencies: -)*/ -#define USE_LV_BTNM 1 +#define LV_USE_BTNM 1 /*Keyboard (dependencies: lv_btnm)*/ -#define USE_LV_KB 1 +#define LV_USE_KB 1 /*Check box (dependencies: lv_btn, lv_label)*/ -#define USE_LV_CB 1 +#define LV_USE_CB 1 /*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#define USE_LV_LIST 1 -#if USE_LV_LIST != 0 +#define LV_USE_LIST 1 +#if LV_USE_LIST != 0 # define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ #endif /*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#define USE_LV_DDLIST 1 -#if USE_LV_DDLIST != 0 +#define LV_USE_DDLIST 1 +#if LV_USE_DDLIST != 0 # define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ #endif /*Roller (dependencies: lv_ddlist)*/ -#define USE_LV_ROLLER 1 -#if USE_LV_ROLLER != 0 +#define LV_USE_ROLLER 1 +#if LV_USE_ROLLER != 0 # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif /*Slider (dependencies: lv_bar)*/ -#define USE_LV_SLIDER 1 +#define LV_USE_SLIDER 1 /*Switch (dependencies: lv_slider)*/ -#define USE_LV_SW 1 +#define LV_USE_SW 1 /************************* * Non-user section diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index ed1636aca728..d44940258ac8 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_group.h" -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 #include "../lv_themes/lv_theme.h" #include #include "../lv_misc/lv_gc.h" @@ -71,11 +71,11 @@ lv_group_t * lv_group_create(void) group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; group->wrap = 1; -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&group->user_data, 0, sizeof(lv_group_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&group->focus_user_data, 0, sizeof(lv_group_user_data_t)); memset(&group->style_mod_user_data, 0, sizeof(lv_group_user_data_t)); memset(&group->style_mod_edit_user_data, 0, sizeof(lv_group_user_data_t)); @@ -102,7 +102,7 @@ void lv_group_del(lv_group_t * group) /*Remove the objects from the group*/ lv_obj_t ** obj; - LL_READ(group->obj_ll, obj) { + LV_LL_READ(group->obj_ll, obj) { (*obj)->group_p = NULL; } @@ -171,7 +171,7 @@ void lv_group_remove_obj(lv_obj_t * obj) /*Search the object and remove it from its group */ lv_obj_t ** i; - LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) { if(*i == obj) { lv_ll_rem(&g->obj_ll, i); lv_mem_free(i); @@ -196,7 +196,7 @@ void lv_group_focus_obj(lv_obj_t * obj) lv_group_set_editing(g, false); lv_obj_t ** i; - LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) { if(*i == obj) { if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { @@ -374,7 +374,7 @@ lv_obj_t * lv_group_get_focused(const lv_group_t * group) return *group->obj_focus; } -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the group's user data * @param group pointer to an group @@ -467,7 +467,7 @@ void lv_group_report_style_mod(lv_group_t * group) } lv_group_t * i; - LL_READ(LV_GC_ROOT(_lv_group_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_group_ll), i) { refresh_theme(i, th); } } @@ -645,4 +645,4 @@ static void obj_to_foreground(lv_obj_t * obj) } } -#endif /*USE_LV_GROUP != 0*/ +#endif /*LV_USE_GROUP != 0*/ diff --git a/lv_core/lv_group.h b/lv_core/lv_group.h index 7e3099c60ade..4cb730f2b5d0 100644 --- a/lv_core/lv_group.h +++ b/lv_core/lv_group.h @@ -39,7 +39,7 @@ extern "C" { #define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ #define LV_GROUP_KEY_END 3 /*0x03, ETX*/ -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 /********************** * TYPEDEFS **********************/ @@ -56,11 +56,11 @@ typedef struct _lv_group_t lv_group_style_mod_func_t style_mod_edit;/*A function which modifies the style of the focused object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_group_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_group_user_data_t focus_user_data; lv_group_user_data_t style_mod_user_data; lv_group_user_data_t style_mod_edit_user_data; @@ -210,16 +210,14 @@ lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style); */ lv_obj_t * lv_group_get_focused(const lv_group_t * group); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the group's user data * @param group pointer to an group * @return pointer to the user data */ -lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group) -{ - return &group->user_data; -} +lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group); + #endif /** @@ -274,7 +272,7 @@ void lv_group_report_style_mod(lv_group_t * group); * MACROS **********************/ -#endif /*USE_LV_GROUP != 0*/ +#endif /*LV_USE_GROUP != 0*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index f1816c0f2e4c..0e4abce3e10e 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_i18n.h" -#if USE_LV_I18N +#if LV_USE_I18N #include "lv_obj.h" #include "../lv_misc/lv_gc.h" @@ -253,4 +253,4 @@ static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const c } -#endif /*USE_LV_I18N*/ +#endif /*LV_USE_I18N*/ diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 15b822c41b94..7bfdcef3e726 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_I18N +#if LV_USE_I18N #include @@ -99,7 +99,7 @@ const char * lv_i18n_get_current_local(void); * MACROS **********************/ -#endif /*USE_LV_I18N*/ +#endif /*LV_USE_I18N*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 107ecc8ebfd4..dd6b9d622303 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -143,12 +143,12 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) { if(indev->driver.type != LV_INDEV_TYPE_POINTER) return; - indev->custom_data.cursor = cur_obj; - lv_obj_set_parent(indev->custom_data.cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->custom_data.cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); + indev->cursor = cur_obj; + lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); + lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device @@ -157,7 +157,7 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) { if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) { - indev->custom_data.group = group; + indev->group = group; } } #endif @@ -171,7 +171,7 @@ void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group) void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) { if(indev->driver.type == LV_INDEV_TYPE_BUTTON) { - indev->custom_data.btn_points = points; + indev->btn_points = points; } } @@ -326,7 +326,6 @@ static void indev_proc_task(void * param) if(i->proc.state == LV_INDEV_STATE_PR) { i->last_activity_time = lv_tick_get(); } - if(i->driver.type == LV_INDEV_TYPE_POINTER) { indev_pointer_proc(i, &data); } else if(i->driver.type == LV_INDEV_TYPE_KEYPAD) { @@ -357,10 +356,10 @@ static void indev_proc_task(void * param) static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ - if(i->custom_data.cursor != NULL && + if(i->cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) { - lv_obj_set_pos(i->custom_data.cursor, data->point.x, data->point.y); + lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } i->proc.types.pointer.act_point.x = data->point.x; @@ -383,8 +382,8 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) { -#if USE_LV_GROUP - lv_group_t * g = i->custom_data.group; +#if LV_USE_GROUP + lv_group_t * g = i->group; if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); @@ -399,8 +398,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Simulate a press on the object if ENTER was pressed*/ if(data->key == LV_GROUP_KEY_ENTER) { lv_obj_send_event(focused, LV_EVENT_PRESSED); - lv_group_send_data(g, LV_GROUP_KEY_ENTER); if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { @@ -492,8 +491,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { -#if USE_LV_GROUP - lv_group_t * g = i->custom_data.group; +#if LV_USE_GROUP + lv_group_t * g = i->group; if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); @@ -534,7 +533,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); - if(lv_group_get_editing(g) == true || editable == false) lv_obj_send_event(focused, LV_EVENT_PRESSED); + if(lv_group_get_editing(g) == true || editable == false) { + lv_obj_send_event(focused, LV_EVENT_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } } /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { @@ -547,11 +549,13 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) else { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ } } /*If not editable then just send a long press signal*/ else { lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.long_pr_sent = 1; } @@ -563,7 +567,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_CLICKED); - else lv_obj_send_event(focused, LV_EVENT_RELEASED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_RELEASED); + if(i->proc.reset_query) return; /*The object might be deleted*/ if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -572,7 +579,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ lv_obj_send_event(focused, LV_EVENT_CLICKED); - if(i->proc.reset_query) return; /*The object might be deleted*/ } } @@ -581,8 +587,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_set_editing(g, true); /*Set edit mode*/ } - if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/ - i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } @@ -603,8 +607,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) { - i->proc.types.pointer.act_point.x = i->custom_data.btn_points[data->btn_id].x; - i->proc.types.pointer.act_point.y = i->custom_data.btn_points[data->btn_id].y; + i->proc.types.pointer.act_point.x = i->btn_points[data->btn_id].x; + i->proc.types.pointer.act_point.y = i->btn_points[data->btn_id].y; /*Still the same point is pressed*/ if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && @@ -624,6 +628,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) /** * Process the pressed state of LV_INDEV_TYPE_POINER input devices * @param indev pointer to an input device 'proc' + * @return LV_RES_OK: no indev reset required; LV_RES_INV: indev reset is required */ static void indev_proc_press(lv_indev_proc_t * proc) { @@ -661,8 +666,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST); - - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ } proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ @@ -699,7 +703,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSED); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ } } @@ -723,7 +727,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSING); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ indev_drag(proc); if(proc->reset_query != 0) return; @@ -734,7 +738,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ /*Mark the signal sending to do not send it again*/ proc->long_pr_sent = 1; @@ -749,7 +753,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT); - if(proc->reset_query != 0) return; + if(proc->reset_query) return; /*The object might be deleted*/ proc->longpr_rep_timestamp = lv_tick_get(); } @@ -775,31 +779,36 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj) { /* If the object was protected against press lost then it possible that * the object is already not pressed but still it is the `act_obj`. - * In this case send the `LV_SIGNAL_RELEASED/CLICKED` of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ + * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } + + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } - /* The simple case: `types.pointer.act_obj` was not protected against press lost. + /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } + + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ + } if(proc->reset_query != 0) return; /*Handle click focus*/ -#if USE_LV_GROUP +#if LV_USE_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); if(lv_group_get_editing(g)) lv_group_set_editing(g, false); @@ -833,7 +842,11 @@ static void indev_proc_release(lv_indev_proc_t * proc) * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { lv_obj_send_event(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED); + if(proc->reset_query) return; /*Not so strict as it's only the previous object and indev not uses it.*/ + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_FOCUSED); + if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.last_pressed = proc->types.pointer.act_obj; } @@ -891,7 +904,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { found_p = indev_search_obj(proc, i); /*If a child was found then break*/ diff --git a/lv_core/lv_indev.h b/lv_core/lv_indev.h index 19b047ce2e35..2e55c2371d47 100644 --- a/lv_core/lv_indev.h +++ b/lv_core/lv_indev.h @@ -74,7 +74,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable); */ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 23809745191d..aef9cb28abeb 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -48,9 +48,9 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ - -static bool _lv_initialized = false; - +static bool lv_initialized = false; +static lv_obj_t * obj_act_event; /*Stores the which event is currently being executed*/ +static bool obj_act_event_deleted; /*Shows that the object was deleted in the event function*/ /********************** * MACROS **********************/ @@ -65,7 +65,7 @@ static bool _lv_initialized = false; void lv_init(void) { /* Do nothing if already initialized */ - if (_lv_initialized) { + if (lv_initialized) { LV_LOG_WARN("lv_init: already inited"); return; } @@ -76,16 +76,16 @@ void lv_init(void) lv_mem_init(); lv_task_init(); -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_init(); #endif lv_font_init(); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_init(); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_init(); #endif @@ -104,7 +104,7 @@ void lv_init(void) lv_indev_init(); #endif - _lv_initialized = true; + lv_initialized = true; LV_LOG_INFO("lv_init ready"); } @@ -168,16 +168,16 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->event_cb = NULL; /*Init. user date*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP new_obj->group_p = NULL; #endif /*Set attributes*/ @@ -238,16 +238,16 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->event_cb = NULL; /*Init. user date*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP new_obj->group_p = NULL; #endif @@ -271,10 +271,10 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->ext_size = copy->ext_size; /*Set free data*/ -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI memcpy(&new_obj->event_user_data, ©->event_user_data, sizeof(lv_obj_user_data_t)); memcpy(&new_obj->signal_user_data, ©->signal_user_data, sizeof(lv_obj_user_data_t)); memcpy(&new_obj->design_user_data, ©->design_user_data, sizeof(lv_obj_user_data_t)); @@ -306,7 +306,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->style_p = copy->style_p; -#if USE_LV_GROUP +#if LV_USE_GROUP /*Add to the same group*/ if(copy->group_p != NULL) { lv_group_add_obj(copy->group_p, new_obj); @@ -339,13 +339,15 @@ lv_res_t lv_obj_del(lv_obj_t * obj) { lv_obj_invalidate(obj); + if(obj_act_event == obj) obj_act_event_deleted = true; + /*Delete from the group*/ -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p != NULL) lv_group_remove_obj(obj); #endif /*Remove the animations from this object*/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(obj, NULL); #endif @@ -374,12 +376,15 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } /* Reset all input devices if - * the currently pressed object is deleted*/ + * the object to delete is used*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + if(lv_group_get_focused(indev->group) == obj) { + lv_indev_reset(indev); + } indev = lv_indev_next(indev); } @@ -613,7 +618,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) /*Tell the children the parent's size has changed*/ lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } @@ -1013,7 +1018,7 @@ void lv_obj_report_style_mod(lv_style_t * style) while(d) { lv_obj_t * i; - LL_READ(d->scr_ll, i) { + LV_LL_READ(d->scr_ll, i) { if(i->style_p == style || style == NULL) { lv_obj_refresh_style(i); } @@ -1156,16 +1161,25 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) * Send an event to the object * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -void lv_obj_send_event(lv_obj_t * obj, lv_event_t event) +lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { - if(obj == NULL) return; + if(obj == NULL) return LV_RES_OK; + obj_act_event = obj; + obj_act_event_deleted = false; if(obj->event_cb) obj->event_cb(obj, event); + obj_act_event = NULL; + + if(obj_act_event_deleted) return LV_RES_INV; if(obj->event_parent && obj->par) { - lv_obj_send_event(obj->par, event); + lv_res_t res = lv_obj_send_event(obj->par, event); + if(res != LV_RES_OK) return LV_RES_INV; } + + return LV_RES_OK; } /** @@ -1228,7 +1242,7 @@ void lv_obj_refresh_ext_size(lv_obj_t * obj) lv_obj_invalidate(obj); } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Animate an object * @param obj pointer to an object to animate @@ -1344,9 +1358,9 @@ lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) else scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/ lv_disp_t * d; - LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { + LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { lv_obj_t * s; - LL_READ(d->scr_ll, s) { + LV_LL_READ(d->scr_ll, s) { if(s == scr) return d; } } @@ -1419,7 +1433,7 @@ uint16_t lv_obj_count_children(const lv_obj_t * obj) lv_obj_t * i; uint16_t cnt = 0; - LL_READ(obj->child_ll, i) cnt++; + LV_LL_READ(obj->child_ll, i) cnt++; return cnt; } @@ -1530,7 +1544,7 @@ lv_style_t * lv_obj_get_style(const lv_obj_t * obj) while(par) { if(par->style_p) { if(par->style_p->glass == 0) { -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 style_act = par->style_p; #else /*Is a parent is focused then use then focused style*/ @@ -1547,7 +1561,7 @@ lv_style_t * lv_obj_get_style(const lv_obj_t * obj) par = par->par; } } -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p) { if(lv_group_get_focused(obj->group_p) == obj) { style_act = lv_group_mod_style(obj->group_p, style_act); @@ -1735,7 +1749,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) } } -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the object's user data * @param obj pointer to an object @@ -1747,7 +1761,7 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) } #endif -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object @@ -1871,7 +1885,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { i->coords.x1 += x_diff; i->coords.y1 += y_diff; i->coords.x2 += x_diff; @@ -1889,7 +1903,7 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor static void report_style_mod_core(void * style_p, lv_obj_t * obj) { lv_obj_t * i; - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { if(i->style_p == style_p || style_p == NULL) { refresh_children_style(i); lv_obj_refresh_style(i); @@ -1925,6 +1939,9 @@ static void refresh_children_style(lv_obj_t * obj) */ static void delete_children(lv_obj_t * obj) { + + if(obj_act_event == obj) obj_act_event_deleted = true; + lv_obj_t * i; lv_obj_t * i_next; i = lv_ll_get_head(&(obj->child_ll)); @@ -1932,7 +1949,7 @@ static void delete_children(lv_obj_t * obj) /*Remove from the group; remove before transversing children so that * the object still has access to all children during the * LV_SIGNAL_DEFOCUS call*/ -#if USE_LV_GROUP +#if LV_USE_GROUP if(obj->group_p != NULL) lv_group_remove_obj(obj); #endif @@ -1948,18 +1965,20 @@ static void delete_children(lv_obj_t * obj) } /*Remove the animations from this object*/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(obj, NULL); #endif - /* Reset the input devices if - * the currently pressed object is deleted*/ + * the object to delete is used*/ lv_indev_t * indev = lv_indev_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + if(lv_group_get_focused(indev->group) == obj) { + lv_indev_reset(indev); + } indev = lv_indev_next(indev); } diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index aec434436386..769c0a2be598 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -180,7 +180,7 @@ typedef struct _lv_obj_t void * ext_attr; /*Object type specific extended data*/ lv_style_t * style_p; /*Pointer to the object's style*/ -#if USE_LV_GROUP != 0 +#if LV_USE_GROUP != 0 void * group_p; /*Pointer to the group of the object*/ #endif /*Attributes and states*/ @@ -200,11 +200,11 @@ typedef struct _lv_obj_t lv_reailgn_t realign; #endif -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_obj_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_obj_user_data_t event_user_data; lv_obj_user_data_t signal_user_data; lv_obj_user_data_t design_user_data; @@ -500,8 +500,9 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb); * Send an event to the object * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -void lv_obj_send_event(lv_obj_t * obj, lv_event_t event); +lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event); /** * Set the a signal function of an object. Used internally by the library. @@ -543,7 +544,7 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); */ void lv_obj_refresh_ext_size(lv_obj_t * obj); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Animate an object * @param obj pointer to an object to animate @@ -784,7 +785,7 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the object's user data * @param obj pointer to an object @@ -793,7 +794,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); #endif -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the group of the object * @param obj pointer to an object diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 1d50ee17b59a..52c5afa1b14c 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -145,7 +145,7 @@ static void lv_refr_task(void * param) uint32_t start = lv_tick_get(); - LL_READ(LV_GC_ROOT(_lv_disp_ll), disp_refr) { + LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), disp_refr) { LV_LOG_TRACE("lv_refr_task: refreshing a display"); lv_refr_join_area(); @@ -388,7 +388,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If this object is fully cover the draw area check the children too */ if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) { - LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) { found_p = lv_refr_get_top_obj(area_p, i); /*If a children is ok then break*/ @@ -498,7 +498,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) lv_area_t mask_child; /*Mask from obj and its child*/ lv_obj_t * child_p; lv_area_t child_area; - LL_READ_BACK(obj->child_ll, child_p) { + LV_LL_READ_BACK(obj->child_ll, child_p) { lv_obj_get_coords(child_p, &child_area); ext_size = child_p->ext_size; child_area.x1 -= ext_size; diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 487d2e1f102f..1e04116c0647 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -22,7 +22,7 @@ /********************** * TYPEDEFS **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION typedef struct { lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it will be modified too*/ lv_style_t style_end; @@ -34,7 +34,7 @@ typedef struct { /********************** * STATIC PROTOTYPES **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val); static void style_animation_common_end_cb(void * ptr); #endif @@ -268,7 +268,7 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * } } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Create an animation from a pre-configured 'lv_style_anim_t' variable @@ -312,7 +312,7 @@ void * lv_style_anim_create(lv_style_anim_t * anim) /********************** * STATIC FUNCTIONS **********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Used by the style animations to set the values of a style according to start and end style. * @param dsc the 'animated variable' set by lv_style_anim_create() diff --git a/lv_core/lv_style.h b/lv_core/lv_style.h index 38f714d265e0..0f0accdf7067 100644 --- a/lv_core/lv_style.h +++ b/lv_core/lv_style.h @@ -102,7 +102,7 @@ typedef struct } line; } lv_style_t; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION typedef struct { const lv_style_t * style_start; /*Pointer to the starting style*/ const lv_style_t * style_end; /*Pointer to the destination style*/ @@ -158,7 +158,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src); */ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Create an animation from a pre-configured 'lv_style_anim_t' variable diff --git a/lv_draw/lv_draw_basic.c b/lv_draw/lv_draw_basic.c index 31b8ba481082..65d5517bc085 100644 --- a/lv_draw/lv_draw_basic.c +++ b/lv_draw/lv_draw_basic.c @@ -143,7 +143,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, vdb_buf_tmp += vdb_width * vdb_rel_a.y1; -#if USE_LV_GPU +#if LV_USE_GPU static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ static lv_coord_t last_width = -1; @@ -442,7 +442,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, /*Normal native VDB*/ else { for(row = masked_a.y1; row <= masked_a.y2; row++) { -#if USE_LV_GPU +#if LV_USE_GPU if(disp->driver.mem_blend == false) { sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } else { diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index ea8ba8ceec80..026de429b67e 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -37,7 +37,7 @@ static const void * decoder_src; static lv_img_src_t decoder_src_type; static lv_img_header_t decoder_header; static const lv_style_t * decoder_style; -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM static lv_fs_file_t decoder_file; #endif #if LV_IMG_CF_INDEXED @@ -110,7 +110,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) header->h = ((lv_img_dsc_t *)src)->header.h; header->cf = ((lv_img_dsc_t *)src)->header.cf; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM else if(src_type == LV_IMG_SRC_FILE) { lv_fs_file_t file; lv_fs_res_t res; @@ -233,7 +233,7 @@ bool lv_img_color_format_has_alpha(lv_img_cf_t cf) * @param src pointer to an image source: * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") - * - or a symbol (e.g. SYMBOL_CLOSE) + * - or a symbol (e.g. LV_SYMBOL_CLOSE) * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src) @@ -383,14 +383,14 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * /*Open the file if it's a file*/ if(decoder_src_type == LV_IMG_SRC_FILE) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD); if(res != LV_FS_RES_OK) { LV_LOG_WARN("Built-in image decoder can't open the file"); return LV_IMG_DECODER_OPEN_FAIL; } #else - LV_LOG_WARN("Image built-in decoder can read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } @@ -414,7 +414,7 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_color32_t palette_file[256]; #endif @@ -424,12 +424,12 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * if(decoder_src_type == LV_IMG_SRC_FILE) { /*Read the palette from file*/ -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, 4); /*Skip the header*/ lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); palette_p = palette_file; #else - LV_LOG_WARN("Image built-in decoder can read the palette because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { @@ -478,7 +478,7 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t } if(decoder_src_type == LV_IMG_SRC_FILE) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); lv_fs_res_t res; @@ -516,7 +516,7 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t return false; } #else - LV_LOG_WARN("Image built-in decoder can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can't read file because LV_USE_FILESYSTEM = 0"); return false; #endif } else if(decoder_src_type == LV_IMG_SRC_VARIABLE) { @@ -551,7 +551,7 @@ static void lv_img_decoder_close(void) /*It was opened with built-in decoder*/ if(decoder_src) { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM if(decoder_src_type == LV_IMG_SRC_FILE) { lv_fs_close(&decoder_file); } @@ -626,7 +626,7 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l break; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else @@ -638,12 +638,12 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l const lv_img_dsc_t * img_dsc = decoder_src; data_tmp = img_dsc->data + ofs; } else { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in alpha line reader can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -713,7 +713,7 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, break; } -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else @@ -725,12 +725,12 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, const lv_img_dsc_t * img_dsc = decoder_src; data_tmp = img_dsc->data + ofs; } else { -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in indexed line reader can't read file because USE_LV_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif diff --git a/lv_draw/lv_draw_img.h b/lv_draw/lv_draw_img.h index b6ebf814de29..4f8137676245 100644 --- a/lv_draw/lv_draw_img.h +++ b/lv_draw/lv_draw_img.h @@ -131,7 +131,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, * @param src pointer to an image source: * - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code) * - a path to a file (e.g. "S:/folder/image.bin") - * - or a symbol (e.g. SYMBOL_CLOSE) + * - or a symbol (e.g. LV_SYMBOL_CLOSE) * @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKNOWN */ lv_img_src_t lv_img_src_get_type(const void * src); diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index 7bde1d8831fb..1f0202797493 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -30,7 +30,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -#if USE_LV_SHADOW +#if LV_USE_SHADOW static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); @@ -66,7 +66,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; -#if USE_LV_SHADOW +#if LV_USE_SHADOW if(style->body.shadow.width != 0) { lv_draw_shadow(coords, mask, style, opa_scale); } @@ -1025,7 +1025,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } -#if USE_LV_SHADOW +#if LV_USE_SHADOW /** * Draw a shadow diff --git a/lv_draw/lv_draw_triangle.c b/lv_draw/lv_draw_triangle.c index 954d3541b164..24c0f390dd5e 100644 --- a/lv_draw/lv_draw_triangle.c +++ b/lv_draw/lv_draw_triangle.c @@ -33,7 +33,7 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * GLOBAL FUNCTIONS **********************/ -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points @@ -145,7 +145,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo **********************/ -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * Swap two points * p1 pointer to the first point diff --git a/lv_draw/lv_draw_triangle.h b/lv_draw/lv_draw_triangle.h index c3c6208dac76..af5c4891fe95 100644 --- a/lv_draw/lv_draw_triangle.h +++ b/lv_draw/lv_draw_triangle.h @@ -27,9 +27,9 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ /*Experimental use for 3D modeling*/ -#define USE_LV_TRIANGLE 1 +#define LV_USE_TRIANGLE 1 -#if USE_LV_TRIANGLE != 0 +#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points diff --git a/lv_fonts/lv_font_builtin.c b/lv_fonts/lv_font_builtin.c index bce3c87bd179..5236ae78672a 100644 --- a/lv_fonts/lv_font_builtin.c +++ b/lv_fonts/lv_font_builtin.c @@ -38,20 +38,20 @@ void lv_font_builtin_init(void) { /*DEJAVU 10*/ -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10, NULL); #endif -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10_latin_sup, &lv_font_dejavu_10); #else lv_font_add(&lv_font_dejavu_10_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_dejavu_10_cyrillic, &lv_font_dejavu_10); #else lv_font_add(&lv_font_dejavu_10_cyrillic, NULL); @@ -59,8 +59,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 10*/ -#if USE_LV_FONT_SYMBOL_10 != 0 -#if USE_LV_FONT_DEJAVU_10 != 0 +#if LV_USE_FONT_SYMBOL_10 != 0 +#if LV_USE_FONT_DEJAVU_10 != 0 lv_font_add(&lv_font_symbol_10, &lv_font_dejavu_10); #else lv_font_add(&lv_font_symbol_10, NULL); @@ -69,20 +69,20 @@ void lv_font_builtin_init(void) /*DEJAVU 20*/ -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20, NULL); #endif -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20_latin_sup, &lv_font_dejavu_20); #else lv_font_add(&lv_font_symbol_20_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_dejavu_20_cyrillic, &lv_font_dejavu_20); #else lv_font_add(&lv_font_dejavu_20_cyrillic, NULL); @@ -90,8 +90,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 20*/ -#if USE_LV_FONT_SYMBOL_20 != 0 -#if USE_LV_FONT_DEJAVU_20 != 0 +#if LV_USE_FONT_SYMBOL_20 != 0 +#if LV_USE_FONT_DEJAVU_20 != 0 lv_font_add(&lv_font_symbol_20, &lv_font_dejavu_20); #else lv_font_add(&lv_font_symbol_20, NULL); @@ -100,20 +100,20 @@ void lv_font_builtin_init(void) /*DEJAVU 30*/ -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30, NULL); #endif -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30_latin_sup, &lv_font_dejavu_30); #else lv_font_add(&lv_font_dejavu_30_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_dejavu_30_cyrillic, &lv_font_dejavu_30); #else lv_font_add(&lv_font_dejavu_30_cyrillic, NULL); @@ -121,8 +121,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 30*/ -#if USE_LV_FONT_SYMBOL_30 != 0 -#if USE_LV_FONT_DEJAVU_30 != 0 +#if LV_USE_FONT_SYMBOL_30 != 0 +#if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30); #else lv_font_add(&lv_font_symbol_30_basic, NULL); @@ -130,20 +130,20 @@ void lv_font_builtin_init(void) #endif /*DEJAVU 40*/ -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40, NULL); #endif -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40_latin_sup, &lv_font_dejavu_40); #else lv_font_add(&lv_font_dejavu_40_latin_sup, NULL); #endif #endif -#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_dejavu_40_cyrillic, &lv_font_dejavu_40); #else lv_font_add(&lv_font_dejavu_40_cyrillic, NULL); @@ -151,8 +151,8 @@ void lv_font_builtin_init(void) #endif /*SYMBOL 40*/ -#if USE_LV_FONT_SYMBOL_40 != 0 -#if USE_LV_FONT_DEJAVU_40 != 0 +#if LV_USE_FONT_SYMBOL_40 != 0 +#if LV_USE_FONT_DEJAVU_40 != 0 lv_font_add(&lv_font_symbol_40, &lv_font_dejavu_40); #else lv_font_add(&lv_font_symbol_40, NULL); diff --git a/lv_fonts/lv_font_builtin.h b/lv_fonts/lv_font_builtin.h index c7f93c136088..07667ef32166 100644 --- a/lv_fonts/lv_font_builtin.h +++ b/lv_fonts/lv_font_builtin.h @@ -47,74 +47,74 @@ void lv_font_builtin_init(void); **********************/ /*10 px */ -#if USE_LV_FONT_DEJAVU_10 +#if LV_USE_FONT_DEJAVU_10 LV_FONT_DECLARE(lv_font_dejavu_10) #endif -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_10_CYRILLIC +#if LV_USE_FONT_DEJAVU_10_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_10 +#if LV_USE_FONT_SYMBOL_10 LV_FONT_DECLARE(lv_font_symbol_10) #endif /*20 px */ -#if USE_LV_FONT_DEJAVU_20 +#if LV_USE_FONT_DEJAVU_20 LV_FONT_DECLARE(lv_font_dejavu_20) #endif -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_20_CYRILLIC +#if LV_USE_FONT_DEJAVU_20_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_20 +#if LV_USE_FONT_SYMBOL_20 LV_FONT_DECLARE(lv_font_symbol_20) #endif /*30 px */ -#if USE_LV_FONT_DEJAVU_30 +#if LV_USE_FONT_DEJAVU_30 LV_FONT_DECLARE(lv_font_dejavu_30) #endif -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_30_CYRILLIC +#if LV_USE_FONT_DEJAVU_30_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_30 +#if LV_USE_FONT_SYMBOL_30 LV_FONT_DECLARE(lv_font_symbol_30) #endif /*40 px */ -#if USE_LV_FONT_DEJAVU_40 +#if LV_USE_FONT_DEJAVU_40 LV_FONT_DECLARE(lv_font_dejavu_40) #endif -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup) #endif -#if USE_LV_FONT_DEJAVU_40_CYRILLIC +#if LV_USE_FONT_DEJAVU_40_CYRILLIC LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic) #endif -#if USE_LV_FONT_SYMBOL_40 +#if LV_USE_FONT_SYMBOL_40 LV_FONT_DECLARE(lv_font_symbol_40) #endif -#if USE_LV_FONT_MONOSPACE_8 +#if LV_USE_FONT_MONOSPACE_8 LV_FONT_DECLARE(lv_font_monospace_8) #endif diff --git a/lv_fonts/lv_font_dejavu_10.c b/lv_fonts/lv_font_dejavu_10.c index f90844ece423..47731bb4589c 100644 --- a/lv_fonts/lv_font_dejavu_10.c +++ b/lv_fonts/lv_font_dejavu_10.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1246,7 +1246,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2483,7 +2483,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3720,7 +3720,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -4963,7 +4963,7 @@ static const uint8_t lv_font_dejavu_10_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+0022 (")*/ @@ -5060,7 +5060,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 930}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 940}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+0022 (")*/ @@ -5157,7 +5157,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 1220}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 1230}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 20}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+0022 (")*/ @@ -5254,7 +5254,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_glyph_dsc[] = { {.w_px = 3, .glyph_index = 2010}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 2030}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 30}, /*Unicode: U+0021 (!)*/ {.w_px = 3, .glyph_index = 40}, /*Unicode: U+0022 (")*/ @@ -5364,17 +5364,17 @@ lv_font_t lv_font_dejavu_10 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10 == 1 +#if LV_USE_FONT_DEJAVU_10 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 2 +#elif LV_USE_FONT_DEJAVU_10 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 4 +#elif LV_USE_FONT_DEJAVU_10 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10 == 8 +#elif LV_USE_FONT_DEJAVU_10 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10*/ +#endif /*LV_USE_FONT_DEJAVU_10*/ diff --git a/lv_fonts/lv_font_dejavu_10_cyrillic.c b/lv_fonts/lv_font_dejavu_10_cyrillic.c index 0bbc3c93feaf..07a2071e2ed5 100644 --- a/lv_fonts/lv_font_dejavu_10_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_10_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, //..... 0x20, //..@.. @@ -843,7 +843,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, //..... 0x0c, 0x00, //..@.. @@ -1677,7 +1677,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, 0x00, //..... 0x01, 0xf1, 0x00, //..@.. @@ -2511,7 +2511,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 5 */ 0x00, 0x00, 0x00, 0x00, 0x00, //..... 0x00, 0x18, 0xfa, 0x18, 0x00, //..@.. @@ -3351,7 +3351,7 @@ static const uint8_t lv_font_dejavu_10_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 10}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 20}, /*Unicode: U+0412 (В)*/ @@ -3417,7 +3417,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 630}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 640}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 20}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 30}, /*Unicode: U+0412 (В)*/ @@ -3483,7 +3483,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 920}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 940}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 30}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 50}, /*Unicode: U+0412 (В)*/ @@ -3549,7 +3549,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_cyrillic_glyph_dsc[] = { {.w_px = 6, .glyph_index = 1590}, /*Unicode: U+044e (ю)*/ {.w_px = 3, .glyph_index = 1620}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 {.w_px = 5, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 4, .glyph_index = 50}, /*Unicode: U+0411 (Б)*/ {.w_px = 4, .glyph_index = 90}, /*Unicode: U+0412 (В)*/ @@ -3628,17 +3628,17 @@ lv_font_t lv_font_dejavu_10_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_10_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_10_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_10_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_10_latin_sup.c b/lv_fonts/lv_font_dejavu_10_latin_sup.c index ecfca44e32b8..adb173eb80d6 100644 --- a/lv_fonts/lv_font_dejavu_10_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_10_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 10 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1259,7 +1259,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2509,7 +2509,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3759,7 +3759,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -5015,7 +5015,7 @@ static const uint8_t lv_font_dejavu_10_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+00a2 (¢)*/ @@ -5113,7 +5113,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 940}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 950}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 10}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 20}, /*Unicode: U+00a2 (¢)*/ @@ -5211,7 +5211,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 1240}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 1250}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 20}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+00a2 (¢)*/ @@ -5309,7 +5309,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_10_latin_sup_glyph_dsc[] = { {.w_px = 4, .glyph_index = 2110}, /*Unicode: U+00fe (þ)*/ {.w_px = 4, .glyph_index = 2130}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 1, .glyph_index = 30}, /*Unicode: U+00a1 (¡)*/ {.w_px = 3, .glyph_index = 40}, /*Unicode: U+00a2 (¢)*/ @@ -5420,17 +5420,17 @@ lv_font_t lv_font_dejavu_10_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_10_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_10_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_10_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_10_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_10_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_10_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_20.c b/lv_fonts/lv_font_dejavu_20.c index 2163fccefb05..de3f09ad5aa1 100644 --- a/lv_fonts/lv_font_dejavu_20.c +++ b/lv_fonts/lv_font_dejavu_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, //...... 0x00, //...... @@ -2196,7 +2196,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, //...... 0x00, 0x00, //...... @@ -4383,7 +4383,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, //...... @@ -6570,7 +6570,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 /*Unicode: U+0020 ( ) , Width: 6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... @@ -8763,7 +8763,7 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 20}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 40}, /*Unicode: U+0022 (")*/ @@ -8860,7 +8860,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 2900}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 2920}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 40}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 60}, /*Unicode: U+0022 (")*/ @@ -8957,7 +8957,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 4520}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 4560}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 60}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 80}, /*Unicode: U+0022 (")*/ @@ -9054,7 +9054,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.w_px = 8, .glyph_index = 8220}, /*Unicode: U+007d (})*/ {.w_px = 11, .glyph_index = 8300}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 2, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 6, .glyph_index = 160}, /*Unicode: U+0022 (")*/ @@ -9164,17 +9164,17 @@ lv_font_t lv_font_dejavu_20 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20 == 1 +#if LV_USE_FONT_DEJAVU_20 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 2 +#elif LV_USE_FONT_DEJAVU_20 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 4 +#elif LV_USE_FONT_DEJAVU_20 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20 == 8 +#elif LV_USE_FONT_DEJAVU_20 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20*/ +#endif /*LV_USE_FONT_DEJAVU_20*/ diff --git a/lv_fonts/lv_font_dejavu_20_cyrillic.c b/lv_fonts/lv_font_dejavu_20_cyrillic.c index fe2948a9b3e3..94782fa28d5f 100644 --- a/lv_fonts/lv_font_dejavu_20_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_20_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, //............ 0x00, 0x00, //............ @@ -1483,7 +1483,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, //............ @@ -2957,7 +2957,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ @@ -4431,7 +4431,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 12 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ @@ -5911,7 +5911,7 @@ static const uint8_t lv_font_dejavu_20_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 40}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 80}, /*Unicode: U+0412 (В)*/ @@ -5977,7 +5977,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 2260}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 2300}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 60}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0412 (В)*/ @@ -6043,7 +6043,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 3680}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 3740}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 220}, /*Unicode: U+0412 (В)*/ @@ -6109,7 +6109,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_cyrillic_glyph_dsc[] = { {.w_px = 12, .glyph_index = 6800}, /*Unicode: U+044e (ю)*/ {.w_px = 9, .glyph_index = 6920}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 {.w_px = 12, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 9, .glyph_index = 240}, /*Unicode: U+0411 (Б)*/ {.w_px = 9, .glyph_index = 420}, /*Unicode: U+0412 (В)*/ @@ -6188,17 +6188,17 @@ lv_font_t lv_font_dejavu_20_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_20_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_20_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_20_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_20_latin_sup.c b/lv_fonts/lv_font_dejavu_20_latin_sup.c index c6b6f93916fd..f7cbab55e6ba 100644 --- a/lv_fonts/lv_font_dejavu_20_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_20_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, //...... 0x00, //...... @@ -2219,7 +2219,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, //...... 0x00, 0x00, //...... @@ -4429,7 +4429,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, //...... @@ -6639,7 +6639,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... @@ -8855,7 +8855,7 @@ static const uint8_t lv_font_dejavu_20_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 20}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 40}, /*Unicode: U+00a2 (¢)*/ @@ -8953,7 +8953,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 2840}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 2880}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 40}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 60}, /*Unicode: U+00a2 (¢)*/ @@ -9051,7 +9051,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 4740}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 4800}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 60}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 80}, /*Unicode: U+00a2 (¢)*/ @@ -9149,7 +9149,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_latin_sup_glyph_dsc[] = { {.w_px = 9, .glyph_index = 8660}, /*Unicode: U+00fe (þ)*/ {.w_px = 12, .glyph_index = 8760}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 {.w_px = 6, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 2, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 8, .glyph_index = 160}, /*Unicode: U+00a2 (¢)*/ @@ -9260,17 +9260,17 @@ lv_font_t lv_font_dejavu_20_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_20_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_20_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_20_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_20_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_20_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_20_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_30.c b/lv_fonts/lv_font_dejavu_30.c index 6154b4937b41..ce6c4a75d837 100644 --- a/lv_fonts/lv_font_dejavu_30.c +++ b/lv_fonts/lv_font_dejavu_30.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, //........ 0x00, //........ @@ -3146,7 +3146,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, //........ 0x00, 0x00, //........ @@ -6283,7 +6283,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, //........ @@ -9420,7 +9420,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 /*Unicode: U+0020 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ @@ -12563,7 +12563,7 @@ static const uint8_t lv_font_dejavu_30_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 60}, /*Unicode: U+0022 (")*/ @@ -12660,7 +12660,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 5400}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 5460}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 60}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 90}, /*Unicode: U+0022 (")*/ @@ -12757,7 +12757,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 9480}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 9570}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 180}, /*Unicode: U+0022 (")*/ @@ -12854,7 +12854,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_glyph_dsc[] = { {.w_px = 11, .glyph_index = 17490}, /*Unicode: U+007d (})*/ {.w_px = 16, .glyph_index = 17670}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+0021 (!)*/ {.w_px = 7, .glyph_index = 330}, /*Unicode: U+0022 (")*/ @@ -12964,17 +12964,17 @@ lv_font_t lv_font_dejavu_30 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30 == 1 +#if LV_USE_FONT_DEJAVU_30 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 2 +#elif LV_USE_FONT_DEJAVU_30 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 4 +#elif LV_USE_FONT_DEJAVU_30 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30 == 8 +#elif LV_USE_FONT_DEJAVU_30 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30*/ +#endif /*LV_USE_FONT_DEJAVU_30*/ diff --git a/lv_fonts/lv_font_dejavu_30_cyrillic.c b/lv_fonts/lv_font_dejavu_30_cyrillic.c index 702865fe1f73..3a17470e2b85 100644 --- a/lv_fonts/lv_font_dejavu_30_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_30_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, //................. @@ -2123,7 +2123,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -4237,7 +4237,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -6351,7 +6351,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -8471,7 +8471,7 @@ static const uint8_t lv_font_dejavu_30_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 90}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 150}, /*Unicode: U+0412 (В)*/ @@ -8537,7 +8537,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 4260}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 4350}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 150}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 270}, /*Unicode: U+0412 (В)*/ @@ -8603,7 +8603,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 7680}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 7830}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 270}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 480}, /*Unicode: U+0412 (В)*/ @@ -8669,7 +8669,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_cyrillic_glyph_dsc[] = { {.w_px = 18, .glyph_index = 14520}, /*Unicode: U+044e (ю)*/ {.w_px = 12, .glyph_index = 14790}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 13, .glyph_index = 510}, /*Unicode: U+0411 (Б)*/ {.w_px = 13, .glyph_index = 900}, /*Unicode: U+0412 (В)*/ @@ -8748,17 +8748,17 @@ lv_font_t lv_font_dejavu_30_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_30_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_30_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_30_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_30_latin_sup.c b/lv_fonts/lv_font_dejavu_30_latin_sup.c index 0cc81d319c35..8665a44e828f 100644 --- a/lv_fonts/lv_font_dejavu_30_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_30_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 30 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, //........ 0x00, //........ @@ -3179,7 +3179,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, //........ 0x00, 0x00, //........ @@ -6349,7 +6349,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, //........ @@ -9519,7 +9519,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ @@ -12695,7 +12695,7 @@ static const uint8_t lv_font_dejavu_30_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 30}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 60}, /*Unicode: U+00a2 (¢)*/ @@ -12793,7 +12793,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 5670}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 5730}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 60}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 90}, /*Unicode: U+00a2 (¢)*/ @@ -12891,7 +12891,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 9990}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 10110}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 180}, /*Unicode: U+00a2 (¢)*/ @@ -12989,7 +12989,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_30_latin_sup_glyph_dsc[] = { {.w_px = 13, .glyph_index = 18690}, /*Unicode: U+00fe (þ)*/ {.w_px = 14, .glyph_index = 18900}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+00a1 (¡)*/ {.w_px = 11, .glyph_index = 330}, /*Unicode: U+00a2 (¢)*/ @@ -13100,17 +13100,17 @@ lv_font_t lv_font_dejavu_30_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_30_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_30_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_30_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_30_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_30_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_30_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_dejavu_40.c b/lv_fonts/lv_font_dejavu_40.c index 00cac6d7daff..c7f9c9a966ee 100644 --- a/lv_fonts/lv_font_dejavu_40.c +++ b/lv_fonts/lv_font_dejavu_40.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, //........... 0x00, 0x00, //........... @@ -4096,7 +4096,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, //........... @@ -8183,7 +8183,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -12270,7 +12270,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 /*Unicode: U+0020 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -16363,7 +16363,7 @@ static const uint8_t lv_font_dejavu_40_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 80}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 120}, /*Unicode: U+0022 (")*/ @@ -16460,7 +16460,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 8920}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 9000}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 160}, /*Unicode: U+0022 (")*/ @@ -16557,7 +16557,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 15960}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 16120}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 320}, /*Unicode: U+0022 (")*/ @@ -16654,7 +16654,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_glyph_dsc[] = { {.w_px = 13, .glyph_index = 30280}, /*Unicode: U+007d (})*/ {.w_px = 21, .glyph_index = 30560}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 3, .glyph_index = 440}, /*Unicode: U+0021 (!)*/ {.w_px = 9, .glyph_index = 560}, /*Unicode: U+0022 (")*/ @@ -16764,17 +16764,17 @@ lv_font_t lv_font_dejavu_40 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40 == 1 +#if LV_USE_FONT_DEJAVU_40 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 2 +#elif LV_USE_FONT_DEJAVU_40 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 4 +#elif LV_USE_FONT_DEJAVU_40 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40 == 8 +#elif LV_USE_FONT_DEJAVU_40 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40*/ +#endif /*LV_USE_FONT_DEJAVU_40*/ diff --git a/lv_fonts/lv_font_dejavu_40_cyrillic.c b/lv_fonts/lv_font_dejavu_40_cyrillic.c index 7ef4a5f14ef2..c3dfcb09d3b5 100644 --- a/lv_fonts/lv_font_dejavu_40_cyrillic.c +++ b/lv_fonts/lv_font_dejavu_40_cyrillic.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40_CYRILLIC != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+0410 (А) .. U+044f (я) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, //....................... @@ -2763,7 +2763,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -5517,7 +5517,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -8271,7 +8271,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 /*Unicode: U+0410 (А) , Width: 23 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....................... @@ -11031,7 +11031,7 @@ static const uint8_t lv_font_dejavu_40_cyrillic_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 120}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 240}, /*Unicode: U+0412 (В)*/ @@ -11097,7 +11097,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 7280}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 7400}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 240}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 440}, /*Unicode: U+0412 (В)*/ @@ -11163,7 +11163,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 13280}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 13520}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 480}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 840}, /*Unicode: U+0412 (В)*/ @@ -11229,7 +11229,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_cyrillic_glyph_dsc[] = { {.w_px = 24, .glyph_index = 25440}, /*Unicode: U+044e (ю)*/ {.w_px = 15, .glyph_index = 25920}, /*Unicode: U+044f (я)*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 {.w_px = 23, .glyph_index = 0}, /*Unicode: U+0410 (А)*/ {.w_px = 18, .glyph_index = 920}, /*Unicode: U+0411 (Б)*/ {.w_px = 18, .glyph_index = 1640}, /*Unicode: U+0412 (В)*/ @@ -11308,16 +11308,16 @@ lv_font_t lv_font_dejavu_40_cyrillic = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40_CYRILLIC == 1 +#if LV_USE_FONT_DEJAVU_40_CYRILLIC == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 2 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 4 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_CYRILLIC == 8 +#elif LV_USE_FONT_DEJAVU_40_CYRILLIC == 8 .bpp = 8, /*Bit per pixel*/ #endif .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40_CYRILLIC*/ +#endif /*LV_USE_FONT_DEJAVU_40_CYRILLIC*/ diff --git a/lv_fonts/lv_font_dejavu_40_latin_sup.c b/lv_fonts/lv_font_dejavu_40_latin_sup.c index e02804cd1038..fc7d202e90e0 100644 --- a/lv_fonts/lv_font_dejavu_40_latin_sup.c +++ b/lv_fonts/lv_font_dejavu_40_latin_sup.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 40 px Font in U+00a0 ( ) .. U+00ff (ÿ) range with 1 bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, //........... 0x00, 0x00, //........... @@ -4139,7 +4139,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, //........... @@ -8269,7 +8269,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -12399,7 +12399,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 /*Unicode: U+00a0 ( ) , Width: 11 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... @@ -16535,7 +16535,7 @@ static const uint8_t lv_font_dejavu_40_latin_sup_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 80}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 120}, /*Unicode: U+00a2 (¢)*/ @@ -16633,7 +16633,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 9320}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 9440}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 120}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 160}, /*Unicode: U+00a2 (¢)*/ @@ -16731,7 +16731,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 16960}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 17160}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 240}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 320}, /*Unicode: U+00a2 (¢)*/ @@ -16829,7 +16829,7 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_40_latin_sup_glyph_dsc[] = { {.w_px = 17, .glyph_index = 32480}, /*Unicode: U+00fe (þ)*/ {.w_px = 18, .glyph_index = 32840}, /*Unicode: U+00ff (ÿ)*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 {.w_px = 11, .glyph_index = 0}, /*Unicode: U+00a0 ( )*/ {.w_px = 3, .glyph_index = 440}, /*Unicode: U+00a1 (¡)*/ {.w_px = 15, .glyph_index = 560}, /*Unicode: U+00a2 (¢)*/ @@ -16940,17 +16940,17 @@ lv_font_t lv_font_dejavu_40_latin_sup = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_DEJAVU_40_LATIN_SUP == 1 +#if LV_USE_FONT_DEJAVU_40_LATIN_SUP == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 2 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 4 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_DEJAVU_40_LATIN_SUP == 8 +#elif LV_USE_FONT_DEJAVU_40_LATIN_SUP == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_DEJAVU_40_LATIN_SUP*/ +#endif /*LV_USE_FONT_DEJAVU_40_LATIN_SUP*/ diff --git a/lv_fonts/lv_font_monospace_8.c b/lv_fonts/lv_font_monospace_8.c index 371bec5557ef..402ae0ac2d87 100644 --- a/lv_fonts/lv_font_monospace_8.c +++ b/lv_fonts/lv_font_monospace_8.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_MONOSPACE_8 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_MONOSPACE_8 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * unscii_8_mod.ttf 8 px Font in U+0020 ( ) .. U+007e (~) range with all bpp @@ -9,7 +9,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -1056,7 +1056,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, //... 0x00, //... @@ -2103,7 +2103,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, //... 0x00, 0x00, //... @@ -3150,7 +3150,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 /*Unicode: U+0020 ( ) , Width: 3 */ 0x00, 0x00, 0x00, //... 0x00, 0x00, 0x00, //... @@ -4203,7 +4203,7 @@ static const uint8_t lv_font_monospace_8_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 8}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 16}, /*Unicode: U+0022 (")*/ @@ -4300,7 +4300,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 744}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 752}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 8}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 16}, /*Unicode: U+0022 (")*/ @@ -4397,7 +4397,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 1320}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 1328}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 16}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 24}, /*Unicode: U+0022 (")*/ @@ -4494,7 +4494,7 @@ static const lv_font_glyph_dsc_t lv_font_monospace_8_glyph_dsc[] = { {.w_px = 4, .glyph_index = 2032}, /*Unicode: U+007d (})*/ {.w_px = 5, .glyph_index = 2048}, /*Unicode: U+007e (~)*/ -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 {.w_px = 3, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ {.w_px = 1, .glyph_index = 24}, /*Unicode: U+0021 (!)*/ {.w_px = 4, .glyph_index = 32}, /*Unicode: U+0022 (")*/ @@ -4603,17 +4603,17 @@ lv_font_t lv_font_monospace_8 = { .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_MONOSPACE_8 == 1 +#if LV_USE_FONT_MONOSPACE_8 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 2 +#elif LV_USE_FONT_MONOSPACE_8 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 4 +#elif LV_USE_FONT_MONOSPACE_8 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_MONOSPACE_8 == 8 +#elif LV_USE_FONT_MONOSPACE_8 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 6, /*Fix width (0: if not used)*/ .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_MONOSPACE_8*/ +#endif /*LV_USE_FONT_MONOSPACE_8*/ diff --git a/lv_fonts/lv_font_symbol_10.c b/lv_fonts/lv_font_symbol_10.c index 586b3d817157..016113573b30 100644 --- a/lv_fonts/lv_font_symbol_10.c +++ b/lv_fonts/lv_font_symbol_10.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_10 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 10 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 /*Unicode: U+f001 () , Width: 8 */ 0x00, //........ 0x0f, //...+%@@% @@ -662,7 +662,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, //........ 0x01, 0xbe, //...+%@@% @@ -1314,7 +1314,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, 0x00, 0x22, //........ 0x00, 0x04, 0x9d, 0xfb, //...+%@@% @@ -1966,7 +1966,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 /*Unicode: U+f001 () , Width: 8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x2e, //........ 0x00, 0x00, 0x08, 0x4c, 0x96, 0xde, 0xff, 0xba, //...+%@@% @@ -2624,7 +2624,7 @@ static const uint8_t lv_font_symbol_10_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 10}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 30}, /*Unicode: U+f00b ()*/ @@ -2676,7 +2676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 710}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 730}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 20}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 50}, /*Unicode: U+f00b ()*/ @@ -2728,7 +2728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 1180}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 1210}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 40}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 90}, /*Unicode: U+f00b ()*/ @@ -2780,7 +2780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_10_glyph_dsc[] = { {.w_px = 12, .glyph_index = 2100}, /*Unicode: U+f244 ()*/ {.w_px = 8, .glyph_index = 2160}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 {.w_px = 8, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 10, .glyph_index = 80}, /*Unicode: U+f008 ()*/ {.w_px = 9, .glyph_index = 180}, /*Unicode: U+f00b ()*/ @@ -2845,17 +2845,17 @@ lv_font_t lv_font_symbol_10 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_10 == 1 +#if LV_USE_FONT_SYMBOL_10 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 2 +#elif LV_USE_FONT_SYMBOL_10 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 4 +#elif LV_USE_FONT_SYMBOL_10 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_10 == 8 +#elif LV_USE_FONT_SYMBOL_10 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_10*/ +#endif /*LV_USE_FONT_SYMBOL_10*/ diff --git a/lv_fonts/lv_font_symbol_20.c b/lv_fonts/lv_font_symbol_20.c index 3a691f59954b..1a04acda55cb 100644 --- a/lv_fonts/lv_font_symbol_20.c +++ b/lv_fonts/lv_font_symbol_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 20 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, //................. @@ -1162,7 +1162,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -2314,7 +2314,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -3466,7 +3466,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 /*Unicode: U+f001 () , Width: 17 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. @@ -4624,7 +4624,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 60}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 120}, /*Unicode: U+f00b ()*/ @@ -4676,7 +4676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 2660}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 2740}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 100}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 220}, /*Unicode: U+f00b ()*/ @@ -4728,7 +4728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 4640}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 4780}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 180}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 400}, /*Unicode: U+f00b ()*/ @@ -4780,7 +4780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_20_glyph_dsc[] = { {.w_px = 25, .glyph_index = 8640}, /*Unicode: U+f244 ()*/ {.w_px = 14, .glyph_index = 8900}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 {.w_px = 17, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 21, .glyph_index = 340}, /*Unicode: U+f008 ()*/ {.w_px = 19, .glyph_index = 760}, /*Unicode: U+f00b ()*/ @@ -4845,17 +4845,17 @@ lv_font_t lv_font_symbol_20 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_20 == 1 +#if LV_USE_FONT_SYMBOL_20 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 2 +#elif LV_USE_FONT_SYMBOL_20 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 4 +#elif LV_USE_FONT_SYMBOL_20 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_20 == 8 +#elif LV_USE_FONT_SYMBOL_20 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_20*/ +#endif /*LV_USE_FONT_SYMBOL_20*/ diff --git a/lv_fonts/lv_font_symbol_30.c b/lv_fonts/lv_font_symbol_30.c index 0a0f386848b7..faf015b93c64 100644 --- a/lv_fonts/lv_font_symbol_30.c +++ b/lv_fonts/lv_font_symbol_30.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_30 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 30 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, //......................... @@ -1662,7 +1662,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -3314,7 +3314,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -4966,7 +4966,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 /*Unicode: U+f001 () , Width: 25 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......................... @@ -6624,7 +6624,7 @@ static const uint8_t lv_font_symbol_30_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 120}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 240}, /*Unicode: U+f00b ()*/ @@ -6676,7 +6676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 5400}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 5550}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 210}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 450}, /*Unicode: U+f00b ()*/ @@ -6728,7 +6728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 10020}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 10320}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 390}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 870}, /*Unicode: U+f00b ()*/ @@ -6780,7 +6780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_30_glyph_dsc[] = { {.w_px = 38, .glyph_index = 19260}, /*Unicode: U+f244 ()*/ {.w_px = 22, .glyph_index = 19830}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 {.w_px = 25, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 32, .glyph_index = 750}, /*Unicode: U+f008 ()*/ {.w_px = 29, .glyph_index = 1710}, /*Unicode: U+f00b ()*/ @@ -6844,17 +6844,17 @@ lv_font_t lv_font_symbol_30 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_30 == 1 +#if LV_USE_FONT_SYMBOL_30 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 2 +#elif LV_USE_FONT_SYMBOL_30 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 4 +#elif LV_USE_FONT_SYMBOL_30 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_30 == 8 +#elif LV_USE_FONT_SYMBOL_30 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_30*/ +#endif /*LV_USE_FONT_SYMBOL_30*/ diff --git a/lv_fonts/lv_font_symbol_40.c b/lv_fonts/lv_font_symbol_40.c index eacbde0c9417..8b84a0beb9cc 100644 --- a/lv_fonts/lv_font_symbol_40.c +++ b/lv_fonts/lv_font_symbol_40.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_SYMBOL_40 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * fontawesome-webfont.ttf 40 px Font in U+f000 () .. U+f2ee () range with 1 bpp @@ -10,7 +10,7 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -2162,7 +2162,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -4314,7 +4314,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -6466,7 +6466,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 /*Unicode: U+f001 () , Width: 34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.................................. @@ -8624,7 +8624,7 @@ static const uint8_t lv_font_symbol_40_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 200}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 440}, /*Unicode: U+f00b ()*/ @@ -8676,7 +8676,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 9320}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 9600}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 360}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 800}, /*Unicode: U+f00b ()*/ @@ -8728,7 +8728,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 17400}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 17920}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 680}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 1520}, /*Unicode: U+f00b ()*/ @@ -8780,7 +8780,7 @@ static const lv_font_glyph_dsc_t lv_font_symbol_40_glyph_dsc[] = { {.w_px = 51, .glyph_index = 34000}, /*Unicode: U+f244 ()*/ {.w_px = 29, .glyph_index = 35040}, /*Unicode: U+f293 ()*/ -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 {.w_px = 34, .glyph_index = 0}, /*Unicode: U+f001 ()*/ {.w_px = 42, .glyph_index = 1360}, /*Unicode: U+f008 ()*/ {.w_px = 39, .glyph_index = 3040}, /*Unicode: U+f00b ()*/ @@ -8845,17 +8845,17 @@ lv_font_t lv_font_symbol_40 = { .unicode_list = NULL, .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if USE_LV_FONT_SYMBOL_40 == 1 +#if LV_USE_FONT_SYMBOL_40 == 1 .bpp = 1, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 2 +#elif LV_USE_FONT_SYMBOL_40 == 2 .bpp = 2, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 4 +#elif LV_USE_FONT_SYMBOL_40 == 4 .bpp = 4, /*Bit per pixel*/ -#elif USE_LV_FONT_SYMBOL_40 == 8 +#elif LV_USE_FONT_SYMBOL_40 == 8 .bpp = 8, /*Bit per pixel*/ #endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*USE_LV_FONT_SYMBOL_40*/ +#endif /*LV_USE_FONT_SYMBOL_40*/ diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index 339f2853e755..c3d1683b7268 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -61,7 +61,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; -#if USE_LV_GPU +#if LV_USE_GPU driver->mem_blend = NULL; driver->mem_fill = NULL; #endif diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index 6725c854c1ae..e1397b5d257b 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -83,18 +83,18 @@ typedef struct _disp_drv_t { void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_disp_drv_user_data_t user_data; #endif -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_disp_drv_user_data_t flush_user_data; lv_disp_drv_user_data_t rounder_user_data; lv_disp_drv_user_data_t set_px_user_data; lv_disp_drv_user_data_t monitor_user_data; #endif -#if USE_LV_GPU +#if LV_USE_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 5026f7f65331..7ee8530e3ac4 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -80,9 +80,9 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) memcpy(&node->driver, driver, sizeof(lv_indev_drv_t)); node->proc.reset_query = 1; - node->custom_data.cursor = NULL; - node->custom_data.group = NULL; - node->custom_data.btn_points = NULL; + node->cursor = NULL; + node->group = NULL; + node->btn_points = NULL; return node; } diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 63ad230685fe..68e27998299b 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -71,11 +71,11 @@ typedef struct _lv_indev_drv_t { lv_hal_indev_type_t type; /*Input device type*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ -#if USE_LV_USER_DATA_MULTI +#if LV_USE_USER_DATA_MULTI lv_indev_drv_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ #endif -#if USE_LV_USER_DATA_SINGLE +#if LV_USE_USER_DATA_SINGLE lv_indev_drv_user_data_t user_data; #endif struct _disp_t * disp; /*Pointer to the assigned display*/ @@ -127,12 +127,9 @@ typedef struct _lv_indev_t { lv_indev_proc_t proc; lv_indev_feedback_t feedback; uint32_t last_activity_time; - union { - struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ - struct _lv_group_t *group; /*Keypad destination group*/ - const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ - - }custom_data; + struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ + struct _lv_group_t *group; /*Keypad destination group*/ + const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ } lv_indev_t; /********************** diff --git a/lv_misc/lv_anim.c b/lv_misc/lv_anim.c index 578c5566d2d1..c18c1a8667cc 100644 --- a/lv_misc/lv_anim.c +++ b/lv_misc/lv_anim.c @@ -8,7 +8,7 @@ *********************/ #include "lv_anim.h" -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION #include #include #include "../lv_hal/lv_hal_tick.h" @@ -128,7 +128,7 @@ uint16_t lv_anim_count_running(void) { uint16_t cnt = 0; lv_anim_t * a; - LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++; + LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++; return cnt++; } @@ -357,7 +357,7 @@ static void anim_task(void * param) (void)param; lv_anim_t * a; - LL_READ(LV_GC_ROOT(_lv_anim_ll), a) { + LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) { a->has_run = 0; } diff --git a/lv_misc/lv_anim.h b/lv_misc/lv_anim.h index 7e8a0b62713b..611f38611929 100644 --- a/lv_misc/lv_anim.h +++ b/lv_misc/lv_anim.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION #include #include @@ -167,7 +167,7 @@ int32_t lv_anim_path_step(const lv_anim_t *a); * MACROS **********************/ -#endif /*USE_LV_ANIMATION == 0*/ +#endif /*LV_USE_ANIMATION == 0*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_fs.c b/lv_misc/lv_fs.c index 9465d59bf4f3..9b5c2f267fc4 100644 --- a/lv_misc/lv_fs.c +++ b/lv_misc/lv_fs.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_fs.h" -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM #include "lv_ll.h" #include @@ -492,7 +492,7 @@ char * lv_fs_get_letters(char * buf) lv_fs_drv_t * drv; uint8_t i = 0; - LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { buf[i] = drv->letter; i++; } @@ -615,7 +615,7 @@ static lv_fs_drv_t * lv_fs_get_drv(char letter) { lv_fs_drv_t * drv; - LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { if(drv->letter == letter) { return drv; } @@ -624,4 +624,4 @@ static lv_fs_drv_t * lv_fs_get_drv(char letter) return NULL; } -#endif /*USE_LV_FILESYSTEM*/ +#endif /*LV_USE_FILESYSTEM*/ diff --git a/lv_misc/lv_fs.h b/lv_misc/lv_fs.h index e7180022b197..35e70408ecc5 100644 --- a/lv_misc/lv_fs.h +++ b/lv_misc/lv_fs.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_FILESYSTEM +#if LV_USE_FILESYSTEM #include #include @@ -268,7 +268,7 @@ const char * lv_fs_get_last(const char * path); * MACROS **********************/ -#endif /*USE_LV_FILESYSTEM*/ +#endif /*LV_USE_FILESYSTEM*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_ll.h b/lv_misc/lv_ll.h index b49d0ea363a5..6fc4827ac86a 100644 --- a/lv_misc/lv_ll.h +++ b/lv_misc/lv_ll.h @@ -141,9 +141,9 @@ bool lv_ll_is_empty(lv_ll_t * ll_p); * MACROS **********************/ -#define LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) +#define LV_LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) -#define LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) +#define LV_LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_log.c b/lv_misc/lv_log.c index ef23d04debfc..7c9e2c53e74c 100644 --- a/lv_misc/lv_log.c +++ b/lv_misc/lv_log.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_log.h" -#if USE_LV_LOG +#if LV_USE_LOG #if LV_LOG_PRINTF #include @@ -73,4 +73,4 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * * STATIC FUNCTIONS **********************/ -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ diff --git a/lv_misc/lv_log.h b/lv_misc/lv_log.h index 8e99763d4ec3..b124a92946e7 100644 --- a/lv_misc/lv_log.h +++ b/lv_misc/lv_log.h @@ -24,7 +24,7 @@ extern "C" { * DEFINES *********************/ -/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/ +/*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/ #define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/ #define LV_LOG_LEVEL_INFO 1 /*Log important events*/ @@ -34,7 +34,7 @@ extern "C" { typedef int8_t lv_log_level_t; -#if USE_LV_LOG +#if LV_USE_LOG /********************** * TYPEDEFS **********************/ @@ -69,15 +69,15 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * #define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc); #define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc); -#else /*USE_LV_LOG*/ +#else /*LV_USE_LOG*/ -/*Do nothing if `USE_LV_LOG 0`*/ +/*Do nothing if `LV_USE_LOG 0`*/ #define lv_log_add(level, file, line, dsc) {;} #define LV_LOG_TRACE(dsc) {;} #define LV_LOG_INFO(dsc) {;} #define LV_LOG_WARN(dsc) {;} #define LV_LOG_ERROR(dsc) {;} -#endif /*USE_LV_LOG*/ +#endif /*LV_USE_LOG*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_misc/lv_mem.h b/lv_misc/lv_mem.h index 0af68d391c03..f195f7ac2751 100644 --- a/lv_misc/lv_mem.h +++ b/lv_misc/lv_mem.h @@ -114,7 +114,7 @@ uint32_t lv_mem_get_size(const void * data); * Halt on NULL pointer * p pointer to a memory */ -#if USE_LV_LOG == 0 +#if LV_USE_LOG == 0 # define lv_mem_assert(p) {if(p == NULL) while(1); } #else # define lv_mem_assert(p) {if(p == NULL) {LV_LOG_ERROR("Out of memory!"); while(1); }} diff --git a/lv_misc/lv_symbol_def.h b/lv_misc/lv_symbol_def.h index e60952b6a2d7..fd73d29bee50 100644 --- a/lv_misc/lv_symbol_def.h +++ b/lv_misc/lv_symbol_def.h @@ -22,186 +22,186 @@ extern "C" { #if LV_TXT_UTF8 == 0 #define LV_SYMBOL_GLYPH_FIRST 0xC0 -#define SYMBOL_AUDIO _SYMBOL_VALUE1(C0) -#define SYMBOL_VIDEO _SYMBOL_VALUE1(C1) -#define SYMBOL_LIST _SYMBOL_VALUE1(C2) -#define SYMBOL_OK _SYMBOL_VALUE1(C3) -#define SYMBOL_CLOSE _SYMBOL_VALUE1(C4) -#define SYMBOL_POWER _SYMBOL_VALUE1(C5) -#define SYMBOL_SETTINGS _SYMBOL_VALUE1(C6) -#define SYMBOL_TRASH _SYMBOL_VALUE1(C7) -#define SYMBOL_HOME _SYMBOL_VALUE1(C8) -#define SYMBOL_DOWNLOAD _SYMBOL_VALUE1(C9) -#define SYMBOL_DRIVE _SYMBOL_VALUE1(CA) -#define SYMBOL_REFRESH _SYMBOL_VALUE1(CB) -#define SYMBOL_MUTE _SYMBOL_VALUE1(CC) -#define SYMBOL_VOLUME_MID _SYMBOL_VALUE1(CD) -#define SYMBOL_VOLUME_MAX _SYMBOL_VALUE1(CE) -#define SYMBOL_IMAGE _SYMBOL_VALUE1(CF) -#define SYMBOL_EDIT _SYMBOL_VALUE1(D0) -#define SYMBOL_PREV _SYMBOL_VALUE1(D1) -#define SYMBOL_PLAY _SYMBOL_VALUE1(D2) -#define SYMBOL_PAUSE _SYMBOL_VALUE1(D3) -#define SYMBOL_STOP _SYMBOL_VALUE1(D4) -#define SYMBOL_NEXT _SYMBOL_VALUE1(D5) -#define SYMBOL_EJECT _SYMBOL_VALUE1(D6) -#define SYMBOL_LEFT _SYMBOL_VALUE1(D7) -#define SYMBOL_RIGHT _SYMBOL_VALUE1(D8) -#define SYMBOL_PLUS _SYMBOL_VALUE1(D9) -#define SYMBOL_MINUS _SYMBOL_VALUE1(DA) -#define SYMBOL_WARNING _SYMBOL_VALUE1(DB) -#define SYMBOL_SHUFFLE _SYMBOL_VALUE1(DC) -#define SYMBOL_UP _SYMBOL_VALUE1(DD) -#define SYMBOL_DOWN _SYMBOL_VALUE1(DE) -#define SYMBOL_LOOP _SYMBOL_VALUE1(DF) -#define SYMBOL_DIRECTORY _SYMBOL_VALUE1(E0) -#define SYMBOL_UPLOAD _SYMBOL_VALUE1(E1) -#define SYMBOL_CALL _SYMBOL_VALUE1(E2) -#define SYMBOL_CUT _SYMBOL_VALUE1(E3) -#define SYMBOL_COPY _SYMBOL_VALUE1(E4) -#define SYMBOL_SAVE _SYMBOL_VALUE1(E5) -#define SYMBOL_CHARGE _SYMBOL_VALUE1(E6) -#define SYMBOL_BELL _SYMBOL_VALUE1(E7) -#define SYMBOL_KEYBOARD _SYMBOL_VALUE1(E8) -#define SYMBOL_GPS _SYMBOL_VALUE1(E9) -#define SYMBOL_FILE _SYMBOL_VALUE1(EA) -#define SYMBOL_WIFI _SYMBOL_VALUE1(EB) -#define SYMBOL_BATTERY_FULL _SYMBOL_VALUE1(EC) -#define SYMBOL_BATTERY_3 _SYMBOL_VALUE1(ED) -#define SYMBOL_BATTERY_2 _SYMBOL_VALUE1(EE) -#define SYMBOL_BATTERY_1 _SYMBOL_VALUE1(EF) -#define SYMBOL_BATTERY_EMPTY _SYMBOL_VALUE1(F0) -#define SYMBOL_BLUETOOTH _SYMBOL_VALUE1(F1) +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE1(C0) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE1(C1) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE1(C2) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE1(C3) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE1(C4) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE1(C5) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE1(C6) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE1(C7) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE1(C8) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE1(C9) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE1(CA) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE1(CB) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE1(CC) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE1(CD) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE1(CE) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE1(CF) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE1(D0) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE1(D1) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE1(D2) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE1(D3) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE1(D4) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE1(D5) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE1(D6) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE1(D7) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE1(D8) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE1(D9) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE1(DA) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE1(DB) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE1(DC) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE1(DD) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE1(DE) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE1(DF) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE1(E0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE1(E1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE1(E2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE1(E3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE1(E4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE1(E5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE1(E6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE1(E7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE1(E8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE1(E9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE1(EA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE1(EB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE1(EC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE1(ED) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE1(EE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE1(EF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE1(F0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE1(F1) #define LV_SYMBOL_GLYPH_LAST 0xF1 -#define SYMBOL_DUMMY _SYMBOL_VALUE1(FF) /*Invalid symbol. If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE1(FF) /*Invalid symbol. If written before a string then `lv_img` will show it as a label*/ #else #define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define SYMBOL_AUDIO _SYMBOL_VALUE3(EF,A0,80) -#define SYMBOL_VIDEO _SYMBOL_VALUE3(EF,A0,81) -#define SYMBOL_LIST _SYMBOL_VALUE3(EF,A0,82) -#define SYMBOL_OK _SYMBOL_VALUE3(EF,A0,83) -#define SYMBOL_CLOSE _SYMBOL_VALUE3(EF,A0,84) -#define SYMBOL_POWER _SYMBOL_VALUE3(EF,A0,85) -#define SYMBOL_SETTINGS _SYMBOL_VALUE3(EF,A0,86) -#define SYMBOL_TRASH _SYMBOL_VALUE3(EF,A0,87) -#define SYMBOL_HOME _SYMBOL_VALUE3(EF,A0,88) -#define SYMBOL_DOWNLOAD _SYMBOL_VALUE3(EF,A0,89) -#define SYMBOL_DRIVE _SYMBOL_VALUE3(EF,A0,8A) -#define SYMBOL_REFRESH _SYMBOL_VALUE3(EF,A0,8B) -#define SYMBOL_MUTE _SYMBOL_VALUE3(EF,A0,8C) -#define SYMBOL_VOLUME_MID _SYMBOL_VALUE3(EF,A0,8D) -#define SYMBOL_VOLUME_MAX _SYMBOL_VALUE3(EF,A0,8E) -#define SYMBOL_IMAGE _SYMBOL_VALUE3(EF,A0,8F) -#define SYMBOL_EDIT _SYMBOL_VALUE3(EF,A0,90) -#define SYMBOL_PREV _SYMBOL_VALUE3(EF,A0,91) -#define SYMBOL_PLAY _SYMBOL_VALUE3(EF,A0,92) -#define SYMBOL_PAUSE _SYMBOL_VALUE3(EF,A0,93) -#define SYMBOL_STOP _SYMBOL_VALUE3(EF,A0,94) -#define SYMBOL_NEXT _SYMBOL_VALUE3(EF,A0,95) -#define SYMBOL_EJECT _SYMBOL_VALUE3(EF,A0,96) -#define SYMBOL_LEFT _SYMBOL_VALUE3(EF,A0,97) -#define SYMBOL_RIGHT _SYMBOL_VALUE3(EF,A0,98) -#define SYMBOL_PLUS _SYMBOL_VALUE3(EF,A0,99) -#define SYMBOL_MINUS _SYMBOL_VALUE3(EF,A0,9A) -#define SYMBOL_WARNING _SYMBOL_VALUE3(EF,A0,9B) -#define SYMBOL_SHUFFLE _SYMBOL_VALUE3(EF,A0,9C) -#define SYMBOL_UP _SYMBOL_VALUE3(EF,A0,9D) -#define SYMBOL_DOWN _SYMBOL_VALUE3(EF,A0,9E) -#define SYMBOL_LOOP _SYMBOL_VALUE3(EF,A0,9F) -#define SYMBOL_DIRECTORY _SYMBOL_VALUE3(EF,A0,A0) -#define SYMBOL_UPLOAD _SYMBOL_VALUE3(EF,A0,A1) -#define SYMBOL_CALL _SYMBOL_VALUE3(EF,A0,A2) -#define SYMBOL_CUT _SYMBOL_VALUE3(EF,A0,A3) -#define SYMBOL_COPY _SYMBOL_VALUE3(EF,A0,A4) -#define SYMBOL_SAVE _SYMBOL_VALUE3(EF,A0,A5) -#define SYMBOL_CHARGE _SYMBOL_VALUE3(EF,A0,A6) -#define SYMBOL_BELL _SYMBOL_VALUE3(EF,A0,A7) -#define SYMBOL_KEYBOARD _SYMBOL_VALUE3(EF,A0,A8) -#define SYMBOL_GPS _SYMBOL_VALUE3(EF,A0,A9) -#define SYMBOL_FILE _SYMBOL_VALUE3(EF,A0,AA) -#define SYMBOL_WIFI _SYMBOL_VALUE3(EF,A0,AB) -#define SYMBOL_BATTERY_FULL _SYMBOL_VALUE3(EF,A0,AC) -#define SYMBOL_BATTERY_3 _SYMBOL_VALUE3(EF,A0,AD) -#define SYMBOL_BATTERY_2 _SYMBOL_VALUE3(EF,A0,AE) -#define SYMBOL_BATTERY_1 _SYMBOL_VALUE3(EF,A0,AF) -#define SYMBOL_BATTERY_EMPTY _SYMBOL_VALUE3(EF,A0,B0) -#define SYMBOL_BLUETOOTH _SYMBOL_VALUE3(EF,A0,B1) +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF,A0,82) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF,A0,83) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF,A0,84) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF,A0,85) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF,A0,86) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF,A0,87) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF,A0,88) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF,A0,89) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF,A0,8A) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF,A0,8B) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF,A0,8C) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF,A0,8D) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF,A0,8E) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF,A0,8F) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF,A0,90) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF,A0,91) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF,A0,92) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF,A0,93) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF,A0,94) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF,A0,95) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF,A0,96) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF,A0,97) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF,A0,98) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF,A0,99) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF,A0,9A) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF,A0,9B) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF,A0,9C) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF,A0,9D) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF,A0,9E) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF,A0,9F) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF,A0,A0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF,A0,A1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF,A0,A2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF,A0,A3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF,A0,A4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF,A0,A5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF,A0,A6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF,A0,A7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF,A0,A8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF,A0,A9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF,A0,AA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF,A0,AB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF,A0,AC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF,A0,AD) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF,A0,AE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF,A0,AF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF,A0,B0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) #define LV_SYMBOL_GLYPH_LAST 0xF831 -#define SYMBOL_DUMMY _SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ #endif -#define _SYMBOL_VALUE1(x) (0x ## x) -#define _SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) -#define _SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym +#define _LV_SYMBOL_VALUE1(x) (0x ## x) +#define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) +#define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym enum { - _SYMBOL_NUMSTR(SYMBOL_AUDIO), - _SYMBOL_NUMSTR(SYMBOL_VIDEO), - _SYMBOL_NUMSTR(SYMBOL_LIST), - _SYMBOL_NUMSTR(SYMBOL_OK), - _SYMBOL_NUMSTR(SYMBOL_CLOSE), - _SYMBOL_NUMSTR(SYMBOL_POWER), - _SYMBOL_NUMSTR(SYMBOL_SETTINGS), - _SYMBOL_NUMSTR(SYMBOL_TRASH), - _SYMBOL_NUMSTR(SYMBOL_HOME), - _SYMBOL_NUMSTR(SYMBOL_DOWNLOAD), - _SYMBOL_NUMSTR(SYMBOL_DRIVE), - _SYMBOL_NUMSTR(SYMBOL_REFRESH), - _SYMBOL_NUMSTR(SYMBOL_MUTE), - _SYMBOL_NUMSTR(SYMBOL_VOLUME_MID), - _SYMBOL_NUMSTR(SYMBOL_VOLUME_MAX), - _SYMBOL_NUMSTR(SYMBOL_IMAGE), - _SYMBOL_NUMSTR(SYMBOL_EDIT), - _SYMBOL_NUMSTR(SYMBOL_PREV), - _SYMBOL_NUMSTR(SYMBOL_PLAY), - _SYMBOL_NUMSTR(SYMBOL_PAUSE), - _SYMBOL_NUMSTR(SYMBOL_STOP), - _SYMBOL_NUMSTR(SYMBOL_NEXT), - _SYMBOL_NUMSTR(SYMBOL_EJECT), - _SYMBOL_NUMSTR(SYMBOL_LEFT), - _SYMBOL_NUMSTR(SYMBOL_RIGHT), - _SYMBOL_NUMSTR(SYMBOL_PLUS), - _SYMBOL_NUMSTR(SYMBOL_MINUS), - _SYMBOL_NUMSTR(SYMBOL_WARNING), - _SYMBOL_NUMSTR(SYMBOL_SHUFFLE), - _SYMBOL_NUMSTR(SYMBOL_UP), - _SYMBOL_NUMSTR(SYMBOL_DOWN), - _SYMBOL_NUMSTR(SYMBOL_LOOP), - _SYMBOL_NUMSTR(SYMBOL_DIRECTORY), - _SYMBOL_NUMSTR(SYMBOL_UPLOAD), - _SYMBOL_NUMSTR(SYMBOL_CALL), - _SYMBOL_NUMSTR(SYMBOL_CUT), - _SYMBOL_NUMSTR(SYMBOL_COPY), - _SYMBOL_NUMSTR(SYMBOL_SAVE), - _SYMBOL_NUMSTR(SYMBOL_CHARGE), - _SYMBOL_NUMSTR(SYMBOL_BELL), - _SYMBOL_NUMSTR(SYMBOL_KEYBOARD), - _SYMBOL_NUMSTR(SYMBOL_GPS), - _SYMBOL_NUMSTR(SYMBOL_FILE), - _SYMBOL_NUMSTR(SYMBOL_WIFI), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_FULL), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_3), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_2), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_1), - _SYMBOL_NUMSTR(SYMBOL_BATTERY_EMPTY), - _SYMBOL_NUMSTR(SYMBOL_BLUETOOTH), - _SYMBOL_NUMSTR(SYMBOL_DUMMY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_AUDIO), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VIDEO), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LIST), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_OK), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CLOSE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_POWER), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SETTINGS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_TRASH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_HOME), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWNLOAD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DRIVE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_REFRESH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_MUTE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MID), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MAX), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_IMAGE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_EDIT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PREV), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLAY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PAUSE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_STOP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_NEXT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_EJECT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LEFT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_RIGHT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLUS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_MINUS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_WARNING), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SHUFFLE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_UP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWN), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_LOOP), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DIRECTORY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_UPLOAD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CALL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CUT), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_COPY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_SAVE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_CHARGE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BELL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_KEYBOARD), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_GPS), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_FILE), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_WIFI), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_FULL), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_3), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_2), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_1), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_EMPTY), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_BLUETOOTH), + _LV_SYMBOL_NUMSTR(LV_SYMBOL_DUMMY), }; -#undef _SYMBOL_VALUE1 -#undef _SYMBOL_VALUE3 +#undef _LV_SYMBOL_VALUE1 +#undef _LV_SYMBOL_VALUE3 -#define _SYMBOL_STR_(x) #x -#define _SYMBOL_STR(x) _SYMBOL_STR_(x) -#define _SYMBOL_CHAR(c) \x ## c -#define _SYMBOL_VALUE1(x) _SYMBOL_STR(_SYMBOL_CHAR(x)) -#define _SYMBOL_VALUE3(x, y, z) _SYMBOL_STR(_SYMBOL_CHAR(x)_SYMBOL_CHAR(y)_SYMBOL_CHAR(z)) +#define _LV_SYMBOL_STR_(x) #x +#define _LV_SYMBOL_STR(x) _LV_SYMBOL_STR_(x) +#define _LV_SYMBOL_CHAR(c) \x ## c +#define _LV_SYMBOL_VALUE1(x) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)) +#define _LV_SYMBOL_VALUE3(x, y, z) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)_LV_SYMBOL_CHAR(y)_LV_SYMBOL_CHAR(z)) #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_SYMBOL_DEF_H*/ +#endif /*LV_LV_SYMBOL_DEF_H*/ diff --git a/lv_misc/lv_task.c b/lv_misc/lv_task.c index aac9c12cc7d3..c43213a71c9c 100644 --- a/lv_misc/lv_task.c +++ b/lv_misc/lv_task.c @@ -224,7 +224,7 @@ void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio) { /*Find the tasks with new priority*/ lv_task_t * i; - LL_READ(LV_GC_ROOT(_lv_task_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i) { if(i->prio <= prio) { if(i != lv_task_p) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, i); break; diff --git a/lv_objx/lv_arc.c b/lv_objx/lv_arc.c index 7f4d677e3282..e11ebe7e08b0 100644 --- a/lv_objx/lv_arc.c +++ b/lv_objx/lv_arc.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_arc.h" -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 #include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_arc.h" diff --git a/lv_objx/lv_arc.h b/lv_objx/lv_arc.h index 76231d875fb7..b37efee2e562 100644 --- a/lv_objx/lv_arc.h +++ b/lv_objx/lv_arc.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 #include "../lv_core/lv_obj.h" @@ -118,7 +118,7 @@ lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type); * MACROS **********************/ -#endif /*USE_LV_ARC*/ +#endif /*LV_USE_ARC*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 323b22807ca6..e0735ce1bdc1 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -9,7 +9,7 @@ * INCLUDES *********************/ #include "lv_bar.h" -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -126,7 +126,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) */ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); @@ -142,7 +142,7 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) ext->cur_value = new_value; lv_obj_invalidate(bar); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*No animation in progress -> simply set the values*/ if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { ext->anim_start = ext->cur_value; @@ -329,7 +329,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } else if(mode == LV_DESIGN_DRAW_MAIN) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 ancestor_design_f(bar, mask, mode); #else /* Draw the borders later if the bar is focused. @@ -413,7 +413,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode lv_draw_rect(&indic_area, mask, style_indic, opa_scale); } } else if(mode == LV_DESIGN_DRAW_POST) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*Draw the border*/ if(lv_obj_is_focused(bar)) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); diff --git a/lv_objx/lv_bar.h b/lv_objx/lv_bar.h index 0501f4cf3aef..c9e98d25a8a8 100644 --- a/lv_objx/lv_bar.h +++ b/lv_objx/lv_bar.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 #include "../lv_core/lv_obj.h" #include "lv_cont.h" @@ -151,7 +151,7 @@ lv_style_t * lv_bar_get_style(const lv_obj_t *bar, lv_bar_style_t type); * MACROS **********************/ -#endif /*USE_LV_BAR*/ +#endif /*LV_USE_BAR*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index 03ff1559dcfc..9ce2c56e0fe8 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -8,7 +8,7 @@ *********************/ #include "lv_btn.h" -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 #include #include "../lv_core/lv_group.h" @@ -34,7 +34,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val); static void lv_btn_ink_effect_anim_ready(void * p); #endif @@ -45,7 +45,7 @@ static void lv_btn_ink_effect_anim_ready(void * p); static lv_signal_cb_t ancestor_signal; static lv_design_cb_t ancestor_design; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT static lv_coord_t ink_act_value; static lv_obj_t * ink_obj; static lv_btn_state_t ink_bg_state; @@ -96,7 +96,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina; ext->toggle = 0; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ext->ink_in_time = 0; ext->ink_wait_time = 0; ext->ink_out_time = 0; @@ -131,7 +131,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) lv_btn_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->state = copy_ext->state; ext->toggle = copy_ext->toggle; -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ext->ink_in_time = copy_ext->ink_in_time; ext->ink_wait_time = copy_ext->ink_wait_time; ext->ink_out_time = copy_ext->ink_out_time; @@ -209,13 +209,13 @@ void lv_btn_toggle(lv_obj_t * btn) */ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_in_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -227,13 +227,13 @@ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_wait_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -244,13 +244,13 @@ void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) */ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_out_time = time; #else (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or USE_LV_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") #endif } @@ -321,7 +321,7 @@ bool lv_btn_get_toggle(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_in_time; #else @@ -338,7 +338,7 @@ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_wait_time; #else @@ -353,7 +353,7 @@ uint16_t lv_btn_get_ink_wait_time(const lv_obj_t * btn) */ uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); return ext->ink_in_time; #else @@ -418,7 +418,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode return false; } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn != ink_obj) { ancestor_design(btn, mask, mode); } else { @@ -508,19 +508,19 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) /*Refresh the state*/ if(ext->state == LV_BTN_STATE_REL) { lv_btn_set_state(btn, LV_BTN_STATE_PR); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ink_bg_state = LV_BTN_STATE_REL; ink_top_state = LV_BTN_STATE_PR; #endif } else if(ext->state == LV_BTN_STATE_TGL_REL) { lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT ink_bg_state = LV_BTN_STATE_TGL_REL; ink_top_state = LV_BTN_STATE_TGL_PR; #endif } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Forget the old inked button*/ if(ink_obj != NULL && ink_obj != btn) { lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); @@ -586,7 +586,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Draw the toggled state in the inking instead*/ if(ext->toggle) { ink_top_state = ext->state; @@ -631,7 +631,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); } } else if(sign == LV_SIGNAL_CLEANUP) { -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); ink_obj = NULL; @@ -649,7 +649,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) return res; } -#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT +#if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /** * The animator function of inking. CAlled to increase the radius of ink @@ -699,6 +699,6 @@ static void lv_btn_ink_effect_anim_ready(void * p) ink_obj = NULL; } } -#endif /*USE_LV_ANIMATION*/ +#endif /*LV_USE_ANIMATION*/ #endif diff --git a/lv_objx/lv_btn.h b/lv_objx/lv_btn.h index c49b0b176c8d..7612cb44ed81 100644 --- a/lv_objx/lv_btn.h +++ b/lv_objx/lv_btn.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif #include "lv_cont.h" @@ -289,7 +289,7 @@ lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type); * MACROS **********************/ -#endif /*USE_LV_BUTTON*/ +#endif /*LV_USE_BUTTON*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index bcd88239bfeb..d10bf848b964 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_btnm.h" -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -765,7 +765,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } - #if USE_LV_GROUP + #if LV_USE_GROUP /*Leave the clicked button when releases if this not the focused object in a group*/ lv_group_t * g = lv_obj_get_group(btnm); if(lv_group_get_focused(g) != btnm) { @@ -782,7 +782,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = LV_BTNM_PR_NONE; lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_POINTER) { diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 8fa67e8f6e04..7cb87efe70f5 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 #include "../lv_core/lv_obj.h" #include "lv_label.h" @@ -269,7 +269,7 @@ bool lv_btnm_get_recolor(const lv_obj_t * btnm); * MACROS **********************/ -#endif /*USE_LV_BTNM*/ +#endif /*LV_USE_BTNM*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 971609407a15..2b390582c56e 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_calendar.h" -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 #include "../lv_draw/lv_draw.h" #include "../lv_hal/lv_hal_indev.h" @@ -690,14 +690,14 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) /*Add the left arrow*/ lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.hor; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; header_area.x1 = header_area.x2 - ext->style_header->body.padding.hor - - lv_txt_get_width(SYMBOL_RIGHT, strlen(SYMBOL_RIGHT), arrow_style->text.font, + lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); } diff --git a/lv_objx/lv_calendar.h b/lv_objx/lv_calendar.h index e82c909b4f18..9064ee2fba7e 100644 --- a/lv_objx/lv_calendar.h +++ b/lv_objx/lv_calendar.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 #include "../lv_core/lv_obj.h" @@ -214,7 +214,7 @@ lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_ * MACROS **********************/ -#endif /*USE_LV_CALENDAR*/ +#endif /*LV_USE_CALENDAR*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_canvas.c b/lv_objx/lv_canvas.c index 3c0ab20a30dc..3fe54c5897c9 100644 --- a/lv_objx/lv_canvas.c +++ b/lv_objx/lv_canvas.c @@ -8,7 +8,7 @@ *********************/ #include #include "lv_canvas.h" -#if USE_LV_CANVAS != 0 +#if LV_USE_CANVAS != 0 /********************* * DEFINES diff --git a/lv_objx/lv_canvas.h b/lv_objx/lv_canvas.h index 74e1134ef70c..f8d6e94d4a24 100644 --- a/lv_objx/lv_canvas.h +++ b/lv_objx/lv_canvas.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CANVAS != 0 +#if LV_USE_CANVAS != 0 #include "../lv_core/lv_obj.h" #include "../lv_objx/lv_img.h" @@ -220,7 +220,7 @@ void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_colo * MACROS **********************/ -#endif /*USE_LV_CANVAS*/ +#endif /*LV_USE_CANVAS*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 9145a5b27e1a..8f5c3bfd33fe 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_cb.h" -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -283,7 +283,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig if(mode == LV_DESIGN_COVER_CHK) { return ancestor_bullet_design(bullet, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_GROUP +#if LV_USE_GROUP /* If the check box is the active in a group and * the background is not visible (transparent) * then activate the style of the bullet*/ @@ -301,7 +301,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig #endif ancestor_bullet_design(bullet, mask, mode); -#if USE_LV_GROUP +#if LV_USE_GROUP bullet->style_p = style_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_cb.h b/lv_objx/lv_cb.h index f9519355f72d..5c6c0b04e3e4 100644 --- a/lv_objx/lv_cb.h +++ b/lv_objx/lv_cb.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_cb: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_cb: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_cb: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_cb: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -153,7 +153,7 @@ lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type); * MACROS **********************/ -#endif /*USE_LV_CB*/ +#endif /*LV_USE_CB*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 39e394ac2e40..18f156a17273 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_chart.h" -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -257,7 +257,7 @@ void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt) if(point_cnt < 1) point_cnt = 1; - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { if(ser->start_point != 0) { lv_coord_t * new_points = lv_mem_alloc(sizeof(lv_coord_t) * point_cnt); lv_mem_assert(new_points); @@ -511,7 +511,7 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(sign == LV_SIGNAL_CLEANUP) { lv_coord_t ** datal; lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - LL_READ(ext->series_ll, datal) { + LV_LL_READ(ext->series_ll, datal) { lv_mem_free(*datal); } lv_ll_clear(&ext->series_ll); @@ -620,7 +620,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) style.line.width = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; p1.x = 0 + x_ofs; @@ -679,7 +679,7 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) style_point.body.radius = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style_point.body.main_color = ser->color; style_point.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); @@ -737,7 +737,7 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) x_act += chart->coords.x1 + x_ofs; /*Draw the current point of all data line*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { rects.body.main_color = ser->color; rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); col_a.x1 = x_act; @@ -787,7 +787,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas style.line.width = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; p1.x = 0 + x_ofs; diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index baea9d0f4c0e..7fc8af114bfd 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 #include "../lv_core/lv_obj.h" #include "lv_line.h" @@ -253,7 +253,7 @@ void lv_chart_refresh(lv_obj_t * chart); * MACROS **********************/ -#endif /*USE_LV_CHART*/ +#endif /*LV_USE_CHART*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index a8789fb97f18..81fb4e3feb6f 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -8,7 +8,7 @@ *********************/ #include "lv_cont.h" -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 #include #include @@ -359,7 +359,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ lv_coord_t last_cord = style->body.padding.ver; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -409,7 +409,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) /* Align the children */ lv_coord_t last_cord = style->body.padding.hor; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -431,7 +431,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) uint32_t obj_num = 0; lv_coord_t h_tot = 0; - LL_READ(cont->child_ll, child) { + LV_LL_READ(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; h_tot += lv_obj_get_height(child) + style->body.padding.inner; @@ -448,7 +448,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) /* Align the children */ lv_coord_t last_cord = - (h_tot / 2); - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -582,7 +582,7 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_coord_t act_x = style->body.padding.hor; lv_coord_t act_y = style->body.padding.ver; uint16_t obj_cnt = 0; - LL_READ_BACK(cont->child_ll, child) { + LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -648,7 +648,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) tight_area.x2 = LV_COORD_MIN; tight_area.y2 = LV_COORD_MIN; - LL_READ(cont->child_ll, i) { + LV_LL_READ(cont->child_ll, i) { if(lv_obj_get_hidden(i) != false) continue; tight_area.x1 = LV_MATH_MIN(tight_area.x1, i->coords.x1); tight_area.y1 = LV_MATH_MIN(tight_area.y1, i->coords.y1); @@ -713,7 +713,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) /*Tell the children the parent's size has changed*/ lv_obj_t * i; - LL_READ(cont->child_ll, i) { + LV_LL_READ(cont->child_ll, i) { i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } } diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index cf78574b5867..6f24056e0005 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 #include "../lv_core/lv_obj.h" @@ -204,7 +204,7 @@ static inline lv_style_t * lv_cont_get_style(const lv_obj_t *cont) * MACROS **********************/ -#endif /*USE_LV_CONT*/ +#endif /*LV_USE_CONT*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index e73bea98aa8f..db39452eeb34 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_ddlist.h" -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" @@ -21,7 +21,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_DDLIST_ANIM_TIME # define LV_DDLIST_ANIM_TIME 200 /*ms*/ # endif @@ -256,7 +256,7 @@ void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en) void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -434,7 +434,7 @@ lv_label_align_t lv_ddlist_get_align(const lv_obj_t *ddlist) */ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -450,7 +450,7 @@ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) */ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -581,7 +581,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.opa = sel_style->text.opa; lv_area_t area_arrow; area_arrow.x2 = ddlist->coords.x2 - style->body.padding.hor; - area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(SYMBOL_DOWN, strlen(SYMBOL_DOWN), sel_style->text.font, 0, 0); + area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0); area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; area_arrow.y2 = area_arrow.y1 + font_h; @@ -593,7 +593,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig if (area_ok) { lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, - SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ + LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ } } } @@ -625,7 +625,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_CLEANUP) { ext->label = NULL; } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -692,7 +692,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par ext->sel_opt_id_ori = ext->sel_opt_id; ext->opened = 0; lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ @@ -817,7 +817,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) */ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -840,7 +840,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) if(anim_en == 0) { lv_obj_set_height(ddlist, new_height); lv_ddlist_pos_current_option(ddlist); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then it will overwrite this changes*/ } else { lv_anim_t a; diff --git a/lv_objx/lv_ddlist.h b/lv_objx/lv_ddlist.h index 9e45b9ac75b6..390352ea9969 100644 --- a/lv_objx/lv_ddlist.h +++ b/lv_objx/lv_ddlist.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_ddlist: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_ddlist: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -257,7 +257,7 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en); * MACROS **********************/ -#endif /*USE_LV_DDLIST*/ +#endif /*LV_USE_DDLIST*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index 34da4bd1ee10..f4a2c3805cb6 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_gauge.h" -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" diff --git a/lv_objx/lv_gauge.h b/lv_objx/lv_gauge.h index beef9dc554dc..b37be3909f16 100644 --- a/lv_objx/lv_gauge.h +++ b/lv_objx/lv_gauge.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 /*Testing of dependencies*/ -#if USE_LV_LMETER == 0 -#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (USE_LV_LMETER 1) " +#if LV_USE_LMETER == 0 +#error "lv_gauge: lv_lmeter is required. Enable it in lv_conf.h (LV_USE_LMETER 1) " #endif #include "../lv_core/lv_obj.h" @@ -213,7 +213,7 @@ static inline lv_style_t * lv_gauge_get_style(const lv_obj_t *gauge) * MACROS **********************/ -#endif /*USE_LV_GAUGE*/ +#endif /*LV_USE_GAUGE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 72d19229be2f..5bdb29226884 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -7,11 +7,11 @@ * INCLUDES *********************/ #include "lv_img.h" -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 /*Testing of dependencies*/ -#if USE_LV_LABEL == 0 -#error "lv_img: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_img: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_i18n.h" @@ -125,7 +125,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) lv_img_src_t src_type = lv_img_src_get_type(src_img); lv_img_ext_t * ext = lv_obj_get_ext_attr(img); -#if USE_LV_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO +#if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 86c2170b9487..aa97b84f4816 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_fs.h" @@ -165,7 +165,7 @@ static inline bool lv_img_get_upscale(const lv_obj_t * img) /*Use this macro to declare an image in a c file*/ #define LV_IMG_DECLARE(var_name) extern const lv_img_dsc_t var_name; -#endif /*USE_LV_IMG*/ +#endif /*LV_USE_IMG*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index 83f5ecbe5564..ed59c4f8f0e8 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_imgbtn.h" -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 /********************* * DEFINES diff --git a/lv_objx/lv_imgbtn.h b/lv_objx/lv_imgbtn.h index 09b5dc045d00..a3d4e7ff409f 100644 --- a/lv_objx/lv_imgbtn.h +++ b/lv_objx/lv_imgbtn.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_imgbtn: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_imgbtn: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif #include "../lv_core/lv_obj.h" @@ -219,7 +219,7 @@ lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type * MACROS **********************/ -#endif /*USE_LV_IMGBTN*/ +#endif /*LV_USE_IMGBTN*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 660663f519b2..e262fc2e93f3 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_kb.h" -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 #include "lv_ta.h" #include "../lv_themes/lv_theme.h" @@ -36,7 +36,7 @@ static const char * kb_map_lc[] = { "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Bksp", "\n", "\226ABC", "\203a", "\203s", "\203d", "\203f", "\203g", "\203h", "\203j", "\203k", "\203l", "\207Enter", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { @@ -50,7 +50,7 @@ static const char * kb_map_uc[] = { "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Bksp", "\n", "\226abc", "\203A", "\203S", "\203D", "\203F", "\203G", "\203H", "\203J", "\203K", "\203L", "\207Enter", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { @@ -64,7 +64,7 @@ static const char * kb_map_spec[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Bksp", "\n", "\222abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", - "\202"SYMBOL_CLOSE, "\202"SYMBOL_LEFT, "\206 ", "\202"SYMBOL_RIGHT, "\202"SYMBOL_OK, "" + "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { @@ -75,10 +75,10 @@ static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { }; static const char * kb_map_num[] = { - "1", "2", "3", "\202"SYMBOL_CLOSE, "\n", - "4", "5", "6", "\202"SYMBOL_OK, "\n", + "1", "2", "3", "\202"LV_SYMBOL_CLOSE, "\n", + "4", "5", "6", "\202"LV_SYMBOL_OK, "\n", "7", "8", "9", "\202Bksp", "\n", - "+/-", "0", ".", SYMBOL_LEFT, SYMBOL_RIGHT, "" + "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, "" }; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { @@ -403,14 +403,14 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) lv_btnm_set_map(kb, kb_map_spec); lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return LV_RES_OK; - } else if(strcmp(txt, SYMBOL_CLOSE) == 0) { + } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_CANCEL); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return res; - } else if(strcmp(txt, SYMBOL_OK) == 0) { + } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ @@ -425,8 +425,8 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) if(ext->ta == NULL) return res; if(strcmp(txt, "Enter") == 0)lv_ta_add_char(ext->ta, '\n'); - else if(strcmp(txt, SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); - else if(strcmp(txt, SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); + else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); + else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); else if(strcmp(txt, "Bksp") == 0) lv_ta_del_char(ext->ta); else if(strcmp(txt, "+/-") == 0) { uint16_t cur = lv_ta_get_cursor_pos(ext->ta); diff --git a/lv_objx/lv_kb.h b/lv_objx/lv_kb.h index 335df1eef35b..1ae5e31561db 100644 --- a/lv_objx/lv_kb.h +++ b/lv_objx/lv_kb.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 /*Testing of dependencies*/ -#if USE_LV_BTNM == 0 -#error "lv_kb: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_kb: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_TA == 0 -#error "lv_kb: lv_ta is required. Enable it in lv_conf.h (USE_LV_TA 1) " +#if LV_USE_TA == 0 +#error "lv_kb: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) " #endif #include "../lv_core/lv_obj.h" @@ -160,7 +160,7 @@ lv_style_t * lv_kb_get_style(const lv_obj_t *kb, lv_kb_style_t type); * MACROS **********************/ -#endif /*USE_LV_KB*/ +#endif /*LV_USE_KB*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index d166cd615800..1d3f6d4fcdc5 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_label.h" -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" @@ -40,7 +40,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ static void lv_label_refr_text(lv_obj_t * label); static void lv_label_revert_dots(lv_obj_t * label); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x); static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y); #endif @@ -244,7 +244,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Delete the old animation (if exists)*/ lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_x); lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_y); @@ -635,7 +635,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ lv_opa_t opa_scale = lv_obj_get_opa_scale(label); lv_obj_get_coords(label, &coords); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(label); if(lv_group_get_focused(g) == label) { lv_draw_rect(&coords, mask, style, opa_scale); @@ -766,7 +766,7 @@ static void lv_label_refr_text(lv_obj_t * label) /*Start scrolling if the label is greater then its parent*/ if(ext->long_mode == LV_LABEL_LONG_SCROLL) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_obj_t * parent = lv_obj_get_parent(label); /*Delete the potential previous scroller animations*/ @@ -802,7 +802,7 @@ static void lv_label_refr_text(lv_obj_t * label) } /*In roll mode keep the size but start offset animations*/ else if(ext->long_mode == LV_LABEL_LONG_ROLL) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t anim; anim.var = label; anim.repeat = 1; @@ -926,7 +926,7 @@ static void lv_label_revert_dots(lv_obj_t * label) ext->dot_end = LV_LABEL_DOT_END_INV; } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); diff --git a/lv_objx/lv_label.h b/lv_objx/lv_label.h index 84f5b5e5a82f..2acc9c965e4a 100644 --- a/lv_objx/lv_label.h +++ b/lv_objx/lv_label.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_font.h" @@ -265,7 +265,7 @@ void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); * MACROS **********************/ -#endif /*USE_LV_LABEL*/ +#endif /*LV_USE_LABEL*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_led.c b/lv_objx/lv_led.c index 839bcf588667..9edefe0c6ba3 100644 --- a/lv_objx/lv_led.c +++ b/lv_objx/lv_led.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_led.h" -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 #include "../lv_themes/lv_theme.h" #include "../lv_draw/lv_draw.h" diff --git a/lv_objx/lv_led.h b/lv_objx/lv_led.h index 25e48a79c2ef..8711570b5534 100644 --- a/lv_objx/lv_led.h +++ b/lv_objx/lv_led.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 #include "../lv_core/lv_obj.h" @@ -107,7 +107,7 @@ static inline lv_style_t* lv_led_get_style(const lv_obj_t *led) * MACROS **********************/ -#endif /*USE_LV_LED*/ +#endif /*LV_USE_LED*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_line.c b/lv_objx/lv_line.c index 882ba3620ca7..702eda68b7f8 100644 --- a/lv_objx/lv_line.c +++ b/lv_objx/lv_line.c @@ -8,7 +8,7 @@ *********************/ #include "lv_line.h" -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_math.h" #include diff --git a/lv_objx/lv_line.h b/lv_objx/lv_line.h index 377d3998134b..d0c546062cfe 100644 --- a/lv_objx/lv_line.h +++ b/lv_objx/lv_line.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 #include "../lv_core/lv_obj.h" @@ -149,7 +149,7 @@ static inline bool lv_line_get_upscale(const lv_obj_t * line) * MACROS **********************/ -#endif /*USE_LV_LINE*/ +#endif /*LV_USE_LINE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 67823f7d353f..054905af4a1d 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_list.h" -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -19,7 +19,7 @@ *********************/ #define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_LIST_FOCUS_TIME # define LV_LIST_FOCUS_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif @@ -43,13 +43,13 @@ static void lv_list_btn_single_selected(lv_obj_t *btn); /********************** * STATIC VARIABLES **********************/ -#if USE_LV_IMG +#if LV_USE_IMG static lv_signal_cb_t img_signal; #endif static lv_signal_cb_t label_signal; static lv_signal_cb_t ancestor_page_signal; static lv_signal_cb_t ancestor_btn_signal; -#if USE_LV_GROUP +#if LV_USE_GROUP /*Used to make the last clicked button pressed (selected) when the list become focused and `click_focus == 1`*/ static lv_obj_t * last_clicked_btn; #endif @@ -93,7 +93,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->single_mode = false; ext->size = 0; -#if USE_LV_GROUP +#if LV_USE_GROUP ext->last_sel = NULL; ext->selected_btn = NULL; #endif @@ -128,7 +128,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_t * copy_btn = lv_list_get_next_btn(copy, NULL); while(copy_btn) { const void * img_src = NULL; -#if USE_LV_IMG +#if LV_USE_IMG lv_obj_t * copy_img = lv_list_get_btn_img(copy_btn); if(copy_img) img_src = lv_img_get_src(copy_img); #endif @@ -210,7 +210,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, w -= pad_hor_tot * 2; lv_obj_set_width(liste, w); -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 lv_obj_t * img = NULL; if(img_src) { img = lv_img_create(liste, NULL); @@ -229,7 +229,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - btn_hor_pad); if(label_signal == NULL) label_signal = lv_obj_get_signal_func(label); } -#if USE_LV_GROUP +#if LV_USE_GROUP /* If this is the first item to be added to the list and the list is * focussed, select it */ { @@ -283,7 +283,7 @@ void lv_list_set_single_mode(lv_obj_t *list, bool mode) ext->single_mode = mode; } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Make a button selected @@ -324,7 +324,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -446,7 +446,7 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn) */ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 lv_obj_t * img = lv_obj_get_child(btn, NULL); if(img == NULL) return NULL; @@ -548,7 +548,7 @@ uint32_t lv_list_get_size(const lv_obj_t * list) return ext->size; } -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the currently selected button * @param list pointer to a list object @@ -643,7 +643,7 @@ void lv_list_up(const lv_obj_t * list) if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -686,7 +686,7 @@ void lv_list_down(const lv_obj_t * list) if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -718,7 +718,7 @@ void lv_list_down(const lv_obj_t * list) void lv_list_focus(const lv_obj_t * btn, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -757,7 +757,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) refr_btn_width(list); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { @@ -796,7 +796,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) #endif } else if(sign == LV_SIGNAL_DEFOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*De-select the selected btn*/ lv_list_set_btn_selected(list, NULL); last_clicked_btn = NULL; /*button click will be set if click happens before focus*/ @@ -808,7 +808,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) *editable = true; } else if(sign == LV_SIGNAL_CONTROLL) { -#if USE_LV_GROUP +#if LV_USE_GROUP char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -882,7 +882,7 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->page.scroll_prop_ip = 0; -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(list); if(lv_group_get_focused(g) == list && lv_indev_is_dragging(lv_indev_get_act()) == false) { /* Is the list is focused then be sure only the button being released @@ -915,7 +915,7 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para } else if(sign == LV_SIGNAL_CLEANUP) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); lv_obj_t * sel = lv_list_get_btn_selected(list); if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn)); diff --git a/lv_objx/lv_list.h b/lv_objx/lv_list.h index 5c6816f12f90..ccf294b52fc7 100644 --- a/lv_objx/lv_list.h +++ b/lv_objx/lv_list.h @@ -19,19 +19,19 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_list: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_list: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_BTN == 0 -#error "lv_list: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_list: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_list: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_list: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif @@ -58,7 +58,7 @@ typedef struct lv_style_t *style_img; /*Style of the list element images on buttons*/ uint32_t size; /*the number of items(buttons) in the list*/ bool single_mode; /* whether single selected mode is enabled */ -#if USE_LV_GROUP +#if LV_USE_GROUP lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ lv_obj_t * selected_btn; /* The button is currently being selected*/ #endif @@ -129,7 +129,7 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index); */ void lv_list_set_single_mode(lv_obj_t *list, bool mode); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Make a button selected. Can be used while navigating in the list with a keypad. @@ -245,7 +245,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn); */ uint32_t lv_list_get_size(const lv_obj_t * list); -#if USE_LV_GROUP +#if LV_USE_GROUP /** * Get the currently selected button. Can be used while navigating in the list with a keypad. * @param list pointer to a list object @@ -327,7 +327,7 @@ void lv_list_focus(const lv_obj_t *btn, bool anim_en); * MACROS **********************/ -#endif /*USE_LV_LIST*/ +#endif /*LV_USE_LIST*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index 06b3fbed6bd4..c912f9d3d11c 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_lmeter.h" -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -257,7 +257,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig memcpy(&style_tmp, style, sizeof(lv_style_t)); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(lmeter); if(lv_group_get_focused(g) == lmeter) { style_tmp.line.width += 1; diff --git a/lv_objx/lv_lmeter.h b/lv_objx/lv_lmeter.h index 0235d34f9876..7852b870edef 100644 --- a/lv_objx/lv_lmeter.h +++ b/lv_objx/lv_lmeter.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 #include "../lv_core/lv_obj.h" @@ -144,7 +144,7 @@ static inline lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) * MACROS **********************/ -#endif /*USE_LV_LMETER*/ +#endif /*LV_USE_LMETER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index 42118c66b1b0..ad86867b9687 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_mbox.h" -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 #include "../lv_core/lv_group.h" #include "../lv_themes/lv_theme.h" @@ -19,7 +19,7 @@ * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_MBOX_CLOSE_ANIM_TIME # define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */ # endif @@ -197,7 +197,7 @@ void lv_mbox_set_action(lv_obj_t * mbox, lv_btnm_action_t action) void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -211,7 +211,7 @@ void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) */ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); if(ext->anim_time != 0) { @@ -236,7 +236,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) */ void lv_mbox_stop_auto_close(lv_obj_t * mbox) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_del(mbox, NULL); #else (void)mbox; /*Unused*/ @@ -449,7 +449,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't (Only the message box's container) * So so some actions here instead*/ if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_ENCODER) { diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index 0526fae88fc4..d3c0deffbc44 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -19,19 +19,19 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_mbox: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_mbox: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif -#if USE_LV_BTNM == 0 -#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_mbox: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_mbox: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif @@ -202,7 +202,7 @@ lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox); **********************/ -#endif /*USE_LV_MBOX*/ +#endif /*LV_USE_MBOX*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_objx_templ.c b/lv_objx/lv_objx_templ.c index f605450ca811..fc154e982e1a 100644 --- a/lv_objx/lv_objx_templ.c +++ b/lv_objx/lv_objx_templ.c @@ -14,7 +14,7 @@ * INCLUDES *********************/ //#include "lv_templ.h" /*TODO uncomment this*/ -#if USE_LV_TEMPL != 0 +#if LV_USE_TEMPL != 0 /********************* * DEFINES diff --git a/lv_objx/lv_objx_templ.h b/lv_objx/lv_objx_templ.h index ab6d09066131..13a75d1797d0 100644 --- a/lv_objx/lv_objx_templ.h +++ b/lv_objx/lv_objx_templ.h @@ -27,7 +27,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TEMPL != 0 +#if LV_USE_TEMPL != 0 #include "../lv_core/lv_obj.h" @@ -102,7 +102,7 @@ lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type); * MACROS **********************/ -#endif /*USE_LV_TEMPL*/ +#endif /*LV_USE_TEMPL*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index b2fef00bb453..380789f569b2 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "../lv_objx/lv_page.h" -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -404,7 +404,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #else /* Be sure there is no position changing animation in progress @@ -473,7 +473,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) if(anim_time == 0) { lv_obj_set_y(ext->scrl, scrlable_y); lv_obj_set_x(ext->scrl, scrlable_x); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION } else { lv_anim_t a; a.act_time = 0; @@ -505,7 +505,7 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) { lv_obj_t * scrl = lv_page_get_scrl(page); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_x(scrl); @@ -534,7 +534,7 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) { lv_obj_t * scrl = lv_page_get_scrl(page); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = scrl; a.start = lv_obj_get_y(scrl); @@ -561,7 +561,7 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) */ void lv_page_start_edge_flash(lv_obj_t * page) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_page_ext_t * ext = lv_obj_get_ext_attr(page); if(ext->edge_flash.enabled) { lv_anim_t a; @@ -704,7 +704,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo if(mode == LV_DESIGN_COVER_CHK) { return ancestor_design(scrl, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { -#if USE_LV_GROUP +#if LV_USE_GROUP /* If the page is focused in a group and * the background object is not visible (transparent) * then "activate" the style of the scrollable*/ @@ -730,7 +730,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo #endif ancestor_design(scrl, mask, mode); -#if USE_LV_GROUP +#if LV_USE_GROUP scrl->style_p = style_scrl_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { diff --git a/lv_objx/lv_page.h b/lv_objx/lv_page.h index 917ec0b486d7..365708669bfb 100644 --- a/lv_objx/lv_page.h +++ b/lv_objx/lv_page.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 /*Testing of dependencies*/ -#if USE_LV_CONT == 0 -#error "lv_page: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) " +#if LV_USE_CONT == 0 +#error "lv_page: lv_cont is required. Enable it in lv_conf.h (LV_USE_CONT 1) " #endif #include "lv_cont.h" @@ -388,7 +388,7 @@ void lv_page_start_edge_flash(lv_obj_t * page); * MACROS **********************/ -#endif /*USE_LV_PAGE*/ +#endif /*LV_USE_PAGE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_preload.c b/lv_objx/lv_preload.c index 20cd2a4f2f57..663c7ac7a1c6 100644 --- a/lv_objx/lv_preload.c +++ b/lv_objx/lv_preload.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_preload.h" -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 #include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_rect.h" @@ -172,7 +172,7 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_ * */ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); /*delete previous animation*/ @@ -235,7 +235,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type) } } -#endif //USE_LV_ANIMATION +#endif //LV_USE_ANIMATION } /*===================== diff --git a/lv_objx/lv_preload.h b/lv_objx/lv_preload.h index 4f12f0221c99..965c2e278e40 100644 --- a/lv_objx/lv_preload.h +++ b/lv_objx/lv_preload.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 /*Testing of dependencies*/ -#if USE_LV_ARC == 0 -#error "lv_preload: lv_arc is required. Enable it in lv_conf.h (USE_LV_ARC 1) " +#if LV_USE_ARC == 0 +#error "lv_preload: lv_arc is required. Enable it in lv_conf.h (LV_USE_ARC 1) " #endif -#if USE_LV_ANIMATION == 0 -#error "lv_preload: animations are required. Enable it in lv_conf.h (USE_LV_ANIMATION 1) " +#if LV_USE_ANIMATION == 0 +#error "lv_preload: animations are required. Enable it in lv_conf.h (LV_USE_ANIMATION 1) " #endif #include "../lv_core/lv_obj.h" @@ -159,7 +159,7 @@ void lv_preload_spinner_animation(void * ptr, int32_t val); * MACROS **********************/ -#endif /*USE_LV_PRELOAD*/ +#endif /*LV_USE_PRELOAD*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 4a6f41dd6bd1..fe50d975f6d1 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_roller.h" -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 #include "../lv_draw/lv_draw.h" #include "../lv_core/lv_group.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_ROLLER_ANIM_TIME # define LV_ROLLER_ANIM_TIME 200 /*ms*/ # endif @@ -144,7 +144,7 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align) */ void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -361,7 +361,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par refr_position(roller, false); } } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -385,7 +385,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } #endif } else if(sign == LV_SIGNAL_DEFOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP /*Revert the original state*/ if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) { ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori; @@ -406,7 +406,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/ lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ @@ -544,7 +544,7 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) */ static void refr_position(lv_obj_t * roller, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_obj_t * roller_scrl = lv_page_get_scrl(roller); @@ -560,7 +560,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) if(ext->ddlist.anim_time == 0 || anim_en == false) { lv_obj_set_y(roller_scrl, new_y); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = roller_scrl; a.start = lv_obj_get_y(roller_scrl); diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index 6301c1389277..f3779f5f2a48 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 /*Testing of dependencies*/ -#if USE_LV_DDLIST == 0 -#error "lv_roller: lv_ddlist is required. Enable it in lv_conf.h (USE_LV_DDLIST 1) " +#if LV_USE_DDLIST == 0 +#error "lv_roller: lv_ddlist is required. Enable it in lv_conf.h (LV_USE_DDLIST 1) " #endif #include "../lv_core/lv_obj.h" @@ -195,7 +195,7 @@ lv_style_t * lv_roller_get_style(const lv_obj_t *roller, lv_roller_style_t type) * MACROS **********************/ -#endif /*USE_LV_ROLLER*/ +#endif /*LV_USE_ROLLER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index f91a0b7cec17..503e7cb07f65 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_slider.h" -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 #include "../lv_core/lv_group.h" #include "../lv_draw/lv_draw.h" @@ -280,7 +280,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_bg.y2 -= slider_w > slider_h ? pad_ver_bg : 0; /*Pad only for horizontal slider*/ } -#if USE_LV_GROUP == 0 +#if LV_USE_GROUP == 0 lv_draw_rect(&area_bg, mask, style_bg, lv_obj_get_opa_scale(slider)); #else /* Draw the borders later if the slider is focused. @@ -357,7 +357,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } /*Before the knob add the border if required*/ -#if USE_LV_GROUP +#if LV_USE_GROUP /* Draw the borders later if the bar is focused. * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ if(lv_obj_is_focused(slider)) { @@ -503,7 +503,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par ext->drag_value = LV_SLIDER_NOT_PRESSED; -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(slider); bool editing = lv_group_get_editing(g); lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); diff --git a/lv_objx/lv_slider.h b/lv_objx/lv_slider.h index 6c0fb292a319..edf376d0802e 100644 --- a/lv_objx/lv_slider.h +++ b/lv_objx/lv_slider.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 /*Testing of dependencies*/ -#if USE_LV_BAR == 0 -#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (USE_LV_BAR 1) " +#if LV_USE_BAR == 0 +#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (LV_USE_BAR 1) " #endif #include "../lv_core/lv_obj.h" @@ -168,7 +168,7 @@ lv_style_t * lv_slider_get_style(const lv_obj_t *slider, lv_slider_style_t type) * MACROS **********************/ -#endif /*USE_LV_SLIDER*/ +#endif /*LV_USE_SLIDER*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 7a237f5334e3..7111db07c98b 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -8,7 +8,7 @@ *********************/ #include "lv_spinbox.h" -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_math.h" diff --git a/lv_objx/lv_spinbox.h b/lv_objx/lv_spinbox.h index ca576148753b..104715c7d945 100644 --- a/lv_objx/lv_spinbox.h +++ b/lv_objx/lv_spinbox.h @@ -20,11 +20,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 /*Testing of dependencies*/ -#if USE_LV_TA == 0 -#error "lv_spinbox: lv_ta is required. Enable it in lv_conf.h (USE_LV_TA 1) " +#if LV_USE_TA == 0 +#error "lv_spinbox: lv_ta is required. Enable it in lv_conf.h (LV_USE_TA 1) " #endif #include "../lv_core/lv_obj.h" @@ -192,7 +192,7 @@ void lv_spinbox_decrement(lv_obj_t * spinbox); * MACROS **********************/ -#endif /*USE_LV_SPINBOX*/ +#endif /*LV_USE_SPINBOX*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index cff895a5aa3f..62b8d7e7bab9 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -8,11 +8,11 @@ *********************/ #include "lv_sw.h" -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 /*Testing of dependencies*/ -#if USE_LV_SLIDER == 0 -#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (USE_LV_SLIDER 1) " +#if LV_USE_SLIDER == 0 +#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1) " #endif #include "../lv_themes/lv_theme.h" @@ -68,7 +68,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->changed = 0; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION ext->anim_time = 0; #endif ext->style_knob_off = ext->slider.style_knob; @@ -100,7 +100,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) lv_sw_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->style_knob_off = copy_ext->style_knob_off; ext->style_knob_on = copy_ext->style_knob_on; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION ext->anim_time = copy_ext->anim_time; #endif @@ -128,7 +128,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) */ void lv_sw_on(lv_obj_t * sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); @@ -143,7 +143,7 @@ void lv_sw_on(lv_obj_t * sw, bool anim) */ void lv_sw_off(lv_obj_t * sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); @@ -159,7 +159,7 @@ void lv_sw_off(lv_obj_t * sw, bool anim) */ bool lv_sw_toggle(lv_obj_t *sw, bool anim) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim = false; #endif @@ -200,7 +200,7 @@ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style) void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); ext->anim_time = anim_time; #endif @@ -246,7 +246,7 @@ lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) uint16_t lv_sw_get_anim_time(const lv_obj_t *sw) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); return ext->anim_time; #else diff --git a/lv_objx/lv_sw.h b/lv_objx/lv_sw.h index 9c0834962911..b8e72ef55338 100644 --- a/lv_objx/lv_sw.h +++ b/lv_objx/lv_sw.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 /*Testing of dependencies*/ -#if USE_LV_SLIDER == 0 -#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (USE_LV_SLIDER 1)" +#if LV_USE_SLIDER == 0 +#error "lv_sw: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1)" #endif #include "../lv_core/lv_obj.h" @@ -47,7 +47,7 @@ typedef struct lv_coord_t start_x; uint8_t changed :1; /*Indicates the switch state explicitly changed by drag*/ uint8_t slided :1; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION uint16_t anim_time; /*switch animation time */ #endif } lv_sw_ext_t; @@ -106,7 +106,7 @@ bool lv_sw_toggle(lv_obj_t *sw, bool anim); */ void lv_sw_set_style(lv_obj_t *sw, lv_sw_style_t type, lv_style_t *style); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Set the animation time of the switch * @param sw pointer to a switch object @@ -149,7 +149,7 @@ uint16_t lv_sw_get_anim_time(const lv_obj_t *sw); * MACROS **********************/ -#endif /*USE_LV_SW*/ +#endif /*LV_USE_SW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 76c0e90c73b5..4c11b1a396a3 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -8,7 +8,7 @@ * INCLUDES *********************/ #include "lv_ta.h" -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 #include "../lv_core/lv_group.h" #include "../lv_core/lv_refr.h" @@ -45,7 +45,7 @@ static bool lv_ta_design(lv_obj_t * ta, const lv_area_t * mask, lv_design_mode_t static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param); static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x); #endif @@ -158,7 +158,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_ta); } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Create a cursor blinker animation*/ lv_anim_t a; a.var = new_ta; @@ -226,7 +226,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, (const char *)letter_buf); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -293,7 +293,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -419,7 +419,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) if(ext->pwd_tmp == NULL) return; strcpy(ext->pwd_tmp, txt); -#if USE_LV_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; a.var = ta; @@ -523,7 +523,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) ext->cursor.valid_x = cur_pos.x; -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; @@ -1168,7 +1168,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) cur_type = lv_ta_get_cursor_type(ta); lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN); } else if(sign == LV_SIGNAL_FOCUS) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_cursor_type_t cur_type; cur_type = lv_ta_get_cursor_type(ta); lv_group_t * g = lv_obj_get_group(ta); @@ -1239,7 +1239,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void return res; } -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION /** * Called to blink the cursor diff --git a/lv_objx/lv_ta.h b/lv_objx/lv_ta.h index f5d1b80679b0..3a29998dffc2 100644 --- a/lv_objx/lv_ta.h +++ b/lv_objx/lv_ta.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 /*Testing of dependencies*/ -#if USE_LV_PAGE == 0 -#error "lv_ta: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_ta: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_ta: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_ta: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -383,7 +383,7 @@ void lv_ta_cursor_up(lv_obj_t * ta); * MACROS **********************/ -#endif /*USE_LV_TA_H*/ +#endif /*LV_USE_TA_H*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index c584b3e9ec0c..ee0a87b30d10 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_table.h" -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_math.h" diff --git a/lv_objx/lv_table.h b/lv_objx/lv_table.h index 94c3575a204a..ad47224c5443 100644 --- a/lv_objx/lv_table.h +++ b/lv_objx/lv_table.h @@ -19,11 +19,11 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 /*Testing of dependencies*/ -#if USE_LV_LABEL == 0 -#error "lv_table: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_table: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif #include "../lv_core/lv_obj.h" @@ -252,7 +252,7 @@ lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type); * MACROS **********************/ -#endif /*USE_LV_TABLE*/ +#endif /*LV_USE_TABLE*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index bf6fdae09095..d745882e5438 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_tabview.h" -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 #include "lv_btnm.h" #include "../lv_themes/lv_theme.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_TABVIEW_ANIM_TIME # define LV_TABVIEW_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif @@ -269,7 +269,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) */ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); @@ -287,7 +287,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->content, cont_x); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = ext->content; a.start = lv_obj_get_x(ext->content); @@ -313,7 +313,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->indic, indic_x); } else { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_anim_t a; a.var = ext->indic; a.start = lv_obj_get_x(ext->indic); @@ -365,7 +365,7 @@ void lv_tabview_set_sliding(lv_obj_t * tabview, bool en) void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_time = 0; #endif ext->anim_time = anim_time; @@ -621,7 +621,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(tabview); if(lv_group_get_editing(g)) { lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); diff --git a/lv_objx/lv_tabview.h b/lv_objx/lv_tabview.h index 2d60c3c856d0..1b77a5f335e8 100644 --- a/lv_objx/lv_tabview.h +++ b/lv_objx/lv_tabview.h @@ -19,15 +19,15 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 /*Testing of dependencies*/ -#if USE_LV_BTNM == 0 -#error "lv_tabview: lv_btnm is required. Enable it in lv_conf.h (USE_LV_BTNM 1) " +#if LV_USE_BTNM == 0 +#error "lv_tabview: lv_btnm is required. Enable it in lv_conf.h (LV_USE_BTNM 1) " #endif -#if USE_LV_PAGE == 0 -#error "lv_tabview: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_tabview: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif #include "../lv_core/lv_obj.h" @@ -243,7 +243,7 @@ bool lv_tabview_get_btns_hidden(const lv_obj_t *tabview); * MACROS **********************/ -#endif /*USE_LV_TABVIEW*/ +#endif /*LV_USE_TABVIEW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index e4cc04429411..9ce57a08312f 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_tileview.h" -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 #include #include "lv_cont.h" @@ -16,7 +16,7 @@ /********************* * DEFINES *********************/ -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION # ifndef LV_TILEVIEW_ANIM_TIME # define LV_TILEVIEW_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ # endif @@ -164,7 +164,7 @@ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * val */ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, bool anim_en) { -#if USE_LV_ANIMATION == 0 +#if LV_USE_ANIMATION == 0 anim_en = false; #endif @@ -192,7 +192,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_coord_t y_coord = -y * lv_obj_get_height(tileview); lv_obj_t * scrl = lv_page_get_scrl(tileview); if(anim_en) { -#if USE_LV_ANIMATION +#if LV_USE_ANIMATION lv_coord_t x_act = lv_obj_get_x(scrl); lv_coord_t y_act = lv_obj_get_y(scrl); diff --git a/lv_objx/lv_tileview.h b/lv_objx/lv_tileview.h index d276feaad11e..7aa597aafe70 100644 --- a/lv_objx/lv_tileview.h +++ b/lv_objx/lv_tileview.h @@ -20,7 +20,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 #include "../lv_objx/lv_page.h" @@ -154,7 +154,7 @@ lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_ * MACROS **********************/ -#endif /*USE_LV_TILEVIEW*/ +#endif /*LV_USE_TILEVIEW*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 65272f09c74a..59b13e4906d5 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_win.h" -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 #include "../lv_themes/lv_theme.h" #include "../lv_core/lv_disp.h" @@ -190,17 +190,17 @@ lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t ev *====================*/ /** - * A release action which can be assigned to a window control button to close it - * @param btn pointer to the released button - * @return always LV_ACTION_RES_INV because the button is deleted with the window + * Can be assigned to a window control button to close the window + * @param btn pointer to the control button on teh widows header + * @param evet the event type */ -lv_res_t lv_win_close_action(lv_obj_t * btn) +void lv_win_close_event(lv_obj_t * btn, lv_event_t event) { - lv_obj_t * win = lv_win_get_from_btn(btn); + if(event == LV_EVENT_RELEASED) { + lv_obj_t * win = lv_win_get_from_btn(btn); - lv_obj_del(win); - - return LV_RES_INV; + lv_obj_del(win); + } } /** diff --git a/lv_objx/lv_win.h b/lv_objx/lv_win.h index 28c5a1302e88..37d0fd55e3d8 100644 --- a/lv_objx/lv_win.h +++ b/lv_objx/lv_win.h @@ -19,24 +19,24 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 /*Testing of dependencies*/ -#if USE_LV_BTN == 0 -#error "lv_win: lv_btn is required. Enable it in lv_conf.h (USE_LV_BTN 1) " +#if LV_USE_BTN == 0 +#error "lv_win: lv_btn is required. Enable it in lv_conf.h (LV_USE_BTN 1) " #endif -#if USE_LV_LABEL == 0 -#error "lv_win: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#if LV_USE_LABEL == 0 +#error "lv_win: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif -#if USE_LV_IMG == 0 -#error "lv_win: lv_img is required. Enable it in lv_conf.h (USE_LV_IMG 1) " +#if LV_USE_IMG == 0 +#error "lv_win: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) " #endif -#if USE_LV_PAGE == 0 -#error "lv_win: lv_page is required. Enable it in lv_conf.h (USE_LV_PAGE 1) " +#if LV_USE_PAGE == 0 +#error "lv_win: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif #include "../lv_core/lv_obj.h" @@ -115,11 +115,11 @@ lv_obj_t * lv_win_add_btn(lv_obj_t * win, const void * img_src, lv_event_cb_t ev *====================*/ /** - * A release action which can be assigned to a window control button to close it - * @param btn pointer to the released button - * @return always LV_ACTION_RES_INV because the button is deleted with the window + * Can be assigned to a window control button to close the window + * @param btn pointer to the control button on teh widows header + * @param evet the event type */ -lv_res_t lv_win_close_action(lv_obj_t * btn); +void lv_win_close_event(lv_obj_t * btn, lv_event_t event); /** * Set the title of a window @@ -273,7 +273,7 @@ static inline void lv_win_scroll_ver(lv_obj_t * win, lv_coord_t dist) * MACROS **********************/ -#endif /*USE_LV_WIN*/ +#endif /*LV_USE_WIN*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index 39f928d2381b..cbb2341de565 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -25,7 +25,7 @@ static void disp_init(void); static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p); -#if USE_LV_GPU +#if LV_USE_GPU static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color); #endif @@ -103,7 +103,7 @@ void lv_port_disp_init(void) /*Set a display buffer*/ disp_drv.buffer = &disp_buf_2; -#if USE_LV_GPU +#if LV_USE_GPU /*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/ /*Blend two color array using opacity*/ @@ -151,7 +151,7 @@ static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * co /*OPTIONAL: GPU INTERFACE*/ -#if USE_LV_GPU +#if LV_USE_GPU /* If your MCU has hardware accelerator (GPU) then you can use it to blend to memories using opacity * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ @@ -177,6 +177,6 @@ static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color) } } -#endif /*USE_LV_GPU*/ +#endif /*LV_USE_GPU*/ #endif diff --git a/lv_porting/lv_port_indev_templ.c b/lv_porting/lv_port_indev_templ.c index c89eb0744508..7c1f0505f54f 100644 --- a/lv_porting/lv_port_indev_templ.c +++ b/lv_porting/lv_port_indev_templ.c @@ -110,7 +110,7 @@ void lv_port_indev_init(void) /*Set cursor. For simplicity set a HOME symbol now.*/ lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL); - lv_img_set_src(mouse_cursor, SYMBOL_HOME); + lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME); lv_indev_set_cursor(indev_mouse, mouse_cursor); /*------------------ diff --git a/lv_themes/lv_theme.c b/lv_themes/lv_theme.c index 3db5a4cdcdca..35811155f9b5 100644 --- a/lv_themes/lv_theme.c +++ b/lv_themes/lv_theme.c @@ -80,7 +80,7 @@ void lv_theme_set_current(lv_theme_t * th) if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); } -#if USE_LV_GROUP +#if LV_USE_GROUP /*Copy group style modification callback functions*/ memcpy(¤t_theme.group, &th->group, sizeof(th->group)); #endif @@ -88,7 +88,7 @@ void lv_theme_set_current(lv_theme_t * th) /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); -#if USE_LV_GROUP +#if LV_USE_GROUP lv_group_report_style_mod(NULL); #endif diff --git a/lv_themes/lv_theme.h b/lv_themes/lv_theme.h index 66bbd3d2db7d..8556999798cf 100644 --- a/lv_themes/lv_theme.h +++ b/lv_themes/lv_theme.h @@ -35,11 +35,11 @@ typedef struct { lv_style_t *bg; lv_style_t *panel; -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 lv_style_t *cont; #endif -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 struct { lv_style_t *rel; lv_style_t *pr; @@ -50,7 +50,7 @@ typedef struct { #endif -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 struct { lv_style_t *rel; lv_style_t *pr; @@ -60,7 +60,7 @@ typedef struct { } imgbtn; #endif -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 struct { lv_style_t *prim; lv_style_t *sec; @@ -68,31 +68,31 @@ typedef struct { } label; #endif -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 struct { lv_style_t *light; lv_style_t *dark; } img; #endif -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 struct { lv_style_t *decor; } line; #endif -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 lv_style_t *led; #endif -#if USE_LV_BAR != 0 +#if LV_USE_BAR != 0 struct { lv_style_t *bg; lv_style_t *indic; } bar; #endif -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -100,23 +100,23 @@ typedef struct { } slider; #endif -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_t *lmeter; #endif -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 lv_style_t *gauge; #endif -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 lv_style_t *arc; #endif -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 lv_style_t *preload; #endif -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -125,11 +125,11 @@ typedef struct { } sw; #endif -#if USE_LV_CHART != 0 +#if LV_USE_CHART != 0 lv_style_t *chart; #endif -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 struct { lv_style_t *bg; lv_style_t *header; @@ -142,7 +142,7 @@ typedef struct { } calendar; #endif -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 struct { lv_style_t *bg; struct { @@ -155,7 +155,7 @@ typedef struct { } cb; #endif -#if USE_LV_BTNM != 0 +#if LV_USE_BTNM != 0 struct { lv_style_t *bg; struct { @@ -168,7 +168,7 @@ typedef struct { } btnm; #endif -#if USE_LV_KB != 0 +#if LV_USE_KB != 0 struct { lv_style_t *bg; struct { @@ -181,7 +181,7 @@ typedef struct { } kb; #endif -#if USE_LV_MBOX != 0 +#if LV_USE_MBOX != 0 struct { lv_style_t *bg; struct { @@ -192,7 +192,7 @@ typedef struct { } mbox; #endif -#if USE_LV_PAGE != 0 +#if LV_USE_PAGE != 0 struct { lv_style_t *bg; lv_style_t *scrl; @@ -200,7 +200,7 @@ typedef struct { } page; #endif -#if USE_LV_TA != 0 +#if LV_USE_TA != 0 struct { lv_style_t *area; lv_style_t *oneline; @@ -209,7 +209,7 @@ typedef struct { } ta; #endif -#if USE_LV_SPINBOX != 0 +#if LV_USE_SPINBOX != 0 struct { lv_style_t *bg; lv_style_t *cursor; @@ -217,7 +217,7 @@ typedef struct { } spinbox; #endif -#if USE_LV_LIST +#if LV_USE_LIST struct { lv_style_t *bg; lv_style_t *scrl; @@ -232,7 +232,7 @@ typedef struct { } list; #endif -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 struct { lv_style_t *bg; lv_style_t *sel; @@ -240,14 +240,14 @@ typedef struct { } ddlist; #endif -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 struct { lv_style_t *bg; lv_style_t *sel; } roller; #endif -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 struct { lv_style_t *bg; lv_style_t *indic; @@ -261,7 +261,7 @@ typedef struct { } tabview; #endif -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 struct { lv_style_t *bg; lv_style_t *scrl; @@ -269,14 +269,14 @@ typedef struct { } tileview; #endif -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 struct { lv_style_t *bg; lv_style_t *cell; } table; #endif -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 struct { lv_style_t *bg; lv_style_t *sb; @@ -293,7 +293,7 @@ typedef struct { #endif } style; -#if USE_LV_GROUP +#if LV_USE_GROUP struct { lv_group_style_mod_func_t style_mod; diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index a66f15d39232..5d163412e6a9 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_ALIEN +#if LV_USE_THEME_ALIEN /********************* * DEFINES @@ -36,23 +36,23 @@ static lv_style_t panel; /*General fancy background (e.g. to chart or ta) static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; #endif -#if USE_LV_SLIDER +#if LV_USE_SLIDER static lv_style_t slider_knob; #endif -#if USE_LV_LMETER +#if LV_USE_LMETER static lv_style_t lmeter_bg; #endif -#if USE_LV_DDLIST +#if LV_USE_DDLIST static lv_style_t ddlist_bg, ddlist_sel; #endif -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif @@ -136,14 +136,14 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &panel; #endif } static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.glass = 0; btn_rel.body.opa = LV_OPA_TRANSP; @@ -204,7 +204,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); @@ -226,7 +226,7 @@ static void label_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &def); bar_bg.body.opa = LV_OPA_30; bar_bg.body.radius = LV_RADIUS_CIRCLE; @@ -258,7 +258,7 @@ static void bar_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -275,7 +275,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 static lv_style_t line_decor; lv_style_copy(&line_decor, &def); line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); @@ -287,7 +287,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; @@ -305,7 +305,7 @@ static void led_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); slider_knob.body.opa = LV_OPA_60; slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -323,7 +323,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; @@ -352,7 +352,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -367,7 +367,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); @@ -387,7 +387,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -407,7 +407,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -415,14 +415,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t header; static lv_style_t color_text; static lv_style_t gray_text; @@ -462,7 +462,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); cb_rel.body.radius = LV_DPI / 20; @@ -514,7 +514,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); @@ -552,7 +552,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &btnm_bg; theme.style.kb.btn.rel = &btnm_rel; theme.style.kb.btn.pr = &btnm_pr; @@ -565,7 +565,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; @@ -579,7 +579,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; theme.style.page.sb = &sb; @@ -588,7 +588,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -598,7 +598,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -607,7 +607,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); list_rel.body.opa = LV_OPA_TRANSP; @@ -646,7 +646,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.hor = LV_DPI / 6; @@ -666,7 +666,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; @@ -691,7 +691,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x666); @@ -750,7 +750,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -759,7 +759,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -775,7 +775,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header; lv_style_copy(&header, &def); @@ -801,7 +801,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -840,7 +840,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -898,7 +898,7 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_alien.h b/lv_themes/lv_theme_alien.h index 7d97cb8c6465..ca88696ed83d 100644 --- a/lv_themes/lv_theme_alien.h +++ b/lv_themes/lv_theme_alien.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_ALIEN +#if LV_USE_THEME_ALIEN /********************* * DEFINES diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index 427532cf5123..6bdd32c3eba9 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_DEFAULT +#if LV_USE_THEME_DEFAULT /********************* * DEFINES @@ -70,7 +70,7 @@ static void basic_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &lv_style_btn_rel; theme.style.btn.pr = &lv_style_btn_pr; theme.style.btn.tgl_rel = &lv_style_btn_tgl_rel; @@ -81,7 +81,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 lv_style_copy(&label_prim, &lv_style_plain); lv_style_copy(&label_sec, &lv_style_plain); @@ -101,7 +101,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -111,7 +111,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; #endif @@ -119,7 +119,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); @@ -136,7 +136,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR theme.style.bar.bg = &lv_style_pretty; theme.style.bar.indic = &lv_style_pretty_color; @@ -145,7 +145,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_bg, &lv_style_pretty); slider_bg.body.padding.hor = LV_DPI / 20; slider_bg.body.padding.ver = LV_DPI / 20; @@ -158,7 +158,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 lv_style_copy(&sw_bg, &lv_style_pretty); sw_bg.body.padding.hor = 3; sw_bg.body.padding.ver = 3; @@ -173,7 +173,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter, &lv_style_pretty_color); lmeter.line.color = LV_COLOR_HEX3(0xddd); @@ -187,7 +187,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &lmeter); gauge.line.color = lmeter.body.grad_color; @@ -202,7 +202,7 @@ static void gauge_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &lv_style_pretty; @@ -211,7 +211,7 @@ static void chart_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &lv_style_transp; @@ -226,7 +226,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &lv_style_pretty; @@ -240,7 +240,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &lv_style_pretty; @@ -255,7 +255,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &lv_style_pretty; @@ -267,7 +267,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &lv_style_pretty; @@ -278,7 +278,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &lv_style_pretty; @@ -290,7 +290,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.bg = &lv_style_pretty; theme.style.list.scrl = &lv_style_transp_fit; @@ -305,7 +305,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 theme.style.ddlist.bg = &lv_style_pretty; @@ -316,7 +316,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 theme.style.roller.bg = &lv_style_pretty; @@ -326,7 +326,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &plain_bordered; @@ -342,7 +342,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 theme.style.win.bg = &plain_bordered; @@ -355,7 +355,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -403,7 +403,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -456,7 +456,7 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_default.h b/lv_themes/lv_theme_default.h index 9ec74a951d9c..772d76430298 100644 --- a/lv_themes/lv_theme_default.h +++ b/lv_themes/lv_theme_default.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_DEFAULT +#if LV_USE_THEME_DEFAULT /********************* * DEFINES diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 6c8f71183688..7ee8e0b408da 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_MATERIAL +#if LV_USE_THEME_MATERIAL /********************* * DEFINES @@ -87,7 +87,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = theme.style.panel; @@ -96,7 +96,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); @@ -146,7 +146,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t prim, sec, hint; lv_style_copy(&prim, &def); @@ -167,7 +167,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -185,7 +185,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -194,7 +194,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; @@ -213,7 +213,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; lv_style_copy(&bar_bg, &def); @@ -237,7 +237,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t knob; lv_style_copy(&knob, &def); @@ -254,7 +254,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob_off, sw_knob_on; lv_style_copy(&sw_bg, theme.style.slider.bg); sw_bg.body.radius = LV_RADIUS_CIRCLE; @@ -285,7 +285,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); @@ -300,7 +300,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &def); @@ -319,7 +319,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -338,7 +338,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -346,14 +346,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = theme.style.panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70); @@ -391,7 +391,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, theme.style.panel); rel.body.shadow.type = LV_SHADOW_BOTTOM; @@ -427,7 +427,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); @@ -476,7 +476,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB static lv_style_t rel; lv_style_copy(&rel, &lv_style_transp); @@ -494,7 +494,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t pr, rel; lv_style_copy(&rel, &lv_style_transp); @@ -514,7 +514,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = theme.style.panel; @@ -525,7 +525,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA static lv_style_t oneline; lv_style_copy(&oneline, &def); @@ -546,7 +546,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -555,7 +555,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina; @@ -610,7 +610,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); bg.body.padding.hor = LV_DPI / 6; @@ -633,7 +633,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &lv_style_transp); @@ -654,7 +654,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t indic, btn_bg, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&indic, &def); @@ -722,7 +722,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -731,7 +731,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; @@ -747,7 +747,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header, pr; lv_style_copy(&header, &def); @@ -784,7 +784,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -832,7 +832,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -892,7 +892,7 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_material.h b/lv_themes/lv_theme_material.h index 306f0957e746..572801f2c583 100644 --- a/lv_themes/lv_theme_material.h +++ b/lv_themes/lv_theme_material.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_MATERIAL +#if LV_USE_THEME_MATERIAL /********************* * DEFINES diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 51bd7f8e588f..953a29e8be78 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_MONO +#if LV_USE_THEME_MONO /********************* * DEFINES @@ -98,7 +98,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &def; @@ -107,7 +107,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &light_frame; @@ -121,7 +121,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 theme.style.label.prim = NULL; @@ -132,7 +132,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -142,14 +142,14 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = NULL; #endif } static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &light_frame); led.body.radius = LV_RADIUS_CIRCLE; @@ -163,7 +163,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg; static lv_style_t bar_indic; @@ -184,7 +184,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t slider_knob; lv_style_copy(&slider_knob, &light_frame); slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -199,7 +199,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = theme.style.slider.bg; @@ -212,7 +212,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter_bg; lv_style_copy(&lmeter_bg, &light_frame); lmeter_bg.body.opa = LV_OPA_TRANSP; @@ -229,7 +229,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, theme.style.lmeter); gauge_bg.line.color = LV_COLOR_BLACK; @@ -242,14 +242,14 @@ static void gauge_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &light_frame; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t box; lv_style_copy(&box, &light_plain); box.body.padding.ver = LV_DPI / 20; @@ -262,7 +262,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &lv_style_transp; @@ -277,7 +277,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &light_frame; @@ -291,7 +291,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &lv_style_transp_fit; theme.style.kb.btn.rel = &light_frame; theme.style.kb.btn.pr = &light_frame; @@ -304,7 +304,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &dark_frame; @@ -316,7 +316,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &light_frame; @@ -327,7 +327,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &light_frame; @@ -339,7 +339,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.sb = &dark_frame; @@ -355,7 +355,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg; lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; @@ -368,7 +368,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t bg; lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; @@ -380,7 +380,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &light_frame; @@ -396,7 +396,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &dark_plain); win_header.body.padding.hor = LV_DPI / 30; @@ -412,7 +412,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -448,7 +448,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -505,7 +505,7 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_mono.h b/lv_themes/lv_theme_mono.h index a7c8c8c2f0c8..8e0e0553a7eb 100644 --- a/lv_themes/lv_theme_mono.h +++ b/lv_themes/lv_theme_mono.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_MONO +#if LV_USE_THEME_MONO /********************* * DEFINES diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 96a5d6fc26bf..4bae8bf176da 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_NEMO +#if LV_USE_THEME_NEMO /********************* * DEFINES @@ -39,23 +39,23 @@ static lv_style_t panel; /*General fancy background (e.g. to chart or ta) static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bar_bg, bar_indic; #endif -#if USE_LV_SLIDER +#if LV_USE_SLIDER static lv_style_t slider_knob; #endif -#if USE_LV_LMETER +#if LV_USE_LMETER static lv_style_t lmeter_bg; #endif -#if USE_LV_DDLIST +#if LV_USE_DDLIST static lv_style_t ddlist_bg, ddlist_sel; #endif -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif @@ -138,7 +138,7 @@ static void basic_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.glass = 0; btn_rel.body.opa = LV_OPA_TRANSP; @@ -195,7 +195,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); @@ -217,7 +217,7 @@ static void label_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &def); bar_bg.body.opa = LV_OPA_30; bar_bg.body.radius = LV_RADIUS_CIRCLE; @@ -249,7 +249,7 @@ static void bar_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -266,7 +266,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 static lv_style_t line_decor; lv_style_copy(&line_decor, &def); line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50); @@ -278,7 +278,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; @@ -296,7 +296,7 @@ static void led_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); slider_knob.body.opa = LV_OPA_60; slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -314,7 +314,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; @@ -343,7 +343,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -358,7 +358,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100); @@ -378,7 +378,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -395,7 +395,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -403,14 +403,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 50); @@ -444,7 +444,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); cb_rel.body.radius = LV_DPI / 20; @@ -496,7 +496,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); @@ -534,7 +534,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &btnm_bg; theme.style.kb.btn.rel = &btnm_rel; theme.style.kb.btn.pr = &btnm_pr; @@ -547,7 +547,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; @@ -561,7 +561,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; theme.style.page.sb = &sb; @@ -570,7 +570,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -580,7 +580,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -589,7 +589,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); list_rel.body.opa = LV_OPA_TRANSP; @@ -627,7 +627,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.hor = LV_DPI / 6; @@ -647,7 +647,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; @@ -672,7 +672,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x500); @@ -731,7 +731,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -740,7 +740,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -753,7 +753,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &panel); @@ -775,7 +775,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -820,7 +820,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -877,7 +877,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_nemo.h b/lv_themes/lv_theme_nemo.h index 4e62dc12d78e..1f8c702633f2 100644 --- a/lv_themes/lv_theme_nemo.h +++ b/lv_themes/lv_theme_nemo.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_NEMO +#if LV_USE_THEME_NEMO /********************* * DEFINES diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 5bd30cc905ad..a2d2e348dcc1 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -8,7 +8,7 @@ *********************/ #include "lv_theme.h" -#if USE_LV_THEME_NIGHT +#if LV_USE_THEME_NIGHT /********************* * DEFINES @@ -88,7 +88,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &panel; @@ -96,7 +96,7 @@ static void cont_init(void) } static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); @@ -148,7 +148,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 lv_style_copy(&prim, &bg); prim.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); @@ -167,7 +167,7 @@ static void label_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -176,7 +176,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; @@ -194,7 +194,7 @@ static void led_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -204,7 +204,7 @@ static void img_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR lv_style_copy(&bar_bg, &panel); bar_bg.body.padding.ver = LV_DPI / 16; bar_bg.body.padding.hor = LV_DPI / 16; @@ -227,7 +227,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &btn_rel); slider_knob.body.radius = LV_RADIUS_CIRCLE; @@ -240,7 +240,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = &bar_bg; @@ -253,7 +253,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); @@ -270,7 +270,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); @@ -285,7 +285,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -305,7 +305,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -313,14 +313,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR static lv_style_t cal_bg; lv_style_copy(&cal_bg, &bg); cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); @@ -378,7 +378,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; @@ -424,7 +424,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&btnm_bg, &btn_rel); @@ -469,7 +469,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &bg; theme.style.kb.btn.rel = &btn_rel; theme.style.kb.btn.pr = &btn_pr; @@ -482,7 +482,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &bg); mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30); @@ -501,7 +501,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE static lv_style_t page_scrl; lv_style_copy(&page_scrl, &bg); @@ -519,7 +519,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; theme.style.ta.cursor = NULL; @@ -529,7 +529,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -538,7 +538,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr; lv_style_copy(&list_bg, &panel); @@ -589,7 +589,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &btn_rel); ddlist_bg.text.line_space = LV_DPI / 8; ddlist_bg.body.padding.ver = LV_DPI / 8; @@ -609,7 +609,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t roller_bg; lv_style_copy(&roller_bg, &ddlist_bg); @@ -625,7 +625,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &bg; theme.style.tabview.indic = &lv_style_transp; theme.style.tabview.btn.bg = &lv_style_transp; @@ -638,7 +638,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -647,7 +647,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); cell.body.radius = 0; @@ -663,7 +663,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t win_bg; lv_style_copy(&win_bg, &bg); win_bg.body.border.color = LV_COLOR_HEX3(0x333); @@ -695,7 +695,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_group_t * group, lv_style_t * style) { @@ -731,7 +731,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -791,7 +791,7 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_night.h b/lv_themes/lv_theme_night.h index 3c760c31905f..7c1270c40b82 100644 --- a/lv_themes/lv_theme_night.h +++ b/lv_themes/lv_theme_night.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_NIGHT +#if LV_USE_THEME_NIGHT /********************* * DEFINES diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 46f3793b7e14..9c1404f29a19 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_TEMPL +#if LV_USE_THEME_TEMPL /********************* * DEFINES @@ -54,7 +54,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = &def; @@ -63,7 +63,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 theme.style.btn.rel = &def; @@ -76,7 +76,7 @@ static void btn_init(void) static void imgbtn_init(void) { -#if USE_LV_IMGBTN != 0 +#if LV_USE_IMGBTN != 0 theme.style.imgbtn.rel = &def; theme.style.imgbtn.pr = &def; theme.style.imgbtn.tgl_rel = &def; @@ -87,7 +87,7 @@ static void imgbtn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 theme.style.label.prim = &def; @@ -98,7 +98,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 theme.style.img.light = &def; @@ -108,7 +108,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -117,7 +117,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 theme.style.led = &def; @@ -126,7 +126,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR theme.style.bar.bg = &def; @@ -136,7 +136,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 theme.style.slider.bg = &def; @@ -147,7 +147,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 theme.style.sw.bg = &def; @@ -160,7 +160,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 theme.style.lmeter = &def; @@ -169,7 +169,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 theme.style.gauge = &def; @@ -178,7 +178,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 theme.style.arc = &def; @@ -187,7 +187,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = &def; @@ -196,7 +196,7 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = &def; #endif @@ -204,7 +204,7 @@ static void chart_init(void) static void calendar_init(void) { -#if USE_LV_CALENDAR +#if LV_USE_CALENDAR theme.style.calendar.bg = theme.style.panel; theme.style.calendar.header = &def; @@ -219,7 +219,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 theme.style.cb.bg = &def; @@ -234,7 +234,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM theme.style.btnm.bg = &def; @@ -248,7 +248,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB theme.style.kb.bg = &def; @@ -263,7 +263,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX theme.style.mbox.bg = &def; @@ -275,7 +275,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = &def; @@ -286,7 +286,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA theme.style.ta.area = &def; @@ -298,7 +298,7 @@ static void ta_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 theme.style.list.sb = &def; @@ -314,7 +314,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 theme.style.ddlist.bg = &def; @@ -325,7 +325,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 theme.style.roller.bg = &def; @@ -335,7 +335,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 theme.style.tabview.bg = &def; @@ -351,7 +351,7 @@ static void tabview_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 theme.style.win.bg = &def; @@ -364,7 +364,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_style_t * style) { @@ -410,7 +410,7 @@ static void style_mod_edit(lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -467,7 +467,7 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) tabview_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_templ.h b/lv_themes/lv_theme_templ.h index e70af4fe1535..9d17c4d9b6be 100644 --- a/lv_themes/lv_theme_templ.h +++ b/lv_themes/lv_theme_templ.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_TEMPL +#if LV_USE_THEME_TEMPL /********************* * DEFINES diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index 522b1c6d5c3c..df0dd9b73057 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -9,7 +9,7 @@ #include "lv_theme.h" -#if USE_LV_THEME_ZEN +#if LV_USE_THEME_ZEN /********************* * DEFINES @@ -85,7 +85,7 @@ static void basic_init(void) static void cont_init(void) { -#if USE_LV_CONT != 0 +#if LV_USE_CONT != 0 theme.style.cont = theme.style.panel; @@ -94,7 +94,7 @@ static void cont_init(void) static void btn_init(void) { -#if USE_LV_BTN != 0 +#if LV_USE_BTN != 0 static lv_style_t rel, pr, tgl_pr, ina; lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; @@ -135,7 +135,7 @@ static void btn_init(void) static void label_init(void) { -#if USE_LV_LABEL != 0 +#if LV_USE_LABEL != 0 static lv_style_t prim, sec, hint; lv_style_copy(&prim, &def); lv_style_copy(&sec, &def); @@ -153,7 +153,7 @@ static void label_init(void) static void img_init(void) { -#if USE_LV_IMG != 0 +#if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); @@ -170,7 +170,7 @@ static void img_init(void) static void line_init(void) { -#if USE_LV_LINE != 0 +#if LV_USE_LINE != 0 theme.style.line.decor = &def; @@ -179,7 +179,7 @@ static void line_init(void) static void led_init(void) { -#if USE_LV_LED != 0 +#if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); @@ -198,7 +198,7 @@ static void led_init(void) static void bar_init(void) { -#if USE_LV_BAR +#if LV_USE_BAR static lv_style_t bg, indic; lv_style_copy(&bg, &def); @@ -224,7 +224,7 @@ static void bar_init(void) static void slider_init(void) { -#if USE_LV_SLIDER != 0 +#if LV_USE_SLIDER != 0 static lv_style_t knob; lv_style_copy(&knob, &def); @@ -241,7 +241,7 @@ static void slider_init(void) static void sw_init(void) { -#if USE_LV_SW != 0 +#if LV_USE_SW != 0 static lv_style_t indic; lv_style_copy(&indic, theme.style.slider.indic); @@ -266,7 +266,7 @@ static void sw_init(void) static void lmeter_init(void) { -#if USE_LV_LMETER != 0 +#if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); @@ -282,7 +282,7 @@ static void lmeter_init(void) static void gauge_init(void) { -#if USE_LV_GAUGE != 0 +#if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &def); @@ -299,7 +299,7 @@ static void gauge_init(void) static void arc_init(void) { -#if USE_LV_ARC != 0 +#if LV_USE_ARC != 0 static lv_style_t arc; lv_style_copy(&arc, &def); @@ -316,7 +316,7 @@ static void arc_init(void) static void preload_init(void) { -#if USE_LV_PRELOAD != 0 +#if LV_USE_PRELOAD != 0 theme.style.preload = theme.style.arc; #endif @@ -324,14 +324,14 @@ static void preload_init(void) static void chart_init(void) { -#if USE_LV_CHART +#if LV_USE_CHART theme.style.chart = theme.style.panel; #endif } static void calendar_init(void) { -#if USE_LV_CALENDAR != 0 +#if LV_USE_CALENDAR != 0 static lv_style_t ina_days; lv_style_copy(&ina_days, &def); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 70); @@ -358,7 +358,7 @@ static void calendar_init(void) static void cb_init(void) { -#if USE_LV_CB != 0 +#if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); rel.body.radius = LV_DPI / 20; @@ -401,7 +401,7 @@ static void cb_init(void) static void btnm_init(void) { -#if USE_LV_BTNM +#if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &lv_style_transp); @@ -450,7 +450,7 @@ static void btnm_init(void) static void kb_init(void) { -#if USE_LV_KB +#if LV_USE_KB static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &def); bg.body.main_color = LV_COLOR_HEX3(0x666); @@ -506,7 +506,7 @@ static void kb_init(void) static void mbox_init(void) { -#if USE_LV_MBOX +#if LV_USE_MBOX static lv_style_t bg, rel, pr; lv_style_copy(&bg, theme.style.panel); bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); @@ -539,7 +539,7 @@ static void mbox_init(void) static void page_init(void) { -#if USE_LV_PAGE +#if LV_USE_PAGE theme.style.page.bg = theme.style.panel; @@ -550,7 +550,7 @@ static void page_init(void) static void ta_init(void) { -#if USE_LV_TA +#if LV_USE_TA static lv_style_t oneline; lv_style_copy(&oneline, theme.style.panel); oneline.body.radius = LV_RADIUS_CIRCLE; @@ -567,7 +567,7 @@ static void ta_init(void) static void spinbox_init(void) { -#if USE_LV_SPINBOX +#if LV_USE_SPINBOX theme.style.spinbox.bg= theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; theme.style.spinbox.sb = theme.style.ta.sb; @@ -576,7 +576,7 @@ static void spinbox_init(void) static void list_init(void) { -#if USE_LV_LIST != 0 +#if LV_USE_LIST != 0 static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); @@ -619,7 +619,7 @@ static void list_init(void) static void ddlist_init(void) { -#if USE_LV_DDLIST != 0 +#if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); bg.text.line_space = LV_DPI / 8; @@ -640,7 +640,7 @@ static void ddlist_init(void) static void roller_init(void) { -#if USE_LV_ROLLER != 0 +#if LV_USE_ROLLER != 0 static lv_style_t bg, sel; lv_style_copy(&bg, &def); bg.body.border.width = 0; @@ -659,7 +659,7 @@ static void roller_init(void) static void tabview_init(void) { -#if USE_LV_TABVIEW != 0 +#if LV_USE_TABVIEW != 0 static lv_style_t btn_bg, indic, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&btn_bg, &def); @@ -702,7 +702,7 @@ static void tabview_init(void) static void tileview_init(void) { -#if USE_LV_TILEVIEW != 0 +#if LV_USE_TILEVIEW != 0 theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; theme.style.tileview.sb = theme.style.page.sb; @@ -711,7 +711,7 @@ static void tileview_init(void) static void table_init(void) { -#if USE_LV_TABLE != 0 +#if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; @@ -727,7 +727,7 @@ static void table_init(void) static void win_init(void) { -#if USE_LV_WIN != 0 +#if LV_USE_WIN != 0 static lv_style_t header, rel, pr; lv_style_copy(&header, &def); @@ -758,7 +758,7 @@ static void win_init(void) #endif } -#if USE_LV_GROUP +#if LV_USE_GROUP static void style_mod(lv_style_t * style) { @@ -798,7 +798,7 @@ static void style_mod_edit(lv_style_t * style) #endif } -#endif /*USE_LV_GROUP*/ +#endif /*LV_USE_GROUP*/ /********************** * GLOBAL FUNCTIONS @@ -858,7 +858,7 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) table_init(); win_init(); -#if USE_LV_GROUP +#if LV_USE_GROUP theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif diff --git a/lv_themes/lv_theme_zen.h b/lv_themes/lv_theme_zen.h index 27b190922ca6..b4316733504c 100644 --- a/lv_themes/lv_theme_zen.h +++ b/lv_themes/lv_theme_zen.h @@ -19,7 +19,7 @@ extern "C" { #include "../../lv_conf.h" #endif -#if USE_LV_THEME_ZEN +#if LV_USE_THEME_ZEN /********************* * DEFINES From bc1d71a1d17b7779c118744344ce93e0f0bb036d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Mar 2019 00:42:08 +0100 Subject: [PATCH 095/590] event handling improvments --- lv_core/lv_group.c | 15 ++++++++++----- lv_core/lv_indev.c | 30 ++++++++++++++++++++++-------- lv_core/lv_obj.h | 19 ++++++++++--------- lv_objx/lv_btn.c | 6 ++++-- lv_objx/lv_calendar.c | 3 ++- lv_objx/lv_ddlist.c | 6 ++++-- lv_objx/lv_kb.c | 10 ++++++++-- lv_objx/lv_list.c | 3 ++- lv_objx/lv_page.c | 2 +- lv_objx/lv_roller.c | 9 ++++++--- lv_objx/lv_slider.c | 9 ++++++--- lv_objx/lv_spinbox.c | 17 ----------------- lv_objx/lv_spinbox.h | 1 - lv_objx/lv_sw.c | 19 ++++++++++++------- lv_objx/lv_ta.c | 2 ++ 15 files changed, 89 insertions(+), 62 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index d44940258ac8..f86c6adae4ed 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -201,7 +201,8 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_obj_send_event(*g->obj_focus, LV_EVENT_DEFOCUSED); + lv_res_t res = lv_obj_send_event(*g->obj_focus, LV_EVENT_DEFOCUSED); + if(res != LV_RES_OK) return; lv_obj_invalidate(*g->obj_focus); } @@ -210,7 +211,8 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL); if(g->focus_cb) g->focus_cb(g); - lv_obj_send_event(*g->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_obj_send_event(*g->obj_focus, LV_EVENT_FOCUSED); + if(res != LV_RES_OK) return; lv_obj_invalidate(*g->obj_focus); /*If the object or its parent has `top == true` bring it to the foregorund*/ @@ -312,7 +314,8 @@ void lv_group_set_editing(lv_group_t * group, bool edit) if(focused) { focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/ - lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + if(res != LV_RES_OK) return; } lv_obj_invalidate(focused); @@ -609,14 +612,16 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(group->obj_focus) { (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED); + lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED); + if(res != LV_RES_OK) return; lv_obj_invalidate(*group->obj_focus); } group->obj_focus = obj_next; (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); - lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + if(res != LV_RES_OK) return; /*If the object or its parent has `top == true` bring it to the foregorund*/ obj_to_foreground(*group->obj_focus); diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index dd6b9d622303..1928c370b13a 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -466,10 +466,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) data->key = i->proc.types.keypad.last_key; if(data->key == LV_GROUP_KEY_ENTER) { if(i->proc.long_pr_sent == 0) { - lv_obj_send_event(focused, LV_EVENT_CLICKED); - } else { - lv_obj_send_event(focused, LV_EVENT_RELEASED); + lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); } + + lv_obj_send_event(focused, LV_EVENT_CLICKED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_RELEASED); if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.pr_timestamp = 0; @@ -566,7 +569,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); - if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_CLICKED); + if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_CLICKED); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_RELEASED); @@ -578,7 +584,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) else if(g->editing) { if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ - lv_obj_send_event(focused, LV_EVENT_CLICKED); + lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); if(i->proc.reset_query) return; /*The object might be deleted*/ } } @@ -783,10 +792,13 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); if(proc->reset_query) return; /*The object might be deleted*/ } + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + if(proc->reset_query) return; /*The object might be deleted*/ + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); if(proc->reset_query) return; /*The object might be deleted*/ } @@ -796,13 +808,15 @@ static void indev_proc_release(lv_indev_proc_t * proc) proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); if(proc->reset_query) return; /*The object might be deleted*/ } - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); if(proc->reset_query) return; /*The object might be deleted*/ + lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + if(proc->reset_query) return; /*The object might be deleted*/ } if(proc->reset_query != 0) return; diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 769c0a2be598..b9903025d936 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -73,15 +73,16 @@ typedef uint8_t lv_res_t; typedef enum { - LV_EVENT_PRESSED, - LV_EVENT_PRESSING, - LV_EVENT_PRESS_LOST, - LV_EVENT_RELEASED, - LV_EVENT_CLICKED, - LV_EVENT_LONG_PRESSED, - LV_EVENT_LONG_PRESSED_REPEAT, - LV_EVENT_LONG_HOVER_IN, - LV_EVENT_LONG_HOVER_OUT, + LV_EVENT_PRESSED, /*The object has been pressed*/ + LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ + LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ + LV_EVENT_SHORT_CLICKED, /*Released before long press time. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED, /*Pressing for `LV_INDEV_LONG_PRESS_TIME` time. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED_REPEAT, /*Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ + LV_EVENT_CLICKED, /*Called on release if not dragged (regardless to long press)*/ + LV_EVENT_RELEASED, /*Called in every cases when the object has been released*/ + LV_EVENT_LONG_HOVER_IN, /*TODO*/ + LV_EVENT_LONG_HOVER_OUT, /*TODO*/ LV_EVENT_DRAG_BEGIN, LV_EVENT_DRAG_END, LV_EVENT_DRAG_THROW_BEGIN, diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index 9ce2c56e0fe8..aec5b4917c0c 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -575,7 +575,8 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } if(tgl) { - lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else { /*If dragged change back the state*/ @@ -628,7 +629,8 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); } - lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 2b390582c56e..96b20494f1e3 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -544,7 +544,8 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * } else if(ext->pressed_date.year != 0) { - lv_obj_send_event(calendar, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(calendar, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } ext->pressed_date.year = 0; diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index db39452eeb34..974f811b0421 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -691,7 +691,8 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par if(ext->opened) { ext->sel_opt_id_ori = ext->sel_opt_id; ext->opened = 0; - lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + lv_res_t res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); @@ -795,7 +796,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist) ext->sel_opt_id = new_opt; - lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + lv_res_t res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; if(ext->stay_open == 0) { ext->opened = 0; diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index e262fc2e93f3..5394f7b1a837 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -404,14 +404,20 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return LV_RES_OK; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { - if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_CANCEL); + if(kb->event_cb) { + res = lv_obj_send_event(kb, LV_EVENT_CANCEL); + if(res != LV_RES_OK) return res; + } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return res; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); + if(kb->event_cb) { + res = lv_obj_send_event(kb, LV_EVENT_APPLY); + if(res != LV_RES_OK) return res; + } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ res = lv_obj_del(kb); diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 054905af4a1d..097e25388587 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -846,7 +846,8 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(btn != NULL) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->last_sel = btn; - lv_obj_send_event(btn, LV_EVENT_CLICKED); + res = lv_obj_send_event(btn, LV_EVENT_CLICKED); + if(res != LV_RES_OK) return res; } } #endif diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 380789f569b2..7b7cede60a86 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -1020,7 +1020,7 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST || event == LV_EVENT_RELEASED || - event == LV_EVENT_CLICKED || + event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || event == LV_EVENT_LONG_HOVER_IN || diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index fe50d975f6d1..77e7e36d5b10 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -404,7 +404,8 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } } else if(c == LV_GROUP_KEY_ENTER) { ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/ - lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); @@ -459,7 +460,8 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; ext->ddlist.sel_opt_id = id; - lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } else if(sign == LV_SIGNAL_RELEASED) { /*If picked an option by clicking then set it*/ if(!lv_indev_is_dragging(indev)) { @@ -470,7 +472,8 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; ext->ddlist.sel_opt_id = id; - lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 503e7cb07f65..86223593eb65 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -471,7 +471,8 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(tmp != ext->drag_value) { ext->drag_value = tmp; lv_obj_invalidate(slider); - lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_slider_set_value(slider, ext->drag_value, false); @@ -514,10 +515,12 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par #endif if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true); - lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { lv_slider_set_value(slider, lv_slider_get_value(slider) - 1, true); - lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 7111db07c98b..edfdeedbff59 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -63,8 +63,6 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_spinbox); /*Initialize the allocated 'ext'*/ - ext->ta.accapted_chars = "1234567890+-. "; - ext->value = 0; ext->dec_point_pos = 0; ext->digit_count = 5; @@ -72,7 +70,6 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) ext->step = 1; ext->range_max = 99999; ext->range_min = -99999; - ext->value_changed_cb = NULL; lv_ta_set_cursor_type(new_spinbox, LV_CURSOR_BLOCK | LV_CURSOR_HIDDEN); /*hidden by default*/ lv_ta_set_one_line(new_spinbox, true); @@ -198,17 +195,6 @@ void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_m } } -/** - * Set spinbox callback on calue change - * @param spinbox pointer to spinbox - * @param cb Callback function called on value change event - */ -void lv_spinbox_set_value_changed_cb(lv_obj_t * spinbox, lv_spinbox_value_changed_cb_t cb) -{ - lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); - ext->value_changed_cb = cb; -} - /** * Set spinbox left padding in digits count (added between sign and first digit) * @param spinbox pointer to spinbox @@ -288,7 +274,6 @@ void lv_spinbox_increment(lv_obj_t * spinbox) ext->value = ext->range_max; } - if(ext->value_changed_cb != NULL) ext->value_changed_cb(spinbox, ext->value); lv_spinbox_updatevalue(spinbox); } @@ -308,7 +293,6 @@ void lv_spinbox_decrement(lv_obj_t * spinbox) ext->value = ext->range_min; } - if(ext->value_changed_cb != NULL) ext->value_changed_cb(spinbox, ext->value); lv_spinbox_updatevalue(spinbox); } @@ -450,7 +434,6 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox) /*Refresh the text*/ lv_ta_set_text(spinbox, (char*)buf); - /*Set the cursor position*/ int32_t step = ext->step; uint8_t cur_pos = ext->digit_count; diff --git a/lv_objx/lv_spinbox.h b/lv_objx/lv_spinbox.h index 104715c7d945..b387b6a809e6 100644 --- a/lv_objx/lv_spinbox.h +++ b/lv_objx/lv_spinbox.h @@ -53,7 +53,6 @@ typedef struct { uint16_t digit_count:4; uint16_t dec_point_pos:4; /*if 0, there is no separator and the number is an integer*/ uint16_t digit_padding_left:4; - lv_spinbox_value_changed_cb_t value_changed_cb; } lv_spinbox_ext_t; diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index 62b8d7e7bab9..b7e36d0c8d20 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -328,12 +328,14 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(lv_sw_get_state(sw)) { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } else { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); lv_slider_set_value(sw, 0, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED) { @@ -349,20 +351,23 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(v > LV_SW_MAX_VALUE / 2) lv_sw_on(sw, true); else lv_sw_off(sw, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_ENTER) { lv_sw_toggle(sw, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } else if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { lv_slider_set_value(sw, 0, true); - lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); - + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 4c11b1a396a3..9c3e35747d16 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -441,6 +441,8 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) } placeholder_update(ta); + + lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); } /** From 370f8223b6a3fd28723c22c46295df1045d835d7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 7 Mar 2019 01:26:04 +0100 Subject: [PATCH 096/590] lv_indev_read: use the current corridnate as defult for POINTER type --- lv_hal/lv_hal_indev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 7ee8530e3ac4..2b1d0d2798cd 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -110,8 +110,14 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data) memset(data, 0, sizeof(lv_indev_data_t)); - if(indev->driver.read_cb) { + /* For touchpad sometimes users don't the last pressed coordinate on release. + * So be sure a coordinates are initialized to the last point */ + if(indev->driver.type == LV_INDEV_TYPE_POINTER) { + data->point.x = indev->proc.types.pointer.act_point.x; + data->point.y = indev->proc.types.pointer.act_point.y; + } + if(indev->driver.read_cb) { LV_LOG_TRACE("idnev read started"); cont = indev->driver.read_cb(&indev->driver, data); LV_LOG_TRACE("idnev read finished"); From b882174bf9c093e4d6f0240b3361fbaa9ddb637c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Rubio=20G=C3=B3mez?= Date: Thu, 7 Mar 2019 09:50:23 +0100 Subject: [PATCH 097/590] Fixed bsearch size of list elements. [sizeof(uint32_t*) --> sizeof(uint32_t)] --- lv_misc/lv_font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lv_misc/lv_font.c b/lv_misc/lv_font.c index 3482a533255b..77542fbe1807 100644 --- a/lv_misc/lv_font.c +++ b/lv_misc/lv_font.c @@ -225,7 +225,7 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico pUnicode = bsearch(&unicode_letter, (uint32_t*) font->unicode_list, font->glyph_cnt, - sizeof(uint32_t*), + sizeof(uint32_t), lv_font_codeCompare); if (pUnicode != NULL) { @@ -269,7 +269,7 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter pUnicode = bsearch(&unicode_letter, (uint32_t*) font->unicode_list, font->glyph_cnt, - sizeof(uint32_t*), + sizeof(uint32_t), lv_font_codeCompare); if (pUnicode != NULL) { From 15007e9071d1c321869dfc899e5a822f54b89d49 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 8 Mar 2019 06:57:16 +0100 Subject: [PATCH 098/590] add lv_disp_remove --- lv_core/lv_indev.c | 1 + lv_core/lv_refr.c | 2 +- lv_hal/lv_hal_disp.c | 25 +++++++++++++++++++++++++ lv_hal/lv_hal_disp.h | 6 ++++++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 1928c370b13a..76a302fb2c73 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -310,6 +310,7 @@ static void indev_proc_task(void * param) /*Read and process all indevs*/ while(i) { + if(i->driver.disp == NULL) continue; /*Not assigned to any displays*/ indev_act = i; /*Handle reset query before processing the point*/ diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 52c5afa1b14c..b81d71cb4a5a 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -280,7 +280,7 @@ static void lv_refr_area(const lv_area_t * area_p) /*Calculate the max row num*/ lv_coord_t w = lv_area_get_width(area_p); lv_coord_t h = lv_area_get_height(area_p); - lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(NULL) ? y2 = lv_disp_get_ver_res(NULL) - 1 : area_p->y2; + lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? y2 = lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2; int32_t max_row = (uint32_t) vdb->size / w; diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index c3d1683b7268..a7dcf228a0a0 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -135,6 +135,31 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) return disp; } +/** + * Remove a display + * @param disp pointer to display + */ +void lv_disp_remove(lv_disp_t * disp) +{ + bool was_default = false; + if(disp == lv_disp_get_default()) was_default = true; + + /*Detach the input devices */ + lv_indev_t * indev; + indev = lv_indev_next(NULL); + while(indev) { + if(indev->driver.disp == disp) { + indev->driver.disp = NULL; + } + indev = lv_indev_next(indev); + } + + lv_ll_rem(&LV_GC_ROOT(_lv_disp_ll), disp); + lv_mem_free(disp); + + if(was_default) lv_disp_set_default(lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll))); +} + /** * Set a default screen. The new screens will be created on it by default. * @param disp pointer to a display diff --git a/lv_hal/lv_hal_disp.h b/lv_hal/lv_hal_disp.h index e1397b5d257b..89b5a22f8204 100644 --- a/lv_hal/lv_hal_disp.h +++ b/lv_hal/lv_hal_disp.h @@ -160,6 +160,12 @@ void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32 */ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver); +/** + * Remove a display + * @param disp pointer to display + */ +void lv_disp_remove(lv_disp_t * disp); + /** * Set a default screen. The new screens will be created on it by default. * @param disp pointer to a display From 93e2b9e0b9e838e36f848575b58a6d71d85b418b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 8 Mar 2019 07:54:36 +0100 Subject: [PATCH 099/590] update lv_conf_templ.h --- lv_conf_checker.h | 25 ++++++++++++------------- lv_conf_templ.h | 21 ++++++++++----------- lv_core/lv_refr.c | 5 +++-- lv_themes/lv_theme_zen.c | 7 +++++-- 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index 969d79873c83..e693539d0d49 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -61,7 +61,7 @@ #endif #if LV_MEM_CUSTOM == 0 #ifndef LV_MEM_SIZE -# define LV_MEM_SIZE (32U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) /*Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ #endif #ifndef LV_MEM_ATTR # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ @@ -152,15 +152,14 @@ #ifndef LV_USE_GROUP #define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ #endif +#if LV_USE_GROUP +#endif /*LV_USE_GROUP*/ #ifndef LV_USE_GPU #define LV_USE_GPU 1 /*1: Enable GPU interface*/ #endif #ifndef LV_USE_FILESYSTEM #define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ #endif -#ifndef LV_USE_I18N -#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ -#endif #ifndef LV_USE_USER_DATA_SINGLE #define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ #endif @@ -228,25 +227,25 @@ #define LV_USE_THEME_TEMPL 0 /*Just for test*/ #endif #ifndef LV_USE_THEME_DEFAULT -#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ #endif #ifndef LV_USE_THEME_ALIEN -#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ +#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ #endif #ifndef LV_USE_THEME_NIGHT -#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ +#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ #endif #ifndef LV_USE_THEME_MONO -#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/ #endif #ifndef LV_USE_THEME_MATERIAL -#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ #endif #ifndef LV_USE_THEME_ZEN -#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ #endif #ifndef LV_USE_THEME_NEMO -#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ #endif /*================== @@ -309,7 +308,7 @@ #endif #ifndef LV_USE_FONT_MONOSPACE_8 -#define LV_USE_FONT_MONOSPACE_8 1 +#define LV_USE_FONT_MONOSPACE_8 0 #endif /* Optionally declare your custom fonts here. @@ -331,7 +330,7 @@ * LV_OBJ SETTINGS *==================*/ #ifndef LV_OBJ_REALIGN -#define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ #endif /*================== diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 14918fb28f5d..199f81087c48 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -46,7 +46,7 @@ * to store the graphical objects and other data */ #define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ #if LV_MEM_CUSTOM == 0 -# define LV_MEM_SIZE (32U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) /*Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ # define LV_MEM_ATTR /*Complier prefix for big array declaration*/ # define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/ # define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ @@ -93,7 +93,6 @@ typedef void * lv_group_user_data_t; #endif /*LV_USE_GROUP*/ #define LV_USE_GPU 1 /*1: Enable GPU interface*/ #define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define LV_USE_I18N 1 /*1: Enable InternationalizatioN (multi-language) support*/ #define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ #define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ @@ -134,13 +133,13 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t #define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #define LV_USE_THEME_TEMPL 0 /*Just for test*/ -#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ -#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ -#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ -#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ -#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ -#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ -#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ +#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ +#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ /*================== * FONT USAGE @@ -169,7 +168,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t #define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 #define LV_USE_FONT_SYMBOL_40 0 -#define LV_USE_FONT_MONOSPACE_8 1 +#define LV_USE_FONT_MONOSPACE_8 0 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -186,7 +185,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t * LV_OBJ SETTINGS *==================*/ typedef void * lv_obj_user_data_t; /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ -#define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ /*================== * LV OBJ X USAGE diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index b81d71cb4a5a..711b8708bb8a 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -192,6 +192,7 @@ static void lv_refr_task(void * param) /*Call monitor cb if present*/ if(disp_refr->driver.monitor_cb) { + printf("%d ms\n", lv_tick_elaps(start)); disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num); } } @@ -528,10 +529,10 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) */ static void lv_refr_vdb_flush(void) { - lv_disp_buf_t * vdb = lv_disp_get_buf(lv_refr_get_disp_refreshing()); + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*In double buffered mode wait until the other buffer is flushed before flushing the current one*/ - if(vdb->buf1 && vdb->buf2) { + if(lv_disp_is_double_buf(disp_refr)) { while(vdb->flushing); } diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index df0dd9b73057..a7181ba51558 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -760,8 +760,9 @@ static void win_init(void) #if LV_USE_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; @@ -776,8 +777,10 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ + #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; From 14b03df17489f59901359ce5d99254938c911ed2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 8 Mar 2019 08:02:20 +0100 Subject: [PATCH 100/590] remove debug printf --- lv_core/lv_refr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 711b8708bb8a..e3145751c9a5 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -192,7 +192,6 @@ static void lv_refr_task(void * param) /*Call monitor cb if present*/ if(disp_refr->driver.monitor_cb) { - printf("%d ms\n", lv_tick_elaps(start)); disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num); } } From bff65c217dccdd87aa71255120ad8a4b864b592e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 8 Mar 2019 08:32:17 +0100 Subject: [PATCH 101/590] remove lv_i18n --- lv_core/lv_i18n.c | 256 --------------------------------------------- lv_core/lv_i18n.h | 108 ------------------- lv_objx/lv_img.c | 1 - lv_objx/lv_label.c | 1 - lvgl.h | 1 - 5 files changed, 367 deletions(-) delete mode 100644 lv_core/lv_i18n.c delete mode 100644 lv_core/lv_i18n.h diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c deleted file mode 100644 index 0e4abce3e10e..000000000000 --- a/lv_core/lv_i18n.c +++ /dev/null @@ -1,256 +0,0 @@ -/** - * @file lv_i18n.c - * - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_i18n.h" -#if LV_USE_I18N - -#include "lv_obj.h" -#include "../lv_misc/lv_gc.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ -static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id); - -/********************** - * STATIC VARIABLES - **********************/ -static const lv_i18n_lang_pack_t * languages; -static const lv_i18n_lang_t * local_lang; - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Set the languages for internationalization - * @param langs pointer to the array of languages. (Last element has to be `NULL`) - * @return 0: no error; < 0: error - */ -int lv_i18n_init(const lv_i18n_lang_pack_t * langs) -{ - if(langs == NULL) { - LV_LOG_WARN("lv_i18n_init: `langs` can't be NULL"); - return -1; - } - - if(langs[0] == NULL) { - LV_LOG_WARN("lv_i18n_init: `langs` need to contain at least one translation"); - return -1; - } - - languages = langs; - local_lang = langs[0]; /*Automatically select the first language*/ - - return 0; -} - -/** - * Change the localization (language) - * @param lang_code name of the translation to use. E.g. "en_GB" - * @return 0: no error; < 0: error - */ -int lv_i18n_set_local(const char * lang_code) -{ - if(languages == NULL) { - LV_LOG_WARN("lv_i18n_set_local: The languages are not set with lv_i18n_init() yet"); - return -1; - } - - uint16_t i; - for(i = 0; languages[i] != NULL; i++) { - if(strcmp(languages[i]->name, lang_code) == 0) break; /*A language has found*/ - } - - /*The language wasn't found*/ - if(languages[i] == NULL) { - LV_LOG_WARN("lv_i18n_set_local: The selected language doesn't found"); - return -1; - } - - local_lang = languages[i]; - - LV_LOG_INFO("lv_i18n_set_local: new local selected") - - return 0; -} - -/** - * Get the translation from a message ID - * @param msg_id message ID - * @return the translation of `msg_id` on the set local - */ -const char * lv_i18n_get_text(const char * msg_id) -{ - if(local_lang == NULL) { - LV_LOG_WARN("lv_i18n_get_text: No language selected"); - return msg_id; - } - - const lv_i18n_lang_t * lang = local_lang; - - if(lang->simple == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text: No translations are specified on the current local. Fallback to the default language"); - lang = languages[0]; - } - - if(lang->simple == NULL) { - LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); - return msg_id; - } - } - - /*Find the translation*/ - const void * txt = lv_i18n_get_text_core(lang->simple, msg_id); - if(txt == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text: No translation found even on the default language"); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text: No translation found on this language. Fallback to the default language"); - lang = languages[0]; - } - } - - /*Try again with the default language*/ - if(lang->simple == NULL) { - LV_LOG_WARN("lv_i18n_get_text: No translations are specified even on the default language."); - return msg_id; - } - - txt = lv_i18n_get_text_core(lang->simple, msg_id); - if(txt == NULL) { - LV_LOG_WARN("lv_i18n_get_text: No translation found even on the default language"); - return msg_id; - } - - return txt; -} - -/** - * Get the translation from a message ID and apply the language's plural rule to get correct form - * @param msg_id message ID - * @param num an integer to select the correct plural form - * @return the translation of `msg_id` on the set local - */ -const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num) -{ - if(local_lang == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); - return msg_id; - } - - const lv_i18n_lang_t * lang = local_lang; - - if(lang->plural_rule == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined even on the default language"); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined for the language. Fallback to the default language"); - lang = languages[0]; - } - - if(lang->plural_rule == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plural rule has defined even on the default language"); - return msg_id; - } - } - - lv_i18n_plural_type_t ptype = lang->plural_rule(num); - - if(lang->plurals[ptype] == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural:No translations of the required plural form for the language. Fallback to the default language"); - lang = languages[0]; - } - } - - /*Find the translation*/ - const void * txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); - if(txt == NULL) { - if(lang == languages[0]) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); - return msg_id; - } else { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found on this language. Fallback to the default language"); - lang = languages[0]; - } - } - - /*Try again with the default language*/ - if(lang->plurals == NULL || lang->plural_rule == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No plurals or plural rule has defined even on the default language"); - return msg_id; - } - - ptype = lang->plural_rule(num); - if(lang->plurals[ptype] == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translations of the required plural form even on the default language."); - return msg_id; - } - - txt = lv_i18n_get_text_core(lang->plurals[ptype], msg_id); - - if(txt == NULL) { - LV_LOG_WARN("lv_i18n_get_text_plural: No translation found even on the default language"); - return msg_id; - } - - return txt; -} - -/** - * Get the name of the currently used localization. - * @return name of the currently used localization. E.g. "en_GB" - */ -const char * lv_i18n_get_current_local(void) -{ - if(local_lang) return local_lang->name; - else return NULL; -} - -/********************** - * STATIC FUNCTIONS - **********************/ - -static const void * lv_i18n_get_text_core(const lv_i18n_trans_t * trans, const char * msg_id) -{ - uint16_t i; - for(i = 0; trans[i].msg_id != NULL; i++) { - if(strcmp(trans[i].msg_id, msg_id) == 0) { - /*The msg_id has found. Check the translation*/ - if(trans[i].txt_trans) return trans[i].txt_trans; - } - } - - LV_LOG_TRACE("lv_i18n_get_text_core: `msg_id` wasn't found"); - return NULL; - -} - -#endif /*LV_USE_I18N*/ diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h deleted file mode 100644 index 7bfdcef3e726..000000000000 --- a/lv_core/lv_i18n.h +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @file lv_lang.h - * - */ - -#ifndef LV_I18N_H -#define LV_I18N_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../lv_conf.h" -#endif - -#if LV_USE_I18N - -#include - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -typedef enum { - LV_I18N_PLURAL_TYPE_ZERO, - LV_I18N_PLURAL_TYPE_ONE, - LV_I18N_PLURAL_TYPE_TWO, - LV_I18N_PLURAL_TYPE_FEW, - LV_I18N_PLURAL_TYPE_MANY, - LV_I18N_PLURAL_TYPE_OTHER, - _LV_I18N_PLURAL_TYPE_NUM, -}lv_i18n_plural_type_t; - -typedef struct { - const char * msg_id; - const char * txt_trans; -}lv_i18n_trans_t; - - -typedef struct { - const char * name; /*E.g. "en_GB"*/ - const lv_i18n_trans_t * simple; /*Translations of simple texts where no plurals are used*/ - const lv_i18n_trans_t * plurals[_LV_I18N_PLURAL_TYPE_NUM]; /*Translations of the plural forms*/ - uint8_t (*plural_rule)(int32_t num); /*Function pointer to get the correct plural form for a number*/ -}lv_i18n_lang_t; - -typedef const lv_i18n_lang_t * lv_i18n_lang_pack_t; - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/** - * Set the languages for internationalization - * @param langs pointer to the array of languages. (Last element has to be `NULL`) - * @return 0: no error; < 0: error - */ -int lv_i18n_init(const lv_i18n_lang_pack_t * langs); - -/** - * Change the localization (language) - * @param lang_code name of the translation to use. E.g. "en_GB" - * @return 0: no error; < 0: error - */ -int lv_i18n_set_local(const char * lang_code); - -/** - * Get the translation from a message ID - * @param msg_id message ID - * @return the translation of `msg_id` on the set local - */ -const char * lv_i18n_get_text(const char * msg_id); - -/** - * Get the translation from a message ID and apply the language's plural rule to get correct form - * @param msg_id message ID - * @param num an integer to select the correct plural form - * @return the translation of `msg_id` on the set local - */ -const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num); - -/** - * Get the name of the currently used localization. - * @return name of the currently used localization. E.g. "en_GB" - */ -const char * lv_i18n_get_current_local(void); - -/********************** - * MACROS - **********************/ - -#endif /*LV_USE_I18N*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*LV_LANG_H*/ diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 5bdb29226884..e246d679555f 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -14,7 +14,6 @@ #error "lv_img: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif -#include "../lv_core/lv_i18n.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_txt.h" diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index 1d3f6d4fcdc5..7f0ba54aa729 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -11,7 +11,6 @@ #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" -#include "../lv_core/lv_i18n.h" #include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_math.h" diff --git a/lvgl.h b/lvgl.h index 4654578f62ec..f4a3149fc257 100644 --- a/lvgl.h +++ b/lvgl.h @@ -24,7 +24,6 @@ extern "C" { #include "lv_core/lv_obj.h" #include "lv_core/lv_group.h" -#include "lv_core/lv_i18n.h" #include "lv_core/lv_refr.h" #include "lv_core/lv_disp.h" From a59a6880f01c9b3285335c854ff746246b2de242 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 8 Mar 2019 11:53:34 +0100 Subject: [PATCH 102/590] lv_img_offset: invalidate img when offset changes --- lv_objx/lv_img.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index 0a203eca51f8..dff261d55ba9 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -251,6 +251,7 @@ void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y) if((x < ext->w - 1) && (y < ext->h - 1)) { ext->offset.x = x; ext->offset.y = y; + lv_obj_invalidate(img); } } @@ -266,7 +267,9 @@ void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x) if(x < ext->w - 1) { ext->offset.x = x; + lv_obj_invalidate(img); } + } /** @@ -281,6 +284,7 @@ void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y) if(y < ext->h - 1) { ext->offset.y = y; + lv_obj_invalidate(img); } } From bef17224e4c5cea2748d47ca0446574788a8607d Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 8 Mar 2019 14:11:13 +0100 Subject: [PATCH 103/590] fix some typos --- lv_conf_templ.h | 2 +- lv_core/lv_indev.c | 8 ++++---- lv_hal/lv_hal_indev.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_conf_templ.h b/lv_conf_templ.h index 199f81087c48..ef1ab71d30d4 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -185,7 +185,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t * LV_OBJ SETTINGS *==================*/ typedef void * lv_obj_user_data_t; /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ -#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ /*================== * LV OBJ X USAGE diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 76a302fb2c73..1cf672d6e516 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -285,7 +285,7 @@ lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev) */ void lv_indev_wait_release(lv_indev_t * indev) { - indev->proc.types.pointer.wait_unil_release = 1; + indev->proc.types.pointer.wait_until_release = 1; } /********************** @@ -644,7 +644,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) { lv_obj_t * pr_obj = proc->types.pointer.act_obj; - if(proc->types.pointer.wait_unil_release != 0) return; + if(proc->types.pointer.wait_until_release != 0) return; lv_disp_t * disp = indev_act->driver.disp; @@ -777,12 +777,12 @@ static void indev_proc_press(lv_indev_proc_t * proc) */ static void indev_proc_release(lv_indev_proc_t * proc) { - if(proc->types.pointer.wait_unil_release != 0) { + if(proc->types.pointer.wait_until_release != 0) { proc->types.pointer.act_obj = NULL; proc->types.pointer.last_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; - proc->types.pointer.wait_unil_release = 0; + proc->types.pointer.wait_until_release = 0; } /*Forget the act obj and send a released signal */ diff --git a/lv_hal/lv_hal_indev.h b/lv_hal/lv_hal_indev.h index 68e27998299b..9d224948af52 100644 --- a/lv_hal/lv_hal_indev.h +++ b/lv_hal/lv_hal_indev.h @@ -99,7 +99,7 @@ typedef struct _lv_indev_proc_t { /*Flags*/ uint8_t drag_limit_out :1; uint8_t drag_in_prog :1; - uint8_t wait_unil_release :1; + uint8_t wait_until_release :1; }pointer; struct { /*Keypad data*/ lv_indev_state_t last_state; From 4ab2e505fd33a00b0a12c8bb703651a6f5aecceb Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:02:56 +0330 Subject: [PATCH 104/590] add 2 getter functions for offset attribute. --- lv_objx/lv_img.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lv_objx/lv_img.c b/lv_objx/lv_img.c index dff261d55ba9..cab094139689 100644 --- a/lv_objx/lv_img.c +++ b/lv_objx/lv_img.c @@ -343,6 +343,30 @@ bool lv_img_get_auto_size(const lv_obj_t * img) return ext->auto_size == 0 ? false : true; } +/** + * Get the offset.x attribute of the img object. + * @param img pointer to an image + * @return offset.x value. + */ +lv_coord_t lv_img_get_offset_x(lv_obj_t *img) +{ + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + + return ext->offset.x; +} + +/** + * Get the offset.y attribute of the img object. + * @param img pointer to an image + * @return offset.y value. + */ +lv_coord_t lv_img_get_offset_y(lv_obj_t *img) +{ + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + + return ext->offset.y; +} + /********************** * STATIC FUNCTIONS **********************/ From e263dddde9175be85271ac7b69cb86f53bbe1cce Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:05:36 +0330 Subject: [PATCH 105/590] add declaration for offset getter functions. --- lv_objx/lv_img.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 73a0d4246be8..0ec430c07987 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -183,6 +183,20 @@ uint16_t lv_img_get_src_id(lv_obj_t * img); */ bool lv_img_get_auto_size(const lv_obj_t * img); +/** + * Get the offset.x attribute of the img object. + * @param img pointer to an image + * @return offset.x value. + */ +lv_coord_t lv_img_get_offset_x(lv_obj_t *img); + +/** + * Get the offset.y attribute of the img object. + * @param img pointer to an image + * @return offset.y value. + */ +lv_coord_t lv_img_get_offset_y(lv_obj_t *img); + /** * Get the style of an image object * @param img pointer to an image object From 52ee38d7c93d4e9a6cbb68b3686fa3301012b35e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 9 Mar 2019 05:51:33 +0100 Subject: [PATCH 106/590] fix warnings --- lv_core/lv_core.mk | 1 - lv_core/lv_indev.c | 11 ++++++++++- lv_misc/lv_misc.mk | 1 - lv_objx/lv_cont.c | 20 +++++++++----------- lv_objx/lv_ddlist.c | 2 +- lv_objx/lv_ta.c | 2 -- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lv_core/lv_core.mk b/lv_core/lv_core.mk index ac69f25e3079..daf6b33b172b 100644 --- a/lv_core/lv_core.mk +++ b/lv_core/lv_core.mk @@ -4,7 +4,6 @@ CSRCS += lv_disp.c CSRCS += lv_obj.c CSRCS += lv_refr.c CSRCS += lv_style.c -CSRCS += lv_lang.c DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_core VPATH += :$(LVGL_DIR)/lvgl/lv_core diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 76a302fb2c73..3dd842bf7531 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -675,6 +675,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If a new object found the previous was lost, so send a signal*/ if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST); if(proc->reset_query) return; /*The object might be deleted*/ } @@ -712,6 +713,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSED); if(proc->reset_query) return; /*The object might be deleted*/ } @@ -736,6 +738,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is active object and it can be dragged run the drag*/ if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSING); if(proc->reset_query) return; /*The object might be deleted*/ @@ -747,6 +750,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED); if(proc->reset_query) return; /*The object might be deleted*/ @@ -762,6 +766,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT); if(proc->reset_query) return; /*The object might be deleted*/ proc->longpr_rep_timestamp = lv_tick_get(); @@ -792,6 +797,8 @@ static void indev_proc_release(lv_indev_proc_t * proc) * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); if(proc->reset_query) return; /*The object might be deleted*/ @@ -807,6 +814,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); @@ -999,7 +1007,6 @@ static void indev_drag(lv_indev_proc_t * state) if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { if(state->types.pointer.drag_in_prog != 0) { /*Send the drag begin signal on first move*/ drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); - if(state->reset_query != 0) return; } state->types.pointer.drag_in_prog = 1; @@ -1073,6 +1080,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.x = 0; proc->types.pointer.drag_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ } } @@ -1080,6 +1088,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) else { proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ } } diff --git a/lv_misc/lv_misc.mk b/lv_misc/lv_misc.mk index 470f1230d866..ad553d2edc10 100644 --- a/lv_misc/lv_misc.mk +++ b/lv_misc/lv_misc.mk @@ -8,7 +8,6 @@ CSRCS += lv_mem.c CSRCS += lv_ll.c CSRCS += lv_color.c CSRCS += lv_txt.c -CSRCS += lv_ufs.c CSRCS += lv_math.c CSRCS += lv_log.c CSRCS += lv_gc.c diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 81fb4e3feb6f..fcfddd6429ab 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -623,7 +623,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) lv_area_t tight_area; lv_area_t ori; lv_style_t * style = lv_obj_get_style(cont); - lv_obj_t * i; + lv_obj_t * child_i; lv_coord_t hpad = style->body.padding.hor; lv_coord_t vpad = style->body.padding.ver; @@ -648,12 +648,12 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) tight_area.x2 = LV_COORD_MIN; tight_area.y2 = LV_COORD_MIN; - LV_LL_READ(cont->child_ll, i) { - if(lv_obj_get_hidden(i) != false) continue; - tight_area.x1 = LV_MATH_MIN(tight_area.x1, i->coords.x1); - tight_area.y1 = LV_MATH_MIN(tight_area.y1, i->coords.y1); - tight_area.x2 = LV_MATH_MAX(tight_area.x2, i->coords.x2); - tight_area.y2 = LV_MATH_MAX(tight_area.y2, i->coords.y2); + LV_LL_READ(cont->child_ll, child_i) { + if(lv_obj_get_hidden(child_i) != false) continue; + tight_area.x1 = LV_MATH_MIN(tight_area.x1, child_i->coords.x1); + tight_area.y1 = LV_MATH_MIN(tight_area.y1, child_i->coords.y1); + tight_area.x2 = LV_MATH_MAX(tight_area.x2, child_i->coords.x2); + tight_area.y2 = LV_MATH_MAX(tight_area.y2, child_i->coords.y2); } tight_area.x1 -= hpad; @@ -708,13 +708,11 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) cont->signal_cb(cont, LV_SIGNAL_CORD_CHG, &ori); /*Inform the parent about the new coordinates*/ - lv_obj_t * par = lv_obj_get_parent(cont); par->signal_cb(par, LV_SIGNAL_CHILD_CHG, cont); /*Tell the children the parent's size has changed*/ - lv_obj_t * i; - LV_LL_READ(cont->child_ll, i) { - i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + LV_LL_READ(cont->child_ll, child_i) { + child_i->signal_cb(child_i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } } diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 974f811b0421..8ea3d50d82e5 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -691,7 +691,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par if(ext->opened) { ext->sel_opt_id_ori = ext->sel_opt_id; ext->opened = 0; - lv_res_t res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return res; #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 9c3e35747d16..5b76c1ada6c0 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1223,8 +1223,6 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); From 2bf4e080e419cff0645d9b4904a7bbed1e8c12ba Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 11 Mar 2019 06:18:44 +0100 Subject: [PATCH 107/590] remove lv_btnm_action to replace with generic event_cb --- lv_objx/lv_btnm.c | 430 +++++++++++++++++++++++----------------------- lv_objx/lv_btnm.h | 174 ++++++++++--------- lv_objx/lv_kb.c | 6 +- 3 files changed, 316 insertions(+), 294 deletions(-) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index d10bf848b964..3cb724b84750 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -32,10 +32,9 @@ static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits); static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits); static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits); static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits); -const char * cut_ctrl_byte(const char * btn_str); +static bool button_is_toggle(lv_btnm_ctrl_t ctrl_bits); +static bool button_get_toggle_state(lv_btnm_ctrl_t ctrl_bits); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); -static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id); -static void parse_control_bytes(const lv_obj_t * btnm, const char ** map); static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); @@ -82,12 +81,9 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) ext->btn_cnt = 0; ext->btn_id_pr = LV_BTNM_PR_NONE; - ext->btn_id_tgl = LV_BTNM_PR_NONE; ext->button_areas = NULL; ext->ctrl_bits = NULL; - ext->action = NULL; ext->map_p = NULL; - ext->toggle = 0; ext->recolor = 0; ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; @@ -122,9 +118,6 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_btnm_ext_t * copy_ext = lv_obj_get_ext_attr(copy); memcpy(ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn)); - ext->action = copy_ext->action; - ext->toggle = copy_ext->toggle; - ext->btn_id_tgl = copy_ext->btn_id_tgl; lv_btnm_set_map(new_btnm, lv_btnm_get_map(copy)); } @@ -142,17 +135,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * button matrix keeps a reference to the map and so the string array must not * be deallocated during the life of the matrix. * @param btnm pointer to a button matrix object - * @param map pointer a string array. The last string has to be: "". - * Use "\n" to begin a new line. - * The first byte can be a control data: - * - bit 7: always 1 - * - bit 6: always 0 - * - bit 5: inactive (disabled) (\24x) - * - bit 4: no repeat (on long press) (\22x) - * - bit 3: hidden (\21x) - * - bit 2..0: button relative width - * Example (practically use octal numbers): "\224abc": "abc" text - * with 4 width and no long press. + * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) { @@ -174,9 +157,6 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /*Analyze the map and create the required number of buttons*/ allocate_btn_areas_and_controls(btnm, map); - - /*Set the control bytes*/ - parse_control_bytes(btnm, map); } ext->map_p = map; @@ -294,18 +274,8 @@ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map } /** - * Set a new callback function for the buttons (It will be called when a button is released) - * @param btnm: pointer to button matrix object - * @param cb pointer to a callback function - */ -void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_action_t action) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - ext->action = action; -} - -/** - * Set the pressed button + * Set the pressed button i.e. visually highlight it. + * Mainly used a when the btnm is in a group to show the selected button * @param btnm pointer to button matrix object * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) */ @@ -323,26 +293,6 @@ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id) lv_obj_invalidate(btnm); } -/** - * Enable or disable button toggling - * @param btnm pointer to button matrix object - * @param en true: enable toggling; false: disable toggling - * @param id index of the currently toggled button (ignored if 'en' == false) - */ -void lv_btnm_set_toggle(lv_obj_t * btnm, bool en, uint16_t id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - - ext->toggle = en == false ? 0 : 1; - if(ext->toggle != 0) { - if(id >= ext->btn_cnt) id = ext->btn_cnt - 1; - ext->btn_id_tgl = id; - } else { - ext->btn_id_tgl = LV_BTNM_PR_NONE; - } - - lv_obj_invalidate(btnm); -} /** * Set a style of a button matrix @@ -381,6 +331,11 @@ void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style } } +/** + * Enable recoloring of button's texts + * @param btnm pointer to button matrix object + * @param en true: enable recoloring; false: disable + */ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); @@ -400,9 +355,9 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_idx >= ext->btn_cnt) return; if (hidden) - ext->ctrl_bits[btn_idx] |= LV_BTNM_HIDE_MASK; + ext->ctrl_bits[btn_idx] |= LV_BTNM_BTN_HIDDEN; else - ext->ctrl_bits[btn_idx] &= (~LV_BTNM_HIDE_MASK); + ext->ctrl_bits[btn_idx] &= (~LV_BTNM_BTN_HIDDEN); invalidate_button_area(btnm, btn_idx); } @@ -410,40 +365,56 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param disabled true: disable the button */ -void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) +void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool disabled) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_idx >= ext->btn_cnt) return; - if (disabled) - ext->ctrl_bits[btn_idx] |= LV_BTNM_INACTIVE_MASK; - else - ext->ctrl_bits[btn_idx] &= (~LV_BTNM_INACTIVE_MASK); + if (btn_id >= ext->btn_cnt) return; - invalidate_button_area(btnm, btn_idx); + if (disabled)ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_INACTIVE; + else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_INACTIVE); + + invalidate_button_area(btnm, btn_id); } /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param disabled true: disable repeat */ -void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled) +void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool disabled) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_idx >= ext->btn_cnt) return; - if (disabled) - ext->ctrl_bits[btn_idx] |= LV_BTNM_REPEAT_DISABLE_MASK; - else - ext->ctrl_bits[btn_idx] &= (~LV_BTNM_REPEAT_DISABLE_MASK); + if (btn_id >= ext->btn_cnt) return; + if (disabled) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_NO_REPEAT; + else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_NO_REPEAT); - invalidate_button_area(btnm, btn_idx); + invalidate_button_area(btnm, btn_id); } -/*** +/** + * Make the a single button button toggled or not toggled. + * @param btnm pointer to button matrix object + * @param btn_id index of button (not counting "\n") + * @param en true: enable toggling; false: disable toggling + */ +void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool toggle) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_id >= ext->btn_cnt) return; + + if(toggle) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE_STATE; + else ext->ctrl_bits[btn_id] &= LV_BTNM_BTN_TOGGLE_STATE; + + invalidate_button_area(btnm, btn_id); + + lv_obj_invalidate(btnm); +} + +/** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object * @param btn_idx 0 based index of the button to modify. @@ -451,19 +422,20 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo * @param disabled true: disable the button * @param disable_repeat true: disable repeat */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, bool disabled, bool disable_repeat) +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool disabled, bool disable_repeat, bool toggle, bool toggle_state) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_idx >= ext->btn_cnt) return; + if (btn_id >= ext->btn_cnt) return; - uint8_t flags = ext->ctrl_bits[btn_idx]; + uint8_t flags = ext->ctrl_bits[btn_id]; - flags = hidden ? flags | LV_BTNM_HIDE_MASK : flags & (~LV_BTNM_HIDE_MASK); - flags = disabled ? flags | LV_BTNM_INACTIVE_MASK : flags & (~LV_BTNM_INACTIVE_MASK); - flags = disable_repeat ? flags | LV_BTNM_REPEAT_DISABLE_MASK : flags & (~LV_BTNM_REPEAT_DISABLE_MASK); + flags = hidden ? flags | LV_BTNM_BTN_HIDDEN : flags & (~LV_BTNM_BTN_HIDDEN); + flags = disabled ? flags | LV_BTNM_BTN_INACTIVE : flags & (~LV_BTNM_BTN_INACTIVE); + flags = toggle ? flags | LV_BTNM_BTN_TOGGLE : flags & (~LV_BTNM_BTN_TOGGLE); + flags = toggle_state ? flags | LV_BTNM_BTN_TOGGLE_STATE : flags & (~LV_BTNM_BTN_TOGGLE_STATE); - ext->ctrl_bits[btn_idx] = flags; - invalidate_button_area(btnm, btn_idx); + ext->ctrl_bits[btn_id] = flags; + invalidate_button_area(btnm, btn_id); } @@ -471,18 +443,18 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively * expensive operation. It is recommended that initial width be specified using - * the control characters when calling `lv_btnm_set_map` or via * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param width Relative width compared to the buttons in the same row. [1..7] */ -void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width) { +void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width) +{ lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_idx >= ext->btn_cnt) return; - ext->ctrl_bits[btn_idx] &= (~LV_BTNM_WIDTH_MASK); - ext->ctrl_bits[btn_idx] |= (LV_BTNM_WIDTH_MASK & width); + if (btn_id >= ext->btn_cnt) return; + ext->ctrl_bits[btn_id] &= (~LV_BTNM_WIDTH_MASK); + ext->ctrl_bits[btn_id] |= (LV_BTNM_WIDTH_MASK & width); lv_btnm_set_map(btnm, ext->map_p); } @@ -504,38 +476,128 @@ const char ** lv_btnm_get_map(const lv_obj_t * btnm) } /** - * Get a the callback function of the buttons on a button matrix - * @param btnm: pointer to button matrix object - * @return pointer to the callback function + * Check whether the button's text can use recolor or not + * @param btnm pointer to button matrix object + * @return true: text recolor enable; false: disabled + */ +bool lv_btnm_get_recolor(const lv_obj_t * btnm) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + return ext->recolor; +} + +/** + * Get the index of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb` to get the text of the button, check if hidden etc. + * @param btnm pointer to button matrix object + * @return index of the last released button (LV_BTNM_PR_NONE: if unset) */ -lv_btnm_action_t lv_btnm_get_action(const lv_obj_t * btnm) +uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return ext->action; + return ext->btn_id_pr; } /** - * Get the pressed button + * Get the pressed button's index. + * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed` * @param btnm pointer to button matrix object - * @return index of the currently pressed button (LV_BTNM_PR_NONE: if unset) + * @return index of the pressed button (LV_BTNM_PR_NONE: if unset) */ -uint16_t lv_btnm_get_pressed(const lv_obj_t * btnm) +uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return ext->btn_id_pr; } /** - * Get the toggled button + * Get the button's text + * @param btnm pointer to button matrix object + * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return text of btn_index` button + */ +uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if(btn_id > ext->btn_cnt) return LV_BTNM_PR_NONE; + + uint16_t txt_i = 0; + uint16_t btn_i = 0; + + /* Search the text of ext->btn_pr the buttons text in the map + * Skip "\n"-s*/ + while(btn_i != btn_id) { + btn_i ++; + txt_i ++; + if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++; + } + + if(btn_i == ext->btn_cnt) return LV_BTNM_PR_NONE; + + return txt_i; +} + +/** + * Check whether "no repeat" for a button is set or not. + * The `LV_EVENT_LONG_PRESS_REPEAT` will be sent anyway but it can be ignored by the user if this function returns `true` + * @param btnm pointer to a button matrix object + * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: long press repeat is disabled; false: long press repeat enabled + */ +bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + return button_is_repeat_disabled(ext->ctrl_bits[btn_id]); +} + +/** + * Check whether a button for a button is hidden or not. + * Events will be sent anyway but they can be ignored by the user if this function returns `true` + * @param btnm pointer to a button matrix object + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: hidden; false: not hidden + */ +bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + return button_is_hidden(ext->ctrl_bits[btn_id]); +} + +/** + * Check whether a button for a button is inactive or not. + * Events will be sent anyway but they can be ignored by the user if this function returns `true` + * @param btnm pointer to a button matrix object + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: inactive; false: not inactive + */ +bool lv_btnm_is_btn_inactive(lv_obj_t * btnm, uint16_t btn_id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + return button_is_inactive(ext->ctrl_bits[btn_id]); +} +/** + * Check if the button can be toggled or not * @param btnm pointer to button matrix object - * @return index of the currently toggled button (LV_BTNM_PR_NONE: if unset) + * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) */ -uint16_t lv_btnm_get_toggled(const lv_obj_t * btnm) +bool lv_btnm_is_btn_toggle(const lv_obj_t * btnm, int16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if(ext->toggle == 0) return LV_BTNM_PR_NONE; - else return ext->btn_id_tgl; + return button_is_toggle(ext->ctrl_bits[btn_id]); +} + +/** + * Check if the button is toggled or not + * @param btnm pointer to button matrix object + * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) + */ +bool lv_btnm_get_btn_toggle_state(const lv_obj_t * btnm, int16_t btn_id) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + return button_get_toggle_state(ext->ctrl_bits[btn_id]); } /** @@ -576,13 +638,6 @@ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) return style; } -bool lv_btnm_get_recolor(const lv_obj_t * btnm) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - - return ext->recolor; -} - /********************** * STATIC FUNCTIONS **********************/ @@ -646,11 +701,12 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo btn_h = lv_area_get_height(&area_tmp); /*Load the style*/ + bool tgl_state = button_get_toggle_state(ext->ctrl_bits[btn_i]); if(button_is_inactive(ext->ctrl_bits[btn_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); - else if(btn_i != ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); - else if(btn_i == ext->btn_id_pr && btn_i != ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); - else if(btn_i != ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); - else if(btn_i == ext->btn_id_pr && btn_i == ext->btn_id_tgl) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR); + else if(btn_i != ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); + else if(btn_i == ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); + else if(btn_i != ext->btn_id_pr && tgl_state == true) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); + else if(btn_i == ext->btn_id_pr && tgl_state == true) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR); else btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/ lv_style_copy(&style_tmp, btn_style); @@ -718,13 +774,22 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_mem_free(ext->ctrl_bits); } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) { lv_btnm_set_map(btnm, ext->map_p); - } else if(sign == LV_SIGNAL_PRESSING) { + } + else if(sign == LV_SIGNAL_PRESSED) { + uint16_t btn_pr; + /*Search the pressed area*/ + lv_indev_get_point(param, &p); + btn_pr = get_button_from_point(btnm, &p); + + ext->btn_id_pr = btn_pr; + ext->btn_id_act = btn_pr; + } + else if(sign == LV_SIGNAL_PRESSING) { uint16_t btn_pr; /*Search the pressed area*/ lv_indev_get_point(param, &p); btn_pr = get_button_from_point(btnm, &p); /*Invalidate to old and the new areas*/; - //lv_obj_get_coords(btnm, &btnm_area); if(btn_pr != ext->btn_id_pr) { lv_indev_reset_lpr(param); if(ext->btn_id_pr != LV_BTNM_PR_NONE) { @@ -737,51 +802,38 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = btn_pr; } + else if(sign == LV_SIGNAL_RELEASED) { + if(ext->btn_id_pr != LV_BTNM_PR_NONE) { - else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - if(ext->action && ext->btn_id_pr != LV_BTNM_PR_NONE) { - uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); - if(txt_i != LV_BTNM_PR_NONE) { - if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_pr]) == false && - button_is_inactive(ext->ctrl_bits[ext->btn_id_pr]) == false) { - res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); + /*Toggle the button if enabled*/ + if(button_is_toggle(ext->ctrl_bits[ext->btn_id_pr])) { + if(ext->ctrl_bits[ext->btn_id_pr] & LV_BTNM_BTN_TOGGLE_STATE) { + ext->ctrl_bits[ext->btn_id_pr] &= LV_BTNM_BTN_TOGGLE_STATE; + } else { + ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_BTN_TOGGLE_STATE; } } - } - } else if(sign == LV_SIGNAL_RELEASED) { - if(ext->btn_id_pr != LV_BTNM_PR_NONE) { - uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); - if(button_is_inactive(ext->ctrl_bits[ext->btn_id_pr]) == false && txt_i != LV_BTNM_PR_NONE) { /*Ignore the inactive buttons and clicks between the buttons*/ - if(ext->action) res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); - if(res == LV_RES_OK) { - /*Invalidate to old pressed area*/; - invalidate_button_area(btnm, ext->btn_id_pr); - - if(ext->toggle != 0) { - /*Invalidate to old toggled area*/; - invalidate_button_area(btnm, ext->btn_id_tgl); - - ext->btn_id_tgl = ext->btn_id_pr; - - } - #if LV_USE_GROUP - /*Leave the clicked button when releases if this not the focused object in a group*/ - lv_group_t * g = lv_obj_get_group(btnm); - if(lv_group_get_focused(g) != btnm) { - ext->btn_id_pr = LV_BTNM_PR_NONE; - } - #else - ext->btn_id_pr = LV_BTNM_PR_NONE; - #endif - - } +#if LV_USE_GROUP + /*Leave the clicked button when releases if this not the focused object in a group*/ + lv_group_t * g = lv_obj_get_group(btnm); + if(lv_group_get_focused(g) != btnm) { + ext->btn_id_pr = LV_BTNM_PR_NONE; } +#else + ext->btn_id_pr = LV_BTNM_PR_NONE; +#endif } - } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { + + /*Invalidate to old pressed area*/; + invalidate_button_area(btnm, ext->btn_id_pr); + + } + else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { ext->btn_id_pr = LV_BTNM_PR_NONE; lv_obj_invalidate(btnm); - } else if(sign == LV_SIGNAL_FOCUS) { + } + else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); @@ -802,7 +854,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = 0; #endif lv_obj_invalidate(btnm); - } else if(sign == LV_SIGNAL_CONTROLL) { + } + else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT) { if(ext->btn_id_pr == LV_BTNM_PR_NONE) ext->btn_id_pr = 0; @@ -853,18 +906,13 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_ENTER) { - if(ext->action != NULL) { - uint16_t txt_i = get_button_text(btnm, ext->btn_id_pr); - if(txt_i != LV_BTNM_PR_NONE) { - res = ext->action(btnm, cut_ctrl_byte(ext->map_p[txt_i])); - } - } } - } else if(sign == LV_SIGNAL_GET_EDITABLE) { + } + else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; *editable = true; - } else if(sign == LV_SIGNAL_GET_TYPE) { + } + else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ @@ -914,23 +962,6 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** ext->btn_cnt = btn_cnt; } -/** - * Set the control bytes as provided in the map strings - * @param btnm pointer to button matrix object - * @param map_p pointer to a string array - */ -static void parse_control_bytes(const lv_obj_t * btnm, const char ** map) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - - for (uint16_t i = 0; i < ext->btn_cnt; i++) { - ext->ctrl_bits[i] = ((map[i][0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) - ? map[i][0] - : 0; - } -} - - /** * Get the width of a button in units (default is 1). * @param ctrl_bits least significant 3 bits used (1..7 valid values) @@ -943,25 +974,27 @@ static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits) static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_HIDE_MASK; + return ctrl_bits & LV_BTNM_BTN_HIDDEN; } static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_REPEAT_DISABLE_MASK; + return ctrl_bits & LV_BTNM_BTN_NO_REPEAT; } static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_INACTIVE_MASK; + return ctrl_bits & LV_BTNM_BTN_INACTIVE; } +static bool button_is_toggle(lv_btnm_ctrl_t ctrl_bits) +{ + return ctrl_bits & LV_BTNM_BTN_TOGGLE; +} -const char * cut_ctrl_byte(const char * btn_str) +static bool button_get_toggle_state(lv_btnm_ctrl_t ctrl_bits) { - /*Cut the control byte if present*/ - if((btn_str[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) return &btn_str[1]; - else return btn_str; + return ctrl_bits & LV_BTNM_BTN_TOGGLE_STATE; } /** @@ -994,33 +1027,6 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p) return i; } -/** - * Get the text of a button - * @param btnm pointer to a button matrix object - * @param btn_id button id - * @return text id in ext->map_p or LV_BTNM_PR_NONE if 'btn_id' was invalid - */ -static uint16_t get_button_text(lv_obj_t * btnm, uint16_t btn_id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if(btn_id > ext->btn_cnt) return LV_BTNM_PR_NONE; - - uint16_t txt_i = 0; - uint16_t btn_i = 0; - - /* Search the text of ext->btn_pr the buttons text in the map - * Skip "\n"-s*/ - while(btn_i != btn_id) { - btn_i ++; - txt_i ++; - if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++; - } - - if(btn_i == ext->btn_cnt) return LV_BTNM_PR_NONE; - - return txt_i; -} - static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx) { lv_area_t btn_area; diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 7cb87efe70f5..9defde22864e 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -31,27 +31,18 @@ extern "C" { *********************/ /*Control byte*/ -#define LV_BTNM_CTRL_CODE 0x80 /*The control byte has to begin (if present) with 0b10xxxxxx*/ - /*This is only true when using control chars in calls to */ - /*`lv_btnm_set_map`. These bits are ignored in when calling */ - /*`lv_btnm_set_ctrl_map` */ -#define LV_BTNM_CTRL_MASK 0xC0 -#define LV_BTNM_WIDTH_MASK 0x07 -#define LV_BTNM_HIDE_MASK 0x08 -#define LV_BTNM_REPEAT_DISABLE_MASK 0x10 -#define LV_BTNM_INACTIVE_MASK 0x20 - +#define LV_BTNM_WIDTH_MASK 0x07 +#define LV_BTNM_BTN_HIDDEN 0x08 +#define LV_BTNM_BTN_NO_REPEAT 0x10 +#define LV_BTNM_BTN_INACTIVE 0x20 +#define LV_BTNM_BTN_TOGGLE 0x40 +#define LV_BTNM_BTN_TOGGLE_STATE 0x80 #define LV_BTNM_PR_NONE 0xFFFF /********************** * TYPEDEFS **********************/ -/* Type of callback function which is called when a button is released or long pressed on the button matrix - * Parameters: button matrix, text of the released button - * return LV_ACTION_RES_INV if the button matrix is deleted else LV_ACTION_RES_OK*/ -typedef lv_res_t (*lv_btnm_action_t) (lv_obj_t *, const char *txt); - /* Type to store button control bits (disabled, hidden etc.) */ typedef uint8_t lv_btnm_ctrl_t; @@ -63,12 +54,10 @@ typedef struct const char ** map_p; /*Pointer to the current map*/ lv_area_t *button_areas; /*Array of areas of buttons*/ lv_btnm_ctrl_t *ctrl_bits; /*Array of control bytes*/ - lv_btnm_action_t action; /*A function to call when a button is releases*/ lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ - uint16_t btn_id_pr; /*Index of the currently pressed button (in `button_areas`) or LV_BTNM_PR_NONE*/ - uint16_t btn_id_tgl; /*Index of the currently toggled button (in `button_areas`) or LV_BTNM_PR_NONE */ - uint8_t toggle :1; /*Enable toggling*/ + uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_PR_NONE*/ + uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_PR_NONE */ uint8_t recolor :1; /*Enable button recoloring*/ } lv_btnm_ext_t; @@ -99,20 +88,11 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); *====================*/ /** - * Set the button control map (hidden, disabled etc.) for a button matrix. The - * control map array will be copied and so may be deallocated after this - * function returns. + * Set a new map. Buttons will be created/deleted according to the map. The + * button matrix keeps a reference to the map and so the string array must not + * be deallocated during the life of the matrix. * @param btnm pointer to a button matrix object - * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The - * length of the array and position of the elements must match - * the number and order of the individual buttons (i.e. excludes - * newline entries). - * The control bits are: - * - bit 5 : 1 = inactive (disabled) - * - bit 4 : 1 = no repeat (on long press) - * - bit 3 : 1 = hidden - * - bit 2..0: Relative width compared to the buttons in the - * same row. [1..7] + * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); @@ -123,8 +103,8 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); * @param btnm pointer to a button matrix object * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. The * length of the array and position of the elements must match - * that when the map was set via `lv_btnm_set_map` (i.e. one - * element for each button AND new line). + * the number and order of the individual buttons (i.e. excludes + * newline entries). * The control bits are: * - bit 5 : 1 = inactive (disabled) * - bit 4 : 1 = no repeat (on long press) @@ -135,39 +115,25 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map); /** - * Set a new callback function for the buttons (It will be called when a button is released) - * @param btnm: pointer to button matrix object - * @param action pointer to a callback function - */ -void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_action_t action); - -/** - * Set the pressed button + * Set the pressed button i.e. visually highlight it. + * Mainly used a when the btnm is in a group to show the selected button * @param btnm pointer to button matrix object * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) */ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id); -/** - * Enable or disable button toggling - * @param btnm pointer to button matrix object - * @param en true: enable toggling; false: disable toggling - * @param id index of the currently toggled button (ignored if 'en' == false) - */ -void lv_btnm_set_toggle(lv_obj_t * btnm, bool en, uint16_t id); - /** * Set a style of a button matrix * @param btnm pointer to a button matrix object * @param type which style should be set * @param style pointer to a style */ -void lv_btnm_set_style(lv_obj_t *btnm, lv_btnm_style_t type, lv_style_t *style); +void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style); /** - * Set whether recoloring is enabled + * Enable recoloring of button's texts * @param btnm pointer to button matrix object - * @param en whether recoloring is enabled + * @param en true: enable recoloring; false: disable */ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); @@ -182,20 +148,28 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden /** * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param disabled true: disable the button */ -void lv_btnm_set_btn_disabled(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); +void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool disabled); /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param disabled true: disable repeat */ -void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, bool disabled); +void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool disabled); + +/** + * Make the a single button button toggled or not toggled. + * @param btnm pointer to button matrix object + * @param btn_id index of button (not counting "\n") + * @param en true: enable toggling; false: disable toggling + */ +void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool toggle); -/*** +/** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object * @param btn_idx 0 based index of the button to modify. @@ -203,19 +177,18 @@ void lv_btnm_set_btn_disable_repeat(const lv_obj_t * btnm, uint16_t btn_idx, boo * @param disabled true: disable the button * @param disable_repeat true: disable repeat */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden, bool disabled, bool disable_repeat); +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool disabled, bool disable_repeat, bool toggle, bool toggle_state); /** * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively * expensive operation. It is recommended that initial width be specified using - * the control characters when calling `lv_btnm_set_map` or via * `lv_btnm_set_ctrl_map` and this method only be used for dynamic changes. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param width Relative width compared to the buttons in the same row. [1..7] */ -void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t width); +void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width); /*===================== @@ -230,41 +203,84 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_idx, uint8_t widt const char ** lv_btnm_get_map(const lv_obj_t * btnm); /** - * Get a the callback function of the buttons on a button matrix - * @param btnm: pointer to button matrix object - * @return pointer to the callback function + * Check whether the button's text can use recolor or not + * @param btnm pointer to button matrix object + * @return true: text recolor enable; false: disabled */ -lv_btnm_action_t lv_btnm_get_action(const lv_obj_t * btnm); +bool lv_btnm_get_recolor(const lv_obj_t * btnm); /** - * Get the pressed button + * Get the index of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb` to get the text of the button, check if hidden etc. * @param btnm pointer to button matrix object - * @return index of the currently pressed button (LV_BTNM_PR_NONE: if unset) + * @return index of the last released button (LV_BTNM_PR_NONE: if unset) */ -uint16_t lv_btnm_get_pressed(const lv_obj_t * btnm); +uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm); /** - * Get the toggled button + * Get the pressed button's index. + * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed` * @param btnm pointer to button matrix object - * @return index of the currently toggled button (LV_BTNM_PR_NONE: if unset) + * @return index of the pressed button (LV_BTNM_PR_NONE: if unset) */ -uint16_t lv_btnm_get_toggled(const lv_obj_t * btnm); +uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm); /** - * Get a style of a button matrix + * Get the button's text + * @param btnm pointer to button matrix object + * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return text of btn_index` button + */ +uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); + +/** + * Check whether "no repeat" for a button is set or not. + * The `LV_EVENT_LONG_PRESS_REPEAT` will be sent anyway but it can be ignored by the user if this function returns `true` * @param btnm pointer to a button matrix object - * @param type which style should be get - * @return style pointer to a style + * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: long press repeat is disabled; false: long press repeat enabled + */ +bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id); + +/** + * Check whether a button for a button is hidden or not. + * Events will be sent anyway but they can be ignored by the user if this function returns `true` + * @param btnm pointer to a button matrix object + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: hidden; false: not hidden */ -lv_style_t * lv_btnm_get_style(const lv_obj_t *btnm, lv_btnm_style_t type); +bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id); /** - * Find whether recoloring is enabled + * Check whether a button for a button is inactive or not. + * Events will be sent anyway but they can be ignored by the user if this function returns `true` + * @param btnm pointer to a button matrix object + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @return true: inactive; false: not inactive + */ +bool lv_btnm_is_btn_inactive(lv_obj_t * btnm, uint16_t btn_id); + +/** + * Check if the button can be toggled or not * @param btnm pointer to button matrix object - * @return whether recoloring is enabled + * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) */ -bool lv_btnm_get_recolor(const lv_obj_t * btnm); +bool lv_btnm_is_btn_toggle(const lv_obj_t * btnm, int16_t btn_id); +/** + * Check if the button is toggled or not + * @param btnm pointer to button matrix object + * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) + */ +bool lv_btnm_get_btn_toggle_state(const lv_obj_t * btnm, int16_t btn_id); + +/** + * Get a style of a button matrix + * @param btnm pointer to a button matrix object + * @param type which style should be get + * @return style pointer to a style + */ +lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type); /********************** * MACROS **********************/ diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 5394f7b1a837..47b3447c4604 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -41,7 +41,7 @@ static const char * kb_map_lc[] = { static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_REPEAT_DISABLE_MASK), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + (6 | LV_BTNM_BTN_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; @@ -55,7 +55,7 @@ static const char * kb_map_uc[] = { static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_REPEAT_DISABLE_MASK), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + (6 | LV_BTNM_BTN_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; @@ -69,7 +69,7 @@ static const char * kb_map_spec[] = { static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - (2 | LV_BTNM_REPEAT_DISABLE_MASK), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + (2 | LV_BTNM_BTN_NO_REPEAT), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; From 92b79cf3a89ab533799f8015b3663468aa0db0d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Rubio=20G=C3=B3mez?= Date: Mon, 11 Mar 2019 11:08:25 +0100 Subject: [PATCH 108/590] Change bsearch C standard function by new lv_bsearch propietary function. --- lv_misc/lv_font.c | 29 ++++++++++++++--------------- lv_misc/lv_math.c | 43 +++++++++++++++++++++++++++++++++++++++++++ lv_misc/lv_math.h | 22 ++++++++++++++++++++++ 3 files changed, 79 insertions(+), 15 deletions(-) diff --git a/lv_misc/lv_font.c b/lv_misc/lv_font.c index 77542fbe1807..a0acd0f50bad 100644 --- a/lv_misc/lv_font.c +++ b/lv_misc/lv_font.c @@ -6,11 +6,10 @@ /********************* * INCLUDES *********************/ -#include - #include #include "lv_font.h" #include "lv_log.h" +#include "lv_math.h" /********************* * DEFINES @@ -24,7 +23,7 @@ * STATIC PROTOTYPES **********************/ -static int lv_font_codeCompare (const void* pRef, const void* pElement); +static int32_t lv_font_codeCompare (const void* pRef, const void* pElement); /********************** * STATIC VARIABLES @@ -222,11 +221,11 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico uint32_t* pUnicode; - pUnicode = bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t), + lv_font_codeCompare); if (pUnicode != NULL) { uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); @@ -266,11 +265,11 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter uint32_t* pUnicode; - pUnicode = bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t), + lv_font_codeCompare); if (pUnicode != NULL) { uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); @@ -297,8 +296,8 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter * @retval > 0 Reference is less than element. * */ -static int lv_font_codeCompare (const void* pRef, - const void* pElement) +static int32_t lv_font_codeCompare (const void* pRef, + const void* pElement) { return (*(uint32_t*) pRef) - (*(uint32_t*) pElement); } diff --git a/lv_misc/lv_math.c b/lv_misc/lv_math.c index e22d784ddd4b..4cf1f12194f2 100644 --- a/lv_misc/lv_math.c +++ b/lv_misc/lv_math.c @@ -159,6 +159,49 @@ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) } + +/** + * Performs a binary search within the given list. + * + * @note Code extracted out of https://github.com/torvalds/linux/blob/master/lib/bsearch.c + * + * @warning The contents of the array should already be in ascending sorted order + * under the provided comparison function. + * + * @note The key need not have the same type as the elements in + * the array, e.g. key could be a string and the comparison function + * could compare the string with the struct's name field. However, if + * the key and elements in the array are of the same type, you can use + * the same comparison function for both sort() and bsearch(). + * + * @param key pointer to item being searched for + * @param base pointer to first element to search + * @param num number of elements + * @param size size of each element + * @param cmp pointer to comparison function + */ +void * lv_bsearch(const void * key, const void * base, uint32_t num, uint32_t size, int32_t (* cmp)(const void * key, const void * elt)) +{ + const char * pivot; + int32_t result; + + while (num > 0) { + pivot = ((char*)base) + (num >> 1) * size; + result = cmp(key, pivot); + + if (result == 0) + return (void *)pivot; + + if (result > 0) { + base = pivot + size; + num--; + } + num >>= 1; + } + + return NULL; +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_misc/lv_math.h b/lv_misc/lv_math.h index a0229eb1b8a0..6abc43815c36 100644 --- a/lv_misc/lv_math.h +++ b/lv_misc/lv_math.h @@ -62,6 +62,28 @@ int16_t lv_trigo_sin(int16_t angle); */ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3); +/** + * Performs a binary search within the given list. + * + * @note Code extracted out of https://github.com/torvalds/linux/blob/master/lib/bsearch.c + * + * @warning The contents of the array should already be in ascending sorted order + * under the provided comparison function. + * + * @note The key need not have the same type as the elements in + * the array, e.g. key could be a string and the comparison function + * could compare the string with the struct's name field. However, if + * the key and elements in the array are of the same type, you can use + * the same comparison function for both sort() and bsearch(). + * + * @param key pointer to item being searched for + * @param base pointer to first element to search + * @param num number of elements + * @param size size of each element + * @param cmp pointer to comparison function (see #lv_font_codeCompare as a comparison function example) + */ +void * lv_bsearch(const void * key, const void * base, uint32_t num, uint32_t size, int32_t (* cmp)(const void * key, const void * elt)); + /********************** * MACROS **********************/ From a1ca0bd7966ddae8dcb691a4d24a9e09acb67d83 Mon Sep 17 00:00:00 2001 From: Elvis Date: Mon, 11 Mar 2019 17:26:27 -0700 Subject: [PATCH 109/590] Remove inline functions which prevent compile --- lv_misc/lv_color.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index 6afdc06b0393..62b4c8272bad 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -402,14 +402,6 @@ static inline uint8_t lv_color_brightness(lv_color_t color) (uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \ (uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4))) -static inline lv_color_t lv_color_hex(uint32_t c){ - return LV_COLOR_HEX(c); -} - -static inline lv_color_t lv_color_hex3(uint32_t c){ - return LV_COLOR_HEX3(c); -} - /** * Convert a HSV color to RGB From 4b3859f9492ec0be939f8bf1b1349872096d2c07 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Mar 2019 06:20:45 +0100 Subject: [PATCH 110/590] remove btnm, mbox, kb, tabview actions --- lv_core/lv_obj.c | 24 +++++- lv_core/lv_obj.h | 15 ++-- lv_misc/lv_txt.c | 3 +- lv_objx/lv_btnm.c | 167 ++++++++++++++++++++++++++++-------------- lv_objx/lv_btnm.h | 64 +++++++++++----- lv_objx/lv_kb.c | 77 +++++++++---------- lv_objx/lv_mbox.c | 89 ++++++++++++---------- lv_objx/lv_mbox.h | 28 +++---- lv_objx/lv_tabview.c | 78 ++++++-------------- lv_objx/lv_tabview.h | 21 ------ lv_objx/lv_tileview.c | 2 +- 11 files changed, 315 insertions(+), 253 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index aef9cb28abeb..52e3e64a6cf8 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -190,6 +190,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->opa_scale_en = 0; new_obj->protect = LV_PROTECT_NONE; new_obj->opa_scale = LV_OPA_COVER; + new_obj->parent_event = 0; new_obj->ext_attr = NULL; @@ -299,6 +300,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->drag_parent = copy->drag_parent; new_obj->hidden = copy->hidden; new_obj->top = copy->top; + new_obj->parent_event = copy->parent_event; new_obj->opa_scale_en = copy->opa_scale_en; new_obj->protect = copy->protect; @@ -1104,6 +1106,16 @@ void lv_obj_set_drag_parent(lv_obj_t * obj, bool en) obj->drag_parent = (en == true ? 1 : 0); } +/** + * Propagate the events to the parent too + * @param obj pointer to an object + * @param en true: enable the event propagation + */ +void lv_obj_set_parent_event(lv_obj_t * obj, bool en) +{ + obj->parent_event = (en == true ? 1 : 0); +} + /** * Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`) * @param obj pointer to an object @@ -1174,7 +1186,7 @@ lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) if(obj_act_event_deleted) return LV_RES_INV; - if(obj->event_parent && obj->par) { + if(obj->parent_event && obj->par) { lv_res_t res = lv_obj_send_event(obj->par, event); if(res != LV_RES_OK) return LV_RES_INV; } @@ -1638,6 +1650,16 @@ bool lv_obj_get_drag_parent(const lv_obj_t * obj) return obj->drag_parent == 0 ? false : true; } +/** + * Get the drag parent attribute of an object + * @param obj pointer to an object + * @return true: drag parent is enabled + */ +bool lv_obj_get_parent_event(const lv_obj_t * obj) +{ + return obj->parent_event == 0 ? false : true; +} + /** * Get the opa scale enable parameter * @param obj pointer to an object diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index b9903025d936..7bd61fecad51 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -192,7 +192,7 @@ typedef struct _lv_obj_t uint8_t hidden :1; /*1: Object is hidden*/ uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/ uint8_t opa_scale_en :1; /*1: opa_scale is set*/ - uint8_t event_parent :1; /*1: Send the object's events to the parent too. */ + uint8_t parent_event :1; /*1: Send the object's events to the parent too. */ uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from `lv_protect_t`*/ lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ @@ -454,12 +454,11 @@ void lv_obj_set_drag_throw(lv_obj_t * obj, bool en); void lv_obj_set_drag_parent(lv_obj_t * obj, bool en); /** - * Set editable parameter Used by groups and keyboard/encoder control. - * Editable object has something inside to choose (the elements of a list) + * Propagate the events to the parent too * @param obj pointer to an object - * @param en true: enable editing + * @param en true: enable the event propagation */ -//void lv_obj_set_editable(lv_obj_t * obj, bool en); +void lv_obj_set_parent_event(lv_obj_t * obj, bool en); /** * Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`) @@ -721,6 +720,12 @@ bool lv_obj_get_drag_throw(const lv_obj_t * obj); */ bool lv_obj_get_drag_parent(const lv_obj_t * obj); +/** + * Get the drag parent attribute of an object + * @param obj pointer to an object + * @return true: drag parent is enabled + */ +bool lv_obj_get_parent_event(const lv_obj_t * obj); /** * Get the opa scale enable parameter diff --git a/lv_misc/lv_txt.c b/lv_misc/lv_txt.c index ded96332a76e..36b1a3bb3bb9 100644 --- a/lv_misc/lv_txt.c +++ b/lv_misc/lv_txt.c @@ -437,7 +437,7 @@ static uint8_t lv_txt_utf8_size(const char * str) else if((str[0] & 0xE0) == 0xC0) return 2; else if((str[0] & 0xF0) == 0xE0) return 3; else if((str[0] & 0xF8) == 0xF0) return 4; - return 0; + return 1; /*If the char was invalid step tell it's 1 byte long*/ } @@ -616,7 +616,6 @@ static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id) } return byte_cnt; - } diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 3cb724b84750..582f1a866364 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -43,7 +43,7 @@ static bool maps_are_identical(const char ** map1, const char ** map2); * STATIC VARIABLES **********************/ static const char * lv_btnm_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", - "\002Btn4", "Btn5", "" + "Btn4", "Btn5", "" }; static lv_design_cb_t ancestor_design_f; @@ -80,7 +80,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; ext->btn_cnt = 0; - ext->btn_id_pr = LV_BTNM_PR_NONE; + ext->btn_id_pr = LV_BTNM_BTN_NONE; ext->button_areas = NULL; ext->ctrl_bits = NULL; ext->map_p = NULL; @@ -277,13 +277,13 @@ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map * Set the pressed button i.e. visually highlight it. * Mainly used a when the btnm is in a group to show the selected button * @param btnm pointer to button matrix object - * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) + * @param id index of the currently pressed button (`LV_BTNM_BTN_NONE` to unpress) */ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (id >= ext->btn_cnt && id != LV_BTNM_PR_NONE) + if (id >= ext->btn_cnt && id != LV_BTNM_BTN_NONE) return; if (id == ext->btn_id_pr) @@ -354,10 +354,8 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_idx >= ext->btn_cnt) return; - if (hidden) - ext->ctrl_bits[btn_idx] |= LV_BTNM_BTN_HIDDEN; - else - ext->ctrl_bits[btn_idx] &= (~LV_BTNM_BTN_HIDDEN); + if (hidden) ext->ctrl_bits[btn_idx] |= LV_BTNM_BTN_HIDDEN; + else ext->ctrl_bits[btn_idx] &= (~LV_BTNM_BTN_HIDDEN); invalidate_button_area(btnm, btn_idx); } @@ -366,14 +364,14 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. - * @param disabled true: disable the button + * @param ina true: make the button inactive */ -void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool disabled) +void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool ina) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_id >= ext->btn_cnt) return; - if (disabled)ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_INACTIVE; + if (ina) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_INACTIVE; else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_INACTIVE); invalidate_button_area(btnm, btn_id); @@ -383,46 +381,58 @@ void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool disab * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. - * @param disabled true: disable repeat + * @param no_rep true: disable repeat */ -void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool disabled) +void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool no_rep) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_id >= ext->btn_cnt) return; - if (disabled) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_NO_REPEAT; + if (no_rep) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_NO_REPEAT; else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_NO_REPEAT); +} - invalidate_button_area(btnm, btn_id); +/** + * Enable/disable toggling a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_id 0 based index of the button to modify. + * @param tgl true: toggle enable + */ +void lv_btnm_set_btn_toggle(const lv_obj_t * btnm, uint16_t btn_id, bool tgl) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if (btn_id >= ext->btn_cnt) return; + if (tgl) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE; + else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_TOGGLE); } /** * Make the a single button button toggled or not toggled. * @param btnm pointer to button matrix object * @param btn_id index of button (not counting "\n") - * @param en true: enable toggling; false: disable toggling + * @param state true: toggled; false: not toggled */ -void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool toggle) +void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool state) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_id >= ext->btn_cnt) return; - if(toggle) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE_STATE; - else ext->ctrl_bits[btn_id] &= LV_BTNM_BTN_TOGGLE_STATE; + if(state) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE_STATE; + else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_TOGGLE_STATE); invalidate_button_area(btnm, btn_id); - - lv_obj_invalidate(btnm); } /** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param hidden true: hide the button - * @param disabled true: disable the button - * @param disable_repeat true: disable repeat + * @param inactive true: disable the button + * @param no_repeat true: disable repeat + * @param toggle true: enable toggling + * @param toggled_state true: set toggled state */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool disabled, bool disable_repeat, bool toggle, bool toggle_state) +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool inactive, bool no_repeat, bool toggle, bool toggle_state) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if (btn_id >= ext->btn_cnt) return; @@ -430,7 +440,8 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, uint8_t flags = ext->ctrl_bits[btn_id]; flags = hidden ? flags | LV_BTNM_BTN_HIDDEN : flags & (~LV_BTNM_BTN_HIDDEN); - flags = disabled ? flags | LV_BTNM_BTN_INACTIVE : flags & (~LV_BTNM_BTN_INACTIVE); + flags = inactive ? flags | LV_BTNM_BTN_INACTIVE : flags & (~LV_BTNM_BTN_INACTIVE); + flags = no_repeat ? flags | LV_BTNM_BTN_NO_REPEAT : flags & (~LV_BTNM_BTN_NO_REPEAT); flags = toggle ? flags | LV_BTNM_BTN_TOGGLE : flags & (~LV_BTNM_BTN_TOGGLE); flags = toggle_state ? flags | LV_BTNM_BTN_TOGGLE_STATE : flags & (~LV_BTNM_BTN_TOGGLE_STATE); @@ -459,6 +470,22 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width lv_btnm_set_map(btnm, ext->map_p); } +/** + * Set the toggle state of all buttons + * @param btnm pointer to a button matrix object + * @param state true: toggled; false: not toggled + */ +void lv_btnm_set_btn_toggle_state_all(lv_obj_t * btnm, bool state) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + uint16_t i; + for(i = 0; i < ext->btn_cnt; i++) { + if(state) ext->ctrl_bits[i] |= LV_BTNM_BTN_TOGGLE_STATE; + else ext->ctrl_bits[i] &= (~LV_BTNM_BTN_TOGGLE_STATE); + } + + lv_obj_invalidate(btnm); +} /*===================== * Getter functions @@ -491,19 +518,36 @@ bool lv_btnm_get_recolor(const lv_obj_t * btnm) * Get the index of the lastly "activated" button by the user (pressed, released etc) * Useful in the the `event_cb` to get the text of the button, check if hidden etc. * @param btnm pointer to button matrix object - * @return index of the last released button (LV_BTNM_PR_NONE: if unset) + * @return index of the last released button (LV_BTNM_BTN_NONE: if unset) */ uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return ext->btn_id_pr; + return ext->btn_id_act; } +/** + * Get the text of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb` + * @param btnm pointer to button matrix object + * @return text of the last released button (NULL: if unset) + */ +const char * lv_btnm_get_active_btn_text(const lv_obj_t * btnm) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + if(ext->btn_id_act != LV_BTNM_BTN_NONE) { + return lv_btnm_get_btn_text(btnm, ext->btn_id_act); + } else { + return NULL; + } +} + + /** * Get the pressed button's index. * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed` * @param btnm pointer to button matrix object - * @return index of the pressed button (LV_BTNM_PR_NONE: if unset) + * @return index of the pressed button (LV_BTNM_BTN_NONE: if unset) */ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm) { @@ -517,10 +561,10 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm) * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return text of btn_index` button */ -uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) +const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if(btn_id > ext->btn_cnt) return LV_BTNM_PR_NONE; + if(btn_id > ext->btn_cnt) return NULL; uint16_t txt_i = 0; uint16_t btn_i = 0; @@ -533,9 +577,9 @@ uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++; } - if(btn_i == ext->btn_cnt) return LV_BTNM_PR_NONE; + if(btn_i == ext->btn_cnt) return NULL; - return txt_i; + return ext->map_p[txt_i]; } /** @@ -545,7 +589,7 @@ uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id) +bool lv_btnm_get_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return button_is_repeat_disabled(ext->ctrl_bits[btn_id]); @@ -558,7 +602,7 @@ bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id) * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: hidden; false: not hidden */ -bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id) +bool lv_btnm_get_btn_hidden(lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return button_is_hidden(ext->ctrl_bits[btn_id]); @@ -571,7 +615,7 @@ bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id) * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: inactive; false: not inactive */ -bool lv_btnm_is_btn_inactive(lv_obj_t * btnm, uint16_t btn_id) +bool lv_btnm_get_btn_inactive(lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return button_is_inactive(ext->ctrl_bits[btn_id]); @@ -581,7 +625,7 @@ bool lv_btnm_is_btn_inactive(lv_obj_t * btnm, uint16_t btn_id) * @param btnm pointer to button matrix object * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) */ -bool lv_btnm_is_btn_toggle(const lv_obj_t * btnm, int16_t btn_id) +bool lv_btnm_get_btn_toggle(const lv_obj_t * btnm, int16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); @@ -781,8 +825,11 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_indev_get_point(param, &p); btn_pr = get_button_from_point(btnm, &p); + invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/; ext->btn_id_pr = btn_pr; ext->btn_id_act = btn_pr; + invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ + } else if(sign == LV_SIGNAL_PRESSING) { uint16_t btn_pr; @@ -792,10 +839,10 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) /*Invalidate to old and the new areas*/; if(btn_pr != ext->btn_id_pr) { lv_indev_reset_lpr(param); - if(ext->btn_id_pr != LV_BTNM_PR_NONE) { + if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { invalidate_button_area(btnm, ext->btn_id_pr); } - if(btn_pr != LV_BTNM_PR_NONE) { + if(btn_pr != LV_BTNM_BTN_NONE) { invalidate_button_area(btnm, btn_pr); } } @@ -803,12 +850,11 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = btn_pr; } else if(sign == LV_SIGNAL_RELEASED) { - if(ext->btn_id_pr != LV_BTNM_PR_NONE) { - + if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { /*Toggle the button if enabled*/ if(button_is_toggle(ext->ctrl_bits[ext->btn_id_pr])) { if(ext->ctrl_bits[ext->btn_id_pr] & LV_BTNM_BTN_TOGGLE_STATE) { - ext->ctrl_bits[ext->btn_id_pr] &= LV_BTNM_BTN_TOGGLE_STATE; + ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_BTN_TOGGLE_STATE); } else { ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_BTN_TOGGLE_STATE; } @@ -818,10 +864,10 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) /*Leave the clicked button when releases if this not the focused object in a group*/ lv_group_t * g = lv_obj_get_group(btnm); if(lv_group_get_focused(g) != btnm) { - ext->btn_id_pr = LV_BTNM_PR_NONE; + ext->btn_id_pr = LV_BTNM_BTN_NONE; } #else - ext->btn_id_pr = LV_BTNM_PR_NONE; + ext->btn_id_pr = LV_BTNM_BTN_NONE; #endif } @@ -830,7 +876,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { - ext->btn_id_pr = LV_BTNM_PR_NONE; + ext->btn_id_pr = LV_BTNM_BTN_NONE; lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_FOCUS) { @@ -846,7 +892,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else if(indev_type == LV_INDEV_TYPE_ENCODER) { /*In navigation mode don't select any button but in edit mode select the fist*/ if(lv_group_get_editing(lv_obj_get_group(btnm))) ext->btn_id_pr = 0; - else ext->btn_id_pr = LV_BTNM_PR_NONE; + else ext->btn_id_pr = LV_BTNM_BTN_NONE; } else { ext->btn_id_pr = 0; } @@ -858,18 +904,20 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT) { - if(ext->btn_id_pr == LV_BTNM_PR_NONE) ext->btn_id_pr = 0; + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; else ext->btn_id_pr++; if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1; lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_LEFT) { - if(ext->btn_id_pr == LV_BTNM_PR_NONE) ext->btn_id_pr = 0; + } + else if(c == LV_GROUP_KEY_LEFT) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; if(ext->btn_id_pr > 0) ext->btn_id_pr--; lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_DOWN) { + } + else if(c == LV_GROUP_KEY_DOWN) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ - if(ext->btn_id_pr == LV_BTNM_PR_NONE) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; } else { uint16_t area_below; @@ -886,10 +934,11 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(area_below < ext->btn_cnt) ext->btn_id_pr = area_below; } lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_UP) { + } + else if(c == LV_GROUP_KEY_UP) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ - if(ext->btn_id_pr == LV_BTNM_PR_NONE) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; } else { int16_t area_above; @@ -907,6 +956,9 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } lv_obj_invalidate(btnm); } + else if(c == LV_GROUP_KEY_ENTER) { + + } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; @@ -959,6 +1011,8 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** lv_mem_assert(ext->ctrl_bits); if(ext->button_areas == NULL || ext->ctrl_bits == NULL) btn_cnt = 0; + memset(ext->ctrl_bits, 0, sizeof(lv_btnm_ctrl_t) * btn_cnt); + ext->btn_cnt = btn_cnt; } @@ -969,7 +1023,8 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** */ static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits ? ctrl_bits & LV_BTNM_WIDTH_MASK : 1; + uint8_t w = ctrl_bits & LV_BTNM_WIDTH_MASK; + return w != 0 ? w: 1; } static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits) @@ -1001,7 +1056,7 @@ static bool button_get_toggle_state(lv_btnm_ctrl_t ctrl_bits) * Gives the button id of a button under a given point * @param btnm pointer to a button matrix object * @param p a point with absolute coordinates - * @return the id of the button or LV_BTNM_PR_NONE. + * @return the id of the button or LV_BTNM_BTN_NONE. */ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p) { @@ -1022,7 +1077,7 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p) } } - if(i == ext->btn_cnt) i = LV_BTNM_PR_NONE; + if(i == ext->btn_cnt) i = LV_BTNM_BTN_NONE; return i; } diff --git a/lv_objx/lv_btnm.h b/lv_objx/lv_btnm.h index 9defde22864e..6386d4dfb0ce 100644 --- a/lv_objx/lv_btnm.h +++ b/lv_objx/lv_btnm.h @@ -38,7 +38,7 @@ extern "C" { #define LV_BTNM_BTN_TOGGLE 0x40 #define LV_BTNM_BTN_TOGGLE_STATE 0x80 -#define LV_BTNM_PR_NONE 0xFFFF +#define LV_BTNM_BTN_NONE 0xFFFF /********************** * TYPEDEFS **********************/ @@ -56,8 +56,8 @@ typedef struct lv_btnm_ctrl_t *ctrl_bits; /*Array of control bytes*/ lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ - uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_PR_NONE*/ - uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_PR_NONE */ + uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ + uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ uint8_t recolor :1; /*Enable button recoloring*/ } lv_btnm_ext_t; @@ -118,7 +118,7 @@ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map * Set the pressed button i.e. visually highlight it. * Mainly used a when the btnm is in a group to show the selected button * @param btnm pointer to button matrix object - * @param id index of the currently pressed button (`LV_BTNM_PR_NONE` to unpress) + * @param id index of the currently pressed button (`LV_BTNM_BTN_NONE` to unpress) */ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id); @@ -149,35 +149,45 @@ void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden * Enable/disable a single button in the matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. - * @param disabled true: disable the button + * @param ina true: make the button inactive */ -void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool disabled); +void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool ina); /** * Enable/disable long press for a single button in the matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. - * @param disabled true: disable repeat + * @param no_rep true: disable repeat */ -void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool disabled); +void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool no_rep); + +/** + * Enable/disable toggling a single button in the matrix + * @param btnm pointer to button matrix object + * @param btn_id 0 based index of the button to modify. + * @param tgl true: toggle enable + */ +void lv_btnm_set_btn_toggle(const lv_obj_t * btnm, uint16_t btn_id, bool tgl); /** * Make the a single button button toggled or not toggled. * @param btnm pointer to button matrix object * @param btn_id index of button (not counting "\n") - * @param en true: enable toggling; false: disable toggling + * @param state true: toggled; false: not toggled */ void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool toggle); /** * Set hidden/disabled/repeat flags for a single button. * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. + * @param btn_id 0 based index of the button to modify. * @param hidden true: hide the button - * @param disabled true: disable the button - * @param disable_repeat true: disable repeat + * @param inactive true: disable the button + * @param no_repeat true: disable repeat + * @param toggle true: enable toggling + * @param toggled_state true: set toggled state */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool disabled, bool disable_repeat, bool toggle, bool toggle_state); +void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool inactive, bool no_repeat, bool toggle, bool toggle_state); /** * Set a single buttons relative width. @@ -190,6 +200,12 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width); +/** + * Set the toggle state of all buttons + * @param btnm pointer to a button matrix object + * @param state true: toggled; false: not toggled + */ +void lv_btnm_set_btn_toggle_state_all(lv_obj_t * btnm, bool state); /*===================== * Getter functions @@ -213,15 +229,23 @@ bool lv_btnm_get_recolor(const lv_obj_t * btnm); * Get the index of the lastly "activated" button by the user (pressed, released etc) * Useful in the the `event_cb` to get the text of the button, check if hidden etc. * @param btnm pointer to button matrix object - * @return index of the last released button (LV_BTNM_PR_NONE: if unset) + * @return index of the last released button (LV_BTNM_BTN_NONE: if unset) */ uint16_t lv_btnm_get_active_btn(const lv_obj_t * btnm); +/** + * Get the text of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb` + * @param btnm pointer to button matrix object + * @return text of the last released button (NULL: if unset) + */ +const char * lv_btnm_get_active_btn_text(const lv_obj_t * btnm); + /** * Get the pressed button's index. * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed` * @param btnm pointer to button matrix object - * @return index of the pressed button (LV_BTNM_PR_NONE: if unset) + * @return index of the pressed button (LV_BTNM_BTN_NONE: if unset) */ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm); @@ -231,7 +255,7 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm); * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return text of btn_index` button */ -uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); +const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); /** * Check whether "no repeat" for a button is set or not. @@ -240,7 +264,7 @@ uint16_t lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id); +bool lv_btnm_get_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id); /** * Check whether a button for a button is hidden or not. @@ -249,7 +273,7 @@ bool lv_btnm_is_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id); * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: hidden; false: not hidden */ -bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id); +bool lv_btnm_get_btn_hidden(lv_obj_t * btnm, uint16_t btn_id); /** * Check whether a button for a button is inactive or not. @@ -258,14 +282,14 @@ bool lv_btnm_is_btn_hidden(lv_obj_t * btnm, uint16_t btn_id); * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: inactive; false: not inactive */ -bool lv_btnm_is_btn_inactive(lv_obj_t * btnm, uint16_t btn_id); +bool lv_btnm_get_btn_inactive(lv_obj_t * btnm, uint16_t btn_id); /** * Check if the button can be toggled or not * @param btnm pointer to button matrix object * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) */ -bool lv_btnm_is_btn_toggle(const lv_obj_t * btnm, int16_t btn_id); +bool lv_btnm_get_btn_toggle(const lv_obj_t * btnm, int16_t btn_id); /** * Check if the button is toggled or not diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 47b3447c4604..04c14ad267a4 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -25,7 +25,7 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param); -static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt); +static void lv_kb_def_event_cb(lv_obj_t * kb); /********************** * STATIC VARIABLES @@ -33,10 +33,10 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt); static lv_signal_cb_t ancestor_signal; static const char * kb_map_lc[] = { - "\2051#", "\204q", "\204w", "\204e", "\204r", "\204t", "\204y", "\204u", "\204i", "\204o", "\204p", "\207Bksp", "\n", - "\226ABC", "\203a", "\203s", "\203d", "\203f", "\203g", "\203h", "\203j", "\203k", "\203l", "\207Enter", "\n", + "#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "Bksp", "\n", + "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", "Enter", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", - "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { @@ -47,10 +47,10 @@ static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { }; static const char * kb_map_uc[] = { - "\2051#", "\204Q", "\204W", "\204E", "\204R", "\204T", "\204Y", "\204U", "\204I", "\204O", "\204P", "\207Bksp", "\n", - "\226abc", "\203A", "\203S", "\203D", "\203F", "\203G", "\203H", "\203J", "\203K", "\203L", "\207Enter", "\n", + "#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", + "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", - "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { @@ -61,10 +61,10 @@ static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { }; static const char * kb_map_spec[] = { - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\202Bksp", "\n", - "\222abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", + "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "Bksp", "\n", + "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", - "\202"LV_SYMBOL_CLOSE, "\202"LV_SYMBOL_LEFT, "\206 ", "\202"LV_SYMBOL_RIGHT, "\202"LV_SYMBOL_OK, "" + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" }; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { @@ -130,7 +130,6 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); - lv_btnm_set_action(new_kb, lv_kb_def_action); lv_btnm_set_map(new_kb, kb_map_lc); lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map); @@ -367,7 +366,15 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } else if(sign == LV_SIGNAL_GET_TYPE) { + } + else if(sign == LV_SIGNAL_RELEASED) { + lv_kb_def_event_cb(kb); + } + else if(sign == LV_SIGNAL_LONG_PRESS_REP) { + bool no_rep = lv_btnm_get_btn_no_repeate(kb, lv_btnm_get_active_btn(kb)); + if(no_rep == false) lv_kb_def_event_cb(kb); + } + else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ @@ -380,55 +387,52 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) } /** - * Called when a button of 'kb_btnm' is released - * @param btnm pointer to 'kb_btnm' - * @param i the index of the released button from the current btnm map - * @return LV_ACTION_RES_INV if the btnm is deleted else LV_ACTION_RES_OK + * Called when a button of the keyboard is released + * @param kb pointer to a keyboard + * @param event type of the event */ -static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) +static void lv_kb_def_event_cb(lv_obj_t * kb) { lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - lv_res_t res = LV_RES_OK; + + uint16_t btn_id = lv_btnm_get_active_btn(kb); + if(btn_id == LV_BTNM_BTN_NONE) return; + if(lv_btnm_get_btn_hidden(kb, btn_id)) return; + if(lv_btnm_get_btn_inactive(kb, btn_id)) return; + + const char * txt = lv_btnm_get_active_btn_text(kb); + if(txt == NULL) return; /*Do the corresponding action according to the text of the button*/ if(strcmp(txt, "abc") == 0) { lv_btnm_set_map(kb, kb_map_lc); lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); - return LV_RES_OK; + return; } else if(strcmp(txt, "ABC") == 0) { lv_btnm_set_map(kb, kb_map_uc); lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map); - return LV_RES_OK; + return; } else if(strcmp(txt, "1#") == 0) { lv_btnm_set_map(kb, kb_map_spec); lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); - return LV_RES_OK; + return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) { - res = lv_obj_send_event(kb, LV_EVENT_CANCEL); - if(res != LV_RES_OK) return res; + lv_obj_send_event(kb, LV_EVENT_CANCEL); } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } - return res; + return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb) { - res = lv_obj_send_event(kb, LV_EVENT_APPLY); - if(res != LV_RES_OK) return res; - } - else { - lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ - res = lv_obj_del(kb); - } - return res; + if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); + else lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ + return; } - if(res != LV_RES_OK) return res; /*The keyboard might be deleted in the actions*/ - /*Add the characters to the text area if set*/ - if(ext->ta == NULL) return res; + if(ext->ta == NULL) return; if(strcmp(txt, "Enter") == 0)lv_ta_add_char(ext->ta, '\n'); else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); @@ -455,7 +459,6 @@ static lv_res_t lv_kb_def_action(lv_obj_t * kb, const char * txt) } else { lv_ta_add_text(ext->ta, txt); } - return LV_RES_OK; } #endif diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index ad86867b9687..f3b34fb22b32 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -7,6 +7,7 @@ /********************* * INCLUDES *********************/ +#include #include "lv_mbox.h" #if LV_USE_MBOX != 0 @@ -37,8 +38,8 @@ **********************/ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param); static void mbox_realign(lv_obj_t * mbox); -static lv_res_t lv_mbox_close_action(lv_obj_t * btn, const char * txt); static void lv_mbox_close_end_cb(lv_obj_t * mbox); +static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event); /********************** * STATIC VARIABLES @@ -93,6 +94,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_cont_set_fit2(new_mbox, LV_FIT_NONE, LV_FIT_TIGHT); lv_obj_set_width(new_mbox, LV_DPI * 2); lv_obj_align(new_mbox, NULL, LV_ALIGN_CENTER, 0, 0); + lv_obj_set_event_cb(new_mbox, lv_mbox_default_event_cb); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -131,9 +133,8 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) * @param mbox pointer to message box object * @param btn_map button descriptor (button matrix map). * E.g. a const char *txt[] = {"ok", "close", ""} (Can not be local variable) - * @param action a function which will be called when a button is released */ -void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map, lv_btnm_action_t action) +void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); @@ -153,8 +154,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map, lv_btnm_action_t a } lv_btnm_set_map(ext->btnm, btn_map); - if(action == NULL) lv_btnm_set_action(ext->btnm, lv_mbox_close_action); /*Set a default action anyway*/ - else lv_btnm_set_action(ext->btnm, action); + lv_obj_set_parent_event(ext->btnm, true); mbox_realign(mbox); } @@ -176,19 +176,6 @@ void lv_mbox_set_text(lv_obj_t * mbox, const char * txt) mbox_realign(mbox); } - -/** - * Stop the action to call when button is released - * @param pointer to an 'lv_btnm_action_t' action. In the action you need to use `lv_mbox_get_from_btn()` to get the `mbox`. - * @param pointer to an 'lv_btnm_action_t' action - */ -void lv_mbox_set_action(lv_obj_t * mbox, lv_btnm_action_t action) -{ - lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - lv_btnm_set_action(ext->btnm, action); -} - - /** * Set animation duration * @param mbox pointer to a message box object @@ -311,16 +298,29 @@ const char * lv_mbox_get_text(const lv_obj_t * mbox) } /** - * Get the message box object from one of its button. - * It is useful in the button release actions where only the button is known - * @param btn pointer to a button of a message box - * @return pointer to the button's message box + * Get the index of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb`. + * @param btnm pointer to button matrix object + * @return index of the last released button (LV_BTNM_BTN_NONE: if unset) */ -lv_obj_t * lv_mbox_get_from_btn(const lv_obj_t * btn) +uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox) { - lv_obj_t * mbox = lv_obj_get_parent(btn); + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + if(ext->btnm) return lv_btnm_get_active_btn(ext->btnm); + else return LV_BTNM_BTN_NONE; +} - return mbox; +/** + * Get the text of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb`. + * @param btnm pointer to button matrix object + * @return text of the last released button (NULL: if unset) + */ +const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox) +{ + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + if(ext->btnm) return lv_btnm_get_active_btn_text(ext->btnm); + else return NULL; } /** @@ -402,7 +402,6 @@ lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox) return ext->btnm; } - /********************** * STATIC FUNCTIONS **********************/ @@ -437,10 +436,19 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) if(lv_obj_get_width(mbox) != lv_area_get_width(param)) { mbox_realign(mbox); } - } else if(sign == LV_SIGNAL_STYLE_CHG) { + } + else if(sign == LV_SIGNAL_STYLE_CHG) { mbox_realign(mbox); - } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || + } + else if(sign == LV_SIGNAL_PRESSED) { + /*If the message box was pressed clear the last active button*/ + if(ext->btnm) { + lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm); + btnm_ext->btn_id_act = LV_BTNM_BTN_NONE; + } + } + else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL || sign == LV_SIGNAL_GET_EDITABLE) { if(ext->btnm) { ext->btnm->signal_cb(ext->btnm, sign, param); @@ -456,7 +464,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) /*In navigation mode don't select any button but in edit mode select the fist*/ lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm); if(lv_group_get_editing(lv_obj_get_group(mbox))) btnm_ext->btn_id_pr = 0; - else btnm_ext->btn_id_pr = LV_BTNM_PR_NONE; + else btnm_ext->btn_id_pr = LV_BTNM_BTN_NONE; } #endif } @@ -497,20 +505,21 @@ static void mbox_realign(lv_obj_t * mbox) } } -static lv_res_t lv_mbox_close_action(lv_obj_t * btn, const char * txt) +static void lv_mbox_close_end_cb(lv_obj_t * mbox) { - lv_obj_t * mbox = lv_mbox_get_from_btn(btn); - - if(txt[0] != '\0') { - lv_mbox_start_auto_close(mbox, 0); - return LV_RES_INV; - } - - return LV_RES_OK; + lv_obj_del(mbox); } -static void lv_mbox_close_end_cb(lv_obj_t * mbox) + +static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) { - lv_obj_del(mbox); + if(event != LV_EVENT_CLICKED) return; + + uint16_t btn_id = lv_mbox_get_active_btn(mbox); + if(btn_id == LV_BTNM_BTN_NONE) return; + + lv_mbox_start_auto_close(mbox, 0); + } + #endif diff --git a/lv_objx/lv_mbox.h b/lv_objx/lv_mbox.h index d3c0deffbc44..1d256b3ac826 100644 --- a/lv_objx/lv_mbox.h +++ b/lv_objx/lv_mbox.h @@ -90,9 +90,8 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy); * @param mbox pointer to message box object * @param btn_map button descriptor (button matrix map). * E.g. a const char *txt[] = {"ok", "close", ""} (Can not be local variable) - * @param action a function which will be called when a button is released */ -void lv_mbox_add_btns(lv_obj_t * mbox, const char **btn_map, lv_btnm_action_t action); +void lv_mbox_add_btns(lv_obj_t * mbox, const char **btn_mapaction); /*===================== * Setter functions @@ -105,13 +104,6 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char **btn_map, lv_btnm_action_t ac */ void lv_mbox_set_text(lv_obj_t * mbox, const char * txt); -/** - * Stop the action to call when button is released - * @param mbox pointer to a message box object - * @param pointer to an 'lv_btnm_action_t' action. In the action you need to use `lv_mbox_get_from_btn()` to get the `mbox`. - */ -void lv_mbox_set_action(lv_obj_t * mbox, lv_btnm_action_t action); - /** * Set animation duration * @param mbox pointer to a message box object @@ -159,12 +151,20 @@ void lv_mbox_set_recolor(lv_obj_t * mbox, bool en); const char * lv_mbox_get_text(const lv_obj_t * mbox); /** - * Get the message box object from one of its button. - * It is useful in the button release actions where only the button is known - * @param btn pointer to a button of a message box - * @return pointer to the button's message box + * Get the index of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb`. + * @param btnm pointer to button matrix object + * @return index of the last released button (LV_BTNM_BTN_NONE: if unset) + */ +uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox); + +/** + * Get the text of the lastly "activated" button by the user (pressed, released etc) + * Useful in the the `event_cb`. + * @param btnm pointer to button matrix object + * @return text of the last released button (NULL: if unset) */ -lv_obj_t * lv_mbox_get_from_btn(const lv_obj_t * btn); +const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox); /** * Get the animation duration (close animation time) diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index d745882e5438..70b67586857f 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -39,7 +39,7 @@ static lv_res_t tabpage_scrl_signal(lv_obj_t * tab_scrl, lv_signal_t sign, void static void tabpage_pressed_handler(lv_obj_t * tabview, lv_obj_t * tabpage); static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage); static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage); -static lv_res_t tab_btnm_action(lv_obj_t * tab_btnm, const char * tab_name); +static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event); static void tabview_realign(lv_obj_t * tabview); /********************** @@ -89,7 +89,6 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->content = NULL; ext->indic = NULL; ext->btns = NULL; - ext->tab_load_action = NULL; ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; ext->anim_time = LV_TABVIEW_ANIM_TIME; ext->btns_hide = 0; @@ -111,8 +110,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); lv_btnm_set_map(ext->btns, tab_def); - lv_btnm_set_action(ext->btns, tab_btnm_action); - lv_btnm_set_toggle(ext->btns, true, 0); + lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb); ext->indic = lv_obj_create(ext->btns, NULL); lv_obj_set_width(ext->indic, LV_DPI); @@ -151,7 +149,6 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->indic = lv_obj_create(ext->btns, copy_ext->indic); ext->content = lv_cont_create(new_tabview, copy_ext->content); ext->anim_time = copy_ext->anim_time; - ext->tab_load_action = copy_ext->tab_load_action; ext->tab_name_ptr = lv_mem_alloc(sizeof(char *)); lv_mem_assert(ext->tab_name_ptr); @@ -218,18 +215,10 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) /*Extend the button matrix map with the new name*/ char * name_dm; - if((name[0] & LV_BTNM_CTRL_MASK) == LV_BTNM_CTRL_CODE) { /*If control byte presented let is*/ - name_dm = lv_mem_alloc(strlen(name) + 1); /*+1 for the the closing '\0' */ - lv_mem_assert(name_dm); - if(name_dm == NULL) return NULL; - strcpy(name_dm, name); - } else { /*Set a no long press control byte is not presented*/ - name_dm = lv_mem_alloc(strlen(name) + 2); /*+1 for the the closing '\0' and +1 for the control byte */ - lv_mem_assert(name_dm); - if(name_dm == NULL) return NULL; - name_dm[0] = '\221'; - strcpy(&name_dm[1], name); - } + name_dm = lv_mem_alloc(strlen(name) + 1); /*+1 for the the closing '\0' */ + lv_mem_assert(name_dm); + if(name_dm == NULL) return NULL; + strcpy(name_dm, name); ext->tab_cnt++; ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1)); @@ -240,6 +229,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) ext->tab_name_ptr[ext->tab_cnt] = ""; lv_btnm_set_map(ext->btns, ext->tab_name_ptr); + lv_btnm_set_btn_no_repeat(ext->btns, ext->tab_cnt - 1, true); /*Modify the indicator size*/ lv_style_t * style_tabs = lv_obj_get_style(ext->btns); @@ -250,10 +240,11 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) /*Set the first btn as active*/ if(ext->tab_cnt == 1) { ext->tab_cur = 0; - lv_tabview_set_tab_act(tabview, 0, false); tabview_realign(tabview); /*To set the proper btns height*/ } + lv_tabview_set_tab_act(tabview, ext->tab_cur, false); + return h; } @@ -278,7 +269,8 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) lv_res_t res = LV_RES_OK; if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; - if(ext->tab_load_action && id != ext->tab_cur) res = ext->tab_load_action(tabview, id); + + if(id != ext->tab_cur) res = lv_obj_send_event(tabview, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return; /*Prevent the tab loading*/ ext->tab_cur = id; @@ -331,19 +323,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) #endif } - lv_btnm_set_toggle(ext->btns, true, ext->tab_cur); -} - -/** - * Set an action to call when a tab is loaded (Good to create content only if required) - * lv_tabview_get_act() still gives the current (old) tab (to remove content from here) - * @param tabview pointer to a tabview object - * @param action pointer to a function to call when a btn is loaded - */ -void lv_tabview_set_tab_load_action(lv_obj_t * tabview, lv_tabview_action_t action) -{ - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - ext->tab_load_action = action; + lv_btnm_set_btn_toggle_state(ext->btns, ext->tab_cur, true); } /** @@ -484,17 +464,6 @@ lv_obj_t * lv_tabview_get_tab(const lv_obj_t * tabview, uint16_t id) return NULL; } -/** - * Get the tab load action - * @param tabview pointer to a tabview object - * @param return the current btn load action - */ -lv_tabview_action_t lv_tabview_get_tab_load_action(const lv_obj_t * tabview) -{ - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - return ext->tab_load_action; -} - /** * Get horizontal sliding is enabled or not * @param tabview pointer to Tab view object @@ -806,26 +775,23 @@ static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage) } /** - * Called when a tab button is released + * Called when a tab button is clicked * @param tab_btnm pointer to the tab's button matrix object - * @param id the id of the tab (>= 0) - * @return LV_ACTION_RES_OK because the button matrix in not deleted in the function + * @param event type of the event */ -static lv_res_t tab_btnm_action(lv_obj_t * tab_btnm, const char * tab_name) +static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event) { - lv_obj_t * tab = lv_obj_get_parent(tab_btnm); - const char ** tabs_map = lv_btnm_get_map(tab_btnm); + if(event != LV_EVENT_CLICKED) return; - uint8_t i = 0; + uint16_t btn_id = lv_btnm_get_active_btn(tab_btnm); + if(btn_id == LV_BTNM_BTN_NONE) return; - while(tabs_map[i][0] != '\0') { - if(strcmp(&tabs_map[i][1], tab_name) == 0) break; /*[1] to skip the control byte*/ - i++; - } - lv_tabview_set_tab_act(tab, i, true); + lv_btnm_set_btn_toggle_state_all(tab_btnm, false); + lv_btnm_set_btn_toggle_state(tab_btnm, btn_id, true); - return LV_RES_OK; + lv_obj_t * tab = lv_obj_get_parent(tab_btnm); + lv_tabview_set_tab_act(tab, btn_id, true); } /** diff --git a/lv_objx/lv_tabview.h b/lv_objx/lv_tabview.h index 1b77a5f335e8..7a56f3c2234a 100644 --- a/lv_objx/lv_tabview.h +++ b/lv_objx/lv_tabview.h @@ -42,11 +42,6 @@ extern "C" { * TYPEDEFS **********************/ -/* parametes: pointer to a tabview object, tab_id - * return: LV_RES_INV: to prevent the loading of the tab; LV_RES_OK: if everything is fine*/ -typedef lv_res_t (*lv_tabview_action_t)(lv_obj_t *, uint16_t); - - enum { LV_TABVIEW_BTNS_POS_TOP, LV_TABVIEW_BTNS_POS_BOTTOM, @@ -71,7 +66,6 @@ typedef struct uint8_t drag_hor :1; uint8_t btns_hide :1; lv_tabview_btns_pos_t btns_pos :1; - lv_tabview_action_t tab_load_action; } lv_tabview_ext_t; enum { @@ -128,14 +122,6 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name); */ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en); -/** - * Set an action to call when a tab is loaded (Good to create content only if required) - * lv_tabview_get_act() still gives the current (old) tab (to remove content from here) - * @param tabview pointer to a tabview object - * @param action pointer to a function to call when a tab is loaded - */ -void lv_tabview_set_tab_load_action(lv_obj_t *tabview, lv_tabview_action_t action); - /** * Enable horizontal sliding with touch pad * @param tabview pointer to Tab view object @@ -197,13 +183,6 @@ uint16_t lv_tabview_get_tab_count(const lv_obj_t * tabview); */ lv_obj_t * lv_tabview_get_tab(const lv_obj_t * tabview, uint16_t id); -/** - * Get the tab load action - * @param tabview pointer to a tabview object - * @param return the current tab load action - */ -lv_tabview_action_t lv_tabview_get_tab_load_action(const lv_obj_t *tabview); - /** * Get horizontal sliding is enabled or not * @param tabview pointer to Tab view object diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index 9ce57a08312f..6bc38509cb31 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -134,7 +134,7 @@ void lv_tileview_add_element(lv_obj_t * element) { /* Let objects eventto propaget to the scrollable part of the tileview. * It is required the handle dargging of the tileview with the element.*/ - element->event_parent = 1; + element->parent_event = 1; lv_obj_set_drag_parent(element, true); } From 4e66afc65b9551f1a5ac1281e2db9eef43a5d774 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Mar 2019 14:29:37 +0100 Subject: [PATCH 111/590] send signals with LEYPAD input devices --- lv_core/lv_indev.c | 10 +++++++ lv_objx/lv_bar.c | 2 +- lv_objx/lv_btn.c | 21 ++++++------- lv_objx/lv_btnm.c | 33 +++++++++++++-------- lv_objx/lv_ddlist.c | 70 +++++++++++++++++++++++--------------------- lv_objx/lv_kb.c | 18 +++++++++++- lv_objx/lv_slider.c | 2 +- lv_objx/lv_ta.c | 9 ++++++ lv_objx/lv_tabview.c | 10 ++++++- 9 files changed, 115 insertions(+), 60 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 58e45f459892..88f572d84c76 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -398,6 +398,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Simulate a press on the object if ENTER was pressed*/ if(data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_group_send_data(g, LV_GROUP_KEY_ENTER); @@ -427,6 +429,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 1; if(data->key == LV_GROUP_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -438,6 +442,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send LONG_PRESS_REP on ENTER*/ if(data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED_REPEAT); if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -466,6 +472,10 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*The user might clear the key when it was released. Always release the pressed key*/ data->key = i->proc.types.keypad.last_key; if(data->key == LV_GROUP_KEY_ENTER) { + + focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.long_pr_sent == 0) { lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); } diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index e0735ce1bdc1..6e0e4b5ae773 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -73,7 +73,7 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) ext->min_value = 0; ext->max_value = 100; ext->cur_value = 0; - ext->anim_time = 500; + ext->anim_time = 200; ext->anim_start = 0; ext->anim_end = 0; ext->anim_state = LV_BAR_ANIM_STATE_INV; diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index aec5b4917c0c..b8dafb56c970 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -621,17 +621,18 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); - } else if(c == LV_GROUP_KEY_ENTER) { - if(lv_btn_get_toggle(btn)) { - if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - } else { - if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - } - res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); - if(res != LV_RES_OK) return res; } +// else if(c == LV_GROUP_KEY_ENTER) { +// if(lv_btn_get_toggle(btn)) { +// if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); +// else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); +// } else { +// if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); +// else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); +// } +// res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); +// if(res != LV_RES_OK) return res; +// } } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 582f1a866364..cacc0854c74e 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -81,6 +81,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) ext->btn_cnt = 0; ext->btn_id_pr = LV_BTNM_BTN_NONE; + ext->btn_id_act = LV_BTNM_BTN_NONE; ext->button_areas = NULL; ext->ctrl_bits = NULL; ext->map_p = NULL; @@ -820,16 +821,18 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_btnm_set_map(btnm, ext->map_p); } else if(sign == LV_SIGNAL_PRESSED) { - uint16_t btn_pr; - /*Search the pressed area*/ - lv_indev_get_point(param, &p); - btn_pr = get_button_from_point(btnm, &p); - - invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/; - ext->btn_id_pr = btn_pr; - ext->btn_id_act = btn_pr; - invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ - + lv_indev_t * indev = lv_indev_get_act(); + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + uint16_t btn_pr; + /*Search the pressed area*/ + lv_indev_get_point(param, &p); + btn_pr = get_button_from_point(btnm, &p); + + invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/; + ext->btn_id_pr = btn_pr; + ext->btn_id_act = btn_pr; + invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ + } } else if(sign == LV_SIGNAL_PRESSING) { uint16_t btn_pr; @@ -889,6 +892,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_indev_get_point(indev, &p1); uint16_t btn_i = get_button_from_point(btnm, &p1); ext->btn_id_pr = btn_i; + } else if(indev_type == LV_INDEV_TYPE_ENCODER) { /*In navigation mode don't select any button but in edit mode select the fist*/ if(lv_group_get_editing(lv_obj_get_group(btnm))) ext->btn_id_pr = 0; @@ -899,6 +903,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) #else ext->btn_id_pr = 0; #endif + + ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_CONTROLL) { @@ -907,11 +913,13 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; else ext->btn_id_pr++; if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1; + ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(c == LV_GROUP_KEY_LEFT) { if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; if(ext->btn_id_pr > 0) ext->btn_id_pr--; + ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(c == LV_GROUP_KEY_DOWN) { @@ -933,6 +941,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(area_below < ext->btn_cnt) ext->btn_id_pr = area_below; } + ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(c == LV_GROUP_KEY_UP) { @@ -954,11 +963,9 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(area_above >= 0) ext->btn_id_pr = area_above; } + ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } - else if(c == LV_GROUP_KEY_ENTER) { - - } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 8ea3d50d82e5..e97c4d3c6702 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -93,7 +93,7 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_time = LV_DDLIST_ANIM_TIME; ext->sel_style = &lv_style_plain_color; ext->draw_arrow = 0; /*Do not draw arrow by default*/ - ext->stay_open = 1; + ext->stay_open = 0; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_ddlist, lv_ddlist_signal); @@ -688,21 +688,21 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_obj_invalidate(ddlist); } } else if(c == LV_GROUP_KEY_ENTER) { - if(ext->opened) { - ext->sel_opt_id_ori = ext->sel_opt_id; - ext->opened = 0; - res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); - if(res != LV_RES_OK) return res; -#if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(ddlist); - bool editing = lv_group_get_editing(g); - if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ -#endif - } else { - ext->opened = 1; - } - - lv_ddlist_refr_size(ddlist, true); +// if(ext->opened) { +// ext->sel_opt_id_ori = ext->sel_opt_id; +// ext->opened = 0; +// res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); +// if(res != LV_RES_OK) return res; +//#if LV_USE_GROUP +// lv_group_t * g = lv_obj_get_group(ddlist); +// bool editing = lv_group_get_editing(g); +// if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ +//#endif +// } else { +// ext->opened = 1; +// } +// +// lv_ddlist_refr_size(ddlist, true); } else if(c == LV_GROUP_KEY_ESC) { if(ext->opened) { ext->opened = 0; @@ -775,26 +775,30 @@ static lv_res_t release_handler(lv_obj_t * ddlist) lv_ddlist_refr_size(ddlist, true); } else { - /*Search the clicked option*/ + /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/ lv_indev_t * indev = lv_indev_get_act(); - lv_point_t p; - lv_indev_get_point(indev, &p); - p.x -= ext->label->coords.x1; - p.y -= ext->label->coords.y1; - uint16_t letter_i; - letter_i = lv_label_get_letter_on(ext->label, &p); - - uint16_t new_opt = 0; - const char * txt = lv_label_get_text(ext->label); - uint32_t i = 0; - uint32_t line_cnt = 0; - uint32_t letter; - for(line_cnt = 0; line_cnt < letter_i; line_cnt++) { - letter = lv_txt_encoded_next(txt, &i); - if(letter == '\n') new_opt ++; + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { + lv_point_t p; + lv_indev_get_point(indev, &p); + p.x -= ext->label->coords.x1; + p.y -= ext->label->coords.y1; + uint16_t letter_i; + letter_i = lv_label_get_letter_on(ext->label, &p); + + uint16_t new_opt = 0; + const char * txt = lv_label_get_text(ext->label); + uint32_t i = 0; + uint32_t line_cnt = 0; + uint32_t letter; + for(line_cnt = 0; line_cnt < letter_i; line_cnt++) { + letter = lv_txt_encoded_next(txt, &i); + if(letter == '\n') new_opt ++; + } + + ext->sel_opt_id = new_opt; } - ext->sel_opt_id = new_opt; + ext->sel_opt_id_ori = ext->sel_opt_id; lv_res_t res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return res; diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 04c14ad267a4..74ff4de6aab9 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -367,13 +367,29 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } - else if(sign == LV_SIGNAL_RELEASED) { + else if(sign == LV_SIGNAL_PRESSED) { lv_kb_def_event_cb(kb); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { bool no_rep = lv_btnm_get_btn_no_repeate(kb, lv_btnm_get_active_btn(kb)); if(no_rep == false) lv_kb_def_event_cb(kb); } + else if(sign == LV_SIGNAL_FOCUS) { + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + /*Show the cursor of the new Text area if cursor management is enabled*/ + if(ext->ta && ext->cursor_mng) { + lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); + lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); + } + } + else if(sign == LV_SIGNAL_DEFOCUS) { + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + /*Show the cursor of the new Text area if cursor management is enabled*/ + if(ext->ta && ext->cursor_mng) { + lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); + lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); + } + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 86223593eb65..f28a0f263190 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -475,7 +475,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { - lv_slider_set_value(slider, ext->drag_value, false); + if(ext->drag_value != LV_SLIDER_NOT_PRESSED) lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; } else if(sign == LV_SIGNAL_CORD_CHG) { /* The knob size depends on slider size. diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 5b76c1ada6c0..5ab669213c02 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -1489,6 +1489,15 @@ static void placeholder_update(lv_obj_t * ta) static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source) { + if(click_source == NULL) return; + + if(lv_indev_get_type(click_source) == LV_INDEV_TYPE_KEYPAD || + lv_indev_get_type(click_source) == LV_INDEV_TYPE_ENCODER) + { + return; + } + + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_area_t label_coords; diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 70b67586857f..ac0442c1933a 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -586,7 +586,15 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p if(ext->btns) { ext->btns->signal_cb(ext->btns, sign, param); } - if(sign == LV_SIGNAL_FOCUS) { + + if(sign == LV_SIGNAL_CONTROLL) { + /*Simulate a click when enter is pressed*/ + char c = *((char *)param); + if(c == LV_GROUP_KEY_ENTER) { + lv_obj_send_event(ext->btns, LV_EVENT_CLICKED); + } + } + else if(sign == LV_SIGNAL_FOCUS) { lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { From 3458b1bfb1160e953e43ad4f3f19792bee7abdf3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Mar 2019 14:46:02 +0100 Subject: [PATCH 112/590] imporve ENCODER support by sending signals --- lv_core/lv_indev.c | 32 +++++++++++++++++++++----------- lv_objx/lv_btnm.c | 2 +- lv_objx/lv_ddlist.c | 22 +++++++--------------- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 88f572d84c76..e04ef368550e 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -541,13 +541,15 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); - /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { + focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_obj_send_event(focused, LV_EVENT_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -558,16 +560,15 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { /*On enter long press toggle edit mode.*/ if(editable) { - if(lv_ll_is_empty(&g->obj_ll) == false) + /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ + if(lv_ll_is_empty(&g->obj_ll) == false) { lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ - else { - /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ - lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); - if(i->proc.reset_query) return; /*The object might be deleted*/ } } /*If not editable then just send a long press signal*/ else { + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ } @@ -580,6 +581,9 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); + focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); if(i->proc.reset_query) return; /*The object might be deleted*/ @@ -588,18 +592,24 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_obj_send_event(focused, LV_EVENT_RELEASED); if(i->proc.reset_query) return; /*The object might be deleted*/ - - if(i->proc.reset_query) return; /*The object might be deleted*/ } - /*An object is being edited and the button is releases. Just send enter */ + /*An object is being edited and the button is released. */ else if(g->editing) { + /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { - lv_group_send_data(g, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/ + focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + lv_obj_send_event(focused, LV_EVENT_CLICKED); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_obj_send_event(focused, LV_EVENT_RELEASED); if(i->proc.reset_query) return; /*The object might be deleted*/ + + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } } /*If the focused object is editable and now in navigate mode then on enter switch edit mode*/ diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index cacc0854c74e..86d58b872727 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -822,7 +822,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = lv_indev_get_act(); - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { uint16_t btn_pr; /*Search the pressed area*/ lv_indev_get_point(param, &p); diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index e97c4d3c6702..9a7dd122dcff 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -688,21 +688,13 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_obj_invalidate(ddlist); } } else if(c == LV_GROUP_KEY_ENTER) { -// if(ext->opened) { -// ext->sel_opt_id_ori = ext->sel_opt_id; -// ext->opened = 0; -// res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); -// if(res != LV_RES_OK) return res; -//#if LV_USE_GROUP -// lv_group_t * g = lv_obj_get_group(ddlist); -// bool editing = lv_group_get_editing(g); -// if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ -//#endif -// } else { -// ext->opened = 1; -// } -// -// lv_ddlist_refr_size(ddlist, true); + lv_indev_t * indev = lv_indev_get_act(); + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + lv_group_t * g = lv_obj_get_group(ddlist); + if(lv_group_get_editing(g)) { + lv_group_set_editing(g, false); + } + } } else if(c == LV_GROUP_KEY_ESC) { if(ext->opened) { ext->opened = 0; From 6967a8e52f12ddddd7645d2e8e041034c16adf2e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Mar 2019 15:17:28 +0100 Subject: [PATCH 113/590] lv_page: fix arrow scroll --- lv_core/lv_indev.c | 15 +++++++++++---- lv_objx/lv_page.c | 8 ++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index e04ef368550e..446d6624bdbb 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -538,13 +538,13 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) focused = lv_group_get_focused(g); if(focused == NULL) return; - bool editable = false; - focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); - /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { + bool editable = false; + focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); @@ -557,7 +557,11 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) + { + bool editable = false; + focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + /*On enter long press toggle edit mode.*/ if(editable) { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ @@ -578,6 +582,9 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*Release happened*/ else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + bool editable = false; + focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { lv_group_send_data(g, LV_GROUP_KEY_ENTER); diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 7b7cede60a86..dcd5ee0109f4 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -806,12 +806,12 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } else if((c == LV_GROUP_KEY_UP) && ext->arrow_scroll) { lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); } else if((c == LV_GROUP_KEY_RIGHT) && ext->arrow_scroll) { - /*If the page can be scrolled horizontally because it's not wide enough then scroll it vertically*/ - if(lv_page_get_scrl_width(page) < lv_obj_get_width(page)) lv_page_scroll_ver(page, - lv_obj_get_height(page) / 4); + /*If the page can't be scrolled horizontally because it's not wide enough then scroll it vertically*/ + if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) lv_page_scroll_ver(page, - lv_obj_get_height(page) / 4); else lv_page_scroll_hor(page, - lv_obj_get_width(page) / 4); } else if((c == LV_GROUP_KEY_LEFT) && ext->arrow_scroll) { - /*If the page can be scrolled horizontally because it's not wide enough then scroll it vertically*/ - if(lv_page_get_scrl_width(page) < lv_obj_get_width(page)) lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); + /*If the page can't be scrolled horizontally because it's not wide enough then scroll it vertically*/ + if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); else lv_page_scroll_hor(page, lv_obj_get_width(page) / 4); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { From 89d56e57238b03b290c4b7a10608ceaefe2d2401 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 12 Mar 2019 19:20:23 +0100 Subject: [PATCH 114/590] KEYPAD, ENCODER: not send ENTER (process it in RELEASE signals) --- lv_core/lv_indev.c | 2 - lv_objx/lv_cb.c | 3 +- lv_objx/lv_ddlist.c | 18 ++-- lv_objx/lv_list.c | 196 +++++++++++++++++++++++++------------------ lv_objx/lv_roller.c | 16 ++-- lv_objx/lv_slider.c | 20 +++-- lv_objx/lv_spinbox.c | 37 ++++---- lv_objx/lv_sw.c | 8 +- lv_objx/lv_tabview.c | 26 +++--- 9 files changed, 180 insertions(+), 146 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 446d6624bdbb..efdaf683880b 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -402,7 +402,6 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { @@ -587,7 +586,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { - lv_group_send_data(g, LV_GROUP_KEY_ENTER); focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ diff --git a/lv_objx/lv_cb.c b/lv_objx/lv_cb.c index 8f5c3bfd33fe..5709d448d925 100644 --- a/lv_objx/lv_cb.c +++ b/lv_objx/lv_cb.c @@ -340,8 +340,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN || - c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP || - c == LV_GROUP_KEY_ENTER) { + c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } } else if(sign == LV_SIGNAL_GET_TYPE) { diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 9a7dd122dcff..bdb7f42357cd 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -687,14 +687,6 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_ddlist_pos_current_option(ddlist); lv_obj_invalidate(ddlist); } - } else if(c == LV_GROUP_KEY_ENTER) { - lv_indev_t * indev = lv_indev_get_act(); - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { - lv_group_t * g = lv_obj_get_group(ddlist); - if(lv_group_get_editing(g)) { - lv_group_set_editing(g, false); - } - } } else if(c == LV_GROUP_KEY_ESC) { if(ext->opened) { ext->opened = 0; @@ -767,8 +759,16 @@ static lv_res_t release_handler(lv_obj_t * ddlist) lv_ddlist_refr_size(ddlist, true); } else { - /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/ + /*Leave edit mode once a new item is selected*/ lv_indev_t * indev = lv_indev_get_act(); + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + lv_group_t * g = lv_obj_get_group(ddlist); + if(lv_group_get_editing(g)) { + lv_group_set_editing(g, false); + } + } + + /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/ if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { lv_point_t p; lv_indev_get_point(indev, &p); diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 097e25388587..718ce0843c58 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -92,7 +92,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_time = LV_LIST_FOCUS_TIME; ext->single_mode = false; ext->size = 0; - + #if LV_USE_GROUP ext->last_sel = NULL; ext->selected_btn = NULL; @@ -345,40 +345,40 @@ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style lv_obj_t * btn; switch(type) { - case LV_LIST_STYLE_BG: - lv_page_set_style(list, LV_PAGE_STYLE_BG, style); - /*style change signal will call 'refr_btn_width' */ - break; - case LV_LIST_STYLE_SCRL: - lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); - refr_btn_width(list); - break; - case LV_LIST_STYLE_SB: - lv_page_set_style(list, LV_PAGE_STYLE_SB, style); - break; - case LV_LIST_STYLE_EDGE_FLASH: - lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); - break; - case LV_LIST_STYLE_BTN_REL: - ext->styles_btn[LV_BTN_STATE_REL] = style; - btn_style_refr = LV_BTN_STYLE_REL; - break; - case LV_LIST_STYLE_BTN_PR: - ext->styles_btn[LV_BTN_STATE_PR] = style; - btn_style_refr = LV_BTN_STYLE_PR; - break; - case LV_LIST_STYLE_BTN_TGL_REL: - ext->styles_btn[LV_BTN_STATE_TGL_REL] = style; - btn_style_refr = LV_BTN_STYLE_TGL_REL; - break; - case LV_LIST_STYLE_BTN_TGL_PR: - ext->styles_btn[LV_BTN_STATE_TGL_PR] = style; - btn_style_refr = LV_BTN_STYLE_TGL_PR; - break; - case LV_LIST_STYLE_BTN_INA: - ext->styles_btn[LV_BTN_STATE_INA] = style; - btn_style_refr = LV_BTN_STYLE_INA; - break; + case LV_LIST_STYLE_BG: + lv_page_set_style(list, LV_PAGE_STYLE_BG, style); + /*style change signal will call 'refr_btn_width' */ + break; + case LV_LIST_STYLE_SCRL: + lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); + refr_btn_width(list); + break; + case LV_LIST_STYLE_SB: + lv_page_set_style(list, LV_PAGE_STYLE_SB, style); + break; + case LV_LIST_STYLE_EDGE_FLASH: + lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); + break; + case LV_LIST_STYLE_BTN_REL: + ext->styles_btn[LV_BTN_STATE_REL] = style; + btn_style_refr = LV_BTN_STYLE_REL; + break; + case LV_LIST_STYLE_BTN_PR: + ext->styles_btn[LV_BTN_STATE_PR] = style; + btn_style_refr = LV_BTN_STYLE_PR; + break; + case LV_LIST_STYLE_BTN_TGL_REL: + ext->styles_btn[LV_BTN_STATE_TGL_REL] = style; + btn_style_refr = LV_BTN_STYLE_TGL_REL; + break; + case LV_LIST_STYLE_BTN_TGL_PR: + ext->styles_btn[LV_BTN_STATE_TGL_PR] = style; + btn_style_refr = LV_BTN_STYLE_TGL_PR; + break; + case LV_LIST_STYLE_BTN_INA: + ext->styles_btn[LV_BTN_STATE_INA] = style; + btn_style_refr = LV_BTN_STYLE_INA; + break; } @@ -488,7 +488,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) - /** +/** * Get the next button from list. (Starts from the bottom button) * @param list pointer to a list object * @param prev_btn pointer to button. Search the next after it. @@ -585,36 +585,36 @@ lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type) lv_list_ext_t * ext = lv_obj_get_ext_attr(list); switch(type) { - case LV_LIST_STYLE_BG: - style = lv_page_get_style(list, LV_PAGE_STYLE_BG); - break; - case LV_LIST_STYLE_SCRL: - style = lv_page_get_style(list, LV_PAGE_STYLE_SB); - break; - case LV_LIST_STYLE_SB: - style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); - break; - case LV_LIST_STYLE_EDGE_FLASH: - style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); - break; - case LV_LIST_STYLE_BTN_REL: - style = ext->styles_btn[LV_BTN_STATE_REL]; - break; - case LV_LIST_STYLE_BTN_PR: - style = ext->styles_btn[LV_BTN_STATE_PR]; - break; - case LV_LIST_STYLE_BTN_TGL_REL: - style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; - break; - case LV_LIST_STYLE_BTN_TGL_PR: - style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; - break; - case LV_LIST_STYLE_BTN_INA: - style = ext->styles_btn[LV_BTN_STATE_INA]; - break; - default: - style = NULL; - break; + case LV_LIST_STYLE_BG: + style = lv_page_get_style(list, LV_PAGE_STYLE_BG); + break; + case LV_LIST_STYLE_SCRL: + style = lv_page_get_style(list, LV_PAGE_STYLE_SB); + break; + case LV_LIST_STYLE_SB: + style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); + break; + case LV_LIST_STYLE_EDGE_FLASH: + style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); + break; + case LV_LIST_STYLE_BTN_REL: + style = ext->styles_btn[LV_BTN_STATE_REL]; + break; + case LV_LIST_STYLE_BTN_PR: + style = ext->styles_btn[LV_BTN_STATE_PR]; + break; + case LV_LIST_STYLE_BTN_TGL_REL: + style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; + break; + case LV_LIST_STYLE_BTN_TGL_PR: + style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; + break; + case LV_LIST_STYLE_BTN_INA: + style = ext->styles_btn[LV_BTN_STATE_INA]; + break; + default: + style = NULL; + break; } return style; @@ -752,10 +752,55 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(w != lv_area_get_width(param)) { /*Width changed*/ refr_btn_width(list); } - } else if(sign == LV_SIGNAL_STYLE_CHG) { + } + else if(sign == LV_SIGNAL_RELEASED || + sign == LV_SIGNAL_PRESSED || + sign == LV_SIGNAL_PRESSING || + sign == LV_SIGNAL_LONG_PRESS || + sign == LV_SIGNAL_LONG_PRESS_REP) + { + /*If pressed/released etc by a KEYPAD or ENCODER delegate signal to the button*/ + lv_indev_t * indev = lv_indev_get_act(); + lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + if(indev_type == LV_INDEV_TYPE_KEYPAD || + (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(list)))) + { + /*Get the 'pressed' button*/ + lv_obj_t * btn = NULL; + btn = lv_list_get_prev_btn(list, btn); + while(btn != NULL) { + if(lv_btn_get_state(btn) == LV_BTN_STATE_PR) break; + btn = lv_list_get_prev_btn(list, btn); + } + lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + + if(btn) { + if(sign == LV_SIGNAL_PRESSED) { + lv_obj_send_event(btn, LV_EVENT_PRESSED); + } + else if(sign == LV_SIGNAL_PRESSING) { + lv_obj_send_event(btn, LV_EVENT_PRESSING); + } + else if(sign == LV_SIGNAL_LONG_PRESS) { + lv_obj_send_event(btn, LV_EVENT_LONG_PRESSED); + } + else if(sign == LV_SIGNAL_LONG_PRESS_REP) { + lv_obj_send_event(btn, LV_EVENT_LONG_PRESSED_REPEAT); + } + else if(sign == LV_SIGNAL_RELEASED) { + ext->last_sel = btn; + if(indev->proc.long_pr_sent == 0) lv_obj_send_event(btn, LV_EVENT_SHORT_CLICKED); + lv_obj_send_event(btn, LV_EVENT_CLICKED); + lv_obj_send_event(btn, LV_EVENT_RELEASED); + } + } + } + } + else if(sign == LV_SIGNAL_STYLE_CHG) { /*Because of the possible change of horizontal and vertical padding refresh buttons width */ refr_btn_width(list); - } else if(sign == LV_SIGNAL_FOCUS) { + } + else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -834,21 +879,6 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) lv_obj_t * btn = lv_list_get_next_btn(list, NULL); if(btn) lv_list_set_btn_selected(list, btn); } - } else if(c == LV_GROUP_KEY_ENTER) { - /*Get the 'pressed' button*/ - lv_obj_t * btn = NULL; - btn = lv_list_get_prev_btn(list, btn); - while(btn != NULL) { - if(lv_btn_get_state(btn) == LV_BTN_STATE_PR) break; - btn = lv_list_get_prev_btn(list, btn); - } - - if(btn != NULL) { - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - ext->last_sel = btn; - res = lv_obj_send_event(btn, LV_EVENT_CLICKED); - if(res != LV_RES_OK) return res; - } } #endif } else if(sign == LV_SIGNAL_GET_TYPE) { diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 77e7e36d5b10..f5d44f9fdbdc 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -402,16 +402,6 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par if(ext->ddlist.sel_opt_id > 0) { lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true); } - } else if(c == LV_GROUP_KEY_ENTER) { - ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/ - res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); - if(res != LV_RES_OK) return res; - -#if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(roller); - bool editing = lv_group_get_editing(g); - if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ -#endif } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; @@ -472,6 +462,12 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; ext->ddlist.sel_opt_id = id; + ext->ddlist.sel_opt_id_ori = id; +#if LV_USE_GROUP + lv_group_t * g = lv_obj_get_group(roller); + bool editing = lv_group_get_editing(g); + if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ +#endif res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return res; } diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index f28a0f263190..5d3fc145e4b6 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -477,6 +477,17 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { if(ext->drag_value != LV_SLIDER_NOT_PRESSED) lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; + +#if LV_USE_GROUP + /*Leave edit mode if released. (No need to wait for LONG_PRESS) */ + lv_group_t * g = lv_obj_get_group(slider); + bool editing = lv_group_get_editing(g); + lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + if(indev_type == LV_INDEV_TYPE_ENCODER) { + if(editing) lv_group_set_editing(g, false); + } +#endif + } else if(sign == LV_SIGNAL_CORD_CHG) { /* The knob size depends on slider size. * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/ @@ -504,15 +515,6 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par ext->drag_value = LV_SLIDER_NOT_PRESSED; -#if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(slider); - bool editing = lv_group_get_editing(g); - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); - /*Encoders need special handling*/ - if(indev_type == LV_INDEV_TYPE_ENCODER && c == LV_GROUP_KEY_ENTER) { - if(editing) lv_group_set_editing(g, false); - } -#endif if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true); res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index edfdeedbff59..b590751354f6 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -335,6 +335,27 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p } buf->type[i] = "lv_spinbox"; } + else if(sign == LV_SIGNAL_RELEASED) { + /*If released with an ENCODER then move to the nexxt digit*/ + lv_indev_t * indev = lv_indev_get_act(); + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + if(lv_group_get_editing(lv_obj_get_group(spinbox))) { + if(ext->step > 1) { + lv_spinbox_step_next(spinbox); + } else { + /*Restart from the MSB*/ + ext->step = 1; + uint32_t i; + for(i = 0; i < ext->digit_count; i++) { + int32_t new_step = ext->step * 10; + if(new_step >= ext->range_max) break; + ext->step = new_step; + } + lv_spinbox_step_previous(spinbox); + } + } + } + } else if(sign == LV_SIGNAL_CONTROLL) { lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -353,22 +374,6 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p else if(c == LV_GROUP_KEY_DOWN) { lv_spinbox_decrement(spinbox); } - else if(c == LV_GROUP_KEY_ENTER) { - - if(ext->step > 1) { - lv_spinbox_step_next(spinbox); - } else { - /*Restart from the MSB*/ - ext->step = 1; - uint32_t i; - for(i = 0; i < ext->digit_count; i++) { - int32_t new_step = ext->step * 10; - if(new_step >= ext->range_max) break; - ext->step = new_step; - } - lv_spinbox_step_previous(spinbox); - } - } else { lv_ta_add_char(spinbox, c); } diff --git a/lv_objx/lv_sw.c b/lv_objx/lv_sw.c index b7e36d0c8d20..a1477f5235be 100644 --- a/lv_objx/lv_sw.c +++ b/lv_objx/lv_sw.c @@ -344,6 +344,8 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(lv_sw_get_state(sw)) lv_sw_off(sw, true); else lv_sw_on(sw, true); + res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return res; } /*If the switch was dragged then calculate the new state based on the current position*/ else { @@ -356,11 +358,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_ENTER) { - lv_sw_toggle(sw, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); - if(res != LV_RES_OK) return res; - } else if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return res; diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index ac0442c1933a..2be276df433d 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -574,27 +574,33 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p ext->tab_name_ptr = NULL; ext->btns = NULL; /*These objects were children so they are already invalid*/ ext->content = NULL; - } else if(sign == LV_SIGNAL_CORD_CHG) { + } + else if(sign == LV_SIGNAL_CORD_CHG) { if(ext->content != NULL && (lv_obj_get_width(tabview) != lv_area_get_width(param) || lv_obj_get_height(tabview) != lv_area_get_height(param))) { tabview_realign(tabview); } - } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL) { + } + else if(sign == LV_SIGNAL_RELEASED) { + /*If released by a KEYPAD or ENCODER then really the tab buttons should be released. + * So simulate a CLICK on the tab buttons*/ + lv_indev_t * indev = lv_indev_get_act(); + lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + if(indev_type == LV_INDEV_TYPE_KEYPAD || + (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) + { + lv_obj_send_event(ext->btns, LV_EVENT_CLICKED); + } + } + else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL) { /* The button matrix is not in a group (the tab view is in it) but it should handle the group signals. * So propagate the related signals to the button matrix manually*/ if(ext->btns) { ext->btns->signal_cb(ext->btns, sign, param); } - if(sign == LV_SIGNAL_CONTROLL) { - /*Simulate a click when enter is pressed*/ - char c = *((char *)param); - if(c == LV_GROUP_KEY_ENTER) { - lv_obj_send_event(ext->btns, LV_EVENT_CLICKED); - } - } - else if(sign == LV_SIGNAL_FOCUS) { + if(sign == LV_SIGNAL_FOCUS) { lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { From 2be9e676972237d13ec058b72c7e08529a260d08 Mon Sep 17 00:00:00 2001 From: Elvis Date: Tue, 12 Mar 2019 12:06:25 -0700 Subject: [PATCH 115/590] replace micropython bindings --- lv_misc/lv_color.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index 62b4c8272bad..63645d682132 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -402,7 +402,15 @@ static inline uint8_t lv_color_brightness(lv_color_t color) (uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \ (uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4))) +static inline lv_color_t lv_color_hex(uint32_t c){ + return LV_COLOR_HEX(c); +} +static inline lv_color_t lv_color_hex3(uint32_t c){ + return LV_COLOR_HEX3(c); +} + + /** * Convert a HSV color to RGB * @param h hue [0..359] From b8f598112f08cb84ff4205830efc8a87f10e7b1f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 13 Mar 2019 22:08:20 +0100 Subject: [PATCH 116/590] update lv_indev_enable to enable/disable an indev not a type --- lv_core/lv_indev.c | 18 +++++++----------- lv_core/lv_indev.h | 10 +++++----- lv_objx/lv_btnm.c | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index efdaf683880b..920db0b42f42 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -111,7 +111,7 @@ void lv_indev_reset(lv_indev_t * indev) * Reset the long press state of an input device * @param indev pointer to an input device */ -void lv_indev_reset_lpr(lv_indev_t * indev) +void lv_indev_reset_long_press(lv_indev_t * indev) { indev->proc.long_pr_sent = 0; indev->proc.longpr_rep_timestamp = lv_tick_get(); @@ -119,19 +119,15 @@ void lv_indev_reset_lpr(lv_indev_t * indev) } /** - * Enable input devices device by type - * @param type Input device type - * @param enable true: enable this type; false: disable this type + * Enable or disable an input devices + * @param indev pointer to an input device + * @param en true: enable; false: disable */ -void lv_indev_enable(lv_hal_indev_type_t type, bool enable) +void lv_indev_enable(lv_indev_t * indev, bool en) { + if(!indev) return; - lv_indev_t * i = lv_indev_next(NULL); - - while(i) { - if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0; - i = lv_indev_next(i); - } + indev->proc.disabled = en ? 1 : 0; } /** diff --git a/lv_core/lv_indev.h b/lv_core/lv_indev.h index 2e55c2371d47..a5287fca72cd 100644 --- a/lv_core/lv_indev.h +++ b/lv_core/lv_indev.h @@ -58,14 +58,14 @@ void lv_indev_reset(lv_indev_t * indev); * Reset the long press state of an input device * @param indev_proc pointer to an input device */ -void lv_indev_reset_lpr(lv_indev_t * indev); +void lv_indev_reset_long_press(lv_indev_t * indev); /** - * Enable input devices device by type - * @param type Input device type - * @param enable true: enable this type; false: disable this type + * Enable or disable an input devices + * @param indev pointer to an input device + * @param en true: enable; false: disable */ -void lv_indev_enable(lv_hal_indev_type_t type, bool enable); +void lv_indev_enable(lv_indev_t * indev, bool en); /** * Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 86d58b872727..2d47ee02b11b 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -841,7 +841,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_pr = get_button_from_point(btnm, &p); /*Invalidate to old and the new areas*/; if(btn_pr != ext->btn_id_pr) { - lv_indev_reset_lpr(param); + lv_indev_reset_long_press(param); if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { invalidate_button_area(btnm, ext->btn_id_pr); } From e8fdac41a96f052e7cb557dd9dce0d24292af123 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 13 Mar 2019 22:15:08 +0100 Subject: [PATCH 117/590] lv_group_add_obj: do not add teh object if already added to this group --- lv_core/lv_group.c | 11 ++++++++++- lv_objx/lv_btn.c | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index f86c6adae4ed..ed670229c525 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -119,12 +119,21 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj) { if(group == NULL) return; + /*Do not add the object twice*/ + lv_obj_t ** obj_i; + LV_LL_READ(group->obj_ll, obj_i) { + if((*obj_i) == obj) { + LV_LOG_INFO("lv_group_add_obj: the object is already added to this group"); + return; + } + } + /*If the object is already in a group and focused then defocus it*/ if(obj->group_p) { if(lv_obj_is_focused(obj)) { lv_group_refocus(obj->group_p); - LV_LOG_INFO("group: assign object to an other group"); + LV_LOG_INFO("lv_group_add_obj: assign object to an other group"); } } diff --git a/lv_objx/lv_btn.c b/lv_objx/lv_btn.c index b8dafb56c970..cc21209b416e 100644 --- a/lv_objx/lv_btn.c +++ b/lv_objx/lv_btn.c @@ -493,7 +493,6 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode */ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) { - lv_res_t res; /* Include the ancient signal function */ @@ -501,7 +500,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - lv_btn_state_t state = lv_btn_get_state(btn); bool tgl = lv_btn_get_toggle(btn); if(sign == LV_SIGNAL_PRESSED) { From 250ef8b136c197a7a267f56cbd8c52af56c4c05a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 13 Mar 2019 23:58:33 +0100 Subject: [PATCH 118/590] start to replace padding.hor/ver with top/bottom/left/right --- lv_core/lv_style.c | 6 +- lv_core/lv_style.h | 6 +- lv_objx/lv_bar.c | 8 +-- lv_objx/lv_btnm.c | 22 ++++---- lv_objx/lv_calendar.c | 47 ++++++++-------- lv_objx/lv_cont.c | 53 +++++++++--------- lv_objx/lv_ddlist.c | 9 ++- lv_objx/lv_gauge.c | 15 ++--- lv_objx/lv_label.c | 14 +++-- lv_objx/lv_list.c | 34 +----------- lv_objx/lv_lmeter.c | 2 +- lv_objx/lv_mbox.c | 5 +- lv_objx/lv_page.c | 108 ++++++++++++++++++------------------ lv_objx/lv_preload.c | 2 +- lv_objx/lv_slider.c | 62 ++++++++++++--------- lv_objx/lv_ta.c | 93 +++++++++++++++++-------------- lv_objx/lv_table.c | 29 ++++++---- lv_objx/lv_tabview.c | 17 +++--- lv_objx/lv_tileview.c | 12 ++-- lv_objx/lv_win.c | 9 +-- lv_themes/lv_theme_alien.c | 111 ++++++++++++++++++++++++------------- 21 files changed, 355 insertions(+), 309 deletions(-) diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 1e04116c0647..d28f179c42c7 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -232,8 +232,10 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * STYLE_ATTR_MIX(body.border.width, ratio); STYLE_ATTR_MIX(body.border.opa, ratio); STYLE_ATTR_MIX(body.shadow.width, ratio); - STYLE_ATTR_MIX(body.padding.hor, ratio); - STYLE_ATTR_MIX(body.padding.ver, ratio); + STYLE_ATTR_MIX(body.padding.left, ratio); + STYLE_ATTR_MIX(body.padding.right, ratio); + STYLE_ATTR_MIX(body.padding.top, ratio); + STYLE_ATTR_MIX(body.padding.bottom, ratio); STYLE_ATTR_MIX(body.padding.inner, ratio); STYLE_ATTR_MIX(text.line_space, ratio); STYLE_ATTR_MIX(text.letter_space, ratio); diff --git a/lv_core/lv_style.h b/lv_core/lv_style.h index 0f0accdf7067..3cde6854dead 100644 --- a/lv_core/lv_style.h +++ b/lv_core/lv_style.h @@ -73,8 +73,10 @@ typedef struct } shadow; struct { - lv_coord_t ver; - lv_coord_t hor; + lv_coord_t top; + lv_coord_t bottom; + lv_coord_t left; + lv_coord_t right; lv_coord_t inner; } padding; } body; diff --git a/lv_objx/lv_bar.c b/lv_objx/lv_bar.c index 6e0e4b5ae773..f6210756a69a 100644 --- a/lv_objx/lv_bar.c +++ b/lv_objx/lv_bar.c @@ -350,10 +350,10 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); - indic_area.x1 += style_indic->body.padding.hor; - indic_area.x2 -= style_indic->body.padding.hor; - indic_area.y1 += style_indic->body.padding.ver; - indic_area.y2 -= style_indic->body.padding.ver; + indic_area.x1 += style_indic->body.padding.left; + indic_area.x2 -= style_indic->body.padding.right; + indic_area.y1 += style_indic->body.padding.top; + indic_area.y2 -= style_indic->body.padding.bottom; lv_coord_t w = lv_area_get_width(&indic_area); lv_coord_t h = lv_area_get_height(&indic_area); diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 2d47ee02b11b..acde92394a69 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -163,9 +163,9 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /*Set size and positions of the buttons*/ lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); - lv_coord_t max_w = lv_obj_get_width(btnm) - 2 * style_bg->body.padding.hor; - lv_coord_t max_h = lv_obj_get_height(btnm) - 2 * style_bg->body.padding.ver; - lv_coord_t act_y = style_bg->body.padding.ver; + lv_coord_t max_w = lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t max_h = lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom; + lv_coord_t act_y = style_bg->body.padding.top; /*Count the lines to calculate button height*/ uint8_t line_cnt = 1; @@ -200,7 +200,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /*Make sure the last row is at the bottom of 'btnm'*/ if(map_p_tmp[btn_cnt][0] == '\0') { /*Last row?*/ - btn_h = max_h - act_y + style_bg->body.padding.ver - 1; + btn_h = max_h - act_y + style_bg->body.padding.bottom - 1; } /*Only deal with the non empty lines*/ @@ -210,7 +210,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) /*Set the button size and positions and set the texts*/ uint16_t i; - lv_coord_t act_x = style_bg->body.padding.hor; + lv_coord_t act_x = style_bg->body.padding.left; lv_coord_t act_unit_w; unit_act_cnt = 0; for(i = 0; i < btn_cnt; i++) { @@ -221,11 +221,11 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) act_unit_w --; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/ /*Always recalculate act_x because of rounding errors */ - act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner + style_bg->body.padding.hor; + act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner + style_bg->body.padding.left; /* Set the button's area. * If inner padding is zero then use the prev. button x2 as x1 to avoid rounding errors*/ - if(style_bg->body.padding.inner == 0 && act_x != style_bg->body.padding.hor) { + if(style_bg->body.padding.inner == 0 && act_x != style_bg->body.padding.left) { lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w, act_y + btn_h); } else { @@ -758,10 +758,10 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo /*Remove borders on the edges if `LV_BORDER_INTERNAL`*/ if(style_tmp.body.border.part & LV_BORDER_INTERNAL) { - if(area_tmp.y1 == btnm->coords.y1 + bg_style->body.padding.ver) { + if(area_tmp.y1 == btnm->coords.y1 + bg_style->body.padding.top) { style_tmp.body.border.part &= ~LV_BORDER_TOP; } - if(area_tmp.y2 == btnm->coords.y2 - bg_style->body.padding.ver) { + if(area_tmp.y2 == btnm->coords.y2 - bg_style->body.padding.bottom) { style_tmp.body.border.part &= ~LV_BORDER_BOTTOM; } @@ -934,7 +934,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below ++) { if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 && pr_center >= ext->button_areas[area_below].x1 && - pr_center <= ext->button_areas[area_below].x2 + style->body.padding.hor) { + pr_center <= ext->button_areas[area_below].x2 + style->body.padding.left) { break; } } @@ -955,7 +955,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) for(area_above = ext->btn_id_pr; area_above >= 0; area_above --) { if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 && - pr_center >= ext->button_areas[area_above].x1 - style->body.padding.hor && + pr_center >= ext->button_areas[area_above].x1 - style->body.padding.left && pr_center <= ext->button_areas[area_above].x2) { break; } diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 96b20494f1e3..e248bf4a2758 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -596,9 +596,9 @@ static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touche lv_area_t days_area; lv_area_copy(&days_area, &calendar->coords); lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); - days_area.x1 += style_bg->body.padding.hor; - days_area.x2 -= style_bg->body.padding.hor; - days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) - style_bg->body.padding.ver; + days_area.x1 += style_bg->body.padding.left; + days_area.x2 -= style_bg->body.padding.right; + days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) - style_bg->body.padding.top; if(lv_area_is_point_on(&days_area, touched_point)) { lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7; @@ -646,7 +646,7 @@ static lv_coord_t get_header_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_header->text.font) + ext->style_header->body.padding.ver * 2; + return lv_font_get_height(ext->style_header->text.font) + ext->style_header->body.padding.top + ext->style_header->body.padding.bottom ; } /** @@ -658,7 +658,7 @@ static lv_coord_t get_day_names_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.ver * 2; + return lv_font_get_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.top + ext->style_day_names->body.padding.bottom; } /** @@ -685,17 +685,17 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) txt_buf[4] = ' '; txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); - header_area.y1 += ext->style_header->body.padding.ver; + header_area.y1 += ext->style_header->body.padding.top; lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL); /*Add the left arrow*/ lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; - header_area.x1 += ext->style_header->body.padding.hor; + header_area.x1 += ext->style_header->body.padding.left; lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; - header_area.x1 = header_area.x2 - ext->style_header->body.padding.hor - + header_area.x1 = header_area.x2 - ext->style_header->body.padding.right - lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, arrow_style->text.line_space, LV_TXT_FLAG_NONE); lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); @@ -712,15 +712,15 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); - lv_coord_t hpad = ext->style_day_names->body.padding.hor; - lv_coord_t w = lv_obj_get_width(calendar) - 2 * hpad; + lv_coord_t l_pad = ext->style_day_names->body.padding.left; + lv_coord_t w = lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - ext->style_day_names->body.padding.right; lv_coord_t box_w = w / 7; lv_area_t label_area; - label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.ver; + label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; label_area.y2 = label_area.y1 + lv_font_get_height(ext->style_day_names->text.font); uint32_t i; for(i = 0; i < 7; i++) { - label_area.x1 = calendar->coords.x1 + (w * i) / 7 + hpad; + label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; label_area.x2 = label_area.x1 + box_w; lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, NULL); } @@ -736,16 +736,15 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); - lv_coord_t hpad = style_bg->body.padding.hor; lv_area_t label_area; lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + - ext->style_day_names->body.padding.ver + lv_font_get_height(ext->style_day_names->text.font) + - ext->style_day_names->body.padding.ver; + ext->style_day_names->body.padding.top + lv_font_get_height(ext->style_day_names->text.font) + + ext->style_day_names->body.padding.bottom; label_area.y2 = label_area.y1 + lv_font_get_height(style_bg->text.font); - lv_coord_t w = lv_obj_get_width(calendar) - 2 * hpad; - lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.ver; + lv_coord_t w = lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom; lv_coord_t box_w = w / 7; lv_coord_t vert_space = (h - (6 * lv_font_get_height(style_bg->text.font))) / 5; @@ -786,11 +785,11 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) (draw_state == DAY_DRAW_PREV_MONTH && ext->today.day <= 7 - month_start_day && week == 0))) { lv_area_t week_box_area; lv_area_copy(&week_box_area, &label_area); /*'label_area' is already set for this row*/ - week_box_area.x1 = calendar->coords.x1 + style_bg->body.padding.hor - ext->style_week_box->body.padding.hor; - week_box_area.x2 = calendar->coords.x2 - style_bg->body.padding.hor + ext->style_week_box->body.padding.hor; + week_box_area.x1 = calendar->coords.x1 + style_bg->body.padding.left - ext->style_week_box->body.padding.left; + week_box_area.x2 = calendar->coords.x2 - style_bg->body.padding.right + ext->style_week_box->body.padding.right; - week_box_area.y1 -= ext->style_week_box->body.padding.ver; - week_box_area.y2 += ext->style_week_box->body.padding.ver; + week_box_area.y1 -= ext->style_week_box->body.padding.top; + week_box_area.y2 += ext->style_week_box->body.padding.bottom; lv_draw_rect(&week_box_area, mask, ext->style_week_box, opa_scale); in_week_box = true; @@ -815,7 +814,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) act_style = ext->style_inactive_days; } - label_area.x1 = calendar->coords.x1 + (w * day) / 7 + hpad; + label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + style_bg->body.padding.right; label_area.x2 = label_area.x1 + box_w; /*Draw the "today box"*/ @@ -825,8 +824,8 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) today_box_area.x1 = label_area.x1; today_box_area.x2 = label_area.x2; - today_box_area.y1 = label_area.y1 - ext->style_today_box->body.padding.ver; - today_box_area.y2 = label_area.y2 + ext->style_today_box->body.padding.ver; + today_box_area.y1 = label_area.y1 - ext->style_today_box->body.padding.top; + today_box_area.y2 = label_area.y2 + ext->style_today_box->body.padding.bottom; lv_draw_rect(&today_box_area, mask, ext->style_today_box, opa_scale); } diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index fcfddd6429ab..4b030bf4b23c 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -232,7 +232,7 @@ lv_coord_t lv_cont_get_fit_width(lv_obj_t * cont) { lv_style_t * style = lv_cont_get_style(cont); - return lv_obj_get_width(cont) - 2 * style->body.padding.hor; + return lv_obj_get_width(cont) - style->body.padding.left - style->body.padding.right; } /** @@ -244,7 +244,7 @@ lv_coord_t lv_cont_get_fit_height(lv_obj_t * cont) { lv_style_t * style = lv_cont_get_style(cont); - return lv_obj_get_width(cont) - 2 * style->body.padding.hor; + return lv_obj_get_width(cont) - style->body.padding.top - style->body.padding.bottom; } /********************** @@ -337,7 +337,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) switch(type) { case LV_LAYOUT_COL_L: - hpad_corr = style->body.padding.hor; + hpad_corr = style->body.padding.left; align = LV_ALIGN_IN_TOP_LEFT; break; case LV_LAYOUT_COL_M: @@ -345,7 +345,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) align = LV_ALIGN_IN_TOP_MID; break; case LV_LAYOUT_COL_R: - hpad_corr = -style->body.padding.hor; + hpad_corr = -style->body.padding.right; align = LV_ALIGN_IN_TOP_RIGHT; break; default: @@ -358,7 +358,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) * an unnecessary child change signals could be sent*/ lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ - lv_coord_t last_cord = style->body.padding.ver; + lv_coord_t last_cord = style->body.padding.top; LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -382,11 +382,11 @@ static void lv_cont_layout_row(lv_obj_t * cont) /*Adjust margin and get the alignment type*/ lv_align_t align; lv_style_t * style = lv_obj_get_style(cont); - lv_coord_t vpad_corr = style->body.padding.ver; + lv_coord_t vpad_corr; switch(type) { case LV_LAYOUT_ROW_T: - vpad_corr = style->body.padding.ver; + vpad_corr = style->body.padding.top; align = LV_ALIGN_IN_TOP_LEFT; break; case LV_LAYOUT_ROW_M: @@ -394,7 +394,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) align = LV_ALIGN_IN_LEFT_MID; break; case LV_LAYOUT_ROW_B: - vpad_corr = -style->body.padding.ver; + vpad_corr = -style->body.padding.bottom; align = LV_ALIGN_IN_BOTTOM_LEFT; break; default: @@ -408,7 +408,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ - lv_coord_t last_cord = style->body.padding.hor; + lv_coord_t last_cord = style->body.padding.left; LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; @@ -471,7 +471,7 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) lv_obj_t * child_tmp; /* Temporary child */ lv_style_t * style = lv_obj_get_style(cont); lv_coord_t w_obj = lv_obj_get_width(cont); - lv_coord_t act_y = style->body.padding.ver; + lv_coord_t act_y = style->body.padding.top; /* Disable child change action because the children will be moved a lot * an unnecessary child change signals could be sent*/ @@ -483,7 +483,7 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) child_rc = child_rs; /*Initially the the row starter and closer is the same*/ while(child_rs != NULL) { lv_coord_t h_row = 0; - lv_coord_t w_row = style->body.padding.hor * 2; /*The width is at least the left+right hpad*/ + lv_coord_t w_row = style->body.padding.left + style->body.padding.right; /*The width is at least the left+right hpad*/ uint32_t obj_num = 0; /*Find the row closer object and collect some data*/ @@ -532,7 +532,7 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) else { w_row -= style->body.padding.inner * obj_num; lv_coord_t new_opad = (w_obj - w_row) / (obj_num - 1); - lv_coord_t act_x = style->body.padding.hor; /*x init*/ + lv_coord_t act_x = style->body.padding.left; /*x init*/ child_tmp = child_rs; while(child_tmp != NULL) { if(lv_obj_get_hidden(child_tmp) == false && @@ -565,10 +565,11 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_coord_t w_tot = lv_obj_get_width(cont); lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); - uint16_t obj_row = (w_tot - (2 * style->body.padding.hor)) / (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ + uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / + (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ lv_coord_t x_ofs; if(obj_row > 1) { - x_ofs = w_obj + (w_tot - (2 * style->body.padding.hor) - (obj_row * w_obj)) / (obj_row - 1); + x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - (obj_row * w_obj)) / (obj_row - 1); } else { x_ofs = w_tot / 2 - w_obj / 2; } @@ -579,8 +580,8 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ - lv_coord_t act_x = style->body.padding.hor; - lv_coord_t act_y = style->body.padding.ver; + lv_coord_t act_x = style->body.padding.left; + lv_coord_t act_y = style->body.padding.top; uint16_t obj_cnt = 0; LV_LL_READ_BACK(cont->child_ll, child) { if(lv_obj_get_hidden(child) != false || @@ -596,7 +597,7 @@ static void lv_cont_layout_grid(lv_obj_t * cont) if(obj_cnt >= obj_row) { obj_cnt = 0; - act_x = style->body.padding.hor; + act_x = style->body.padding.left; act_y += y_ofs; } } @@ -624,17 +625,15 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) lv_area_t ori; lv_style_t * style = lv_obj_get_style(cont); lv_obj_t * child_i; - lv_coord_t hpad = style->body.padding.hor; - lv_coord_t vpad = style->body.padding.ver; lv_obj_t * par = lv_obj_get_parent(cont); lv_style_t * par_style = lv_obj_get_style(par); lv_area_t flood_area; lv_area_copy(&flood_area, &par->coords); - flood_area.x1 += par_style->body.padding.hor; - flood_area.x2 -= par_style->body.padding.hor; - flood_area.y1 += par_style->body.padding.ver; - flood_area.y2 -= par_style->body.padding.ver; + flood_area.x1 += par_style->body.padding.left; + flood_area.x2 -= par_style->body.padding.right; + flood_area.y1 += par_style->body.padding.top; + flood_area.y2 -= par_style->body.padding.bottom; /*Search the side coordinates of the children*/ lv_obj_get_coords(cont, &ori); @@ -656,10 +655,10 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) tight_area.y2 = LV_MATH_MAX(tight_area.y2, child_i->coords.y2); } - tight_area.x1 -= hpad; - tight_area.x2 += hpad; - tight_area.y1 -= vpad; - tight_area.y2 += vpad; + tight_area.x1 -= style->body.padding.left; + tight_area.x2 += style->body.padding.right; + tight_area.y1 -= style->body.padding.top; + tight_area.y2 += style->body.padding.bottom; } lv_area_t new_area; diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index bdb7f42357cd..a1b14f02f698 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -580,7 +580,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.color = sel_style->text.color; new_style.text.opa = sel_style->text.opa; lv_area_t area_arrow; - area_arrow.x2 = ddlist->coords.x2 - style->body.padding.hor; + area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right; area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0); area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; @@ -726,10 +726,12 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * lv_obj_t * ddlist = lv_obj_get_parent(scrl); if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + /*TODO review this*/ /* Because of the wider selected rectangle ext. size * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - if(scrl->ext_size < style->body.padding.hor) scrl->ext_size = style->body.padding.hor; + lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); + if(scrl->ext_size < hpad) scrl->ext_size = hpad; } else if(sign == LV_SIGNAL_RELEASED) { if(lv_indev_is_dragging(lv_indev_get_act()) == false) { @@ -822,7 +824,8 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_style_t * style = lv_obj_get_style(ddlist); lv_coord_t new_height; if(ext->opened) { /*Open the list*/ - if(ext->fix_height == 0) new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + 2 * style->body.padding.ver; + if(ext->fix_height == 0) new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + + style->body.padding.top + style->body.padding.bottom; else new_height = ext->fix_height; lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index f4a2c3805cb6..768e4c864d96 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -286,7 +286,8 @@ static bool lv_gauge_design(lv_obj_t * gauge, const lv_area_t * mask, lv_design_ lv_style_copy(&style_tmp, style); ext->lmeter.line_cnt = ext->label_count; /*Only to labels*/ style_tmp.line.width = style_tmp.line.width * 2; /*Ticker lines*/ - style_tmp.body.padding.hor = style_tmp.body.padding.hor * 2; /*Longer lines*/ + style_tmp.body.padding.left = style_tmp.body.padding.left * 2; /*Longer lines*/ + style_tmp.body.padding.right = style_tmp.body.padding.right * 2; /*Longer lines*/ gauge->style_p = &style_tmp; ancestor_design(gauge, mask, mode); /*To draw lines*/ @@ -348,7 +349,7 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); lv_style_t * style = lv_obj_get_style(gauge); lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); - lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.hor) - style->body.padding.inner; + lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; int16_t scale_angle = lv_lmeter_get_scale_angle(gauge); @@ -398,7 +399,7 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) lv_style_t * style = lv_gauge_get_style(gauge); lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); - lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.hor; + lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left; lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; uint16_t angle = lv_lmeter_get_scale_angle(gauge); @@ -455,10 +456,10 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) style_neddle_mid.body.radius = LV_RADIUS_CIRCLE; lv_area_t nm_cord; - nm_cord.x1 = x_ofs - style->body.padding.ver; - nm_cord.y1 = y_ofs - style->body.padding.ver; - nm_cord.x2 = x_ofs + style->body.padding.ver; - nm_cord.y2 = y_ofs + style->body.padding.ver; + nm_cord.x1 = x_ofs - style->body.padding.top; + nm_cord.y1 = y_ofs - style->body.padding.top; + nm_cord.x2 = x_ofs + style->body.padding.top; + nm_cord.y2 = y_ofs + style->body.padding.top; lv_draw_rect(&nm_cord, mask, &style_neddle_mid, lv_obj_get_opa_scale(gauge)); } diff --git a/lv_objx/lv_label.c b/lv_objx/lv_label.c index 7f0ba54aa729..682cdc5fd64b 100644 --- a/lv_objx/lv_label.c +++ b/lv_objx/lv_label.c @@ -646,10 +646,10 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ if(ext->body_draw) { lv_area_t bg; lv_obj_get_coords(label, &bg); - bg.x1 -= style->body.padding.hor; - bg.x2 += style->body.padding.hor; - bg.y1 -= style->body.padding.ver; - bg.y2 += style->body.padding.ver; + bg.x1 -= style->body.padding.left; + bg.x2 += style->body.padding.right; + bg.y1 -= style->body.padding.top; + bg.y2 += style->body.padding.bottom; lv_draw_rect(&bg, mask, style, lv_obj_get_opa_scale(label)); } @@ -717,8 +717,10 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { if(ext->body_draw) { lv_style_t * style = lv_label_get_style(label); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.hor); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.ver); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 718ce0843c58..7df6f13e0684 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -37,7 +37,6 @@ **********************/ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param); static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); -static void refr_btn_width(lv_obj_t * list); static void lv_list_btn_single_selected(lv_obj_t *btn); /********************** @@ -203,13 +202,6 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_obj_set_protect(liste, LV_PROTECT_PRESS_LOST); lv_obj_set_signal_cb(liste, lv_list_btn_signal); - /*Make the size adjustment*/ - lv_coord_t w = lv_obj_get_width(list); - lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(list)); - lv_coord_t pad_hor_tot = style->body.padding.hor + style_scrl->body.padding.hor; - w -= pad_hor_tot * 2; - - lv_obj_set_width(liste, w); #if LV_USE_IMG != 0 lv_obj_t * img = NULL; if(img_src) { @@ -221,7 +213,8 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, } #endif if(txt != NULL) { - lv_coord_t btn_hor_pad = ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.hor; + lv_coord_t btn_hor_pad = ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.left - + ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.right; lv_obj_t * label = lv_label_create(liste, NULL); lv_label_set_text(label, txt); lv_obj_set_click(label, false); @@ -231,7 +224,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, } #if LV_USE_GROUP /* If this is the first item to be added to the list and the list is - * focussed, select it */ + * focused, select it */ { lv_group_t *g = lv_obj_get_group(list); if(ext->size == 1 && lv_group_get_focused(g) == list) { @@ -957,27 +950,6 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para return res; } -static void refr_btn_width(lv_obj_t * list) -{ - lv_style_t * style = lv_list_get_style(list, LV_LIST_STYLE_BG); - lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(list)); - lv_coord_t w = lv_obj_get_width(list); - lv_coord_t btn_w = w - (style->body.padding.hor + style_scrl->body.padding.hor) * 2; - - lv_obj_t * btn = lv_list_get_prev_btn(list, NULL); - while(btn) { - /*Make the size adjustment for each buttons*/ - if(lv_obj_get_width(btn) != btn_w) { - lv_obj_set_width(btn, btn_w); - /*Set the label size to roll its text*/ - lv_obj_t * label = lv_list_get_btn_label(btn); - lv_obj_set_width(label, btn->coords.x2 - label->coords.x1); - lv_label_set_text(label, NULL); - } - btn = lv_list_get_prev_btn(list, btn); - } -} - /** * Make a single button selected in the list, deselect others, should be called in list btns call back. * @param btn pointer to the currently pressed list btn object diff --git a/lv_objx/lv_lmeter.c b/lv_objx/lv_lmeter.c index c912f9d3d11c..11479d8dc618 100644 --- a/lv_objx/lv_lmeter.c +++ b/lv_objx/lv_lmeter.c @@ -265,7 +265,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig #endif lv_coord_t r_out = lv_obj_get_width(lmeter) / 2; - lv_coord_t r_in = r_out - style->body.padding.hor; + lv_coord_t r_in = r_out - style->body.padding.left; if(r_in < 1) r_in = 1; lv_coord_t x_ofs = lv_obj_get_width(lmeter) / 2 + lmeter->coords.x1; diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index f3b34fb22b32..9b91e4c4b3f2 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -491,7 +491,7 @@ static void mbox_realign(lv_obj_t * mbox) lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); lv_style_t * style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BG); - lv_coord_t w = lv_obj_get_width(mbox) - 2 * style->body.padding.hor; + lv_coord_t w = lv_obj_get_width(mbox) - style->body.padding.left - style->body.padding.right; if(ext->text) { lv_obj_set_width(ext->text, w); @@ -501,7 +501,8 @@ static void mbox_realign(lv_obj_t * mbox) lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); - lv_obj_set_size(ext->btnm, w, font_h + 2 * btn_rel_style->body.padding.ver + 2 * btn_bg_style->body.padding.ver); + lv_obj_set_size(ext->btnm, w, font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom + + btn_bg_style->body.padding.top + btn_bg_style->body.padding.bottom); } } diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index dcd5ee0109f4..3ed0727486cb 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -331,7 +331,9 @@ lv_coord_t lv_page_get_fit_width(lv_obj_t * page) lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - return lv_obj_get_width(page) - 2 * (bg_style->body.padding.hor + scrl_style->body.padding.hor); + return lv_obj_get_width(page) - + bg_style->body.padding.left - bg_style->body.padding.right - + scrl_style->body.padding.left - scrl_style->body.padding.right; } /** @@ -344,7 +346,9 @@ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - return lv_obj_get_height(page) - 2 * (bg_style->body.padding.ver + scrl_style->body.padding.ver); + return lv_obj_get_height(page) - + bg_style->body.padding.top - bg_style->body.padding.bottom - + scrl_style->body.padding.top - scrl_style->body.padding.bottom; } /** @@ -433,15 +437,15 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) if((obj_h <= page_h && top_err > 0) || (obj_h > page_h && top_err < bot_err)) { /*Calculate a new position and let some space above*/ - scrlable_y = -(obj_y - style_scrl->body.padding.ver - style->body.padding.ver); - scrlable_y += style_scrl->body.padding.ver; + scrlable_y = -(obj_y - style_scrl->body.padding.top - style->body.padding.top); + scrlable_y += style_scrl->body.padding.top; } /*Out of the page on the bottom*/ else if((obj_h <= page_h && bot_err > 0) || (obj_h > page_h && top_err >= bot_err)) { /*Calculate a new position and let some space below*/ - scrlable_y = -(obj_y + style_scrl->body.padding.ver + style->body.padding.ver); - scrlable_y -= style_scrl->body.padding.ver; + scrlable_y = -(obj_y + style_scrl->body.padding.bottom+ style->body.padding.bottom); + scrlable_y -= style_scrl->body.padding.bottom; scrlable_y += page_h - obj_h; } @@ -454,19 +458,19 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_coord_t left_err = -(scrlable_x + obj_x); lv_coord_t right_err = scrlable_x + obj_x + obj_w - page_w; - /*Out of the page on the top*/ + /*Out of the page on the left*/ if((obj_w <= page_w && left_err > 0) || (obj_w > page_w && left_err < right_err)) { /*Calculate a new position and let some space above*/ - scrlable_x = -(obj_x - style_scrl->body.padding.hor- style->body.padding.hor); - scrlable_x += style_scrl->body.padding.hor; + scrlable_x = -(obj_x - style_scrl->body.padding.left- style->body.padding.left); + scrlable_x += style_scrl->body.padding.left; } - /*Out of the page on the bottom*/ + /*Out of the page on the rigth*/ else if((obj_w <= page_w && right_err > 0) || (obj_w > page_w && left_err >= right_err)) { /*Calculate a new position and let some space below*/ - scrlable_x = -(obj_x + style_scrl->body.padding.hor + style->body.padding.hor); - scrlable_x -= style_scrl->body.padding.hor; + scrlable_x = -(obj_x + style_scrl->body.padding.right + style->body.padding.right); + scrlable_x -= style_scrl->body.padding.right; scrlable_x += page_w - obj_w; } @@ -766,10 +770,10 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) /*Reposition the child to take padding into account*/ lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - tmp->coords.x1 += style->body.padding.hor; - tmp->coords.x2 += style->body.padding.hor; - tmp->coords.y1 += style->body.padding.ver; - tmp->coords.y2 += style->body.padding.ver; + tmp->coords.x1 += style->body.padding.left; + tmp->coords.x2 += style->body.padding.left; + tmp->coords.y1 += style->body.padding.top; + tmp->coords.y2 += style->body.padding.top; lv_obj_set_parent(tmp, ext->scrl); } else { @@ -796,8 +800,8 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { /*Ensure ext. size for the scrollbars if they are out of the page*/ - if(page->ext_size < (-ext->sb.style->body.padding.hor)) page->ext_size = -ext->sb.style->body.padding.hor; - if(page->ext_size < (-ext->sb.style->body.padding.ver)) page->ext_size = -ext->sb.style->body.padding.ver; + if(page->ext_size < (-ext->sb.style->body.padding.right)) page->ext_size = -ext->sb.style->body.padding.right; + if(page->ext_size < (-ext->sb.style->body.padding.bottom)) page->ext_size = -ext->sb.style->body.padding.bottom; } else if(sign == LV_SIGNAL_CONTROLL) { uint32_t c = *((uint32_t *) param); @@ -863,8 +867,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi lv_area_t * ori_coords = (lv_area_t *) param; lv_coord_t diff_x = scrl->coords.x1 - ori_coords->x1; lv_coord_t diff_y = scrl->coords.y1 - ori_coords->y1; - lv_coord_t hpad = page_style->body.padding.hor; - lv_coord_t vpad = page_style->body.padding.ver; + lv_coord_t hpad = page_style->body.padding.left + page_style->body.padding.right; + lv_coord_t vpad = page_style->body.padding.top + page_style->body.padding.bottom; lv_obj_t * page_parent = lv_obj_get_parent(page); lv_indev_t * indev = lv_indev_get_act(); @@ -876,10 +880,10 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi * and the scrollable is in a corner. It will enable the scroll propagation only when a new scroll begins and not * when the scrollable is already being scrolled.*/ if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && lv_indev_is_dragging(indev) == false) { - if(((drag_vect.y > 0 && scrl_coords.y1 == page_coords.y1 + vpad) || - (drag_vect.y < 0 && scrl_coords.y2 == page_coords.y2 - vpad)) && - ((drag_vect.x > 0 && scrl_coords.x1 == page_coords.x1 + hpad) || - (drag_vect.x < 0 && scrl_coords.x2 == page_coords.x2 - hpad))) { + if(((drag_vect.y > 0 && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) || + (drag_vect.y < 0 && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) && + ((drag_vect.x > 0 && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) || + (drag_vect.x < 0 && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) { if(lv_obj_get_parent(page_parent) != NULL) { /*Do not propagate the scroll to a screen*/ page_ext->scroll_prop_ip = 1; @@ -888,9 +892,9 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } /*scrollable width smaller then page width? -> align to left*/ - if(lv_area_get_width(&scrl_coords) + 2 * hpad <= lv_area_get_width(&page_coords)) { - if(scrl_coords.x1 != page_coords.x1 + hpad) { - new_x = hpad; + if(lv_area_get_width(&scrl_coords) + hpad <= lv_area_get_width(&page_coords)) { + if(scrl_coords.x1 != page_coords.x1 + page_style->body.padding.left) { + new_x = page_style->body.padding.left; refr_x = true; } } else { @@ -902,8 +906,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } } /*The edges of the scrollable can not be in the page (minus hpad) */ - else if(scrl_coords.x2 < page_coords.x2 - hpad) { - new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) - hpad; /* Right align */ + else if(scrl_coords.x2 < page_coords.x2 - page_style->body.padding.right) { + new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) - page_style->body.padding.right; /* Right align */ refr_x = true; if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && @@ -912,7 +916,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi page_ext->edge_flash.right_ip = 1; } } - else if(scrl_coords.x1 > page_coords.x1 + hpad) { + else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) { new_x = hpad; /*Left align*/ refr_x = true; if(page_ext->edge_flash.enabled && @@ -925,9 +929,9 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } /*scrollable height smaller then page height? -> align to left*/ - if(lv_area_get_height(&scrl_coords) + 2 * vpad <= lv_area_get_height(&page_coords)) { - if(scrl_coords.y1 != page_coords.y1 + vpad) { - new_y = vpad; + if(lv_area_get_height(&scrl_coords) + vpad <= lv_area_get_height(&page_coords)) { + if(scrl_coords.y1 != page_coords.y1 + page_style->body.padding.top) { + new_y = page_style->body.padding.top; refr_y = true; } } else { @@ -939,8 +943,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } } /*The edges of the scrollable can not be in the page (minus vpad) */ - else if(scrl_coords.y2 < page_coords.y2 - vpad) { - new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) - vpad; /* Bottom align */ + else if(scrl_coords.y2 < page_coords.y2 - page_style->body.padding.bottom) { + new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) - page_style->body.padding.bottom; /* Bottom align */ refr_y = true; if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && @@ -949,8 +953,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi page_ext->edge_flash.bottom_ip = 1; } } - else if(scrl_coords.y1 > page_coords.y1 + vpad) { - new_y = vpad; /*Top align*/ + else if(scrl_coords.y1 > page_coords.y1 + page_style->body.padding.top) { + new_y = page_style->body.padding.top; /*Top align*/ refr_y = true; if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && @@ -1044,8 +1048,6 @@ static void lv_page_sb_refresh(lv_obj_t * page) lv_coord_t size_tmp; lv_coord_t scrl_w = lv_obj_get_width(scrl); lv_coord_t scrl_h = lv_obj_get_height(scrl); - lv_coord_t hpad = style->body.padding.hor; - lv_coord_t vpad = style->body.padding.ver; lv_coord_t obj_w = lv_obj_get_width(page); lv_coord_t obj_h = lv_obj_get_height(page); @@ -1053,8 +1055,8 @@ static void lv_page_sb_refresh(lv_obj_t * page) * else: * - horizontal and vertical scrollbars can overlap on the corners * - if the page has radius the scrollbar can be out of the radius */ - lv_coord_t sb_hor_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.hor); - lv_coord_t sb_ver_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.ver); + lv_coord_t sb_hor_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right); + lv_coord_t sb_ver_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_OFF) return; @@ -1092,37 +1094,37 @@ static void lv_page_sb_refresh(lv_obj_t * page) } /*Horizontal scrollbar*/ - if(scrl_w <= obj_w - 2 * hpad) { /*Full sized scroll bar*/ + if(scrl_w <= obj_w - style->body.padding.left - style->body.padding.right) { /*Full sized scroll bar*/ lv_area_set_width(&ext->sb.hor_area, obj_w - 2 * sb_hor_pad); - lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.ver); + lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0; } else { - size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + 2 * hpad); + size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + style->body.padding.left + style->body.padding.right); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; lv_area_set_width(&ext->sb.hor_area, size_tmp); lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad + - (-(lv_obj_get_x(scrl) - hpad) * (obj_w - size_tmp - 2 * sb_hor_pad)) / - (scrl_w + 2 * hpad - obj_w), - obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.ver); + (-(lv_obj_get_x(scrl) - style->body.padding.left) * (obj_w - size_tmp - 2 * sb_hor_pad)) / + (scrl_w + style->body.padding.left + style->body.padding.right - obj_w), + obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; } /*Vertical scrollbar*/ - if(scrl_h <= obj_h - 2 * vpad) { /*Full sized scroll bar*/ + if(scrl_h <= obj_h - style->body.padding.top - style->body.padding.bottom) { /*Full sized scroll bar*/ lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad); - lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.hor, sb_ver_pad); + lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; } else { - size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + 2 * vpad); + size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + style->body.padding.top + style->body.padding.bottom); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; lv_area_set_height(&ext->sb.ver_area, size_tmp); - lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.hor, + lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom, sb_ver_pad + - (-(lv_obj_get_y(scrl) - vpad) * (obj_h - size_tmp - 2 * sb_ver_pad)) / - (scrl_h + 2 * vpad - obj_h)); + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * (obj_h - size_tmp - 2 * sb_ver_pad)) / + (scrl_h + style->body.padding.top + ext->sb.style->body.padding.bottom - obj_h)); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1; } diff --git a/lv_objx/lv_preload.c b/lv_objx/lv_preload.c index 663c7ac7a1c6..8c5e53ffc783 100644 --- a/lv_objx/lv_preload.c +++ b/lv_objx/lv_preload.c @@ -347,7 +347,7 @@ static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_des lv_style_t * style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); if(style->body.border.width > 0) { lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(preload), lv_obj_get_height(preload))) / 2; - r -= LV_MATH_MIN(style->body.padding.hor, style->body.padding.ver); + r -= LV_MATH_MIN(style->body.padding.left, style->body.padding.top); lv_coord_t x = preload->coords.x1 + lv_obj_get_width(preload) / 2; lv_coord_t y = preload->coords.y1 + lv_obj_get_height(preload) / 2; diff --git a/lv_objx/lv_slider.c b/lv_objx/lv_slider.c index 5d3fc145e4b6..fe16c8344101 100644 --- a/lv_objx/lv_slider.c +++ b/lv_objx/lv_slider.c @@ -259,25 +259,29 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig lv_area_copy(&area_bg, &slider->coords); /*Be sure at least LV_SLIDER_SIZE_MIN size will remain*/ - lv_coord_t pad_ver_bg = style_bg->body.padding.ver; - lv_coord_t pad_hor_bg = style_bg->body.padding.hor; - if(pad_ver_bg * 2 + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { - pad_ver_bg = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + lv_coord_t pad_top_bg = style_bg->body.padding.top; + lv_coord_t pad_bottom_bg = style_bg->body.padding.bottom; + lv_coord_t pad_left_bg = style_bg->body.padding.left; + lv_coord_t pad_right_bg = style_bg->body.padding.right; + if(pad_top_bg + pad_bottom_bg + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { + pad_top_bg = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_bottom_bg = pad_top_bg; } - if(pad_hor_bg * 2 + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { - pad_hor_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + if(pad_left_bg + pad_right_bg + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { + pad_left_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_right_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; } if(ext->knob_in) { /*Enable extra size if the knob is inside */ - area_bg.x1 += pad_hor_bg; - area_bg.x2 -= pad_hor_bg; - area_bg.y1 += pad_hor_bg; - area_bg.y2 -= pad_hor_bg; + area_bg.x1 += pad_left_bg; + area_bg.x2 -= pad_right_bg; + area_bg.y1 += pad_top_bg; + area_bg.y2 -= pad_bottom_bg; } else { /*Let space only in the perpendicular directions*/ - area_bg.x1 += slider_w < slider_h ? pad_hor_bg : 0; /*Pad only for vertical slider*/ - area_bg.x2 -= slider_w < slider_h ? pad_hor_bg : 0; /*Pad only for vertical slider*/ - area_bg.y1 += slider_w > slider_h ? pad_ver_bg : 0; /*Pad only for horizontal slider*/ - area_bg.y2 -= slider_w > slider_h ? pad_ver_bg : 0; /*Pad only for horizontal slider*/ + area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/ + area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/ + area_bg.y1 += slider_w > slider_h ? pad_top_bg : 0; /*Pad only for horizontal slider*/ + area_bg.y2 -= slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/ } #if LV_USE_GROUP == 0 @@ -300,19 +304,23 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig lv_area_copy(&area_indic, &area_bg); /*Be sure at least ver pad/hor pad width indicator will remain*/ - lv_coord_t pad_ver_indic = style_indic->body.padding.ver; - lv_coord_t pad_hor_indic = style_indic->body.padding.hor; - if(pad_ver_indic * 2 + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { - pad_ver_indic = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + lv_coord_t pad_top_indic = style_indic->body.padding.top; + lv_coord_t pad_bottom_indic = style_indic->body.padding.bottom; + lv_coord_t pad_left_indic = style_indic->body.padding.left; + lv_coord_t pad_right_indic = style_indic->body.padding.right; + if(pad_top_indic + pad_bottom_indic + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { + pad_top_indic = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_bottom_indic = pad_top_indic; } - if(pad_hor_indic * 2 + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { - pad_hor_indic = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + if(pad_left_indic + pad_right_indic + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { + pad_left_indic = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_right_indic = pad_left_indic; } - area_indic.x1 += pad_hor_indic; - area_indic.x2 -= pad_hor_indic; - area_indic.y1 += pad_ver_indic; - area_indic.y2 -= pad_ver_indic; + area_indic.x1 += pad_left_indic; + area_indic.x2 -= pad_right_indic; + area_indic.y1 += pad_top_indic; + area_indic.y2 -= pad_bottom_indic; lv_coord_t cur_value = lv_slider_get_value(slider); lv_coord_t min_value = lv_slider_get_min_value(slider); @@ -504,7 +512,11 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par lv_coord_t x = LV_MATH_MIN(w / 2 + 1 + shadow_w, h / 2 + 1 + shadow_w); if(slider->ext_size < x) slider->ext_size = x; } else { - lv_coord_t pad = LV_MATH_MIN(style->body.padding.hor, style->body.padding.ver); + lv_coord_t pad = 0; + pad = LV_MATH_MIN(pad, style->body.padding.top); + pad = LV_MATH_MIN(pad, style->body.padding.bottom); + pad = LV_MATH_MIN(pad, style->body.padding.left); + pad = LV_MATH_MIN(pad, style->body.padding.right); if(pad < 0) pad = -pad; if(slider->ext_size < pad) slider->ext_size = pad; diff --git a/lv_objx/lv_ta.c b/lv_objx/lv_ta.c index 5ab669213c02..206e2aa76688 100644 --- a/lv_objx/lv_ta.c +++ b/lv_objx/lv_ta.c @@ -504,13 +504,13 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Check the top*/ lv_coord_t font_h = lv_font_get_height(font_p); if(lv_obj_get_y(label_par) + cur_pos.y < 0) { - lv_obj_set_y(label_par, - cur_pos.y + style->body.padding.ver); + lv_obj_set_y(label_par, - cur_pos.y + style->body.padding.top); } /*Check the bottom*/ - if(label_cords.y1 + cur_pos.y + font_h + style->body.padding.ver > ta_cords.y2) { + if(label_cords.y1 + cur_pos.y + font_h + style->body.padding.bottom > ta_cords.y2) { lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + - font_h + 2 * style->body.padding.ver)); + font_h + style->body.padding.top + style->body.padding.bottom)); } /*Check the left (use the font_h as general unit)*/ if(lv_obj_get_x(label_par) + cur_pos.x < font_h) { @@ -518,9 +518,9 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) } /*Check the right (use the font_h as general unit)*/ - if(label_cords.x1 + cur_pos.x + font_h + style->body.padding.hor > ta_cords.x2) { + if(label_cords.x1 + cur_pos.x + font_h + style->body.padding.right > ta_cords.x2) { lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + - font_h + 2 * style->body.padding.hor)); + font_h + style->body.padding.left + style->body.padding.right)); } ext->cursor.valid_x = cur_pos.x; @@ -619,10 +619,11 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) ext->one_line = 1; lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); - lv_obj_set_height(ta, font_h + (style_ta->body.padding.ver + style_scrl->body.padding.ver) * 2); + lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + + style_scrl->body.padding.top + style_scrl->body.padding.bottom); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND); if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.hor, style_ta->body.padding.ver); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); } else { lv_style_t * style_ta = lv_obj_get_style(ta); @@ -632,7 +633,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK); lv_obj_set_height(ta, LV_TA_DEF_HEIGHT); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.hor, style_ta->body.padding.ver); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); } placeholder_update(ta); @@ -1056,8 +1057,8 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ char letter_buf[8] = {0}; memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); #endif - cur_area.x1 += cur_style.body.padding.hor; - cur_area.y1 += cur_style.body.padding.ver; + cur_area.x1 += cur_style.body.padding.left; + cur_area.y1 += cur_style.body.padding.top; lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0); } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { @@ -1101,15 +1102,17 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /*In one line mode refresh the Text Area height because 'vpad' can modify it*/ lv_style_t * style_label = lv_obj_get_style(ext->label); lv_coord_t font_h = lv_font_get_height(style_label->text.font); - lv_obj_set_height(ta, font_h + (style_ta->body.padding.ver + style_scrl->body.padding.ver) * 2); + lv_obj_set_height(ta, font_h + + style_ta->body.padding.top + style_ta->body.padding.bottom + + style_scrl->body.padding.top + style_scrl->body.padding.bottom); } else { /*In not one line mode refresh the Label width because 'hpad' can modify it*/ - lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); - lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); /*Be sure the Label is in the correct position*/ + lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.right); /*Be sure the Label is in the correct position*/ if(ext->placeholder) { - lv_obj_set_width(ext->placeholder, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.hor, style_scrl->body.padding.ver); /*Be sure the placeholder is in the correct position*/ + lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); /*Be sure the placeholder is in the correct position*/ } } lv_label_set_text(ext->label, NULL); @@ -1122,8 +1125,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); - lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); @@ -1135,8 +1138,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_width(ext->placeholder, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/ refr_cursor_area(ta); @@ -1224,8 +1227,8 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_width(ext->label, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); - lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); @@ -1360,8 +1363,10 @@ static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) style_res->body.shadow.width = 0; style_res->body.radius = 0; style_res->body.opa = LV_OPA_COVER; - style_res->body.padding.hor = 0; - style_res->body.padding.ver = 0; + style_res->body.padding.left = 0; + style_res->body.padding.right = 0; + style_res->body.padding.top = 0; + style_res->body.padding.bottom = 0; style_res->line.width = 1; style_res->body.opa = LV_OPA_COVER; } @@ -1423,26 +1428,26 @@ static void refr_cursor_area(lv_obj_t * ta) lv_area_t cur_area; if(ext->cursor.type == LV_CURSOR_LINE) { - cur_area.x1 = letter_pos.x + cur_style.body.padding.hor - (cur_style.line.width >> 1) - (cur_style.line.width & 0x1); - cur_area.y1 = letter_pos.y + cur_style.body.padding.ver; - cur_area.x2 = letter_pos.x + cur_style.body.padding.hor + (cur_style.line.width >> 1); - cur_area.y2 = letter_pos.y + cur_style.body.padding.ver + letter_h; + cur_area.x1 = letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - (cur_style.line.width & 0x1); + cur_area.y1 = letter_pos.y + cur_style.body.padding.top; + cur_area.x2 = letter_pos.x + cur_style.body.padding.right + (cur_style.line.width >> 1); + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; } else if(ext->cursor.type == LV_CURSOR_BLOCK) { - cur_area.x1 = letter_pos.x - cur_style.body.padding.hor; - cur_area.y1 = letter_pos.y - cur_style.body.padding.ver; - cur_area.x2 = letter_pos.x + cur_style.body.padding.hor + letter_w; - cur_area.y2 = letter_pos.y + cur_style.body.padding.ver + letter_h; + cur_area.x1 = letter_pos.x - cur_style.body.padding.left; + cur_area.y1 = letter_pos.y - cur_style.body.padding.top; + cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w; + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { - cur_area.x1 = letter_pos.x - cur_style.body.padding.hor; - cur_area.y1 = letter_pos.y - cur_style.body.padding.ver; - cur_area.x2 = letter_pos.x + cur_style.body.padding.hor + letter_w; - cur_area.y2 = letter_pos.y + cur_style.body.padding.ver + letter_h; + cur_area.x1 = letter_pos.x - cur_style.body.padding.left; + cur_area.y1 = letter_pos.y - cur_style.body.padding.top; + cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w; + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) { - cur_area.x1 = letter_pos.x + cur_style.body.padding.hor; - cur_area.y1 = letter_pos.y + cur_style.body.padding.ver + letter_h - (cur_style.line.width >> 1); - cur_area.x2 = letter_pos.x + cur_style.body.padding.hor + letter_w; - cur_area.y2 = letter_pos.y + cur_style.body.padding.ver + letter_h + (cur_style.line.width >> 1) + (cur_style.line.width & 0x1); + cur_area.x1 = letter_pos.x + cur_style.body.padding.left; + cur_area.y1 = letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1); + cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w; + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + (cur_style.line.width >> 1) + (cur_style.line.width & 0x1); } /*Save the new area*/ @@ -1478,13 +1483,15 @@ static void placeholder_update(lv_obj_t * ta) /*Be sure the main label and the placeholder has the same coordinates*/ lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.hor, style_scrl->body.padding.ver); - lv_obj_set_pos(ext->label, style_scrl->body.padding.hor, style_scrl->body.padding.ver); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); - lv_obj_set_width(ext->placeholder, lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor); + lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); lv_obj_set_hidden(ext->placeholder, false); } - else lv_obj_set_hidden(ext->placeholder, true); + else { + lv_obj_set_hidden(ext->placeholder, true); + } } static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source) diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index ee0a87b30d10..8f003c0202bb 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -623,14 +623,14 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ uint16_t row; uint16_t cell = 0; - cell_area.y2 = table->coords.y1 + bg_style->body.padding.ver; + cell_area.y2 = table->coords.y1 + bg_style->body.padding.top; for(row = 0; row < ext->row_cnt; row++) { h_row = get_row_height(table, row); cell_area.y1 = cell_area.y2; cell_area.y2 = cell_area.y1 + h_row; - cell_area.x2 = table->coords.x1 + bg_style->body.padding.hor; + cell_area.x2 = table->coords.x1 + bg_style->body.padding.left; for(col = 0; col < ext->col_cnt; col++) { @@ -664,10 +664,10 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ if(ext->cell_data[cell]) { - txt_area.x1 = cell_area.x1 + cell_style->body.padding.hor; - txt_area.x2 = cell_area.x2 - cell_style->body.padding.hor; - txt_area.y1 = cell_area.y1 + cell_style->body.padding.ver; - txt_area.y2 = cell_area.y2 - cell_style->body.padding.ver; + txt_area.x1 = cell_area.x1 + cell_style->body.padding.left; + txt_area.x2 = cell_area.x2 - cell_style->body.padding.right; + txt_area.y1 = cell_area.y1 + cell_style->body.padding.top; + txt_area.y2 = cell_area.y2 - cell_style->body.padding.bottom; /*Align the content to the middle if not cropped*/ if(format.crop == 0) { txt_flags = LV_TXT_FLAG_NONE; @@ -792,8 +792,8 @@ static void refr_size(lv_obj_t * table) lv_style_t * bg_style = lv_obj_get_style(table); - w += bg_style->body.padding.hor * 2; - h += bg_style->body.padding.ver * 2; + w += bg_style->body.padding.left + bg_style->body.padding.right; + h += bg_style->body.padding.top + bg_style->body.padding.bottom; lv_obj_set_size(table, w + 1, h + 1); lv_obj_invalidate(table); @@ -809,7 +809,8 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) uint16_t row_start = row_id * ext->col_cnt; uint16_t cell; uint16_t col; - lv_coord_t h_max = lv_font_get_height(ext->cell_style[0]->text.font) + 2 * ext->cell_style[0]->body.padding.ver; + lv_coord_t h_max = lv_font_get_height(ext->cell_style[0]->text.font) + + ext->cell_style[0]->body.padding.top + ext->cell_style[0]->body.padding.bottom; for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col ++) { if(ext->cell_data[cell] != NULL) { @@ -834,16 +835,20 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) /*With text crop assume 1 line*/ if(format.crop) { - h_max = LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + 2 * cell_style->body.padding.ver, h_max); + h_max = LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + + cell_style->body.padding.top + cell_style->body.padding.bottom, + h_max); } /*Without text crop calculate the height of the text in the cell*/ else { - txt_w -= 2 * cell_style->body.padding.hor; + txt_w -= cell_style->body.padding.left + cell_style->body.padding.right; lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, cell_style->text.letter_space, cell_style->text.line_space, txt_w, LV_TXT_FLAG_NONE); - h_max = LV_MATH_MAX(txt_size.y + 2 * cell_style->body.padding.ver, h_max); + h_max = LV_MATH_MAX(txt_size.y + + cell_style->body.padding.top + cell_style->body.padding.bottom, + h_max); cell += col_merge; col += col_merge; } diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index 2be276df433d..df69fe6cc95a 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -233,9 +233,10 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) /*Modify the indicator size*/ lv_style_t * style_tabs = lv_obj_get_style(ext->btns); - lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - 2 * style_tabs->body.padding.hor) / ext->tab_cnt; + lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - + style_tabs->body.padding.left - style_tabs->body.padding.right) / ext->tab_cnt; lv_obj_set_width(ext->indic, indic_width); - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + style_tabs->body.padding.inner * ext->tab_cur + style_tabs->body.padding.hor); + lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + style_tabs->body.padding.inner * ext->tab_cur + style_tabs->body.padding.left); /*Set the first btn as active*/ if(ext->tab_cnt == 1) { @@ -275,7 +276,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) ext->tab_cur = id; - lv_coord_t cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + style->body.padding.hor); + lv_coord_t cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + style->body.padding.left); if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->content, cont_x); } else { @@ -300,7 +301,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) /*Move the indicator*/ lv_coord_t indic_width = lv_obj_get_width(ext->indic); lv_style_t * tabs_style = lv_obj_get_style(ext->btns); - lv_coord_t indic_x = indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.hor; + lv_coord_t indic_x = indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->indic, indic_x); @@ -745,7 +746,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_style_t * indic_style = lv_obj_get_style(ext->indic); lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * (indic_width + tabs_style->body.padding.inner)) / lv_obj_get_width(tabview); - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + tabs_style->body.padding.inner * ext->tab_cur + indic_style->body.padding.hor - p); + lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + tabs_style->body.padding.inner * ext->tab_cur + indic_style->body.padding.left - p); } } @@ -833,13 +834,13 @@ static void tabview_realign(lv_obj_t * tabview) /*Set the indicator widths*/ lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - - 2 * style_btn_bg->body.padding.hor) / ext->tab_cnt; + style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / ext->tab_cnt; lv_obj_set_width(ext->indic, indic_width); /*Set the tabs height*/ lv_coord_t btns_height = lv_font_get_height(style_btn_rel->text.font) + - 2 * style_btn_rel->body.padding.ver + - 2 * style_btn_bg->body.padding.ver; + style_btn_rel->body.padding.top + style_btn_rel->body.padding.bottom + + style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; lv_obj_set_height(ext->btns, btns_height); lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index 6bc38509cb31..3f183a87403a 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -381,7 +381,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_page_start_edge_flash(tileview); } - lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.ver); + lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } } if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) { @@ -394,7 +394,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void } } - lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.ver); + lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } if(ext->drag_left_en == 0) { if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) { @@ -405,7 +405,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_page_start_edge_flash(tileview); } - lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.hor); + lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left); } } if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) { @@ -418,12 +418,12 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void } } - lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.hor); + lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.top); } /*Apply the drag constraints*/ - if(ext->drag_ver == 0) lv_obj_set_y(scrl, - ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.ver); - if(ext->drag_hor == 0) lv_obj_set_x(scrl, - ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.hor); + if(ext->drag_ver == 0) lv_obj_set_y(scrl, - ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top); + if(ext->drag_hor == 0) lv_obj_set_x(scrl, - ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left); } } return res; diff --git a/lv_objx/lv_win.c b/lv_objx/lv_win.c index 59b13e4906d5..9c9c4278ed8b 100644 --- a/lv_objx/lv_win.c +++ b/lv_objx/lv_win.c @@ -399,7 +399,7 @@ lv_coord_t lv_win_get_width(lv_obj_t * win) lv_obj_t * scrl = lv_page_get_scrl(ext->page); lv_style_t * style_scrl = lv_obj_get_style(scrl); - return lv_obj_get_width(scrl) - 2 * style_scrl->body.padding.hor; + return lv_obj_get_width(scrl) - style_scrl->body.padding.left - style_scrl->body.padding.right; } /** @@ -533,7 +533,8 @@ static void lv_win_realign(lv_obj_t * win) if(ext->page == NULL || ext->header == NULL || ext->title == NULL) return; lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER); - lv_obj_set_size(ext->header, lv_obj_get_width(win), ext->btn_size + 2 * header_style->body.padding.ver); + lv_obj_set_size(ext->header, lv_obj_get_width(win), ext->btn_size + + header_style->body.padding.top + header_style->body.padding.bottom); bool first_btn = true; lv_obj_t * btn; @@ -544,7 +545,7 @@ static void lv_win_realign(lv_obj_t * win) while(btn != NULL) { lv_obj_set_size(btn, ext->btn_size, ext->btn_size); if(first_btn) { - lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, - header_style->body.padding.hor, 0); + lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, - header_style->body.padding.right, 0); first_btn = false; } else { lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, - header_style->body.padding.inner, 0); @@ -554,7 +555,7 @@ static void lv_win_realign(lv_obj_t * win) } - lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.hor, 0); + lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.left, 0); lv_obj_set_pos(ext->header, 0, 0); diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 5d163412e6a9..41e44807da60 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -75,8 +75,10 @@ static void basic_init(void) def.body.main_color = LV_COLOR_HEX3(0x222); def.body.grad_color = LV_COLOR_HEX3(0x222); def.body.radius = 0; - def.body.padding.hor = LV_DPI / 8; - def.body.padding.ver = LV_DPI / 8; + def.body.padding.left = LV_DPI / 8; + def.body.padding.right = LV_DPI / 8; + def.body.padding.top = LV_DPI / 8; + def.body.padding.bottom = LV_DPI / 8; def.body.padding.inner = LV_DPI / 8; def.body.border.color = LV_COLOR_SILVER; def.body.border.width = 1; @@ -125,8 +127,10 @@ static void basic_init(void) sb.body.border.width = 1; sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.padding.hor = 1; - sb.body.padding.ver = 1; + sb.body.padding.left = 1; + sb.body.padding.right = 1; + sb.body.padding.top = 1; + sb.body.padding.bottom = 1; sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ theme.style.bg = &bg; @@ -151,8 +155,10 @@ static void btn_init(void) btn_rel.body.border.width = 2; btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); btn_rel.body.border.opa = LV_OPA_80; - btn_rel.body.padding.hor = LV_DPI / 4; - btn_rel.body.padding.ver = LV_DPI / 6; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 6; + btn_rel.body.padding.bottom = LV_DPI / 6; btn_rel.body.padding.inner = LV_DPI / 10; btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); btn_rel.text.font = _font; @@ -235,8 +241,10 @@ static void bar_init(void) bar_bg.body.border.width = 2; bar_bg.body.border.color = LV_COLOR_SILVER; bar_bg.body.border.opa = LV_OPA_20; - bar_bg.body.padding.hor = 0; - bar_bg.body.padding.ver = LV_DPI / 10; + bar_bg.body.padding.left = 0; + bar_bg.body.padding.right = 0; + bar_bg.body.padding.top = LV_DPI / 10; + bar_bg.body.padding.bottom = LV_DPI / 10; bar_bg.body.padding.inner = 0; lv_style_copy(&bar_indic, &def); @@ -244,8 +252,10 @@ static void bar_init(void) bar_indic.body.border.width = 2; bar_indic.body.border.color = LV_COLOR_SILVER; bar_indic.body.border.opa = LV_OPA_70; - bar_indic.body.padding.hor = 0; - bar_indic.body.padding.ver = 0; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; + bar_indic.body.padding.bottom = 0; bar_indic.body.shadow.width = LV_DPI / 20; bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); @@ -327,8 +337,10 @@ static void sw_init(void) static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; - sw_bg.body.padding.ver = -2 ; - sw_bg.body.padding.hor = -2 ; + sw_bg.body.padding.left = -2 ; + sw_bg.body.padding.right = -2 ; + sw_bg.body.padding.top = -2 ; + sw_bg.body.padding.bottom = -2 ; sw_bg.body.main_color = LV_COLOR_HEX3(0x666); sw_bg.body.grad_color = LV_COLOR_HEX3(0x999); sw_bg.body.border.width = 2; @@ -336,8 +348,10 @@ static void sw_init(void) lv_style_copy(&sw_indic, &bar_indic); sw_indic.body.shadow .width = LV_DPI / 20; - sw_indic.body.padding.ver = 0; - sw_indic.body.padding.hor = 0; + sw_indic.body.padding.left= 0; + sw_indic.body.padding.right = 0; + sw_indic.body.padding.top = 0; + sw_indic.body.padding.bottom = 0; lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; @@ -356,7 +370,8 @@ static void lmeter_init(void) lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); - lmeter_bg.body.padding.hor = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.body.padding.right = LV_DPI / 8; /*Scale line length*/ lmeter_bg.line.color = LV_COLOR_HEX3(0x222); lmeter_bg.line.width = 2; @@ -372,8 +387,10 @@ static void gauge_init(void) lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); gauge_bg.body.grad_color = gauge_bg.body.main_color; - gauge_bg.body.padding.hor = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.ver = LV_DPI / 10; /*Needle center size*/ + gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.top = LV_DPI / 10; /*Needle center size*/ + gauge_bg.body.padding.bottom = LV_DPI / 10; /*Needle center size*/ gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ gauge_bg.body.border.color = LV_COLOR_HEX3(0x777); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); @@ -398,8 +415,10 @@ static void arc_init(void) /*For preloader*/ arc.body.border.width = 2; arc.body.border.color = LV_COLOR_HEX3(0x555); - arc.body.padding.hor = 3; - arc.body.padding.ver = 3; + arc.body.padding.left = 3; + arc.body.padding.right = 3; + arc.body.padding.top = 3; + arc.body.padding.bottom = 3; theme.style.arc = &arc; #endif @@ -430,8 +449,10 @@ static void calendar_init(void) lv_style_copy(&header, &def); header.body.radius = 0; - header.body.padding.hor = LV_DPI / 12; - header.body.padding.ver = LV_DPI / 14; + header.body.padding.left = LV_DPI / 12; + header.body.padding.right = LV_DPI / 12; + header.body.padding.top = LV_DPI / 14; + header.body.padding.bottom = LV_DPI / 14; header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); header.body.grad_color = header.body.main_color; header.body.border.opa = panel.body.border.opa; @@ -475,8 +496,10 @@ static void cb_init(void) cb_bg.body.opa = LV_OPA_TRANSP; cb_bg.body.border.width = 0; cb_bg.body.padding.inner = LV_DPI / 8; - cb_bg.body.padding.hor = 0; - cb_bg.body.padding.ver = 0; + cb_bg.body.padding.left = 0; + cb_bg.body.padding.right = 0; + cb_bg.body.padding.top = 0; + cb_bg.body.padding.bottom = 0; cb_bg.text.font = _font; lv_style_copy(&cb_pr, &cb_rel); @@ -630,8 +653,10 @@ static void list_init(void) lv_style_copy(&list_ina, &def); lv_style_copy(&list_bg, &list_rel); - list_bg.body.padding.hor = 0; - list_bg.body.padding.ver = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; + list_bg.body.padding.bottom = 0; theme.style.list.sb = &sb; theme.style.list.bg = &list_bg; @@ -649,8 +674,10 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.hor = LV_DPI / 6; - ddlist_bg.body.padding.ver = LV_DPI / 6; + ddlist_bg.body.padding.left = LV_DPI / 6; + ddlist_bg.body.padding.right = LV_DPI / 6; + ddlist_bg.body.padding.top = LV_DPI / 6; + ddlist_bg.body.padding.bottom = LV_DPI / 6; lv_style_copy(&ddlist_sel, &panel); ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70); @@ -696,8 +723,10 @@ static void tabview_init(void) lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x666); tab_rel.body.grad_color = LV_COLOR_HEX3(0x666); - tab_rel.body.padding.hor = 0; - tab_rel.body.padding.ver = LV_DPI / 6; + tab_rel.body.padding.left = 0; + tab_rel.body.padding.right = 0; + tab_rel.body.padding.top = LV_DPI / 6; + tab_rel.body.padding.bottom = LV_DPI / 6; tab_rel.body.padding.inner = 0; tab_rel.body.border.width = 1; tab_rel.body.border.color = LV_COLOR_SILVER; @@ -711,8 +740,10 @@ static void tabview_init(void) lv_style_copy(&tab_trel, &def); tab_trel.body.opa = LV_OPA_TRANSP; - tab_trel.body.padding.hor = 0; - tab_trel.body.padding.ver = LV_DPI / 6; + tab_trel.body.padding.left = 0; + tab_trel.body.padding.right = 0; + tab_trel.body.padding.top = LV_DPI / 6; + tab_trel.body.padding.bottom = LV_DPI / 6; tab_trel.body.padding.inner = 0; tab_trel.body.border.width = 1; tab_trel.body.border.color = LV_COLOR_SILVER; @@ -723,8 +754,10 @@ static void tabview_init(void) lv_style_copy(&tab_tpr, &def); tab_tpr.body.main_color = LV_COLOR_GRAY; tab_tpr.body.grad_color = LV_COLOR_GRAY; - tab_tpr.body.padding.hor = 0; - tab_tpr.body.padding.ver = LV_DPI / 6; + tab_tpr.body.padding.left = 0; + tab_tpr.body.padding.right = 0; + tab_tpr.body.padding.top = LV_DPI / 6; + tab_tpr.body.padding.bottom = LV_DPI / 6; tab_tpr.body.padding.inner = 0; tab_tpr.body.border.width = 1; tab_tpr.body.border.color = LV_COLOR_SILVER; @@ -764,8 +797,10 @@ static void table_init(void) lv_style_copy(&cell, &panel); cell.body.radius = 0; cell.body.border.width = 1; - cell.body.padding.hor = LV_DPI / 12; - cell.body.padding.ver = LV_DPI / 12; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; + cell.body.padding.bottom = LV_DPI / 12; theme.style.table.bg = &lv_style_transp_tight; @@ -780,8 +815,10 @@ static void win_init(void) lv_style_copy(&header, &def); header.body.radius = 0; - header.body.padding.hor = LV_DPI / 12; - header.body.padding.ver = LV_DPI / 20; + header.body.padding.left = LV_DPI / 12; + header.body.padding.right = LV_DPI / 12; + header.body.padding.top = LV_DPI / 20; + header.body.padding.bottom = LV_DPI / 20; header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); header.body.grad_color = header.body.main_color; header.body.border.opa = panel.body.border.opa; From 3a49ece9384ae78cac6d14542b50306f8f1a43f3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 14 Mar 2019 05:34:39 +0100 Subject: [PATCH 119/590] eanble sending events from events --- lv_core/lv_obj.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 52e3e64a6cf8..c14cea6fb7aa 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -1179,10 +1179,14 @@ lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { if(obj == NULL) return LV_RES_OK; + /*If the event was send from an other event save the previous object to restore it at the end*/ + lv_obj_t * prev_obj_act_event = obj_act_event; obj_act_event = obj; + obj_act_event_deleted = false; if(obj->event_cb) obj->event_cb(obj, event); - obj_act_event = NULL; + + obj_act_event = prev_obj_act_event; /*Restore the previous "event object"*/ if(obj_act_event_deleted) return LV_RES_INV; From 02e5ed8b16bcbe391abf2928eec1f1e21bcb2afd Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Thu, 14 Mar 2019 11:11:48 +0330 Subject: [PATCH 120/590] adding area chart type --- lv_objx/lv_chart.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index 7fc8af114bfd..9db3fca0a6f1 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -66,6 +66,7 @@ enum LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ LV_CHART_TYPE_VERTICAL_LINE = 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ + LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ }; typedef uint8_t lv_chart_type_t; From 22ad2e0ec19e4d098976e4ed8d716865de620135 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Thu, 14 Mar 2019 11:18:53 +0330 Subject: [PATCH 121/590] adding lv_chart_draw_areas function after adding this function it is possible to plot the area type chart too. --- lv_objx/lv_chart.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 18f156a17273..896a7cf5502c 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -35,6 +35,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask); +static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask); /********************** * STATIC VARIABLES @@ -490,6 +491,7 @@ static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_ if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_draw_cols(chart, mask); if(ext->type & LV_CHART_TYPE_POINT) lv_chart_draw_points(chart, mask); if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_draw_vertical_lines(chart, mask); + if(ext->type & LV_CHART_TYPE_AREA) lv_chart_draw_areas(chart, mask); } return true; } @@ -819,4 +821,70 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas } } } + +/** + * Draw the data lines as areas on a chart + * @param obj pointer to chart object + */ +static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + uint16_t i; + lv_point_t p1; + lv_point_t p2; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t y_ofs = chart->coords.y1; + int32_t y_tmp; + lv_coord_t p_prev; + lv_coord_t p_act; + lv_chart_series_t * ser; + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_style_t style; + lv_style_copy(&style, &lv_style_plain); + style.line.opa = ext->series.opa; + style.line.width = ext->series.width; + + /*Go through all data lines*/ + LL_READ_BACK(ext->series_ll, ser) { + style.line.color = ser->color; + + p1.x = 0 + x_ofs; + p2.x = 0 + x_ofs; + + p_prev = ser->start_point; + y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; + + for(i = 1; i < ext->point_cnt; i ++) { + p1.x = p2.x; + p1.y = p2.y; + + p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + + p_act = (ser->start_point + i) % ext->point_cnt; + + y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; + + if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { + lv_point_t triangle_points[3]; + triangle_points[0] = p1; + triangle_points[1].x = p2.x; + triangle_points[1].y = y_ofs + h; + triangle_points[2].x = p1.x; + triangle_points[2].y = y_ofs + h; + lv_draw_triangle(triangle_points, mask, style.line.color); + triangle_points[2] = p2; + lv_draw_triangle(triangle_points, mask, style.line.color); + } + p_prev = p_act; + } + } +} + #endif From e0aeed2e974fcdee2a374277dd2ca98a7c43d42e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 14 Mar 2019 19:37:09 +0100 Subject: [PATCH 122/590] add more padding.bottom/top/right/left --- lv_core/lv_style.c | 24 ++++++++++++++++-------- lv_objx/lv_ddlist.c | 1 + lv_objx/lv_list.c | 14 +------------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index d28f179c42c7..76071deeff20 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -78,8 +78,10 @@ void lv_style_init(void) lv_style_scr.body.main_color = LV_COLOR_WHITE; lv_style_scr.body.grad_color = LV_COLOR_WHITE; lv_style_scr.body.radius = 0; - lv_style_scr.body.padding.ver = 0; - lv_style_scr.body.padding.hor = 0; + lv_style_scr.body.padding.left = 0; + lv_style_scr.body.padding.right = 0; + lv_style_scr.body.padding.top = 0; + lv_style_scr.body.padding.bottom = 0; lv_style_scr.body.padding.inner = LV_DPI / 12; lv_style_scr.body.border.color = LV_COLOR_BLACK; @@ -108,8 +110,10 @@ void lv_style_init(void) /*Plain style (by default near the same as the screen style)*/ memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t)); - lv_style_plain.body.padding.hor = LV_DPI / 12; - lv_style_plain.body.padding.ver = LV_DPI / 12; + lv_style_plain.body.padding.left = LV_DPI / 12; + lv_style_plain.body.padding.right = LV_DPI / 12; + lv_style_plain.body.padding.top = LV_DPI / 12; + lv_style_plain.body.padding.bottom = LV_DPI / 12; /*Plain color style*/ memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t)); @@ -148,8 +152,10 @@ void lv_style_init(void) /*Transparent fitting size*/ memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t)); - lv_style_transp_fit.body.padding.hor = 0; - lv_style_transp_fit.body.padding.ver = 0; + lv_style_transp_fit.body.padding.left = 0; + lv_style_transp_fit.body.padding.right = 0; + lv_style_transp_fit.body.padding.top = 0; + lv_style_transp_fit.body.padding.bottom = 0; /*Transparent tight style*/ memcpy(&lv_style_transp_tight, &lv_style_transp_fit, sizeof(lv_style_t)); @@ -160,8 +166,10 @@ void lv_style_init(void) lv_style_btn_rel.body.main_color = LV_COLOR_MAKE(0x76, 0xa2, 0xd0); lv_style_btn_rel.body.grad_color = LV_COLOR_MAKE(0x19, 0x3a, 0x5d); lv_style_btn_rel.body.radius = LV_DPI / 15; - lv_style_btn_rel.body.padding.hor = LV_DPI / 4; - lv_style_btn_rel.body.padding.ver = LV_DPI / 6; + lv_style_btn_rel.body.padding.left= LV_DPI / 4; + lv_style_btn_rel.body.padding.right = LV_DPI / 4; + lv_style_btn_rel.body.padding.top = LV_DPI / 6; + lv_style_btn_rel.body.padding.bottom = LV_DPI / 6; lv_style_btn_rel.body.padding.inner = LV_DPI / 10; lv_style_btn_rel.body.border.color = LV_COLOR_MAKE(0x0b, 0x19, 0x28); lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index a1b14f02f698..416788bf066c 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -16,6 +16,7 @@ #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_symbol_def.h" #include "../lv_misc/lv_anim.h" +#include "../lv_misc/lv_math.h" #include /********************* diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index 7df6f13e0684..cc8c13f21d0f 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -344,7 +344,6 @@ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style break; case LV_LIST_STYLE_SCRL: lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); - refr_btn_width(list); break; case LV_LIST_STYLE_SB: lv_page_set_style(list, LV_PAGE_STYLE_SB, style); @@ -739,14 +738,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) res = ancestor_page_signal(list, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CORD_CHG) { - /*Be sure the width of the buttons are correct*/ - lv_coord_t w = lv_obj_get_width(list); - if(w != lv_area_get_width(param)) { /*Width changed*/ - refr_btn_width(list); - } - } - else if(sign == LV_SIGNAL_RELEASED || + if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_LONG_PRESS || @@ -789,10 +781,6 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) } } } - else if(sign == LV_SIGNAL_STYLE_CHG) { - /*Because of the possible change of horizontal and vertical padding refresh buttons width */ - refr_btn_width(list); - } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP From c3156db6b915cdd5ae406908096f55d2c697bfa2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 05:10:43 +0100 Subject: [PATCH 123/590] apply new padding in some themes --- lv_core/lv_indev.c | 3 ++ lv_objx/lv_btnm.c | 8 +-- lv_objx/lv_list.c | 1 - lv_objx/lv_page.c | 2 +- lv_themes/lv_theme_mono.c | 35 +++++++----- lv_themes/lv_theme_night.c | 106 ++++++++++++++++++++++++------------- 6 files changed, 100 insertions(+), 55 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 920db0b42f42..2d26f86c722b 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -398,6 +398,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.reset_query) return; /*The object might be deleted*/ lv_obj_send_event(focused, LV_EVENT_PRESSED); if(i->proc.reset_query) return; /*The object might be deleted*/ + + /*Send the ENTER as a normal KEY*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index acde92394a69..3aef349ca2a7 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -851,6 +851,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } ext->btn_id_pr = btn_pr; + ext->btn_id_act = btn_pr; } else if(sign == LV_SIGNAL_RELEASED) { if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { @@ -863,6 +864,9 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } } + /*Invalidate to old pressed area*/; + invalidate_button_area(btnm, ext->btn_id_pr); + #if LV_USE_GROUP /*Leave the clicked button when releases if this not the focused object in a group*/ lv_group_t * g = lv_obj_get_group(btnm); @@ -873,10 +877,6 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = LV_BTNM_BTN_NONE; #endif } - - /*Invalidate to old pressed area*/; - invalidate_button_area(btnm, ext->btn_id_pr); - } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { ext->btn_id_pr = LV_BTNM_BTN_NONE; diff --git a/lv_objx/lv_list.c b/lv_objx/lv_list.c index cc8c13f21d0f..cbdbde6b5297 100644 --- a/lv_objx/lv_list.c +++ b/lv_objx/lv_list.c @@ -178,7 +178,6 @@ void lv_list_clean(lv_obj_t * obj) */ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb) { - lv_style_t * style = lv_obj_get_style(list); lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->size ++; /*Create a list element with the image an the text*/ diff --git a/lv_objx/lv_page.c b/lv_objx/lv_page.c index 3ed0727486cb..5ec765c5f4f0 100644 --- a/lv_objx/lv_page.c +++ b/lv_objx/lv_page.c @@ -1124,7 +1124,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom, sb_ver_pad + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * (obj_h - size_tmp - 2 * sb_ver_pad)) / - (scrl_h + style->body.padding.top + ext->sb.style->body.padding.bottom - obj_h)); + (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h)); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1; } diff --git a/lv_themes/lv_theme_mono.c b/lv_themes/lv_theme_mono.c index 953a29e8be78..a4bcaa443537 100644 --- a/lv_themes/lv_theme_mono.c +++ b/lv_themes/lv_theme_mono.c @@ -54,8 +54,10 @@ static void basic_init(void) def.body.grad_color = LV_COLOR_WHITE; def.body.radius = 0; def.body.opa = LV_OPA_COVER; - def.body.padding.hor = LV_DPI / 10; - def.body.padding.ver = LV_DPI / 10; + def.body.padding.left = LV_DPI / 10; + def.body.padding.right = LV_DPI / 10; + def.body.padding.top = LV_DPI / 10; + def.body.padding.bottom = LV_DPI / 10; def.body.padding.inner = LV_DPI / 10; def.body.border.color = LV_COLOR_BLACK; def.body.border.width = 1; @@ -168,13 +170,17 @@ static void bar_init(void) static lv_style_t bar_indic; lv_style_copy(&bar_bg, &light_frame); - bar_bg.body.padding.hor = LV_DPI / 15; - bar_bg.body.padding.ver = LV_DPI / 15; + bar_bg.body.padding.left = LV_DPI / 15; + bar_bg.body.padding.right = LV_DPI / 15; + bar_bg.body.padding.top = LV_DPI / 15; + bar_bg.body.padding.bottom = LV_DPI / 15; bar_bg.body.radius = LV_RADIUS_CIRCLE; lv_style_copy(&bar_indic, &dark_frame); - bar_indic.body.padding.hor = LV_DPI / 30; - bar_indic.body.padding.ver = LV_DPI / 30; + bar_indic.body.padding.left = LV_DPI / 30; + bar_indic.body.padding.right = LV_DPI / 30; + bar_indic.body.padding.top = LV_DPI / 30; + bar_indic.body.padding.bottom = LV_DPI / 30; bar_indic.body.radius = LV_RADIUS_CIRCLE; theme.style.bar.bg = &bar_bg; @@ -188,8 +194,10 @@ static void slider_init(void) static lv_style_t slider_knob; lv_style_copy(&slider_knob, &light_frame); slider_knob.body.radius = LV_RADIUS_CIRCLE; - slider_knob.body.padding.hor = LV_DPI / 30; - slider_knob.body.padding.ver = LV_DPI / 30; + slider_knob.body.padding.left = LV_DPI / 30; + slider_knob.body.padding.right = LV_DPI / 30; + slider_knob.body.padding.top = LV_DPI / 30; + slider_knob.body.padding.bottom = LV_DPI / 30; theme.style.slider.bg = theme.style.bar.bg; theme.style.slider.indic = theme.style.bar.indic; @@ -218,7 +226,7 @@ static void lmeter_init(void) lmeter_bg.body.opa = LV_OPA_TRANSP; lmeter_bg.body.main_color = LV_COLOR_BLACK; lmeter_bg.body.grad_color = LV_COLOR_BLACK; - lmeter_bg.body.padding.hor = LV_DPI / 20; + lmeter_bg.body.padding.left = LV_DPI / 20; lmeter_bg.body.padding.inner = LV_DPI / 8; lmeter_bg.line.color = LV_COLOR_WHITE; lmeter_bg.line.width = 1; @@ -252,7 +260,8 @@ static void calendar_init(void) #if LV_USE_CALENDAR static lv_style_t box; lv_style_copy(&box, &light_plain); - box.body.padding.ver = LV_DPI / 20; + box.body.padding.top = LV_DPI / 20; + box.body.padding.bottom = LV_DPI / 20; /*Can't handle highlighted dates in this theme*/ theme.style.calendar.week_box = &box; @@ -399,8 +408,10 @@ static void win_init(void) #if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &dark_plain); - win_header.body.padding.hor = LV_DPI / 30; - win_header.body.padding.ver = LV_DPI / 30; + win_header.body.padding.left = LV_DPI / 30; + win_header.body.padding.right = LV_DPI / 30; + win_header.body.padding.top = LV_DPI / 30; + win_header.body.padding.bottom = LV_DPI / 30; theme.style.win.bg = &light_frame; theme.style.win.sb = &dark_frame; diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index a2d2e348dcc1..1576db97099f 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -66,8 +66,10 @@ static void basic_init(void) sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 60); sb.body.border.width = 0; sb.body.padding.inner = LV_DPI / 10; - sb.body.padding.ver = 0; - sb.body.padding.hor = 0; + sb.body.padding.left = 0; + sb.body.padding.right = 0; + sb.body.padding.top = 0; + sb.body.padding.bottom = 0; sb.body.radius = LV_DPI / 30; sb.body.opa = LV_OPA_COVER; @@ -78,8 +80,10 @@ static void basic_init(void) panel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 25); panel.body.border.width = 1; panel.body.border.opa = LV_OPA_COVER; - panel.body.padding.ver = LV_DPI / 10; - panel.body.padding.hor = LV_DPI / 10; + panel.body.padding.left = LV_DPI / 10; + panel.body.padding.right = LV_DPI / 10; + panel.body.padding.top = LV_DPI / 10; + panel.body.padding.bottom = LV_DPI / 10; panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40); panel.line.width = 1; theme.style.bg = &bg; @@ -104,8 +108,10 @@ static void btn_init(void) btn_rel.body.border.color = LV_COLOR_HEX3(0x111); btn_rel.body.border.width = 1; btn_rel.body.border.opa = LV_OPA_70; - btn_rel.body.padding.hor = LV_DPI / 4; - btn_rel.body.padding.ver = LV_DPI / 8; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 8; + btn_rel.body.padding.bottom = LV_DPI / 8; btn_rel.body.shadow.type = LV_SHADOW_BOTTOM; btn_rel.body.shadow.color = LV_COLOR_HEX3(0x111); btn_rel.body.shadow.width = LV_DPI / 30; @@ -206,8 +212,10 @@ static void bar_init(void) { #if LV_USE_BAR lv_style_copy(&bar_bg, &panel); - bar_bg.body.padding.ver = LV_DPI / 16; - bar_bg.body.padding.hor = LV_DPI / 16; + bar_bg.body.padding.left = LV_DPI / 16; + bar_bg.body.padding.right = LV_DPI / 16; + bar_bg.body.padding.top = LV_DPI / 16; + bar_bg.body.padding.bottom = LV_DPI / 16; bar_bg.body.radius = LV_RADIUS_CIRCLE; lv_style_copy(&bar_indic, &def); @@ -217,8 +225,10 @@ static void bar_init(void) bar_indic.body.border.width = 1; bar_indic.body.border.opa = LV_OPA_COVER; bar_indic.body.radius = LV_RADIUS_CIRCLE; - bar_indic.body.padding.hor = 0; - bar_indic.body.padding.ver = 0; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; + bar_indic.body.padding.bottom = 0; theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; @@ -257,7 +267,7 @@ static void lmeter_init(void) lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); - lmeter_bg.body.padding.hor = LV_DPI / 10; /*Scale line length*/ + lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/ lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ lmeter_bg.body.border.color = LV_COLOR_HEX3(0x333); lmeter_bg.line.color = LV_COLOR_HEX3(0x555); @@ -296,8 +306,10 @@ static void arc_init(void) /*For preloader*/ arc.body.border.width = 7; arc.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 48); - arc.body.padding.hor = 1; - arc.body.padding.ver = 1; + arc.body.padding.left = 1; + arc.body.padding.right = 1; + arc.body.padding.top = 1; + arc.body.padding.bottom = 1; theme.style.arc = &arc; #endif @@ -328,8 +340,10 @@ static void calendar_init(void) cal_bg.body.border.color = LV_COLOR_HEX3(0x333); cal_bg.body.border.width = 1; cal_bg.body.radius = LV_DPI / 20; - cal_bg.body.padding.hor = LV_DPI / 10; - cal_bg.body.padding.ver = LV_DPI / 10; + cal_bg.body.padding.left = LV_DPI / 10; + cal_bg.body.padding.right = LV_DPI / 10; + cal_bg.body.padding.top = LV_DPI / 10; + cal_bg.body.padding.bottom = LV_DPI / 10; static lv_style_t cal_header; lv_style_copy(&cal_header, &bg); @@ -338,8 +352,10 @@ static void calendar_init(void) cal_header.body.radius = 0; cal_header.body.border.width = 1; cal_header.body.border.color = LV_COLOR_HEX3(0x333); - cal_header.body.padding.hor = LV_DPI / 10; - cal_header.body.padding.ver = LV_DPI / 10; + cal_header.body.padding.left = LV_DPI / 10; + cal_header.body.padding.right = LV_DPI / 10; + cal_header.body.padding.top = LV_DPI / 10; + cal_header.body.padding.bottom = LV_DPI / 10; static lv_style_t week_box; lv_style_copy(&week_box, &panel); @@ -347,16 +363,20 @@ static void calendar_init(void) week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 45); week_box.body.radius = LV_DPI / 20; week_box.body.border.width = 1; - week_box.body.padding.hor = LV_DPI / 20; - week_box.body.padding.ver = LV_DPI / 25; + week_box.body.padding.left = LV_DPI / 20; + week_box.body.padding.right = LV_DPI / 20; + week_box.body.padding.top = LV_DPI / 25; + week_box.body.padding.bottom = LV_DPI / 25; static lv_style_t today_box; lv_style_copy(&today_box, &week_box); today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); today_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); today_box.body.radius = LV_DPI / 20; - today_box.body.padding.hor = LV_DPI / 14; - today_box.body.padding.ver = LV_DPI / 14; + today_box.body.padding.left = LV_DPI / 14; + today_box.body.padding.right = LV_DPI / 14; + today_box.body.padding.top = LV_DPI / 14; + today_box.body.padding.bottom = LV_DPI / 14; static lv_style_t highlighted_days; lv_style_copy(&highlighted_days, &bg); @@ -406,7 +426,6 @@ static void cb_init(void) tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 30); tgl_pr.body.border.width = 1;; - lv_style_copy(&ina, &rel); ina.body.main_color = LV_COLOR_HEX3(0x777); ina.body.grad_color = LV_COLOR_HEX3(0x777); @@ -428,8 +447,10 @@ static void btnm_init(void) static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&btnm_bg, &btn_rel); - btnm_bg.body.padding.hor = 2; - btnm_bg.body.padding.ver = 2; + btnm_bg.body.padding.left = 2; + btnm_bg.body.padding.right = 2; + btnm_bg.body.padding.top = 2; + btnm_bg.body.padding.bottom = 2; btnm_bg.body.padding.inner = 0; btnm_bg.body.border.width = 1; @@ -542,8 +563,10 @@ static void list_init(void) static lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr; lv_style_copy(&list_bg, &panel); - list_bg.body.padding.ver = 0; - list_bg.body.padding.hor = 0; + list_bg.body.padding.top = 0; + list_bg.body.padding.bottom = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; list_bg.body.padding.inner = 0; lv_style_copy(&list_btn_rel, &bg); @@ -554,16 +577,20 @@ static void list_init(void) list_btn_rel.body.radius = LV_DPI / 10; list_btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); list_btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); - list_btn_rel.body.padding.ver = LV_DPI / 6; - list_btn_rel.body.padding.hor = LV_DPI / 8; + list_btn_rel.body.padding.top = LV_DPI / 6; + list_btn_rel.body.padding.bottom = LV_DPI / 6; + list_btn_rel.body.padding.left = LV_DPI / 8; + list_btn_rel.body.padding.right = LV_DPI / 8; lv_style_copy(&list_btn_pr, &btn_pr); list_btn_pr.body.main_color = btn_pr.body.grad_color; list_btn_pr.body.grad_color = btn_pr.body.main_color; list_btn_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5); list_btn_pr.body.border.width = 0; - list_btn_pr.body.padding.ver = LV_DPI / 6; - list_btn_pr.body.padding.hor = LV_DPI / 8; + list_btn_pr.body.padding.top = LV_DPI / 6; + list_btn_pr.body.padding.bottom = LV_DPI / 6; + list_btn_pr.body.padding.left = LV_DPI / 8; + list_btn_pr.body.padding.right = LV_DPI / 8; list_btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); list_btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); @@ -592,8 +619,10 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &btn_rel); ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.ver = LV_DPI / 8; - ddlist_bg.body.padding.hor = LV_DPI / 8; + ddlist_bg.body.padding.top = LV_DPI / 8; + ddlist_bg.body.padding.bottom = LV_DPI / 8; + ddlist_bg.body.padding.left = LV_DPI / 8; + ddlist_bg.body.padding.right = LV_DPI / 8; ddlist_bg.body.radius = LV_DPI / 30; lv_style_copy(&ddlist_sel, &btn_rel); @@ -652,8 +681,10 @@ static void table_init(void) lv_style_copy(&cell, &panel); cell.body.radius = 0; cell.body.border.width = 1; - cell.body.padding.hor = LV_DPI / 12; - cell.body.padding.ver = LV_DPI / 12; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; + cell.body.padding.bottom = LV_DPI / 12; theme.style.table.bg = &lv_style_transp_tight; @@ -674,9 +705,10 @@ static void win_init(void) win_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); win_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); win_header.body.radius = 0; - win_header.body.padding.hor = 0; - win_header.body.padding.ver = 0; - win_header.body.padding.ver = 0; + win_header.body.padding.left = 0; + win_header.body.padding.right = 0; + win_header.body.padding.top = 0; + win_header.body.padding.bottom = 0; static lv_style_t win_btn_pr; lv_style_copy(&win_btn_pr, &def); From ee5976ce127b219687abe75506a221112cba19e3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 05:22:23 +0100 Subject: [PATCH 124/590] lv_kb: rename function and comment updates --- lv_objx/lv_kb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_objx/lv_kb.c b/lv_objx/lv_kb.c index 74ff4de6aab9..3830ce81910f 100644 --- a/lv_objx/lv_kb.c +++ b/lv_objx/lv_kb.c @@ -25,7 +25,7 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param); -static void lv_kb_def_event_cb(lv_obj_t * kb); +static void lv_kb_def_btn_action_cb(lv_obj_t * kb); /********************** * STATIC VARIABLES @@ -368,11 +368,11 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_PRESSED) { - lv_kb_def_event_cb(kb); + lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { bool no_rep = lv_btnm_get_btn_no_repeate(kb, lv_btnm_get_active_btn(kb)); - if(no_rep == false) lv_kb_def_event_cb(kb); + if(no_rep == false) lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_FOCUS) { lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); @@ -402,12 +402,12 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) return res; } + /** - * Called when a button of the keyboard is released + * Called when a button of the keyboard is pressed or long pressed to change map or add the button's test to the assigned Text area. * @param kb pointer to a keyboard - * @param event type of the event */ -static void lv_kb_def_event_cb(lv_obj_t * kb) +static void lv_kb_def_btn_action_cb(lv_obj_t * kb) { lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); From 15baa59a8f06a6ac2ce04e233987f42cfcfe0d4d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 05:45:27 +0100 Subject: [PATCH 125/590] tileview fixes --- lv_objx/lv_tileview.c | 40 +++++++++++++++++++++++++++------------- lv_objx/lv_tileview.h | 4 ++-- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/lv_objx/lv_tileview.c b/lv_objx/lv_tileview.c index 6bc38509cb31..f5684e6324ca 100644 --- a/lv_objx/lv_tileview.c +++ b/lv_objx/lv_tileview.c @@ -78,7 +78,6 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->anim_time = LV_TILEVIEW_ANIM_TIME; - ext->action = NULL; ext->act_id.x = 0; ext->act_id.y = 0; ext->valid_pos = NULL; @@ -109,7 +108,6 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_tileview_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->act_id.x = copy_ext->act_id.x; ext->act_id.y = copy_ext->act_id.y; - ext->action = copy_ext->action; ext->anim_time = copy_ext->anim_time; @@ -128,14 +126,22 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) /** * Register an object on the tileview. The register object will able to slide the tileview + * @param tileview pointer to a Tileview object * @param element pointer to an object */ -void lv_tileview_add_element(lv_obj_t * element) +void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element) { - /* Let objects eventto propaget to the scrollable part of the tileview. + /* Let the objects event to propagate to the scrollable part of the tileview. * It is required the handle dargging of the tileview with the element.*/ element->parent_event = 1; lv_obj_set_drag_parent(element, true); + + /* When adding a new element the coordinates may shift. + * For example y=1 can become y=1 if an element is added to the top. + * So be sure the current tile is correctly shown*/ + lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); + lv_tileview_set_tile_act(tileview, ext->act_id.x, ext->act_id.y, false); + } @@ -153,6 +159,20 @@ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * val { lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); ext->valid_pos = valid_pos; + + + /*If valid pos. is selected do nothing*/ + uint16_t i; + for(i = 0; valid_pos[i].x != LV_COORD_MIN; i++) { + if(valid_pos->x == ext->act_id.x && valid_pos->y == ext->act_id.y) { + return; + } + } + + /*Set a valid position if now an invalid is selected*/ + if(valid_pos->x != LV_COORD_MIN && valid_pos->y != LV_COORD_MIN) { + lv_tileview_set_tile_act(tileview, valid_pos->x, valid_pos->y, false); + } } /** @@ -181,10 +201,6 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b if(valid == false) return; /*Don't load not valid tiles*/ - lv_res_t res = LV_RES_OK; - if(ext->action) res = ext->action(tileview, x, y); - if(res != LV_RES_OK) return; /*Prevent the tile loading*/ - ext->act_id.x = x; ext->act_id.y = y; @@ -224,13 +240,11 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b } else { lv_obj_set_size(tileview, x_coord, y_coord); } -} -void lv_tileview_set_tile_load_action(lv_obj_t * tileview, lv_tileview_action_t action) -{ - lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - ext->action = action; + lv_res_t res = LV_RES_OK; + res = lv_obj_send_event(tileview, LV_EVENT_VALUE_CHANGED); + if(res != LV_RES_OK) return; /*Prevent the tile loading*/ } /** diff --git a/lv_objx/lv_tileview.h b/lv_objx/lv_tileview.h index 7aa597aafe70..c01aa7faada0 100644 --- a/lv_objx/lv_tileview.h +++ b/lv_objx/lv_tileview.h @@ -44,7 +44,6 @@ typedef struct { /*New data for this type */ const lv_point_t * valid_pos; uint16_t anim_time; - lv_tileview_action_t action; lv_point_t act_id; uint8_t drag_top_en :1; uint8_t drag_bottom_en :1; @@ -80,9 +79,10 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy); /** * Register an object on the tileview. The register object will able to slide the tileview + * @param tileview pointer to a Tileview object * @param element pointer to an object */ -void lv_tileview_add_element(lv_obj_t * element); +void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element); /*===================== * Setter functions From c9703af47eef8ae76230934a87af367c317692ce Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 07:27:58 +0100 Subject: [PATCH 126/590] to lv_cont_get_fit_width/height to lv_obj --- lv_core/lv_obj.c | 23 +++++++++++++++++++++++ lv_core/lv_obj.h | 14 ++++++++++++++ lv_objx/lv_cont.c | 24 ------------------------ lv_objx/lv_cont.h | 15 --------------- 4 files changed, 37 insertions(+), 39 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index c14cea6fb7aa..0d3444ff84ee 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -1517,6 +1517,29 @@ lv_coord_t lv_obj_get_height(const lv_obj_t * obj) return lv_area_get_height(&obj->coords); } +/** + * Get that width reduced by the left and right padding. + * @param obj pointer to an object + * @return the width which still fits into the container + */ +lv_coord_t lv_obj_get_width_fit(lv_obj_t * cont) +{ + lv_style_t * style = lv_cont_get_style(cont); + + return lv_obj_get_width(cont) - style->body.padding.left - style->body.padding.right; +} + +/** + * Get that height reduced by the top an bottom padding. + * @param obj pointer to an object + * @return the height which still fits into the container + */ +lv_coord_t lv_obj_get_height_fit(lv_obj_t * cont) +{ + lv_style_t * style = lv_cont_get_style(cont); + + return lv_obj_get_width(cont) - style->body.padding.top - style->body.padding.bottom; +} /** * Get the extended size attribute of an object * @param obj pointer to an object diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 7bd61fecad51..897db7c2e6e1 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -649,6 +649,20 @@ lv_coord_t lv_obj_get_width(const lv_obj_t * obj); */ lv_coord_t lv_obj_get_height(const lv_obj_t * obj); +/** + * Get that width reduced by the left and right padding. + * @param obj pointer to an object + * @return the width which still fits into the container + */ +lv_coord_t lv_obj_get_width_fit(lv_obj_t * cont); + +/** + * Get that height reduced by the top an bottom padding. + * @param obj pointer to an object + * @return the height which still fits into the container + */ +lv_coord_t lv_obj_get_height_fit(lv_obj_t * cont); + /** * Get the extended size attribute of an object * @param obj pointer to an object diff --git a/lv_objx/lv_cont.c b/lv_objx/lv_cont.c index 4b030bf4b23c..20037a7c4d80 100644 --- a/lv_objx/lv_cont.c +++ b/lv_objx/lv_cont.c @@ -223,30 +223,6 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont) return ext->fit_bottom; } -/** - * Get that width reduced by the horizontal padding. Useful if a layout is used. - * @param cont pointer to a container object - * @return the width which still fits into the container - */ -lv_coord_t lv_cont_get_fit_width(lv_obj_t * cont) -{ - lv_style_t * style = lv_cont_get_style(cont); - - return lv_obj_get_width(cont) - style->body.padding.left - style->body.padding.right; -} - -/** - * Get that height reduced by the vertical padding. Useful if a layout is used. - * @param cont pointer to a container object - * @return the height which still fits into the container - */ -lv_coord_t lv_cont_get_fit_height(lv_obj_t * cont) -{ - lv_style_t * style = lv_cont_get_style(cont); - - return lv_obj_get_width(cont) - style->body.padding.top - style->body.padding.bottom; -} - /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_objx/lv_cont.h b/lv_objx/lv_cont.h index 6f24056e0005..cf09e17409b9 100644 --- a/lv_objx/lv_cont.h +++ b/lv_objx/lv_cont.h @@ -175,21 +175,6 @@ lv_fit_t lv_cont_get_fit_top(const lv_obj_t * cont); */ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont); - -/** - * Get that width reduced by the horizontal padding. Useful if a layout is used. - * @param cont pointer to a container object - * @return the width which still fits into the container - */ -lv_coord_t lv_cont_get_fit_width(lv_obj_t * cont); - -/** - * Get that height reduced by the vertical padding. Useful if a layout is used. - * @param cont pointer to a container object - * @return the height which still fits into the container - */ -lv_coord_t lv_cont_get_fit_height(lv_obj_t * cont); - /** * Get the style of a container * @param cont pointer to a container object From 8264492f871920b9e0e90edffaa78bce474a0a62 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 10:18:44 +0100 Subject: [PATCH 127/590] minor fixes --- lv_core/lv_obj.c | 12 ++++++------ lv_core/lv_obj.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index 0d3444ff84ee..c24563d246b7 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -1522,11 +1522,11 @@ lv_coord_t lv_obj_get_height(const lv_obj_t * obj) * @param obj pointer to an object * @return the width which still fits into the container */ -lv_coord_t lv_obj_get_width_fit(lv_obj_t * cont) +lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj) { - lv_style_t * style = lv_cont_get_style(cont); + lv_style_t * style = lv_obj_get_style(obj); - return lv_obj_get_width(cont) - style->body.padding.left - style->body.padding.right; + return lv_obj_get_width(obj) - style->body.padding.left - style->body.padding.right; } /** @@ -1534,11 +1534,11 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * cont) * @param obj pointer to an object * @return the height which still fits into the container */ -lv_coord_t lv_obj_get_height_fit(lv_obj_t * cont) +lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) { - lv_style_t * style = lv_cont_get_style(cont); + lv_style_t * style = lv_obj_get_style(obj); - return lv_obj_get_width(cont) - style->body.padding.top - style->body.padding.bottom; + return lv_obj_get_width(obj) - style->body.padding.top - style->body.padding.bottom; } /** * Get the extended size attribute of an object diff --git a/lv_core/lv_obj.h b/lv_core/lv_obj.h index 897db7c2e6e1..0d764df34a3e 100644 --- a/lv_core/lv_obj.h +++ b/lv_core/lv_obj.h @@ -654,14 +654,14 @@ lv_coord_t lv_obj_get_height(const lv_obj_t * obj); * @param obj pointer to an object * @return the width which still fits into the container */ -lv_coord_t lv_obj_get_width_fit(lv_obj_t * cont); +lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj); /** * Get that height reduced by the top an bottom padding. * @param obj pointer to an object * @return the height which still fits into the container */ -lv_coord_t lv_obj_get_height_fit(lv_obj_t * cont); +lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); /** * Get the extended size attribute of an object From 43371a49804cfea0ddb2fd47deda292100dbc937 Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 15 Mar 2019 11:41:52 +0100 Subject: [PATCH 128/590] remove unnecessary #include --- lv_objx/lv_mbox.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lv_objx/lv_mbox.c b/lv_objx/lv_mbox.c index f3b34fb22b32..fe3399081f70 100644 --- a/lv_objx/lv_mbox.c +++ b/lv_objx/lv_mbox.c @@ -7,7 +7,6 @@ /********************* * INCLUDES *********************/ -#include #include "lv_mbox.h" #if LV_USE_MBOX != 0 From 5e41a28dcf3b89b65731094bd8e8e5331d7e6f0f Mon Sep 17 00:00:00 2001 From: Elvis Eshikena Date: Fri, 15 Mar 2019 11:48:31 -0700 Subject: [PATCH 129/590] Add inline functions to replace LV_COLOR_MAKE --- lv_misc/lv_color.h | 51 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index 63645d682132..91451adf9aa7 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -369,16 +369,51 @@ static inline uint8_t lv_color_brightness(lv_color_t color) #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #if LV_COLOR_DEPTH == 1 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)}) +static inline lv_color_t lv_color_make(int r8, int g8, int b8){ + lv_color_t color; + color.full = (b8 >> 7 | g8 >> 7 | r8 >> 7); + return color; +} #elif LV_COLOR_DEPTH == 8 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 6, g8 >> 5, r8 >> 5}}) +static inline lv_color_t lv_color_make(uint8_t r8, int g8, int b8){ + lv_color_t color; + color.blue = b8 >> 6; + color.green = g8 >> 5; + color.red = r8 >> 5; + return color; +} #elif LV_COLOR_DEPTH == 16 # if LV_COLOR_16_SWAP == 0 # define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 3, g8 >> 2, r8 >> 3}}) +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ + lv_color_t color; + color.blue = (uint16_t)(b8 >> 3); + color.green = (uint16_t)(g8 >> 2); + color.red = (uint16_t)(r8 >> 3); + return color; +} # else # define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}}) +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ + lv_color_t color; + color.green_h = (uint16_t)(g8 >> 5); + color.red = (uint16_t)(r8 >> 3); + color.blue = (uint16_t)(b8 >> 3); + color.green_l = (uint16_t)((g8 >> 2) & 0x7); + return color; +} # endif #elif LV_COLOR_DEPTH == 32 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/ +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ + lv_color_t color; + color.blue = b8; + color.green = g8; + color.red = r8; + color.alpha = 0xff; + return color; +} #endif #else #if LV_COLOR_DEPTH == 1 @@ -402,15 +437,19 @@ static inline uint8_t lv_color_brightness(lv_color_t color) (uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \ (uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4))) -static inline lv_color_t lv_color_hex(uint32_t c){ - return LV_COLOR_HEX(c); -} +static inline lv_color_t lv_color_hex(uint32_t c) { + return lv_color_make((uint8_t) ((c >> 16) & 0xFF), + (uint8_t) ((c >> 8) & 0xFF), + (uint8_t) (c & 0xFF)); +} -static inline lv_color_t lv_color_hex3(uint32_t c){ - return LV_COLOR_HEX3(c); +static inline lv_color_t lv_color_hex3(uint32_t c) { + return lv_color_make((uint8_t) (((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), + (uint8_t) ((c & 0xF0) | ((c & 0xF0) >> 4)), + (uint8_t) ((c & 0xF) | ((c & 0xF) << 4))); } - + /** * Convert a HSV color to RGB * @param h hue [0..359] From 92149e11a6397b02f54d4327437ec20ac3cdbdf7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 22:19:21 +0100 Subject: [PATCH 130/590] update tehemes with new padding --- lv_core/lv_group.c | 1 + lv_core/lv_obj.c | 17 ++++-- lv_hal/lv_hal_disp.c | 3 +- lv_objx/lv_tabview.c | 5 ++ lv_themes/lv_theme_default.c | 16 ++++-- lv_themes/lv_theme_material.c | 97 ++++++++++++++++++++++----------- lv_themes/lv_theme_nemo.c | 100 ++++++++++++++++++++++------------ lv_themes/lv_theme_templ.c | 13 +++-- lv_themes/lv_theme_zen.c | 80 +++++++++++++++++---------- 9 files changed, 220 insertions(+), 112 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index ed670229c525..49e065c69bb5 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -196,6 +196,7 @@ void lv_group_remove_obj(lv_obj_t * obj) */ void lv_group_focus_obj(lv_obj_t * obj) { + if(obj == NULL) return; lv_group_t * g = obj->group_p; if(g == NULL) return; diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c index c24563d246b7..15f4db5e4a8d 100644 --- a/lv_core/lv_obj.c +++ b/lv_core/lv_obj.c @@ -187,8 +187,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->drag_parent = 0; new_obj->hidden = 0; new_obj->top = 0; - new_obj->opa_scale_en = 0; new_obj->protect = LV_PROTECT_NONE; + new_obj->opa_scale_en = 0; new_obj->opa_scale = LV_OPA_COVER; new_obj->parent_event = 0; @@ -262,6 +262,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->protect = LV_PROTECT_NONE; new_obj->opa_scale = LV_OPA_COVER; new_obj->opa_scale_en = 0; + new_obj->parent_event = 0; new_obj->ext_attr = NULL; } @@ -1179,16 +1180,22 @@ lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) { if(obj == NULL) return LV_RES_OK; - /*If the event was send from an other event save the previous object to restore it at the end*/ + /*If the event was send from an other event save the current states to restore it at the end*/ lv_obj_t * prev_obj_act_event = obj_act_event; - obj_act_event = obj; + bool prev_obj_act_event_deleted = obj_act_event_deleted; + obj_act_event = obj; obj_act_event_deleted = false; + if(obj->event_cb) obj->event_cb(obj, event); - obj_act_event = prev_obj_act_event; /*Restore the previous "event object"*/ + bool deleted = obj_act_event_deleted; + + /*Restore the previous states*/ + obj_act_event = prev_obj_act_event; + obj_act_event_deleted = prev_obj_act_event_deleted; - if(obj_act_event_deleted) return LV_RES_INV; + if(deleted) return LV_RES_INV; if(obj->parent_event && obj->par) { lv_res_t res = lv_obj_send_event(obj->par, event); diff --git a/lv_hal/lv_hal_disp.c b/lv_hal/lv_hal_disp.c index a7dcf228a0a0..39e6853ae986 100644 --- a/lv_hal/lv_hal_disp.c +++ b/lv_hal/lv_hal_disp.c @@ -111,7 +111,8 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) } memcpy(&disp->driver, driver, sizeof(lv_disp_drv_t)); - + memset(&disp->inv_area_joined, 0, sizeof(disp->inv_area_joined)); + memset(&disp->inv_areas, 0, sizeof(disp->inv_areas)); lv_ll_init(&disp->scr_ll, sizeof(lv_obj_t)); if(disp_def == NULL) disp_def = disp; diff --git a/lv_objx/lv_tabview.c b/lv_objx/lv_tabview.c index df69fe6cc95a..f3f906bf4f9e 100644 --- a/lv_objx/lv_tabview.c +++ b/lv_objx/lv_tabview.c @@ -228,6 +228,11 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm; ext->tab_name_ptr[ext->tab_cnt] = ""; + /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by `lv_mem_realloc`. + * So make its current map invalid*/ + lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); + btnm_ext->map_p = NULL; + lv_btnm_set_map(ext->btns, ext->tab_name_ptr); lv_btnm_set_btn_no_repeat(ext->btns, ext->tab_cnt - 1, true); diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index 6bdd32c3eba9..ecf29155870e 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -56,8 +56,8 @@ static void basic_init(void) lv_style_copy(&sb, &lv_style_pretty_color); sb.body.grad_color = sb.body.main_color; - sb.body.padding.hor = sb.body.padding.hor / 2; /*Make closer to the edges*/ - sb.body.padding.ver = sb.body.padding.ver / 2; + sb.body.padding.right = sb.body.padding.right/ 2; /*Make closer to the edges*/ + sb.body.padding.bottom = sb.body.padding.bottom / 2; lv_style_copy(&plain_bordered, &lv_style_plain); plain_bordered.body.border.width = 2; @@ -147,8 +147,10 @@ static void slider_init(void) { #if LV_USE_SLIDER != 0 lv_style_copy(&slider_bg, &lv_style_pretty); - slider_bg.body.padding.hor = LV_DPI / 20; - slider_bg.body.padding.ver = LV_DPI / 20; + slider_bg.body.padding.left = LV_DPI / 20; + slider_bg.body.padding.right = LV_DPI / 20; + slider_bg.body.padding.top = LV_DPI / 20; + slider_bg.body.padding.bottom = LV_DPI / 20; theme.style.slider.bg = &slider_bg; theme.style.slider.indic = &lv_style_pretty_color; @@ -160,8 +162,10 @@ static void sw_init(void) { #if LV_USE_SW != 0 lv_style_copy(&sw_bg, &lv_style_pretty); - sw_bg.body.padding.hor = 3; - sw_bg.body.padding.ver = 3; + sw_bg.body.padding.left = 3; + sw_bg.body.padding.right = 3; + sw_bg.body.padding.top = 3; + sw_bg.body.padding.bottom = 3; theme.style.sw.bg = &sw_bg; theme.style.sw.indic = &lv_style_pretty_color; diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index 7ee8e0b408da..b5108209ea5a 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -68,8 +68,10 @@ static void basic_init(void) panel.body.shadow.color = DEF_SHADOW_COLOR; panel.body.shadow.type = LV_SHADOW_BOTTOM; panel.body.shadow.width = 4; - panel.body.padding.hor = LV_DPI / 8; - panel.body.padding.ver = LV_DPI / 8; + panel.body.padding.left = LV_DPI / 8; + panel.body.padding.right = LV_DPI / 8; + panel.body.padding.top = LV_DPI / 8; + panel.body.padding.bottom = LV_DPI / 8; panel.body.padding.inner = LV_DPI / 12; panel.text.color = LV_COLOR_HEX3(0x333); panel.image.color = LV_COLOR_HEX3(0x333); @@ -78,7 +80,8 @@ static void basic_init(void) sb.body.main_color = LV_COLOR_BLACK; sb.body.grad_color = LV_COLOR_BLACK; sb.body.opa = LV_OPA_40; - sb.body.padding.hor = LV_DPI / 25; + sb.body.padding.right = LV_DPI / 25; + sb.body.padding.bottom = LV_DPI / 25; theme.style.bg = &bg; theme.style.panel = &panel; @@ -103,8 +106,10 @@ static void btn_init(void) rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); rel.body.grad_color = rel.body.main_color; rel.body.radius = DEF_RADIUS; - rel.body.padding.hor = LV_DPI / 6; - rel.body.padding.ver = LV_DPI / 8; + rel.body.padding.left = LV_DPI / 6; + rel.body.padding.right = LV_DPI / 6; + rel.body.padding.top = LV_DPI / 8; + rel.body.padding.bottom = LV_DPI / 8; rel.body.padding.inner = LV_DPI / 10; rel.body.shadow.color = DEF_SHADOW_COLOR; rel.body.shadow.type = LV_SHADOW_BOTTOM; @@ -221,14 +226,18 @@ static void bar_init(void) bar_bg.body.grad_color = bar_bg.body.main_color; bar_bg.body.radius = 3; bar_bg.body.border.width = 0; - bar_bg.body.padding.hor = LV_DPI / 12; - bar_bg.body.padding.ver = LV_DPI / 12; + bar_bg.body.padding.left = LV_DPI / 12; + bar_bg.body.padding.right = LV_DPI / 12; + bar_bg.body.padding.top = LV_DPI / 12; + bar_bg.body.padding.bottom = LV_DPI / 12; lv_style_copy(&bar_indic, &bar_bg); bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 85, 70); bar_indic.body.grad_color = bar_indic.body.main_color; - bar_indic.body.padding.hor = 0; - bar_indic.body.padding.ver = 0; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; + bar_indic.body.padding.bottom = 0; theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; @@ -290,7 +299,7 @@ static void lmeter_init(void) lv_style_copy(&lmeter, &def); lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); lmeter.body.grad_color = lmeter.body.main_color; - lmeter.body.padding.hor = LV_DPI / 10; /*Scale line length*/ + lmeter.body.padding.left = LV_DPI / 10; /*Scale line length*/ lmeter.line.color = LV_COLOR_HEX3(0x999); lmeter.line.width = 2; @@ -306,7 +315,7 @@ static void gauge_init(void) lv_style_copy(&gauge, &def); gauge.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 60); gauge.body.grad_color = gauge.body.main_color; - gauge.body.padding.hor = LV_DPI / 16; /*Scale line length*/ + gauge.body.padding.left = LV_DPI / 16; /*Scale line length*/ gauge.body.padding.inner = LV_DPI / 8; gauge.body.border.color = LV_COLOR_HEX3(0x999); gauge.text.color = LV_COLOR_HEX3(0x333); @@ -329,8 +338,10 @@ static void arc_init(void) /*For prelaoder*/ arc.body.border.width = 10; arc.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); - arc.body.padding.hor = 0; - arc.body.padding.ver = 0; + arc.body.padding.left = 0; + arc.body.padding.right = 0; + arc.body.padding.top = 0; + arc.body.padding.bottom = 0; theme.style.arc = &arc; #endif @@ -366,8 +377,10 @@ static void calendar_init(void) lv_style_copy(&week_box, &def); week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 100); week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 100); - week_box.body.padding.ver = LV_DPI / 20; - week_box.body.padding.hor = theme.style.panel->body.padding.hor; + week_box.body.padding.top = LV_DPI / 20; + week_box.body.padding.bottom = LV_DPI / 20; + week_box.body.padding.left = theme.style.panel->body.padding.left; + week_box.body.padding.right = theme.style.panel->body.padding.right; week_box.body.border.color = theme.style.panel->body.border.color; week_box.body.border.width = theme.style.panel->body.border.width; week_box.body.border.part = LV_BORDER_LEFT | LV_BORDER_RIGHT; @@ -377,7 +390,8 @@ static void calendar_init(void) lv_style_copy(&today_box, &def); today_box.body.main_color = LV_COLOR_WHITE; today_box.body.grad_color = LV_COLOR_WHITE; - today_box.body.padding.ver = LV_DPI / 20; + today_box.body.padding.top = LV_DPI / 20; + today_box.body.padding.bottom = LV_DPI / 20; today_box.body.radius = 0; theme.style.calendar.bg = theme.style.panel; @@ -431,8 +445,10 @@ static void btnm_init(void) static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.hor = 0; - bg.body.padding.ver = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; + bg.body.padding.bottom = 0; bg.body.padding.inner = 0; bg.text.color = LV_COLOR_HEX3(0x555); @@ -560,13 +576,17 @@ static void list_init(void) static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&list_bg, theme.style.panel); - list_bg.body.padding.hor = 0; - list_bg.body.padding.ver = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; + list_bg.body.padding.bottom = 0; list_bg.body.padding.inner = 0; lv_style_copy(&rel, &lv_style_transp); - rel.body.padding.hor = LV_DPI / 8; - rel.body.padding.ver = LV_DPI / 6; + rel.body.padding.left = LV_DPI / 8; + rel.body.padding.right = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 6; + rel.body.padding.bottom = LV_DPI / 6; rel.body.radius = 10; rel.body.border.color = LV_COLOR_HEX3(0xbbb); rel.body.border.width = 1; @@ -613,8 +633,10 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.hor = LV_DPI / 6; - bg.body.padding.ver = LV_DPI / 6; + bg.body.padding.left = LV_DPI / 6; + bg.body.padding.right = LV_DPI / 6; + bg.body.padding.top = LV_DPI / 6; + bg.body.padding.bottom = LV_DPI / 6; bg.text.line_space = LV_DPI / 8; lv_style_copy(&sel, &bg); @@ -637,8 +659,10 @@ static void roller_init(void) static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &lv_style_transp); - roller_bg.body.padding.hor = LV_DPI / 6; - roller_bg.body.padding.ver = LV_DPI / 6; + roller_bg.body.padding.left = LV_DPI / 6; + roller_bg.body.padding.right = LV_DPI / 6; + roller_bg.body.padding.top = LV_DPI / 6; + roller_bg.body.padding.bottom = LV_DPI / 6; roller_bg.text.line_space = LV_DPI / 8; roller_bg.text.font = _font; roller_bg.glass = 0; @@ -676,13 +700,16 @@ static void tabview_init(void) btn_bg.body.shadow.color = DEF_SHADOW_COLOR; btn_bg.body.shadow.type = LV_SHADOW_BOTTOM; btn_bg.body.padding.inner = 0; - btn_bg.body.padding.hor = 0; - btn_bg.body.padding.ver = 0; + btn_bg.body.padding.left = 0; + btn_bg.body.padding.right = 0; + btn_bg.body.padding.top = 0; + btn_bg.body.padding.bottom = 0; btn_bg.text.color = LV_COLOR_HEX3(0x333); lv_style_copy(&rel, &lv_style_transp); - rel.body.padding.ver = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 8; + rel.body.padding.bottom = LV_DPI / 8; rel.text.font = _font; lv_style_copy(&pr, &def); @@ -736,8 +763,10 @@ static void table_init(void) lv_style_copy(&cell, theme.style.panel); cell.body.radius = 0; cell.body.border.width = 1; - cell.body.padding.hor = LV_DPI / 12; - cell.body.padding.ver = LV_DPI / 12; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; + cell.body.padding.bottom = LV_DPI / 12; theme.style.table.bg = &lv_style_transp_tight; @@ -759,8 +788,10 @@ static void win_init(void) header.body.border.part = LV_BORDER_BOTTOM; header.body.border.opa = LV_OPA_COVER; header.body.padding.inner = 0; - header.body.padding.hor = 0; - header.body.padding.ver = 0; + header.body.padding.left = 0; + header.body.padding.right = 0; + header.body.padding.top = 0; + header.body.padding.bottom = 0; header.text.color = LV_COLOR_HEX3(0x333); header.image.color = LV_COLOR_HEX3(0x333); diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 4bae8bf176da..090e1677a4f7 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -78,8 +78,10 @@ static void basic_init(void) def.body.main_color = LV_COLOR_HEX3(0x222); def.body.grad_color = LV_COLOR_HEX3(0x222); def.body.radius = 0; - def.body.padding.hor = LV_DPI / 8; - def.body.padding.ver = LV_DPI / 8; + def.body.padding.left = LV_DPI / 8; + def.body.padding.right = LV_DPI / 8; + def.body.padding.top = LV_DPI / 8; + def.body.padding.bottom = LV_DPI / 8; def.body.padding.inner = LV_DPI / 8; def.body.border.color = LV_COLOR_SILVER; def.body.border.width = 1; @@ -127,8 +129,10 @@ static void basic_init(void) sb.body.border.width = 1; sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.padding.hor = 1; - sb.body.padding.ver = 1; + sb.body.padding.left = 1; + sb.body.padding.right = 1; + sb.body.padding.top = 1; + sb.body.padding.bottom = 1; sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ theme.style.bg = &bg; @@ -146,8 +150,10 @@ static void btn_init(void) btn_rel.body.border.width = 2; btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); btn_rel.body.border.opa = LV_OPA_80; - btn_rel.body.padding.hor = LV_DPI / 4; - btn_rel.body.padding.ver = LV_DPI / 6; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 6; + btn_rel.body.padding.bottom = LV_DPI / 6; btn_rel.body.padding.inner = LV_DPI / 10; btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); btn_rel.text.font = _font; @@ -226,8 +232,10 @@ static void bar_init(void) bar_bg.body.border.width = 2; bar_bg.body.border.color = LV_COLOR_SILVER; bar_bg.body.border.opa = LV_OPA_20; - bar_bg.body.padding.hor = 0; - bar_bg.body.padding.ver = LV_DPI / 10; + bar_bg.body.padding.left = 0; + bar_bg.body.padding.right = 0; + bar_bg.body.padding.top = LV_DPI / 10; + bar_bg.body.padding.bottom = LV_DPI / 10; bar_bg.body.padding.inner = 0; lv_style_copy(&bar_indic, &def); @@ -235,8 +243,10 @@ static void bar_init(void) bar_indic.body.border.width = 2; bar_indic.body.border.color = LV_COLOR_SILVER; bar_indic.body.border.opa = LV_OPA_70; - bar_indic.body.padding.hor = 0; - bar_indic.body.padding.ver = 0; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; + bar_indic.body.padding.bottom = 0; bar_indic.body.shadow.width = LV_DPI / 20; bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); @@ -318,8 +328,10 @@ static void sw_init(void) static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); sw_bg.body.opa = LV_OPA_COVER; - sw_bg.body.padding.ver = -2 ; - sw_bg.body.padding.hor = -2 ; + sw_bg.body.padding.left = -2 ; + sw_bg.body.padding.right = -2 ; + sw_bg.body.padding.top = -2 ; + sw_bg.body.padding.bottom = -2 ; sw_bg.body.main_color = LV_COLOR_HEX3(0x666); sw_bg.body.grad_color = LV_COLOR_HEX3(0x999); sw_bg.body.border.width = 2; @@ -327,8 +339,10 @@ static void sw_init(void) lv_style_copy(&sw_indic, &bar_indic); sw_indic.body.shadow .width = LV_DPI / 20; - sw_indic.body.padding.ver = 0; - sw_indic.body.padding.hor = 0; + sw_indic.body.padding.left = 0; + sw_indic.body.padding.right = 0; + sw_indic.body.padding.top = 0; + sw_indic.body.padding.bottom = 0; lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; @@ -347,7 +361,7 @@ static void lmeter_init(void) lv_style_copy(&lmeter_bg, &def); lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); - lmeter_bg.body.padding.hor = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ lmeter_bg.line.color = LV_COLOR_HEX3(0x500); lmeter_bg.line.width = 2; @@ -363,8 +377,10 @@ static void gauge_init(void) lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100); gauge_bg.body.grad_color = gauge_bg.body.main_color; - gauge_bg.body.padding.hor = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.ver = LV_DPI / 20; /*Needle center size*/ + gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.top = LV_DPI / 20; /*Needle center size*/ + gauge_bg.body.padding.bottom = LV_DPI / 20; /*Needle center size*/ gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ gauge_bg.body.border.color = LV_COLOR_HEX3(0x500); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); @@ -423,13 +439,15 @@ static void calendar_init(void) lv_style_copy(&week_box, &def); week_box.body.opa = LV_OPA_TRANSP; week_box.body.border.color = theme.style.panel->body.border.color; - week_box.body.padding.ver = LV_DPI / 20; + week_box.body.padding.top = LV_DPI / 20; + week_box.body.padding.bottom = LV_DPI / 20; static lv_style_t today_box; lv_style_copy(&today_box, &def); today_box.body.main_color = LV_COLOR_WHITE; today_box.body.grad_color = LV_COLOR_WHITE; - today_box.body.padding.ver = LV_DPI / 20; + today_box.body.padding.top = LV_DPI / 20; + today_box.body.padding.bottom = LV_DPI / 20; today_box.body.radius = 0; theme.style.calendar.bg = theme.style.panel; @@ -457,8 +475,10 @@ static void cb_init(void) cb_bg.body.opa = LV_OPA_TRANSP; cb_bg.body.border.width = 0; cb_bg.body.padding.inner = LV_DPI / 8; - cb_bg.body.padding.hor = 0; - cb_bg.body.padding.ver = 0; + cb_bg.body.padding.left = 0; + cb_bg.body.padding.right = 0; + cb_bg.body.padding.top = 0; + cb_bg.body.padding.bottom = 0; cb_bg.text.font = _font; lv_style_copy(&cb_pr, &cb_rel); @@ -611,8 +631,10 @@ static void list_init(void) lv_style_copy(&list_ina, &def); lv_style_copy(&list_bg, &list_rel); - list_bg.body.padding.hor = 0; - list_bg.body.padding.ver = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; + list_bg.body.padding.bottom = 0; theme.style.list.sb = &sb; theme.style.list.bg = &list_bg; @@ -630,8 +652,10 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.hor = LV_DPI / 6; - ddlist_bg.body.padding.ver = LV_DPI / 6; + ddlist_bg.body.padding.left = LV_DPI / 6; + ddlist_bg.body.padding.right = LV_DPI / 6; + ddlist_bg.body.padding.top = LV_DPI / 6; + ddlist_bg.body.padding.bottom = LV_DPI / 6; lv_style_copy(&ddlist_sel, &panel); ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70); @@ -677,8 +701,10 @@ static void tabview_init(void) lv_style_copy(&tab_rel, &def); tab_rel.body.main_color = LV_COLOR_HEX3(0x500); tab_rel.body.grad_color = LV_COLOR_HEX3(0x005); - tab_rel.body.padding.hor = 0; - tab_rel.body.padding.ver = LV_DPI / 6; + tab_rel.body.padding.left = 0; + tab_rel.body.padding.right = 0; + tab_rel.body.padding.top = LV_DPI / 6; + tab_rel.body.padding.bottom = LV_DPI / 6; tab_rel.body.padding.inner = 0; tab_rel.body.border.width = 1; tab_rel.body.border.color = LV_COLOR_SILVER; @@ -692,8 +718,10 @@ static void tabview_init(void) lv_style_copy(&tab_trel, &def); tab_trel.body.opa = LV_OPA_TRANSP; - tab_trel.body.padding.hor = 0; - tab_trel.body.padding.ver = LV_DPI / 6; + tab_trel.body.padding.left = 0; + tab_trel.body.padding.right = 0; + tab_trel.body.padding.top = LV_DPI / 6; + tab_trel.body.padding.bottom = LV_DPI / 6; tab_trel.body.padding.inner = 0; tab_trel.body.border.width = 1; tab_trel.body.border.color = LV_COLOR_SILVER; @@ -704,8 +732,10 @@ static void tabview_init(void) lv_style_copy(&tab_tpr, &def); tab_tpr.body.main_color = LV_COLOR_GRAY; tab_tpr.body.grad_color = LV_COLOR_GRAY; - tab_tpr.body.padding.hor = 0; - tab_tpr.body.padding.ver = LV_DPI / 6; + tab_tpr.body.padding.left = 0; + tab_tpr.body.padding.right = 0; + tab_tpr.body.padding.top = LV_DPI / 6; + tab_tpr.body.padding.bottom = LV_DPI / 6; tab_tpr.body.padding.inner = 0; tab_tpr.body.border.width = 1; tab_tpr.body.border.color = LV_COLOR_SILVER; @@ -758,8 +788,10 @@ static void win_init(void) lv_style_copy(&win_header, &panel); win_header.body.radius = 0; - win_header.body.padding.hor = LV_DPI / 12; - win_header.body.padding.ver = LV_DPI / 20; + win_header.body.padding.left = LV_DPI / 12; + win_header.body.padding.right = LV_DPI / 12; + win_header.body.padding.top = LV_DPI / 20; + win_header.body.padding.bottom = LV_DPI / 20; win_header.body.border.opa = panel.body.border.opa; win_header.body.border.width = panel.body.border.width; win_header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); @@ -784,8 +816,6 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.width = 2; style->body.border.color = LV_COLOR_SILVER; style->body.border.opa = LV_OPA_70; - style->body.padding.hor = 0; - style->body.padding.ver = 0; style->body.shadow.width = LV_DPI / 20; style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); diff --git a/lv_themes/lv_theme_templ.c b/lv_themes/lv_theme_templ.c index 9c1404f29a19..12e9d23aec1d 100644 --- a/lv_themes/lv_theme_templ.c +++ b/lv_themes/lv_theme_templ.c @@ -366,15 +366,17 @@ static void win_init(void) #if LV_USE_GROUP -static void style_mod(lv_style_t * style) +static void style_mod(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ + #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if (style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); @@ -388,15 +390,17 @@ static void style_mod(lv_style_t * style) #endif } -static void style_mod_edit(lv_style_t * style) +static void style_mod_edit(lv_group_t * group, lv_style_t * style) { + (void) group; /*Unused*/ + #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if (style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); @@ -455,6 +459,7 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) arc_init(); preload_init(); chart_init(); + calendar_init(); cb_init(); btnm_init(); kb_init(); diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index a7181ba51558..f6a13479fb84 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -68,8 +68,10 @@ static void basic_init(void) panel.body.border.opa = LV_OPA_COVER; panel.body.shadow.width = 4; panel.body.shadow.color = LV_COLOR_HEX3(0xddd); - panel.body.padding.hor = LV_DPI / 6; - panel.body.padding.ver = LV_DPI / 8; + panel.body.padding.left = LV_DPI / 6; + panel.body.padding.right = LV_DPI / 6; + panel.body.padding.top = LV_DPI / 8; + panel.body.padding.bottom = LV_DPI / 8; panel.body.padding.inner = LV_DPI / 10; lv_style_copy(&sb, &def); @@ -104,8 +106,10 @@ static void btn_init(void) rel.body.border.opa = LV_OPA_COVER; rel.body.shadow.width = 4; rel.body.shadow.color = LV_COLOR_HEX3(0xddd); - rel.body.padding.hor = LV_DPI / 4; - rel.body.padding.ver = LV_DPI / 8; + rel.body.padding.left = LV_DPI / 4; + rel.body.padding.right = LV_DPI / 4; + rel.body.padding.top = LV_DPI / 8; + rel.body.padding.bottom = LV_DPI / 8; rel.text.color = lv_color_hsv_to_rgb(_hue, 40, 90); rel.image.color = lv_color_hsv_to_rgb(_hue, 40, 90); @@ -213,8 +217,10 @@ static void bar_init(void) indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90); indic.body.grad_color = indic.body.main_color; indic.body.border.width = 0; - indic.body.padding.hor = LV_DPI / 20; - indic.body.padding.ver = LV_DPI / 20; + indic.body.padding.left = LV_DPI / 20; + indic.body.padding.right = LV_DPI / 20; + indic.body.padding.top = LV_DPI / 20; + indic.body.padding.bottom = LV_DPI / 20; theme.style.bar.bg = &bg; @@ -251,10 +257,10 @@ static void sw_init(void) indic.body.border.width = theme.style.slider.bg->body.border.width; indic.body.border.color = theme.style.slider.bg->body.border.color; indic.body.border.opa = theme.style.slider.bg->body.border.opa; - indic.body.padding.hor = 0; - indic.body.padding.ver = 0; - - + indic.body.padding.left = 0; + indic.body.padding.right = 0; + indic.body.padding.top = 0; + indic.body.padding.bottom = 0; theme.style.sw.bg = theme.style.slider.bg; theme.style.sw.indic = &indic; @@ -274,7 +280,8 @@ static void lmeter_init(void) lmeter.line.width = 2; lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); lmeter.body.grad_color = lmeter.body.main_color; - lmeter.body.padding.hor = LV_DPI / 8; + lmeter.body.padding.left = LV_DPI / 8; + lmeter.body.padding.right = LV_DPI / 8; theme.style.lmeter = &lmeter; #endif @@ -290,7 +297,8 @@ static void gauge_init(void) gauge.line.width = 1; gauge.body.main_color = LV_COLOR_HEX3(0x999); gauge.body.grad_color = gauge.body.main_color; - gauge.body.padding.hor = LV_DPI / 16; + gauge.body.padding.left = LV_DPI / 16; + gauge.body.padding.right = LV_DPI / 16; gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/ theme.style.gauge = &gauge; @@ -344,7 +352,8 @@ static void calendar_init(void) lv_style_copy(&today_box, &def); today_box.body.opa = LV_OPA_TRANSP; today_box.body.border.color = theme.style.panel->body.border.color; - today_box.body.padding.ver = LV_DPI / 20; + today_box.body.padding.top = LV_DPI / 20; + today_box.body.padding.bottom = LV_DPI / 20; today_box.body.radius = LV_RADIUS_CIRCLE; theme.style.calendar.bg = theme.style.panel; @@ -406,8 +415,10 @@ static void btnm_init(void) lv_style_copy(&bg, &lv_style_transp); bg.glass = 0; - bg.body.padding.hor = 0; - bg.body.padding.ver = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; + bg.body.padding.bottom = 0; bg.body.padding.inner = LV_DPI / 15; bg.text.font = _font; @@ -455,8 +466,10 @@ static void kb_init(void) lv_style_copy(&bg, &def); bg.body.main_color = LV_COLOR_HEX3(0x666); bg.body.grad_color = bg.body.main_color; - bg.body.padding.hor = 0; - bg.body.padding.ver = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; + bg.body.padding.bottom = 0; bg.body.padding.inner = 0; bg.body.radius = 0; bg.body.border.width = 0; @@ -519,8 +532,10 @@ static void mbox_init(void) rel.body.radius = LV_RADIUS_CIRCLE; rel.body.border.width = 2; rel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 70); - rel.body.padding.hor = LV_DPI / 4; - rel.body.padding.ver = LV_DPI / 8; + rel.body.padding.left = LV_DPI / 4; + rel.body.padding.right = LV_DPI / 4; + rel.body.padding.top = LV_DPI / 8; + rel.body.padding.bottom = LV_DPI / 8; rel.text.color = bg.text.color; lv_style_copy(&pr, &rel); @@ -554,7 +569,8 @@ static void ta_init(void) static lv_style_t oneline; lv_style_copy(&oneline, theme.style.panel); oneline.body.radius = LV_RADIUS_CIRCLE; - oneline.body.padding.ver = LV_DPI / 10; + oneline.body.padding.top = LV_DPI / 10; + oneline.body.padding.bottom = LV_DPI / 10; oneline.body.shadow.width = 0; @@ -580,14 +596,18 @@ static void list_init(void) static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.hor = 0; - bg.body.padding.ver = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; + bg.body.padding.bottom = 0; lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; - rel.body.padding.hor = LV_DPI / 8; - rel.body.padding.ver = LV_DPI / 8; + rel.body.padding.left = LV_DPI / 8; + rel.body.padding.right = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 8; + rel.body.padding.bottom = LV_DPI / 8; rel.text.color = LV_COLOR_HEX3(0x666); rel.image.color = LV_COLOR_HEX3(0x666); @@ -623,8 +643,10 @@ static void ddlist_init(void) static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); bg.text.line_space = LV_DPI / 8; - bg.body.padding.hor = LV_DPI / 6; - bg.body.padding.ver = LV_DPI / 8; + bg.body.padding.left = LV_DPI / 6; + bg.body.padding.right = LV_DPI / 6; + bg.body.padding.top = LV_DPI / 8; + bg.body.padding.bottom = LV_DPI / 8; bg.text.color = LV_COLOR_HEX3(0x666); lv_style_copy(&sel, &def); @@ -717,8 +739,10 @@ static void table_init(void) cell.body.radius = 0; cell.body.border.width = 1; cell.body.shadow.width = 0; - cell.body.padding.hor = LV_DPI / 12; - cell.body.padding.ver = LV_DPI / 12; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; + cell.body.padding.bottom = LV_DPI / 12; theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; From 1e763e6c5ee34d16ebb1c86dee073df4d67f02c1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 15 Mar 2019 22:51:49 +0100 Subject: [PATCH 131/590] roller, ddlist: minor fixes --- lv_objx/lv_ddlist.c | 10 +++++++++- lv_objx/lv_roller.c | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 70a180421fcc..1f436896b242 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -109,7 +109,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = lv_label_create(new_ddlist, NULL); lv_cont_set_fit2(new_ddlist, LV_FIT_TIGHT, LV_FIT_NONE); - lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_DRAG); lv_page_set_sb_mode(new_ddlist, LV_SB_MODE_HIDE); lv_page_set_style(new_ddlist, LV_PAGE_STYLE_SCRL, &lv_style_transp_tight); @@ -133,11 +132,13 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = lv_label_create(new_ddlist, copy_ext->label); lv_label_set_text(ext->label, lv_label_get_text(copy_ext->label)); ext->sel_opt_id = copy_ext->sel_opt_id; + ext->sel_opt_id_ori = copy_ext->sel_opt_id; ext->fix_height = copy_ext->fix_height; ext->option_cnt = copy_ext->option_cnt; ext->sel_style = copy_ext->sel_style; ext->anim_time = copy_ext->anim_time; ext->draw_arrow = copy_ext->draw_arrow; + ext->stay_open = copy_ext->stay_open; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_ddlist); @@ -219,6 +220,13 @@ void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit) { lv_cont_set_fit2(ddlist, fit, LV_FIT_NONE); + if(fit == LV_FIT_NONE) { + lv_page_set_scrl_fit2(ddlist, LV_FIT_FLOOD, LV_FIT_NONE); + } else { + lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_NONE); + + } + lv_ddlist_refr_size(ddlist, false); } diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index f5d44f9fdbdc..4bafa959cd97 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -99,7 +99,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_roller_set_style(new_roller, LV_ROLLER_STYLE_BG, th->style.roller.bg); lv_roller_set_style(new_roller, LV_ROLLER_STYLE_SEL, th->style.roller.sel); } else { - /*Let the ddlist's style*/ + /*Refresh the roller's style*/ lv_obj_refresh_style(new_roller); /*To set scrollable size automatically*/ } } @@ -109,6 +109,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_ddlist_open(new_roller, false); lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal); + /*Refresh the roller's style*/ lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/ } From edb58cc61b1a2ca232a2cd7127194a905de93394 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 15 Mar 2019 19:41:54 -0400 Subject: [PATCH 132/590] Name unnamed structs and remove duplicated semicolons --- lv_misc/lv_mem.c | 52 ++++++++++++++++---------------- lv_misc/lv_templ.c | 4 +++ lv_objx/lv_objx_templ.c | 4 +++ lv_objx/lv_table.c | 48 ++++++++++++++--------------- lv_objx/lv_table.h | 2 +- lv_porting/lv_port_disp_templ.c | 4 +++ lv_porting/lv_port_fs_templ.c | 4 +++ lv_porting/lv_port_indev_templ.c | 4 +++ 8 files changed, 71 insertions(+), 51 deletions(-) diff --git a/lv_misc/lv_mem.c b/lv_misc/lv_mem.c index cfe4ed627e4d..8a53469cc9df 100644 --- a/lv_misc/lv_mem.c +++ b/lv_misc/lv_mem.c @@ -39,7 +39,7 @@ typedef union { struct { MEM_UNIT used: 1; //1: if the entry is used MEM_UNIT d_size: 31; //Size off the data (1 means 4 bytes) - }; + } s; MEM_UNIT header; //The header (used + d_size) } lv_mem_header_t; @@ -92,9 +92,9 @@ void lv_mem_init(void) #endif lv_mem_ent_t * full = (lv_mem_ent_t *)work_mem; - full->header.used = 0; + full->header.s.used = 0; /*The total mem size id reduced by the first header and the close patterns */ - full->header.d_size = LV_MEM_SIZE - sizeof(lv_mem_header_t); + full->header.s.d_size = LV_MEM_SIZE - sizeof(lv_mem_header_t); #endif } @@ -147,8 +147,8 @@ void * lv_mem_alloc(uint32_t size) /*Allocate a header too to store the size*/ alloc = LV_MEM_CUSTOM_ALLOC(size + sizeof(lv_mem_header_t)); if(alloc != NULL) { - ((lv_mem_ent_t *) alloc)->header.d_size = size; - ((lv_mem_ent_t *) alloc)->header.used = 1; + ((lv_mem_ent_t *) alloc)->header.s.d_size = size; + ((lv_mem_ent_t *) alloc)->header.s.used = 1; alloc = &((lv_mem_ent_t *) alloc)->first_data; } #endif /* LV_ENABLE_GC */ @@ -180,7 +180,7 @@ void lv_mem_free(const void * data) #if LV_ENABLE_GC==0 /*e points to the header*/ lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data - sizeof(lv_mem_header_t)); - e->header.used = 0; + e->header.s.used = 0; #endif #if LV_MEM_CUSTOM == 0 @@ -190,8 +190,8 @@ void lv_mem_free(const void * data) lv_mem_ent_t * e_next; e_next = ent_get_next(e); while(e_next != NULL) { - if(e_next->header.used == 0) { - e->header.d_size += e_next->header.d_size + sizeof(e->header); + if(e_next->header.s.used == 0) { + e->header.s.d_size += e_next->header.s.d_size + sizeof(e->header); } else { break; } @@ -222,7 +222,7 @@ void * lv_mem_realloc(void * data_p, uint32_t new_size) /*data_p could be previously freed pointer (in this case it is invalid)*/ if(data_p != NULL) { lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data_p - sizeof(lv_mem_header_t)); - if(e->header.used == 0) { + if(e->header.s.used == 0) { data_p = NULL; } } @@ -281,7 +281,7 @@ void lv_mem_defrag(void) while(1) { /*Search the next free entry*/ while(e_free != NULL) { - if(e_free->header.used != 0) { + if(e_free->header.s.used != 0) { e_free = ent_get_next(e_free); } else { break; @@ -293,8 +293,8 @@ void lv_mem_defrag(void) /*Joint the following free entries to the free*/ e_next = ent_get_next(e_free); while(e_next != NULL) { - if(e_next->header.used == 0) { - e_free->header.d_size += e_next->header.d_size + sizeof(e_next->header); + if(e_next->header.s.used == 0) { + e_free->header.s.d_size += e_next->header.s.d_size + sizeof(e_next->header); } else { break; } @@ -326,11 +326,11 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p) e = ent_get_next(e); while(e != NULL) { - if(e->header.used == 0) { + if(e->header.s.used == 0) { mon_p->free_cnt++; - mon_p->free_size += e->header.d_size; - if(e->header.d_size > mon_p->free_biggest_size) { - mon_p->free_biggest_size = e->header.d_size; + mon_p->free_size += e->header.s.d_size; + if(e->header.s.d_size > mon_p->free_biggest_size) { + mon_p->free_biggest_size = e->header.s.d_size; } } else { mon_p->used_cnt++; @@ -360,7 +360,7 @@ uint32_t lv_mem_get_size(const void * data) lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data - sizeof(lv_mem_header_t)); - return e->header.d_size; + return e->header.s.d_size; } #else /* LV_ENABLE_GC */ @@ -390,7 +390,7 @@ static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e) next_e = (lv_mem_ent_t *) work_mem; } else { /*Get the next entry */ uint8_t * data = &act_e->first_data; - next_e = (lv_mem_ent_t *)&data[act_e->header.d_size]; + next_e = (lv_mem_ent_t *)&data[act_e->header.s.d_size]; if(&next_e->first_data >= &work_mem[LV_MEM_SIZE]) next_e = NULL; } @@ -410,11 +410,11 @@ static void * ent_alloc(lv_mem_ent_t * e, uint32_t size) void * alloc = NULL; /*If the memory is free and big enough then use it */ - if(e->header.used == 0 && e->header.d_size >= size) { + if(e->header.s.used == 0 && e->header.s.d_size >= size) { /*Truncate the entry to the desired size */ ent_trunc(e, size), - e->header.used = 1; + e->header.s.used = 1; /*Save the allocated data*/ alloc = &e->first_data; @@ -445,20 +445,20 @@ static void ent_trunc(lv_mem_ent_t * e, uint32_t size) #endif /*Don't let empty space only for a header without data*/ - if(e->header.d_size == size + sizeof(lv_mem_header_t)) { - size = e->header.d_size; + if(e->header.s.d_size == size + sizeof(lv_mem_header_t)) { + size = e->header.s.d_size; } /* Create the new entry after the current if there is space for it */ - if(e->header.d_size != size) { + if(e->header.s.d_size != size) { uint8_t * e_data = &e->first_data; lv_mem_ent_t * after_new_e = (lv_mem_ent_t *)&e_data[size]; - after_new_e->header.used = 0; - after_new_e->header.d_size = e->header.d_size - size - sizeof(lv_mem_header_t); + after_new_e->header.s.used = 0; + after_new_e->header.s.d_size = e->header.s.d_size - size - sizeof(lv_mem_header_t); } /* Set the new size for the original entry */ - e->header.d_size = size; + e->header.s.d_size = size; } #endif diff --git a/lv_misc/lv_templ.c b/lv_misc/lv_templ.c index 11478b71d8f4..c5bb68c0b90d 100644 --- a/lv_misc/lv_templ.c +++ b/lv_misc/lv_templ.c @@ -15,6 +15,10 @@ * TYPEDEFS **********************/ +/* This typedef exists purely to keep -Wpedantic happy when the file is empty. */ +/* It can be removed. */ +typedef int keep_pedantic_happy; + /********************** * STATIC PROTOTYPES **********************/ diff --git a/lv_objx/lv_objx_templ.c b/lv_objx/lv_objx_templ.c index fc154e982e1a..a9fa5b7b428f 100644 --- a/lv_objx/lv_objx_templ.c +++ b/lv_objx/lv_objx_templ.c @@ -228,4 +228,8 @@ static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param return res; } +#else /* Enable this file at the top */ + +/* This dummy typedef exists purely to silence -Wpedantic. */ +typedef int keep_pedantic_happy; #endif diff --git a/lv_objx/lv_table.c b/lv_objx/lv_table.c index 8f003c0202bb..d3e15e93c7bb 100644 --- a/lv_objx/lv_table.c +++ b/lv_objx/lv_table.c @@ -144,10 +144,10 @@ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const } /*Initialize the format byte*/ else { - format.align = LV_LABEL_ALIGN_LEFT; - format.right_merge = 0; - format.type = 0; - format.crop = 0; + format.s.align = LV_LABEL_ALIGN_LEFT; + format.s.right_merge = 0; + format.s.type = 0; + format.s.crop = 0; } @@ -262,7 +262,7 @@ void lv_table_set_cell_align(lv_obj_t * table, uint16_t row, uint16_t col, lv_la lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - format.align = align; + format.s.align = align; ext->cell_data[cell][0] = format.format_byte; } @@ -293,7 +293,7 @@ void lv_table_set_cell_type(lv_obj_t * table, uint16_t row, uint16_t col, uint8_ lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - format.type = type; + format.s.type = type; ext->cell_data[cell][0] = format.format_byte; } @@ -321,7 +321,7 @@ void lv_table_set_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col, bool c lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - format.crop = crop; + format.s.crop = crop; ext->cell_data[cell][0] = format.format_byte; } @@ -351,7 +351,7 @@ void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - format.right_merge = en ? 1 : 0; + format.s.right_merge = en ? 1 : 0; ext->cell_data[cell][0] = format.format_byte; refr_size(table); } @@ -474,7 +474,7 @@ lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_ else { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - return format.align; + return format.s.align; } } @@ -498,7 +498,7 @@ lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t else { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - return format.type + 1; /*0,1,2,3 is stored but user sees 1,2,3,4*/ + return format.s.type + 1; /*0,1,2,3 is stored but user sees 1,2,3,4*/ } } @@ -522,7 +522,7 @@ lv_label_align_t lv_table_get_cell_crop(lv_obj_t * table, uint16_t row, uint16_t else { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - return format.crop; + return format.s.crop; } } @@ -547,7 +547,7 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) else { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - return format.right_merge ? true : false; + return format.s.right_merge ? true : false; } } @@ -638,13 +638,13 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ if(ext->cell_data[cell]) { format.format_byte = ext->cell_data[cell][0]; } else { - format.right_merge = 0; - format.align = LV_LABEL_ALIGN_LEFT; - format.type = 0; - format.crop = 1; + format.s.right_merge = 0; + format.s.align = LV_LABEL_ALIGN_LEFT; + format.s.type = 0; + format.s.crop = 1; } - cell_style = ext->cell_style[format.type]; + cell_style = ext->cell_style[format.s.type]; cell_area.x1 = cell_area.x2; cell_area.x2 = cell_area.x1 + ext->col_w[col]; @@ -653,7 +653,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ if(ext->cell_data[cell + col_merge] != NULL) { format.format_byte = ext->cell_data[cell + col_merge][0]; - if(format.right_merge) cell_area.x2 += ext->col_w[col + col_merge + 1]; + if(format.s.right_merge) cell_area.x2 += ext->col_w[col + col_merge + 1]; else break; } else { break; @@ -669,7 +669,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ txt_area.y1 = cell_area.y1 + cell_style->body.padding.top; txt_area.y2 = cell_area.y2 - cell_style->body.padding.bottom; /*Align the content to the middle if not cropped*/ - if(format.crop == 0) { + if(format.s.crop == 0) { txt_flags = LV_TXT_FLAG_NONE; } else { txt_flags = LV_TXT_FLAG_EXPAND; @@ -679,12 +679,12 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ cell_style->text.letter_space, cell_style->text.line_space, lv_area_get_width(&txt_area), txt_flags); /*Align the content to the middle if not cropped*/ - if(format.crop == 0) { + if(format.s.crop == 0) { txt_area.y1 = cell_area.y1 + h_row / 2 - txt_size.y / 2; txt_area.y2 = cell_area.y1 + h_row / 2 + txt_size.y / 2; } - switch(format.align) { + switch(format.s.align) { default: case LV_LABEL_ALIGN_LEFT: txt_flags |= LV_TXT_FLAG_NONE; @@ -822,7 +822,7 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) if(ext->cell_data[cell + col_merge] != NULL) { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell + col_merge][0]; - if(format.right_merge) txt_w += ext->col_w[col + col_merge + 1]; + if(format.s.right_merge) txt_w += ext->col_w[col + col_merge + 1]; else break; } else { break; @@ -831,10 +831,10 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - cell_style = ext->cell_style[format.type]; + cell_style = ext->cell_style[format.s.type]; /*With text crop assume 1 line*/ - if(format.crop) { + if(format.s.crop) { h_max = LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + cell_style->body.padding.top + cell_style->body.padding.bottom, h_max); diff --git a/lv_objx/lv_table.h b/lv_objx/lv_table.h index ad47224c5443..422566b010f3 100644 --- a/lv_objx/lv_table.h +++ b/lv_objx/lv_table.h @@ -47,7 +47,7 @@ typedef union { uint8_t right_merge:1; uint8_t type:2; uint8_t crop:1; - }; + } s; uint8_t format_byte; }lv_table_cell_format_t; diff --git a/lv_porting/lv_port_disp_templ.c b/lv_porting/lv_port_disp_templ.c index 044e6ca21473..7fdfa79bc02f 100644 --- a/lv_porting/lv_port_disp_templ.c +++ b/lv_porting/lv_port_disp_templ.c @@ -184,4 +184,8 @@ static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color) #endif /*LV_USE_GPU*/ +#else /* Enable this file at the top */ + +/* This dummy typedef exists purely to silence -Wpedantic. */ +typedef int keep_pedantic_happy; #endif diff --git a/lv_porting/lv_port_fs_templ.c b/lv_porting/lv_port_fs_templ.c index ead8c1f999d8..31edfcfb2f66 100644 --- a/lv_porting/lv_port_fs_templ.c +++ b/lv_porting/lv_port_fs_templ.c @@ -358,4 +358,8 @@ static lv_fs_res_t fs_dir_close (void * rddir_p) return res; } +#else /* Enable this file at the top */ + +/* This dummy typedef exists purely to silence -Wpedantic. */ +typedef int keep_pedantic_happy; #endif diff --git a/lv_porting/lv_port_indev_templ.c b/lv_porting/lv_port_indev_templ.c index 7c1f0505f54f..98fe79b1de44 100644 --- a/lv_porting/lv_port_indev_templ.c +++ b/lv_porting/lv_port_indev_templ.c @@ -421,4 +421,8 @@ static bool button_is_pressed(uint8_t id) return false; } +#else /* Enable this file at the top */ + +/* This dummy typedef exists purely to silence -Wpedantic. */ +typedef int keep_pedantic_happy; #endif From a624019943b4a2a877a419d2ba10d16270296c5b Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sat, 16 Mar 2019 09:03:50 +0330 Subject: [PATCH 133/590] changed LL_READ_BACK call to LV_LL_READ_BACK as we don't have `LL_READ_BACK` function anymore. I changed it to `LV_LL_READ_BACK`. --- lv_objx/lv_chart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 896a7cf5502c..3adeaffdaea0 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -848,7 +848,7 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) style.line.width = ext->series.width; /*Go through all data lines*/ - LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; p1.x = 0 + x_ofs; From 240744f9c919683156f9efe94fe47d741807e16f Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 16 Mar 2019 08:58:52 -0400 Subject: [PATCH 134/590] Silence another pedantic warning --- lv_objx/lv_objx_templ.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lv_objx/lv_objx_templ.c b/lv_objx/lv_objx_templ.c index a9fa5b7b428f..18864a1d4a8c 100644 --- a/lv_objx/lv_objx_templ.c +++ b/lv_objx/lv_objx_templ.c @@ -8,13 +8,16 @@ * templ -> object short name with lower case(e.g. btn, label etc) * TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.) * + * You can remove the defined() clause from the #if statement below. This exists because LV_USE_TEMPL + * is not in lv_conf.h or lv_conf_templ.h by default. */ /********************* * INCLUDES *********************/ //#include "lv_templ.h" /*TODO uncomment this*/ -#if LV_USE_TEMPL != 0 + +#if defined(LV_USE_TEMPL) && LV_USE_TEMPL != 0 /********************* * DEFINES From 855832b574182838c8d15b1f2c0b73b33a0fa5b9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 04:32:37 +0100 Subject: [PATCH 135/590] lv_roller: add infinite option --- lv_conf_checker.h | 5 ++- lv_conf_templ.h | 1 + lv_objx/lv_ddlist.c | 2 + lv_objx/lv_roller.c | 107 +++++++++++++++++++++++++++++++++++++++++++- lv_objx/lv_roller.h | 38 ++++------------ 5 files changed, 121 insertions(+), 32 deletions(-) diff --git a/lv_conf_checker.h b/lv_conf_checker.h index e693539d0d49..8fe96eb7f9a3 100644 --- a/lv_conf_checker.h +++ b/lv_conf_checker.h @@ -330,7 +330,7 @@ * LV_OBJ SETTINGS *==================*/ #ifndef LV_OBJ_REALIGN -#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ #endif /*================== @@ -570,6 +570,9 @@ #ifndef LV_ROLLER_ANIM_TIME # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif +#ifndef LV_ROLLER_INF_PAGES +# define LV_ROLLER_INF_PAGES 7 /*With inifinite rollers the options are added multiple times (on select positioned back to the center)*/ +#endif #endif /*Slider (dependencies: lv_bar)*/ diff --git a/lv_conf_templ.h b/lv_conf_templ.h index ef1ab71d30d4..dbd1d8824c90 100644 --- a/lv_conf_templ.h +++ b/lv_conf_templ.h @@ -334,6 +334,7 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data #define LV_USE_ROLLER 1 #if LV_USE_ROLLER != 0 # define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ +# define LV_ROLLER_INF_PAGES 7 /*With inifinite rollers the options are added multiple times (on select positioned back to the center)*/ #endif /*Slider (dependencies: lv_bar)*/ diff --git a/lv_objx/lv_ddlist.c b/lv_objx/lv_ddlist.c index 1f436896b242..8ef5280ac3f1 100644 --- a/lv_objx/lv_ddlist.c +++ b/lv_objx/lv_ddlist.c @@ -170,6 +170,8 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) if(options[i] == '\n') ext->option_cnt++; } ext->option_cnt++; /*Last option in the at row*/ + ext->sel_opt_id = 0; + ext->sel_opt_id_ori = 0; lv_label_set_text(ext->label, options); lv_ddlist_refr_size(ddlist, false); diff --git a/lv_objx/lv_roller.c b/lv_objx/lv_roller.c index 4bafa959cd97..84d4a49bf468 100644 --- a/lv_objx/lv_roller.c +++ b/lv_objx/lv_roller.c @@ -25,6 +25,7 @@ # define LV_ROLLER_ANIM_TIME 0 /*No animation*/ #endif + /********************** * TYPEDEFS **********************/ @@ -36,6 +37,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * param); static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param); static void refr_position(lv_obj_t * roller, bool anim_en); +static void inf_normalize(void * roller_scrl); static void draw_bg(lv_obj_t * roller, const lv_area_t * mask); /********************** @@ -105,6 +107,9 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) } /*Copy an existing roller*/ else { + lv_roller_ext_t * copy_ext = lv_obj_get_ext_attr(copy); + ext->inf = copy_ext->inf; + lv_obj_t * scrl = lv_page_get_scrl(new_roller); lv_ddlist_open(new_roller, false); lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal); @@ -124,6 +129,39 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) * Setter functions *====================*/ +/** + * Set the options on a roller + * @param roller pointer to roller object + * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree" + */ +void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf) +{ + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + + if(inf== false) { + ext->inf = 0; + lv_ddlist_set_options(roller, options); + } else { + ext->inf = 1; + + uint32_t opt_len = strlen(options) + 1; /*+1 to add '\n' after option lists*/ + char * opt_extra = lv_mem_alloc(opt_len * LV_ROLLER_INF_PAGES); + uint8_t i; + for(i = 0; i < LV_ROLLER_INF_PAGES; i++) { + strcpy(&opt_extra[opt_len * i], options); + opt_extra[opt_len * (i + 1) - 1] = '\n'; + } + opt_extra[opt_len * LV_ROLLER_INF_PAGES - 1] = '\0'; + lv_ddlist_set_options(roller, opt_extra); + lv_mem_free(opt_extra); + + uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; + ext->ddlist.sel_opt_id = ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt; /*Select the middle page*/ + + } + +} + /** * Set the align of the roller's options (left or center) * @param roller - pointer to a roller object @@ -190,6 +228,32 @@ void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * * Getter functions *====================*/ +/** + * Get the id of the selected option + * @param roller pointer to a roller object + * @return id of the selected option (0 ... number of option - 1); + */ +uint16_t lv_roller_get_selected(const lv_obj_t *roller) +{ + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + if(ext->inf) { + uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; + return lv_ddlist_get_selected(roller) % real_id_cnt; + } else { + return lv_ddlist_get_selected(roller); + } +} + +/** + * Get the current selected option as a string + * @param roller pointer to roller object + * @param buf pointer to an array to store the string + */ +void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf) +{ + lv_ddlist_get_selected_str(roller, buf); +} + /** * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER * @param roller pointer to a roller object @@ -448,9 +512,12 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, lv_coord_t label_unit = font_h + style_label->text.line_space; lv_coord_t mid = (roller->coords.y2 - roller->coords.y1) / 2; id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit; + if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; + ext->ddlist.sel_opt_id = id; + ext->ddlist.sel_opt_id_ori = id; res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); if(res != LV_RES_OK) return res; } else if(sign == LV_SIGNAL_RELEASED) { @@ -553,6 +620,13 @@ static void refr_position(lv_obj_t * roller, bool anim_en) const lv_font_t * font = style_label->text.font; lv_coord_t font_h = lv_font_get_height(font); lv_coord_t h = lv_obj_get_height(roller); + + /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. + * But without animations do it manually*/ + if(anim_en == false || ext->ddlist.anim_time == 0) { + inf_normalize(roller_scrl); + } + int32_t id = ext->ddlist.sel_opt_id; lv_coord_t line_y1 = id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; lv_coord_t new_y = - line_y1 + (h - font_h) / 2; @@ -567,7 +641,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) a.end = new_y; a.fp = (lv_anim_fp_t)lv_obj_set_y; a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.end_cb = inf_normalize; a.act_time = 0; a.time = ext->ddlist.anim_time; a.playback = 0; @@ -579,4 +653,35 @@ static void refr_position(lv_obj_t * roller, bool anim_en) } } +/** + * Set the middle page for the roller if inifinte is enabled + * @param roller_scrl pointer to the roller's scrollable + */ +static void inf_normalize(void * roller_scrl) +{ + lv_obj_t * roller = lv_obj_get_parent(roller_scrl); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + + if(ext->inf) { + uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; + + ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id % real_id_cnt; + + ext->ddlist.sel_opt_id += (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ + ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; + + /*Move to the new id*/ + lv_obj_t * roller_scrl = lv_page_get_scrl(roller); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t h = lv_obj_get_height(roller); + + lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; + lv_coord_t new_y = - line_y1 + (h - font_h) / 2; + lv_obj_set_y(roller_scrl, new_y); + } +} + #endif diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index f3779f5f2a48..a355de112a0b 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -41,6 +41,7 @@ extern "C" { typedef struct { lv_ddlist_ext_t ddlist; /*Ext. of ancestor*/ /*New data for this type */ + uint8_t inf :1; /*Infinite*/ } lv_roller_ext_t; enum { @@ -65,6 +66,13 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy); * Setter functions *====================*/ +/** + * Set the options on a roller + * @param roller pointer to roller object + * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree" + */ +void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf); + /** * Set the align of the roller's options (left, right or center[default]) * @param roller - pointer to a roller object @@ -72,16 +80,6 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy); */ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align); -/** - * Set the options on a roller - * @param roller pointer to roller object - * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree" - */ -static inline void lv_roller_set_options(lv_obj_t * roller, const char * options) -{ - lv_ddlist_set_options(roller, options); -} - /** * Set the selected option * @param roller pointer to a roller object @@ -146,26 +144,6 @@ static inline const char * lv_roller_get_options(const lv_obj_t *roller) return lv_ddlist_get_options(roller); } -/** - * Get the id of the selected option - * @param roller pointer to a roller object - * @return id of the selected option (0 ... number of option - 1); - */ -static inline uint16_t lv_roller_get_selected(const lv_obj_t *roller) -{ - return lv_ddlist_get_selected(roller); -} - -/** - * Get the current selected option as a string - * @param roller pointer to roller object - * @param buf pointer to an array to store the string - */ -static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf) -{ - lv_ddlist_get_selected_str(roller, buf); -} - /** * Get the open/close animation time. * @param roller pointer to a roller From 9c499bdeae97e866e90393cf30df27525e2a5442 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 04:55:18 +0100 Subject: [PATCH 136/590] lv_btnm: fix crash --- lv_objx/lv_btnm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lv_objx/lv_btnm.c b/lv_objx/lv_btnm.c index 3aef349ca2a7..c9a525608157 100644 --- a/lv_objx/lv_btnm.c +++ b/lv_objx/lv_btnm.c @@ -1091,6 +1091,8 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p) static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx) { + if(btn_idx == LV_BTNM_BTN_NONE) return; + lv_area_t btn_area; lv_area_t btnm_area; From 96f227e7e1ec4998160d168d8040112a60731fe2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 05:07:16 +0100 Subject: [PATCH 137/590] lv_roller.h: add missing declaration --- lv_objx/lv_roller.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lv_objx/lv_roller.h b/lv_objx/lv_roller.h index a355de112a0b..7314ed4a25f1 100644 --- a/lv_objx/lv_roller.h +++ b/lv_objx/lv_roller.h @@ -126,6 +126,19 @@ void lv_roller_set_style(lv_obj_t *roller, lv_roller_style_t type, lv_style_t *s /*===================== * Getter functions *====================*/ +/** + * Get the id of the selected option + * @param roller pointer to a roller object + * @return id of the selected option (0 ... number of option - 1); + */ +uint16_t lv_roller_get_selected(const lv_obj_t *roller); + +/** + * Get the current selected option as a string + * @param roller pointer to roller object + * @param buf pointer to an array to store the string + */ +void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf); /** * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER From d7b3aeba6686926f794112298634c12d35497d8c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 05:22:25 +0100 Subject: [PATCH 138/590] add opa_scale to lv_draw_triangle --- lv_draw/lv_draw_triangle.c | 8 ++------ lv_draw/lv_draw_triangle.h | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lv_draw/lv_draw_triangle.c b/lv_draw/lv_draw_triangle.c index 24c0f390dd5e..3cc00424708d 100644 --- a/lv_draw/lv_draw_triangle.c +++ b/lv_draw/lv_draw_triangle.c @@ -33,14 +33,14 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * GLOBAL FUNCTIONS **********************/ -#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask * @param color color of the triangle + * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color) +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color, lv_opa_t opa_scale) { lv_point_t tri[3]; @@ -138,14 +138,12 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo } while(edge2.y == y2_tmp); } } -#endif /********************** * STATIC FUNCTIONS **********************/ -#if LV_USE_TRIANGLE != 0 /** * Swap two points * p1 pointer to the first point @@ -164,5 +162,3 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2) p2->y = tmp.y; } - -#endif diff --git a/lv_draw/lv_draw_triangle.h b/lv_draw/lv_draw_triangle.h index af5c4891fe95..11ec2a1d9d8d 100644 --- a/lv_draw/lv_draw_triangle.h +++ b/lv_draw/lv_draw_triangle.h @@ -26,18 +26,15 @@ extern "C" { /********************** * GLOBAL PROTOTYPES **********************/ -/*Experimental use for 3D modeling*/ -#define LV_USE_TRIANGLE 1 -#if LV_USE_TRIANGLE != 0 /** * * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask * @param color color of the triangle + * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color); -#endif +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color, lv_opa_t opa_scale); /********************** * MACROS From 5916f1f5c4591e36e9f6bfd1791a2f88e90e6c40 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 05:23:43 +0100 Subject: [PATCH 139/590] lv_chart: minor fixes --- lv_objx/lv_chart.c | 113 ++++++++++++++++++++++----------------------- lv_objx/lv_chart.h | 36 ++++++++------- 2 files changed, 75 insertions(+), 74 deletions(-) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 3adeaffdaea0..c41acb912627 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -828,63 +828,62 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas */ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - - uint16_t i; - lv_point_t p1; - lv_point_t p2; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t h = lv_obj_get_height(chart); - lv_coord_t x_ofs = chart->coords.x1; - lv_coord_t y_ofs = chart->coords.y1; - int32_t y_tmp; - lv_coord_t p_prev; - lv_coord_t p_act; - lv_chart_series_t * ser; - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); - lv_style_t style; - lv_style_copy(&style, &lv_style_plain); - style.line.opa = ext->series.opa; - style.line.width = ext->series.width; - - /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { - style.line.color = ser->color; - - p1.x = 0 + x_ofs; - p2.x = 0 + x_ofs; - - p_prev = ser->start_point; - y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; - - for(i = 1; i < ext->point_cnt; i ++) { - p1.x = p2.x; - p1.y = p2.y; - - p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; - - p_act = (ser->start_point + i) % ext->point_cnt; - - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; - - if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { - lv_point_t triangle_points[3]; - triangle_points[0] = p1; - triangle_points[1].x = p2.x; - triangle_points[1].y = y_ofs + h; - triangle_points[2].x = p1.x; - triangle_points[2].y = y_ofs + h; - lv_draw_triangle(triangle_points, mask, style.line.color); - triangle_points[2] = p2; - lv_draw_triangle(triangle_points, mask, style.line.color); - } - p_prev = p_act; - } - } + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + uint16_t i; + lv_point_t p1; + lv_point_t p2; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t y_ofs = chart->coords.y1; + int32_t y_tmp; + lv_coord_t p_prev; + lv_coord_t p_act; + lv_chart_series_t * ser; + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_style_t style; + lv_style_copy(&style, &lv_style_plain); + style.line.opa = ext->series.opa; + style.line.width = ext->series.width; + + /*Go through all data lines*/ + LV_LL_READ_BACK(ext->series_ll, ser) { + style.line.color = ser->color; + + p1.x = 0 + x_ofs; + p2.x = 0 + x_ofs; + + p_prev = ser->start_point; + y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; + + for(i = 1; i < ext->point_cnt; i ++) { + p1.x = p2.x; + p1.y = p2.y; + + p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + p_act = (ser->start_point + i) % ext->point_cnt; + + y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; + + if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { + lv_point_t triangle_points[3]; + triangle_points[0] = p1; + triangle_points[1].x = p2.x; + triangle_points[1].y = y_ofs + h; + triangle_points[2].x = p1.x; + triangle_points[2].y = y_ofs + h; + lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + triangle_points[2] = p2; + lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + } + p_prev = p_act; + } + } } #endif diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index 9db3fca0a6f1..53a674ff346d 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -32,6 +32,18 @@ extern "C" { /********************** * TYPEDEFS **********************/ + +/*Chart types*/ +enum +{ + LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ + LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ + LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ + LV_CHART_TYPE_VERTICAL_LINE = 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ + LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ +}; +typedef uint8_t lv_chart_type_t; + typedef struct { lv_coord_t * points; @@ -44,13 +56,13 @@ typedef struct { /*No inherited ext*/ /*Ext. of ancestor*/ /*New data for this type */ - lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_dl_t)*/ - lv_coord_t ymin; /*y min value (used to scale the data)*/ - lv_coord_t ymax; /*y max value (used to scale the data)*/ - uint8_t hdiv_cnt; /*Number of horizontal division lines*/ - uint8_t vdiv_cnt; /*Number of vertical division lines*/ - uint16_t point_cnt; /*Point number in a data line*/ - uint8_t type :4; /*Line, column or point chart (from 'lv_chart_type_t')*/ + lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_dl_t)*/ + lv_coord_t ymin; /*y min value (used to scale the data)*/ + lv_coord_t ymax; /*y max value (used to scale the data)*/ + uint8_t hdiv_cnt; /*Number of horizontal division lines*/ + uint8_t vdiv_cnt; /*Number of vertical division lines*/ + uint16_t point_cnt; /*Point number in a data line*/ + lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ struct { lv_coord_t width; /*Line width or point radius*/ uint8_t num; /*Number of data lines in dl_ll*/ @@ -59,16 +71,6 @@ typedef struct } series; } lv_chart_ext_t; -/*Chart types*/ -enum -{ - LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ - LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ - LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ - LV_CHART_TYPE_VERTICAL_LINE = 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ - LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ -}; -typedef uint8_t lv_chart_type_t; /********************** From 0ab28f623c879d15aa80b9098ddae75ec28d6c5d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 07:44:48 +0100 Subject: [PATCH 140/590] replace color macros with functions --- lv_core/lv_style.c | 88 +++++++++++++++++------------------ lv_draw/lv_draw_img.c | 2 +- lv_draw/lv_draw_label.c | 2 +- lv_misc/lv_color.c | 4 +- lv_misc/lv_color.h | 54 ++++++--------------- lv_themes/lv_theme_alien.c | 46 +++++++++--------- lv_themes/lv_theme_default.c | 14 +++--- lv_themes/lv_theme_material.c | 68 +++++++++++++-------------- lv_themes/lv_theme_nemo.c | 44 +++++++++--------- lv_themes/lv_theme_night.c | 46 +++++++++--------- lv_themes/lv_theme_zen.c | 74 ++++++++++++++--------------- 11 files changed, 209 insertions(+), 233 deletions(-) diff --git a/lv_core/lv_style.c b/lv_core/lv_style.c index 76071deeff20..57c251d39c33 100644 --- a/lv_core/lv_style.c +++ b/lv_core/lv_style.c @@ -94,17 +94,17 @@ void lv_style_init(void) lv_style_scr.body.shadow.width = 0; lv_style_scr.text.opa = LV_OPA_COVER; - lv_style_scr.text.color = LV_COLOR_MAKE(0x30, 0x30, 0x30); + lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30); lv_style_scr.text.font = LV_FONT_DEFAULT; lv_style_scr.text.letter_space = 2; lv_style_scr.text.line_space = 2; lv_style_scr.image.opa = LV_OPA_COVER; - lv_style_scr.image.color = LV_COLOR_MAKE(0x20, 0x20, 0x20); + lv_style_scr.image.color = lv_color_make(0x20, 0x20, 0x20); lv_style_scr.image.intense = LV_OPA_TRANSP; lv_style_scr.line.opa = LV_OPA_COVER; - lv_style_scr.line.color = LV_COLOR_MAKE(0x20, 0x20, 0x20); + lv_style_scr.line.color = lv_color_make(0x20, 0x20, 0x20); lv_style_scr.line.width = 2; lv_style_scr.line.rounded = 0; @@ -117,32 +117,32 @@ void lv_style_init(void) /*Plain color style*/ memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t)); - lv_style_plain_color.text.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0); - lv_style_plain_color.image.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0); - lv_style_plain_color.line.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0); - lv_style_plain_color.body.main_color = LV_COLOR_MAKE(0x55, 0x96, 0xd8); + lv_style_plain_color.text.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.image.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.line.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.body.main_color = lv_color_make(0x55, 0x96, 0xd8); lv_style_plain_color.body.grad_color = lv_style_plain_color.body.main_color; /*Pretty style */ memcpy(&lv_style_pretty, &lv_style_plain, sizeof(lv_style_t)); - lv_style_pretty.text.color = LV_COLOR_MAKE(0x20, 0x20, 0x20); - lv_style_pretty.image.color = LV_COLOR_MAKE(0x20, 0x20, 0x20); - lv_style_pretty.line.color = LV_COLOR_MAKE(0x20, 0x20, 0x20); + lv_style_pretty.text.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_pretty.image.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_pretty.line.color = lv_color_make(0x20, 0x20, 0x20); lv_style_pretty.body.main_color = LV_COLOR_WHITE; lv_style_pretty.body.grad_color = LV_COLOR_SILVER; lv_style_pretty.body.radius = LV_DPI / 15; - lv_style_pretty.body.border.color = LV_COLOR_MAKE(0x40, 0x40, 0x40); + lv_style_pretty.body.border.color = lv_color_make(0x40, 0x40, 0x40); lv_style_pretty.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; lv_style_pretty.body.border.opa = LV_OPA_30; /*Pretty color style*/ memcpy(&lv_style_pretty_color, &lv_style_pretty, sizeof(lv_style_t)); - lv_style_pretty_color.text.color = LV_COLOR_MAKE(0xe0, 0xe0, 0xe0); - lv_style_pretty_color.image.color = LV_COLOR_MAKE(0xe0, 0xe0, 0xe0); - lv_style_pretty_color.line.color = LV_COLOR_MAKE(0xc0, 0xc0, 0xc0); - lv_style_pretty_color.body.main_color = LV_COLOR_MAKE(0x6b, 0x9a, 0xc7); - lv_style_pretty_color.body.grad_color = LV_COLOR_MAKE(0x2b, 0x59, 0x8b); - lv_style_pretty_color.body.border.color = LV_COLOR_MAKE(0x15, 0x2c, 0x42); + lv_style_pretty_color.text.color = lv_color_make(0xe0, 0xe0, 0xe0); + lv_style_pretty_color.image.color = lv_color_make(0xe0, 0xe0, 0xe0); + lv_style_pretty_color.line.color = lv_color_make(0xc0, 0xc0, 0xc0); + lv_style_pretty_color.body.main_color = lv_color_make(0x6b, 0x9a, 0xc7); + lv_style_pretty_color.body.grad_color = lv_color_make(0x2b, 0x59, 0x8b); + lv_style_pretty_color.body.border.color = lv_color_make(0x15, 0x2c, 0x42); /*Transparent style*/ memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t)); @@ -163,55 +163,55 @@ void lv_style_init(void) /*Button released style*/ memcpy(&lv_style_btn_rel, &lv_style_plain, sizeof(lv_style_t)); - lv_style_btn_rel.body.main_color = LV_COLOR_MAKE(0x76, 0xa2, 0xd0); - lv_style_btn_rel.body.grad_color = LV_COLOR_MAKE(0x19, 0x3a, 0x5d); + lv_style_btn_rel.body.main_color = lv_color_make(0x76, 0xa2, 0xd0); + lv_style_btn_rel.body.grad_color = lv_color_make(0x19, 0x3a, 0x5d); lv_style_btn_rel.body.radius = LV_DPI / 15; lv_style_btn_rel.body.padding.left= LV_DPI / 4; lv_style_btn_rel.body.padding.right = LV_DPI / 4; lv_style_btn_rel.body.padding.top = LV_DPI / 6; lv_style_btn_rel.body.padding.bottom = LV_DPI / 6; lv_style_btn_rel.body.padding.inner = LV_DPI / 10; - lv_style_btn_rel.body.border.color = LV_COLOR_MAKE(0x0b, 0x19, 0x28); + lv_style_btn_rel.body.border.color = lv_color_make(0x0b, 0x19, 0x28); lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; lv_style_btn_rel.body.border.opa = LV_OPA_70; lv_style_btn_rel.body.shadow.color = LV_COLOR_GRAY; lv_style_btn_rel.body.shadow.width = 0; - lv_style_btn_rel.text.color = LV_COLOR_MAKE(0xff, 0xff, 0xff); - lv_style_btn_rel.image.color = LV_COLOR_MAKE(0xff, 0xff, 0xff); + lv_style_btn_rel.text.color = lv_color_make(0xff, 0xff, 0xff); + lv_style_btn_rel.image.color = lv_color_make(0xff, 0xff, 0xff); /*Button pressed style*/ memcpy(&lv_style_btn_pr, &lv_style_btn_rel, sizeof(lv_style_t)); - lv_style_btn_pr.body.main_color = LV_COLOR_MAKE(0x33, 0x62, 0x94); - lv_style_btn_pr.body.grad_color = LV_COLOR_MAKE(0x10, 0x26, 0x3c); - lv_style_btn_pr.text.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); - lv_style_btn_pr.image.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); - lv_style_btn_pr.line.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.body.main_color = lv_color_make(0x33, 0x62, 0x94); + lv_style_btn_pr.body.grad_color = lv_color_make(0x10, 0x26, 0x3c); + lv_style_btn_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button toggle released style*/ memcpy(&lv_style_btn_tgl_rel, &lv_style_btn_rel, sizeof(lv_style_t)); - lv_style_btn_tgl_rel.body.main_color = LV_COLOR_MAKE(0x0a, 0x11, 0x22); - lv_style_btn_tgl_rel.body.grad_color = LV_COLOR_MAKE(0x37, 0x62, 0x90); - lv_style_btn_tgl_rel.body.border.color = LV_COLOR_MAKE(0x01, 0x07, 0x0d); - lv_style_btn_tgl_rel.text.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4); - lv_style_btn_tgl_rel.image.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4); - lv_style_btn_tgl_rel.line.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.body.main_color = lv_color_make(0x0a, 0x11, 0x22); + lv_style_btn_tgl_rel.body.grad_color = lv_color_make(0x37, 0x62, 0x90); + lv_style_btn_tgl_rel.body.border.color = lv_color_make(0x01, 0x07, 0x0d); + lv_style_btn_tgl_rel.text.color = lv_color_make(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.image.color = lv_color_make(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.line.color = lv_color_make(0xc8, 0xdd, 0xf4); /*Button toggle pressed style*/ memcpy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel, sizeof(lv_style_t)); - lv_style_btn_tgl_pr.body.main_color = LV_COLOR_MAKE(0x02, 0x14, 0x27); - lv_style_btn_tgl_pr.body.grad_color = LV_COLOR_MAKE(0x2b, 0x4c, 0x70); - lv_style_btn_tgl_pr.text.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); - lv_style_btn_tgl_pr.image.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); - lv_style_btn_tgl_pr.line.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.body.main_color = lv_color_make(0x02, 0x14, 0x27); + lv_style_btn_tgl_pr.body.grad_color = lv_color_make(0x2b, 0x4c, 0x70); + lv_style_btn_tgl_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button inactive style*/ memcpy(&lv_style_btn_ina, &lv_style_btn_rel, sizeof(lv_style_t)); - lv_style_btn_ina.body.main_color = LV_COLOR_MAKE(0xd8, 0xd8, 0xd8); - lv_style_btn_ina.body.grad_color = LV_COLOR_MAKE(0xd8, 0xd8, 0xd8); - lv_style_btn_ina.body.border.color = LV_COLOR_MAKE(0x90, 0x90, 0x90); - lv_style_btn_ina.text.color = LV_COLOR_MAKE(0x70, 0x70, 0x70); - lv_style_btn_ina.image.color = LV_COLOR_MAKE(0x70, 0x70, 0x70); - lv_style_btn_ina.line.color = LV_COLOR_MAKE(0x70, 0x70, 0x70); + lv_style_btn_ina.body.main_color = lv_color_make(0xd8, 0xd8, 0xd8); + lv_style_btn_ina.body.grad_color = lv_color_make(0xd8, 0xd8, 0xd8); + lv_style_btn_ina.body.border.color = lv_color_make(0x90, 0x90, 0x90); + lv_style_btn_ina.text.color = lv_color_make(0x70, 0x70, 0x70); + lv_style_btn_ina.image.color = lv_color_make(0x70, 0x70, 0x70); + lv_style_btn_ina.line.color = lv_color_make(0x70, 0x70, 0x70); } diff --git a/lv_draw/lv_draw_img.c b/lv_draw/lv_draw_img.c index 026de429b67e..504c630634df 100644 --- a/lv_draw/lv_draw_img.c +++ b/lv_draw/lv_draw_img.c @@ -439,7 +439,7 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * uint32_t i; for(i = 0; i < palette_size; i++) { - decoder_index_map[i] = LV_COLOR_MAKE(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); + decoder_index_map[i] = lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); } return NULL; #else diff --git a/lv_draw/lv_draw_label.c b/lv_draw/lv_draw_label.c index 2441d90be7b5..a1febd9d9884 100644 --- a/lv_draw/lv_draw_label.c +++ b/lv_draw/lv_draw_label.c @@ -161,7 +161,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st r = (hex_char_to_num(buf[0]) << 4) + hex_char_to_num(buf[1]); g = (hex_char_to_num(buf[2]) << 4) + hex_char_to_num(buf[3]); b = (hex_char_to_num(buf[4]) << 4) + hex_char_to_num(buf[5]); - recolor = LV_COLOR_MAKE(r, g, b); + recolor = lv_color_make(r, g, b); } else { recolor.full = style->text.color.full; } diff --git a/lv_misc/lv_color.c b/lv_misc/lv_color.c index f6001eb4b480..84ae5b660d30 100644 --- a/lv_misc/lv_color.c +++ b/lv_misc/lv_color.c @@ -57,7 +57,7 @@ lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) r = v; g = v; b = v; - return LV_COLOR_MAKE(v, v, v); + return lv_color_make(v, v, v); } region = h / 43; @@ -100,7 +100,7 @@ lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) break; } - lv_color_t result = LV_COLOR_MAKE(r, g, b); + lv_color_t result = lv_color_make(r, g, b); return result; } diff --git a/lv_misc/lv_color.h b/lv_misc/lv_color.h index b858e1811991..23855fd9cca3 100644 --- a/lv_misc/lv_color.h +++ b/lv_misc/lv_color.h @@ -364,9 +364,7 @@ static inline uint8_t lv_color_brightness(lv_color_t color) return (uint16_t) bright >> 3; } -/* The most simple macro to create a color from R,G and B values - * The order of bit field is different on Big-endian and Little-endian machines*/ -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +/* The most simple macro to create a color from R,G and B values */ #if LV_COLOR_DEPTH == 1 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)}) static inline lv_color_t lv_color_make(int r8, int g8, int b8){ @@ -378,9 +376,9 @@ static inline lv_color_t lv_color_make(int r8, int g8, int b8){ #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 6, g8 >> 5, r8 >> 5}}) static inline lv_color_t lv_color_make(uint8_t r8, int g8, int b8){ lv_color_t color; - color.blue = b8 >> 6; - color.green = g8 >> 5; - color.red = r8 >> 5; + color.ch.blue = b8 >> 6; + color.ch.green = g8 >> 5; + color.ch.red = r8 >> 5; return color; } #elif LV_COLOR_DEPTH == 16 @@ -388,19 +386,19 @@ static inline lv_color_t lv_color_make(uint8_t r8, int g8, int b8){ # define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 3, g8 >> 2, r8 >> 3}}) static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ lv_color_t color; - color.blue = (uint16_t)(b8 >> 3); - color.green = (uint16_t)(g8 >> 2); - color.red = (uint16_t)(r8 >> 3); + color.ch.blue = (uint16_t)(b8 >> 3); + color.ch.green = (uint16_t)(g8 >> 2); + color.ch.red = (uint16_t)(r8 >> 3); return color; } # else # define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}}) static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ lv_color_t color; - color.green_h = (uint16_t)(g8 >> 5); - color.red = (uint16_t)(r8 >> 3); - color.blue = (uint16_t)(b8 >> 3); - color.green_l = (uint16_t)((g8 >> 2) & 0x7); + color.ch.green_h = (uint16_t)(g8 >> 5); + color.ch.red = (uint16_t)(r8 >> 3); + color.ch.blue = (uint16_t)(b8 >> 3); + color.ch.green_l = (uint16_t)((g8 >> 2) & 0x7); return color; } # endif @@ -408,34 +406,13 @@ static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/ static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ lv_color_t color; - color.blue = b8; - color.green = g8; - color.red = r8; - color.alpha = 0xff; + color.ch.blue = b8; + color.ch.green = g8; + color.ch.red = r8; + color.ch.alpha = 0xff; return color; } #endif -#else -#if LV_COLOR_DEPTH == 1 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(r8 >> 7 | g8 >> 7 | b8 >> 7)}) -#elif LV_COLOR_DEPTH == 8 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{r8 >> 6, g8 >> 5, b8 >> 5}}) -#elif LV_COLOR_DEPTH == 16 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{r8 >> 3, g8 >> 2, b8 >> 3}}) -#elif LV_COLOR_DEPTH == 32 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{0xff, r8, g8, b8}}) /*Fix 0xff alpha*/ -#endif -#endif - - -#define LV_COLOR_HEX(c) LV_COLOR_MAKE((uint8_t) ((uint32_t)((uint32_t)c >> 16) & 0xFF), \ - (uint8_t) ((uint32_t)((uint32_t)c >> 8) & 0xFF), \ - (uint8_t) ((uint32_t) c & 0xFF)) - -/*Usage LV_COLOR_HEX3(0x16C) which means LV_COLOR_HEX(0x1166CC)*/ -#define LV_COLOR_HEX3(c) LV_COLOR_MAKE((uint8_t) (((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), \ - (uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \ - (uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4))) static inline lv_color_t lv_color_hex(uint32_t c) { return lv_color_make((uint8_t) ((c >> 16) & 0xFF), @@ -449,7 +426,6 @@ static inline lv_color_t lv_color_hex3(uint32_t c) { (uint8_t) ((c & 0xF) | ((c & 0xF) << 4))); } - /** * Convert a HSV color to RGB * @param h hue [0..359] diff --git a/lv_themes/lv_theme_alien.c b/lv_themes/lv_theme_alien.c index 41e44807da60..dfd200ea6538 100644 --- a/lv_themes/lv_theme_alien.c +++ b/lv_themes/lv_theme_alien.c @@ -72,8 +72,8 @@ static void basic_init(void) def.body.opa = LV_OPA_COVER; def.glass = 0; - def.body.main_color = LV_COLOR_HEX3(0x222); - def.body.grad_color = LV_COLOR_HEX3(0x222); + def.body.main_color = lv_color_hex3(0x222); + def.body.grad_color = lv_color_hex3(0x222); def.body.radius = 0; def.body.padding.left = LV_DPI / 8; def.body.padding.right = LV_DPI / 8; @@ -87,31 +87,31 @@ static void basic_init(void) def.body.shadow.width = 0; def.body.shadow.type = LV_SHADOW_FULL; - def.text.color = LV_COLOR_HEX3(0xDDD); + def.text.color = lv_color_hex3(0xDDD); def.text.font = _font; def.text.letter_space = 1; def.text.line_space = 2; - def.image.color = LV_COLOR_HEX3(0xDDD); + def.image.color = lv_color_hex3(0xDDD); def.image.intense = LV_OPA_TRANSP; - def.line.color = LV_COLOR_HEX3(0xDDD); + def.line.color = lv_color_hex3(0xDDD); def.line.width = 1; /*Background*/ lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_HEX3(0x333); - bg.body.grad_color = LV_COLOR_HEX3(0x333); + bg.body.main_color = lv_color_hex3(0x333); + bg.body.grad_color = lv_color_hex3(0x333); bg.body.border.width = 2; - bg.body.border.color = LV_COLOR_HEX3(0x666); + bg.body.border.color = lv_color_hex3(0x666); bg.body.shadow.color = LV_COLOR_SILVER; /*Panel*/ lv_style_copy(&panel, &def); panel.body.radius = LV_DPI / 10; - panel.body.main_color = LV_COLOR_HEX3(0x666); - panel.body.grad_color = LV_COLOR_HEX3(0x666); - panel.body.border.color = LV_COLOR_HEX3(0xccc); + panel.body.main_color = lv_color_hex3(0x666); + panel.body.grad_color = lv_color_hex3(0x666); + panel.body.border.color = lv_color_hex3(0xccc); panel.body.border.width = 2; panel.body.border.opa = LV_OPA_60; panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); @@ -341,8 +341,8 @@ static void sw_init(void) sw_bg.body.padding.right = -2 ; sw_bg.body.padding.top = -2 ; sw_bg.body.padding.bottom = -2 ; - sw_bg.body.main_color = LV_COLOR_HEX3(0x666); - sw_bg.body.grad_color = LV_COLOR_HEX3(0x999); + sw_bg.body.main_color = lv_color_hex3(0x666); + sw_bg.body.grad_color = lv_color_hex3(0x999); sw_bg.body.border.width = 2; sw_bg.body.border.opa = LV_OPA_50; @@ -372,7 +372,7 @@ static void lmeter_init(void) lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ lmeter_bg.body.padding.right = LV_DPI / 8; /*Scale line length*/ - lmeter_bg.line.color = LV_COLOR_HEX3(0x222); + lmeter_bg.line.color = lv_color_hex3(0x222); lmeter_bg.line.width = 2; theme.style.lmeter = &lmeter_bg; @@ -392,7 +392,7 @@ static void gauge_init(void) gauge_bg.body.padding.top = LV_DPI / 10; /*Needle center size*/ gauge_bg.body.padding.bottom = LV_DPI / 10; /*Needle center size*/ gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ - gauge_bg.body.border.color = LV_COLOR_HEX3(0x777); + gauge_bg.body.border.color = lv_color_hex3(0x777); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); gauge_bg.line.width = 2; gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); @@ -414,7 +414,7 @@ static void arc_init(void) /*For preloader*/ arc.body.border.width = 2; - arc.body.border.color = LV_COLOR_HEX3(0x555); + arc.body.border.color = lv_color_hex3(0x555); arc.body.padding.left = 3; arc.body.padding.right = 3; arc.body.padding.top = 3; @@ -698,8 +698,8 @@ static void roller_init(void) lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; roller_bg.body.radius = LV_DPI / 20; - roller_bg.body.main_color = LV_COLOR_HEX3(0x222); - roller_bg.body.grad_color = LV_COLOR_HEX3(0x666); + roller_bg.body.main_color = lv_color_hex3(0x222); + roller_bg.body.grad_color = lv_color_hex3(0x666); roller_bg.body.border.opa = LV_OPA_30; roller_bg.text.opa = LV_OPA_70; roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); @@ -721,8 +721,8 @@ static void tabview_init(void) #if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); - tab_rel.body.main_color = LV_COLOR_HEX3(0x666); - tab_rel.body.grad_color = LV_COLOR_HEX3(0x666); + tab_rel.body.main_color = lv_color_hex3(0x666); + tab_rel.body.grad_color = lv_color_hex3(0x666); tab_rel.body.padding.left = 0; tab_rel.body.padding.right = 0; tab_rel.body.padding.top = LV_DPI / 6; @@ -731,12 +731,12 @@ static void tabview_init(void) tab_rel.body.border.width = 1; tab_rel.body.border.color = LV_COLOR_SILVER; tab_rel.body.border.opa = LV_OPA_40; - tab_rel.text.color = LV_COLOR_HEX3(0xDDD); + tab_rel.text.color = lv_color_hex3(0xDDD); tab_rel.text.font = _font; lv_style_copy(&tab_pr, &tab_rel); - tab_pr.body.main_color = LV_COLOR_HEX3(0x444); - tab_pr.body.grad_color = LV_COLOR_HEX3(0x444); + tab_pr.body.main_color = lv_color_hex3(0x444); + tab_pr.body.grad_color = lv_color_hex3(0x444); lv_style_copy(&tab_trel, &def); tab_trel.body.opa = LV_OPA_TRANSP; diff --git a/lv_themes/lv_theme_default.c b/lv_themes/lv_theme_default.c index ecf29155870e..b649be608dab 100644 --- a/lv_themes/lv_theme_default.c +++ b/lv_themes/lv_theme_default.c @@ -61,7 +61,7 @@ static void basic_init(void) lv_style_copy(&plain_bordered, &lv_style_plain); plain_bordered.body.border.width = 2; - plain_bordered.body.border.color = LV_COLOR_HEX3(0xbbb); + plain_bordered.body.border.color = lv_color_hex3(0xbbb); theme.style.bg = &lv_style_plain; theme.style.panel = &lv_style_pretty; @@ -87,9 +87,9 @@ static void label_init(void) lv_style_copy(&label_sec, &lv_style_plain); lv_style_copy(&label_hint, &lv_style_plain); - label_prim.text.color = LV_COLOR_HEX3(0x111); - label_sec.text.color = LV_COLOR_HEX3(0x888); - label_hint.text.color = LV_COLOR_HEX3(0xaaa); + label_prim.text.color = lv_color_hex3(0x111); + label_sec.text.color = lv_color_hex3(0x888); + label_hint.text.color = lv_color_hex3(0xaaa); theme.style.label.prim = &label_prim; @@ -180,7 +180,7 @@ static void lmeter_init(void) #if LV_USE_LMETER != 0 lv_style_copy(&lmeter, &lv_style_pretty_color); - lmeter.line.color = LV_COLOR_HEX3(0xddd); + lmeter.line.color = lv_color_hex3(0xddd); lmeter.line.width = 2; lmeter.body.main_color = lv_color_mix(lmeter.body.main_color, LV_COLOR_WHITE, LV_OPA_50); lmeter.body.grad_color = lv_color_mix(lmeter.body.grad_color, LV_COLOR_BLACK, LV_OPA_50); @@ -196,9 +196,9 @@ static void gauge_init(void) lv_style_copy(&gauge, &lmeter); gauge.line.color = lmeter.body.grad_color; gauge.line.width = 2; - gauge.body.main_color = LV_COLOR_HEX3(0x888); + gauge.body.main_color = lv_color_hex3(0x888); gauge.body.grad_color = lmeter.body.main_color; - gauge.text.color = LV_COLOR_HEX3(0x888); + gauge.text.color = lv_color_hex3(0x888); theme.style.gauge = &gauge; #endif diff --git a/lv_themes/lv_theme_material.c b/lv_themes/lv_theme_material.c index b5108209ea5a..fc1f45e3f199 100644 --- a/lv_themes/lv_theme_material.c +++ b/lv_themes/lv_theme_material.c @@ -14,7 +14,7 @@ * DEFINES *********************/ #define DEF_RADIUS 4 -#define DEF_SHADOW_COLOR LV_COLOR_HEX3(0xaaa) +#define DEF_SHADOW_COLOR lv_color_hex3(0xaaa) /********************** * TYPEDEFS @@ -54,7 +54,7 @@ static void basic_init(void) def.body.radius = DEF_RADIUS; lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_HEX(0xf0f0f0); + bg.body.main_color = lv_color_hex(0xf0f0f0); bg.body.grad_color = bg.body.main_color; bg.body.radius = 0; @@ -63,7 +63,7 @@ static void basic_init(void) panel.body.main_color = LV_COLOR_WHITE; panel.body.grad_color = LV_COLOR_WHITE; panel.body.border.width = 1; - panel.body.border.color = LV_COLOR_HEX3(0xbbb); + panel.body.border.color = lv_color_hex3(0xbbb); panel.body.border.opa = LV_OPA_COVER; panel.body.shadow.color = DEF_SHADOW_COLOR; panel.body.shadow.type = LV_SHADOW_BOTTOM; @@ -73,8 +73,8 @@ static void basic_init(void) panel.body.padding.top = LV_DPI / 8; panel.body.padding.bottom = LV_DPI / 8; panel.body.padding.inner = LV_DPI / 12; - panel.text.color = LV_COLOR_HEX3(0x333); - panel.image.color = LV_COLOR_HEX3(0x333); + panel.text.color = lv_color_hex3(0x333); + panel.image.color = lv_color_hex3(0x333); lv_style_copy(&sb, &def); sb.body.main_color = LV_COLOR_BLACK; @@ -134,7 +134,7 @@ static void btn_init(void) tgl_pr.body.shadow.width = 2; lv_style_copy(&ina, &rel); - ina.body.main_color = LV_COLOR_HEX3(0xccc); + ina.body.main_color = lv_color_hex3(0xccc); ina.body.grad_color = ina.body.main_color; ina.body.shadow.width = 0; ina.text.color = lv_color_hsv_to_rgb(_hue, 95, 5); @@ -278,10 +278,10 @@ static void sw_init(void) lv_style_copy(&sw_knob_off, &sw_knob_on); - sw_knob_off.body.main_color = LV_COLOR_HEX(0xfafafa); + sw_knob_off.body.main_color = lv_color_hex(0xfafafa); sw_knob_off.body.grad_color = sw_knob_off.body.main_color; sw_knob_off.body.border.width = 1; - sw_knob_off.body.border.color = LV_COLOR_HEX3(0x999); + sw_knob_off.body.border.color = lv_color_hex3(0x999); sw_knob_off.body.border.opa = LV_OPA_COVER; theme.style.sw.bg = &sw_bg; @@ -300,7 +300,7 @@ static void lmeter_init(void) lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); lmeter.body.grad_color = lmeter.body.main_color; lmeter.body.padding.left = LV_DPI / 10; /*Scale line length*/ - lmeter.line.color = LV_COLOR_HEX3(0x999); + lmeter.line.color = lv_color_hex3(0x999); lmeter.line.width = 2; theme.style.lmeter = &lmeter; @@ -317,8 +317,8 @@ static void gauge_init(void) gauge.body.grad_color = gauge.body.main_color; gauge.body.padding.left = LV_DPI / 16; /*Scale line length*/ gauge.body.padding.inner = LV_DPI / 8; - gauge.body.border.color = LV_COLOR_HEX3(0x999); - gauge.text.color = LV_COLOR_HEX3(0x333); + gauge.body.border.color = lv_color_hex3(0x999); + gauge.text.color = lv_color_hex3(0x333); gauge.line.width = 3; gauge.line.color = lv_color_hsv_to_rgb(_hue, 95, 70); @@ -412,7 +412,7 @@ static void cb_init(void) rel.body.shadow.width = 3; lv_style_copy(&pr, &rel); - pr.body.main_color = LV_COLOR_HEX3(0xccc); + pr.body.main_color = lv_color_hex3(0xccc); pr.body.grad_color = pr.body.main_color; pr.body.shadow.width = 0; @@ -450,18 +450,18 @@ static void btnm_init(void) bg.body.padding.top = 0; bg.body.padding.bottom = 0; bg.body.padding.inner = 0; - bg.text.color = LV_COLOR_HEX3(0x555); + bg.text.color = lv_color_hex3(0x555); lv_style_copy(&rel, theme.style.panel); rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; rel.body.border.width = 1; - rel.body.border.color = LV_COLOR_HEX3(0xbbb); + rel.body.border.color = lv_color_hex3(0xbbb); rel.body.opa = LV_OPA_TRANSP; rel.body.shadow.width = 0; lv_style_copy(&pr, &rel); pr.glass = 0; - pr.body.main_color = LV_COLOR_HEX3(0xddd); + pr.body.main_color = lv_color_hex3(0xddd); pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; pr.body.opa = LV_OPA_COVER; @@ -478,7 +478,7 @@ static void btnm_init(void) tgl_pr.body.border.width = 0; lv_style_copy(&ina, &pr); - ina.body.main_color = LV_COLOR_HEX3(0xccc); + ina.body.main_color = lv_color_hex3(0xccc); ina.body.grad_color = ina.body.main_color; theme.style.btnm.bg = &bg; @@ -549,9 +549,9 @@ static void ta_init(void) oneline.body.radius = 0; oneline.body.border.part = LV_BORDER_BOTTOM; oneline.body.border.width = 3; - oneline.body.border.color = LV_COLOR_HEX3(0x333); + oneline.body.border.color = lv_color_hex3(0x333); oneline.body.border.opa = LV_OPA_COVER; - oneline.text.color = LV_COLOR_HEX3(0x333); + oneline.text.color = lv_color_hex3(0x333); theme.style.ta.area = theme.style.panel; theme.style.ta.oneline = &oneline; @@ -588,13 +588,13 @@ static void list_init(void) rel.body.padding.top = LV_DPI / 6; rel.body.padding.bottom = LV_DPI / 6; rel.body.radius = 10; - rel.body.border.color = LV_COLOR_HEX3(0xbbb); + rel.body.border.color = lv_color_hex3(0xbbb); rel.body.border.width = 1; rel.body.border.part = LV_BORDER_BOTTOM; lv_style_copy(&pr, &rel); pr.glass = 0; - pr.body.main_color = LV_COLOR_HEX3(0xddd); + pr.body.main_color = lv_color_hex3(0xddd); pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; pr.body.opa = LV_OPA_COVER; @@ -613,7 +613,7 @@ static void list_init(void) tgl_pr.body.border.width = 0; lv_style_copy(&ina, &pr); - ina.body.main_color = LV_COLOR_HEX3(0xccc); + ina.body.main_color = lv_color_hex3(0xccc); ina.body.grad_color = ina.body.main_color; @@ -689,11 +689,11 @@ static void tabview_init(void) indic.body.padding.inner = LV_DPI / 20; lv_style_copy(&btn_bg, &def); - btn_bg.body.main_color = LV_COLOR_HEX3(0xccc); + btn_bg.body.main_color = lv_color_hex3(0xccc); btn_bg.body.grad_color = btn_bg.body.main_color; btn_bg.body.radius = 0; btn_bg.body.border.width = 1; - btn_bg.body.border.color = LV_COLOR_HEX3(0x888); + btn_bg.body.border.color = lv_color_hex3(0x888); btn_bg.body.border.part = LV_BORDER_BOTTOM; btn_bg.body.border.opa = LV_OPA_COVER; btn_bg.body.shadow.width = 5; @@ -704,7 +704,7 @@ static void tabview_init(void) btn_bg.body.padding.right = 0; btn_bg.body.padding.top = 0; btn_bg.body.padding.bottom = 0; - btn_bg.text.color = LV_COLOR_HEX3(0x333); + btn_bg.text.color = lv_color_hex3(0x333); lv_style_copy(&rel, &lv_style_transp); @@ -713,16 +713,16 @@ static void tabview_init(void) rel.text.font = _font; lv_style_copy(&pr, &def); - pr.body.main_color = LV_COLOR_HEX3(0xbbb); + pr.body.main_color = lv_color_hex3(0xbbb); pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; pr.body.opa = LV_OPA_COVER; pr.body.radius = 0; pr.body.border.width = 1; - pr.body.border.color = LV_COLOR_HEX3(0x888); + pr.body.border.color = lv_color_hex3(0x888); pr.body.border.part = LV_BORDER_BOTTOM; pr.body.border.opa = LV_OPA_COVER; - pr.text.color = LV_COLOR_HEX3(0x111); + pr.text.color = lv_color_hex3(0x111); lv_style_copy(&tgl_rel, &lv_style_transp); tgl_rel.glass = 0; @@ -780,11 +780,11 @@ static void win_init(void) static lv_style_t header, pr; lv_style_copy(&header, &def); - header.body.main_color = LV_COLOR_HEX3(0xccc); + header.body.main_color = lv_color_hex3(0xccc); header.body.grad_color = header.body.main_color; header.body.radius = 0; header.body.border.width = 1; - header.body.border.color = LV_COLOR_HEX3(0xbbb); + header.body.border.color = lv_color_hex3(0xbbb); header.body.border.part = LV_BORDER_BOTTOM; header.body.border.opa = LV_OPA_COVER; header.body.padding.inner = 0; @@ -792,17 +792,17 @@ static void win_init(void) header.body.padding.right = 0; header.body.padding.top = 0; header.body.padding.bottom = 0; - header.text.color = LV_COLOR_HEX3(0x333); - header.image.color = LV_COLOR_HEX3(0x333); + header.text.color = lv_color_hex3(0x333); + header.image.color = lv_color_hex3(0x333); lv_style_copy(&pr, &def); - pr.body.main_color = LV_COLOR_HEX3(0xbbb); + pr.body.main_color = lv_color_hex3(0xbbb); pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; pr.body.opa = LV_OPA_COVER; pr.body.radius = 0; - pr.text.color = LV_COLOR_HEX3(0x111); - pr.image.color = LV_COLOR_HEX3(0x111); + pr.text.color = lv_color_hex3(0x111); + pr.image.color = lv_color_hex3(0x111); theme.style.win.bg = theme.style.panel; diff --git a/lv_themes/lv_theme_nemo.c b/lv_themes/lv_theme_nemo.c index 090e1677a4f7..03db619053a1 100644 --- a/lv_themes/lv_theme_nemo.c +++ b/lv_themes/lv_theme_nemo.c @@ -75,8 +75,8 @@ static void basic_init(void) def.body.opa = LV_OPA_COVER; def.glass = 0; - def.body.main_color = LV_COLOR_HEX3(0x222); - def.body.grad_color = LV_COLOR_HEX3(0x222); + def.body.main_color = lv_color_hex3(0x222); + def.body.grad_color = lv_color_hex3(0x222); def.body.radius = 0; def.body.padding.left = LV_DPI / 8; def.body.padding.right = LV_DPI / 8; @@ -90,31 +90,31 @@ static void basic_init(void) def.body.shadow.width = 0; def.body.shadow.type = LV_SHADOW_FULL; - def.text.color = LV_COLOR_HEX3(0xDDD); + def.text.color = lv_color_hex3(0xDDD); def.text.font = _font; def.text.letter_space = 1; def.text.line_space = 2; - def.image.color = LV_COLOR_HEX3(0xDDD); + def.image.color = lv_color_hex3(0xDDD); def.image.intense = LV_OPA_TRANSP; - def.line.color = LV_COLOR_HEX3(0xDDD); + def.line.color = lv_color_hex3(0xDDD); def.line.width = 1; /*Background*/ lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_HEX3(0x005); - bg.body.grad_color = LV_COLOR_HEX3(0x045); + bg.body.main_color = lv_color_hex3(0x005); + bg.body.grad_color = lv_color_hex3(0x045); bg.body.border.width = 2; - bg.body.border.color = LV_COLOR_HEX3(0x666); + bg.body.border.color = lv_color_hex3(0x666); bg.body.shadow.color = LV_COLOR_SILVER; /*Panel*/ lv_style_copy(&panel, &def); panel.body.radius = LV_DPI / 10; - panel.body.main_color = LV_COLOR_HEX3(0x500); - panel.body.grad_color = LV_COLOR_HEX3(0x505); - panel.body.border.color = LV_COLOR_HEX3(0xccc); + panel.body.main_color = lv_color_hex3(0x500); + panel.body.grad_color = lv_color_hex3(0x505); + panel.body.border.color = lv_color_hex3(0xccc); panel.body.border.width = 2; panel.body.border.opa = LV_OPA_60; panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); @@ -332,8 +332,8 @@ static void sw_init(void) sw_bg.body.padding.right = -2 ; sw_bg.body.padding.top = -2 ; sw_bg.body.padding.bottom = -2 ; - sw_bg.body.main_color = LV_COLOR_HEX3(0x666); - sw_bg.body.grad_color = LV_COLOR_HEX3(0x999); + sw_bg.body.main_color = lv_color_hex3(0x666); + sw_bg.body.grad_color = lv_color_hex3(0x999); sw_bg.body.border.width = 2; sw_bg.body.border.opa = LV_OPA_50; @@ -362,7 +362,7 @@ static void lmeter_init(void) lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ - lmeter_bg.line.color = LV_COLOR_HEX3(0x500); + lmeter_bg.line.color = lv_color_hex3(0x500); lmeter_bg.line.width = 2; theme.style.lmeter = &lmeter_bg; @@ -382,7 +382,7 @@ static void gauge_init(void) gauge_bg.body.padding.top = LV_DPI / 20; /*Needle center size*/ gauge_bg.body.padding.bottom = LV_DPI / 20; /*Needle center size*/ gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ - gauge_bg.body.border.color = LV_COLOR_HEX3(0x500); + gauge_bg.body.border.color = lv_color_hex3(0x500); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); gauge_bg.line.width = 2; gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); @@ -676,8 +676,8 @@ static void roller_init(void) lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.text.line_space = LV_DPI / 6; roller_bg.body.radius = LV_DPI / 20; - roller_bg.body.main_color = LV_COLOR_HEX3(0x500); - roller_bg.body.grad_color = LV_COLOR_HEX3(0x005); + roller_bg.body.main_color = lv_color_hex3(0x500); + roller_bg.body.grad_color = lv_color_hex3(0x005); roller_bg.body.border.opa = LV_OPA_30; roller_bg.text.opa = LV_OPA_70; roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); @@ -699,8 +699,8 @@ static void tabview_init(void) #if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); - tab_rel.body.main_color = LV_COLOR_HEX3(0x500); - tab_rel.body.grad_color = LV_COLOR_HEX3(0x005); + tab_rel.body.main_color = lv_color_hex3(0x500); + tab_rel.body.grad_color = lv_color_hex3(0x005); tab_rel.body.padding.left = 0; tab_rel.body.padding.right = 0; tab_rel.body.padding.top = LV_DPI / 6; @@ -709,12 +709,12 @@ static void tabview_init(void) tab_rel.body.border.width = 1; tab_rel.body.border.color = LV_COLOR_SILVER; tab_rel.body.border.opa = LV_OPA_40; - tab_rel.text.color = LV_COLOR_HEX3(0xDDD); + tab_rel.text.color = lv_color_hex3(0xDDD); tab_rel.text.font = _font; lv_style_copy(&tab_pr, &tab_rel); - tab_pr.body.main_color = LV_COLOR_HEX3(0x005); - tab_pr.body.grad_color = LV_COLOR_HEX3(0x500); + tab_pr.body.main_color = lv_color_hex3(0x005); + tab_pr.body.grad_color = lv_color_hex3(0x500); lv_style_copy(&tab_trel, &def); tab_trel.body.opa = LV_OPA_TRANSP; diff --git a/lv_themes/lv_theme_night.c b/lv_themes/lv_theme_night.c index 1576db97099f..1ca30f706897 100644 --- a/lv_themes/lv_theme_night.c +++ b/lv_themes/lv_theme_night.c @@ -105,7 +105,7 @@ static void btn_init(void) lv_style_copy(&btn_rel, &def); btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); btn_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); - btn_rel.body.border.color = LV_COLOR_HEX3(0x111); + btn_rel.body.border.color = lv_color_hex3(0x111); btn_rel.body.border.width = 1; btn_rel.body.border.opa = LV_OPA_70; btn_rel.body.padding.left = LV_DPI / 4; @@ -113,10 +113,10 @@ static void btn_init(void) btn_rel.body.padding.top = LV_DPI / 8; btn_rel.body.padding.bottom = LV_DPI / 8; btn_rel.body.shadow.type = LV_SHADOW_BOTTOM; - btn_rel.body.shadow.color = LV_COLOR_HEX3(0x111); + btn_rel.body.shadow.color = lv_color_hex3(0x111); btn_rel.body.shadow.width = LV_DPI / 30; - btn_rel.text.color = LV_COLOR_HEX3(0xeee); - btn_rel.image.color = LV_COLOR_HEX3(0xeee); + btn_rel.text.color = lv_color_hex3(0xeee); + btn_rel.image.color = lv_color_hex3(0xeee); lv_style_copy(&btn_pr, &btn_rel); btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 30); @@ -126,22 +126,22 @@ static void btn_init(void) btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); btn_tgl_rel.body.shadow.width = LV_DPI / 40; - btn_tgl_rel.text.color = LV_COLOR_HEX3(0xddd); - btn_tgl_rel.image.color = LV_COLOR_HEX3(0xddd); + btn_tgl_rel.text.color = lv_color_hex3(0xddd); + btn_tgl_rel.image.color = lv_color_hex3(0xddd); lv_style_copy(&btn_tgl_pr, &btn_rel); btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10); btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 30); btn_tgl_pr.body.shadow.width = LV_DPI / 30; - btn_tgl_pr.text.color = LV_COLOR_HEX3(0xddd); - btn_tgl_pr.image.color = LV_COLOR_HEX3(0xddd); + btn_tgl_pr.text.color = lv_color_hex3(0xddd); + btn_tgl_pr.image.color = lv_color_hex3(0xddd); lv_style_copy(&btn_ina, &btn_rel); btn_ina.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); btn_ina.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); btn_ina.body.shadow.width = 0; - btn_ina.text.color = LV_COLOR_HEX3(0xaaa); - btn_ina.image.color = LV_COLOR_HEX3(0xaaa); + btn_ina.text.color = lv_color_hex3(0xaaa); + btn_ina.image.color = lv_color_hex3(0xaaa); theme.style.btn.rel = &btn_rel; theme.style.btn.pr = &btn_pr; @@ -269,10 +269,10 @@ static void lmeter_init(void) lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/ lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ - lmeter_bg.body.border.color = LV_COLOR_HEX3(0x333); - lmeter_bg.line.color = LV_COLOR_HEX3(0x555); + lmeter_bg.body.border.color = lv_color_hex3(0x333); + lmeter_bg.line.color = lv_color_hex3(0x555); lmeter_bg.line.width = 1; - lmeter_bg.text.color = LV_COLOR_HEX3(0xddd); + lmeter_bg.text.color = lv_color_hex3(0xddd); theme.style.lmeter = &lmeter_bg; #endif @@ -287,7 +287,7 @@ static void gauge_init(void) gauge_bg.body.grad_color = gauge_bg.body.main_color; gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); gauge_bg.line.width = 1; - gauge_bg.text.color = LV_COLOR_HEX3(0xddd); + gauge_bg.text.color = lv_color_hex3(0xddd); theme.style.gauge = &gauge_bg; #endif @@ -337,7 +337,7 @@ static void calendar_init(void) lv_style_copy(&cal_bg, &bg); cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); cal_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); - cal_bg.body.border.color = LV_COLOR_HEX3(0x333); + cal_bg.body.border.color = lv_color_hex3(0x333); cal_bg.body.border.width = 1; cal_bg.body.radius = LV_DPI / 20; cal_bg.body.padding.left = LV_DPI / 10; @@ -351,7 +351,7 @@ static void calendar_init(void) cal_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); cal_header.body.radius = 0; cal_header.body.border.width = 1; - cal_header.body.border.color = LV_COLOR_HEX3(0x333); + cal_header.body.border.color = lv_color_hex3(0x333); cal_header.body.padding.left = LV_DPI / 10; cal_header.body.padding.right = LV_DPI / 10; cal_header.body.padding.top = LV_DPI / 10; @@ -427,8 +427,8 @@ static void cb_init(void) tgl_pr.body.border.width = 1;; lv_style_copy(&ina, &rel); - ina.body.main_color = LV_COLOR_HEX3(0x777); - ina.body.grad_color = LV_COLOR_HEX3(0x777); + ina.body.main_color = lv_color_hex3(0x777); + ina.body.grad_color = lv_color_hex3(0x777); ina.body.border.width = 0; theme.style.cb.bg = &lv_style_transp; @@ -511,7 +511,7 @@ static void mbox_init(void) mbox_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 20); mbox_bg.body.border.width = 1; mbox_bg.body.shadow.width = LV_DPI / 10; - mbox_bg.body.shadow.color = LV_COLOR_HEX3(0x222); + mbox_bg.body.shadow.color = lv_color_hex3(0x222); mbox_bg.body.radius = LV_DPI / 20; theme.style.mbox.bg = &mbox_bg; theme.style.mbox.btn.bg = &lv_style_transp; @@ -528,7 +528,7 @@ static void page_init(void) lv_style_copy(&page_scrl, &bg); page_scrl.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); page_scrl.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); - page_scrl.body.border.color = LV_COLOR_HEX3(0x333); + page_scrl.body.border.color = lv_color_hex3(0x333); page_scrl.body.border.width = 1; page_scrl.body.radius = LV_DPI / 20; @@ -697,7 +697,7 @@ static void win_init(void) #if LV_USE_WIN != 0 static lv_style_t win_bg; lv_style_copy(&win_bg, &bg); - win_bg.body.border.color = LV_COLOR_HEX3(0x333); + win_bg.body.border.color = lv_color_hex3(0x333); win_bg.body.border.width = 1; static lv_style_t win_header; @@ -714,8 +714,8 @@ static void win_init(void) lv_style_copy(&win_btn_pr, &def); win_btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10); win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10); - win_btn_pr.text.color = LV_COLOR_HEX3(0xaaa); - win_btn_pr.image.color = LV_COLOR_HEX3(0xaaa); + win_btn_pr.text.color = lv_color_hex3(0xaaa); + win_btn_pr.image.color = lv_color_hex3(0xaaa); theme.style.win.bg = &win_bg; theme.style.win.sb = &sb; diff --git a/lv_themes/lv_theme_zen.c b/lv_themes/lv_theme_zen.c index f6a13479fb84..94721e161830 100644 --- a/lv_themes/lv_theme_zen.c +++ b/lv_themes/lv_theme_zen.c @@ -51,8 +51,8 @@ static void basic_init(void) lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ def.body.border.opa = LV_OPA_COVER; def.text.font = _font; - def.text.color = LV_COLOR_HEX3(0x444); - def.image.color = LV_COLOR_HEX3(0x444); + def.text.color = lv_color_hex3(0x444); + def.image.color = lv_color_hex3(0x444); lv_style_copy(&bg, &def); bg.body.main_color = LV_COLOR_WHITE; @@ -67,7 +67,7 @@ static void basic_init(void) panel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); panel.body.border.opa = LV_OPA_COVER; panel.body.shadow.width = 4; - panel.body.shadow.color = LV_COLOR_HEX3(0xddd); + panel.body.shadow.color = lv_color_hex3(0xddd); panel.body.padding.left = LV_DPI / 6; panel.body.padding.right = LV_DPI / 6; panel.body.padding.top = LV_DPI / 8; @@ -105,7 +105,7 @@ static void btn_init(void) rel.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90); rel.body.border.opa = LV_OPA_COVER; rel.body.shadow.width = 4; - rel.body.shadow.color = LV_COLOR_HEX3(0xddd); + rel.body.shadow.color = lv_color_hex3(0xddd); rel.body.padding.left = LV_DPI / 4; rel.body.padding.right = LV_DPI / 4; rel.body.padding.top = LV_DPI / 8; @@ -125,9 +125,9 @@ static void btn_init(void) tgl_pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 50); lv_style_copy(&ina, &tgl_pr); - ina.body.border.color = LV_COLOR_HEX3(0xbbb); - ina.text.color = LV_COLOR_HEX3(0xbbb); - ina.image.color = LV_COLOR_HEX3(0xbbb); + ina.body.border.color = lv_color_hex3(0xbbb); + ina.text.color = lv_color_hex3(0xbbb); + ina.image.color = lv_color_hex3(0xbbb); theme.style.btn.rel = &rel; theme.style.btn.pr = ≺ @@ -145,7 +145,7 @@ static void label_init(void) lv_style_copy(&sec, &def); lv_style_copy(&hint, &def); - prim.text.color = LV_COLOR_HEX3(0x555); + prim.text.color = lv_color_hex3(0x555); sec.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); hint.text.color = lv_color_hsv_to_rgb(_hue, 25, 85); @@ -276,7 +276,7 @@ static void lmeter_init(void) static lv_style_t lmeter; lv_style_copy(&lmeter, &def); - lmeter.line.color = LV_COLOR_HEX3(0xddd); + lmeter.line.color = lv_color_hex3(0xddd); lmeter.line.width = 2; lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); lmeter.body.grad_color = lmeter.body.main_color; @@ -295,11 +295,11 @@ static void gauge_init(void) lv_style_copy(&gauge, &def); gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70); gauge.line.width = 1; - gauge.body.main_color = LV_COLOR_HEX3(0x999); + gauge.body.main_color = lv_color_hex3(0x999); gauge.body.grad_color = gauge.body.main_color; gauge.body.padding.left = LV_DPI / 16; gauge.body.padding.right = LV_DPI / 16; - gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/ + gauge.body.border.color = lv_color_hex3(0x666); /*Needle middle color*/ theme.style.gauge = &gauge; #endif @@ -375,7 +375,7 @@ static void cb_init(void) rel.body.border.width = 3; rel.body.border.opa = LV_OPA_COVER; rel.body.border.color = lv_color_hsv_to_rgb(_hue, 35, 80); - rel.body.main_color = LV_COLOR_HEX3(0xfff); + rel.body.main_color = lv_color_hex3(0xfff); rel.body.grad_color = rel.body.main_color; @@ -395,7 +395,7 @@ static void cb_init(void) lv_style_copy(&ina, &rel); - ina.body.border.color = LV_COLOR_HEX3(0xaaa); + ina.body.border.color = lv_color_hex3(0xaaa); theme.style.cb.bg = &lv_style_transp; @@ -446,9 +446,9 @@ static void btnm_init(void) tgl_pr.body.grad_color = tgl_pr.body.main_color; lv_style_copy(&ina, &pr); - ina.body.main_color = LV_COLOR_HEX3(0x888); + ina.body.main_color = lv_color_hex3(0x888); ina.body.grad_color = tgl_pr.body.main_color; - ina.text.color = LV_COLOR_HEX3(0x888);; + ina.text.color = lv_color_hex3(0x888);; theme.style.btnm.bg = &bg; theme.style.btnm.btn.rel = &rel; @@ -464,7 +464,7 @@ static void kb_init(void) #if LV_USE_KB static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_HEX3(0x666); + bg.body.main_color = lv_color_hex3(0x666); bg.body.grad_color = bg.body.main_color; bg.body.padding.left = 0; bg.body.padding.right = 0; @@ -478,34 +478,34 @@ static void kb_init(void) rel.body.opa = LV_OPA_COVER; rel.body.radius = 0; rel.body.border.width = 1; - rel.body.border.color = LV_COLOR_HEX3(0x888); + rel.body.border.color = lv_color_hex3(0x888); rel.body.border.opa = LV_OPA_COVER; rel.text.color = LV_COLOR_WHITE; lv_style_copy(&pr, &def); - pr.body.main_color = LV_COLOR_HEX3(0xeee); + pr.body.main_color = lv_color_hex3(0xeee); pr.body.grad_color = pr.body.main_color; - pr.body.border.color = LV_COLOR_HEX3(0x888); + pr.body.border.color = lv_color_hex3(0x888); pr.body.border.width = 1; pr.body.border.opa = LV_OPA_COVER; pr.body.radius = 0; - pr.text.color = LV_COLOR_HEX3(0x666); + pr.text.color = lv_color_hex3(0x666); lv_style_copy(&tgl_rel, &pr); - tgl_rel.body.main_color = LV_COLOR_HEX3(0x999); + tgl_rel.body.main_color = lv_color_hex3(0x999); tgl_rel.body.grad_color = tgl_rel.body.main_color; tgl_rel.text.color = LV_COLOR_WHITE; lv_style_copy(&tgl_pr, &pr); - tgl_pr.body.main_color = LV_COLOR_HEX3(0xbbb); + tgl_pr.body.main_color = lv_color_hex3(0xbbb); tgl_pr.body.grad_color = tgl_pr.body.main_color; - tgl_pr.text.color = LV_COLOR_HEX3(0xddd); + tgl_pr.text.color = lv_color_hex3(0xddd); lv_style_copy(&ina, &pr); - ina.body.main_color = LV_COLOR_HEX3(0x777); + ina.body.main_color = lv_color_hex3(0x777); ina.body.grad_color = ina.body.main_color; - ina.text.color = LV_COLOR_HEX3(0xbbb); + ina.text.color = lv_color_hex3(0xbbb); theme.style.kb.bg = &bg; theme.style.kb.btn.rel = &rel; @@ -608,8 +608,8 @@ static void list_init(void) rel.body.padding.right = LV_DPI / 8; rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.text.color = LV_COLOR_HEX3(0x666); - rel.image.color = LV_COLOR_HEX3(0x666); + rel.text.color = lv_color_hex3(0x666); + rel.image.color = lv_color_hex3(0x666); lv_style_copy(&pr, &rel); pr.text.color = theme.style.btn.pr->text.color; @@ -647,7 +647,7 @@ static void ddlist_init(void) bg.body.padding.right = LV_DPI / 6; bg.body.padding.top = LV_DPI / 8; bg.body.padding.bottom = LV_DPI / 8; - bg.text.color = LV_COLOR_HEX3(0x666); + bg.text.color = lv_color_hex3(0x666); lv_style_copy(&sel, &def); sel.body.opa = LV_OPA_TRANSP; @@ -668,7 +668,7 @@ static void roller_init(void) bg.body.border.width = 0; bg.body.opa = LV_OPA_TRANSP; bg.text.line_space = LV_DPI / 6; - bg.text.color = LV_COLOR_HEX3(0x999); + bg.text.color = lv_color_hex3(0x999); lv_style_copy(&sel, theme.style.panel); sel.body.radius = LV_RADIUS_CIRCLE; @@ -700,11 +700,11 @@ static void tabview_init(void) lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; - rel.text.color = LV_COLOR_HEX3(0x999); + rel.text.color = lv_color_hex3(0x999); lv_style_copy(&pr, &rel); - pr.text.color = LV_COLOR_HEX3(0x777); + pr.text.color = lv_color_hex3(0x777); lv_style_copy(&tgl_rel, &rel); tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); @@ -759,18 +759,18 @@ static void win_init(void) header.body.border.width = 2; header.body.border.part = LV_BORDER_BOTTOM; header.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90); - header.text.color = LV_COLOR_HEX3(0x666); - header.image.color = LV_COLOR_HEX3(0x666); + header.text.color = lv_color_hex3(0x666); + header.image.color = lv_color_hex3(0x666); lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; - rel.text.color = LV_COLOR_HEX3(0x666); - rel.image.color = LV_COLOR_HEX3(0x666); + rel.text.color = lv_color_hex3(0x666); + rel.image.color = lv_color_hex3(0x666); lv_style_copy(&pr, &rel); - pr.text.color = LV_COLOR_HEX3(0x333); - pr.image.color = LV_COLOR_HEX3(0x333); + pr.text.color = lv_color_hex3(0x333); + pr.image.color = lv_color_hex3(0x333); theme.style.win.bg = theme.style.panel; theme.style.win.sb = &sb; From efd647f85397e4fa7fa56c8f07cae082edbbf269 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 07:59:38 +0100 Subject: [PATCH 141/590] lv_indev_get_key fixes --- lv_core/lv_indev.c | 12 +++++++++--- lv_core/lv_indev.h | 2 +- lv_hal/lv_hal_indev.c | 4 ++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lv_core/lv_indev.c b/lv_core/lv_indev.c index 2d26f86c722b..1112ae6b56da 100644 --- a/lv_core/lv_indev.c +++ b/lv_core/lv_indev.c @@ -198,7 +198,7 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point) } /** - * Get the last key of an input device (for LV_INDEV_TYPE_KEYPAD) + * Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device * @return the last pressed key (0 on error) */ @@ -386,6 +386,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_obj_t * focused = lv_group_get_focused(g); if(focused == NULL) return; + /*Save the last key to compare it with the current latter on RELEASE*/ + uint32_t prev_key = i->proc.types.keypad.last_key; + + /* Save the last key. + * It must be done here else `lv_indev_get_key` will return the last key in events and signals*/ + i->proc.types.keypad.last_key = data->key; + /*Key press happened*/ if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) @@ -468,7 +475,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { /*The user might clear the key when it was released. Always release the pressed key*/ - data->key = i->proc.types.keypad.last_key; + data->key = prev_key; if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); @@ -489,7 +496,6 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } i->proc.types.keypad.last_state = data->state; - i->proc.types.keypad.last_key = data->key; #else (void)data; /*Unused*/ (void)i; /*Unused*/ diff --git a/lv_core/lv_indev.h b/lv_core/lv_indev.h index a5287fca72cd..ff422401506f 100644 --- a/lv_core/lv_indev.h +++ b/lv_core/lv_indev.h @@ -106,7 +106,7 @@ void lv_indev_set_feedback(lv_indev_t *indev, lv_indev_feedback_t feedback); void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point); /** - * Get the last key of an input device (for LV_INDEV_TYPE_KEYPAD) + * Get the last pressed key of an input device (for LV_INDEV_TYPE_KEYPAD) * @param indev pointer to an input device * @return the last pressed key (0 on error) */ diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 2b1d0d2798cd..515438bb33c2 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -116,6 +116,10 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data) data->point.x = indev->proc.types.pointer.act_point.x; data->point.y = indev->proc.types.pointer.act_point.y; } + /*Similarly set at least the last key in case of the the user doesn't set it on release*/ + else if(indev->driver.type == LV_INDEV_TYPE_KEYPAD) { + data->key = indev->proc.types.keypad.last_key; + } if(indev->driver.read_cb) { LV_LOG_TRACE("idnev read started"); From f51bf17e39fc637eeaf0a95616f36f6474ea4f2b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 17 Mar 2019 08:33:03 +0100 Subject: [PATCH 142/590] move lvgl files to src folder --- lv_core/lv_core.mk | 11 --- lv_hal/lv_hal.mk | 8 -- lvgl.h | 95 ++++++++++--------- lvgl.mk | 14 +-- .../lv_conf_checker.py | 4 +- lv_conf_checker.h => src/lv_conf_checker.h | 0 lv_conf_templ.h => src/lv_conf_templ.h | 2 +- src/lv_core/lv_core.mk | 11 +++ {lv_core => src/lv_core}/lv_disp.c | 0 {lv_core => src/lv_core}/lv_disp.h | 0 {lv_core => src/lv_core}/lv_group.c | 0 {lv_core => src/lv_core}/lv_group.h | 2 +- {lv_core => src/lv_core}/lv_indev.c | 0 {lv_core => src/lv_core}/lv_indev.h | 0 {lv_core => src/lv_core}/lv_obj.c | 0 {lv_core => src/lv_core}/lv_obj.h | 2 +- {lv_core => src/lv_core}/lv_refr.c | 0 {lv_core => src/lv_core}/lv_refr.h | 0 {lv_core => src/lv_core}/lv_style.c | 0 {lv_core => src/lv_core}/lv_style.h | 0 {lv_draw => src/lv_draw}/lv_draw.c | 0 {lv_draw => src/lv_draw}/lv_draw.h | 2 +- {lv_draw => src/lv_draw}/lv_draw.mk | 6 +- {lv_draw => src/lv_draw}/lv_draw_arc.c | 0 {lv_draw => src/lv_draw}/lv_draw_arc.h | 0 {lv_draw => src/lv_draw}/lv_draw_basic.c | 0 {lv_draw => src/lv_draw}/lv_draw_basic.h | 2 +- {lv_draw => src/lv_draw}/lv_draw_img.c | 0 {lv_draw => src/lv_draw}/lv_draw_img.h | 0 {lv_draw => src/lv_draw}/lv_draw_label.c | 0 {lv_draw => src/lv_draw}/lv_draw_label.h | 0 {lv_draw => src/lv_draw}/lv_draw_line.c | 0 {lv_draw => src/lv_draw}/lv_draw_line.h | 0 {lv_draw => src/lv_draw}/lv_draw_rect.c | 0 {lv_draw => src/lv_draw}/lv_draw_rect.h | 0 {lv_draw => src/lv_draw}/lv_draw_triangle.c | 0 {lv_draw => src/lv_draw}/lv_draw_triangle.h | 0 {lv_fonts => src/lv_fonts}/lv_font_builtin.c | 0 {lv_fonts => src/lv_fonts}/lv_font_builtin.h | 2 +- .../lv_fonts}/lv_font_dejavu_10.c | 0 .../lv_fonts}/lv_font_dejavu_10_cyrillic.c | 0 .../lv_fonts}/lv_font_dejavu_10_latin_sup.c | 0 .../lv_fonts}/lv_font_dejavu_20.c | 0 .../lv_fonts}/lv_font_dejavu_20_cyrillic.c | 0 .../lv_fonts}/lv_font_dejavu_20_latin_sup.c | 0 .../lv_fonts}/lv_font_dejavu_30.c | 0 .../lv_fonts}/lv_font_dejavu_30_cyrillic.c | 0 .../lv_fonts}/lv_font_dejavu_30_latin_sup.c | 0 .../lv_fonts}/lv_font_dejavu_40.c | 0 .../lv_fonts}/lv_font_dejavu_40_cyrillic.c | 0 .../lv_fonts}/lv_font_dejavu_40_latin_sup.c | 0 .../lv_fonts}/lv_font_monospace_8.c | 0 .../lv_fonts}/lv_font_symbol_10.c | 0 .../lv_fonts}/lv_font_symbol_20.c | 0 .../lv_fonts}/lv_font_symbol_30.c | 0 .../lv_fonts}/lv_font_symbol_40.c | 0 {lv_fonts => src/lv_fonts}/lv_fonts.mk | 6 +- {lv_hal => src/lv_hal}/lv_hal.h | 0 src/lv_hal/lv_hal.mk | 8 ++ {lv_hal => src/lv_hal}/lv_hal_disp.c | 0 {lv_hal => src/lv_hal}/lv_hal_disp.h | 0 {lv_hal => src/lv_hal}/lv_hal_indev.c | 0 {lv_hal => src/lv_hal}/lv_hal_indev.h | 2 +- {lv_hal => src/lv_hal}/lv_hal_tick.c | 2 +- {lv_hal => src/lv_hal}/lv_hal_tick.h | 2 +- {lv_misc => src/lv_misc}/lv_anim.c | 0 {lv_misc => src/lv_misc}/lv_anim.h | 2 +- {lv_misc => src/lv_misc}/lv_area.c | 0 {lv_misc => src/lv_misc}/lv_area.h | 0 {lv_misc => src/lv_misc}/lv_circ.c | 0 {lv_misc => src/lv_misc}/lv_circ.h | 0 {lv_misc => src/lv_misc}/lv_color.c | 0 {lv_misc => src/lv_misc}/lv_color.h | 2 +- {lv_misc => src/lv_misc}/lv_font.c | 0 {lv_misc => src/lv_misc}/lv_font.h | 2 +- {lv_misc => src/lv_misc}/lv_fs.c | 0 {lv_misc => src/lv_misc}/lv_fs.h | 2 +- {lv_misc => src/lv_misc}/lv_gc.c | 0 {lv_misc => src/lv_misc}/lv_gc.h | 2 +- {lv_misc => src/lv_misc}/lv_ll.c | 0 {lv_misc => src/lv_misc}/lv_ll.h | 0 {lv_misc => src/lv_misc}/lv_log.c | 0 {lv_misc => src/lv_misc}/lv_log.h | 2 +- {lv_misc => src/lv_misc}/lv_math.c | 0 {lv_misc => src/lv_misc}/lv_math.h | 0 {lv_misc => src/lv_misc}/lv_mem.c | 0 {lv_misc => src/lv_misc}/lv_mem.h | 2 +- {lv_misc => src/lv_misc}/lv_misc.mk | 6 +- {lv_misc => src/lv_misc}/lv_symbol_def.h | 2 +- {lv_misc => src/lv_misc}/lv_task.c | 0 {lv_misc => src/lv_misc}/lv_task.h | 2 +- {lv_misc => src/lv_misc}/lv_templ.c | 0 {lv_misc => src/lv_misc}/lv_templ.h | 0 {lv_misc => src/lv_misc}/lv_txt.c | 0 {lv_misc => src/lv_misc}/lv_txt.h | 2 +- {lv_objx => src/lv_objx}/lv_arc.c | 0 {lv_objx => src/lv_objx}/lv_arc.h | 2 +- {lv_objx => src/lv_objx}/lv_bar.c | 0 {lv_objx => src/lv_objx}/lv_bar.h | 2 +- {lv_objx => src/lv_objx}/lv_btn.c | 0 {lv_objx => src/lv_objx}/lv_btn.h | 2 +- {lv_objx => src/lv_objx}/lv_btnm.c | 0 {lv_objx => src/lv_objx}/lv_btnm.h | 2 +- {lv_objx => src/lv_objx}/lv_calendar.c | 0 {lv_objx => src/lv_objx}/lv_calendar.h | 2 +- {lv_objx => src/lv_objx}/lv_canvas.c | 0 {lv_objx => src/lv_objx}/lv_canvas.h | 2 +- {lv_objx => src/lv_objx}/lv_cb.c | 0 {lv_objx => src/lv_objx}/lv_cb.h | 2 +- {lv_objx => src/lv_objx}/lv_chart.c | 0 {lv_objx => src/lv_objx}/lv_chart.h | 2 +- {lv_objx => src/lv_objx}/lv_cont.c | 0 {lv_objx => src/lv_objx}/lv_cont.h | 2 +- {lv_objx => src/lv_objx}/lv_ddlist.c | 0 {lv_objx => src/lv_objx}/lv_ddlist.h | 2 +- {lv_objx => src/lv_objx}/lv_gauge.c | 0 {lv_objx => src/lv_objx}/lv_gauge.h | 2 +- {lv_objx => src/lv_objx}/lv_img.c | 0 {lv_objx => src/lv_objx}/lv_img.h | 2 +- {lv_objx => src/lv_objx}/lv_imgbtn.c | 0 {lv_objx => src/lv_objx}/lv_imgbtn.h | 2 +- {lv_objx => src/lv_objx}/lv_kb.c | 0 {lv_objx => src/lv_objx}/lv_kb.h | 2 +- {lv_objx => src/lv_objx}/lv_label.c | 0 {lv_objx => src/lv_objx}/lv_label.h | 2 +- {lv_objx => src/lv_objx}/lv_led.c | 0 {lv_objx => src/lv_objx}/lv_led.h | 2 +- {lv_objx => src/lv_objx}/lv_line.c | 0 {lv_objx => src/lv_objx}/lv_line.h | 2 +- {lv_objx => src/lv_objx}/lv_list.c | 0 {lv_objx => src/lv_objx}/lv_list.h | 2 +- {lv_objx => src/lv_objx}/lv_lmeter.c | 0 {lv_objx => src/lv_objx}/lv_lmeter.h | 2 +- {lv_objx => src/lv_objx}/lv_mbox.c | 0 {lv_objx => src/lv_objx}/lv_mbox.h | 2 +- {lv_objx => src/lv_objx}/lv_objx.mk | 6 +- {lv_objx => src/lv_objx}/lv_objx_templ.c | 0 {lv_objx => src/lv_objx}/lv_objx_templ.h | 2 +- {lv_objx => src/lv_objx}/lv_page.c | 0 {lv_objx => src/lv_objx}/lv_page.h | 2 +- {lv_objx => src/lv_objx}/lv_preload.c | 0 {lv_objx => src/lv_objx}/lv_preload.h | 2 +- {lv_objx => src/lv_objx}/lv_roller.c | 0 {lv_objx => src/lv_objx}/lv_roller.h | 2 +- {lv_objx => src/lv_objx}/lv_slider.c | 0 {lv_objx => src/lv_objx}/lv_slider.h | 2 +- {lv_objx => src/lv_objx}/lv_spinbox.c | 0 {lv_objx => src/lv_objx}/lv_spinbox.h | 2 +- {lv_objx => src/lv_objx}/lv_sw.c | 0 {lv_objx => src/lv_objx}/lv_sw.h | 2 +- {lv_objx => src/lv_objx}/lv_ta.c | 0 {lv_objx => src/lv_objx}/lv_ta.h | 2 +- {lv_objx => src/lv_objx}/lv_table.c | 0 {lv_objx => src/lv_objx}/lv_table.h | 2 +- {lv_objx => src/lv_objx}/lv_tabview.c | 0 {lv_objx => src/lv_objx}/lv_tabview.h | 2 +- {lv_objx => src/lv_objx}/lv_tileview.c | 0 {lv_objx => src/lv_objx}/lv_tileview.h | 2 +- {lv_objx => src/lv_objx}/lv_win.c | 0 {lv_objx => src/lv_objx}/lv_win.h | 2 +- .../lv_porting}/lv_port_disp_templ.c | 0 .../lv_porting}/lv_port_disp_templ.h | 0 .../lv_porting}/lv_port_fs_templ.c | 0 .../lv_porting}/lv_port_fs_templ.h | 0 .../lv_porting}/lv_port_indev_templ.c | 0 .../lv_porting}/lv_port_indev_templ.h | 0 {lv_themes => src/lv_themes}/lv_theme.c | 0 {lv_themes => src/lv_themes}/lv_theme.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_alien.c | 0 {lv_themes => src/lv_themes}/lv_theme_alien.h | 2 +- .../lv_themes}/lv_theme_default.c | 0 .../lv_themes}/lv_theme_default.h | 2 +- .../lv_themes}/lv_theme_material.c | 0 .../lv_themes}/lv_theme_material.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_mono.c | 0 {lv_themes => src/lv_themes}/lv_theme_mono.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_nemo.c | 0 {lv_themes => src/lv_themes}/lv_theme_nemo.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_night.c | 0 {lv_themes => src/lv_themes}/lv_theme_night.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_templ.c | 0 {lv_themes => src/lv_themes}/lv_theme_templ.h | 2 +- {lv_themes => src/lv_themes}/lv_theme_zen.c | 0 {lv_themes => src/lv_themes}/lv_theme_zen.h | 2 +- {lv_themes => src/lv_themes}/lv_themes.mk | 6 +- lv_version.h => src/lv_version.h | 0 186 files changed, 151 insertions(+), 150 deletions(-) delete mode 100644 lv_core/lv_core.mk delete mode 100644 lv_hal/lv_hal.mk rename lv_conf_checker.py => scrips/lv_conf_checker.py (92%) rename lv_conf_checker.h => src/lv_conf_checker.h (100%) rename lv_conf_templ.h => src/lv_conf_templ.h (99%) create mode 100644 src/lv_core/lv_core.mk rename {lv_core => src/lv_core}/lv_disp.c (100%) rename {lv_core => src/lv_core}/lv_disp.h (100%) rename {lv_core => src/lv_core}/lv_group.c (100%) rename {lv_core => src/lv_core}/lv_group.h (99%) rename {lv_core => src/lv_core}/lv_indev.c (100%) rename {lv_core => src/lv_core}/lv_indev.h (100%) rename {lv_core => src/lv_core}/lv_obj.c (100%) rename {lv_core => src/lv_core}/lv_obj.h (99%) rename {lv_core => src/lv_core}/lv_refr.c (100%) rename {lv_core => src/lv_core}/lv_refr.h (100%) rename {lv_core => src/lv_core}/lv_style.c (100%) rename {lv_core => src/lv_core}/lv_style.h (100%) rename {lv_draw => src/lv_draw}/lv_draw.c (100%) rename {lv_draw => src/lv_draw}/lv_draw.h (98%) rename {lv_draw => src/lv_draw}/lv_draw.mk (59%) rename {lv_draw => src/lv_draw}/lv_draw_arc.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_arc.h (100%) rename {lv_draw => src/lv_draw}/lv_draw_basic.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_basic.h (98%) rename {lv_draw => src/lv_draw}/lv_draw_img.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_img.h (100%) rename {lv_draw => src/lv_draw}/lv_draw_label.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_label.h (100%) rename {lv_draw => src/lv_draw}/lv_draw_line.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_line.h (100%) rename {lv_draw => src/lv_draw}/lv_draw_rect.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_rect.h (100%) rename {lv_draw => src/lv_draw}/lv_draw_triangle.c (100%) rename {lv_draw => src/lv_draw}/lv_draw_triangle.h (100%) rename {lv_fonts => src/lv_fonts}/lv_font_builtin.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_builtin.h (98%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_10.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_10_cyrillic.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_10_latin_sup.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_20.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_20_cyrillic.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_20_latin_sup.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_30.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_30_cyrillic.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_30_latin_sup.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_40.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_40_cyrillic.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_dejavu_40_latin_sup.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_monospace_8.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_symbol_10.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_symbol_20.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_symbol_30.c (100%) rename {lv_fonts => src/lv_fonts}/lv_font_symbol_40.c (100%) rename {lv_fonts => src/lv_fonts}/lv_fonts.mk (81%) rename {lv_hal => src/lv_hal}/lv_hal.h (100%) create mode 100644 src/lv_hal/lv_hal.mk rename {lv_hal => src/lv_hal}/lv_hal_disp.c (100%) rename {lv_hal => src/lv_hal}/lv_hal_disp.h (100%) rename {lv_hal => src/lv_hal}/lv_hal_indev.c (100%) rename {lv_hal => src/lv_hal}/lv_hal_indev.h (99%) rename {lv_hal => src/lv_hal}/lv_hal_tick.c (98%) rename {lv_hal => src/lv_hal}/lv_hal_tick.h (97%) rename {lv_misc => src/lv_misc}/lv_anim.c (100%) rename {lv_misc => src/lv_misc}/lv_anim.h (99%) rename {lv_misc => src/lv_misc}/lv_area.c (100%) rename {lv_misc => src/lv_misc}/lv_area.h (100%) rename {lv_misc => src/lv_misc}/lv_circ.c (100%) rename {lv_misc => src/lv_misc}/lv_circ.h (100%) rename {lv_misc => src/lv_misc}/lv_color.c (100%) rename {lv_misc => src/lv_misc}/lv_color.h (99%) rename {lv_misc => src/lv_misc}/lv_font.c (100%) rename {lv_misc => src/lv_misc}/lv_font.h (99%) rename {lv_misc => src/lv_misc}/lv_fs.c (100%) rename {lv_misc => src/lv_misc}/lv_fs.h (99%) rename {lv_misc => src/lv_misc}/lv_gc.c (100%) rename {lv_misc => src/lv_misc}/lv_gc.h (97%) rename {lv_misc => src/lv_misc}/lv_ll.c (100%) rename {lv_misc => src/lv_misc}/lv_ll.h (100%) rename {lv_misc => src/lv_misc}/lv_log.c (100%) rename {lv_misc => src/lv_misc}/lv_log.h (98%) rename {lv_misc => src/lv_misc}/lv_math.c (100%) rename {lv_misc => src/lv_misc}/lv_math.h (100%) rename {lv_misc => src/lv_misc}/lv_mem.c (100%) rename {lv_misc => src/lv_misc}/lv_mem.h (98%) rename {lv_misc => src/lv_misc}/lv_misc.mk (64%) rename {lv_misc => src/lv_misc}/lv_symbol_def.h (99%) rename {lv_misc => src/lv_misc}/lv_task.c (100%) rename {lv_misc => src/lv_misc}/lv_task.h (99%) rename {lv_misc => src/lv_misc}/lv_templ.c (100%) rename {lv_misc => src/lv_misc}/lv_templ.h (100%) rename {lv_misc => src/lv_misc}/lv_txt.c (100%) rename {lv_misc => src/lv_misc}/lv_txt.h (99%) rename {lv_objx => src/lv_objx}/lv_arc.c (100%) rename {lv_objx => src/lv_objx}/lv_arc.h (98%) rename {lv_objx => src/lv_objx}/lv_bar.c (100%) rename {lv_objx => src/lv_objx}/lv_bar.h (99%) rename {lv_objx => src/lv_objx}/lv_btn.c (100%) rename {lv_objx => src/lv_objx}/lv_btn.h (99%) rename {lv_objx => src/lv_objx}/lv_btnm.c (100%) rename {lv_objx => src/lv_objx}/lv_btnm.h (99%) rename {lv_objx => src/lv_objx}/lv_calendar.c (100%) rename {lv_objx => src/lv_objx}/lv_calendar.h (99%) rename {lv_objx => src/lv_objx}/lv_canvas.c (100%) rename {lv_objx => src/lv_objx}/lv_canvas.h (99%) rename {lv_objx => src/lv_objx}/lv_cb.c (100%) rename {lv_objx => src/lv_objx}/lv_cb.h (99%) rename {lv_objx => src/lv_objx}/lv_chart.c (100%) rename {lv_objx => src/lv_objx}/lv_chart.h (99%) rename {lv_objx => src/lv_objx}/lv_cont.c (100%) rename {lv_objx => src/lv_objx}/lv_cont.h (99%) rename {lv_objx => src/lv_objx}/lv_ddlist.c (100%) rename {lv_objx => src/lv_objx}/lv_ddlist.h (99%) rename {lv_objx => src/lv_objx}/lv_gauge.c (100%) rename {lv_objx => src/lv_objx}/lv_gauge.h (99%) rename {lv_objx => src/lv_objx}/lv_img.c (100%) rename {lv_objx => src/lv_objx}/lv_img.h (99%) rename {lv_objx => src/lv_objx}/lv_imgbtn.c (100%) rename {lv_objx => src/lv_objx}/lv_imgbtn.h (99%) rename {lv_objx => src/lv_objx}/lv_kb.c (100%) rename {lv_objx => src/lv_objx}/lv_kb.h (99%) rename {lv_objx => src/lv_objx}/lv_label.c (100%) rename {lv_objx => src/lv_objx}/lv_label.h (99%) rename {lv_objx => src/lv_objx}/lv_led.c (100%) rename {lv_objx => src/lv_objx}/lv_led.h (98%) rename {lv_objx => src/lv_objx}/lv_line.c (100%) rename {lv_objx => src/lv_objx}/lv_line.h (99%) rename {lv_objx => src/lv_objx}/lv_list.c (100%) rename {lv_objx => src/lv_objx}/lv_list.h (99%) rename {lv_objx => src/lv_objx}/lv_lmeter.c (100%) rename {lv_objx => src/lv_objx}/lv_lmeter.h (99%) rename {lv_objx => src/lv_objx}/lv_mbox.c (100%) rename {lv_objx => src/lv_objx}/lv_mbox.h (99%) rename {lv_objx => src/lv_objx}/lv_objx.mk (82%) rename {lv_objx => src/lv_objx}/lv_objx_templ.c (100%) rename {lv_objx => src/lv_objx}/lv_objx_templ.h (98%) rename {lv_objx => src/lv_objx}/lv_page.c (100%) rename {lv_objx => src/lv_objx}/lv_page.h (99%) rename {lv_objx => src/lv_objx}/lv_preload.c (100%) rename {lv_objx => src/lv_objx}/lv_preload.h (99%) rename {lv_objx => src/lv_objx}/lv_roller.c (100%) rename {lv_objx => src/lv_objx}/lv_roller.h (99%) rename {lv_objx => src/lv_objx}/lv_slider.c (100%) rename {lv_objx => src/lv_objx}/lv_slider.h (99%) rename {lv_objx => src/lv_objx}/lv_spinbox.c (100%) rename {lv_objx => src/lv_objx}/lv_spinbox.h (99%) rename {lv_objx => src/lv_objx}/lv_sw.c (100%) rename {lv_objx => src/lv_objx}/lv_sw.h (99%) rename {lv_objx => src/lv_objx}/lv_ta.c (100%) rename {lv_objx => src/lv_objx}/lv_ta.h (99%) rename {lv_objx => src/lv_objx}/lv_table.c (100%) rename {lv_objx => src/lv_objx}/lv_table.h (99%) rename {lv_objx => src/lv_objx}/lv_tabview.c (100%) rename {lv_objx => src/lv_objx}/lv_tabview.h (99%) rename {lv_objx => src/lv_objx}/lv_tileview.c (100%) rename {lv_objx => src/lv_objx}/lv_tileview.h (99%) rename {lv_objx => src/lv_objx}/lv_win.c (100%) rename {lv_objx => src/lv_objx}/lv_win.h (99%) rename {lv_porting => src/lv_porting}/lv_port_disp_templ.c (100%) rename {lv_porting => src/lv_porting}/lv_port_disp_templ.h (100%) rename {lv_porting => src/lv_porting}/lv_port_fs_templ.c (100%) rename {lv_porting => src/lv_porting}/lv_port_fs_templ.h (100%) rename {lv_porting => src/lv_porting}/lv_port_indev_templ.c (100%) rename {lv_porting => src/lv_porting}/lv_port_indev_templ.h (100%) rename {lv_themes => src/lv_themes}/lv_theme.c (100%) rename {lv_themes => src/lv_themes}/lv_theme.h (99%) rename {lv_themes => src/lv_themes}/lv_theme_alien.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_alien.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_default.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_default.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_material.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_material.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_mono.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_mono.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_nemo.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_nemo.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_night.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_night.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_templ.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_templ.h (97%) rename {lv_themes => src/lv_themes}/lv_theme_zen.c (100%) rename {lv_themes => src/lv_themes}/lv_theme_zen.h (97%) rename {lv_themes => src/lv_themes}/lv_themes.mk (62%) rename lv_version.h => src/lv_version.h (100%) diff --git a/lv_core/lv_core.mk b/lv_core/lv_core.mk deleted file mode 100644 index daf6b33b172b..000000000000 --- a/lv_core/lv_core.mk +++ /dev/null @@ -1,11 +0,0 @@ -CSRCS += lv_group.c -CSRCS += lv_indev.c -CSRCS += lv_disp.c -CSRCS += lv_obj.c -CSRCS += lv_refr.c -CSRCS += lv_style.c - -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_core -VPATH += :$(LVGL_DIR)/lvgl/lv_core - -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_core" diff --git a/lv_hal/lv_hal.mk b/lv_hal/lv_hal.mk deleted file mode 100644 index 83f4bf175560..000000000000 --- a/lv_hal/lv_hal.mk +++ /dev/null @@ -1,8 +0,0 @@ -CSRCS += lv_hal_disp.c -CSRCS += lv_hal_indev.c -CSRCS += lv_hal_tick.c - -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_hal -VPATH += :$(LVGL_DIR)/lvgl/lv_hal - -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_hal" diff --git a/lvgl.h b/lvgl.h index f4a3149fc257..efe05f59f2ea 100644 --- a/lvgl.h +++ b/lvgl.h @@ -14,53 +14,54 @@ extern "C" { * INCLUDES *********************/ -#include "lv_version.h" - -#include "lv_misc/lv_log.h" -#include "lv_misc/lv_task.h" - -#include "lv_hal/lv_hal.h" - -#include "lv_core/lv_obj.h" -#include "lv_core/lv_group.h" - -#include "lv_core/lv_refr.h" -#include "lv_core/lv_disp.h" - -#include "lv_themes/lv_theme.h" - -#include "lv_objx/lv_btn.h" -#include "lv_objx/lv_imgbtn.h" -#include "lv_objx/lv_img.h" -#include "lv_objx/lv_label.h" -#include "lv_objx/lv_line.h" -#include "lv_objx/lv_page.h" -#include "lv_objx/lv_cont.h" -#include "lv_objx/lv_list.h" -#include "lv_objx/lv_chart.h" -#include "lv_objx/lv_table.h" -#include "lv_objx/lv_cb.h" -#include "lv_objx/lv_bar.h" -#include "lv_objx/lv_slider.h" -#include "lv_objx/lv_led.h" -#include "lv_objx/lv_btnm.h" -#include "lv_objx/lv_kb.h" -#include "lv_objx/lv_ddlist.h" -#include "lv_objx/lv_roller.h" -#include "lv_objx/lv_ta.h" -#include "lv_objx/lv_canvas.h" -#include "lv_objx/lv_win.h" -#include "lv_objx/lv_tabview.h" -#include "lv_objx/lv_tileview.h" -#include "lv_objx/lv_mbox.h" -#include "lv_objx/lv_gauge.h" -#include "lv_objx/lv_lmeter.h" -#include "lv_objx/lv_sw.h" -#include "lv_objx/lv_kb.h" -#include "lv_objx/lv_arc.h" -#include "lv_objx/lv_preload.h" -#include "lv_objx/lv_calendar.h" -#include "lv_objx/lv_spinbox.h" +#include "src/lv_version.h" + +#include "src/lv_misc/lv_log.h" +#include "src/lv_misc/lv_task.h" +#include "src/lv_misc/lv_math.h" + +#include "src/lv_hal/lv_hal.h" + +#include "src/lv_core/lv_obj.h" +#include "src/lv_core/lv_group.h" + +#include "src/lv_core/lv_refr.h" +#include "src/lv_core/lv_disp.h" + +#include "src/lv_themes/lv_theme.h" + +#include "src/lv_objx/lv_btn.h" +#include "src/lv_objx/lv_imgbtn.h" +#include "src/lv_objx/lv_img.h" +#include "src/lv_objx/lv_label.h" +#include "src/lv_objx/lv_line.h" +#include "src/lv_objx/lv_page.h" +#include "src/lv_objx/lv_cont.h" +#include "src/lv_objx/lv_list.h" +#include "src/lv_objx/lv_chart.h" +#include "src/lv_objx/lv_table.h" +#include "src/lv_objx/lv_cb.h" +#include "src/lv_objx/lv_bar.h" +#include "src/lv_objx/lv_slider.h" +#include "src/lv_objx/lv_led.h" +#include "src/lv_objx/lv_btnm.h" +#include "src/lv_objx/lv_kb.h" +#include "src/lv_objx/lv_ddlist.h" +#include "src/lv_objx/lv_roller.h" +#include "src/lv_objx/lv_ta.h" +#include "src/lv_objx/lv_canvas.h" +#include "src/lv_objx/lv_win.h" +#include "src/lv_objx/lv_tabview.h" +#include "src/lv_objx/lv_tileview.h" +#include "src/lv_objx/lv_mbox.h" +#include "src/lv_objx/lv_gauge.h" +#include "src/lv_objx/lv_lmeter.h" +#include "src/lv_objx/lv_sw.h" +#include "src/lv_objx/lv_kb.h" +#include "src/lv_objx/lv_arc.h" +#include "src/lv_objx/lv_preload.h" +#include "src/lv_objx/lv_calendar.h" +#include "src/lv_objx/lv_spinbox.h" /********************* * DEFINES diff --git a/lvgl.mk b/lvgl.mk index a4f323769ca7..a895f33f144e 100644 --- a/lvgl.mk +++ b/lvgl.mk @@ -1,8 +1,8 @@ -include $(LVGL_DIR)/lvgl/lv_core/lv_core.mk -include $(LVGL_DIR)/lvgl/lv_hal/lv_hal.mk -include $(LVGL_DIR)/lvgl/lv_objx/lv_objx.mk -include $(LVGL_DIR)/lvgl/lv_fonts/lv_fonts.mk -include $(LVGL_DIR)/lvgl/lv_misc/lv_misc.mk -include $(LVGL_DIR)/lvgl/lv_themes/lv_themes.mk -include $(LVGL_DIR)/lvgl/lv_draw/lv_draw.mk +include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk +include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk +include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk +include $(LVGL_DIR)/lvgl/src/lv_fonts/lv_fonts.mk +include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk +include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk +include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk diff --git a/lv_conf_checker.py b/scrips/lv_conf_checker.py similarity index 92% rename from lv_conf_checker.py rename to scrips/lv_conf_checker.py index 1c9cb421a9f3..fa062016a881 100644 --- a/lv_conf_checker.py +++ b/scrips/lv_conf_checker.py @@ -5,8 +5,8 @@ import re -fin = open("lv_conf_templ.h", "r"); -fout = open("lv_conf_checker.h", "w"); +fin = open("../src/lv_conf_templ.h", "r"); +fout = open("../src/lv_conf_checker.h", "w"); fout.write( diff --git a/lv_conf_checker.h b/src/lv_conf_checker.h similarity index 100% rename from lv_conf_checker.h rename to src/lv_conf_checker.h diff --git a/lv_conf_templ.h b/src/lv_conf_templ.h similarity index 99% rename from lv_conf_templ.h rename to src/lv_conf_templ.h index dbd1d8824c90..8def85a492dc 100644 --- a/lv_conf_templ.h +++ b/src/lv_conf_templ.h @@ -353,7 +353,7 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data /*--END OF LV_CONF_H--*/ /*Be sure every define has a default value*/ -#include "lvgl/lv_conf_checker.h" +#include "lvgl/src/lv_conf_checker.h" #endif /*LV_CONF_H*/ diff --git a/src/lv_core/lv_core.mk b/src/lv_core/lv_core.mk new file mode 100644 index 000000000000..5cd51bfb5894 --- /dev/null +++ b/src/lv_core/lv_core.mk @@ -0,0 +1,11 @@ +CSRCS += lv_group.c +CSRCS += lv_indev.c +CSRCS += lv_disp.c +CSRCS += lv_obj.c +CSRCS += lv_refr.c +CSRCS += lv_style.c + +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_core +VPATH += :$(LVGL_DIR)/lvgl/src/lv_core + +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_core" diff --git a/lv_core/lv_disp.c b/src/lv_core/lv_disp.c similarity index 100% rename from lv_core/lv_disp.c rename to src/lv_core/lv_disp.c diff --git a/lv_core/lv_disp.h b/src/lv_core/lv_disp.h similarity index 100% rename from lv_core/lv_disp.h rename to src/lv_core/lv_disp.h diff --git a/lv_core/lv_group.c b/src/lv_core/lv_group.c similarity index 100% rename from lv_core/lv_group.c rename to src/lv_core/lv_group.c diff --git a/lv_core/lv_group.h b/src/lv_core/lv_group.h similarity index 99% rename from lv_core/lv_group.h rename to src/lv_core/lv_group.h index 4cb730f2b5d0..cfba021826eb 100644 --- a/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "lv_obj.h" diff --git a/lv_core/lv_indev.c b/src/lv_core/lv_indev.c similarity index 100% rename from lv_core/lv_indev.c rename to src/lv_core/lv_indev.c diff --git a/lv_core/lv_indev.h b/src/lv_core/lv_indev.h similarity index 100% rename from lv_core/lv_indev.h rename to src/lv_core/lv_indev.h diff --git a/lv_core/lv_obj.c b/src/lv_core/lv_obj.c similarity index 100% rename from lv_core/lv_obj.c rename to src/lv_core/lv_obj.c diff --git a/lv_core/lv_obj.h b/src/lv_core/lv_obj.h similarity index 99% rename from lv_core/lv_obj.h rename to src/lv_core/lv_obj.h index 0d764df34a3e..683cfba1936a 100644 --- a/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_core/lv_refr.c b/src/lv_core/lv_refr.c similarity index 100% rename from lv_core/lv_refr.c rename to src/lv_core/lv_refr.c diff --git a/lv_core/lv_refr.h b/src/lv_core/lv_refr.h similarity index 100% rename from lv_core/lv_refr.h rename to src/lv_core/lv_refr.h diff --git a/lv_core/lv_style.c b/src/lv_core/lv_style.c similarity index 100% rename from lv_core/lv_style.c rename to src/lv_core/lv_style.c diff --git a/lv_core/lv_style.h b/src/lv_core/lv_style.h similarity index 100% rename from lv_core/lv_style.h rename to src/lv_core/lv_style.h diff --git a/lv_draw/lv_draw.c b/src/lv_draw/lv_draw.c similarity index 100% rename from lv_draw/lv_draw.c rename to src/lv_draw/lv_draw.c diff --git a/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h similarity index 98% rename from lv_draw/lv_draw.h rename to src/lv_draw/lv_draw.h index ccd7b2ce478a..a3d41b745787 100644 --- a/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "../lv_core/lv_style.h" diff --git a/lv_draw/lv_draw.mk b/src/lv_draw/lv_draw.mk similarity index 59% rename from lv_draw/lv_draw.mk rename to src/lv_draw/lv_draw.mk index 70fa7103f4a6..ac9e76041337 100644 --- a/lv_draw/lv_draw.mk +++ b/src/lv_draw/lv_draw.mk @@ -7,7 +7,7 @@ CSRCS += lv_draw_img.c CSRCS += lv_draw_arc.c CSRCS += lv_draw_triangle.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_draw -VPATH += :$(LVGL_DIR)/lvgl/lv_draw +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw +VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_draw" +CFLAGS += "-I$(LVGL_DIR)lvgl/src/lv_draw" diff --git a/lv_draw/lv_draw_arc.c b/src/lv_draw/lv_draw_arc.c similarity index 100% rename from lv_draw/lv_draw_arc.c rename to src/lv_draw/lv_draw_arc.c diff --git a/lv_draw/lv_draw_arc.h b/src/lv_draw/lv_draw_arc.h similarity index 100% rename from lv_draw/lv_draw_arc.h rename to src/lv_draw/lv_draw_arc.h diff --git a/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c similarity index 100% rename from lv_draw/lv_draw_basic.c rename to src/lv_draw/lv_draw_basic.c diff --git a/lv_draw/lv_draw_basic.h b/src/lv_draw/lv_draw_basic.h similarity index 98% rename from lv_draw/lv_draw_basic.h rename to src/lv_draw/lv_draw_basic.h index 2e52d29d8db8..ec261744d7dc 100644 --- a/lv_draw/lv_draw_basic.h +++ b/src/lv_draw/lv_draw_basic.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "../lv_misc/lv_color.h" diff --git a/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c similarity index 100% rename from lv_draw/lv_draw_img.c rename to src/lv_draw/lv_draw_img.c diff --git a/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h similarity index 100% rename from lv_draw/lv_draw_img.h rename to src/lv_draw/lv_draw_img.h diff --git a/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c similarity index 100% rename from lv_draw/lv_draw_label.c rename to src/lv_draw/lv_draw_label.c diff --git a/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h similarity index 100% rename from lv_draw/lv_draw_label.h rename to src/lv_draw/lv_draw_label.h diff --git a/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c similarity index 100% rename from lv_draw/lv_draw_line.c rename to src/lv_draw/lv_draw_line.c diff --git a/lv_draw/lv_draw_line.h b/src/lv_draw/lv_draw_line.h similarity index 100% rename from lv_draw/lv_draw_line.h rename to src/lv_draw/lv_draw_line.h diff --git a/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c similarity index 100% rename from lv_draw/lv_draw_rect.c rename to src/lv_draw/lv_draw_rect.c diff --git a/lv_draw/lv_draw_rect.h b/src/lv_draw/lv_draw_rect.h similarity index 100% rename from lv_draw/lv_draw_rect.h rename to src/lv_draw/lv_draw_rect.h diff --git a/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c similarity index 100% rename from lv_draw/lv_draw_triangle.c rename to src/lv_draw/lv_draw_triangle.c diff --git a/lv_draw/lv_draw_triangle.h b/src/lv_draw/lv_draw_triangle.h similarity index 100% rename from lv_draw/lv_draw_triangle.h rename to src/lv_draw/lv_draw_triangle.h diff --git a/lv_fonts/lv_font_builtin.c b/src/lv_fonts/lv_font_builtin.c similarity index 100% rename from lv_fonts/lv_font_builtin.c rename to src/lv_fonts/lv_font_builtin.c diff --git a/lv_fonts/lv_font_builtin.h b/src/lv_fonts/lv_font_builtin.h similarity index 98% rename from lv_fonts/lv_font_builtin.h rename to src/lv_fonts/lv_font_builtin.h index 07667ef32166..65b1e1943609 100644 --- a/lv_fonts/lv_font_builtin.h +++ b/src/lv_fonts/lv_font_builtin.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "../lv_misc/lv_font.h" diff --git a/lv_fonts/lv_font_dejavu_10.c b/src/lv_fonts/lv_font_dejavu_10.c similarity index 100% rename from lv_fonts/lv_font_dejavu_10.c rename to src/lv_fonts/lv_font_dejavu_10.c diff --git a/lv_fonts/lv_font_dejavu_10_cyrillic.c b/src/lv_fonts/lv_font_dejavu_10_cyrillic.c similarity index 100% rename from lv_fonts/lv_font_dejavu_10_cyrillic.c rename to src/lv_fonts/lv_font_dejavu_10_cyrillic.c diff --git a/lv_fonts/lv_font_dejavu_10_latin_sup.c b/src/lv_fonts/lv_font_dejavu_10_latin_sup.c similarity index 100% rename from lv_fonts/lv_font_dejavu_10_latin_sup.c rename to src/lv_fonts/lv_font_dejavu_10_latin_sup.c diff --git a/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c similarity index 100% rename from lv_fonts/lv_font_dejavu_20.c rename to src/lv_fonts/lv_font_dejavu_20.c diff --git a/lv_fonts/lv_font_dejavu_20_cyrillic.c b/src/lv_fonts/lv_font_dejavu_20_cyrillic.c similarity index 100% rename from lv_fonts/lv_font_dejavu_20_cyrillic.c rename to src/lv_fonts/lv_font_dejavu_20_cyrillic.c diff --git a/lv_fonts/lv_font_dejavu_20_latin_sup.c b/src/lv_fonts/lv_font_dejavu_20_latin_sup.c similarity index 100% rename from lv_fonts/lv_font_dejavu_20_latin_sup.c rename to src/lv_fonts/lv_font_dejavu_20_latin_sup.c diff --git a/lv_fonts/lv_font_dejavu_30.c b/src/lv_fonts/lv_font_dejavu_30.c similarity index 100% rename from lv_fonts/lv_font_dejavu_30.c rename to src/lv_fonts/lv_font_dejavu_30.c diff --git a/lv_fonts/lv_font_dejavu_30_cyrillic.c b/src/lv_fonts/lv_font_dejavu_30_cyrillic.c similarity index 100% rename from lv_fonts/lv_font_dejavu_30_cyrillic.c rename to src/lv_fonts/lv_font_dejavu_30_cyrillic.c diff --git a/lv_fonts/lv_font_dejavu_30_latin_sup.c b/src/lv_fonts/lv_font_dejavu_30_latin_sup.c similarity index 100% rename from lv_fonts/lv_font_dejavu_30_latin_sup.c rename to src/lv_fonts/lv_font_dejavu_30_latin_sup.c diff --git a/lv_fonts/lv_font_dejavu_40.c b/src/lv_fonts/lv_font_dejavu_40.c similarity index 100% rename from lv_fonts/lv_font_dejavu_40.c rename to src/lv_fonts/lv_font_dejavu_40.c diff --git a/lv_fonts/lv_font_dejavu_40_cyrillic.c b/src/lv_fonts/lv_font_dejavu_40_cyrillic.c similarity index 100% rename from lv_fonts/lv_font_dejavu_40_cyrillic.c rename to src/lv_fonts/lv_font_dejavu_40_cyrillic.c diff --git a/lv_fonts/lv_font_dejavu_40_latin_sup.c b/src/lv_fonts/lv_font_dejavu_40_latin_sup.c similarity index 100% rename from lv_fonts/lv_font_dejavu_40_latin_sup.c rename to src/lv_fonts/lv_font_dejavu_40_latin_sup.c diff --git a/lv_fonts/lv_font_monospace_8.c b/src/lv_fonts/lv_font_monospace_8.c similarity index 100% rename from lv_fonts/lv_font_monospace_8.c rename to src/lv_fonts/lv_font_monospace_8.c diff --git a/lv_fonts/lv_font_symbol_10.c b/src/lv_fonts/lv_font_symbol_10.c similarity index 100% rename from lv_fonts/lv_font_symbol_10.c rename to src/lv_fonts/lv_font_symbol_10.c diff --git a/lv_fonts/lv_font_symbol_20.c b/src/lv_fonts/lv_font_symbol_20.c similarity index 100% rename from lv_fonts/lv_font_symbol_20.c rename to src/lv_fonts/lv_font_symbol_20.c diff --git a/lv_fonts/lv_font_symbol_30.c b/src/lv_fonts/lv_font_symbol_30.c similarity index 100% rename from lv_fonts/lv_font_symbol_30.c rename to src/lv_fonts/lv_font_symbol_30.c diff --git a/lv_fonts/lv_font_symbol_40.c b/src/lv_fonts/lv_font_symbol_40.c similarity index 100% rename from lv_fonts/lv_font_symbol_40.c rename to src/lv_fonts/lv_font_symbol_40.c diff --git a/lv_fonts/lv_fonts.mk b/src/lv_fonts/lv_fonts.mk similarity index 81% rename from lv_fonts/lv_fonts.mk rename to src/lv_fonts/lv_fonts.mk index f124b5590e4d..002fb75b66ca 100644 --- a/lv_fonts/lv_fonts.mk +++ b/src/lv_fonts/lv_fonts.mk @@ -17,7 +17,7 @@ CSRCS += lv_font_symbol_30.c CSRCS += lv_font_symbol_40.c CSRCS += lv_font_monospace_8.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_fonts -VPATH += :$(LVGL_DIR)/lvgl/lv_fonts +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_fonts +VPATH += :$(LVGL_DIR)/lvgl/src/lv_fonts -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_fonts" +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_fonts" diff --git a/lv_hal/lv_hal.h b/src/lv_hal/lv_hal.h similarity index 100% rename from lv_hal/lv_hal.h rename to src/lv_hal/lv_hal.h diff --git a/src/lv_hal/lv_hal.mk b/src/lv_hal/lv_hal.mk new file mode 100644 index 000000000000..05af078ced04 --- /dev/null +++ b/src/lv_hal/lv_hal.mk @@ -0,0 +1,8 @@ +CSRCS += lv_hal_disp.c +CSRCS += lv_hal_indev.c +CSRCS += lv_hal_tick.c + +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_hal +VPATH += :$(LVGL_DIR)/lvgl/src/lv_hal + +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_hal" diff --git a/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c similarity index 100% rename from lv_hal/lv_hal_disp.c rename to src/lv_hal/lv_hal_disp.c diff --git a/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h similarity index 100% rename from lv_hal/lv_hal_disp.h rename to src/lv_hal/lv_hal_disp.h diff --git a/lv_hal/lv_hal_indev.c b/src/lv_hal/lv_hal_indev.c similarity index 100% rename from lv_hal/lv_hal_indev.c rename to src/lv_hal/lv_hal_indev.c diff --git a/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h similarity index 99% rename from lv_hal/lv_hal_indev.h rename to src/lv_hal/lv_hal_indev.h index 9d224948af52..9ed1479f9479 100644 --- a/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -18,7 +18,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_hal/lv_hal_tick.c b/src/lv_hal/lv_hal_tick.c similarity index 98% rename from lv_hal/lv_hal_tick.c rename to src/lv_hal/lv_hal_tick.c index 0310092c63ad..621e05f53061 100644 --- a/lv_hal/lv_hal_tick.c +++ b/src/lv_hal/lv_hal_tick.c @@ -9,7 +9,7 @@ #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "lv_hal_tick.h" diff --git a/lv_hal/lv_hal_tick.h b/src/lv_hal/lv_hal_tick.h similarity index 97% rename from lv_hal/lv_hal_tick.h rename to src/lv_hal/lv_hal_tick.h index 088b360a7f0b..e016abbf680a 100644 --- a/lv_hal/lv_hal_tick.h +++ b/src/lv_hal/lv_hal_tick.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include #include diff --git a/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c similarity index 100% rename from lv_misc/lv_anim.c rename to src/lv_misc/lv_anim.c diff --git a/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h similarity index 99% rename from lv_misc/lv_anim.h rename to src/lv_misc/lv_anim.h index 611f38611929..70e0db9f08ac 100644 --- a/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_ANIMATION diff --git a/lv_misc/lv_area.c b/src/lv_misc/lv_area.c similarity index 100% rename from lv_misc/lv_area.c rename to src/lv_misc/lv_area.c diff --git a/lv_misc/lv_area.h b/src/lv_misc/lv_area.h similarity index 100% rename from lv_misc/lv_area.h rename to src/lv_misc/lv_area.h diff --git a/lv_misc/lv_circ.c b/src/lv_misc/lv_circ.c similarity index 100% rename from lv_misc/lv_circ.c rename to src/lv_misc/lv_circ.c diff --git a/lv_misc/lv_circ.h b/src/lv_misc/lv_circ.h similarity index 100% rename from lv_misc/lv_circ.h rename to src/lv_misc/lv_circ.h diff --git a/lv_misc/lv_color.c b/src/lv_misc/lv_color.c similarity index 100% rename from lv_misc/lv_color.c rename to src/lv_misc/lv_color.c diff --git a/lv_misc/lv_color.h b/src/lv_misc/lv_color.h similarity index 99% rename from lv_misc/lv_color.h rename to src/lv_misc/lv_color.h index 23855fd9cca3..fc2a483d85c4 100644 --- a/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif /*Error checking*/ diff --git a/lv_misc/lv_font.c b/src/lv_misc/lv_font.c similarity index 100% rename from lv_misc/lv_font.c rename to src/lv_misc/lv_font.c diff --git a/lv_misc/lv_font.h b/src/lv_misc/lv_font.h similarity index 99% rename from lv_misc/lv_font.h rename to src/lv_misc/lv_font.h index d1d24f3fe50f..b09674b337ab 100644 --- a/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c similarity index 100% rename from lv_misc/lv_fs.c rename to src/lv_misc/lv_fs.c diff --git a/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h similarity index 99% rename from lv_misc/lv_fs.h rename to src/lv_misc/lv_fs.h index 35e70408ecc5..3559d35ce9f5 100644 --- a/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_FILESYSTEM diff --git a/lv_misc/lv_gc.c b/src/lv_misc/lv_gc.c similarity index 100% rename from lv_misc/lv_gc.c rename to src/lv_misc/lv_gc.c diff --git a/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h similarity index 97% rename from lv_misc/lv_gc.h rename to src/lv_misc/lv_gc.h index 35559f39b8fa..c6c89e1ef68f 100644 --- a/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c similarity index 100% rename from lv_misc/lv_ll.c rename to src/lv_misc/lv_ll.c diff --git a/lv_misc/lv_ll.h b/src/lv_misc/lv_ll.h similarity index 100% rename from lv_misc/lv_ll.h rename to src/lv_misc/lv_ll.h diff --git a/lv_misc/lv_log.c b/src/lv_misc/lv_log.c similarity index 100% rename from lv_misc/lv_log.c rename to src/lv_misc/lv_log.c diff --git a/lv_misc/lv_log.h b/src/lv_misc/lv_log.h similarity index 98% rename from lv_misc/lv_log.h rename to src/lv_misc/lv_log.h index b124a92946e7..9e399e802fd0 100644 --- a/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_misc/lv_math.c b/src/lv_misc/lv_math.c similarity index 100% rename from lv_misc/lv_math.c rename to src/lv_misc/lv_math.c diff --git a/lv_misc/lv_math.h b/src/lv_misc/lv_math.h similarity index 100% rename from lv_misc/lv_math.h rename to src/lv_misc/lv_math.h diff --git a/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c similarity index 100% rename from lv_misc/lv_mem.c rename to src/lv_misc/lv_mem.c diff --git a/lv_misc/lv_mem.h b/src/lv_misc/lv_mem.h similarity index 98% rename from lv_misc/lv_mem.h rename to src/lv_misc/lv_mem.h index f195f7ac2751..257e18536ca8 100644 --- a/lv_misc/lv_mem.h +++ b/src/lv_misc/lv_mem.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_misc/lv_misc.mk b/src/lv_misc/lv_misc.mk similarity index 64% rename from lv_misc/lv_misc.mk rename to src/lv_misc/lv_misc.mk index ad553d2edc10..f9f2cbdc2b3f 100644 --- a/lv_misc/lv_misc.mk +++ b/src/lv_misc/lv_misc.mk @@ -12,7 +12,7 @@ CSRCS += lv_math.c CSRCS += lv_log.c CSRCS += lv_gc.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_misc -VPATH += :$(LVGL_DIR)/lvgl/lv_misc +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_misc +VPATH += :$(LVGL_DIR)/lvgl/src/lv_misc -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_misc" +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_misc" diff --git a/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h similarity index 99% rename from lv_misc/lv_symbol_def.h rename to src/lv_misc/lv_symbol_def.h index fd73d29bee50..2ecbd18951a1 100644 --- a/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -7,7 +7,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif /* diff --git a/lv_misc/lv_task.c b/src/lv_misc/lv_task.c similarity index 100% rename from lv_misc/lv_task.c rename to src/lv_misc/lv_task.c diff --git a/lv_misc/lv_task.h b/src/lv_misc/lv_task.h similarity index 99% rename from lv_misc/lv_task.h rename to src/lv_misc/lv_task.h index 2c59b3979a6f..a63420fd653a 100644 --- a/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_misc/lv_templ.c b/src/lv_misc/lv_templ.c similarity index 100% rename from lv_misc/lv_templ.c rename to src/lv_misc/lv_templ.c diff --git a/lv_misc/lv_templ.h b/src/lv_misc/lv_templ.h similarity index 100% rename from lv_misc/lv_templ.h rename to src/lv_misc/lv_templ.h diff --git a/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c similarity index 100% rename from lv_misc/lv_txt.c rename to src/lv_misc/lv_txt.c diff --git a/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h similarity index 99% rename from lv_misc/lv_txt.h rename to src/lv_misc/lv_txt.h index 22a780618ac3..c1d955ad160d 100644 --- a/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include diff --git a/lv_objx/lv_arc.c b/src/lv_objx/lv_arc.c similarity index 100% rename from lv_objx/lv_arc.c rename to src/lv_objx/lv_arc.c diff --git a/lv_objx/lv_arc.h b/src/lv_objx/lv_arc.h similarity index 98% rename from lv_objx/lv_arc.h rename to src/lv_objx/lv_arc.h index b37efee2e562..49595f34cc34 100644 --- a/lv_objx/lv_arc.h +++ b/src/lv_objx/lv_arc.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_ARC != 0 diff --git a/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c similarity index 100% rename from lv_objx/lv_bar.c rename to src/lv_objx/lv_bar.c diff --git a/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h similarity index 99% rename from lv_objx/lv_bar.h rename to src/lv_objx/lv_bar.h index c9e98d25a8a8..71cb32fe3018 100644 --- a/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_BAR != 0 diff --git a/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c similarity index 100% rename from lv_objx/lv_btn.c rename to src/lv_objx/lv_btn.c diff --git a/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h similarity index 99% rename from lv_objx/lv_btn.h rename to src/lv_objx/lv_btn.h index 7612cb44ed81..203f069c3b59 100644 --- a/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_BTN != 0 diff --git a/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c similarity index 100% rename from lv_objx/lv_btnm.c rename to src/lv_objx/lv_btnm.c diff --git a/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h similarity index 99% rename from lv_objx/lv_btnm.h rename to src/lv_objx/lv_btnm.h index 6386d4dfb0ce..b1e0f043b9b8 100644 --- a/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_BTNM != 0 diff --git a/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c similarity index 100% rename from lv_objx/lv_calendar.c rename to src/lv_objx/lv_calendar.c diff --git a/lv_objx/lv_calendar.h b/src/lv_objx/lv_calendar.h similarity index 99% rename from lv_objx/lv_calendar.h rename to src/lv_objx/lv_calendar.h index 9064ee2fba7e..19ca98349eb3 100644 --- a/lv_objx/lv_calendar.h +++ b/src/lv_objx/lv_calendar.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_CALENDAR != 0 diff --git a/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c similarity index 100% rename from lv_objx/lv_canvas.c rename to src/lv_objx/lv_canvas.c diff --git a/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h similarity index 99% rename from lv_objx/lv_canvas.h rename to src/lv_objx/lv_canvas.h index f8d6e94d4a24..e68f70d05c14 100644 --- a/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_CANVAS != 0 diff --git a/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c similarity index 100% rename from lv_objx/lv_cb.c rename to src/lv_objx/lv_cb.c diff --git a/lv_objx/lv_cb.h b/src/lv_objx/lv_cb.h similarity index 99% rename from lv_objx/lv_cb.h rename to src/lv_objx/lv_cb.h index 5c6c0b04e3e4..3e8c38f20480 100644 --- a/lv_objx/lv_cb.h +++ b/src/lv_objx/lv_cb.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_CB != 0 diff --git a/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c similarity index 100% rename from lv_objx/lv_chart.c rename to src/lv_objx/lv_chart.c diff --git a/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h similarity index 99% rename from lv_objx/lv_chart.h rename to src/lv_objx/lv_chart.h index 53a674ff346d..d0ca97df1316 100644 --- a/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_CHART != 0 diff --git a/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c similarity index 100% rename from lv_objx/lv_cont.c rename to src/lv_objx/lv_cont.c diff --git a/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h similarity index 99% rename from lv_objx/lv_cont.h rename to src/lv_objx/lv_cont.h index cf09e17409b9..0dade26db9bf 100644 --- a/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_CONT != 0 diff --git a/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c similarity index 100% rename from lv_objx/lv_ddlist.c rename to src/lv_objx/lv_ddlist.c diff --git a/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h similarity index 99% rename from lv_objx/lv_ddlist.h rename to src/lv_objx/lv_ddlist.h index 390352ea9969..5a516a93297b 100644 --- a/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_DDLIST != 0 diff --git a/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c similarity index 100% rename from lv_objx/lv_gauge.c rename to src/lv_objx/lv_gauge.c diff --git a/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h similarity index 99% rename from lv_objx/lv_gauge.h rename to src/lv_objx/lv_gauge.h index b37be3909f16..409c79e0ffaf 100644 --- a/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_GAUGE != 0 diff --git a/lv_objx/lv_img.c b/src/lv_objx/lv_img.c similarity index 100% rename from lv_objx/lv_img.c rename to src/lv_objx/lv_img.c diff --git a/lv_objx/lv_img.h b/src/lv_objx/lv_img.h similarity index 99% rename from lv_objx/lv_img.h rename to src/lv_objx/lv_img.h index 40fa437823c9..8681009b83a1 100644 --- a/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_IMG != 0 diff --git a/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c similarity index 100% rename from lv_objx/lv_imgbtn.c rename to src/lv_objx/lv_imgbtn.c diff --git a/lv_objx/lv_imgbtn.h b/src/lv_objx/lv_imgbtn.h similarity index 99% rename from lv_objx/lv_imgbtn.h rename to src/lv_objx/lv_imgbtn.h index a3d4e7ff409f..de551d67ded4 100644 --- a/lv_objx/lv_imgbtn.h +++ b/src/lv_objx/lv_imgbtn.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_IMGBTN != 0 diff --git a/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c similarity index 100% rename from lv_objx/lv_kb.c rename to src/lv_objx/lv_kb.c diff --git a/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h similarity index 99% rename from lv_objx/lv_kb.h rename to src/lv_objx/lv_kb.h index 1ae5e31561db..4c9c4ec72396 100644 --- a/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_KB != 0 diff --git a/lv_objx/lv_label.c b/src/lv_objx/lv_label.c similarity index 100% rename from lv_objx/lv_label.c rename to src/lv_objx/lv_label.c diff --git a/lv_objx/lv_label.h b/src/lv_objx/lv_label.h similarity index 99% rename from lv_objx/lv_label.h rename to src/lv_objx/lv_label.h index 2acc9c965e4a..b72bc8ecf8ee 100644 --- a/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_LABEL != 0 diff --git a/lv_objx/lv_led.c b/src/lv_objx/lv_led.c similarity index 100% rename from lv_objx/lv_led.c rename to src/lv_objx/lv_led.c diff --git a/lv_objx/lv_led.h b/src/lv_objx/lv_led.h similarity index 98% rename from lv_objx/lv_led.h rename to src/lv_objx/lv_led.h index 8711570b5534..22e6614845b1 100644 --- a/lv_objx/lv_led.h +++ b/src/lv_objx/lv_led.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_LED != 0 diff --git a/lv_objx/lv_line.c b/src/lv_objx/lv_line.c similarity index 100% rename from lv_objx/lv_line.c rename to src/lv_objx/lv_line.c diff --git a/lv_objx/lv_line.h b/src/lv_objx/lv_line.h similarity index 99% rename from lv_objx/lv_line.h rename to src/lv_objx/lv_line.h index d0c546062cfe..b1c9a43a8f9d 100644 --- a/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_LINE != 0 diff --git a/lv_objx/lv_list.c b/src/lv_objx/lv_list.c similarity index 100% rename from lv_objx/lv_list.c rename to src/lv_objx/lv_list.c diff --git a/lv_objx/lv_list.h b/src/lv_objx/lv_list.h similarity index 99% rename from lv_objx/lv_list.h rename to src/lv_objx/lv_list.h index ccf294b52fc7..a634a9f1225d 100644 --- a/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_LIST != 0 diff --git a/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c similarity index 100% rename from lv_objx/lv_lmeter.c rename to src/lv_objx/lv_lmeter.c diff --git a/lv_objx/lv_lmeter.h b/src/lv_objx/lv_lmeter.h similarity index 99% rename from lv_objx/lv_lmeter.h rename to src/lv_objx/lv_lmeter.h index 7852b870edef..dfabe4cb1e90 100644 --- a/lv_objx/lv_lmeter.h +++ b/src/lv_objx/lv_lmeter.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_LMETER != 0 diff --git a/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c similarity index 100% rename from lv_objx/lv_mbox.c rename to src/lv_objx/lv_mbox.c diff --git a/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h similarity index 99% rename from lv_objx/lv_mbox.h rename to src/lv_objx/lv_mbox.h index 1d256b3ac826..953f12c55c44 100644 --- a/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_MBOX != 0 diff --git a/lv_objx/lv_objx.mk b/src/lv_objx/lv_objx.mk similarity index 82% rename from lv_objx/lv_objx.mk rename to src/lv_objx/lv_objx.mk index d35252bce2e0..45b3e2ad32fe 100644 --- a/lv_objx/lv_objx.mk +++ b/src/lv_objx/lv_objx.mk @@ -30,7 +30,7 @@ CSRCS += lv_page.c CSRCS += lv_sw.c CSRCS += lv_win.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_objx -VPATH += :$(LVGL_DIR)/lvgl/lv_objx +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_objx +VPATH += :$(LVGL_DIR)/lvgl/src/lv_objx -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_objx" +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_objx" diff --git a/lv_objx/lv_objx_templ.c b/src/lv_objx/lv_objx_templ.c similarity index 100% rename from lv_objx/lv_objx_templ.c rename to src/lv_objx/lv_objx_templ.c diff --git a/lv_objx/lv_objx_templ.h b/src/lv_objx/lv_objx_templ.h similarity index 98% rename from lv_objx/lv_objx_templ.h rename to src/lv_objx/lv_objx_templ.h index 13a75d1797d0..3fdac8eb6770 100644 --- a/lv_objx/lv_objx_templ.h +++ b/src/lv_objx/lv_objx_templ.h @@ -24,7 +24,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_TEMPL != 0 diff --git a/lv_objx/lv_page.c b/src/lv_objx/lv_page.c similarity index 100% rename from lv_objx/lv_page.c rename to src/lv_objx/lv_page.c diff --git a/lv_objx/lv_page.h b/src/lv_objx/lv_page.h similarity index 99% rename from lv_objx/lv_page.h rename to src/lv_objx/lv_page.h index 365708669bfb..2c9de41f2464 100644 --- a/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_PAGE != 0 diff --git a/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c similarity index 100% rename from lv_objx/lv_preload.c rename to src/lv_objx/lv_preload.c diff --git a/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h similarity index 99% rename from lv_objx/lv_preload.h rename to src/lv_objx/lv_preload.h index 965c2e278e40..913297a1a1eb 100644 --- a/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_PRELOAD != 0 diff --git a/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c similarity index 100% rename from lv_objx/lv_roller.c rename to src/lv_objx/lv_roller.c diff --git a/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h similarity index 99% rename from lv_objx/lv_roller.h rename to src/lv_objx/lv_roller.h index 7314ed4a25f1..bb76de7a6e19 100644 --- a/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_ROLLER != 0 diff --git a/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c similarity index 100% rename from lv_objx/lv_slider.c rename to src/lv_objx/lv_slider.c diff --git a/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h similarity index 99% rename from lv_objx/lv_slider.h rename to src/lv_objx/lv_slider.h index edf376d0802e..7339aba6d52a 100644 --- a/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_SLIDER != 0 diff --git a/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c similarity index 100% rename from lv_objx/lv_spinbox.c rename to src/lv_objx/lv_spinbox.c diff --git a/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h similarity index 99% rename from lv_objx/lv_spinbox.h rename to src/lv_objx/lv_spinbox.h index b387b6a809e6..ab2e6d1ad6c9 100644 --- a/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_SPINBOX != 0 diff --git a/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c similarity index 100% rename from lv_objx/lv_sw.c rename to src/lv_objx/lv_sw.c diff --git a/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h similarity index 99% rename from lv_objx/lv_sw.h rename to src/lv_objx/lv_sw.h index b8e72ef55338..3937cd978b0a 100644 --- a/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_SW != 0 diff --git a/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c similarity index 100% rename from lv_objx/lv_ta.c rename to src/lv_objx/lv_ta.c diff --git a/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h similarity index 99% rename from lv_objx/lv_ta.h rename to src/lv_objx/lv_ta.h index 3a29998dffc2..58234603db92 100644 --- a/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_TA != 0 diff --git a/lv_objx/lv_table.c b/src/lv_objx/lv_table.c similarity index 100% rename from lv_objx/lv_table.c rename to src/lv_objx/lv_table.c diff --git a/lv_objx/lv_table.h b/src/lv_objx/lv_table.h similarity index 99% rename from lv_objx/lv_table.h rename to src/lv_objx/lv_table.h index 422566b010f3..c11dff3362b5 100644 --- a/lv_objx/lv_table.h +++ b/src/lv_objx/lv_table.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_TABLE != 0 diff --git a/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c similarity index 100% rename from lv_objx/lv_tabview.c rename to src/lv_objx/lv_tabview.c diff --git a/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h similarity index 99% rename from lv_objx/lv_tabview.h rename to src/lv_objx/lv_tabview.h index 7a56f3c2234a..6c451a6a6bbc 100644 --- a/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_TABVIEW != 0 diff --git a/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c similarity index 100% rename from lv_objx/lv_tileview.c rename to src/lv_objx/lv_tileview.c diff --git a/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h similarity index 99% rename from lv_objx/lv_tileview.h rename to src/lv_objx/lv_tileview.h index c01aa7faada0..56748747d2be 100644 --- a/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -17,7 +17,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_TILEVIEW != 0 diff --git a/lv_objx/lv_win.c b/src/lv_objx/lv_win.c similarity index 100% rename from lv_objx/lv_win.c rename to src/lv_objx/lv_win.c diff --git a/lv_objx/lv_win.h b/src/lv_objx/lv_win.h similarity index 99% rename from lv_objx/lv_win.h rename to src/lv_objx/lv_win.h index 37d0fd55e3d8..9a153a2e52f6 100644 --- a/lv_objx/lv_win.h +++ b/src/lv_objx/lv_win.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_WIN != 0 diff --git a/lv_porting/lv_port_disp_templ.c b/src/lv_porting/lv_port_disp_templ.c similarity index 100% rename from lv_porting/lv_port_disp_templ.c rename to src/lv_porting/lv_port_disp_templ.c diff --git a/lv_porting/lv_port_disp_templ.h b/src/lv_porting/lv_port_disp_templ.h similarity index 100% rename from lv_porting/lv_port_disp_templ.h rename to src/lv_porting/lv_port_disp_templ.h diff --git a/lv_porting/lv_port_fs_templ.c b/src/lv_porting/lv_port_fs_templ.c similarity index 100% rename from lv_porting/lv_port_fs_templ.c rename to src/lv_porting/lv_port_fs_templ.c diff --git a/lv_porting/lv_port_fs_templ.h b/src/lv_porting/lv_port_fs_templ.h similarity index 100% rename from lv_porting/lv_port_fs_templ.h rename to src/lv_porting/lv_port_fs_templ.h diff --git a/lv_porting/lv_port_indev_templ.c b/src/lv_porting/lv_port_indev_templ.c similarity index 100% rename from lv_porting/lv_port_indev_templ.c rename to src/lv_porting/lv_port_indev_templ.c diff --git a/lv_porting/lv_port_indev_templ.h b/src/lv_porting/lv_port_indev_templ.h similarity index 100% rename from lv_porting/lv_port_indev_templ.h rename to src/lv_porting/lv_port_indev_templ.h diff --git a/lv_themes/lv_theme.c b/src/lv_themes/lv_theme.c similarity index 100% rename from lv_themes/lv_theme.c rename to src/lv_themes/lv_theme.c diff --git a/lv_themes/lv_theme.h b/src/lv_themes/lv_theme.h similarity index 99% rename from lv_themes/lv_theme.h rename to src/lv_themes/lv_theme.h index 8556999798cf..96df2a649085 100644 --- a/lv_themes/lv_theme.h +++ b/src/lv_themes/lv_theme.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include "../lv_core/lv_style.h" diff --git a/lv_themes/lv_theme_alien.c b/src/lv_themes/lv_theme_alien.c similarity index 100% rename from lv_themes/lv_theme_alien.c rename to src/lv_themes/lv_theme_alien.c diff --git a/lv_themes/lv_theme_alien.h b/src/lv_themes/lv_theme_alien.h similarity index 97% rename from lv_themes/lv_theme_alien.h rename to src/lv_themes/lv_theme_alien.h index ca88696ed83d..e25383d0c317 100644 --- a/lv_themes/lv_theme_alien.h +++ b/src/lv_themes/lv_theme_alien.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_ALIEN diff --git a/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c similarity index 100% rename from lv_themes/lv_theme_default.c rename to src/lv_themes/lv_theme_default.c diff --git a/lv_themes/lv_theme_default.h b/src/lv_themes/lv_theme_default.h similarity index 97% rename from lv_themes/lv_theme_default.h rename to src/lv_themes/lv_theme_default.h index 772d76430298..285c6044523f 100644 --- a/lv_themes/lv_theme_default.h +++ b/src/lv_themes/lv_theme_default.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_DEFAULT diff --git a/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c similarity index 100% rename from lv_themes/lv_theme_material.c rename to src/lv_themes/lv_theme_material.c diff --git a/lv_themes/lv_theme_material.h b/src/lv_themes/lv_theme_material.h similarity index 97% rename from lv_themes/lv_theme_material.h rename to src/lv_themes/lv_theme_material.h index 572801f2c583..61fc323a6e24 100644 --- a/lv_themes/lv_theme_material.h +++ b/src/lv_themes/lv_theme_material.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_MATERIAL diff --git a/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c similarity index 100% rename from lv_themes/lv_theme_mono.c rename to src/lv_themes/lv_theme_mono.c diff --git a/lv_themes/lv_theme_mono.h b/src/lv_themes/lv_theme_mono.h similarity index 97% rename from lv_themes/lv_theme_mono.h rename to src/lv_themes/lv_theme_mono.h index 8e0e0553a7eb..52665af1feda 100644 --- a/lv_themes/lv_theme_mono.h +++ b/src/lv_themes/lv_theme_mono.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_MONO diff --git a/lv_themes/lv_theme_nemo.c b/src/lv_themes/lv_theme_nemo.c similarity index 100% rename from lv_themes/lv_theme_nemo.c rename to src/lv_themes/lv_theme_nemo.c diff --git a/lv_themes/lv_theme_nemo.h b/src/lv_themes/lv_theme_nemo.h similarity index 97% rename from lv_themes/lv_theme_nemo.h rename to src/lv_themes/lv_theme_nemo.h index 1f8c702633f2..92aceb85f954 100644 --- a/lv_themes/lv_theme_nemo.h +++ b/src/lv_themes/lv_theme_nemo.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_NEMO diff --git a/lv_themes/lv_theme_night.c b/src/lv_themes/lv_theme_night.c similarity index 100% rename from lv_themes/lv_theme_night.c rename to src/lv_themes/lv_theme_night.c diff --git a/lv_themes/lv_theme_night.h b/src/lv_themes/lv_theme_night.h similarity index 97% rename from lv_themes/lv_theme_night.h rename to src/lv_themes/lv_theme_night.h index 7c1270c40b82..3ea15c370a07 100644 --- a/lv_themes/lv_theme_night.h +++ b/src/lv_themes/lv_theme_night.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_NIGHT diff --git a/lv_themes/lv_theme_templ.c b/src/lv_themes/lv_theme_templ.c similarity index 100% rename from lv_themes/lv_theme_templ.c rename to src/lv_themes/lv_theme_templ.c diff --git a/lv_themes/lv_theme_templ.h b/src/lv_themes/lv_theme_templ.h similarity index 97% rename from lv_themes/lv_theme_templ.h rename to src/lv_themes/lv_theme_templ.h index 9d17c4d9b6be..02a8a862b897 100644 --- a/lv_themes/lv_theme_templ.h +++ b/src/lv_themes/lv_theme_templ.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_TEMPL diff --git a/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c similarity index 100% rename from lv_themes/lv_theme_zen.c rename to src/lv_themes/lv_theme_zen.c diff --git a/lv_themes/lv_theme_zen.h b/src/lv_themes/lv_theme_zen.h similarity index 97% rename from lv_themes/lv_theme_zen.h rename to src/lv_themes/lv_theme_zen.h index b4316733504c..181411fd0bb0 100644 --- a/lv_themes/lv_theme_zen.h +++ b/src/lv_themes/lv_theme_zen.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../lv_conf.h" +#include "../../../lv_conf.h" #endif #if LV_USE_THEME_ZEN diff --git a/lv_themes/lv_themes.mk b/src/lv_themes/lv_themes.mk similarity index 62% rename from lv_themes/lv_themes.mk rename to src/lv_themes/lv_themes.mk index 0e4a81a54632..fce41e4e1a96 100644 --- a/lv_themes/lv_themes.mk +++ b/src/lv_themes/lv_themes.mk @@ -8,7 +8,7 @@ CSRCS += lv_theme_material.c CSRCS += lv_theme_nemo.c CSRCS += lv_theme_mono.c -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_themes -VPATH += :$(LVGL_DIR)/lvgl/lv_themes +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_themes +VPATH += :$(LVGL_DIR)/lvgl/src/lv_themes -CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_themes" +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_themes" diff --git a/lv_version.h b/src/lv_version.h similarity index 100% rename from lv_version.h rename to src/lv_version.h From 6c1152ed0c367a59079da5934b5f82789709b801 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 17 Mar 2019 16:23:08 +0330 Subject: [PATCH 143/590] add update_mode to lv_chart_ext_t struct --- src/lv_objx/lv_chart.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index d0ca97df1316..28de00b01b1f 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -44,6 +44,14 @@ enum }; typedef uint8_t lv_chart_type_t; +/*Chart update mode*/ +enum +{ + LV_CHART_MODE_SHIFT, + LV_CHART_MODE_CIRCULAR, +}; +typedef uint8_t lv_chart_update_mode_t; + typedef struct { lv_coord_t * points; @@ -63,6 +71,7 @@ typedef struct uint8_t vdiv_cnt; /*Number of vertical division lines*/ uint16_t point_cnt; /*Point number in a data line*/ lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ + uint8_t update_mode: 1; struct { lv_coord_t width; /*Line width or point radius*/ uint8_t num; /*Number of data lines in dl_ll*/ From b84358dc7fc34eff383e039cb1344158220e6bec Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 17 Mar 2019 16:38:02 +0330 Subject: [PATCH 144/590] add invalid functions for new data lines when we want to add set data by `lv_chart_set_next` to a chart in `LV_CHART_MODE_CIRCULAR` mode we don't need to invalidate the whole chart object so these functions are added to just invalidate the added data area. --- src/lv_objx/lv_chart.c | 112 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 7 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index c41acb912627..0f1baad98cc6 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -36,7 +36,9 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask); - +static void lv_chart_inv_lines(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); +static void lv_chart_inv_points(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); +static void lv_chart_inv_cols(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); /********************** * STATIC VARIABLES **********************/ @@ -380,12 +382,22 @@ void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * */ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - - ser->points[ser->start_point] = y; /*This was the place of the former left most value, after shifting it is the rightmost*/ - ser->start_point = (ser->start_point + 1) % ext->point_cnt; - - lv_chart_refresh(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(ext->update_mode == LV_CHART_MODE_SHIFT) { + ser->points[ser->start_point] = y; /*This was the place of the former left most value, after shifting it is the rightmost*/ + ser->start_point = (ser->start_point + 1) % ext->point_cnt; + lv_chart_refresh(chart); + } else if(ext->update_mode == LV_CHART_MODE_CIRCULAR) { + static uint16_t x = 0; + ser->points[x] = y; + + if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser, x); + if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser, x); + if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser, x); + if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser, x); + + x = (x + 1) % ext->point_cnt;/*update the x for next incoming y*/ + } } /*===================== @@ -886,4 +898,90 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) } } +/** + * invalid area of the new line data lines on a chart + * @param obj pointer to chart object + */ +static void lv_chart_inv_lines(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t p_prev; + lv_coord_t p_act; + + if(i < ext->point_cnt) { + if(i == 0) { + p_prev = ser->start_point; + } else { + p_prev = (ser->start_point + (i - 1)) % ext->point_cnt; + } + p_act = (ser->start_point + i) % ext->point_cnt; + + if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { + + lv_area_t coords; + lv_obj_get_coords(chart, &coords); + coords.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs - ext->series.width; + coords.x2 = ((w * (i + 1)) / (ext->point_cnt - 1)) + x_ofs + ext->series.width; + lv_inv_area(&coords); + } + } +} + +/** + * invalid area of the new point data lines on a chart + * @param chart pointer to chart object + * @param mask mask, inherited from the design function + */ +static void lv_chart_inv_points(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + lv_area_t cir_a; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t p_act; + + lv_obj_get_coords(chart, &cir_a); + cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + cir_a.x2 = cir_a.x1 + ext->series.width; + cir_a.x1 -= ext->series.width; + p_act = (ser->start_point + i) % ext->point_cnt; + + if(ser->points[p_act] != LV_CHART_POINT_DEF) + lv_inv_area(&cir_a); +} + +/** + * invalid area of the new column data lines on a chart + * @param chart pointer to chart object + * @param mask mask, inherited from the design function + */ +static void lv_chart_inv_cols(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + lv_area_t col_a; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ + lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ + + lv_coord_t x_act; + + x_act = (int32_t)((int32_t) w * i) / ext->point_cnt; + x_act += chart->coords.x1 + x_ofs; + + lv_obj_get_coords(chart, &col_a); + col_a.x1 = x_act; + col_a.x2 = col_a.x1 + col_w; + + //lv_coord_t p_act = (ser->start_point + i) % ext->point_cnt; + + /*if(ser->points[p_act] != LV_CHART_POINT_DEF)*/ { + lv_inv_area(&col_a); + } +} + #endif From fc5f86d696a18651a7fe296e248449bf4fa9c549 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Mon, 18 Mar 2019 01:04:20 +0200 Subject: [PATCH 145/590] Fixed gc issues LV_GC_INCLUDE must be included where LV_GC_ROOT is used pointer to LV_GV_ROOT must come before LV_GC_ROOT macro --- lv_core/lv_group.c | 4 ++++ lv_core/lv_refr.c | 4 ++++ lv_hal/lv_hal_indev.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lv_core/lv_group.c b/lv_core/lv_group.c index 49e065c69bb5..db799e18e940 100644 --- a/lv_core/lv_group.c +++ b/lv_core/lv_group.c @@ -12,6 +12,10 @@ #include #include "../lv_misc/lv_gc.h" +#if defined(LV_GC_INCLUDE) +# include LV_GC_INCLUDE +#endif /* LV_ENABLE_GC */ + /********************* * DEFINES *********************/ diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index e3145751c9a5..307ae84849ce 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -15,6 +15,10 @@ #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_gc.h" +#if defined(LV_GC_INCLUDE) +# include LV_GC_INCLUDE +#endif /* LV_ENABLE_GC */ + /********************* * DEFINES *********************/ diff --git a/lv_hal/lv_hal_indev.c b/lv_hal/lv_hal_indev.c index 2b1d0d2798cd..1200a88b0f82 100644 --- a/lv_hal/lv_hal_indev.c +++ b/lv_hal/lv_hal_indev.c @@ -94,8 +94,8 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) */ lv_indev_t * lv_indev_next(lv_indev_t * indev) { - if(indev == NULL) return lv_ll_get_head(LV_GC_ROOT(&_lv_indev_ll)); - else return lv_ll_get_next(LV_GC_ROOT(&_lv_indev_ll), indev); + if(indev == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll)); + else return lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev); } /** From 85442c25c0d5bce5c490dfb0022da96f66b95fe9 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Mon, 18 Mar 2019 01:27:06 +0200 Subject: [PATCH 146/590] commented out functions without definition Functions that are declared but not defined will cause the micropython build to fail, since it would assume, from file header, that these functions are available and will try to call them (linker error) --- .gitignore | 1 + src/lv_core/lv_refr.h | 4 ++-- src/lv_objx/lv_spinbox.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fcf2481f3a28..8ea2e138ed46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ **/*.o **/*.swp **/*.swo +tags diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index 2bd7d2b63b71..300a9359980d 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -63,14 +63,14 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); /** * Get the number of areas in the buffer * @return number of invalid areas - */ uint16_t lv_refr_get_buf_size(void); + */ /** * Pop (delete) the last 'num' invalidated areas from the buffer * @param num number of areas to delete - */ void lv_refr_pop_from_buf(uint16_t num); + */ /** * Get the display which is being refreshed diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index ab2e6d1ad6c9..cb3b4f3a0a92 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -126,8 +126,8 @@ void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_m * Set spinbox callback on calue change * @param spinbox pointer to spinbox * @param cb Callback function called on value change event - */ void lv_spinbox_set_value_changed_cb(lv_obj_t * spinbox, lv_spinbox_value_changed_cb_t cb); + */ /** * Set spinbox left padding in digits count (added between sign and first digit) From 319834045101b5943a3e27211344d7a7fc1d76de Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 05:22:06 +0100 Subject: [PATCH 147/590] create template fodler --- scrips/lv_conf_checker.py | 2 +- {src => templates}/lv_conf_templ.h | 0 .../lv_port_disp_templ.c => templates/lv_disp_template.c | 0 .../lv_port_disp_templ.h => templates/lv_disp_template.h | 0 src/lv_porting/lv_port_fs_templ.c => templates/lv_fs_template.c | 0 src/lv_porting/lv_port_fs_templ.h => templates/lv_fs_template.h | 0 .../lv_port_indev_templ.c => templates/lv_indev_template.c | 0 .../lv_port_indev_templ.h => templates/lv_indev_template.h | 0 8 files changed, 1 insertion(+), 1 deletion(-) rename {src => templates}/lv_conf_templ.h (100%) rename src/lv_porting/lv_port_disp_templ.c => templates/lv_disp_template.c (100%) rename src/lv_porting/lv_port_disp_templ.h => templates/lv_disp_template.h (100%) rename src/lv_porting/lv_port_fs_templ.c => templates/lv_fs_template.c (100%) rename src/lv_porting/lv_port_fs_templ.h => templates/lv_fs_template.h (100%) rename src/lv_porting/lv_port_indev_templ.c => templates/lv_indev_template.c (100%) rename src/lv_porting/lv_port_indev_templ.h => templates/lv_indev_template.h (100%) diff --git a/scrips/lv_conf_checker.py b/scrips/lv_conf_checker.py index fa062016a881..04fcb9f7299f 100644 --- a/scrips/lv_conf_checker.py +++ b/scrips/lv_conf_checker.py @@ -5,7 +5,7 @@ import re -fin = open("../src/lv_conf_templ.h", "r"); +fin = open("../templates/lv_conf_templ.h", "r"); fout = open("../src/lv_conf_checker.h", "w"); diff --git a/src/lv_conf_templ.h b/templates/lv_conf_templ.h similarity index 100% rename from src/lv_conf_templ.h rename to templates/lv_conf_templ.h diff --git a/src/lv_porting/lv_port_disp_templ.c b/templates/lv_disp_template.c similarity index 100% rename from src/lv_porting/lv_port_disp_templ.c rename to templates/lv_disp_template.c diff --git a/src/lv_porting/lv_port_disp_templ.h b/templates/lv_disp_template.h similarity index 100% rename from src/lv_porting/lv_port_disp_templ.h rename to templates/lv_disp_template.h diff --git a/src/lv_porting/lv_port_fs_templ.c b/templates/lv_fs_template.c similarity index 100% rename from src/lv_porting/lv_port_fs_templ.c rename to templates/lv_fs_template.c diff --git a/src/lv_porting/lv_port_fs_templ.h b/templates/lv_fs_template.h similarity index 100% rename from src/lv_porting/lv_port_fs_templ.h rename to templates/lv_fs_template.h diff --git a/src/lv_porting/lv_port_indev_templ.c b/templates/lv_indev_template.c similarity index 100% rename from src/lv_porting/lv_port_indev_templ.c rename to templates/lv_indev_template.c diff --git a/src/lv_porting/lv_port_indev_templ.h b/templates/lv_indev_template.h similarity index 100% rename from src/lv_porting/lv_port_indev_templ.h rename to templates/lv_indev_template.h From abfdfd1b20340ae75e0e6929ea085880eec7c304 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 05:23:15 +0100 Subject: [PATCH 148/590] rename lv_conf_templ.h to lv_conf_template.h --- templates/{lv_conf_templ.h => lv_conf_template.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename templates/{lv_conf_templ.h => lv_conf_template.h} (100%) diff --git a/templates/lv_conf_templ.h b/templates/lv_conf_template.h similarity index 100% rename from templates/lv_conf_templ.h rename to templates/lv_conf_template.h From 9f29289afd6ec503a090dda52751b7ce97977a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Rubio=20G=C3=B3mez?= Date: Mon, 18 Mar 2019 07:25:20 +0100 Subject: [PATCH 149/590] Added lv_utils and moved functions "bsearch & num_to_str". --- lv_misc/lv_font.c | 22 +++---- lv_misc/lv_math.c | 100 ------------------------------- lv_misc/lv_math.h | 29 --------- lv_misc/lv_misc.mk | 1 + lv_misc/lv_utils.c | 136 ++++++++++++++++++++++++++++++++++++++++++ lv_misc/lv_utils.h | 65 ++++++++++++++++++++ lv_objx/lv_calendar.c | 6 +- lv_objx/lv_gauge.c | 3 +- lv_objx/lv_spinbox.c | 3 +- 9 files changed, 220 insertions(+), 145 deletions(-) create mode 100644 lv_misc/lv_utils.c create mode 100644 lv_misc/lv_utils.h diff --git a/lv_misc/lv_font.c b/lv_misc/lv_font.c index a0acd0f50bad..ed5550a7a203 100644 --- a/lv_misc/lv_font.c +++ b/lv_misc/lv_font.c @@ -9,7 +9,7 @@ #include "lv_font.h" #include "lv_log.h" -#include "lv_math.h" +#include "lv_utils.h" /********************* * DEFINES @@ -221,11 +221,11 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico uint32_t* pUnicode; - pUnicode = lv_bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_utils_bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t), + lv_font_codeCompare); if (pUnicode != NULL) { uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); @@ -265,11 +265,11 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter uint32_t* pUnicode; - pUnicode = lv_bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_utils_bsearch(&unicode_letter, + (uint32_t*) font->unicode_list, + font->glyph_cnt, + sizeof(uint32_t), + lv_font_codeCompare); if (pUnicode != NULL) { uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); diff --git a/lv_misc/lv_math.c b/lv_misc/lv_math.c index 4cf1f12194f2..534770af78b6 100644 --- a/lv_misc/lv_math.c +++ b/lv_misc/lv_math.c @@ -47,63 +47,6 @@ static int16_t sin0_90_table[] = { * GLOBAL FUNCTIONS **********************/ -/** - * Convert a number to string - * @param num a number - * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements) - * @return same as `buf` (just for convenience) - */ -char * lv_math_num_to_str(int32_t num, char * buf) -{ - char * buf_ori = buf; - if(num == 0) { - buf[0] = '0'; - buf[1] = '\0'; - return buf; - } else if(num < 0) { - (*buf) = '-'; - buf++; - num = LV_MATH_ABS(num); - } - uint32_t output = 0; - int8_t i; - - for(i = 31; i >= 0; i--) { - if((output & 0xF) >= 5) - output += 3; - if(((output & 0xF0) >> 4) >= 5) - output += (3 << 4); - if(((output & 0xF00) >> 8) >= 5) - output += (3 << 8); - if(((output & 0xF000) >> 12) >= 5) - output += (3 << 12); - if(((output & 0xF0000) >> 16) >= 5) - output += (3 << 16); - if(((output & 0xF00000) >> 20) >= 5) - output += (3 << 20); - if(((output & 0xF000000) >> 24) >= 5) - output += (3 << 24); - if(((output & 0xF0000000) >> 28) >= 5) - output += (3 << 28); - output = (output << 1) | ((num >> i) & 1); - } - - uint8_t digit; - bool leading_zero_ready = false; - for(i = 28; i >= 0; i -= 4) { - digit = ((output >> i) & 0xF) + '0'; - if(digit == '0' && leading_zero_ready == false) continue; - - leading_zero_ready = true; - (*buf) = digit; - buf++; - } - - (*buf) = '\0'; - - return buf_ori; -} - /** * Return with sinus of an angle * @param angle @@ -159,49 +102,6 @@ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) } - -/** - * Performs a binary search within the given list. - * - * @note Code extracted out of https://github.com/torvalds/linux/blob/master/lib/bsearch.c - * - * @warning The contents of the array should already be in ascending sorted order - * under the provided comparison function. - * - * @note The key need not have the same type as the elements in - * the array, e.g. key could be a string and the comparison function - * could compare the string with the struct's name field. However, if - * the key and elements in the array are of the same type, you can use - * the same comparison function for both sort() and bsearch(). - * - * @param key pointer to item being searched for - * @param base pointer to first element to search - * @param num number of elements - * @param size size of each element - * @param cmp pointer to comparison function - */ -void * lv_bsearch(const void * key, const void * base, uint32_t num, uint32_t size, int32_t (* cmp)(const void * key, const void * elt)) -{ - const char * pivot; - int32_t result; - - while (num > 0) { - pivot = ((char*)base) + (num >> 1) * size; - result = cmp(key, pivot); - - if (result == 0) - return (void *)pivot; - - if (result > 0) { - base = pivot + size; - num--; - } - num >>= 1; - } - - return NULL; -} - /********************** * STATIC FUNCTIONS **********************/ diff --git a/lv_misc/lv_math.h b/lv_misc/lv_math.h index 6abc43815c36..fea5bc950c00 100644 --- a/lv_misc/lv_math.h +++ b/lv_misc/lv_math.h @@ -36,13 +36,6 @@ extern "C" { /********************** * GLOBAL PROTOTYPES **********************/ -/** - * Convert a number to string - * @param num a number - * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements) - * @return same as `buf` (just for convenience) - */ -char * lv_math_num_to_str(int32_t num, char * buf); /** * Return with sinus of an angle @@ -62,28 +55,6 @@ int16_t lv_trigo_sin(int16_t angle); */ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3); -/** - * Performs a binary search within the given list. - * - * @note Code extracted out of https://github.com/torvalds/linux/blob/master/lib/bsearch.c - * - * @warning The contents of the array should already be in ascending sorted order - * under the provided comparison function. - * - * @note The key need not have the same type as the elements in - * the array, e.g. key could be a string and the comparison function - * could compare the string with the struct's name field. However, if - * the key and elements in the array are of the same type, you can use - * the same comparison function for both sort() and bsearch(). - * - * @param key pointer to item being searched for - * @param base pointer to first element to search - * @param num number of elements - * @param size size of each element - * @param cmp pointer to comparison function (see #lv_font_codeCompare as a comparison function example) - */ -void * lv_bsearch(const void * key, const void * base, uint32_t num, uint32_t size, int32_t (* cmp)(const void * key, const void * elt)); - /********************** * MACROS **********************/ diff --git a/lv_misc/lv_misc.mk b/lv_misc/lv_misc.mk index 470f1230d866..007df550d890 100644 --- a/lv_misc/lv_misc.mk +++ b/lv_misc/lv_misc.mk @@ -12,6 +12,7 @@ CSRCS += lv_ufs.c CSRCS += lv_math.c CSRCS += lv_log.c CSRCS += lv_gc.c +CSRCS += lv_utils.c DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_misc VPATH += :$(LVGL_DIR)/lvgl/lv_misc diff --git a/lv_misc/lv_utils.c b/lv_misc/lv_utils.c new file mode 100644 index 000000000000..42cb2594768e --- /dev/null +++ b/lv_misc/lv_utils.c @@ -0,0 +1,136 @@ +/** + * @file lv_utils.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include + +#include "lv_utils.h" +#include "lv_math.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Convert a number to string + * @param num a number + * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements) + * @return same as `buf` (just for convenience) + */ +char * lv_utils_num_to_str(int32_t num, char * buf) +{ + char * buf_ori = buf; + if(num == 0) { + buf[0] = '0'; + buf[1] = '\0'; + return buf; + } else if(num < 0) { + (*buf) = '-'; + buf++; + num = LV_MATH_ABS(num); + } + uint32_t output = 0; + int8_t i; + + for(i = 31; i >= 0; i--) { + if((output & 0xF) >= 5) + output += 3; + if(((output & 0xF0) >> 4) >= 5) + output += (3 << 4); + if(((output & 0xF00) >> 8) >= 5) + output += (3 << 8); + if(((output & 0xF000) >> 12) >= 5) + output += (3 << 12); + if(((output & 0xF0000) >> 16) >= 5) + output += (3 << 16); + if(((output & 0xF00000) >> 20) >= 5) + output += (3 << 20); + if(((output & 0xF000000) >> 24) >= 5) + output += (3 << 24); + if(((output & 0xF0000000) >> 28) >= 5) + output += (3 << 28); + output = (output << 1) | ((num >> i) & 1); + } + + uint8_t digit; + bool leading_zero_ready = false; + for(i = 28; i >= 0; i -= 4) { + digit = ((output >> i) & 0xF) + '0'; + if(digit == '0' && leading_zero_ready == false) continue; + + leading_zero_ready = true; + (*buf) = digit; + buf++; + } + + (*buf) = '\0'; + + return buf_ori; +} + + +/** Searches base[0] to base[n - 1] for an item that matches *key. + * + * @note The function cmp must return negative if its first + * argument (the search key) is less that its second (a table entry), + * zero if equal, and positive if greater. + * + * @note Items in the array must be in ascending order. + * + * @param key Pointer to item being searched for + * @param base Pointer to first element to search + * @param n Number of elements + * @param size Size of each element + * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function example) + * + * @return a pointer to a matching item, or NULL if none exists. + */ +void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, int32_t (* cmp)(const void * pRef, const void * pElement)) +{ + const char * middle; + int32_t c; + + for (middle = base; n != 0;) { + middle += (n/2) * size; + if ((c = (*cmp)(key, middle)) > 0) { + n = (n/2) - ((n&1) == 0); + base = (middle += size); + } else if (c < 0) { + n /= 2; + middle = base; + } else { + return (char *) middle; + } + } + return NULL; +} + +/********************** + * STATIC FUNCTIONS + **********************/ + + diff --git a/lv_misc/lv_utils.h b/lv_misc/lv_utils.h new file mode 100644 index 000000000000..f39adc351924 --- /dev/null +++ b/lv_misc/lv_utils.h @@ -0,0 +1,65 @@ +/** + * @file lv_utils.h + * + */ + +#ifndef LV_UTILS_H +#define LV_UTILS_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/********************* + * INCLUDES + *********************/ +#include +#include + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ +/** + * Convert a number to string + * @param num a number + * @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements) + * @return same as `buf` (just for convenience) + */ +char * lv_utils_num_to_str(int32_t num, char * buf); + +/** Searches base[0] to base[n - 1] for an item that matches *key. + * + * @note The function cmp must return negative if its first + * argument (the search key) is less that its second (a table entry), + * zero if equal, and positive if greater. + * + * @note Items in the array must be in ascending order. + * + * @param key Pointer to item being searched for + * @param base Pointer to first element to search + * @param n Number of elements + * @param size Size of each element + * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function example) + * + * @return a pointer to a matching item, or NULL if none exists. + */ +void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, int32_t (* cmp)(const void * pRef, const void * pElement)); + +/********************** + * MACROS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/lv_objx/lv_calendar.c b/lv_objx/lv_calendar.c index 217c08d56eff..8df6e5dc67a1 100644 --- a/lv_objx/lv_calendar.c +++ b/lv_objx/lv_calendar.c @@ -11,7 +11,7 @@ #include "../lv_draw/lv_draw.h" #include "../lv_hal/lv_hal_indev.h" -#include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_utils.h" #include "../lv_core/lv_indev.h" #include "../lv_themes/lv_theme.h" #include @@ -742,7 +742,7 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) /*Add the year + month name*/ char txt_buf[64]; - lv_math_num_to_str(ext->showed_date.year, txt_buf); + lv_utils_num_to_str(ext->showed_date.year, txt_buf); txt_buf[4] = ' '; txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); @@ -913,7 +913,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) else final_style = act_style; /*Write the day's number*/ - lv_math_num_to_str(day_cnt, buf); + lv_utils_num_to_str(day_cnt, buf); lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); /*Go to the next day*/ diff --git a/lv_objx/lv_gauge.c b/lv_objx/lv_gauge.c index ad2ef8d92929..e93997d32e84 100644 --- a/lv_objx/lv_gauge.c +++ b/lv_objx/lv_gauge.c @@ -14,6 +14,7 @@ #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_utils.h" #include #include @@ -370,7 +371,7 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) int16_t scale_act = (int32_t)((int32_t)(max - min) * i) / (label_num - 1); scale_act += min; - lv_math_num_to_str(scale_act, scale_txt); + lv_utils_num_to_str(scale_act, scale_txt); lv_area_t label_cord; lv_point_t label_size; diff --git a/lv_objx/lv_spinbox.c b/lv_objx/lv_spinbox.c index 70fac33ce072..90603f724452 100644 --- a/lv_objx/lv_spinbox.c +++ b/lv_objx/lv_spinbox.c @@ -11,6 +11,7 @@ #if USE_LV_SPINBOX != 0 #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_utils.h" /********************* * DEFINES @@ -415,7 +416,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox) char digits[64]; /*Convert the numbers to string (the sign is already handled so always covert positive number)*/ - lv_math_num_to_str(ext->value < 0 ? -ext->value : ext->value, digits); + lv_utils_num_to_str(ext->value < 0 ? -ext->value : ext->value, digits); /*Add leading zeros*/ int lz_cnt = ext->digit_count - (int)strlen(digits); From 53b720cff785cb6bae7ed15e4f2a5eb1b5097ab9 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Mar 2019 08:30:49 +0100 Subject: [PATCH 150/590] fix error on compiler without VLA support --- src/lv_draw/lv_draw_img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 504c630634df..b2bbb031559f 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -630,7 +630,7 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else - uint8_t fs_buf[LV_HOR_RES]; + uint8_t fs_buf[LV_HOR_RES_MAX]; # endif #endif const uint8_t * data_tmp = NULL; @@ -717,7 +717,7 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, # if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; # else - uint8_t fs_buf[LV_HOR_RES]; + uint8_t fs_buf[LV_HOR_RES_MAX]; # endif #endif const uint8_t * data_tmp = NULL; From a9f807ac9971ab7c67d4e9c525064ee36de4c71c Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Mon, 18 Mar 2019 10:00:09 +0200 Subject: [PATCH 151/590] removed commented out function declarations --- src/lv_core/lv_refr.h | 12 ------------ src/lv_objx/lv_spinbox.h | 7 ------- 2 files changed, 19 deletions(-) diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index 300a9359980d..789d478898dd 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -60,18 +60,6 @@ void lv_refr_now(void); */ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); -/** - * Get the number of areas in the buffer - * @return number of invalid areas -uint16_t lv_refr_get_buf_size(void); - */ - -/** - * Pop (delete) the last 'num' invalidated areas from the buffer - * @param num number of areas to delete -void lv_refr_pop_from_buf(uint16_t num); - */ - /** * Get the display which is being refreshed * @return the display being refreshed diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index cb3b4f3a0a92..2203ae2e4840 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -122,13 +122,6 @@ void lv_spinbox_set_step(lv_obj_t * spinbox, uint32_t step); */ void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_max); -/** - * Set spinbox callback on calue change - * @param spinbox pointer to spinbox - * @param cb Callback function called on value change event -void lv_spinbox_set_value_changed_cb(lv_obj_t * spinbox, lv_spinbox_value_changed_cb_t cb); - */ - /** * Set spinbox left padding in digits count (added between sign and first digit) * @param spinbox pointer to spinbox From cc8119d0a7b7040c87f45835c19b1ce451e36510 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Mar 2019 10:50:54 +0100 Subject: [PATCH 152/590] lv_btnm: fix function name typo --- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_btnm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index c9a525608157..3f88a7a2ac09 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -590,7 +590,7 @@ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_get_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id) +bool lv_btnm_get_btn_no_repeat(lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return button_is_repeat_disabled(ext->ctrl_bits[btn_id]); diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index b1e0f043b9b8..5d04cec416c3 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -264,7 +264,7 @@ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_get_btn_no_repeate(lv_obj_t * btnm, uint16_t btn_id); +bool lv_btnm_get_btn_no_repeat(lv_obj_t * btnm, uint16_t btn_id); /** * Check whether a button for a button is hidden or not. From 7af68188971ad03628c4977e00c1bce82d4f25a1 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Mon, 18 Mar 2019 08:58:10 -0400 Subject: [PATCH 153/590] Fix remaining instances of LV_HOR_RES/LV_VER_RES in drawing code. Based on #957. --- src/lv_draw/lv_draw_rect.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 1f0202797493..917415ebad71 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -1088,7 +1088,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask #if LV_COMPILER_VLA_SUPPORTED lv_coord_t curve_x[radius + swidth + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else -# if LV_HOR_RES > LV_VER_RES +# if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_coord_t curve_x[LV_HOR_RES_MAX]; # else lv_coord_t curve_x[LV_VER_RES_MAX]; @@ -1109,7 +1109,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask #if LV_COMPILER_VLA_SUPPORTED uint32_t line_1d_blur[filter_width]; #else -# if LV_HOR_RES > LV_VER_RES +# if LV_HOR_RES_MAX > LV_VER_RES_MAX uint32_t line_1d_blur[LV_HOR_RES_MAX]; # else uint32_t line_1d_blur[LV_VER_RES_MAX]; @@ -1125,7 +1125,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask #if LV_COMPILER_VLA_SUPPORTED lv_opa_t line_2d_blur[radius + swidth + 1]; #else -# if LV_HOR_RES > LV_VER_RES +# if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_opa_t line_2d_blur[LV_HOR_RES_MAX]; # else lv_opa_t line_2d_blur[LV_VER_RES_MAX]; @@ -1246,7 +1246,7 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma #if LV_COMPILER_VLA_SUPPORTED lv_coord_t curve_x[radius + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else -# if LV_HOR_RES > LV_VER_RES +# if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_coord_t curve_x[LV_HOR_RES_MAX]; # else lv_coord_t curve_x[LV_VER_RES_MAX]; @@ -1265,7 +1265,7 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma #if LV_COMPILER_VLA_SUPPORTED lv_opa_t line_1d_blur[swidth]; #else -# if LV_HOR_RES > LV_VER_RES +# if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_opa_t line_1d_blur[LV_HOR_RES_MAX]; # else lv_opa_t line_1d_blur[LV_VER_RES_MAX]; From 4dabad3d6e9c71badf00b161e9fa3dcb02b4ff8b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 15:59:20 +0100 Subject: [PATCH 154/590] add lv_conf_template.h to root and rename template folder to porting --- templates/lv_conf_template.h => lv_conf_template.h | 0 templates/lv_disp_template.c => porting/lv_port_disp_tempalte.c | 0 templates/lv_disp_template.h => porting/lv_port_disp_template.h | 0 templates/lv_fs_template.c => porting/lv_port_fs_template.c | 0 templates/lv_fs_template.h => porting/lv_port_fs_template.h | 0 templates/lv_indev_template.c => porting/lv_port_indev_template.c | 0 templates/lv_indev_template.h => porting/lv_port_indev_template.h | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename templates/lv_conf_template.h => lv_conf_template.h (100%) rename templates/lv_disp_template.c => porting/lv_port_disp_tempalte.c (100%) rename templates/lv_disp_template.h => porting/lv_port_disp_template.h (100%) rename templates/lv_fs_template.c => porting/lv_port_fs_template.c (100%) rename templates/lv_fs_template.h => porting/lv_port_fs_template.h (100%) rename templates/lv_indev_template.c => porting/lv_port_indev_template.c (100%) rename templates/lv_indev_template.h => porting/lv_port_indev_template.h (100%) diff --git a/templates/lv_conf_template.h b/lv_conf_template.h similarity index 100% rename from templates/lv_conf_template.h rename to lv_conf_template.h diff --git a/templates/lv_disp_template.c b/porting/lv_port_disp_tempalte.c similarity index 100% rename from templates/lv_disp_template.c rename to porting/lv_port_disp_tempalte.c diff --git a/templates/lv_disp_template.h b/porting/lv_port_disp_template.h similarity index 100% rename from templates/lv_disp_template.h rename to porting/lv_port_disp_template.h diff --git a/templates/lv_fs_template.c b/porting/lv_port_fs_template.c similarity index 100% rename from templates/lv_fs_template.c rename to porting/lv_port_fs_template.c diff --git a/templates/lv_fs_template.h b/porting/lv_port_fs_template.h similarity index 100% rename from templates/lv_fs_template.h rename to porting/lv_port_fs_template.h diff --git a/templates/lv_indev_template.c b/porting/lv_port_indev_template.c similarity index 100% rename from templates/lv_indev_template.c rename to porting/lv_port_indev_template.c diff --git a/templates/lv_indev_template.h b/porting/lv_port_indev_template.h similarity index 100% rename from templates/lv_indev_template.h rename to porting/lv_port_indev_template.h From 615186c5d6ef6ddbb4738b1a0d037b4c1e16808c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 16:02:53 +0100 Subject: [PATCH 155/590] lv_kb: fix typo --- src/lv_objx/lv_kb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 3830ce81910f..f90e9d07a469 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -371,7 +371,7 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - bool no_rep = lv_btnm_get_btn_no_repeate(kb, lv_btnm_get_active_btn(kb)); + bool no_rep = lv_btnm_get_btn_no_repeat(kb, lv_btnm_get_active_btn(kb)); if(no_rep == false) lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_FOCUS) { From 627383fd0db1c9ead09044a4f92ed8eb68efea7b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 16:16:52 +0100 Subject: [PATCH 156/590] draw triangle opa_scale fixes --- src/lv_draw/lv_draw_triangle.c | 10 +++++++--- src/lv_draw/lv_draw_triangle.h | 4 ++-- {lv_misc => src/lv_misc}/lv_utils.c | 0 {lv_misc => src/lv_misc}/lv_utils.h | 0 4 files changed, 9 insertions(+), 5 deletions(-) rename {lv_misc => src/lv_misc}/lv_utils.c (100%) rename {lv_misc => src/lv_misc}/lv_utils.h (100%) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 3cc00424708d..587d23aa7a76 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -33,14 +33,15 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * GLOBAL FUNCTIONS **********************/ + /** * * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask - * @param color color of the triangle + * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color, lv_opa_t opa_scale) +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { lv_point_t tri[3]; @@ -86,6 +87,9 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo lv_area_t act_area; lv_area_t draw_area; + + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + while(1) { act_area.x1 = edge1.x; act_area.x2 = edge2.x ; @@ -98,7 +102,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_colo draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent triangle*/ - lv_draw_fill(&draw_area, mask, color, LV_OPA_COVER); + lv_draw_fill(&draw_area, mask, style->body.main_color, opa); /*Calc. the next point of edge1*/ y1_tmp = edge1.y; diff --git a/src/lv_draw/lv_draw_triangle.h b/src/lv_draw/lv_draw_triangle.h index 11ec2a1d9d8d..d4070e34e15a 100644 --- a/src/lv_draw/lv_draw_triangle.h +++ b/src/lv_draw/lv_draw_triangle.h @@ -31,10 +31,10 @@ extern "C" { * * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask - * @param color color of the triangle + * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color, lv_opa_t opa_scale); +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); /********************** * MACROS diff --git a/lv_misc/lv_utils.c b/src/lv_misc/lv_utils.c similarity index 100% rename from lv_misc/lv_utils.c rename to src/lv_misc/lv_utils.c diff --git a/lv_misc/lv_utils.h b/src/lv_misc/lv_utils.h similarity index 100% rename from lv_misc/lv_utils.h rename to src/lv_misc/lv_utils.h From 1927376fe571a17fec6a5cca7a2abff63c35980c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 18 Mar 2019 16:17:32 +0100 Subject: [PATCH 157/590] move lv_utils to src/lv_misc --- src/lv_misc/lv_utils.c | 2 +- src/lv_objx/lv_chart.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lv_misc/lv_utils.c b/src/lv_misc/lv_utils.c index 5ea61771012a..2d91526fadb9 100644 --- a/src/lv_misc/lv_utils.c +++ b/src/lv_misc/lv_utils.c @@ -52,7 +52,7 @@ char * lv_utils_num_to_str(int32_t num, char * buf) int8_t i = 0; if (num < 0) { buf[digitCount++] = '-'; - num = abs(num); + num = LV_MATH_ABS(num); ++i; } while (num) { diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index c41acb912627..871d56b66f98 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -844,12 +844,10 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); lv_style_t style; lv_style_copy(&style, &lv_style_plain); - style.line.opa = ext->series.opa; - style.line.width = ext->series.width; /*Go through all data lines*/ LV_LL_READ_BACK(ext->series_ll, ser) { - style.line.color = ser->color; + style.body.main_color = ser->color; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; @@ -877,9 +875,9 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) triangle_points[1].y = y_ofs + h; triangle_points[2].x = p1.x; triangle_points[2].y = y_ofs + h; - lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + lv_draw_triangle(triangle_points, mask, &style, opa_scale); triangle_points[2] = p2; - lv_draw_triangle(triangle_points, mask, style.line.color, opa_scale); + lv_draw_triangle(triangle_points, mask, &style, opa_scale); } p_prev = p_act; } From 4d8ec83866bf25e4a6c0e45d61513708781013e2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Mar 2019 03:45:10 +0100 Subject: [PATCH 158/590] fix(event): in lv_obj_del get the focused obj before removing the obj from the group fix #946 --- src/lv_core/lv_obj.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 15f4db5e4a8d..cd5cac3839ad 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -342,11 +342,16 @@ lv_res_t lv_obj_del(lv_obj_t * obj) { lv_obj_invalidate(obj); - if(obj_act_event == obj) obj_act_event_deleted = true; + if(obj_act_event == obj && obj_act_event_deleted == false) obj_act_event_deleted = true; /*Delete from the group*/ #if LV_USE_GROUP - if(obj->group_p != NULL) lv_group_remove_obj(obj); + bool was_focused = false; + + if(obj->group_p) { + if(lv_group_get_focused(obj->group_p) == obj) was_focused = true; + lv_group_remove_obj(obj); + } #endif /*Remove the animations from this object*/ @@ -385,9 +390,12 @@ lv_res_t lv_obj_del(lv_obj_t * obj) if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } - if(lv_group_get_focused(indev->group) == obj) { + +#if LV_USE_GROUP + if(was_focused) { lv_indev_reset(indev); } +#endif indev = lv_indev_next(indev); } @@ -1195,7 +1203,9 @@ lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) obj_act_event = prev_obj_act_event; obj_act_event_deleted = prev_obj_act_event_deleted; - if(deleted) return LV_RES_INV; + if(deleted) { + return LV_RES_INV; + } if(obj->parent_event && obj->par) { lv_res_t res = lv_obj_send_event(obj->par, event); @@ -1996,7 +2006,7 @@ static void refresh_children_style(lv_obj_t * obj) static void delete_children(lv_obj_t * obj) { - if(obj_act_event == obj) obj_act_event_deleted = true; + if(obj_act_event == obj && obj_act_event_deleted == false) obj_act_event_deleted = true; lv_obj_t * i; lv_obj_t * i_next; @@ -2006,7 +2016,12 @@ static void delete_children(lv_obj_t * obj) * the object still has access to all children during the * LV_SIGNAL_DEFOCUS call*/ #if LV_USE_GROUP - if(obj->group_p != NULL) lv_group_remove_obj(obj); + bool was_focused = false; + + if(obj->group_p) { + if(lv_group_get_focused(obj->group_p) == obj) was_focused = true; + lv_group_remove_obj(obj); + } #endif while(i != NULL) { @@ -2032,9 +2047,11 @@ static void delete_children(lv_obj_t * obj) if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } - if(lv_group_get_focused(indev->group) == obj) { +#if LV_USE_GROUP + if(was_focused) { lv_indev_reset(indev); } +#endif indev = lv_indev_next(indev); } From ee04c41da8beb03c28ab50525fba4649c106707f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Mar 2019 06:30:05 +0100 Subject: [PATCH 159/590] feat(event): add LV_EVENT_SELECTED, event data paramter and update lv_btnm API --- src/lv_core/lv_group.c | 10 +- src/lv_core/lv_indev.c | 54 ++++----- src/lv_core/lv_obj.c | 42 ++++--- src/lv_core/lv_obj.h | 10 +- src/lv_objx/lv_btn.c | 2 +- src/lv_objx/lv_btnm.c | 249 +++++++++++--------------------------- src/lv_objx/lv_btnm.h | 124 ++++--------------- src/lv_objx/lv_calendar.c | 2 +- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_kb.c | 15 ++- src/lv_objx/lv_list.c | 14 +-- src/lv_objx/lv_mbox.c | 12 +- src/lv_objx/lv_page.c | 3 +- src/lv_objx/lv_roller.c | 4 +- src/lv_objx/lv_slider.c | 6 +- src/lv_objx/lv_sw.c | 12 +- src/lv_objx/lv_ta.c | 8 +- src/lv_objx/lv_tabview.c | 18 +-- src/lv_objx/lv_tileview.c | 3 +- 19 files changed, 218 insertions(+), 372 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index db799e18e940..400b57cf5e37 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -215,7 +215,7 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_res_t res = lv_obj_send_event(*g->obj_focus, LV_EVENT_DEFOCUSED); + lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, NULL); if(res != LV_RES_OK) return; lv_obj_invalidate(*g->obj_focus); } @@ -225,7 +225,7 @@ void lv_group_focus_obj(lv_obj_t * obj) if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_FOCUS, NULL); if(g->focus_cb) g->focus_cb(g); - lv_res_t res = lv_obj_send_event(*g->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_FOCUSED, NULL); if(res != LV_RES_OK) return; lv_obj_invalidate(*g->obj_focus); @@ -328,7 +328,7 @@ void lv_group_set_editing(lv_group_t * group, bool edit) if(focused) { focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/ - lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL); if(res != LV_RES_OK) return; } @@ -626,7 +626,7 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(group->obj_focus) { (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED); + lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_DEFOCUSED, NULL); if(res != LV_RES_OK) return; lv_obj_invalidate(*group->obj_focus); } @@ -634,7 +634,7 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) group->obj_focus = obj_next; (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_FOCUS, NULL); - lv_res_t res = lv_obj_send_event(*group->obj_focus, LV_EVENT_FOCUSED); + lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL); if(res != LV_RES_OK) return; /*If the object or its parent has `top == true` bring it to the foregorund*/ diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 1112ae6b56da..f95f0b32a798 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -403,7 +403,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_PRESSED); + lv_event_send(focused, LV_EVENT_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ /*Send the ENTER as a normal KEY*/ @@ -436,7 +436,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.longpr_rep_timestamp = lv_tick_get(); focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } } @@ -449,7 +449,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED_REPEAT); + lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on NEXT again*/ @@ -482,13 +482,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.reset_query) return; /*The object might be deleted*/ if(i->proc.long_pr_sent == 0) { - lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); } - lv_obj_send_event(focused, LV_EVENT_CLICKED); + lv_event_send(focused, LV_EVENT_CLICKED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_RELEASED); + lv_event_send(focused, LV_EVENT_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.pr_timestamp = 0; @@ -554,7 +554,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_PRESSED); + lv_event_send(focused, LV_EVENT_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } } @@ -577,7 +577,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) else { focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_LONG_PRESSED); + lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.long_pr_sent = 1; @@ -594,13 +594,13 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - if(i->proc.long_pr_sent == 0) lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + if(i->proc.long_pr_sent == 0) lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_CLICKED); + lv_event_send(focused, LV_EVENT_CLICKED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_RELEASED); + lv_event_send(focused, LV_EVENT_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } /*An object is being edited and the button is released. */ @@ -610,13 +610,13 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_SHORT_CLICKED); + lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_CLICKED); + lv_event_send(focused, LV_EVENT_CLICKED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(focused, LV_EVENT_RELEASED); + lv_event_send(focused, LV_EVENT_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_group_send_data(g, LV_GROUP_KEY_ENTER); @@ -706,7 +706,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } @@ -744,7 +744,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } } @@ -769,7 +769,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_PRESSING); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSING, NULL); if(proc->reset_query) return; /*The object might be deleted*/ indev_drag(proc); @@ -781,7 +781,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED); + lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ /*Mark the signal sending to do not send it again*/ @@ -797,7 +797,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT); + lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(proc->reset_query) return; /*The object might be deleted*/ proc->longpr_rep_timestamp = lv_tick_get(); @@ -830,14 +830,14 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->reset_query) return; /*The object might be deleted*/ if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } /* The simple case: `act_obj` was not protected against press lost. @@ -847,14 +847,14 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->reset_query) return; /*The object might be deleted*/ if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_CLICKED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_RELEASED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } @@ -894,10 +894,10 @@ static void indev_proc_release(lv_indev_proc_t * proc) * If the one of them is in group then it possible that `lv_group_focus_obj` alraedy sent * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { - lv_obj_send_event(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED); + lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL); if(proc->reset_query) return; /*Not so strict as it's only the previous object and indev not uses it.*/ - lv_obj_send_event(proc->types.pointer.act_obj, LV_EVENT_FOCUSED); + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ proc->types.pointer.last_pressed = proc->types.pointer.act_obj; diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index cd5cac3839ad..3dc688c4e4e4 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -49,8 +49,9 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); * STATIC VARIABLES **********************/ static bool lv_initialized = false; -static lv_obj_t * obj_act_event; /*Stores the which event is currently being executed*/ -static bool obj_act_event_deleted; /*Shows that the object was deleted in the event function*/ +static lv_obj_t * event_act_obj; /*Stores the which event is currently being executed*/ +static bool event_act_obj_deleted; /*Shows that the object was deleted in the event function*/ +static const void * event_act_data; /*Stores the data passed to the event*/ /********************** * MACROS **********************/ @@ -342,7 +343,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) { lv_obj_invalidate(obj); - if(obj_act_event == obj && obj_act_event_deleted == false) obj_act_event_deleted = true; + if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; /*Delete from the group*/ #if LV_USE_GROUP @@ -1181,40 +1182,53 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) /** * Send an event to the object * @param obj pointer to an object - * @param event the type of the event from `lv_event_t`. + * @param event the type of the event from `lv_event_t` + * @param data arbitrary data depending on the object type and the event. (Usually `NULL`) * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event) +lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) { if(obj == NULL) return LV_RES_OK; /*If the event was send from an other event save the current states to restore it at the end*/ - lv_obj_t * prev_obj_act_event = obj_act_event; - bool prev_obj_act_event_deleted = obj_act_event_deleted; + lv_obj_t * prev_obj_act = event_act_obj; + bool prev_obj_act_deleted = event_act_obj_deleted; + void * prev_data = event_act_data; - obj_act_event = obj; - obj_act_event_deleted = false; + event_act_obj = obj; + event_act_obj_deleted = false; + event_act_data = data; if(obj->event_cb) obj->event_cb(obj, event); - bool deleted = obj_act_event_deleted; + bool deleted = event_act_obj_deleted; /*Restore the previous states*/ - obj_act_event = prev_obj_act_event; - obj_act_event_deleted = prev_obj_act_event_deleted; + event_act_obj = prev_obj_act; + event_act_obj_deleted = prev_obj_act_deleted; + event_act_data = prev_data; if(deleted) { return LV_RES_INV; } if(obj->parent_event && obj->par) { - lv_res_t res = lv_obj_send_event(obj->par, event); + lv_res_t res = lv_event_send(obj->par, event, data); if(res != LV_RES_OK) return LV_RES_INV; } return LV_RES_OK; } +/** + * Get the `data` parameter of the current event + * @return the `data` parameter + */ +const void * lv_event_get_data(void) +{ + return event_act_data; +} + /** * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. @@ -2006,7 +2020,7 @@ static void refresh_children_style(lv_obj_t * obj) static void delete_children(lv_obj_t * obj) { - if(obj_act_event == obj && obj_act_event_deleted == false) obj_act_event_deleted = true; + if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; lv_obj_t * i; lv_obj_t * i_next; diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 683cfba1936a..f6910ba8cf25 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -89,6 +89,7 @@ typedef enum { LV_EVENT_FOCUSED, LV_EVENT_DEFOCUSED, LV_EVENT_VALUE_CHANGED, + LV_EVENT_SELECTED, LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ @@ -500,9 +501,16 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb); * Send an event to the object * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. + * @param data arbitrary data depending on the object type and the event. (Usually `NULL`) * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -lv_res_t lv_obj_send_event(lv_obj_t * obj, lv_event_t event); +lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data); + +/** + * Get the `data` parameter of the current event + * @return the `data` parameter + */ +const void * lv_event_get_data(void); /** * Set the a signal function of an object. Used internally by the library. diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index cc21209b416e..5f350bf216f0 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -573,7 +573,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } if(tgl) { - res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(btn, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 3f88a7a2ac09..98a5932e4c2c 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -32,8 +32,9 @@ static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits); static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits); static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits); static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits); -static bool button_is_toggle(lv_btnm_ctrl_t ctrl_bits); -static bool button_get_toggle_state(lv_btnm_ctrl_t ctrl_bits); +static bool button_is_click_trig(lv_btnm_ctrl_t ctrl_bits); +static bool button_is_tgl_enabled(lv_btnm_ctrl_t ctrl_bits); +static bool button_get_tgl_state(lv_btnm_ctrl_t ctrl_bits); static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); @@ -346,111 +347,40 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) } /** - * Show/hide a single button in the matrix + * Set the attributes of a button of the button matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. - * @param hidden true: hide the button + * @param btn_id 0 based index of the button to modify. (Not counting new lines) + * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden) +void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl, bool en) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_idx >= ext->btn_cnt) return; - if (hidden) ext->ctrl_bits[btn_idx] |= LV_BTNM_BTN_HIDDEN; - else ext->ctrl_bits[btn_idx] &= (~LV_BTNM_BTN_HIDDEN); - invalidate_button_area(btnm, btn_idx); -} - -/** - * Enable/disable a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param ina true: make the button inactive - */ -void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool ina) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; - - if (ina) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_INACTIVE; - else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_INACTIVE); + if(btn_id >= ext->btn_cnt) return; + if(en) { + ext->ctrl_bits[btn_id] |= ctrl; + } else { + ext->ctrl_bits[btn_id] &= (~ctrl); + } invalidate_button_area(btnm, btn_id); -} -/** - * Enable/disable long press for a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param no_rep true: disable repeat - */ -void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool no_rep) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; - if (no_rep) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_NO_REPEAT; - else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_NO_REPEAT); } /** - * Enable/disable toggling a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param tgl true: toggle enable - */ -void lv_btnm_set_btn_toggle(const lv_obj_t * btnm, uint16_t btn_id, bool tgl) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; - if (tgl) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE; - else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_TOGGLE); -} - -/** - * Make the a single button button toggled or not toggled. - * @param btnm pointer to button matrix object - * @param btn_id index of button (not counting "\n") - * @param state true: toggled; false: not toggled - */ -void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool state) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; - - if(state) ext->ctrl_bits[btn_id] |= LV_BTNM_BTN_TOGGLE_STATE; - else ext->ctrl_bits[btn_id] &= (~LV_BTNM_BTN_TOGGLE_STATE); - - invalidate_button_area(btnm, btn_id); -} - -/** - * Set hidden/disabled/repeat flags for a single button. - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param hidden true: hide the button - * @param inactive true: disable the button - * @param no_repeat true: disable repeat - * @param toggle true: enable toggling - * @param toggled_state true: set toggled state + * Set the attributes of all buttons of a button matrix + * @param btnm pointer to a button matrix object + * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. + * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool inactive, bool no_repeat, bool toggle, bool toggle_state) +void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; - - uint8_t flags = ext->ctrl_bits[btn_id]; - - flags = hidden ? flags | LV_BTNM_BTN_HIDDEN : flags & (~LV_BTNM_BTN_HIDDEN); - flags = inactive ? flags | LV_BTNM_BTN_INACTIVE : flags & (~LV_BTNM_BTN_INACTIVE); - flags = no_repeat ? flags | LV_BTNM_BTN_NO_REPEAT : flags & (~LV_BTNM_BTN_NO_REPEAT); - flags = toggle ? flags | LV_BTNM_BTN_TOGGLE : flags & (~LV_BTNM_BTN_TOGGLE); - flags = toggle_state ? flags | LV_BTNM_BTN_TOGGLE_STATE : flags & (~LV_BTNM_BTN_TOGGLE_STATE); - - ext->ctrl_bits[btn_id] = flags; - invalidate_button_area(btnm, btn_id); + uint16_t i; + for(i= 0; i < ext->btn_cnt; i++) { + lv_btnm_set_btn_ctrl(btnm, i, ctrl, en); + } } - - /** * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively @@ -471,23 +401,6 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width lv_btnm_set_map(btnm, ext->map_p); } -/** - * Set the toggle state of all buttons - * @param btnm pointer to a button matrix object - * @param state true: toggled; false: not toggled - */ -void lv_btnm_set_btn_toggle_state_all(lv_obj_t * btnm, bool state) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - uint16_t i; - for(i = 0; i < ext->btn_cnt; i++) { - if(state) ext->ctrl_bits[i] |= LV_BTNM_BTN_TOGGLE_STATE; - else ext->ctrl_bits[i] &= (~LV_BTNM_BTN_TOGGLE_STATE); - } - - lv_obj_invalidate(btnm); -} - /*===================== * Getter functions *====================*/ @@ -559,7 +472,7 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm) /** * Get the button's text * @param btnm pointer to button matrix object - * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return text of btn_index` button */ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) @@ -584,65 +497,18 @@ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) } /** - * Check whether "no repeat" for a button is set or not. - * The `LV_EVENT_LONG_PRESS_REPEAT` will be sent anyway but it can be ignored by the user if this function returns `true` + * Get the whether a control value is enabled or disabled for button of a button matrix * @param btnm pointer to a button matrix object - * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (E.g. the return value of lv_btnm_get_pressed/released) + * @param ctrl control values to check (ORed value can be used) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_get_btn_no_repeat(lv_obj_t * btnm, uint16_t btn_id) +bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return button_is_repeat_disabled(ext->ctrl_bits[btn_id]); -} + if(btn_id >= ext->btn_cnt) return false; -/** - * Check whether a button for a button is hidden or not. - * Events will be sent anyway but they can be ignored by the user if this function returns `true` - * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) - * @return true: hidden; false: not hidden - */ -bool lv_btnm_get_btn_hidden(lv_obj_t * btnm, uint16_t btn_id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return button_is_hidden(ext->ctrl_bits[btn_id]); -} - -/** - * Check whether a button for a button is inactive or not. - * Events will be sent anyway but they can be ignored by the user if this function returns `true` - * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) - * @return true: inactive; false: not inactive - */ -bool lv_btnm_get_btn_inactive(lv_obj_t * btnm, uint16_t btn_id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return button_is_inactive(ext->ctrl_bits[btn_id]); -} -/** - * Check if the button can be toggled or not - * @param btnm pointer to button matrix object - * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) - */ -bool lv_btnm_get_btn_toggle(const lv_obj_t * btnm, int16_t btn_id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - - return button_is_toggle(ext->ctrl_bits[btn_id]); -} - -/** - * Check if the button is toggled or not - * @param btnm pointer to button matrix object - * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) - */ -bool lv_btnm_get_btn_toggle_state(const lv_obj_t * btnm, int16_t btn_id) -{ - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - - return button_get_toggle_state(ext->ctrl_bits[btn_id]); + return ext->ctrl_bits[btn_id] & ctrl ? true : false; } /** @@ -746,7 +612,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo btn_h = lv_area_get_height(&area_tmp); /*Load the style*/ - bool tgl_state = button_get_toggle_state(ext->ctrl_bits[btn_i]); + bool tgl_state = button_get_tgl_state(ext->ctrl_bits[btn_i]); if(button_is_inactive(ext->ctrl_bits[btn_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); else if(btn_i != ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); else if(btn_i == ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); @@ -833,6 +699,14 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_act = btn_pr; invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ } + if(ext->btn_id_act != LV_BTNM_BTN_NONE) { + if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) + { + lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + } + } } else if(sign == LV_SIGNAL_PRESSING) { uint16_t btn_pr; @@ -846,6 +720,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) invalidate_button_area(btnm, ext->btn_id_pr); } if(btn_pr != LV_BTNM_BTN_NONE) { + if(btn_pr != LV_BTNM_BTN_NONE) lv_event_send(btnm, LV_EVENT_SELECTED, ext->map_p[btn_pr]); invalidate_button_area(btnm, btn_pr); } } @@ -856,11 +731,11 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) else if(sign == LV_SIGNAL_RELEASED) { if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { /*Toggle the button if enabled*/ - if(button_is_toggle(ext->ctrl_bits[ext->btn_id_pr])) { - if(ext->ctrl_bits[ext->btn_id_pr] & LV_BTNM_BTN_TOGGLE_STATE) { - ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_BTN_TOGGLE_STATE); + if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr])) { + if(button_get_tgl_state(ext->ctrl_bits[ext->btn_id_pr])) { + ext->ctrl_bits[ext->btn_id_pr] &= (~LV_BTNM_CTRL_TGL_STATE); } else { - ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_BTN_TOGGLE_STATE; + ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE; } } @@ -876,10 +751,29 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) #else ext->btn_id_pr = LV_BTNM_BTN_NONE; #endif + + if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == true && + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) + { + lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + } + + } + } + else if(sign == LV_SIGNAL_LONG_PRESS_REP) { + if(ext->btn_id_act != LV_BTNM_BTN_NONE) { + if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) + { + lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + } } } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { ext->btn_id_pr = LV_BTNM_BTN_NONE; + ext->btn_id_act = LV_BTNM_BTN_NONE; lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_FOCUS) { @@ -1036,27 +930,32 @@ static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits) static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_BTN_HIDDEN; + return ctrl_bits & LV_BTNM_CTRL_HIDDEN ? true : false; } static bool button_is_repeat_disabled(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_BTN_NO_REPEAT; + return ctrl_bits & LV_BTNM_CTRL_NO_REPEAT ? true : false; } static bool button_is_inactive(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_BTN_INACTIVE; + return ctrl_bits & LV_BTNM_CTRL_INACTIVE ? true : false; +} + +static bool button_is_click_trig(lv_btnm_ctrl_t ctrl_bits) +{ + return ctrl_bits & LV_BTNM_CTRL_CLICK_TRIG ? true : false; } -static bool button_is_toggle(lv_btnm_ctrl_t ctrl_bits) +static bool button_is_tgl_enabled(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_BTN_TOGGLE; + return ctrl_bits & LV_BTNM_CTRL_TGL_ENABLE ? true : false; } -static bool button_get_toggle_state(lv_btnm_ctrl_t ctrl_bits) +static bool button_get_tgl_state(lv_btnm_ctrl_t ctrl_bits) { - return ctrl_bits & LV_BTNM_BTN_TOGGLE_STATE; + return ctrl_bits & LV_BTNM_CTRL_TGL_STATE ? true : false; } /** diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 5d04cec416c3..6cdc8f3fd319 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -29,22 +29,23 @@ extern "C" { /********************* * DEFINES *********************/ - -/*Control byte*/ -#define LV_BTNM_WIDTH_MASK 0x07 -#define LV_BTNM_BTN_HIDDEN 0x08 -#define LV_BTNM_BTN_NO_REPEAT 0x10 -#define LV_BTNM_BTN_INACTIVE 0x20 -#define LV_BTNM_BTN_TOGGLE 0x40 -#define LV_BTNM_BTN_TOGGLE_STATE 0x80 - +#define LV_BTNM_WIDTH_MASK 0x0007 #define LV_BTNM_BTN_NONE 0xFFFF + /********************** * TYPEDEFS **********************/ /* Type to store button control bits (disabled, hidden etc.) */ -typedef uint8_t lv_btnm_ctrl_t; +enum { + LV_BTNM_CTRL_HIDDEN = 0x0008, + LV_BTNM_CTRL_NO_REPEAT = 0x0010, + LV_BTNM_CTRL_INACTIVE = 0x0020, + LV_BTNM_CTRL_TGL_ENABLE = 0x0040, + LV_BTNM_CTRL_TGL_STATE = 0x0080, + LV_BTNM_CTRL_CLICK_TRIG = 0x0100, +}; +typedef uint16_t lv_btnm_ctrl_t; /*Data of button matrix*/ typedef struct @@ -138,56 +139,21 @@ void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); /** - * Show/hide a single button in the matrix + * Set/clear an attribute of a button of the button matrix * @param btnm pointer to button matrix object - * @param btn_idx 0 based index of the button to modify. - * @param hidden true: hide the button + * @param btn_id 0 based index of the button to modify. (Not counting new lines) + * @param ctrl attribute(s) to change from `lv_btnm_ctrl_t`. Values can be ORed. + * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_hidden(const lv_obj_t * btnm, uint16_t btn_idx, bool hidden); +void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl, bool en); /** - * Enable/disable a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param ina true: make the button inactive - */ -void lv_btnm_set_btn_inactive(const lv_obj_t * btnm, uint16_t btn_id, bool ina); - -/** - * Enable/disable long press for a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param no_rep true: disable repeat - */ -void lv_btnm_set_btn_no_repeat(const lv_obj_t * btnm, uint16_t btn_id, bool no_rep); - -/** - * Enable/disable toggling a single button in the matrix - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param tgl true: toggle enable - */ -void lv_btnm_set_btn_toggle(const lv_obj_t * btnm, uint16_t btn_id, bool tgl); - -/** - * Make the a single button button toggled or not toggled. - * @param btnm pointer to button matrix object - * @param btn_id index of button (not counting "\n") - * @param state true: toggled; false: not toggled - */ -void lv_btnm_set_btn_toggle_state(lv_obj_t * btnm, uint16_t btn_id, bool toggle); - -/** - * Set hidden/disabled/repeat flags for a single button. - * @param btnm pointer to button matrix object - * @param btn_id 0 based index of the button to modify. - * @param hidden true: hide the button - * @param inactive true: disable the button - * @param no_repeat true: disable repeat - * @param toggle true: enable toggling - * @param toggled_state true: set toggled state + * Set the attributes of all buttons of a button matrix + * @param btnm pointer to a button matrix object + * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. + * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, bool inactive, bool no_repeat, bool toggle, bool toggle_state); +void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en); /** * Set a single buttons relative width. @@ -200,12 +166,6 @@ void lv_btnm_set_btn_flags(const lv_obj_t * btnm, uint16_t btn_id, bool hidden, */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width); -/** - * Set the toggle state of all buttons - * @param btnm pointer to a button matrix object - * @param state true: toggled; false: not toggled - */ -void lv_btnm_set_btn_toggle_state_all(lv_obj_t * btnm, bool state); /*===================== * Getter functions @@ -252,51 +212,19 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm); /** * Get the button's text * @param btnm pointer to button matrix object - * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) * @return text of btn_index` button */ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); /** - * Check whether "no repeat" for a button is set or not. - * The `LV_EVENT_LONG_PRESS_REPEAT` will be sent anyway but it can be ignored by the user if this function returns `true` + * Get the whether a control value is enabled or disabled for button of a button matrix * @param btnm pointer to a button matrix object - * @param btn_index the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (E.g. the return value of lv_btnm_get_pressed/released) + * @param ctrl control values to check (ORed value can be used) * @return true: long press repeat is disabled; false: long press repeat enabled */ -bool lv_btnm_get_btn_no_repeat(lv_obj_t * btnm, uint16_t btn_id); - -/** - * Check whether a button for a button is hidden or not. - * Events will be sent anyway but they can be ignored by the user if this function returns `true` - * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) - * @return true: hidden; false: not hidden - */ -bool lv_btnm_get_btn_hidden(lv_obj_t * btnm, uint16_t btn_id); - -/** - * Check whether a button for a button is inactive or not. - * Events will be sent anyway but they can be ignored by the user if this function returns `true` - * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) - * @return true: inactive; false: not inactive - */ -bool lv_btnm_get_btn_inactive(lv_obj_t * btnm, uint16_t btn_id); - -/** - * Check if the button can be toggled or not - * @param btnm pointer to button matrix object - * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) - */ -bool lv_btnm_get_btn_toggle(const lv_obj_t * btnm, int16_t btn_id); - -/** - * Check if the button is toggled or not - * @param btnm pointer to button matrix object - * @return btn_id index a of a button not counting "\n". (The return value of lv_btnm_get_pressed/released) - */ -bool lv_btnm_get_btn_toggle_state(const lv_obj_t * btnm, int16_t btn_id); +bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl); /** * Get a style of a button matrix diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 6398a16c14fd..7ca7e1ae475a 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -544,7 +544,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * } else if(ext->pressed_date.year != 0) { - res = lv_obj_send_event(calendar, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(calendar, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 8ef5280ac3f1..2adc3a05d8c6 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -805,7 +805,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) ext->sel_opt_id_ori = ext->sel_opt_id; - lv_res_t res = lv_obj_send_event(ddlist, LV_EVENT_VALUE_CHANGED); + lv_res_t res = lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &ext->sel_opt_id); if(res != LV_RES_OK) return res; if(ext->stay_open == 0) { diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index f90e9d07a469..073b530605e5 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -41,7 +41,7 @@ static const char * kb_map_lc[] = { static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_BTN_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + (6 | LV_BTNM_CTRL_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; @@ -55,7 +55,7 @@ static const char * kb_map_uc[] = { static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_BTN_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + (6 | LV_BTNM_CTRL_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; @@ -69,7 +69,7 @@ static const char * kb_map_spec[] = { static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - (2 | LV_BTNM_BTN_NO_REPEAT), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + (2 | LV_BTNM_CTRL_NO_REPEAT), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2 }; @@ -371,7 +371,7 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - bool no_rep = lv_btnm_get_btn_no_repeat(kb, lv_btnm_get_active_btn(kb)); + bool no_rep = lv_btnm_get_btn_ctrl(kb, lv_btnm_get_active_btn(kb), LV_BTNM_CTRL_NO_REPEAT); if(no_rep == false) lv_kb_def_btn_action_cb(kb); } else if(sign == LV_SIGNAL_FOCUS) { @@ -413,8 +413,7 @@ static void lv_kb_def_btn_action_cb(lv_obj_t * kb) uint16_t btn_id = lv_btnm_get_active_btn(kb); if(btn_id == LV_BTNM_BTN_NONE) return; - if(lv_btnm_get_btn_hidden(kb, btn_id)) return; - if(lv_btnm_get_btn_inactive(kb, btn_id)) return; + if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return; const char * txt = lv_btnm_get_active_btn_text(kb); if(txt == NULL) return; @@ -434,7 +433,7 @@ static void lv_kb_def_btn_action_cb(lv_obj_t * kb) return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) { - lv_obj_send_event(kb, LV_EVENT_CANCEL); + lv_event_send(kb, LV_EVENT_CANCEL, NULL); } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ @@ -442,7 +441,7 @@ static void lv_kb_def_btn_action_cb(lv_obj_t * kb) } return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb) lv_obj_send_event(kb, LV_EVENT_APPLY); + if(kb->event_cb) lv_event_send(kb, LV_EVENT_APPLY, NULL); else lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ return; } diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index cbdbde6b5297..71d5cc593d07 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -760,22 +760,22 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(btn) { if(sign == LV_SIGNAL_PRESSED) { - lv_obj_send_event(btn, LV_EVENT_PRESSED); + lv_event_send(btn, LV_EVENT_PRESSED, NULL); } else if(sign == LV_SIGNAL_PRESSING) { - lv_obj_send_event(btn, LV_EVENT_PRESSING); + lv_event_send(btn, LV_EVENT_PRESSING, NULL); } else if(sign == LV_SIGNAL_LONG_PRESS) { - lv_obj_send_event(btn, LV_EVENT_LONG_PRESSED); + lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - lv_obj_send_event(btn, LV_EVENT_LONG_PRESSED_REPEAT); + lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); } else if(sign == LV_SIGNAL_RELEASED) { ext->last_sel = btn; - if(indev->proc.long_pr_sent == 0) lv_obj_send_event(btn, LV_EVENT_SHORT_CLICKED); - lv_obj_send_event(btn, LV_EVENT_CLICKED); - lv_obj_send_event(btn, LV_EVENT_RELEASED); + if(indev->proc.long_pr_sent == 0) lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); + if(lv_indev_is_dragging(indev) == false) lv_event_send(btn, LV_EVENT_CLICKED, NULL); + lv_event_send(btn, LV_EVENT_RELEASED, NULL); } } } diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index f17c3e0c5747..d351ed66692c 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -153,6 +153,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map) } lv_btnm_set_map(ext->btnm, btn_map); + lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT, true); lv_obj_set_parent_event(ext->btnm, true); mbox_realign(mbox); @@ -440,12 +441,9 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) mbox_realign(mbox); } - else if(sign == LV_SIGNAL_PRESSED) { - /*If the message box was pressed clear the last active button*/ - if(ext->btnm) { - lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm); - btnm_ext->btn_id_act = LV_BTNM_BTN_NONE; - } + else if(sign == LV_SIGNAL_RELEASED) { + uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); + if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, lv_btnm_get_btn_text(ext->btnm, btn_id)); } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL || sign == LV_SIGNAL_GET_EDITABLE) { @@ -467,8 +465,6 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) } #endif } - - } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 5ec765c5f4f0..0150e6205ee1 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -1015,6 +1015,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi * It is used by default if the scrollable's event is not specified * @param scrl pointer to the page's scrollable object * @param event type of the event + * @param data data of the event */ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) { @@ -1032,7 +1033,7 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) event == LV_EVENT_FOCUSED || event == LV_EVENT_DEFOCUSED) { - lv_obj_send_event(page, event); + lv_event_send(page, event, lv_event_get_data()); } } diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 84d4a49bf468..cc088344f04b 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -518,7 +518,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, ext->ddlist.sel_opt_id = id; ext->ddlist.sel_opt_id_ori = id; - res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } else if(sign == LV_SIGNAL_RELEASED) { /*If picked an option by clicking then set it*/ @@ -536,7 +536,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ #endif - res = lv_obj_send_event(roller, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index fe16c8344101..508610d209da 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -479,7 +479,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(tmp != ext->drag_value) { ext->drag_value = tmp; lv_obj_invalidate(slider); - res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { @@ -529,11 +529,11 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true); - res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { lv_slider_set_value(slider, lv_slider_get_value(slider) - 1, true); - res = lv_obj_send_event(slider, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_GET_EDITABLE) { diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index a1477f5235be..cc6ef7cbc608 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -328,13 +328,13 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(lv_sw_get_state(sw)) { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } else { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); lv_slider_set_value(sw, 0, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } @@ -344,7 +344,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(lv_sw_get_state(sw)) lv_sw_off(sw, true); else lv_sw_on(sw, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } /*If the switch was dragged then calculate the new state based on the current position*/ @@ -353,18 +353,18 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(v > LV_SW_MAX_VALUE / 2) lv_sw_on(sw, true); else lv_sw_off(sw, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_CONTROLL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { lv_slider_set_value(sw, 0, true); - res = lv_obj_send_event(sw, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_GET_EDITABLE) { diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 206e2aa76688..35ed32d7ff9b 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -255,7 +255,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) placeholder_update(ta); - lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, letter_buf); } /** @@ -322,7 +322,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) placeholder_update(ta); - lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, txt); } /** @@ -365,7 +365,7 @@ void lv_ta_del_char(lv_obj_t * ta) placeholder_update(ta); - lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL); } /** @@ -442,7 +442,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) placeholder_update(ta); - lv_obj_send_event(ta, LV_EVENT_VALUE_CHANGED); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, txt); } /** diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index f3f906bf4f9e..e019b90092b7 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -234,7 +234,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) btnm_ext->map_p = NULL; lv_btnm_set_map(ext->btns, ext->tab_name_ptr); - lv_btnm_set_btn_no_repeat(ext->btns, ext->tab_cnt - 1, true); + lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); /*Modify the indicator size*/ lv_style_t * style_tabs = lv_obj_get_style(ext->btns); @@ -276,8 +276,11 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) lv_res_t res = LV_RES_OK; if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; - if(id != ext->tab_cur) res = lv_obj_send_event(tabview, LV_EVENT_VALUE_CHANGED); - if(res != LV_RES_OK) return; /*Prevent the tab loading*/ + if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_SELECTED, lv_btnm_get_btn_text(ext->btns, id)); + if(res != LV_RES_OK) return; + + + lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, false); ext->tab_cur = id; @@ -329,7 +332,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) #endif } - lv_btnm_set_btn_toggle_state(ext->btns, ext->tab_cur, true); + lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, true); } /** @@ -596,7 +599,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p if(indev_type == LV_INDEV_TYPE_KEYPAD || (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) { - lv_obj_send_event(ext->btns, LV_EVENT_CLICKED); + lv_event_send(ext->btns, LV_EVENT_CLICKED, lv_event_get_data()); } } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL) { @@ -806,9 +809,8 @@ static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event) uint16_t btn_id = lv_btnm_get_active_btn(tab_btnm); if(btn_id == LV_BTNM_BTN_NONE) return; - - lv_btnm_set_btn_toggle_state_all(tab_btnm, false); - lv_btnm_set_btn_toggle_state(tab_btnm, btn_id, true); + lv_btnm_set_btn_ctrl_all(tab_btnm, LV_BTNM_CTRL_TGL_STATE, false); + lv_btnm_set_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_TGL_STATE, true); lv_obj_t * tab = lv_obj_get_parent(tab_btnm); lv_tabview_set_tab_act(tab, btn_id, true); diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index e5dd99445052..ee44c9bb7e59 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -243,7 +243,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_res_t res = LV_RES_OK; - res = lv_obj_send_event(tileview, LV_EVENT_VALUE_CHANGED); + res = lv_event_send(tileview, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return; /*Prevent the tile loading*/ } @@ -463,7 +463,6 @@ static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event) lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) { indev->proc.types.pointer.drag_in_prog = 0; -// if(drag_obj) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, NULL); } drag_end_handler(tileview); From 58d375bc93bcfe13c4f18a4fdc4a2ea1b5c49076 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 19 Mar 2019 07:15:00 +0100 Subject: [PATCH 160/590] fix typo: LV_SIGNAL_CONTROLL -> LV_SIGNAL_CONTROL --- src/lv_core/lv_group.c | 2 +- src/lv_core/lv_obj.c | 2 +- src/lv_core/lv_obj.h | 2 +- src/lv_objx/lv_btn.c | 2 +- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_calendar.c | 2 +- src/lv_objx/lv_cb.c | 2 +- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_list.c | 2 +- src/lv_objx/lv_mbox.c | 4 ++-- src/lv_objx/lv_page.c | 2 +- src/lv_objx/lv_roller.c | 4 ++-- src/lv_objx/lv_slider.c | 2 +- src/lv_objx/lv_spinbox.c | 4 ++-- src/lv_objx/lv_sw.c | 2 +- src/lv_objx/lv_ta.c | 2 +- src/lv_objx/lv_tabview.c | 2 +- src/lv_objx/lv_win.c | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 400b57cf5e37..4391c0dc2eee 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -277,7 +277,7 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c) lv_obj_t * act = lv_group_get_focused(group); if(act == NULL) return LV_RES_OK; - return act->signal_cb(act, LV_SIGNAL_CONTROLL, &c); + return act->signal_cb(act, LV_SIGNAL_CONTROL, &c); } /** diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 3dc688c4e4e4..df3f80156ab0 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1193,7 +1193,7 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) /*If the event was send from an other event save the current states to restore it at the end*/ lv_obj_t * prev_obj_act = event_act_obj; bool prev_obj_act_deleted = event_act_obj_deleted; - void * prev_data = event_act_data; + const void * prev_data = event_act_data; event_act_obj = obj; event_act_obj_deleted = false; diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index f6910ba8cf25..6ba7679bf97f 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -122,7 +122,7 @@ enum /*Group related*/ LV_SIGNAL_FOCUS, LV_SIGNAL_DEFOCUS, - LV_SIGNAL_CONTROLL, + LV_SIGNAL_CONTROL, _LV_SIGNAL_FEEDBACK_SECTION_END, LV_SIGNAL_GET_EDITABLE, }; diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 5f350bf216f0..5b72f07d99b6 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -612,7 +612,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) lv_anim_create(&a); } #endif - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 98a5932e4c2c..c23fc0379978 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -801,7 +801,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } - else if(sign == LV_SIGNAL_CONTROLL) { + else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT) { if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 7ca7e1ae475a..a92e2dfc3135 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -551,7 +551,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * ext->pressed_date.year = 0; ext->btn_pressing = 0; lv_obj_invalidate(calendar); - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { uint8_t c = *((uint8_t *) param); lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index 5709d448d925..a049fc227d98 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -337,7 +337,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN || c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 2adc3a05d8c6..205272aa8a6a 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -675,7 +675,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par ext->sel_opt_id = ext->sel_opt_id_ori; lv_ddlist_refr_size(ddlist, true); } - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { if(!ext->opened) { diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 71d5cc593d07..875ed1a961fa 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -831,7 +831,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; *editable = true; - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { #if LV_USE_GROUP char c = *((char *)param); diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index d351ed66692c..c8079e3c4e4d 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -419,7 +419,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) /*Translate LV_GROUP_KEY_UP/DOWN to LV_GROUP_KEY_LEFT/RIGHT */ char c_trans = 0; - if(sign == LV_SIGNAL_CONTROLL) { + if(sign == LV_SIGNAL_CONTROL) { c_trans = *((char *)param); if(c_trans == LV_GROUP_KEY_DOWN) c_trans = LV_GROUP_KEY_LEFT; if(c_trans == LV_GROUP_KEY_UP) c_trans = LV_GROUP_KEY_RIGHT; @@ -446,7 +446,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, lv_btnm_get_btn_text(ext->btnm, btn_id)); } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || - sign == LV_SIGNAL_CONTROLL || sign == LV_SIGNAL_GET_EDITABLE) { + sign == LV_SIGNAL_CONTROL || sign == LV_SIGNAL_GET_EDITABLE) { if(ext->btnm) { ext->btnm->signal_cb(ext->btnm, sign, param); } diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 0150e6205ee1..2979d59424f5 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -802,7 +802,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) /*Ensure ext. size for the scrollbars if they are out of the page*/ if(page->ext_size < (-ext->sb.style->body.padding.right)) page->ext_size = -ext->sb.style->body.padding.right; if(page->ext_size < (-ext->sb.style->body.padding.bottom)) page->ext_size = -ext->sb.style->body.padding.bottom; - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { uint32_t c = *((uint32_t *) param); if((c == LV_GROUP_KEY_DOWN) && ext->arrow_scroll) { diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index cc088344f04b..1ee06fdf3b4a 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -392,7 +392,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_res_t res = LV_RES_OK; /*Don't let the drop down list to handle the control signals. It works differently*/ - if(sign != LV_SIGNAL_CONTROLL && sign != LV_SIGNAL_FOCUS && sign != LV_SIGNAL_DEFOCUS) { + if(sign != LV_SIGNAL_CONTROL && sign != LV_SIGNAL_FOCUS && sign != LV_SIGNAL_DEFOCUS) { /* Include the ancient signal function */ res = ancestor_signal(roller, sign, param); if(res != LV_RES_OK) return res; @@ -457,7 +457,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par refr_position(roller, true); } #endif - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 508610d209da..56411bd011e9 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -522,7 +522,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(slider->ext_size < shadow_w) slider->ext_size = shadow_w; } - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); ext->drag_value = LV_SLIDER_NOT_PRESSED; diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index b13182749964..5e42926906e5 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -318,7 +318,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p lv_res_t res = LV_RES_OK; /* Include the ancient signal function */ - if(sign != LV_SIGNAL_CONTROLL) + if(sign != LV_SIGNAL_CONTROL) { res = ancestor_signal(spinbox, sign, param); if(res != LV_RES_OK) return res; @@ -357,7 +357,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p } } } - else if(sign == LV_SIGNAL_CONTROLL) { + else if(sign == LV_SIGNAL_CONTROL) { lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index cc6ef7cbc608..39445cd72270 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -356,7 +356,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 35ed32d7ff9b..b3f7964173e4 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -1145,7 +1145,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) refr_cursor_area(ta); } } - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ if(c == LV_GROUP_KEY_RIGHT) lv_ta_cursor_right(ta); else if(c == LV_GROUP_KEY_LEFT) lv_ta_cursor_left(ta); diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index e019b90092b7..bc7b45b6a579 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -602,7 +602,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_event_send(ext->btns, LV_EVENT_CLICKED, lv_event_get_data()); } } - else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROLL) { + else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL) { /* The button matrix is not in a group (the tab view is in it) but it should handle the group signals. * So propagate the related signals to the button matrix manually*/ if(ext->btns) { diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 9c9c4278ed8b..7e8753b7d872 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -506,7 +506,7 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param) ext->header = NULL; /*These objects were children so they are already invalid*/ ext->page = NULL; ext->title = NULL; - } else if(sign == LV_SIGNAL_CONTROLL) { + } else if(sign == LV_SIGNAL_CONTROL) { /*Forward all the control signals to the page*/ ext->page->signal_cb(ext->page, sign, param); } else if(sign == LV_SIGNAL_GET_TYPE) { From 5218a5f8b8a7d702edc29d341000cb76295ac297 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 05:45:37 +0100 Subject: [PATCH 161/590] rename scrips folder to sripts --- {scrips => scripts}/lv_conf_checker.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {scrips => scripts}/lv_conf_checker.py (100%) diff --git a/scrips/lv_conf_checker.py b/scripts/lv_conf_checker.py similarity index 100% rename from scrips/lv_conf_checker.py rename to scripts/lv_conf_checker.py From efe48459234d335b070c0f649dd2a587f1be7206 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 05:47:41 +0100 Subject: [PATCH 162/590] fix typo --- porting/{lv_port_disp_tempalte.c => lv_port_disp_template.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename porting/{lv_port_disp_tempalte.c => lv_port_disp_template.c} (100%) diff --git a/porting/lv_port_disp_tempalte.c b/porting/lv_port_disp_template.c similarity index 100% rename from porting/lv_port_disp_tempalte.c rename to porting/lv_port_disp_template.c From a83fdb39a8155475b29aeaca8f9126b65966d669 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 06:08:01 +0100 Subject: [PATCH 163/590] LV_EVENT_SELECT: send ID instead of text --- src/lv_objx/lv_btnm.c | 12 ++++++++---- src/lv_objx/lv_kb.c | 4 ++-- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_tabview.c | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index c23fc0379978..a37eea9f9e22 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -704,7 +704,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { - lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + uint32_t b = ext->btn_id_act; + lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } @@ -720,7 +721,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) invalidate_button_area(btnm, ext->btn_id_pr); } if(btn_pr != LV_BTNM_BTN_NONE) { - if(btn_pr != LV_BTNM_BTN_NONE) lv_event_send(btnm, LV_EVENT_SELECTED, ext->map_p[btn_pr]); + uint32_t b = ext->btn_id_act; + lv_event_send(btnm, LV_EVENT_SELECTED, &b); invalidate_button_area(btnm, btn_pr); } } @@ -756,7 +758,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { - lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + uint32_t b = ext->btn_id_act; + lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } @@ -767,7 +770,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { - lv_event_send(btnm, LV_EVENT_SELECTED, lv_btnm_get_active_btn_text(btnm)); + uint32_t b = ext->btn_id_act; + lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 073b530605e5..1fa4877eb4be 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -33,7 +33,7 @@ static void lv_kb_def_btn_action_cb(lv_obj_t * kb); static lv_signal_cb_t ancestor_signal; static const char * kb_map_lc[] = { - "#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "Bksp", "\n", + "1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "Bksp", "\n", "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", "Enter", "\n", "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" @@ -47,7 +47,7 @@ static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { }; static const char * kb_map_uc[] = { - "#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", + "1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index c8079e3c4e4d..bfb1e8f7859f 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -443,7 +443,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); - if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, lv_btnm_get_btn_text(ext->btnm, btn_id)); + if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id); } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL || sign == LV_SIGNAL_GET_EDITABLE) { diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index bc7b45b6a579..6a0b08fc86e7 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -276,7 +276,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) lv_res_t res = LV_RES_OK; if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; - if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_SELECTED, lv_btnm_get_btn_text(ext->btns, id)); + if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_SELECTED, &id); if(res != LV_RES_OK) return; From 11faf1df5f265323d441098aeebc7607ef7b8578 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 08:01:01 +0100 Subject: [PATCH 164/590] lv_canvas: add image rotate (experimental) --- src/lv_objx/lv_canvas.c | 132 +++++++++++++++++++++++++++++++++++++--- src/lv_objx/lv_canvas.h | 2 + 2 files changed, 127 insertions(+), 7 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 3fe54c5897c9..3bdfdd543881 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -8,6 +8,7 @@ *********************/ #include #include "lv_canvas.h" +#include "../lv_misc/lv_math.h" #if LV_USE_CANVAS != 0 /********************* @@ -130,7 +131,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - if(x >= ext->dsc.header.w || y >= ext->dsc.header.h) { + if(x >= ext->dsc.header.w || y >= ext->dsc.header.h || x < 0 || y < 0) { LV_LOG_WARN("lv_canvas_set_px: x or y out of the canvas"); return; } @@ -210,9 +211,23 @@ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) { lv_color_t p_color = LV_COLOR_BLACK; lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - if(x >= ext->dsc.header.w || y >= ext->dsc.header.h) { - LV_LOG_WARN("lv_canvas_get_px: x or y out of the canvas"); - return p_color; + if(x >= ext->dsc.header.w) { + x = ext->dsc.header.w - 1; + LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); + } + else if(x < 0) { + x = 0; + LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); + } + + + if(y >= ext->dsc.header.h) { + y = ext->dsc.header.h - 1; + LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); + } + else if(y < 0) { + y = 0; + LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); } uint8_t * buf_u8 = (uint8_t *) ext->dsc.data; @@ -367,6 +382,111 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor } } + +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int32_t pivotx, int32_t pivoty, int16_t angle) +{ + lv_canvas_ext_t * ext_src = lv_obj_get_ext_attr(canvas_src); + lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas_dest); + + int32_t sinma = lv_trigo_sin(-angle); + int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ + + int32_t src_width = ext_src->dsc.header.w; + int32_t src_height = ext_src->dsc.header.h; + int32_t dest_width = ext_dst->dsc.header.w; + int32_t dest_height = ext_dst->dsc.header.h; + + lv_style_t * style = lv_canvas_get_style(canvas_dest, LV_CANVAS_STYLE_MAIN); + int32_t x; + int32_t y; + for (x = 0; x < dest_width; x++) { + for (y = 0; y < dest_height; y++) { + /*Get the target point relative coordinates to the pivot*/ + int32_t xt = x - pivotx; + int32_t yt = y - pivoty; + + /*Get the source pixel from the upscaled image*/ + int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivotx * 256; + int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivoty * 256; + + /*Get the integer part of the source pixel*/ + int xs_int = xs >> 8; + int ys_int = ys >> 8; + + /*Get the fractional part of the source pixel*/ + int xs_fract = xs & 0xff; + int ys_fract = ys & 0xff; + + /* If the fractional < 0x70 mix the source pixel with the left/top pixel + * If the fractional > 0x90 mix the source pixel with the right/bottom pixel + * In the 0x70..0x90 range use the unchanged source pixel */ + + int xn; /*x neightboor*/ + lv_opa_t xr; /*x mix ratio*/ + if(xs_fract < 0x70) { + xn = xs_int - 1; + xr = xs_fract * 2; + } + else if(xs_fract > 0x90) { + xn = xs_int + 1; + xr = (0xFF - xs_fract) * 2; + } + else { + xn = xs_int; + xr = 0xFF; + } + + /*Handle under/overflow*/ +// if(xn >= src_width) xn = src_width - 1; +// else if(xn < 0) xn = 0; +// +// if(xs_int >= src_width) xs_int = src_width - 1; +// else if(xs_int < 0) xs_int = 0; + + int yn; /*y neightboor*/ + lv_opa_t yr; /*y mix ratio*/ + if(ys_fract < 0x70) { + yn = ys_int - 1; + yr = ys_fract * 2; + } + else if(ys_fract > 0x90) { + yn = ys_int + 1; + yr = (0xFF - ys_fract) * 2; + } + else { + yn = ys_int; + yr = 0xFF; + } + + /*Handle under/overflow*/ +// if(yn >= src_height) yn = src_height - 1; +// else if(yn < 0) yn = 0; +// +// if(ys_int >= src_height) ys_int = src_height - 1; +// else if(ys_int < 0) ys_int = 0; + + /*Get the mixture of the original source and the neightboor pixels in both directions*/ + lv_color_t c_dest_int = lv_canvas_get_px(canvas_src, xs_int, ys_int); + lv_color_t c_dest_xn = lv_canvas_get_px(canvas_src, xn, ys_int); + lv_color_t c_dest_yn = lv_canvas_get_px(canvas_src, xs_int, yn); + lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); + lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); + + if (xs_int >= 0 && xs_int < dest_width && ys_int >= 0 && ys_int < dest_height) { + /*The result color as the average of the x/y mixed colors*/ + + lv_color_t c_res = lv_color_mix(x_dest, y_dest, LV_OPA_50); + lv_canvas_set_px(canvas_dest, x, y, c_res); + } else { + lv_canvas_set_px(canvas_dest, x, y, LV_COLOR_RED);//style->image.color); + } + } + } + + lv_obj_invalidate(canvas_dest); + +} + /** * Draw circle function of the canvas * @param canvas pointer to a canvas object @@ -415,9 +535,6 @@ void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_c * * NOTE: The lv_canvas_draw_line function originates from https://github.com/jb55/bresenham-line.c. */ -/* - * NOTE: The lv_canvas_draw_line function originates from https://github.com/jb55/bresenham-line.c. - */ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2, lv_color_t color) { lv_coord_t x0, y0, x1, y1; @@ -589,4 +706,5 @@ static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * par return res; } + #endif diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index e68f70d05c14..fae6a258717f 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -141,6 +141,8 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l */ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int32_t pivotx, int32_t pivoty, int16_t angle); + /** * Draw circle function of the canvas * @param canvas pointer to a canvas object From fe4e95af2b07e6493cb68aa9013d240df1d28f83 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 09:02:55 +0100 Subject: [PATCH 165/590] canvas: rotate updates --- src/lv_objx/lv_canvas.c | 407 ++++++++++++++++++++-------------------- src/lv_objx/lv_canvas.h | 2 +- 2 files changed, 209 insertions(+), 200 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 3bdfdd543881..ec2ae336bdca 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -23,6 +23,7 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * param); +static void set_px_core(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); /********************** * STATIC VARIABLES @@ -120,65 +121,19 @@ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_ lv_img_set_src(canvas, &ext->dsc); } + /** * Set the color of a pixel on the canvas - * @param canvas + * @param canvas pointer to canvas object * @param x x coordinate of the point to set * @param y x coordinate of the point to set * @param c color of the point */ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) { + set_px_core(canvas, x, y, c); + lv_obj_invalidate(canvas); - lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - if(x >= ext->dsc.header.w || y >= ext->dsc.header.h || x < 0 || y < 0) { - LV_LOG_WARN("lv_canvas_set_px: x or y out of the canvas"); - return; - } - - uint8_t * buf_u8 = (uint8_t *) ext->dsc.data; - - if(ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR || - ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { - uint32_t px = ext->dsc.header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); - - memcpy(&buf_u8[px], &c, sizeof(lv_color_t)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_1BIT) { - buf_u8 += 4 * 2; - uint8_t bit = x & 0x7; - x = x >> 3; - - uint32_t px = (ext->dsc.header.w >> 3) * y + x; - buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_2BIT) { - buf_u8 += 4 * 4; - uint8_t bit = (x & 0x3) * 2; - x = x >> 2; - - uint32_t px = (ext->dsc.header.w >> 2) * y + x; - - buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_4BIT) { - buf_u8 += 4 * 16; - uint8_t bit = (x & 0x1) * 4; - x = x >> 1; - - uint32_t px = (ext->dsc.header.w >> 1) * y + x; - - buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_8BIT) { - buf_u8 += 4 * 256; - uint32_t px = ext->dsc.header.w * y + x; - buf_u8[px] = c.full; - } } /** @@ -383,107 +338,105 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor } -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int32_t pivotx, int32_t pivoty, int16_t angle) +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle, int32_t pivotx, int32_t pivoty, lv_coord_t offset_x, lv_coord_t offset_y) { - lv_canvas_ext_t * ext_src = lv_obj_get_ext_attr(canvas_src); - lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas_dest); - - int32_t sinma = lv_trigo_sin(-angle); - int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ - - int32_t src_width = ext_src->dsc.header.w; - int32_t src_height = ext_src->dsc.header.h; - int32_t dest_width = ext_dst->dsc.header.w; - int32_t dest_height = ext_dst->dsc.header.h; - - lv_style_t * style = lv_canvas_get_style(canvas_dest, LV_CANVAS_STYLE_MAIN); - int32_t x; - int32_t y; - for (x = 0; x < dest_width; x++) { - for (y = 0; y < dest_height; y++) { - /*Get the target point relative coordinates to the pivot*/ - int32_t xt = x - pivotx; - int32_t yt = y - pivoty; - - /*Get the source pixel from the upscaled image*/ - int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivotx * 256; - int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivoty * 256; - - /*Get the integer part of the source pixel*/ - int xs_int = xs >> 8; - int ys_int = ys >> 8; - - /*Get the fractional part of the source pixel*/ - int xs_fract = xs & 0xff; - int ys_fract = ys & 0xff; - - /* If the fractional < 0x70 mix the source pixel with the left/top pixel - * If the fractional > 0x90 mix the source pixel with the right/bottom pixel - * In the 0x70..0x90 range use the unchanged source pixel */ - - int xn; /*x neightboor*/ - lv_opa_t xr; /*x mix ratio*/ - if(xs_fract < 0x70) { - xn = xs_int - 1; - xr = xs_fract * 2; - } - else if(xs_fract > 0x90) { - xn = xs_int + 1; - xr = (0xFF - xs_fract) * 2; - } - else { - xn = xs_int; - xr = 0xFF; - } - - /*Handle under/overflow*/ -// if(xn >= src_width) xn = src_width - 1; -// else if(xn < 0) xn = 0; -// -// if(xs_int >= src_width) xs_int = src_width - 1; -// else if(xs_int < 0) xs_int = 0; - - int yn; /*y neightboor*/ - lv_opa_t yr; /*y mix ratio*/ - if(ys_fract < 0x70) { - yn = ys_int - 1; - yr = ys_fract * 2; - } - else if(ys_fract > 0x90) { - yn = ys_int + 1; - yr = (0xFF - ys_fract) * 2; - } - else { - yn = ys_int; - yr = 0xFF; - } - - /*Handle under/overflow*/ -// if(yn >= src_height) yn = src_height - 1; -// else if(yn < 0) yn = 0; -// -// if(ys_int >= src_height) ys_int = src_height - 1; -// else if(ys_int < 0) ys_int = 0; - - /*Get the mixture of the original source and the neightboor pixels in both directions*/ - lv_color_t c_dest_int = lv_canvas_get_px(canvas_src, xs_int, ys_int); - lv_color_t c_dest_xn = lv_canvas_get_px(canvas_src, xn, ys_int); - lv_color_t c_dest_yn = lv_canvas_get_px(canvas_src, xs_int, yn); - lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); - lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); - - if (xs_int >= 0 && xs_int < dest_width && ys_int >= 0 && ys_int < dest_height) { - /*The result color as the average of the x/y mixed colors*/ - - lv_color_t c_res = lv_color_mix(x_dest, y_dest, LV_OPA_50); - lv_canvas_set_px(canvas_dest, x, y, c_res); - } else { - lv_canvas_set_px(canvas_dest, x, y, LV_COLOR_RED);//style->image.color); - } + lv_canvas_ext_t * ext_src = lv_obj_get_ext_attr(canvas_src); + lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas_dest); + + int32_t sinma = lv_trigo_sin(-angle); + int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ + + int32_t src_width = ext_src->dsc.header.w; + int32_t src_height = ext_src->dsc.header.h; + int32_t dest_width = ext_dst->dsc.header.w; + int32_t dest_height = ext_dst->dsc.header.h; + + int32_t x; + int32_t y; + for (x = -offset_x; x < dest_width - offset_x; x++) { + for (y = -offset_y; y < dest_height - offset_y; y++) { + /*Get the target point relative coordinates to the pivot*/ + int32_t xt = x - pivotx; + int32_t yt = y - pivoty; + + /*Get the source pixel from the upscaled image*/ + int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivotx * 256; + int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivoty * 256; + + /*Get the integer part of the source pixel*/ + int xs_int = xs >> 8; + int ys_int = ys >> 8; + + + if(xs_int >= src_width) continue; + else if(xs_int < 0) continue; + + + if(ys_int >= src_height) continue; + else if(ys_int < 0) continue; + + /*Get the fractional part of the source pixel*/ + int xs_fract = xs & 0xff; + int ys_fract = ys & 0xff; + + /* If the fractional < 0x70 mix the source pixel with the left/top pixel + * If the fractional > 0x90 mix the source pixel with the right/bottom pixel + * In the 0x70..0x90 range use the unchanged source pixel */ + + int xn; /*x neightboor*/ + lv_opa_t xr; /*x mix ratio*/ + if(xs_fract < 0x70) { + xn = xs_int - 1; + xr = xs_fract * 2; + } + else if(xs_fract > 0x90) { + xn = xs_int + 1; + xr = (0xFF - xs_fract) * 2; + } + else { + xn = xs_int; + xr = 0xFF; + } + + /*Handle under/overflow*/ + if(xn >= src_width) continue; + else if(xn < 0) continue; + + int yn; /*y neightboor*/ + lv_opa_t yr; /*y mix ratio*/ + if(ys_fract < 0x70) { + yn = ys_int - 1; + yr = ys_fract * 2; + } + else if(ys_fract > 0x90) { + yn = ys_int + 1; + yr = (0xFF - ys_fract) * 2; + } + else { + yn = ys_int; + yr = 0xFF; + } + + /*Handle under/overflow*/ + if(yn >= src_height) continue; + else if(yn < 0) continue; + + /*Get the mixture of the original source and the neightboor pixels in both directions*/ + lv_color_t c_dest_int = lv_canvas_get_px(canvas_src, xs_int, ys_int); + lv_color_t c_dest_xn = lv_canvas_get_px(canvas_src, xn, ys_int); + lv_color_t c_dest_yn = lv_canvas_get_px(canvas_src, xs_int, yn); + lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); + lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); + + // if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) + { + /*The result color as the average of the x/y mixed colors*/ + set_px_core(canvas_dest, x + offset_x, y + offset_y, lv_color_mix(x_dest, y_dest, LV_OPA_50)); + } + } } - } - lv_obj_invalidate(canvas_dest); + lv_obj_invalidate(canvas_dest); } @@ -537,25 +490,25 @@ void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_c */ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2, lv_color_t color) { - lv_coord_t x0, y0, x1, y1; - - x0 = point1.x; - y0 = point1.y; - x1 = point2.x; - y1 = point2.y; - - int dx = abs(x1-x0), sx = x0dy ? dx : -dy)/2, e2; - - for(;;){ - lv_canvas_set_px(canvas, x0, y0, color); - - if (x0==x1 && y0==y1) break; - e2 = err; - if (e2 >-dx) { err -= dy; x0 += sx; } - if (e2 < dy) { err += dx; y0 += sy; } - } + lv_coord_t x0, y0, x1, y1; + + x0 = point1.x; + y0 = point1.y; + x1 = point2.x; + y1 = point2.y; + + int dx = abs(x1-x0), sx = x0dy ? dx : -dy)/2, e2; + + for(;;){ + lv_canvas_set_px(canvas, x0, y0, color); + + if (x0==x1 && y0==y1) break; + e2 = err; + if (e2 >-dx) { err -= dy; x0 += sx; } + if (e2 < dy) { err += dx; y0 += sy; } + } } /** @@ -566,7 +519,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2 */ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) { - lv_canvas_draw_polygon(canvas, points, 3, color); + lv_canvas_draw_polygon(canvas, points, 3, color); } /** @@ -577,7 +530,7 @@ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t */ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) { - lv_canvas_draw_polygon(canvas, points, 4, color); + lv_canvas_draw_polygon(canvas, points, 4, color); } /** @@ -589,13 +542,13 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t colo */ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color) { - uint8_t i; + uint8_t i; - for(i=0; i < (size - 1); i++) { - lv_canvas_draw_line(canvas, points[i], points[i + 1], color); - } + for(i=0; i < (size - 1); i++) { + lv_canvas_draw_line(canvas, points[i], points[i + 1], color); + } - lv_canvas_draw_line(canvas, points[size - 1], points[0], color); + lv_canvas_draw_line(canvas, points[size - 1], points[0], color); } /** @@ -608,18 +561,18 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, */ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t boundary_color, lv_color_t fill_color) { - uint32_t x = 0, y = 0; - uint8_t i; + uint32_t x = 0, y = 0; + uint8_t i; - for(i=0; idsc.data; + + if(ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR || + ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + uint32_t px = ext->dsc.header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); + + memcpy(&buf_u8[px], &c, sizeof(lv_color_t)); + } + else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_1BIT) { + buf_u8 += 4 * 2; + uint8_t bit = x & 0x7; + x = x >> 3; + + uint32_t px = (ext->dsc.header.w >> 3) * y + x; + buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); + } + else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_2BIT) { + buf_u8 += 4 * 4; + uint8_t bit = (x & 0x3) * 2; + x = x >> 2; + + uint32_t px = (ext->dsc.header.w >> 2) * y + x; + + buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); + } + else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_4BIT) { + buf_u8 += 4 * 16; + uint8_t bit = (x & 0x1) * 4; + x = x >> 1; + + uint32_t px = (ext->dsc.header.w >> 1) * y + x; + + buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); + } + else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_8BIT) { + buf_u8 += 4 * 256; + uint32_t px = ext->dsc.header.w * y + x; + buf_u8[px] = c.full; + } +} + #endif diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index fae6a258717f..486cc3386eaa 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -141,7 +141,7 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l */ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int32_t pivotx, int32_t pivoty, int16_t angle); +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle, int32_t pivotx, int32_t pivoty, lv_coord_t offset_x, lv_coord_t offset_y); /** * Draw circle function of the canvas From a7735b85e929df8836ed33d4fd2bbb0bc02e30c7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 09:15:56 +0100 Subject: [PATCH 166/590] canvas rotate: comment update --- src/lv_objx/lv_canvas.c | 24 ++++++++++++++++++------ src/lv_objx/lv_canvas.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index ec2ae336bdca..d2870d38dfd3 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -337,8 +337,20 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor } } - -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle, int32_t pivotx, int32_t pivoty, lv_coord_t offset_x, lv_coord_t offset_y) +/** + * Rotate the content of canvas (source) and copy the result to an other canvas (destination) + * @param canvas_dest destination canvas. + * @param canvas_src source canvas. + * To rotate an image (lv_img_dsc_t) this canvas be constructed by using the image descriptor directly + * @param angle the angle of rotation (0..360); + * @param offset_x offset X to tell where to put the result data on destination canvas + * @param offset_y offset X to tell where to put the result data on destination canvas + * @param pivot_x pivot X of rotation. Relative to the source canvas + * Set to `source width / 2` to rotate around the center + * @param pivot_y pivot Y of rotation. Relative to the source canvas + * Set to `source height / 2` to rotate around the center + */ +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) { lv_canvas_ext_t * ext_src = lv_obj_get_ext_attr(canvas_src); lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas_dest); @@ -356,12 +368,12 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang for (x = -offset_x; x < dest_width - offset_x; x++) { for (y = -offset_y; y < dest_height - offset_y; y++) { /*Get the target point relative coordinates to the pivot*/ - int32_t xt = x - pivotx; - int32_t yt = y - pivoty; + int32_t xt = x - pivot_x; + int32_t yt = y - pivot_y; /*Get the source pixel from the upscaled image*/ - int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivotx * 256; - int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivoty * 256; + int32_t xs = ((cosma * xt - sinma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivot_x * 256; + int32_t ys = ((sinma * xt + cosma * yt) >> (LV_TRIGO_SHIFT - 8)) + pivot_y * 256; /*Get the integer part of the source pixel*/ int xs_int = xs >> 8; diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 486cc3386eaa..19d130660c0e 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -140,8 +140,18 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l * @param y top side of the destination position */ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); - -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle, int32_t pivotx, int32_t pivoty, lv_coord_t offset_x, lv_coord_t offset_y); +/** + * Rotate the content of canvas (source) and copy the result to an other canvas (destination) + * @param canvas_dest destination canvas. + * @param canvas_src source canvas. + * To rotate an image (lv_img_dsc_t) this canvas be constructed by using the image descriptor directly + * @param angle the angle of rotation (0..360); + * @param offset_x offset X to tell where to put the result data on destination canvas + * @param offset_y offset X to tell where to put the result data on destination canvas + * @param pivot_x pivot X of rotation. Relative to the source canvas + * @param pivot_y pivot Y of rotation. Relative to the source canvas + */ +void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); /** * Draw circle function of the canvas From 12a5e16a757c41325b9fd0a249c37df021a29470 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 14:53:59 +0100 Subject: [PATCH 167/590] add table styles to deafult and template themes --- src/lv_themes/lv_theme_default.c | 8 ++++++++ src/lv_themes/lv_theme_templ.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c index b649be608dab..8f5da23cad7b 100644 --- a/src/lv_themes/lv_theme_default.c +++ b/src/lv_themes/lv_theme_default.c @@ -343,6 +343,13 @@ static void tabview_init(void) #endif } +static void table_init(void) +{ +#if LV_USE_TABLE != 0 + theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.cell = &lv_style_plain; +#endif +} static void win_init(void) { @@ -458,6 +465,7 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) ddlist_init(); roller_init(); tabview_init(); + table_init(); win_init(); #if LV_USE_GROUP diff --git a/src/lv_themes/lv_theme_templ.c b/src/lv_themes/lv_theme_templ.c index 12e9d23aec1d..b28209ca5192 100644 --- a/src/lv_themes/lv_theme_templ.c +++ b/src/lv_themes/lv_theme_templ.c @@ -348,6 +348,13 @@ static void tabview_init(void) #endif } +static void table_init(void) +{ +#if LV_USE_TABLE != 0 + theme.style.table.bg = &def; + theme.style.table.cell = &def; +#endif +} static void win_init(void) { @@ -470,6 +477,7 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) ddlist_init(); roller_init(); tabview_init(); + table_init(); win_init(); #if LV_USE_GROUP From e8a05aaa658996ca07812f68a824899f8c41ece3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 20 Mar 2019 05:46:21 +0100 Subject: [PATCH 168/590] add LV_EVENT_INSERT and use it in Text Area --- src/lv_core/lv_obj.h | 1 + src/lv_objx/lv_ta.c | 66 +++++++++++++++++++++++++++++++++++++++----- src/lv_objx/lv_ta.h | 9 ++++++ 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 6ba7679bf97f..637087e1b23a 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -89,6 +89,7 @@ typedef enum { LV_EVENT_FOCUSED, LV_EVENT_DEFOCUSED, LV_EVENT_VALUE_CHANGED, + LV_EVENT_INSERT, LV_EVENT_SELECTED, LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index b3f7964173e4..237a15a733c6 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -9,7 +9,7 @@ *********************/ #include "lv_ta.h" #if LV_USE_TA != 0 - +#include #include "../lv_core/lv_group.h" #include "../lv_core/lv_refr.h" #include "../lv_draw/lv_draw.h" @@ -63,6 +63,7 @@ static lv_design_cb_t ancestor_design; static lv_design_cb_t scrl_design; static lv_signal_cb_t ancestor_signal; static lv_signal_cb_t scrl_signal; +static const char * ta_insert_replace; /********************** * MACROS @@ -195,6 +196,22 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + uint32_t letter_buf[2]; + letter_buf[0] = c; + letter_buf[1] = '\0'; + + ta_insert_replace = NULL; + lv_event_send(ta, LV_EVENT_INSERT, letter_buf); + if(ta_insert_replace) { + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + + /*Add the replaced text directly it's different from the original*/ + if(strcmp(ta_insert_replace, (char*)letter_buf)) { + lv_ta_add_text(ta, ta_insert_replace); + return; + } + } + if(ext->one_line && (c == '\n' || c == '\r')) { LV_LOG_INFO("Text area: line break ignored in one-line mode"); return; @@ -212,9 +229,6 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) lv_ta_set_edge_flash(ta, false); if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ - uint32_t letter_buf[2]; - letter_buf[0] = c; - letter_buf[1] = '\0'; lv_label_ins_text(ext->label, ext->cursor.pos, (const char *)letter_buf); /*Insert the character*/ @@ -255,7 +269,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) placeholder_update(ta); - lv_event_send(ta, LV_EVENT_VALUE_CHANGED, letter_buf); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL); } /** @@ -267,6 +281,18 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ta_insert_replace = NULL; + lv_event_send(ta, LV_EVENT_INSERT, txt); + if(ta_insert_replace) { + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + + /*Add the replaced text directly it's different from the original*/ + if(strcmp(ta_insert_replace, txt)) { + lv_ta_add_text(ta, ta_insert_replace); + return; + } + } + if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ /*Add the character one-by-one if not all characters are accepted or there is character limit.*/ @@ -322,7 +348,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) placeholder_update(ta); - lv_event_send(ta, LV_EVENT_VALUE_CHANGED, txt); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL); } /** @@ -336,6 +362,19 @@ void lv_ta_del_char(lv_obj_t * ta) if(cur_pos == 0) return; + ta_insert_replace = NULL; + char del_buf[2] = {LV_GROUP_KEY_DEL, '\0'}; + lv_event_send(ta, LV_EVENT_INSERT, del_buf); + if(ta_insert_replace) { + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + + /*Add the replaced text directly it's different from the original*/ + if(strcmp(ta_insert_replace, del_buf)) { + lv_ta_add_text(ta, ta_insert_replace); + return; + } + } + char * label_txt = lv_label_get_text(ext->label); /*Delete a character*/ lv_txt_cut(label_txt, ext->cursor.pos - 1, 1); @@ -442,7 +481,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) placeholder_update(ta); - lv_event_send(ta, LV_EVENT_VALUE_CHANGED, txt); + lv_event_send(ta, LV_EVENT_VALUE_CHANGED, NULL); } /** @@ -698,6 +737,19 @@ void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num) ext->max_length = num; } +/** + * In `LV_EVENT_INSERT` the text which planned to be inserted can be replaced by an other text. + * It can be used to add automatic formatting to the text area. + * @param ta pointer to a text area. + * @param txt pointer to a new string to insert. If `""` no text will be added. + * The variable must be live after the `event_cb` exists. (Should be `global` or `static`) + */ +void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt) +{ + (void)ta; /*Unused*/ + ta_insert_replace = txt; +} + /** * Set a style of a text area * @param ta pointer to a text area object diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 58234603db92..b31afdaab02e 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -201,6 +201,15 @@ void lv_ta_set_accepted_chars(lv_obj_t * ta, const char * list); */ void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num); +/** + * In `LV_EVENT_INSERT` the text which planned to be inserted can be replaced by an other text. + * It can be used to add automatic formatting to the text area. + * @param ta pointer to a text area. + * @param txt pointer to a new string to insert. If `""` no text will be added. + * The variable must be live after the `event_cb` exists. (Should be `global` or `static`) + */ +void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt); + /** * Set the scroll bar mode of a text area * @param ta pointer to a text area object From e7b4bef8acdbbaa744dc77b5551f3c478e2f7012 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 20 Mar 2019 18:33:33 -0400 Subject: [PATCH 169/590] Add lv_btnm_set_one_toggle/lv_btnm_get_one_toggle functions --- src/lv_objx/lv_btnm.c | 46 +++++++++++++++++++++++++++++++++++++++++++ src/lv_objx/lv_btnm.h | 14 +++++++++++++ 2 files changed, 60 insertions(+) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index a37eea9f9e22..541f0415218b 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -39,6 +39,7 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); +static void make_one_button_toggled(const lv_obj_t *btnm, uint16_t btn_idx); /********************** * STATIC VARIABLES @@ -87,6 +88,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) ext->ctrl_bits = NULL; ext->map_p = NULL; ext->recolor = 0; + ext->one_toggle = 0; ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; @@ -401,6 +403,19 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width lv_btnm_set_map(btnm, ext->map_p); } +/** + * Make the button matrix like a selector widget (only one button may be toggled at a time). + * @param btnm Button matrix object + * @param one_toggle Whether "one toggle" mode is enabled + */ +void lv_btnm_set_one_toggle(const lv_obj_t *btnm, bool one_toggle) { + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + ext->one_toggle = one_toggle; + + /*If more than one button is toggled only the first one should be*/ + make_one_button_toggled(btnm, 0); +} + /*===================== * Getter functions *====================*/ @@ -549,6 +564,17 @@ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) return style; } +/** + * Find whether "one toggle" mode is enabled. + * @param btnm Button matrix object + * @return whether "one toggle" mode is enabled + */ +bool lv_btnm_get_one_toggle(const lv_obj_t *btnm) { + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + return ext->one_toggle; +} + /********************** * STATIC FUNCTIONS **********************/ @@ -739,6 +765,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else { ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE; } + make_one_button_toggled(btnm, ext->btn_id_pr); } /*Invalidate to old pressed area*/; @@ -1034,5 +1061,24 @@ static bool maps_are_identical(const char ** map1, const char ** map2) return map1[i][0] == '\0' && map2[i][0] == '\0'; } +/** + * Enforces a single button being toggled on the button matrix. + * It simply clears the toggle flag on other buttons. + * @param btnm Button matrix object + * @param btn_idx Button that should remain toggled + */ +static void make_one_button_toggled(const lv_obj_t *btnm, uint16_t btn_idx) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + uint16_t i = 0; + + for(i = 0; i < ext->btn_cnt; i++) { + if(i != btn_idx) { + ext->ctrl_bits[i] &= (~LV_BTNM_CTRL_TGL_STATE); + invalidate_button_area(btnm, i); + } + } +} #endif diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 6cdc8f3fd319..3b98db5eaac5 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -60,6 +60,7 @@ typedef struct uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ uint8_t recolor :1; /*Enable button recoloring*/ + uint8_t one_toggle :1; /*Single button toggled at once*/ } lv_btnm_ext_t; enum { @@ -166,6 +167,12 @@ void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en); */ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width); +/** + * Make the button matrix like a selector widget (only one button may be toggled at a time). + * @param btnm Button matrix object + * @param one_toggle Whether "one toggle" mode is enabled + */ +void lv_btnm_set_one_toggle(const lv_obj_t *btnm, bool one_toggle); /*===================== * Getter functions @@ -233,6 +240,13 @@ bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) * @return style pointer to a style */ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type); + +/** + * Find whether "one toggle" mode is enabled. + * @param btnm Button matrix object + * @return whether "one toggle" mode is enabled + */ +bool lv_btnm_get_one_toggle(const lv_obj_t *btnm); /********************** * MACROS **********************/ From f5aa26f7e177ecac175662a54cded38548d65536 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 21 Mar 2019 13:42:03 -0400 Subject: [PATCH 170/590] Update one toggle feature based on review comments --- src/lv_objx/lv_btnm.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 541f0415218b..53bbf0782ace 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -765,7 +765,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else { ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE; } - make_one_button_toggled(btnm, ext->btn_id_pr); + if(ext->one_toggle) + make_one_button_toggled(btnm, ext->btn_id_pr); } /*Invalidate to old pressed area*/; @@ -1069,16 +1070,13 @@ static bool maps_are_identical(const char ** map1, const char ** map2) */ static void make_one_button_toggled(const lv_obj_t *btnm, uint16_t btn_idx) { - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + /*Save whether the button was toggled*/ + bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); - uint16_t i = 0; + lv_btnm_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE, false); - for(i = 0; i < ext->btn_cnt; i++) { - if(i != btn_idx) { - ext->ctrl_bits[i] &= (~LV_BTNM_CTRL_TGL_STATE); - invalidate_button_area(btnm, i); - } - } + if(was_toggled) + lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE, true); } #endif From 0005f4c88e4d22c21b4ea5fbcbc98b7f40fd498c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 22 Mar 2019 06:35:17 +0100 Subject: [PATCH 171/590] add lv_indev_wait_release to KEYPAD and ENCODER too --- src/lv_core/lv_indev.c | 27 +++++++++++++++++++++++---- src/lv_hal/lv_hal_indev.h | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index f95f0b32a798..2350b961f305 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -281,7 +281,7 @@ lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev) */ void lv_indev_wait_release(lv_indev_t * indev) { - indev->proc.types.pointer.wait_until_release = 1; + indev->proc.wait_until_release = 1; } /********************** @@ -380,6 +380,15 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) { #if LV_USE_GROUP + if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return; + + if(i->proc.wait_until_release) { + i->proc.wait_until_release = 0; + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; + i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ + } + lv_group_t * g = i->group; if(g == NULL) return; @@ -510,6 +519,16 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) { #if LV_USE_GROUP + + if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return; + + if(i->proc.wait_until_release) { + i->proc.wait_until_release = 0; + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; + i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ + } + lv_group_t * g = i->group; if(g == NULL) return; @@ -674,7 +693,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) { lv_obj_t * pr_obj = proc->types.pointer.act_obj; - if(proc->types.pointer.wait_until_release != 0) return; + if(proc->wait_until_release != 0) return; lv_disp_t * disp = indev_act->driver.disp; @@ -812,12 +831,12 @@ static void indev_proc_press(lv_indev_proc_t * proc) */ static void indev_proc_release(lv_indev_proc_t * proc) { - if(proc->types.pointer.wait_until_release != 0) { + if(proc->wait_until_release != 0) { proc->types.pointer.act_obj = NULL; proc->types.pointer.last_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; - proc->types.pointer.wait_until_release = 0; + proc->wait_until_release = 0; } /*Forget the act obj and send a released signal */ diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index 9ed1479f9479..b41f56565ac9 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -99,7 +99,6 @@ typedef struct _lv_indev_proc_t { /*Flags*/ uint8_t drag_limit_out :1; uint8_t drag_in_prog :1; - uint8_t wait_until_release :1; }pointer; struct { /*Keypad data*/ lv_indev_state_t last_state; @@ -114,6 +113,7 @@ typedef struct _lv_indev_proc_t { uint8_t long_pr_sent :1; uint8_t reset_query :1; uint8_t disabled :1; + uint8_t wait_until_release :1; } lv_indev_proc_t; typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); From f972eb54aa990b1ee58b705c0af5bad780bd474e Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 22 Mar 2019 08:46:06 +0100 Subject: [PATCH 172/590] fix keypad event might be generated multiple times if the event handler returns LV_RES_INV --- src/lv_core/lv_indev.c | 164 +++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 81 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 2350b961f305..bcd4b70ff4f4 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -402,107 +402,109 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) * It must be done here else `lv_indev_get_key` will return the last key in events and signals*/ i->proc.types.keypad.last_key = data->key; - /*Key press happened*/ - if(data->state == LV_INDEV_STATE_PR && + do { + /*Key press happened*/ + if (data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) - { - i->proc.pr_timestamp = lv_tick_get(); - - /*Simulate a press on the object if ENTER was pressed*/ - if(data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - - /*Send the ENTER as a normal KEY*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); - } - /*Move the focus on NEXT*/ - else if(data->key == LV_GROUP_KEY_NEXT) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ - lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ - } - /*Move the focus on PREV*/ - else if(data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ - lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ - } - /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ - else { - lv_group_send_data(g, data->key); - } - } - /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) - { - /*Long press time has elapsed?*/ - if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { - i->proc.long_pr_sent = 1; - if(data->key == LV_GROUP_KEY_ENTER) { - i->proc.longpr_rep_timestamp = lv_tick_get(); - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - } - } - /*Long press repeated time has elapsed?*/ - else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + { + i->proc.pr_timestamp = lv_tick_get(); - i->proc.longpr_rep_timestamp = lv_tick_get(); + /*Simulate a press on the object if ENTER was pressed*/ + if (data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_PRESSED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ - /*Send LONG_PRESS_REP on ENTER*/ - if(data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + /*Send the ENTER as a normal KEY*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); } - /*Move the focus on NEXT again*/ - else if(data->key == LV_GROUP_KEY_NEXT) { + /*Move the focus on NEXT*/ + else if (data->key == LV_GROUP_KEY_NEXT) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if (i->proc.reset_query) break; /*The object might be deleted*/ } - /*Move the focus on PREV again*/ - else if(data->key == LV_GROUP_KEY_PREV) { + /*Move the focus on PREV*/ + else if (data->key == LV_GROUP_KEY_PREV) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if (i->proc.reset_query) break; /*The object might be deleted*/ } - /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { lv_group_send_data(g, data->key); - if(i->proc.reset_query) return; /*The object might be deleted*/ } } - } - /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) - { - /*The user might clear the key when it was released. Always release the pressed key*/ - data->key = prev_key; - if(data->key == LV_GROUP_KEY_ENTER) { + /*Pressing*/ + else if (data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) + { + /*Long press time has elapsed?*/ + if (i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + i->proc.long_pr_sent = 1; + if (data->key == LV_GROUP_KEY_ENTER) { + i->proc.longpr_rep_timestamp = lv_tick_get(); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } + } + /*Long press repeated time has elapsed?*/ + else if (i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + i->proc.longpr_rep_timestamp = lv_tick_get(); - if(i->proc.long_pr_sent == 0) { - lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); + /*Send LONG_PRESS_REP on ENTER*/ + if (data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } + /*Move the focus on NEXT again*/ + else if (data->key == LV_GROUP_KEY_NEXT) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_next(g); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } + /*Move the focus on PREV again*/ + else if (data->key == LV_GROUP_KEY_PREV) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_prev(g); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } + /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + else { + lv_group_send_data(g, data->key); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } } + } + /*Release happened*/ + else if (data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) + { + /*The user might clear the key when it was released. Always release the pressed key*/ + data->key = prev_key; + if (data->key == LV_GROUP_KEY_ENTER) { - lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if (i->proc.long_pr_sent == 0) { + lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); + } + + lv_event_send(focused, LV_EVENT_CLICKED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + + lv_event_send(focused, LV_EVENT_RELEASED, NULL); + if (i->proc.reset_query) break; /*The object might be deleted*/ + } + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; } - i->proc.pr_timestamp = 0; - i->proc.long_pr_sent = 0; - } + } while (false); i->proc.types.keypad.last_state = data->state; #else From 087ab979d6727fea653a3a1f3d1632bc1f00cec4 Mon Sep 17 00:00:00 2001 From: user-0 Date: Fri, 22 Mar 2019 17:24:40 +0200 Subject: [PATCH 173/590] Add support for chart axes ticks and value labels. Add support for chart axis X label. --- lv_objx/lv_chart.c | 309 +++++++++++++++++++++++++++++++++++++++++++++ lv_objx/lv_chart.h | 49 +++++++ 2 files changed, 358 insertions(+) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index 0060c1499606..fdb824ae4fc7 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -20,6 +20,7 @@ #define LV_CHART_HDIV_DEF 3 #define LV_CHART_VDIV_DEF 5 #define LV_CHART_PNUM_DEF 10 +#define LV_CHART_AXIS_MARGIN 50 /********************** * TYPEDEFS @@ -35,6 +36,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask); +static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask); /********************** * STATIC VARIABLES @@ -45,6 +47,7 @@ static lv_signal_func_t ancestor_signal; /********************** * MACROS **********************/ +#define strlens(s) (s==NULL?0:strlen(s)) /********************** * GLOBAL FUNCTIONS @@ -81,6 +84,8 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) ext->series.opa = LV_OPA_COVER; ext->series.dark = LV_OPA_50; ext->series.width = 2; + memset(&ext->x_axis, 0, sizeof(ext->x_axis)); + memset(&ext->y_axis, 0, sizeof(ext->y_axis)); if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_chart); if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_chart); @@ -109,6 +114,8 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) ext->vdiv_cnt = ext_copy->vdiv_cnt; ext->point_cnt = ext_copy->point_cnt; ext->series.opa = ext_copy->series.opa; + ext->x_axis = ext_copy->x_axis; + ext->y_axis = ext_copy->y_axis; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_chart); @@ -387,6 +394,53 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) lv_chart_refresh(chart); } +/** + * Set the x-axis label of a chart + * @param chart pointer to a chart object + * @param text pointer to the label text (not copied) + */ +void lv_chart_set_label(lv_obj_t* chart, const char* text) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + ext->x_axis.label = text; + lv_obj_refresh_ext_size(chart); +} + +/** + * Set the x/y-axis ticks of a chart + * @param chart pointer to a chart object + * @param list_of_values list of string values, terminated with \n, except the last + * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis + * else step in ticks between two value labels + * @param label label to show for this axis (only X) + * @param options extra options + */ +void lv_chart_set_x_ticks( lv_obj_t* chart, + const char* list_of_values, + uint8_t num_tick_marks, + const char* label, + lv_chart_axis_options_t options) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + ext->x_axis.num_tick_marks = num_tick_marks; + ext->x_axis.list_of_values = list_of_values; + ext->x_axis.label = label; + ext->x_axis.options = options; +} + +void lv_chart_set_y_ticks( lv_obj_t* chart, + const char* list_of_values, + uint8_t num_tick_marks, + const char* label, + lv_chart_axis_options_t options) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + ext->y_axis.num_tick_marks = num_tick_marks; + ext->y_axis.list_of_values = list_of_values; + ext->y_axis.label = label; + ext->y_axis.options = options; +} + /*===================== * Getter functions *====================*/ @@ -490,6 +544,7 @@ static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_ if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_draw_cols(chart, mask); if(ext->type & LV_CHART_TYPE_POINT) lv_chart_draw_points(chart, mask); if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_draw_vertical_lines(chart, mask); + lv_chart_draw_axes(chart, mask); } return true; } @@ -522,6 +577,16 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(buf->type[i] == NULL) break; } buf->type[i] = "lv_chart"; + } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + /*Provide extra px draw area around the chart if needed*/ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + if( (ext->x_axis.list_of_values != NULL || ext->x_axis.num_tick_marks != 0) || + (ext->y_axis.list_of_values != NULL || ext->y_axis.num_tick_marks != 0) || + (ext->x_axis.label == NULL) ) + { /* Reserve some space for axis ticks and labels, predefined by the user */ + chart->ext_size += LV_CHART_AXIS_MARGIN; + } } return res; @@ -821,4 +886,248 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas } } } + +static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + if(ext->y_axis.list_of_values != NULL || ext->y_axis.num_tick_marks != 0) { + + const lv_style_t * style = lv_obj_get_style(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + + uint8_t i,j; + uint8_t list_index; + uint8_t num_of_labels; + uint8_t num_scale_ticks; + uint8_t major_tick_len, minor_tick_len; + lv_point_t p1; + lv_point_t p2; + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t y_ofs = chart->coords.y1; + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + char buf[16+1]; /* up to 16 symbols per label + null terminator */ + + /* calculate the size of tick marks */ + major_tick_len = (int32_t)w / 15; + minor_tick_len = major_tick_len * 2/3; + + /* count the '\n'-s to determine the number of options */ + list_index = 0; + num_of_labels = 0; + if(ext->y_axis.list_of_values != NULL) + { + for(j = 0; ext->y_axis.list_of_values[j] != '\0'; j++) { + if(ext->y_axis.list_of_values[j] == '\n') + num_of_labels++; + } + + num_of_labels++; /* last option in the at row*/ + } + + /* we can't have string labels without ticks step, set to 1 if not specified */ + if(ext->y_axis.num_tick_marks == 0) + ext->y_axis.num_tick_marks = 1; + + /* calculate total number of ticks */ + if(num_of_labels < 2) + num_scale_ticks = ext->y_axis.num_tick_marks; + else + num_scale_ticks = (ext->y_axis.num_tick_marks * (num_of_labels - 1)); + + for(i = 0; i < (num_scale_ticks + 1); i++ ) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ + p1.x = 0 + x_ofs; + + /* second point of the tick */ + if( (num_of_labels != 0) && (i == 0 || i % ext->y_axis.num_tick_marks == 0) ) + p2.x = p1.x - major_tick_len; /* major tick */ + else + p2.x = p1.x - minor_tick_len; /* minor tick */ + + /* draw a line at moving y position */ + p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - __LV_CHART_AXIS_Y_TICK_OFFSET_FIX; + + if( i != num_scale_ticks ) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + else + if( (ext->y_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0 ) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + + /* draw values if available */ + if (num_of_labels != 0) + { + /* add text only to major tick */ + if( i == 0 || i % ext->y_axis.num_tick_marks == 0 ) + { + /* search for tick string */ + j = 0; + while( ext->y_axis.list_of_values[list_index] != '\n' && + ext->y_axis.list_of_values[list_index] != '\0') + { + /* do not overflow the buffer, but move to the end of the current label */ + if(j < 16) + buf[j++] = ext->y_axis.list_of_values[list_index++]; + else + list_index++; + } + + /* this was a string, but not end of the list, so jump to the next string */ + if(ext->y_axis.list_of_values[list_index] == '\n') + list_index++; + + /* terminate the string */ + buf[j] = '\0'; + + /* reserve appropriate area */ + lv_point_t size; + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + + /* set the area at some distance of the major tick len left of the tick */ + lv_area_t a = {(p2.x - size.x - __LV_CHART_TO_LABEL_DISTANCE) , (p2.y - size.y/2), (p2.x - __LV_CHART_TO_LABEL_DISTANCE), (p2.y + size.y/2) }; + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); + } + } + } + } +} + +static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) +{ + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + if(ext->x_axis.list_of_values != NULL || ext->x_axis.num_tick_marks != 0) { + + const lv_style_t * style = lv_obj_get_style(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + + uint8_t i,j; + uint8_t list_index; + uint8_t num_of_labels; + uint8_t num_scale_ticks; + uint8_t major_tick_len, minor_tick_len; + lv_point_t p1; + lv_point_t p2; + lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t y_ofs = chart->coords.y1; + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + char buf[16+1]; /* up to 16 symbols per label + null terminator */ + + /* calculate the size of tick marks */ + major_tick_len = (int32_t)w / 15; + minor_tick_len = major_tick_len * 2/3; + + /* count the '\n'-s to determine the number of options */ + list_index = 0; + num_of_labels = 0; + if(ext->x_axis.list_of_values != NULL) + { + for(j = 0; ext->x_axis.list_of_values[j] != '\0'; j++) { + if(ext->x_axis.list_of_values[j] == '\n') + num_of_labels++; + } + + num_of_labels++; /* last option in the at row*/ + } + + /* we can't have string labels without ticks step, set to 1 if not specified */ + if(ext->x_axis.num_tick_marks == 0) + ext->x_axis.num_tick_marks = 1; + + /* calculate total number of marks */ + if(num_of_labels < 2) + num_scale_ticks = ext->x_axis.num_tick_marks; + else + num_scale_ticks = (ext->x_axis.num_tick_marks * (num_of_labels - 1)); + + for(i = 0; i < (num_scale_ticks + 1); i++ ) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ + p1.y = h + y_ofs; + + /* second point of the tick */ + if( (num_of_labels != 0) && (i == 0 || i % ext->x_axis.num_tick_marks == 0) ) + p2.y = p1.y + major_tick_len; /* major tick */ + else + p2.y = p1.y + minor_tick_len; /* minor tick */ + + /* draw a line at moving x position */ + p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - __LV_CHART_AXIS_X_TICK_OFFSET_FIX; + + if( i != num_scale_ticks ) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + else + if( (ext->x_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0 ) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + + /* draw values if available */ + if (num_of_labels != 0) + { + /* add text only to major tick */ + if( i == 0 || i % ext->x_axis.num_tick_marks == 0 ) + { + /* search for tick string */ + j = 0; + while( ext->x_axis.list_of_values[list_index] != '\n' && + ext->x_axis.list_of_values[list_index] != '\0') + { + /* do not overflow the buffer, but move to the end of the current label */ + if(j < 16) + buf[j++] = ext->x_axis.list_of_values[list_index++]; + else + list_index++; + } + + /* this was a string, but not end of the list, so jump to the next string */ + if(ext->x_axis.list_of_values[list_index] == '\n') + list_index++; + + /* terminate the string */ + buf[j] = '\0'; + + /* reserve appropriate area */ + lv_point_t size; + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + + /* set the area at some distance of the major tick len under of the tick */ + lv_area_t a = { (p2.x - size.x/2) , (p2.y + __LV_CHART_TO_LABEL_DISTANCE), (p2.x + size.x/2), (p2.y + size.y + __LV_CHART_TO_LABEL_DISTANCE) }; + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); + } + } + } + } +} + +static void lv_chart_draw_x_axis_label(lv_obj_t * chart, const lv_area_t * mask) +{ + + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + + if (ext->x_axis.label != NULL) + { + const lv_style_t * style = lv_obj_get_style(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_coord_t w = lv_obj_get_width(chart); + + lv_point_t size; + lv_txt_get_size(&size, ext->x_axis.label, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + + lv_area_t label_area; + label_area.x1 = chart->coords.x1 + w/2 - size.x/2; + label_area.y1 = chart->coords.y1 - __LV_CHART_TO_LABEL_DISTANCE - size.y/2; + label_area.x2 = label_area.x1 + size.x; + label_area.y2 = label_area.y1 + size.y/2; + + lv_draw_label(&label_area, mask, style, opa_scale, ext->x_axis.label, LV_TXT_FLAG_CENTER, NULL); + } +} + +static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask) +{ + lv_chart_draw_y_ticks(chart, mask); + lv_chart_draw_x_ticks(chart, mask); + lv_chart_draw_x_axis_label(chart, mask); +} #endif diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index baea9d0f4c0e..a97fc704ec61 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -39,6 +39,25 @@ typedef struct uint16_t start_point; } lv_chart_series_t; +/*Data of chart */ +#define __LV_CHART_TO_LABEL_DISTANCE 4 +#define __LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 +#define __LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 + +enum +{ + LV_CHART_AXIS_DRAW_LAST_TICK = 0x01 /* draw the last tick */ +}; +typedef uint8_t lv_chart_axis_options_t; + +typedef struct +{ + const char* list_of_values; + uint8_t num_tick_marks; + const char* label; + lv_chart_axis_options_t options; +} lv_chart_axis_cfg_t; + /*Data of chart */ typedef struct { @@ -51,6 +70,8 @@ typedef struct uint8_t vdiv_cnt; /*Number of vertical division lines*/ uint16_t point_cnt; /*Point number in a data line*/ uint8_t type :4; /*Line, column or point chart (from 'lv_chart_type_t')*/ + lv_chart_axis_cfg_t y_axis; + lv_chart_axis_cfg_t x_axis; struct { lv_coord_t width; /*Line width or point radius*/ uint8_t num; /*Number of data lines in dl_ll*/ @@ -190,6 +211,34 @@ static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style) lv_obj_set_style(chart, style); } +/** + * Set the x-axis label of a chart + * @param chart pointer to a chart object + * @param text pointer to the label text (not copied) + */ +void lv_chart_set_label(lv_obj_t* chart, const char* text); + +/** + * Set the x/y-axis ticks of a chart + * @param chart pointer to a chart object + * @param list_of_values list of string values, terminated with \n, except the last + * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis + * else step in ticks between two value labels + * @param label label to show for this axis (only X) + * @param options extra options + */ +void lv_chart_set_x_ticks( lv_obj_t* chart, + const char* list_of_values, + uint8_t num_tick_marks, + const char* label, + lv_chart_axis_options_t options); + +void lv_chart_set_y_ticks( lv_obj_t* chart, + const char* list_of_values, + uint8_t num_tick_marks, + const char* label, + lv_chart_axis_options_t options); + /*===================== * Getter functions *====================*/ From 46d5debc7a679de622201ed19db257f70d46cc1c Mon Sep 17 00:00:00 2001 From: user-0 Date: Fri, 22 Mar 2019 19:20:58 +0200 Subject: [PATCH 174/590] FIXED: Add support for chart axes ticks and value labels / chart label. --- lv_objx/lv_chart.c | 33 +++++++++++++++++++-------------- lv_objx/lv_chart.h | 6 +----- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index fdb824ae4fc7..caa31135eb28 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -21,6 +21,12 @@ #define LV_CHART_VDIV_DEF 5 #define LV_CHART_PNUM_DEF 10 #define LV_CHART_AXIS_MARGIN 50 +#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 +#define LV_CHART_AXIS_TO_LABEL_DISTANCE 4 +#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1/15 +#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2/3 +#define LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 +#define LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 /********************** * TYPEDEFS @@ -47,7 +53,6 @@ static lv_signal_func_t ancestor_signal; /********************** * MACROS **********************/ -#define strlens(s) (s==NULL?0:strlen(s)) /********************** * GLOBAL FUNCTIONS @@ -907,11 +912,11 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t y_ofs = chart->coords.y1; lv_coord_t h = lv_obj_get_height(chart); lv_coord_t w = lv_obj_get_width(chart); - char buf[16+1]; /* up to 16 symbols per label + null terminator */ + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ - major_tick_len = (int32_t)w / 15; - minor_tick_len = major_tick_len * 2/3; + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; /* count the '\n'-s to determine the number of options */ list_index = 0; @@ -947,7 +952,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) p2.x = p1.x - minor_tick_len; /* minor tick */ /* draw a line at moving y position */ - p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - __LV_CHART_AXIS_Y_TICK_OFFSET_FIX; + p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - LV_CHART_AXIS_Y_TICK_OFFSET_FIX; if( i != num_scale_ticks ) lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -967,7 +972,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) ext->y_axis.list_of_values[list_index] != '\0') { /* do not overflow the buffer, but move to the end of the current label */ - if(j < 16) + if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) buf[j++] = ext->y_axis.list_of_values[list_index++]; else list_index++; @@ -985,7 +990,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); /* set the area at some distance of the major tick len left of the tick */ - lv_area_t a = {(p2.x - size.x - __LV_CHART_TO_LABEL_DISTANCE) , (p2.y - size.y/2), (p2.x - __LV_CHART_TO_LABEL_DISTANCE), (p2.y + size.y/2) }; + lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE) , (p2.y - size.y/2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y + size.y/2) }; lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); } } @@ -1014,11 +1019,11 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t y_ofs = chart->coords.y1; lv_coord_t h = lv_obj_get_height(chart); lv_coord_t w = lv_obj_get_width(chart); - char buf[16+1]; /* up to 16 symbols per label + null terminator */ + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ - major_tick_len = (int32_t)w / 15; - minor_tick_len = major_tick_len * 2/3; + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; /* count the '\n'-s to determine the number of options */ list_index = 0; @@ -1054,7 +1059,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) p2.y = p1.y + minor_tick_len; /* minor tick */ /* draw a line at moving x position */ - p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - __LV_CHART_AXIS_X_TICK_OFFSET_FIX; + p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - LV_CHART_AXIS_X_TICK_OFFSET_FIX; if( i != num_scale_ticks ) lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -1074,7 +1079,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) ext->x_axis.list_of_values[list_index] != '\0') { /* do not overflow the buffer, but move to the end of the current label */ - if(j < 16) + if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) buf[j++] = ext->x_axis.list_of_values[list_index++]; else list_index++; @@ -1092,7 +1097,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); /* set the area at some distance of the major tick len under of the tick */ - lv_area_t a = { (p2.x - size.x/2) , (p2.y + __LV_CHART_TO_LABEL_DISTANCE), (p2.x + size.x/2), (p2.y + size.y + __LV_CHART_TO_LABEL_DISTANCE) }; + lv_area_t a = { (p2.x - size.x/2) , (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x/2), (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE) }; lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); } } @@ -1116,7 +1121,7 @@ static void lv_chart_draw_x_axis_label(lv_obj_t * chart, const lv_area_t * mask) lv_area_t label_area; label_area.x1 = chart->coords.x1 + w/2 - size.x/2; - label_area.y1 = chart->coords.y1 - __LV_CHART_TO_LABEL_DISTANCE - size.y/2; + label_area.y1 = chart->coords.y1 - LV_CHART_AXIS_TO_LABEL_DISTANCE - size.y/2; label_area.x2 = label_area.x1 + size.x; label_area.y2 = label_area.y1 + size.y/2; diff --git a/lv_objx/lv_chart.h b/lv_objx/lv_chart.h index a97fc704ec61..c6914247ffec 100644 --- a/lv_objx/lv_chart.h +++ b/lv_objx/lv_chart.h @@ -39,11 +39,7 @@ typedef struct uint16_t start_point; } lv_chart_series_t; -/*Data of chart */ -#define __LV_CHART_TO_LABEL_DISTANCE 4 -#define __LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 -#define __LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 - +/*Data of axis */ enum { LV_CHART_AXIS_DRAW_LAST_TICK = 0x01 /* draw the last tick */ From 36b212d4dcb50f0abac24747fd6e671a4b166731 Mon Sep 17 00:00:00 2001 From: user-0 Date: Fri, 22 Mar 2019 22:49:09 +0200 Subject: [PATCH 175/590] TUNE: Add support for chart axes ticks and value labels / chart label. --- lv_objx/lv_chart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_chart.c b/lv_objx/lv_chart.c index caa31135eb28..182abeb21056 100644 --- a/lv_objx/lv_chart.c +++ b/lv_objx/lv_chart.c @@ -1121,7 +1121,7 @@ static void lv_chart_draw_x_axis_label(lv_obj_t * chart, const lv_area_t * mask) lv_area_t label_area; label_area.x1 = chart->coords.x1 + w/2 - size.x/2; - label_area.y1 = chart->coords.y1 - LV_CHART_AXIS_TO_LABEL_DISTANCE - size.y/2; + label_area.y1 = chart->coords.y1 - LV_CHART_AXIS_TO_LABEL_DISTANCE - (style->text.font->h_px / 4) - size.y/2; label_area.x2 = label_area.x1 + size.x; label_area.y2 = label_area.y1 + size.y/2; From e32b40ecf119e7ddfc9038a6cd8d4232ba72f383 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Mar 2019 19:08:21 -0400 Subject: [PATCH 176/590] Only start scrolling tabview horizontally if page is at edge --- src/lv_objx/lv_page.c | 27 +++++++++++++++++++++++++++ src/lv_objx/lv_page.h | 20 ++++++++++++++++++++ src/lv_objx/lv_tabview.c | 32 ++++++++++++++++++++++---------- 3 files changed, 69 insertions(+), 10 deletions(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 2979d59424f5..ecc2e7cabb44 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -387,6 +387,33 @@ lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) * Other functions *====================*/ +/** + * Find whether the page has been scrolled to a certain edge. + * @param page Page object + * @param edge Edge to check + * @return true if the page is on the specified edge + */ +bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge) { + lv_style_t * page_style = lv_obj_get_style(page); + lv_obj_t * scrl = lv_page_get_scrl(page); + lv_area_t page_coords; + lv_area_t scrl_coords; + + lv_obj_get_coords(scrl, &scrl_coords); + lv_obj_get_coords(page, &page_coords); + + if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) + return true; + else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) + return true; + else if(edge == LV_PAGE_EDGE_LEFT && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) + return true; + else if(edge == LV_PAGE_EDGE_RIGHT && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) + return true; + + return false; +} + /** * Glue the object to the page. After it the page can be moved (dragged) with this object too. * @param obj pointer to an object on a page diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 2c9de41f2464..ddf68998f18b 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -49,6 +49,17 @@ enum }; typedef uint8_t lv_sb_mode_t; +/*Edges: describes the four edges of the page*/ + +enum +{ + LV_PAGE_EDGE_LEFT = 0x0, + LV_PAGE_EDGE_TOP = 0x1, + LV_PAGE_EDGE_RIGHT = 0x2, + LV_PAGE_EDGE_BOTTOM = 0x3 +}; +typedef uint8_t lv_page_edge_t; + /*Data of page*/ typedef struct { @@ -349,6 +360,15 @@ lv_style_t * lv_page_get_style(const lv_obj_t *page, lv_page_style_t type); * Other functions *====================*/ + +/** + * Find whether the page has been scrolled to a certain edge. + * @param page Page object + * @param edge Edge to check + * @return true if the page is on the specified edge + */ +bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge); + /** * Glue the object to the page. After it the page can be moved (dragged) with this object too. * @param obj pointer to an object on a page diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 6a0b08fc86e7..50f707fe75ca 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -733,16 +733,28 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_coord_t x_diff = point_act.x - ext->point_last.x; lv_coord_t y_diff = point_act.y - ext->point_last.y; - if(ext->draging == 0) { - if(x_diff >= LV_INDEV_DRAG_LIMIT || x_diff <= -LV_INDEV_DRAG_LIMIT) { - ext->drag_hor = 1; - ext->draging = 1; - lv_obj_set_drag(lv_page_get_scrl(tabpage), false); - } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { - ext->drag_hor = 0; - ext->draging = 1; - } - } + + if(x_diff >= LV_INDEV_DRAG_LIMIT || x_diff <= -LV_INDEV_DRAG_LIMIT) { + ext->draging = 1; + /*Check if the page is on the edge */ + if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || + (lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT) && x_diff < 0)) { + if(ext->drag_hor == 0) { + ext->point_last.x = point_act.x; + ext->point_last.y = point_act.y; + } + ext->drag_hor = 1; + lv_obj_set_drag(lv_page_get_scrl(tabpage), false); + + } else if(ext->drag_hor == 0) { + ext->drag_hor = 0; + } + } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { + ext->drag_hor = 0; + ext->draging = 1; + } else + ext->draging = 0; + if(ext->drag_hor) { lv_obj_set_x(ext->content, lv_obj_get_x(ext->content) + point_act.x - ext->point_last.x); ext->point_last.x = point_act.x; From de04b39165f2b5020bccb19b3e695d0013d5ba18 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Mar 2019 19:11:37 -0400 Subject: [PATCH 177/590] Remove use of 'const' in `lv_btnm_set_one_toggle` --- src/lv_objx/lv_btnm.c | 6 +++--- src/lv_objx/lv_btnm.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 53bbf0782ace..1594cf78185e 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -39,7 +39,7 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); -static void make_one_button_toggled(const lv_obj_t *btnm, uint16_t btn_idx); +static void make_one_button_toggled(lv_obj_t *btnm, uint16_t btn_idx); /********************** * STATIC VARIABLES @@ -408,7 +408,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ -void lv_btnm_set_one_toggle(const lv_obj_t *btnm, bool one_toggle) { +void lv_btnm_set_one_toggle(lv_obj_t *btnm, bool one_toggle) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); ext->one_toggle = one_toggle; @@ -1068,7 +1068,7 @@ static bool maps_are_identical(const char ** map1, const char ** map2) * @param btnm Button matrix object * @param btn_idx Button that should remain toggled */ -static void make_one_button_toggled(const lv_obj_t *btnm, uint16_t btn_idx) +static void make_one_button_toggled(lv_obj_t *btnm, uint16_t btn_idx) { /*Save whether the button was toggled*/ bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 3b98db5eaac5..edadc03c7dcb 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -172,7 +172,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ -void lv_btnm_set_one_toggle(const lv_obj_t *btnm, bool one_toggle); +void lv_btnm_set_one_toggle(lv_obj_t *btnm, bool one_toggle); /*===================== * Getter functions From e1f946281831108e9e9b70d1d5418101377fd436 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Mar 2019 19:19:03 -0400 Subject: [PATCH 178/590] Add debug info to tabview --- src/lv_objx/lv_page.c | 5 +++++ src/lv_objx/lv_tabview.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index ecc2e7cabb44..bbef816d51b4 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -6,6 +6,7 @@ /********************* * INCLUDES *********************/ +#include #include "../lv_objx/lv_page.h" #if LV_USE_PAGE != 0 @@ -402,6 +403,10 @@ bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge) { lv_obj_get_coords(scrl, &scrl_coords); lv_obj_get_coords(page, &page_coords); + if(edge == LV_PAGE_EDGE_LEFT) { + printf("scrl_coords.x1 %d\n", scrl_coords.x1); + printf("page_coords.x1 + page_style->body.padding.left %d\n", page_coords.x1 + page_style->body.padding.left); + } if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) return true; else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 50f707fe75ca..1455093a1c0a 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -6,6 +6,7 @@ /********************* * INCLUDES *********************/ +#include #include "lv_tabview.h" #if LV_USE_TABVIEW != 0 @@ -744,11 +745,13 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; } ext->drag_hor = 1; + printf("Horizontal drag started\n"); lv_obj_set_drag(lv_page_get_scrl(tabpage), false); } else if(ext->drag_hor == 0) { ext->drag_hor = 0; } + printf("%d %d\n", lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT), lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT)); } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { ext->drag_hor = 0; ext->draging = 1; From 13033c28d83f5768b89a577e27f0fd1de054bbd8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 23 Mar 2019 01:05:41 +0100 Subject: [PATCH 179/590] lv_page: fix scrl left padding --- src/lv_objx/lv_page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index ecc2e7cabb44..4e7feaf80d9f 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -944,7 +944,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } } else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) { - new_x = hpad; /*Left align*/ + new_x = page_style->body.padding.left; /*Left align*/ refr_x = true; if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && @@ -955,7 +955,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } } - /*scrollable height smaller then page height? -> align to left*/ + /*scrollable height smaller then page height? -> align to top*/ if(lv_area_get_height(&scrl_coords) + vpad <= lv_area_get_height(&page_coords)) { if(scrl_coords.y1 != page_coords.y1 + page_style->body.padding.top) { new_y = page_style->body.padding.top; From e1e6813eb1c8477e8a2c6f2187b302b0cfc0dd09 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 23 Mar 2019 01:19:57 +0100 Subject: [PATCH 180/590] fix typo in lv_port_..._template files --- porting/lv_port_disp_template.c | 4 ++-- porting/lv_port_indev_template.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/porting/lv_port_disp_template.c b/porting/lv_port_disp_template.c index 7fdfa79bc02f..1f4502720970 100644 --- a/porting/lv_port_disp_template.c +++ b/porting/lv_port_disp_template.c @@ -24,7 +24,7 @@ **********************/ static void disp_init(void); -static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p); +static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); #if LV_USE_GPU static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color); @@ -135,7 +135,7 @@ static void disp_init(void) /* Flush the content of the internal buffer the specific area on the display * You can use DMA or any hardware acceleration to do this operation in the background but * 'lv_disp_flush_ready()' has to be called when finished. */ -static void disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p) +static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) { /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/ diff --git a/porting/lv_port_indev_template.c b/porting/lv_port_indev_template.c index 98fe79b1de44..2e243190f8ad 100644 --- a/porting/lv_port_indev_template.c +++ b/porting/lv_port_indev_template.c @@ -24,25 +24,25 @@ **********************/ static void touchpad_init(void); -static bool touchpad_read(lv_indev_t * indev, lv_indev_data_t * data); +static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static bool touchpad_is_pressed(void); static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y); static void mouse_init(void); -static bool mouse_read(lv_indev_t * indev, lv_indev_data_t * data); +static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static bool mouse_is_pressed(void); static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y); static void keypad_init(void); -static bool keypad_read(lv_indev_t * indev, lv_indev_data_t * data); +static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static uint32_t keypad_get_key(void); static void encoder_init(void); -static bool encoder_read(lv_indev_t * indev, lv_indev_data_t * data); +static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static void encoder_handler(void); static void button_init(void); -static bool button_read(lv_indev_t * indev, lv_indev_data_t * data); +static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); static int8_t button_get_pressed_id(void); static bool button_is_pressed(uint8_t id); @@ -187,7 +187,7 @@ static void touchpad_init(void) } /* Will be called by the library to read the touchpad */ -static bool touchpad_read(lv_indev_t * indev, lv_indev_data_t * data) +static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { static lv_coord_t last_x = 0; static lv_coord_t last_y = 0; @@ -237,7 +237,7 @@ static void mouse_init(void) } /* Will be called by the library to read the mouse */ -static bool mouse_read(lv_indev_t * indev, lv_indev_data_t * data) +static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { /*Get the current x and y coordinates*/ mouse_get_xy(&data->point.x, &data->point.y); @@ -281,7 +281,7 @@ static void keypad_init(void) } /* Will be called by the library to read the mouse */ -static bool keypad_read(lv_indev_t * indev, lv_indev_data_t * data) +static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { static uint32_t last_key = 0; @@ -342,7 +342,7 @@ static void encoder_init(void) } /* Will be called by the library to read the encoder */ -static bool encoder_read(lv_indev_t * indev, lv_indev_data_t * data) +static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { data->enc_diff = encoder_diff; @@ -373,7 +373,7 @@ static void button_init(void) } /* Will be called by the library to read the button */ -static bool button_read(lv_indev_t * indev, lv_indev_data_t * data) +static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { static uint8_t last_btn = 0; From f0e423a71eb7f2d1e4f8685f6e9e15f31fb92224 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Mar 2019 21:28:57 -0400 Subject: [PATCH 181/590] Remove debug information --- src/lv_objx/lv_page.c | 5 ----- src/lv_objx/lv_tabview.c | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index be7a11035618..4e7feaf80d9f 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -6,7 +6,6 @@ /********************* * INCLUDES *********************/ -#include #include "../lv_objx/lv_page.h" #if LV_USE_PAGE != 0 @@ -403,10 +402,6 @@ bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge) { lv_obj_get_coords(scrl, &scrl_coords); lv_obj_get_coords(page, &page_coords); - if(edge == LV_PAGE_EDGE_LEFT) { - printf("scrl_coords.x1 %d\n", scrl_coords.x1); - printf("page_coords.x1 + page_style->body.padding.left %d\n", page_coords.x1 + page_style->body.padding.left); - } if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) return true; else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 1455093a1c0a..50f707fe75ca 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -6,7 +6,6 @@ /********************* * INCLUDES *********************/ -#include #include "lv_tabview.h" #if LV_USE_TABVIEW != 0 @@ -745,13 +744,11 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; } ext->drag_hor = 1; - printf("Horizontal drag started\n"); lv_obj_set_drag(lv_page_get_scrl(tabpage), false); } else if(ext->drag_hor == 0) { ext->drag_hor = 0; } - printf("%d %d\n", lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT), lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT)); } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { ext->drag_hor = 0; ext->draging = 1; From a8dc1afe2c42a5c9df90d19db109ef3e46cefb7e Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 22 Mar 2019 21:38:05 -0400 Subject: [PATCH 182/590] Lock out horizontal swiping while vertical scrolling is in progress --- src/lv_objx/lv_tabview.c | 5 ++++- src/lv_objx/lv_tabview.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 50f707fe75ca..3f4e34c88538 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -82,6 +82,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->drag_hor = 0; ext->draging = 0; + ext->scroll_ver = 0; ext->slide_enable = 1; ext->tab_cur = 0; ext->point_last.x = 0; @@ -734,7 +735,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_coord_t y_diff = point_act.y - ext->point_last.y; - if(x_diff >= LV_INDEV_DRAG_LIMIT || x_diff <= -LV_INDEV_DRAG_LIMIT) { + if(!ext->scroll_ver && (x_diff >= LV_INDEV_DRAG_LIMIT || x_diff <= -LV_INDEV_DRAG_LIMIT)) { ext->draging = 1; /*Check if the page is on the edge */ if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || @@ -752,6 +753,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { ext->drag_hor = 0; ext->draging = 1; + ext->scroll_ver = 1; } else ext->draging = 0; @@ -780,6 +782,7 @@ static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); ext->drag_hor = 0; ext->draging = 0; + ext->scroll_ver = 0; lv_obj_set_drag(lv_page_get_scrl(tabpage), true); diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index 6c451a6a6bbc..5d0cd8291fdd 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -64,6 +64,7 @@ typedef struct uint8_t slide_enable :1; /*1: enable horizontal sliding by touch pad*/ uint8_t draging :1; uint8_t drag_hor :1; + uint8_t scroll_ver :1; uint8_t btns_hide :1; lv_tabview_btns_pos_t btns_pos :1; } lv_tabview_ext_t; From e22beaea2251a355393ee615b29c4f55dbea56c2 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 23 Mar 2019 08:59:23 -0400 Subject: [PATCH 183/590] Remove merge information in README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 66ef90a676ca..d7d19c9997e0 100644 --- a/README.md +++ b/README.md @@ -126,11 +126,7 @@ bool my_touchpad_read(lv_indev_t * indev, lv_indev_data_t * data) return false; /*Return `false` because we are not buffering and no more data to read*/ } ``` -<<<<<<< HEAD -6. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in a Timer interrupt or in an Operation system task. -======= 6. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in Timer interrupt or in an Operation system task. It will redraw the screen if required, handle input devices etc. ->>>>>>> master For a detailed description check the [Documentation](https://docs.littlevgl.com/#Porting) or the [Porting examples](https://github.com/littlevgl/lvgl/tree/multi-disp/lv_porting). From d479927e96a7930d8a1799be42734940c7fde962 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 23 Mar 2019 09:20:41 -0400 Subject: [PATCH 184/590] Make ddlist more aesthetic --- src/lv_objx/lv_ddlist.c | 35 +++++++++++++++++++++++++++++++---- src/lv_objx/lv_ddlist.h | 1 + 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 205272aa8a6a..07b494db9005 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -44,6 +44,8 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); +static void lv_ddlist_anim_cb(lv_obj_t * ddlist); +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height); /********************** * STATIC VARIABLES @@ -523,7 +525,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); /*If the list is opened draw a rectangle under the selected item*/ - if(ext->opened != 0) { + if(ext->opened != 0 || ext->force_sel) { lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; lv_coord_t font_h = lv_font_get_height(font); @@ -548,7 +550,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); /*Redraw only in opened state*/ - if(ext->opened) { + if(ext->opened || ext->force_sel) { lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; lv_coord_t font_h = lv_font_get_height(font); @@ -859,9 +861,9 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) a.var = ddlist; a.start = lv_obj_get_height(ddlist); a.end = new_height; - a.fp = (lv_anim_fp_t)lv_obj_set_height; + a.fp = (lv_anim_fp_t)lv_ddlist_adjust_height; a.path = lv_anim_path_linear; - a.end_cb = (lv_anim_cb_t)lv_ddlist_pos_current_option; + a.end_cb = (lv_anim_cb_t)lv_ddlist_anim_cb; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -869,11 +871,36 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) a.repeat = 0; a.repeat_pause = 0; + ext->force_sel = 1; /*Keep the list item selected*/ lv_anim_create(&a); #endif } } +/** + * Position the list and remove the selection highlight if it's closed. + * Called at end of list animation. + * @param ddlist pointer to a drop down list + */ +static void lv_ddlist_anim_cb(lv_obj_t * ddlist) { + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + lv_ddlist_pos_current_option(ddlist); + + ext->force_sel = 0; /*Turn off drawing of selection*/ +} + +/** + * Adjusts the ddlist's height and then positions the option within it's new height. + * This keeps the option visible during animation. + * @param ddlist Drop down list object + * @param height New drop down list height + */ +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) { + lv_obj_set_height(ddlist, height); + lv_ddlist_pos_current_option(ddlist); +} + /** * Set the position of list when it is closed to show the selected item * @param ddlist pointer to a drop down list diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 5a516a93297b..799df11e548a 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -53,6 +53,7 @@ typedef struct uint16_t sel_opt_id_ori; /*Store the original index on focus*/ uint16_t anim_time; /*Open/Close animation time [ms]*/ uint8_t opened :1; /*1: The list is opened (handled by the library)*/ + uint8_t force_sel :1; /*1: Keep the selection highlight even if the list is closed*/ uint8_t draw_arrow :1; /*1: Draw arrow*/ uint8_t stay_open :1; /*1: Don't close the list when a new item is selected*/ lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ From 5565516e96bd322c217588d17c757a5749d9539e Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 23 Mar 2019 09:33:34 -0400 Subject: [PATCH 185/590] Fix off-by-one error in chart line drawing --- src/lv_objx/lv_chart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 871d56b66f98..3e82ac74f6f1 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -492,6 +492,7 @@ static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_ if(ext->type & LV_CHART_TYPE_POINT) lv_chart_draw_points(chart, mask); if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_draw_vertical_lines(chart, mask); if(ext->type & LV_CHART_TYPE_AREA) lv_chart_draw_areas(chart, mask); + } return true; } @@ -545,8 +546,8 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) uint8_t div_i_start; lv_point_t p1; lv_point_t p2; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart) - 1; + lv_coord_t h = lv_obj_get_height(chart) - 1; lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; From db4f4f0360509930209ba2b56e7ac3ad43937816 Mon Sep 17 00:00:00 2001 From: user-0 Date: Sat, 23 Mar 2019 22:21:02 +0200 Subject: [PATCH 186/590] FIXED/UPDATED: Add support for chart axes ticks and value labels / chart label. --- lv_conf_template.h | 1 + src/lv_objx/lv_chart.c | 107 ++++++++++++++++++----------------------- src/lv_objx/lv_chart.h | 20 +++++--- 3 files changed, 59 insertions(+), 69 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 8def85a492dc..8450b6ea85d8 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -257,6 +257,7 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data /*Chart (dependencies: -)*/ #define LV_USE_CHART 1 +#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 /*Table (dependencies: lv_label)*/ #define LV_USE_TABLE 1 diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 2f9a4d5d55e9..ac9b2fe1d1bc 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -20,13 +20,11 @@ #define LV_CHART_HDIV_DEF 3 #define LV_CHART_VDIV_DEF 5 #define LV_CHART_PNUM_DEF 10 -#define LV_CHART_AXIS_MARGIN 50 -#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 -#define LV_CHART_AXIS_TO_LABEL_DISTANCE 4 -#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1/15 -#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2/3 -#define LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 -#define LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 +#define LV_CHART_AXIS_TO_LABEL_DISTANCE 4 +#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1/15 +#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2/3 +#define LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 +#define LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 /********************** * TYPEDEFS @@ -90,6 +88,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) ext->series.opa = LV_OPA_COVER; ext->series.dark = LV_OPA_50; ext->series.width = 2; + ext->margin = 0; memset(&ext->x_axis, 0, sizeof(ext->x_axis)); memset(&ext->y_axis, 0, sizeof(ext->y_axis)); @@ -120,8 +119,9 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) ext->vdiv_cnt = ext_copy->vdiv_cnt; ext->point_cnt = ext_copy->point_cnt; ext->series.opa = ext_copy->series.opa; - ext->x_axis = ext_copy->x_axis; - ext->y_axis = ext_copy->y_axis; + ext->margin = ext_copy->margin; + memcpy(&ext->x_axis, &ext_copy->x_axis, sizeof(lv_chart_axis_cfg_t)); + memcpy(&ext->y_axis, &ext_copy->y_axis, sizeof(lv_chart_axis_cfg_t)); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_chart); @@ -401,15 +401,14 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) } /** - * Set the x-axis label of a chart - * @param chart pointer to a chart object - * @param text pointer to the label text (not copied) + * Set the margin around the chart, used for axes value and labels + * @param margin value of the margin */ -void lv_chart_set_label(lv_obj_t* chart, const char* text) +void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - ext->x_axis.label = text; - lv_obj_refresh_ext_size(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + ext->margin = margin; + lv_obj_refresh_ext_size(chart); } /** @@ -418,32 +417,37 @@ void lv_chart_set_label(lv_obj_t* chart, const char* text) * @param list_of_values list of string values, terminated with \n, except the last * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis * else step in ticks between two value labels - * @param label label to show for this axis (only X) + * @param major_tick_len the length of the major tick, AUTO if 0 + * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ void lv_chart_set_x_ticks( lv_obj_t* chart, const char* list_of_values, uint8_t num_tick_marks, - const char* label, + uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->x_axis.num_tick_marks = num_tick_marks; ext->x_axis.list_of_values = list_of_values; - ext->x_axis.label = label; + ext->x_axis.major_tick_len = major_tick_len; + ext->x_axis.minor_tick_len = minor_tick_len; ext->x_axis.options = options; } void lv_chart_set_y_ticks( lv_obj_t* chart, const char* list_of_values, uint8_t num_tick_marks, - const char* label, + uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->y_axis.num_tick_marks = num_tick_marks; ext->y_axis.list_of_values = list_of_values; - ext->y_axis.label = label; + ext->y_axis.major_tick_len = major_tick_len; + ext->y_axis.minor_tick_len = minor_tick_len; ext->y_axis.options = options; } @@ -565,6 +569,7 @@ static bool lv_chart_design(lv_obj_t * chart, const lv_area_t * mask, lv_design_ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param) { lv_res_t res; + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); /* Include the ancient signal function */ res = ancestor_signal(chart, sign, param); @@ -572,7 +577,6 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(sign == LV_SIGNAL_CLEANUP) { lv_coord_t ** datal; - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); LV_LL_READ(ext->series_ll, datal) { lv_mem_free(*datal); } @@ -585,15 +589,8 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param } buf->type[i] = "lv_chart"; } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - /*Provide extra px draw area around the chart if needed*/ - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - - if( (ext->x_axis.list_of_values != NULL || ext->x_axis.num_tick_marks != 0) || - (ext->y_axis.list_of_values != NULL || ext->y_axis.num_tick_marks != 0) || - (ext->x_axis.label == NULL) ) - { /* Reserve some space for axis ticks and labels, predefined by the user */ - chart->ext_size += LV_CHART_AXIS_MARGIN; - } + /*Provide extra px draw area around the chart*/ + chart->ext_size = ext->margin; } return res; @@ -977,8 +974,15 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ - major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; - minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + if(ext->y_axis.major_tick_len == 0) + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + else + major_tick_len = ext->y_axis.major_tick_len; + + if(ext->y_axis.minor_tick_len == 0) + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + else + minor_tick_len = ext->y_axis.minor_tick_len; /* count the '\n'-s to determine the number of options */ list_index = 0; @@ -1084,8 +1088,15 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ - major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; - minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + if(ext->x_axis.major_tick_len == 0) + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + else + major_tick_len = ext->x_axis.major_tick_len; + + if(ext->x_axis.minor_tick_len == 0) + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + else + minor_tick_len = ext->x_axis.minor_tick_len; /* count the '\n'-s to determine the number of options */ list_index = 0; @@ -1167,35 +1178,9 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) } } -static void lv_chart_draw_x_axis_label(lv_obj_t * chart, const lv_area_t * mask) -{ - - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - - if (ext->x_axis.label != NULL) - { - const lv_style_t * style = lv_obj_get_style(chart); - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); - lv_coord_t w = lv_obj_get_width(chart); - - lv_point_t size; - lv_txt_get_size(&size, ext->x_axis.label, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); - - lv_area_t label_area; - label_area.x1 = chart->coords.x1 + w/2 - size.x/2; - label_area.y1 = chart->coords.y1 - LV_CHART_AXIS_TO_LABEL_DISTANCE - (style->text.font->h_px / 4) - size.y/2; - label_area.x2 = label_area.x1 + size.x; - label_area.y2 = label_area.y1 + size.y/2; - - lv_draw_label(&label_area, mask, style, opa_scale, ext->x_axis.label, LV_TXT_FLAG_CENTER, NULL); - } -} - static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask) { lv_chart_draw_y_ticks(chart, mask); lv_chart_draw_x_ticks(chart, mask); - lv_chart_draw_x_axis_label(chart, mask); } - #endif diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 9297f600ceb1..49c4983bd56e 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -62,8 +62,9 @@ typedef struct { const char* list_of_values; uint8_t num_tick_marks; - const char* label; lv_chart_axis_options_t options; + uint8_t major_tick_len; + uint8_t minor_tick_len; } lv_chart_axis_cfg_t; /*Data of chart */ @@ -80,6 +81,7 @@ typedef struct lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ lv_chart_axis_cfg_t y_axis; lv_chart_axis_cfg_t x_axis; + uint16_t margin; struct { lv_coord_t width; /*Line width or point radius*/ uint8_t num; /*Number of data lines in dl_ll*/ @@ -211,11 +213,10 @@ static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style) } /** - * Set the x-axis label of a chart - * @param chart pointer to a chart object - * @param text pointer to the label text (not copied) + * Set the margin around the chart, used for axes value and labels + * @param margin value of the margin */ -void lv_chart_set_label(lv_obj_t* chart, const char* text); +void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin); /** * Set the x/y-axis ticks of a chart @@ -223,19 +224,22 @@ void lv_chart_set_label(lv_obj_t* chart, const char* text); * @param list_of_values list of string values, terminated with \n, except the last * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis * else step in ticks between two value labels - * @param label label to show for this axis (only X) + * @param major_tick_len the length of the major tick, AUTO if 0 + * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ void lv_chart_set_x_ticks( lv_obj_t* chart, const char* list_of_values, uint8_t num_tick_marks, - const char* label, + uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options); void lv_chart_set_y_ticks( lv_obj_t* chart, const char* list_of_values, uint8_t num_tick_marks, - const char* label, + uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options); /*===================== From 81696b85d06faed52c0b4a12d10bd4963f315de9 Mon Sep 17 00:00:00 2001 From: user-0 Date: Sat, 23 Mar 2019 23:59:12 +0200 Subject: [PATCH 187/590] FIXED: Add support for chart axes ticks and value labels / chart label. --- src/lv_objx/lv_chart.c | 11 +++++++++++ src/lv_objx/lv_chart.h | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index ac9b2fe1d1bc..3a3f283438f7 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -523,6 +523,17 @@ void lv_chart_refresh(lv_obj_t * chart) lv_obj_invalidate(chart); } +/** + * Set the margin around the chart, used for axes value and labels + * @param chart pointer to an chart object + * @param return margin value of the margin + */ +uint16_t lv_chart_get_margin(lv_obj_t* chart) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + return ext->margin; +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 49c4983bd56e..23e20daf28c2 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -214,6 +214,7 @@ static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style) /** * Set the margin around the chart, used for axes value and labels + * @param chart pointer to an chart object * @param margin value of the margin */ void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin); @@ -291,6 +292,13 @@ static inline lv_style_t* lv_chart_get_style(const lv_obj_t *chart) return lv_obj_get_style(chart); } +/** + * Set the margin around the chart, used for axes value and labels + * @param chart pointer to an chart object + * @param return margin value of the margin + */ +uint16_t lv_chart_get_margin(lv_obj_t* chart); + /*===================== * Other functions *====================*/ From 36b47ba98d3e7ee770944279a8c6b601d4f3e7fb Mon Sep 17 00:00:00 2001 From: user-0 Date: Sun, 24 Mar 2019 00:07:16 +0200 Subject: [PATCH 188/590] FIX margin get function documentation --- src/lv_objx/lv_chart.c | 4 ++-- src/lv_objx/lv_chart.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 3a3f283438f7..43b7cf1d6ab2 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -524,9 +524,9 @@ void lv_chart_refresh(lv_obj_t * chart) } /** - * Set the margin around the chart, used for axes value and labels + * Get the margin around the chart, used for axes value and labels * @param chart pointer to an chart object - * @param return margin value of the margin + * @param return value of the margin */ uint16_t lv_chart_get_margin(lv_obj_t* chart) { diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 23e20daf28c2..3448c2c7f79b 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -293,9 +293,9 @@ static inline lv_style_t* lv_chart_get_style(const lv_obj_t *chart) } /** - * Set the margin around the chart, used for axes value and labels + * Get the margin around the chart, used for axes value and labels * @param chart pointer to an chart object - * @param return margin value of the margin + * @param return value of the margin */ uint16_t lv_chart_get_margin(lv_obj_t* chart); From 7cf2b8f1c2d9a3b59343f8240e9bbc2e1c8b722e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 05:56:00 +0100 Subject: [PATCH 189/590] lv_chart fixes --- src/lv_objx/lv_chart.c | 101 ++++++++++++++++++++--------------------- src/lv_objx/lv_chart.h | 4 +- 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 68339db4098f..51759cd6ebde 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -9,6 +9,7 @@ #include "lv_chart.h" #if LV_USE_CHART != 0 +#include "../lv_core/lv_refr.h" #include "../lv_draw/lv_draw.h" #include "../lv_themes/lv_theme.h" @@ -36,9 +37,9 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask); -static void lv_chart_inv_lines(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); -static void lv_chart_inv_points(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); -static void lv_chart_inv_cols(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i); +static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i); +static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i); +static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i); /********************** * STATIC VARIABLES **********************/ @@ -81,6 +82,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) ext->vdiv_cnt = LV_CHART_VDIV_DEF; ext->point_cnt = LV_CHART_PNUM_DEF; ext->type = LV_CHART_TYPE_LINE; + ext->update_mode = LV_CHART_UPDATE_MODE_SHIFT; ext->series.opa = LV_OPA_COVER; ext->series.dark = LV_OPA_50; ext->series.width = 2; @@ -145,7 +147,6 @@ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color) if(ser == NULL) return NULL; ser->color = color; - ser->points = lv_mem_alloc(sizeof(lv_coord_t) * ext->point_cnt); lv_mem_assert(ser->points); if(ser->points == NULL) { @@ -383,20 +384,19 @@ void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - if(ext->update_mode == LV_CHART_MODE_SHIFT) { + if(ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT) { ser->points[ser->start_point] = y; /*This was the place of the former left most value, after shifting it is the rightmost*/ ser->start_point = (ser->start_point + 1) % ext->point_cnt; lv_chart_refresh(chart); - } else if(ext->update_mode == LV_CHART_MODE_CIRCULAR) { - static uint16_t x = 0; - ser->points[x] = y; + } else if(ext->update_mode == LV_CHART_UPDATE_MODE_CIRCULAR) { + ser->points[ser->start_point] = y; - if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser, x); - if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser, x); - if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser, x); - if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser, x); + if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser->start_point); - x = (x + 1) % ext->point_cnt;/*update the x for next incoming y*/ + ser->start_point = (ser->start_point + 1) % ext->point_cnt;/*update the x for next incoming y*/ } } @@ -638,10 +638,12 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) LV_LL_READ_BACK(ext->series_ll, ser) { style.line.color = ser->color; + lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; + p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; - p_prev = ser->start_point; + p_prev = start_point; y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; @@ -652,7 +654,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; - p_act = (ser->start_point + i) % ext->point_cnt; + p_act = (start_point + i) % ext->point_cnt; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); @@ -695,6 +697,8 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) /*Go through all data lines*/ LV_LL_READ_BACK(ext->series_ll, ser) { + lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; + style_point.body.main_color = ser->color; style_point.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); @@ -702,7 +706,7 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; cir_a.x2 = cir_a.x1 + style_point.body.radius; cir_a.x1 -= style_point.body.radius; - p_act = (ser->start_point + i) % ext->point_cnt; + p_act = (start_point + i) % ext->point_cnt; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); cir_a.y1 = h - y_tmp + y_ofs; @@ -753,13 +757,15 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) /*Draw the current point of all data line*/ LV_LL_READ_BACK(ext->series_ll, ser) { + lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; + rects.body.main_color = ser->color; rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); col_a.x1 = x_act; col_a.x2 = col_a.x1 + col_w; x_act += col_w; - lv_coord_t p_act = (ser->start_point + i) % ext->point_cnt; + lv_coord_t p_act = (start_point + i) % ext->point_cnt; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); col_a.y1 = h - y_tmp + chart->coords.y1; @@ -790,6 +796,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas uint16_t i; lv_point_t p1; lv_point_t p2; + lv_coord_t p_act; lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; @@ -803,6 +810,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas /*Go through all data lines*/ LV_LL_READ_BACK(ext->series_ll, ser) { + lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; style.line.color = ser->color; p1.x = 0 + x_ofs; @@ -814,8 +822,9 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas for(i = 0; i < ext->point_cnt; i++) { + p_act = (start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[i] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; @@ -824,11 +833,11 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas p2.x++; } - if(ser->points[i] != LV_CHART_POINT_DEF) { + if(ser->points[p_act] != LV_CHART_POINT_DEF) { lv_draw_line(&p1, &p2, mask, &style, opa_scale); } - p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + p2.x = ((w * p_act) / (ext->point_cnt - 1)) + x_ofs; p1.x = p2.x; p1.y = p2.y; } @@ -860,6 +869,7 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) /*Go through all data lines*/ LV_LL_READ_BACK(ext->series_ll, ser) { + lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; style.body.main_color = ser->color; p1.x = 0 + x_ofs; @@ -874,8 +884,8 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) p1.x = p2.x; p1.y = p2.y; - p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; - p_act = (ser->start_point + i) % ext->point_cnt; + p_act = (start_point + i) % ext->point_cnt; + p2.x = ((w * p_act) / (ext->point_cnt - 1)) + x_ofs; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); @@ -901,31 +911,27 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) * invalid area of the new line data lines on a chart * @param obj pointer to chart object */ -static void lv_chart_inv_lines(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); lv_coord_t w = lv_obj_get_width(chart); lv_coord_t x_ofs = chart->coords.x1; - lv_coord_t p_prev; - lv_coord_t p_act; if(i < ext->point_cnt) { - if(i == 0) { - p_prev = ser->start_point; - } else { - p_prev = (ser->start_point + (i - 1)) % ext->point_cnt; - } - p_act = (ser->start_point + i) % ext->point_cnt; - - if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { - - lv_area_t coords; - lv_obj_get_coords(chart, &coords); - coords.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs - ext->series.width; - coords.x2 = ((w * (i + 1)) / (ext->point_cnt - 1)) + x_ofs + ext->series.width; - lv_inv_area(&coords); - } + lv_area_t coords; + lv_obj_get_coords(chart, &coords); + if(i < ext->point_cnt - 1) { + coords.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs - ext->series.width; + coords.x2 = ((w * (i + 1)) / (ext->point_cnt - 1)) + x_ofs + ext->series.width; + lv_inv_area(lv_obj_get_disp(chart), &coords); + } + + if(i > 0) { + coords.x1 = ((w * (i - 1)) / (ext->point_cnt - 1)) + x_ofs - ext->series.width; + coords.x2 = ((w * i) / (ext->point_cnt - 1)) + x_ofs + ext->series.width; + lv_inv_area(lv_obj_get_disp(chart), &coords); + } } } @@ -934,23 +940,20 @@ static void lv_chart_inv_lines(lv_obj_t * chart, lv_chart_series_t * ser, uint16 * @param chart pointer to chart object * @param mask mask, inherited from the design function */ -static void lv_chart_inv_points(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); lv_area_t cir_a; lv_coord_t w = lv_obj_get_width(chart); lv_coord_t x_ofs = chart->coords.x1; - lv_coord_t p_act; lv_obj_get_coords(chart, &cir_a); cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; cir_a.x2 = cir_a.x1 + ext->series.width; cir_a.x1 -= ext->series.width; - p_act = (ser->start_point + i) % ext->point_cnt; - if(ser->points[p_act] != LV_CHART_POINT_DEF) - lv_inv_area(&cir_a); + lv_inv_area(lv_obj_get_disp(chart), &cir_a); } /** @@ -958,7 +961,7 @@ static void lv_chart_inv_points(lv_obj_t * chart, lv_chart_series_t * ser, uint1 * @param chart pointer to chart object * @param mask mask, inherited from the design function */ -static void lv_chart_inv_cols(lv_obj_t * chart, lv_chart_series_t * ser, uint16_t i) +static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); @@ -976,11 +979,7 @@ static void lv_chart_inv_cols(lv_obj_t * chart, lv_chart_series_t * ser, uint16_ col_a.x1 = x_act; col_a.x2 = col_a.x1 + col_w; - //lv_coord_t p_act = (ser->start_point + i) % ext->point_cnt; - - /*if(ser->points[p_act] != LV_CHART_POINT_DEF)*/ { - lv_inv_area(&col_a); - } + lv_inv_area(lv_obj_get_disp(chart), &col_a); } #endif diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 28de00b01b1f..14ec08af95bf 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -47,8 +47,8 @@ typedef uint8_t lv_chart_type_t; /*Chart update mode*/ enum { - LV_CHART_MODE_SHIFT, - LV_CHART_MODE_CIRCULAR, + LV_CHART_UPDATE_MODE_SHIFT, + LV_CHART_UPDATE_MODE_CIRCULAR, }; typedef uint8_t lv_chart_update_mode_t; From 13e7f162a05cc93632fb9992c8941d93a8fc4cb8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 06:11:09 +0100 Subject: [PATCH 190/590] lv_ddlist: fixes for scrollbar visibility --- src/lv_objx/lv_ddlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 07b494db9005..ed1d7d8f843b 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -841,7 +841,6 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) style->body.padding.top + style->body.padding.bottom; else new_height = ext->fix_height; - lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } else { /*Close the list*/ const lv_font_t * font = style->text.font; lv_style_t * label_style = lv_obj_get_style(ext->label); @@ -854,6 +853,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) if(anim_en == 0) { lv_obj_set_height(ddlist, new_height); lv_ddlist_pos_current_option(ddlist); + if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then it will overwrite this changes*/ } else { @@ -888,6 +888,8 @@ static void lv_ddlist_anim_cb(lv_obj_t * ddlist) { lv_ddlist_pos_current_option(ddlist); ext->force_sel = 0; /*Turn off drawing of selection*/ + + if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } /** From 221e269ccbf2e0d42e4c712bc1271df60f692cd3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 07:16:13 +0100 Subject: [PATCH 191/590] roller and ddlist fixes --- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_roller.c | 25 +++++++++++-------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index ed1d7d8f843b..23c43dc62f1a 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -787,7 +787,6 @@ static lv_res_t release_handler(lv_obj_t * ddlist) if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { lv_point_t p; lv_indev_get_point(indev, &p); - p.x -= ext->label->coords.x1; p.y -= ext->label->coords.y1; uint16_t letter_i; letter_i = lv_label_get_letter_on(ext->label, &p); @@ -803,6 +802,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) } ext->sel_opt_id = new_opt; + printf("rid: %d\n", new_opt); } ext->sel_opt_id_ori = ext->sel_opt_id; diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 1ee06fdf3b4a..57057539c6d1 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -410,7 +410,9 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_fp_t)lv_obj_set_y); lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); + refr_position(roller, false); } else if(sign == LV_SIGNAL_CORD_CHG) { @@ -422,6 +424,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_fp_t)lv_obj_set_y); lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); } @@ -446,7 +449,6 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } } else { ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if ENER wont't be pressed*/ - } #endif } else if(sign == LV_SIGNAL_DEFOCUS) { @@ -461,11 +463,15 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { + uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id + 1, true); + ext->ddlist.sel_opt_id_ori = ori_id; } } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { if(ext->ddlist.sel_opt_id > 0) { + uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true); + ext->ddlist.sel_opt_id_ori = ori_id; } } } else if(sign == LV_SIGNAL_GET_TYPE) { @@ -518,26 +524,18 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, ext->ddlist.sel_opt_id = id; ext->ddlist.sel_opt_id_ori = id; - res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, NULL); + res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return res; - } else if(sign == LV_SIGNAL_RELEASED) { + } + else if(sign == LV_SIGNAL_RELEASED) { /*If picked an option by clicking then set it*/ if(!lv_indev_is_dragging(indev)) { - lv_point_t p; - lv_indev_get_point(indev, &p); - p.y = p.y - ext->ddlist.label->coords.y1; - id = p.y / (font_h + style_label->text.line_space); - if(id < 0) id = 0; - if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; - ext->ddlist.sel_opt_id = id; - ext->ddlist.sel_opt_id_ori = id; + id = ext->ddlist.sel_opt_id; #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ #endif - res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, NULL); - if(res != LV_RES_OK) return res; } } @@ -668,7 +666,6 @@ static void inf_normalize(void * roller_scrl) ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id % real_id_cnt; ext->ddlist.sel_opt_id += (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ - ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Move to the new id*/ lv_obj_t * roller_scrl = lv_page_get_scrl(roller); From a402f8258d64c223bd7ab825ca4f431a1c693cc2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 07:31:56 +0100 Subject: [PATCH 192/590] update lv_conf_checker.h --- scripts/lv_conf_checker.py | 2 +- src/lv_conf_checker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lv_conf_checker.py b/scripts/lv_conf_checker.py index 04fcb9f7299f..a16b363533d0 100644 --- a/scripts/lv_conf_checker.py +++ b/scripts/lv_conf_checker.py @@ -5,7 +5,7 @@ import re -fin = open("../templates/lv_conf_templ.h", "r"); +fin = open("../lv_conf_template.h", "r"); fout = open("../src/lv_conf_checker.h", "w"); diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 8fe96eb7f9a3..e1de81219b10 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -439,6 +439,9 @@ #ifndef LV_USE_CHART #define LV_USE_CHART 1 #endif +#ifndef LV_CHART_AXIS_TICK_LABEL_MAX_LEN +#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 +#endif /*Table (dependencies: lv_label)*/ #ifndef LV_USE_TABLE From d4559a0f39557e58fcc499ce6ea7599478ced682 Mon Sep 17 00:00:00 2001 From: embeddedt Date: Sun, 24 Mar 2019 09:52:24 -0400 Subject: [PATCH 193/590] Move lv_canvas_get_px/lv_canvas_set_px to lv_draw_img.c --- src/lv_draw/lv_draw_img.c | 124 ++++++++++++++++++++++++++++++++++ src/lv_draw/lv_draw_img.h | 19 +++++- src/lv_objx/lv_canvas.c | 137 ++++---------------------------------- 3 files changed, 155 insertions(+), 125 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index b2bbb031559f..2ef5c033b4b2 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -143,8 +143,132 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) } return true; +} + +/** + * Get the color of a pixel on the canvas + * @param canvas + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @return color of the point + */ +lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) +{ + lv_color_t p_color = LV_COLOR_BLACK; + if(x >= dsc->header.w) { + x = dsc->header.w - 1; + LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); + } + else if(x < 0) { + x = 0; + LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); + } + + + if(y >= dsc->header.h) { + y = dsc->header.h - 1; + LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); + } + else if(y < 0) { + y = 0; + LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); + } + + uint8_t * buf_u8 = (uint8_t *) dsc->data; + + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + uint32_t px = dsc->header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); + memcpy(&p_color, &buf_u8[px], sizeof(lv_color_t)); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { + buf_u8 += 4 * 2; + uint8_t bit = x & 0x7; + x = x >> 3; + + uint32_t px = (dsc->header.w >> 3) * y + x; + p_color.full = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { + buf_u8 += 4 * 4; + uint8_t bit = (x & 0x3) * 2; + x = x >> 2; + + uint32_t px = (dsc->header.w >> 2) * y + x; + p_color.full = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { + buf_u8 += 4 * 16; + uint8_t bit = (x & 0x1) * 4; + x = x >> 1; + + uint32_t px = (dsc->header.w >> 1) * y + x; + p_color.full = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + buf_u8 += 4 * 256; + uint32_t px = dsc->header.w * y + x; + p_color.full = buf_u8[px]; + } + return p_color; +} + +/** + * Set the color of a pixel on the canvas + * @param dsc image + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @param c color of the point + */ +void lv_img_buf_set_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c) +{ + uint8_t * buf_u8 = (uint8_t *) dsc->data; + + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + uint32_t px = dsc->header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); + + memcpy(&buf_u8[px], &c, sizeof(lv_color_t)); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { + buf_u8 += 4 * 2; + uint8_t bit = x & 0x7; + x = x >> 3; + + uint32_t px = (dsc->header.w >> 3) * y + x; + buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { + buf_u8 += 4 * 4; + uint8_t bit = (x & 0x3) * 2; + x = x >> 2; + + uint32_t px = (dsc->header.w >> 2) * y + x; + + buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { + buf_u8 += 4 * 16; + uint8_t bit = (x & 0x1) * 4; + x = x >> 1; + + uint32_t px = (dsc->header.w >> 1) * y + x; + + buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + buf_u8 += 4 * 256; + uint32_t px = dsc->header.w * y + x; + buf_u8[px] = c.full; + } } + uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf) { uint8_t px_size = 0; diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 4f8137676245..101c57d895ec 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -153,7 +153,24 @@ uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf); bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf); bool lv_img_color_format_has_alpha(lv_img_cf_t cf); - + +/** + * Set the color of a pixel on an image + * @param dsc image + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @param c color of the point + */ +void lv_img_buf_set_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c); + +/** + * Get the color of a pixel on an image + * @param dsc image + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @return color of the point + */ +lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y); /********************** * MACROS diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index d2870d38dfd3..065badc63363 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -8,7 +8,8 @@ *********************/ #include #include "lv_canvas.h" -#include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_math.h" +#include "../lv_draw/lv_draw_img.h" #if LV_USE_CANVAS != 0 /********************* @@ -23,7 +24,6 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * param); -static void set_px_core(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); /********************** * STATIC VARIABLES @@ -130,8 +130,10 @@ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_ * @param c color of the point */ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) -{ - set_px_core(canvas, x, y, c); +{ + lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); + + lv_img_buf_set_px(&ext->dsc, x, y, c); lv_obj_invalidate(canvas); } @@ -164,65 +166,9 @@ void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * */ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) { - lv_color_t p_color = LV_COLOR_BLACK; lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - if(x >= ext->dsc.header.w) { - x = ext->dsc.header.w - 1; - LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); - } - else if(x < 0) { - x = 0; - LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); - } - - - if(y >= ext->dsc.header.h) { - y = ext->dsc.header.h - 1; - LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); - } - else if(y < 0) { - y = 0; - LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); - } - - uint8_t * buf_u8 = (uint8_t *) ext->dsc.data; - - if(ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR || - ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { - uint32_t px = ext->dsc.header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); - memcpy(&p_color, &buf_u8[px], sizeof(lv_color_t)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_1BIT) { - buf_u8 += 4 * 2; - uint8_t bit = x & 0x7; - x = x >> 3; - - uint32_t px = (ext->dsc.header.w >> 3) * y + x; - p_color.full = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_2BIT) { - buf_u8 += 4 * 4; - uint8_t bit = (x & 0x3) * 2; - x = x >> 2; - - uint32_t px = (ext->dsc.header.w >> 2) * y + x; - p_color.full = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_4BIT) { - buf_u8 += 4 * 16; - uint8_t bit = (x & 0x1) * 4; - x = x >> 1; - - uint32_t px = (ext->dsc.header.w >> 1) * y + x; - p_color.full = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_8BIT) { - buf_u8 += 4 * 256; - uint32_t px = ext->dsc.header.w * y + x; - p_color.full = buf_u8[px]; - } - return p_color; + + return lv_img_buf_get_px(&ext->dsc, x, y); } /** @@ -443,7 +389,7 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang // if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) { /*The result color as the average of the x/y mixed colors*/ - set_px_core(canvas_dest, x + offset_x, y + offset_y, lv_color_mix(x_dest, y_dest, LV_OPA_50)); + lv_img_buf_set_px(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(x_dest, y_dest, LV_OPA_50)); } } } @@ -530,7 +476,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2 * @param color line color of the triangle */ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) -{ +{ lv_canvas_draw_polygon(canvas, points, 3, color); } @@ -541,7 +487,7 @@ void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t * @param color line color of the rectangle */ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) -{ +{ lv_canvas_draw_polygon(canvas, points, 4, color); } @@ -553,7 +499,7 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t colo * @param color line color of the polygon */ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color) -{ +{ uint8_t i; for(i=0; i < (size - 1); i++) { @@ -593,7 +539,7 @@ void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, * @param x x coordinate of the start position (seed) * @param y y coordinate of the start position (seed) * @param boundary_color edge/boundary color of the area - * @param fill_color fill color of the area + * @param fill_color fill color of the area */ void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color) { @@ -671,61 +617,4 @@ static lv_res_t lv_canvas_signal(lv_obj_t * canvas, lv_signal_t sign, void * par return res; } -/** - * Set a pixel of the canvas. Doesn't check for errors and doesn't invalidate the canvas - * @param canvas pointer to canvas object - * @param x x coordinate of the point to set - * @param y x coordinate of the point to set - * @param c color of the point - */ -static void set_px_core(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) -{ - lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - - uint8_t * buf_u8 = (uint8_t *) ext->dsc.data; - - if(ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR || - ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { - uint32_t px = ext->dsc.header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); - - memcpy(&buf_u8[px], &c, sizeof(lv_color_t)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_1BIT) { - buf_u8 += 4 * 2; - uint8_t bit = x & 0x7; - x = x >> 3; - - uint32_t px = (ext->dsc.header.w >> 3) * y + x; - buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_2BIT) { - buf_u8 += 4 * 4; - uint8_t bit = (x & 0x3) * 2; - x = x >> 2; - - uint32_t px = (ext->dsc.header.w >> 2) * y + x; - - buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_4BIT) { - buf_u8 += 4 * 16; - uint8_t bit = (x & 0x1) * 4; - x = x >> 1; - - uint32_t px = (ext->dsc.header.w >> 1) * y + x; - - buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); - } - else if(ext->dsc.header.cf == LV_IMG_CF_INDEXED_8BIT) { - buf_u8 += 4 * 256; - uint32_t px = ext->dsc.header.w * y + x; - buf_u8[px] = c.full; - } -} - - #endif From 770d1e08e1e5a94db4749da1b80b5cfe4e4153ac Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 18:42:11 +0100 Subject: [PATCH 194/590] lv_ddlist: fix wrong selection on click --- src/lv_objx/lv_ddlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 23c43dc62f1a..cad91adf1d9c 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -788,6 +788,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) lv_point_t p; lv_indev_get_point(indev, &p); p.y -= ext->label->coords.y1; + p.x -= ext->label->coords.x1; uint16_t letter_i; letter_i = lv_label_get_letter_on(ext->label, &p); From 8890589dc18d4a53d9e23d4c6f9d5de5a3d1e6f7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 19:34:52 +0100 Subject: [PATCH 195/590] remove debug printf --- src/lv_objx/lv_ddlist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index cad91adf1d9c..e2803f4458ea 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -803,7 +803,6 @@ static lv_res_t release_handler(lv_obj_t * ddlist) } ext->sel_opt_id = new_opt; - printf("rid: %d\n", new_opt); } ext->sel_opt_id_ori = ext->sel_opt_id; From aaad794085eec36edaf8152645c604f61f8a324d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 24 Mar 2019 19:35:10 +0100 Subject: [PATCH 196/590] lv_canvas_rotate: update API --- src/lv_objx/lv_canvas.c | 35 +++++++++++++++++------------------ src/lv_objx/lv_canvas.h | 27 +++++++++++++-------------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 065badc63363..d27e5331ee98 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -284,10 +284,10 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor } /** - * Rotate the content of canvas (source) and copy the result to an other canvas (destination) - * @param canvas_dest destination canvas. - * @param canvas_src source canvas. - * To rotate an image (lv_img_dsc_t) this canvas be constructed by using the image descriptor directly + * Rotate and image and store the result on a canvas. + * @param canvas pointer to a canvas object + * @param img pointer to an image descriptor. + * Can be the image descriptor of an other canvas too (`lv_canvas_get_img()`). * @param angle the angle of rotation (0..360); * @param offset_x offset X to tell where to put the result data on destination canvas * @param offset_y offset X to tell where to put the result data on destination canvas @@ -296,16 +296,15 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor * @param pivot_y pivot Y of rotation. Relative to the source canvas * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) { - lv_canvas_ext_t * ext_src = lv_obj_get_ext_attr(canvas_src); - lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas_dest); + lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas); int32_t sinma = lv_trigo_sin(-angle); int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ - int32_t src_width = ext_src->dsc.header.w; - int32_t src_height = ext_src->dsc.header.h; + int32_t img_width = img->header.w; + int32_t img_height = img->header.h; int32_t dest_width = ext_dst->dsc.header.w; int32_t dest_height = ext_dst->dsc.header.h; @@ -326,11 +325,11 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang int ys_int = ys >> 8; - if(xs_int >= src_width) continue; + if(xs_int >= img_width) continue; else if(xs_int < 0) continue; - if(ys_int >= src_height) continue; + if(ys_int >= img_height) continue; else if(ys_int < 0) continue; /*Get the fractional part of the source pixel*/ @@ -357,7 +356,7 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang } /*Handle under/overflow*/ - if(xn >= src_width) continue; + if(xn >= img_width) continue; else if(xn < 0) continue; int yn; /*y neightboor*/ @@ -376,17 +375,17 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang } /*Handle under/overflow*/ - if(yn >= src_height) continue; + if(yn >= img_height) continue; else if(yn < 0) continue; /*Get the mixture of the original source and the neightboor pixels in both directions*/ - lv_color_t c_dest_int = lv_canvas_get_px(canvas_src, xs_int, ys_int); - lv_color_t c_dest_xn = lv_canvas_get_px(canvas_src, xn, ys_int); - lv_color_t c_dest_yn = lv_canvas_get_px(canvas_src, xs_int, yn); + lv_color_t c_dest_int = lv_img_buf_get_px(img, xs_int, ys_int); + lv_color_t c_dest_xn = lv_img_buf_get_px(img, xn, ys_int); + lv_color_t c_dest_yn = lv_img_buf_get_px(img, xs_int, yn); lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); - // if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) + if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) { /*The result color as the average of the x/y mixed colors*/ lv_img_buf_set_px(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(x_dest, y_dest, LV_OPA_50)); @@ -394,7 +393,7 @@ void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t ang } } - lv_obj_invalidate(canvas_dest); + lv_obj_invalidate(canvas); } diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 19d130660c0e..d01d7cbc8584 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -107,6 +107,13 @@ void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * */ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); +/** + * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. + * @param canvas pointer to a canvas object + * @return pointer to the image descriptor. + */ +lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); + /** * Get style of a canvas. * @param canvas pointer to canvas object @@ -131,27 +138,19 @@ lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); /** - * Multiply a buffer with the canvas + * Rotate and image and store the result on a canvas. * @param canvas pointer to a canvas object - * @param to_copy buffer to copy (multiply). LV_IMG_CF_TRUE_COLOR_ALPHA is not supported - * @param w width of the buffer to copy - * @param h height of the buffer to copy - * @param x left side of the destination position - * @param y top side of the destination position - */ -void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); -/** - * Rotate the content of canvas (source) and copy the result to an other canvas (destination) - * @param canvas_dest destination canvas. - * @param canvas_src source canvas. - * To rotate an image (lv_img_dsc_t) this canvas be constructed by using the image descriptor directly + * @param img pointer to an image descriptor. + * Can be the image descriptor of an other canvas too (`lv_canvas_get_img()`). * @param angle the angle of rotation (0..360); * @param offset_x offset X to tell where to put the result data on destination canvas * @param offset_y offset X to tell where to put the result data on destination canvas * @param pivot_x pivot X of rotation. Relative to the source canvas + * Set to `source width / 2` to rotate around the center * @param pivot_y pivot Y of rotation. Relative to the source canvas + * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas_dest, lv_obj_t * canvas_src, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); /** * Draw circle function of the canvas From 516a69e218a5898f4ef44fa66384891d6a439ae4 Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 25 Mar 2019 14:17:23 +0100 Subject: [PATCH 197/590] refactor multiple keypad event generation as per review --- src/lv_core/lv_indev.c | 173 +++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 86 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index bcd4b70ff4f4..d3222eb798d5 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -402,111 +402,112 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) * It must be done here else `lv_indev_get_key` will return the last key in events and signals*/ i->proc.types.keypad.last_key = data->key; - do { - /*Key press happened*/ - if (data->state == LV_INDEV_STATE_PR && - i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) - { - i->proc.pr_timestamp = lv_tick_get(); + /* Save the previous state so we can detect state changes below and also set the last state now + * so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered + * for the next time*/ + uint32_t prev_state = i->proc.types.keypad.last_state; + i->proc.types.keypad.last_state = data->state; - /*Simulate a press on the object if ENTER was pressed*/ - if (data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ + /*Key press happened*/ + if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_REL) + { + i->proc.pr_timestamp = lv_tick_get(); - /*Send the ENTER as a normal KEY*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); + /*Simulate a press on the object if ENTER was pressed*/ + if(data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_PRESSED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + + /*Send the ENTER as a normal KEY*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); + } + /*Move the focus on NEXT*/ + else if(data->key == LV_GROUP_KEY_NEXT) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_next(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Move the focus on PREV*/ + else if(data->key == LV_GROUP_KEY_PREV) { + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_focus_prev(g); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + else { + lv_group_send_data(g, data->key); + } + } + /*Pressing*/ + else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) + { + /*Long press time has elapsed?*/ + if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + i->proc.long_pr_sent = 1; + if(data->key == LV_GROUP_KEY_ENTER) { + i->proc.longpr_rep_timestamp = lv_tick_get(); + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + } + } + /*Long press repeated time has elapsed?*/ + else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + + i->proc.longpr_rep_timestamp = lv_tick_get(); + + /*Send LONG_PRESS_REP on ENTER*/ + if(data->key == LV_GROUP_KEY_ENTER) { + focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ } - /*Move the focus on NEXT*/ - else if (data->key == LV_GROUP_KEY_NEXT) { + /*Move the focus on NEXT again*/ + else if(data->key == LV_GROUP_KEY_NEXT) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if (i->proc.reset_query) break; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } - /*Move the focus on PREV*/ - else if (data->key == LV_GROUP_KEY_PREV) { + /*Move the focus on PREV again*/ + else if(data->key == LV_GROUP_KEY_PREV) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if (i->proc.reset_query) break; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } - /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { lv_group_send_data(g, data->key); + if(i->proc.reset_query) return; /*The object might be deleted*/ } } - /*Pressing*/ - else if (data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) - { - /*Long press time has elapsed?*/ - if (i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { - i->proc.long_pr_sent = 1; - if (data->key == LV_GROUP_KEY_ENTER) { - i->proc.longpr_rep_timestamp = lv_tick_get(); - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } - } - /*Long press repeated time has elapsed?*/ - else if (i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + } + /*Release happened*/ + else if(data->state == LV_INDEV_STATE_REL && prev_state == LV_INDEV_STATE_PR) + { + /*The user might clear the key when it was released. Always release the pressed key*/ + data->key = prev_key; + if(data->key == LV_GROUP_KEY_ENTER) { - i->proc.longpr_rep_timestamp = lv_tick_get(); + focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ - /*Send LONG_PRESS_REP on ENTER*/ - if (data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } - /*Move the focus on NEXT again*/ - else if (data->key == LV_GROUP_KEY_NEXT) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ - lv_group_focus_next(g); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } - /*Move the focus on PREV again*/ - else if (data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ - lv_group_focus_prev(g); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } - /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ - else { - lv_group_send_data(g, data->key); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } + if(i->proc.long_pr_sent == 0) { + lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); } - } - /*Release happened*/ - else if (data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) - { - /*The user might clear the key when it was released. Always release the pressed key*/ - data->key = prev_key; - if (data->key == LV_GROUP_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - - if (i->proc.long_pr_sent == 0) { - lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - } - - lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ + lv_event_send(focused, LV_EVENT_CLICKED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if (i->proc.reset_query) break; /*The object might be deleted*/ - } - i->proc.pr_timestamp = 0; - i->proc.long_pr_sent = 0; + lv_event_send(focused, LV_EVENT_RELEASED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ } - } while (false); - - i->proc.types.keypad.last_state = data->state; + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; + } #else (void)data; /*Unused*/ (void)i; /*Unused*/ From dccdf1e5a410ee6b44426498eee31079eff29cf0 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Mon, 25 Mar 2019 23:40:08 +0200 Subject: [PATCH 198/590] comment out unimplemented function --- src/lv_objx/lv_canvas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index d01d7cbc8584..180e9f649e92 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -111,8 +111,8 @@ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. * @param canvas pointer to a canvas object * @return pointer to the image descriptor. - */ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); + */ /** * Get style of a canvas. From 5456418d542e445a11729b89da0082f9a85fb136 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Tue, 26 Mar 2019 00:19:38 +0200 Subject: [PATCH 199/590] Changed 'typedef enum' to 'typedef uint8_t' --- src/lv_core/lv_group.h | 5 +++-- src/lv_core/lv_obj.h | 5 +++-- src/lv_objx/lv_cont.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index cfba021826eb..3a0b38da7be9 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -73,10 +73,11 @@ typedef struct _lv_group_t uint8_t wrap :1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end of list.*/ } lv_group_t; -typedef enum _lv_group_refocus_policy_t { +enum _lv_group_refocus_policy_t { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 -} lv_group_refocus_policy_t; +}; +typedef uint8_t lv_group_refocus_policy_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 637087e1b23a..7918e10dc08b 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -72,7 +72,7 @@ enum typedef uint8_t lv_res_t; -typedef enum { +enum { LV_EVENT_PRESSED, /*The object has been pressed*/ LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ @@ -94,7 +94,8 @@ typedef enum { LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ -}lv_event_t; +}; +typedef uint8_t lv_event_t; typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index 0dade26db9bf..0f06e5504bfd 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -48,12 +48,13 @@ enum typedef uint8_t lv_layout_t; -typedef enum { +enum { LV_FIT_NONE, /*Do not change the size automatically*/ LV_FIT_TIGHT, /*Involve the children*/ LV_FIT_FLOOD, /*Align the size to the parent's edge*/ LV_FIT_FILL, /*Align the size to the parent's edge first but if there is an object out of it then involve it*/ -}lv_fit_t; +}; +typedef uint8_t lv_fit_t; typedef struct { From e575d4728be955a0fb9a83f58fc69828afe5b0e8 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Tue, 26 Mar 2019 00:19:38 +0200 Subject: [PATCH 200/590] Changed 'typedef enum' to 'typedef uint8_t' --- src/lv_core/lv_group.h | 5 +++-- src/lv_core/lv_obj.h | 5 +++-- src/lv_objx/lv_cont.h | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index cfba021826eb..7878d368843e 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -73,10 +73,11 @@ typedef struct _lv_group_t uint8_t wrap :1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end of list.*/ } lv_group_t; -typedef enum _lv_group_refocus_policy_t { +enum { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 -} lv_group_refocus_policy_t; +}; +typedef uint8_t lv_group_refocus_policy_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 637087e1b23a..7918e10dc08b 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -72,7 +72,7 @@ enum typedef uint8_t lv_res_t; -typedef enum { +enum { LV_EVENT_PRESSED, /*The object has been pressed*/ LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ @@ -94,7 +94,8 @@ typedef enum { LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ -}lv_event_t; +}; +typedef uint8_t lv_event_t; typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index 0dade26db9bf..0f06e5504bfd 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -48,12 +48,13 @@ enum typedef uint8_t lv_layout_t; -typedef enum { +enum { LV_FIT_NONE, /*Do not change the size automatically*/ LV_FIT_TIGHT, /*Involve the children*/ LV_FIT_FLOOD, /*Align the size to the parent's edge*/ LV_FIT_FILL, /*Align the size to the parent's edge first but if there is an object out of it then involve it*/ -}lv_fit_t; +}; +typedef uint8_t lv_fit_t; typedef struct { From 9347165a5ac2cd6e4f53bbe936badeb3202c3053 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 26 Mar 2019 15:35:45 +0100 Subject: [PATCH 201/590] add lv_canvas_get_img() --- src/lv_objx/lv_canvas.c | 12 ++++++++++++ src/lv_objx/lv_canvas.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index d27e5331ee98..b8015a553614 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -171,6 +171,18 @@ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) return lv_img_buf_get_px(&ext->dsc, x, y); } +/** + * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. + * @param canvas pointer to a canvas object + * @return pointer to the image descriptor. + */ +lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas) +{ + lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); + + return &ext->img; +} + /** * Get style of a canvas. * @param canvas pointer to canvas object diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 180e9f649e92..d01d7cbc8584 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -111,8 +111,8 @@ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. * @param canvas pointer to a canvas object * @return pointer to the image descriptor. -lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); */ +lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); /** * Get style of a canvas. From 0f43ee23deaf4cdfa1925ee4cb80be883fcae114 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Tue, 26 Mar 2019 21:40:08 +0200 Subject: [PATCH 202/590] bugfix in lv_canvas_get_img return value --- src/lv_objx/lv_canvas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index b8015a553614..32256cc74031 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -180,7 +180,7 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - return &ext->img; + return &ext->dsc; } /** From 0464444502fd63ec2b66b0f49462e1853d386cb0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 00:01:09 +0100 Subject: [PATCH 203/590] ddlist: fox wrong option selection on click --- src/lv_objx/lv_ddlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index e2803f4458ea..ed4ee8e7cede 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -799,7 +799,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist) uint32_t letter; for(line_cnt = 0; line_cnt < letter_i; line_cnt++) { letter = lv_txt_encoded_next(txt, &i); - if(letter == '\n') new_opt ++; + /*Count he lines to reach the clicked letter. But ignore the last '\n' because it still belongs to the clicked line*/ + if(letter == '\n' && i != letter_i) new_opt ++; } ext->sel_opt_id = new_opt; From 41754236f867e97c618dca9ac9717a4a81ec3b42 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 00:04:57 +0100 Subject: [PATCH 204/590] lv_draw_buf_set/get_px_color/alpha add support all color formats --- src/lv_draw/lv_draw_basic.c | 15 +- src/lv_draw/lv_draw_img.c | 491 ++++++++++++++++++++++++------------ src/lv_draw/lv_draw_img.h | 82 ++++-- 3 files changed, 413 insertions(+), 175 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 65d5517bc085..59774d8b68fb 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -636,8 +636,8 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa) { /* Pick the foreground if it's fully opaque or the Background is fully transparent*/ - if(fg_opa == LV_OPA_COVER && bg_opa <= LV_OPA_MIN) { - fg_color.alpha = fg_opa; + if(fg_opa == LV_OPA_COVER || bg_opa <= LV_OPA_MIN) { + fg_color.ch.alpha = fg_opa; return fg_color; } /*Transparent foreground: use the Background*/ @@ -653,11 +653,17 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, /*Save the parameters and the result. If they will be asked again don't compute again*/ static lv_opa_t fg_opa_save = 0; static lv_opa_t bg_opa_save = 0; + static lv_color_t fg_color_save = {{0}}; + static lv_color_t bg_color_save = {{0}}; static lv_color_t c = {{0}}; - if(fg_opa != fg_opa_save || bg_opa != bg_opa_save) { + if(fg_opa != fg_opa_save || bg_opa != bg_opa_save || + fg_color.full != fg_color_save.full || bg_color.full != bg_color_save.full) + { fg_opa_save = fg_opa; bg_opa_save = bg_opa; + fg_color.full = fg_color_save.full; + bg_color.full = bg_color_save.full; /*Info: https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ lv_opa_t alpha_res = 255 - ((uint16_t)((uint16_t)(255 - fg_opa) * (255 - bg_opa)) >> 8); if(alpha_res == 0) { @@ -665,11 +671,12 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, } lv_opa_t ratio = (uint16_t)((uint16_t) fg_opa * 255) / alpha_res; c = lv_color_mix(fg_color, bg_color, ratio); - c.alpha = alpha_res; + c.ch.alpha = alpha_res; } return c; } } + #endif /*LV_COLOR_SCREEN_TRANSP*/ diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 2ef5c033b4b2..b41c97a9797a 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -21,7 +21,7 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale); + const void * src, const lv_style_t * style, lv_opa_t opa_scale); static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style); static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); @@ -66,7 +66,7 @@ static lv_img_decoder_close_f_t lv_img_decoder_close_custom; * @param opa_scale scale down all opacities by the factor */ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale) + const void * src, const lv_style_t * style, lv_opa_t opa_scale) { if(src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); @@ -88,11 +88,10 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, /** - * - * @param src - * @param header - * @param style - * @return + * Initialize and `lv_img_dsc_t` variable with the image's info + * @param src variable, filename or symbol + * @param header store the result here + * @return LV_RES_OK: succeeded; LV_RES_INV: failed */ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) { @@ -142,17 +141,18 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) return false; } return true; - } /** - * Get the color of a pixel on the canvas - * @param canvas - * @param x x coordinate of the point to set - * @param y x coordinate of the point to set + * Get the color of an image's pixel + * @param dsc an image descriptor + * @param x x coordinate of the point to get + * @param y x coordinate of the point to get + * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows the color. + * Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not used. * @return color of the point */ -lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_style_t * style) { lv_color_t p_color = LV_COLOR_BLACK; if(x >= dsc->header.w) { @@ -164,7 +164,6 @@ lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); } - if(y >= dsc->header.h) { y = dsc->header.h - 1; LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); @@ -177,10 +176,15 @@ lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) uint8_t * buf_u8 = (uint8_t *) dsc->data; if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { - uint32_t px = dsc->header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; + uint32_t px = dsc->header.w * y * px_size + x * px_size; memcpy(&p_color, &buf_u8[px], sizeof(lv_color_t)); +#if LV_COLOR_SIZE == 32 + p_color.ch.alpha = 0xFF; /*Only the color should be get so use a deafult alpha value*/ +#endif } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { buf_u8 += 4 * 2; @@ -211,38 +215,124 @@ lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) uint32_t px = dsc->header.w * y + x; p_color.full = buf_u8[px]; } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) + { + if(style) p_color = style->image.color; + else p_color = LV_COLOR_BLACK; + } return p_color; } + +/** + * Get the alpha value of an image's pixel + * @param dsc pointer to an image descriptor + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @return alpha value of the point + */ +lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) +{ + if(x >= dsc->header.w) { + x = dsc->header.w - 1; + LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); + } + else if(x < 0) { + x = 0; + LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); + } + + if(y >= dsc->header.h) { + y = dsc->header.h - 1; + LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); + } + else if(y < 0) { + y = 0; + LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); + } + + uint8_t * buf_u8 = (uint8_t *) dsc->data; + + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) + { + uint32_t px = dsc->header.w * y * LV_IMG_PX_SIZE_ALPHA_BYTE + x * LV_IMG_PX_SIZE_ALPHA_BYTE; + return buf_u8[px + LV_IMG_PX_SIZE_ALPHA_BYTE - 1]; + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { + uint8_t bit = x & 0x7; + x = x >> 3; + + uint32_t px = (dsc->header.w >> 3) * y + x; + uint8_t px_opa = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit); + return px_opa ? LV_OPA_TRANSP : LV_OPA_COVER; + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { + const uint8_t opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + + uint8_t bit = (x & 0x3) * 2; + x = x >> 2; + + uint32_t px = (dsc->header.w >> 2) * y + x; + uint8_t px_opa = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit); + return opa_table[px_opa]; + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { + const uint8_t opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, + 136, 153, 170, 187, + 204, 221, 238, 255}; + + uint8_t bit = (x & 0x1) * 4; + x = x >> 1; + + uint32_t px = (dsc->header.w >> 1) * y + x; + uint8_t px_opa = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit); + return opa_table[px_opa]; + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + uint32_t px = dsc->header.w * y + x; + return buf_u8[px]; + } + + return LV_OPA_COVER; +} /** - * Set the color of a pixel on the canvas - * @param dsc image + * Set the color of a pixel of an image. The alpha channel won't be affected. + * @param dsc pointer to an image descriptor * @param x x coordinate of the point to set * @param y x coordinate of the point to set * @param c color of the point */ -void lv_img_buf_set_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c) +void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c) { uint8_t * buf_u8 = (uint8_t *) dsc->data; if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { - uint32_t px = dsc->header.w * y * sizeof(lv_color_t) + x * sizeof(lv_color_t); - - memcpy(&buf_u8[px], &c, sizeof(lv_color_t)); + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; + uint32_t px = dsc->header.w * y * px_size + x * px_size; + memcpy(&buf_u8[px], &c, px_size); + } + else if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; + uint32_t px = dsc->header.w * y * px_size + x * px_size; + memcpy(&buf_u8[px], &c, px_size - 1); /*-1 to not overwrite the alpha value*/ } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { - buf_u8 += 4 * 2; + buf_u8 += sizeof(lv_color32_t) * 2; /*Skip the palette*/ + uint8_t bit = x & 0x7; x = x >> 3; - uint32_t px = (dsc->header.w >> 3) * y + x; buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); } else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { - buf_u8 += 4 * 4; + buf_u8 += sizeof(lv_color32_t) * 4; /*Skip the palette*/ uint8_t bit = (x & 0x3) * 2; x = x >> 2; @@ -252,101 +342,190 @@ void lv_img_buf_set_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); } else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { - buf_u8 += 4 * 16; + buf_u8 += sizeof(lv_color32_t) * 16; /*Skip the palette*/ uint8_t bit = (x & 0x1) * 4; x = x >> 1; uint32_t px = (dsc->header.w >> 1) * y + x; - buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); } else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { - buf_u8 += 4 * 256; + buf_u8 += sizeof(lv_color32_t) * 256; /*Skip the palette*/ uint32_t px = dsc->header.w * y + x; buf_u8[px] = c.full; } } +/** + * Set the alpha value of a pixel of an image. The color won't be affected + * @param dsc pointer to an image descriptor + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @param opa the desired opacity + */ +void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa) +{ + uint8_t * buf_u8 = (uint8_t *) dsc->data; + + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) + { + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; + uint32_t px = dsc->header.w * y * px_size + x * px_size; + buf_u8[px + px_size - 1] = opa; + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { + opa = opa >> 7; /*opa -> [0,1]*/ + uint8_t bit = x & 0x7; + x = x >> 3; + uint32_t px = (dsc->header.w >> 3) * y + x; + buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0x1) << (7 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { + opa = opa >> 6; /*opa -> [0,3]*/ + uint8_t bit = (x & 0x3) * 2; + x = x >> 2; + uint32_t px = (dsc->header.w >> 2) * y + x; + buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0x3) << (6 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { + opa = opa >> 4; /*opa -> [0,15]*/ + uint8_t bit = (x & 0x1) * 4; + x = x >> 1; + + uint32_t px = (dsc->header.w >> 1) * y + x; + buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0xF) << (4 - bit)); + } + else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + uint32_t px = dsc->header.w * y + x; + buf_u8[px] = opa; + } +} + +/** + * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * @param dsc pointer to an image descriptor + * @param color_id the palette color to set: + * - for `LV_IMG_CF_INDEXED1`: 0..1 + * - for `LV_IMG_CF_INDEXED2`: 0..3 + * - for `LV_IMG_CF_INDEXED4`: 0..15 + * - for `LV_IMG_CF_INDEXED8`: 0..255 + * @param color the color to set + */ +void lv_img_buf_set_palette(lv_img_dsc_t *dsc, int color_id, lv_color_t color) +{ + if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && color_id > 1) || + (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && color_id > 3) || + (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && color_id > 15) || + (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT && color_id > 255)) + { + LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'color_id'"); + return; + } + + lv_color32_t c32; + c32.full= lv_color_to32(color); + uint32_t * buf = (uint32_t*) dsc->data; + buf[color_id] = c32.full; +} + +/** + * Get the pixel size of a color format in bits + * @param cf a color format (`LV_IMG_CF_...`) + * @return the pixel size in bits + */ uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf) { uint8_t px_size = 0; switch(cf) { - case LV_IMG_CF_UNKNOWN: - case LV_IMG_CF_RAW: - px_size = 0; - break; - case LV_IMG_CF_TRUE_COLOR: - case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: - px_size = LV_COLOR_SIZE; - break; - case LV_IMG_CF_TRUE_COLOR_ALPHA: - px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3; - break; - case LV_IMG_CF_INDEXED_1BIT: - case LV_IMG_CF_ALPHA_1BIT: - px_size = 1; - break; - case LV_IMG_CF_INDEXED_2BIT: - case LV_IMG_CF_ALPHA_2BIT: - px_size = 2; - break; - case LV_IMG_CF_INDEXED_4BIT: - case LV_IMG_CF_ALPHA_4BIT: - px_size = 4; - break; - case LV_IMG_CF_INDEXED_8BIT: - case LV_IMG_CF_ALPHA_8BIT: - px_size = 8; - break; - default: - px_size = 0; - break; + case LV_IMG_CF_UNKNOWN: + case LV_IMG_CF_RAW: + px_size = 0; + break; + case LV_IMG_CF_TRUE_COLOR: + case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: + px_size = LV_COLOR_SIZE; + break; + case LV_IMG_CF_TRUE_COLOR_ALPHA: + px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3; + break; + case LV_IMG_CF_INDEXED_1BIT: + case LV_IMG_CF_ALPHA_1BIT: + px_size = 1; + break; + case LV_IMG_CF_INDEXED_2BIT: + case LV_IMG_CF_ALPHA_2BIT: + px_size = 2; + break; + case LV_IMG_CF_INDEXED_4BIT: + case LV_IMG_CF_ALPHA_4BIT: + px_size = 4; + break; + case LV_IMG_CF_INDEXED_8BIT: + case LV_IMG_CF_ALPHA_8BIT: + px_size = 8; + break; + default: + px_size = 0; + break; } return px_size; } +/** + * Check if a color format is chroma keyed or not + * @param cf a color format (`LV_IMG_CF_...`) + * @return true: chroma keyed; false: not chroma keyed + */ bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf) { bool is_chroma_keyed = false; switch(cf) { - case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: - case LV_IMG_CF_RAW_CHROMA_KEYED: - case LV_IMG_CF_INDEXED_1BIT: - case LV_IMG_CF_INDEXED_2BIT: - case LV_IMG_CF_INDEXED_4BIT: - case LV_IMG_CF_INDEXED_8BIT: - is_chroma_keyed = true; - break; - default: - is_chroma_keyed = false; - break; + case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: + case LV_IMG_CF_RAW_CHROMA_KEYED: + case LV_IMG_CF_INDEXED_1BIT: + case LV_IMG_CF_INDEXED_2BIT: + case LV_IMG_CF_INDEXED_4BIT: + case LV_IMG_CF_INDEXED_8BIT: + is_chroma_keyed = true; + break; + default: + is_chroma_keyed = false; + break; } return is_chroma_keyed; } +/** + * Check if a color format has alpha channel or not + * @param cf a color format (`LV_IMG_CF_...`) + * @return true: has alpha channel; false: doesn't have alpha channel + */ bool lv_img_color_format_has_alpha(lv_img_cf_t cf) { bool has_alpha = false; switch(cf) { - case LV_IMG_CF_TRUE_COLOR_ALPHA: - case LV_IMG_CF_RAW_ALPHA: - case LV_IMG_CF_ALPHA_1BIT: - case LV_IMG_CF_ALPHA_2BIT: - case LV_IMG_CF_ALPHA_4BIT: - case LV_IMG_CF_ALPHA_8BIT: - has_alpha = true; - break; - default: - has_alpha = false; - break; + case LV_IMG_CF_TRUE_COLOR_ALPHA: + case LV_IMG_CF_RAW_ALPHA: + case LV_IMG_CF_ALPHA_1BIT: + case LV_IMG_CF_ALPHA_2BIT: + case LV_IMG_CF_ALPHA_4BIT: + case LV_IMG_CF_ALPHA_8BIT: + has_alpha = true; + break; + default: + has_alpha = false; + break; } return has_alpha; @@ -391,7 +570,7 @@ lv_img_src_t lv_img_src_get_type(const void * src) * @param close_fp clode function */ void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, - lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp) + lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp) { lv_img_decoder_info_custom = info_fp; lv_img_decoder_open_custom = open_fp; @@ -406,7 +585,7 @@ void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale) + const void * src, const lv_style_t * style, lv_opa_t opa_scale) { lv_area_t mask_com; /*Common area of mask and coords*/ @@ -533,9 +712,9 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * return NULL; } } else if(cf == LV_IMG_CF_INDEXED_1BIT || - cf == LV_IMG_CF_INDEXED_2BIT || - cf == LV_IMG_CF_INDEXED_4BIT || - cf == LV_IMG_CF_INDEXED_8BIT) { + cf == LV_IMG_CF_INDEXED_2BIT || + cf == LV_IMG_CF_INDEXED_4BIT || + cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED #if LV_USE_FILESYSTEM @@ -571,9 +750,9 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * return LV_IMG_DECODER_OPEN_FAIL; #endif } else if(cf == LV_IMG_CF_ALPHA_1BIT || - cf == LV_IMG_CF_ALPHA_2BIT || - cf == LV_IMG_CF_ALPHA_4BIT || - cf == LV_IMG_CF_ALPHA_8BIT) { + cf == LV_IMG_CF_ALPHA_2BIT || + cf == LV_IMG_CF_ALPHA_4BIT || + cf == LV_IMG_CF_ALPHA_8BIT) { #if LV_IMG_CF_ALPHA return NULL; /*Nothing to process*/ #else @@ -582,7 +761,7 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * #endif } else { LV_LOG_WARN("Image decoder open: unknown color format") - return LV_IMG_DECODER_OPEN_FAIL; + return LV_IMG_DECODER_OPEN_FAIL; } } @@ -625,15 +804,15 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t return false; } } else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { + decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { lv_img_built_in_decoder_line_alpha(x, y, len, buf); } else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { + decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { lv_img_built_in_decoder_line_indexed(x, y, len, buf); } else { LV_LOG_WARN("Built-in image decoder read not supports the color format"); @@ -652,9 +831,9 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { lv_img_built_in_decoder_line_alpha(x, y, len, buf); } else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { lv_img_built_in_decoder_line_indexed(x, y, len, buf); } else { LV_LOG_WARN("Built-in image decoder not supports the color format"); @@ -692,10 +871,10 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l const lv_opa_t alpha1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255 - }; + 68, 85, 102, 119, + 136, 153, 170, 187, + 204, 221, 238, 255 + }; /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ lv_color_t bg_color = decoder_style->image.color; @@ -722,32 +901,32 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l uint32_t ofs = 0; int8_t pos = 0; switch(decoder_header.cf) { - case LV_IMG_CF_ALPHA_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - pos = 7 - (x & 0x7); - opa_table = alpha1_opa_table; - break; - case LV_IMG_CF_ALPHA_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - pos = 6 - ((x & 0x3) * 2); - opa_table = alpha2_opa_table; - break; - case LV_IMG_CF_ALPHA_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - pos = 4 - ((x & 0x1) * 4); - opa_table = alpha4_opa_table; - break; - case LV_IMG_CF_ALPHA_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - pos = 0; - break; + case LV_IMG_CF_ALPHA_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + pos = 7 - (x & 0x7); + opa_table = alpha1_opa_table; + break; + case LV_IMG_CF_ALPHA_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + pos = 6 - ((x & 0x3) * 2); + opa_table = alpha2_opa_table; + break; + case LV_IMG_CF_ALPHA_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + pos = 4 - ((x & 0x1) * 4); + opa_table = alpha4_opa_table; + break; + case LV_IMG_CF_ALPHA_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM @@ -780,7 +959,7 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; pos -= px_size; if(pos < 0) { @@ -808,33 +987,33 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, int8_t pos = 0; uint32_t ofs = 0; switch(decoder_header.cf) { - case LV_IMG_CF_INDEXED_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - ofs += 8; /*Skip the palette*/ - pos = 7 - (x & 0x7); - break; - case LV_IMG_CF_INDEXED_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - ofs += 16; /*Skip the palette*/ - pos = 6 - ((x & 0x3) * 2); - break; - case LV_IMG_CF_INDEXED_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - ofs += 64; /*Skip the palette*/ - pos = 4 - ((x & 0x1) * 4); - break; - case LV_IMG_CF_INDEXED_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - ofs += 1024; /*Skip the palette*/ - pos = 0; - break; + case LV_IMG_CF_INDEXED_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + ofs += 8; /*Skip the palette*/ + pos = 7 - (x & 0x7); + break; + case LV_IMG_CF_INDEXED_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + ofs += 16; /*Skip the palette*/ + pos = 6 - ((x & 0x3) * 2); + break; + case LV_IMG_CF_INDEXED_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + ofs += 64; /*Skip the palette*/ + pos = 4 - ((x & 0x1) * 4); + break; + case LV_IMG_CF_INDEXED_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + ofs += 1024; /*Skip the palette*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 101c57d895ec..cc6999a55305 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -126,6 +126,14 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style, lv_opa_t opa_scale); +/** + * Initialize and `lv_img_dsc_t` variable with the image's info + * @param src variable, filename or symbol + * @param header store the result here + * @return LV_RES_OK: succeeded; LV_RES_INV: failed + */ +lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header); + /** * Get the type of an image source * @param src pointer to an image source: @@ -146,31 +154,75 @@ lv_img_src_t lv_img_src_get_type(const void * src); void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp); -lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header); - -uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf); - -bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf); +/** + * Get the color of an image's pixel + * @param dsc an image descriptor + * @param x x coordinate of the point to get + * @param y x coordinate of the point to get + * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows the color. + * Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not used. + * @return color of the point + */ +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_style_t * style); +/** + * Get the alpha value of an image's pixel + * @param dsc pointer to an image descriptor + * @param x x coordinate of the point to set + * @param y x coordinate of the point to set + * @return alpha value of the point + */ +lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y); -bool lv_img_color_format_has_alpha(lv_img_cf_t cf); - /** - * Set the color of a pixel on an image - * @param dsc image + * Set the color of a pixel of an image. The alpha channel won't be affected. + * @param dsc pointer to an image descriptor * @param x x coordinate of the point to set * @param y x coordinate of the point to set * @param c color of the point */ -void lv_img_buf_set_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c); - +void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c); + /** - * Get the color of a pixel on an image - * @param dsc image + * Set the alpha value of a pixel of an image. The color won't be affected + * @param dsc pointer to an image descriptor * @param x x coordinate of the point to set * @param y x coordinate of the point to set - * @return color of the point + * @param opa the desired opacity + */ +void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa); + +/** + * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * @param dsc pointer to an image descriptor + * @param color_id the palette color to set: + * - for `LV_IMG_CF_INDEXED1`: 0..1 + * - for `LV_IMG_CF_INDEXED2`: 0..3 + * - for `LV_IMG_CF_INDEXED4`: 0..15 + * - for `LV_IMG_CF_INDEXED8`: 0..255 + * @param color the color to set */ -lv_color_t lv_img_buf_get_px(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y); +void lv_img_buf_set_palette(lv_img_dsc_t *dsc, int color_id, lv_color_t color); + +/** + * Get the pixel size of a color format in bits + * @param cf a color format (`LV_IMG_CF_...`) + * @return the pixel size in bits + */ +uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf); + +/** + * Check if a color format is chroma keyed or not + * @param cf a color format (`LV_IMG_CF_...`) + * @return true: chroma keyed; false: not chroma keyed + */ +bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf); + +/** + * Check if a color format has alpha channel or not + * @param cf a color format (`LV_IMG_CF_...`) + * @return true: has alpha channel; false: doesn't have alpha channel + */ +bool lv_img_color_format_has_alpha(lv_img_cf_t cf); /********************** * MACROS From 5be450a3aaef08b0cb579764d3c8a90eeb70ed61 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 00:05:15 +0100 Subject: [PATCH 205/590] lv_canvas: handle alpha in rotate --- src/lv_objx/lv_canvas.c | 74 +++++++++++++++++++++++++++++++++++------ src/lv_objx/lv_canvas.h | 15 +++++++++ 2 files changed, 78 insertions(+), 11 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index b8015a553614..0d713a91f3e8 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -80,8 +80,6 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy) } /*Copy an existing canvas*/ else { - //lv_canvas_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_canvas); } @@ -133,7 +131,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - lv_img_buf_set_px(&ext->dsc, x, y, c); + lv_img_buf_set_px_color(&ext->dsc, x, y, c); lv_obj_invalidate(canvas); } @@ -167,8 +165,9 @@ void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); + lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); - return lv_img_buf_get_px(&ext->dsc, x, y); + return lv_img_buf_get_px_color(&ext->dsc, x, y, style); } /** @@ -180,7 +179,7 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - return &ext->img; + return &ext->dsc; } /** @@ -311,7 +310,7 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) { lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas); - + lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); int32_t sinma = lv_trigo_sin(-angle); int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ @@ -391,16 +390,69 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co else if(yn < 0) continue; /*Get the mixture of the original source and the neightboor pixels in both directions*/ - lv_color_t c_dest_int = lv_img_buf_get_px(img, xs_int, ys_int); - lv_color_t c_dest_xn = lv_img_buf_get_px(img, xn, ys_int); - lv_color_t c_dest_yn = lv_img_buf_get_px(img, xs_int, yn); + lv_color_t c_dest_int = lv_img_buf_get_px_color(img, xs_int, ys_int, style); + + if(lv_img_color_format_is_chroma_keyed(img->header.cf)) { + lv_color_t ct = LV_COLOR_TRANSP; + if(c_dest_int.full == ct.full) continue; + } + + lv_color_t c_dest_xn = lv_img_buf_get_px_color(img, xn, ys_int, style); + lv_color_t c_dest_yn = lv_img_buf_get_px_color(img, xs_int, yn, style); lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); + lv_color_t color_res = lv_color_mix(x_dest, y_dest, LV_OPA_50); if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) { - /*The result color as the average of the x/y mixed colors*/ - lv_img_buf_set_px(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(x_dest, y_dest, LV_OPA_50)); + /*If the image has no alpha channel just simple set the result color on the canvas*/ + if(lv_img_color_format_has_alpha(img->header.cf) == false) { + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); + } else { + /*Get result pixel opacity*/ + lv_opa_t opa_int = lv_img_buf_get_px_alpha(img, xs_int, ys_int); + lv_opa_t opa_xn = lv_img_buf_get_px_alpha(img, xn, ys_int); + lv_opa_t opa_yn = lv_img_buf_get_px_alpha(img, xs_int, yn); + lv_opa_t opa_x = (opa_int * xr + (opa_xn * (255 - xr))) >> 8; + lv_opa_t opa_y = (opa_int * yr + (opa_yn * (255 - yr))) >> 8; + lv_opa_t opa_res = (opa_x + opa_y) / 2; + if(opa_res <= LV_OPA_MIN) continue; + + lv_color_t bg_color = lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style); + + /*If the canvas has no alpha but the image has mix the image's color with canvas*/ + if(lv_img_color_format_has_alpha(ext_dst->dsc.header.cf) == false) { + if(opa_res < LV_OPA_MAX) color_res = lv_color_mix(color_res, bg_color, opa_res); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); + } + /*Both the image and canvas has alpha channel. Some extra calculation is required*/ + else { + lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y); + /* Pick the foreground if it's fully opaque or the Background is fully transparent*/ + if(opa_res >= LV_OPA_MAX || bg_opa <= LV_OPA_MIN) { + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res); + } + /*Opaque background: use simple mix*/ + else if(bg_opa >= LV_OPA_MAX) { + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(color_res, bg_color, opa_res)); + } + /*Both colors have alpha. Expensive calculation need to be applied*/ + else { + + /*Info: https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ + lv_opa_t opa_res_2 = 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8); + if(opa_res_2 == 0) { + opa_res_2 = 1; /*never happens, just to be sure*/ + } + lv_opa_t ratio = (uint16_t)((uint16_t) opa_res * 255) / opa_res_2; + + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(color_res, bg_color, ratio)); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res_2); + } + + } + } } } } diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index d01d7cbc8584..4864b1150c24 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -230,6 +230,21 @@ void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_colo /********************** * MACROS **********************/ +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w,h) ((LV_COLOR_SIZE / 8) * w * h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w,h) ((LV_COLOR_SIZE / 8) * w * h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w,h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) + +#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w,h) ((((w / 8) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w,h) + 4 * 2) /*4 * 2: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w,h) ((((w / 4) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w,h) + 4 * 4) /*4 * 4: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w,h) ((((w / 2) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w,h) + 4 * 16) /*4 * 16: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w,h) ((w * h)) +#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w,h) + 4 * 256) /*4 * 256: palette*/ #endif /*LV_USE_CANVAS*/ From 881d6c060f78d9b77afd8f64faa1730a5b36ac2c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 00:48:35 +0100 Subject: [PATCH 206/590] lv_kb: add lv_kb_def_event_cb (makes possible overwrite the default behavior) --- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_kb.c | 122 +++++++++++++++++++++--------------------- src/lv_objx/lv_kb.h | 12 +++++ 3 files changed, 74 insertions(+), 62 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 1594cf78185e..c5c5485b1818 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -742,7 +742,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) btn_pr = get_button_from_point(btnm, &p); /*Invalidate to old and the new areas*/; if(btn_pr != ext->btn_id_pr) { - lv_indev_reset_long_press(param); + lv_indev_reset_long_press(param); /*Start the log press time again on the new button*/ if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { invalidate_button_area(btnm, ext->btn_id_pr); } diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 1fa4877eb4be..74234a1ea75a 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -25,7 +25,6 @@ * STATIC PROTOTYPES **********************/ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param); -static void lv_kb_def_btn_action_cb(lv_obj_t * kb); /********************** * STATIC VARIABLES @@ -130,6 +129,7 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); + lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb); lv_btnm_set_map(new_kb, kb_map_lc); lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map); @@ -345,75 +345,25 @@ lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) return style; } -/********************** - * STATIC FUNCTIONS - **********************/ - -/** - * Signal function of the keyboard - * @param kb pointer to a keyboard object - * @param sign a signal type from lv_signal_t enum - * @param param pointer to a signal specific variable - * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted - */ -static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) -{ - lv_res_t res; - - /* Include the ancient signal function */ - res = ancestor_signal(kb, sign, param); - if(res != LV_RES_OK) return res; - - if(sign == LV_SIGNAL_CLEANUP) { - /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } - else if(sign == LV_SIGNAL_PRESSED) { - lv_kb_def_btn_action_cb(kb); - } - else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - bool no_rep = lv_btnm_get_btn_ctrl(kb, lv_btnm_get_active_btn(kb), LV_BTNM_CTRL_NO_REPEAT); - if(no_rep == false) lv_kb_def_btn_action_cb(kb); - } - else if(sign == LV_SIGNAL_FOCUS) { - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - /*Show the cursor of the new Text area if cursor management is enabled*/ - if(ext->ta && ext->cursor_mng) { - lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); - } - } - else if(sign == LV_SIGNAL_DEFOCUS) { - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - /*Show the cursor of the new Text area if cursor management is enabled*/ - if(ext->ta && ext->cursor_mng) { - lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); - } - } - else if(sign == LV_SIGNAL_GET_TYPE) { - lv_obj_type_t * buf = param; - uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ - if(buf->type[i] == NULL) break; - } - buf->type[i] = "lv_kb"; - } - - return res; -} - +/*===================== + * Other functions + *====================*/ /** - * Called when a button of the keyboard is pressed or long pressed to change map or add the button's test to the assigned Text area. + * Default keyboard event to add characters to the Text area and change the map. + * If a custom `event_cb` is added to the keyboard this function be called from it to handle the button clicks * @param kb pointer to a keyboard + * @param event the triggering event */ -static void lv_kb_def_btn_action_cb(lv_obj_t * kb) +void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) { - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + if(event != LV_EVENT_PRESSED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); uint16_t btn_id = lv_btnm_get_active_btn(kb); if(btn_id == LV_BTNM_BTN_NONE) return; if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return; + if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && event == LV_EVENT_LONG_PRESSED_REPEAT) return; const char * txt = lv_btnm_get_active_btn_text(kb); if(txt == NULL) return; @@ -476,4 +426,54 @@ static void lv_kb_def_btn_action_cb(lv_obj_t * kb) } } +/********************** + * STATIC FUNCTIONS + **********************/ + +/** + * Signal function of the keyboard + * @param kb pointer to a keyboard object + * @param sign a signal type from lv_signal_t enum + * @param param pointer to a signal specific variable + * @return LV_RES_OK: the object is not deleted in the function; LV_RES_INV: the object is deleted + */ +static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) +{ + lv_res_t res; + + /* Include the ancient signal function */ + res = ancestor_signal(kb, sign, param); + if(res != LV_RES_OK) return res; + + if(sign == LV_SIGNAL_CLEANUP) { + /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ + } + else if(sign == LV_SIGNAL_FOCUS) { + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + /*Show the cursor of the new Text area if cursor management is enabled*/ + if(ext->ta && ext->cursor_mng) { + lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); + lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); + } + } + else if(sign == LV_SIGNAL_DEFOCUS) { + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + /*Show the cursor of the new Text area if cursor management is enabled*/ + if(ext->ta && ext->cursor_mng) { + lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); + lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); + } + } + else if(sign == LV_SIGNAL_GET_TYPE) { + lv_obj_type_t * buf = param; + uint8_t i; + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + if(buf->type[i] == NULL) break; + } + buf->type[i] = "lv_kb"; + } + + return res; +} + #endif diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 4c9c4ec72396..63e49714986e 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -156,6 +156,18 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); */ lv_style_t * lv_kb_get_style(const lv_obj_t *kb, lv_kb_style_t type); +/*===================== + * Other functions + *====================*/ + +/** + * Default keyboard event to add characters to the Text area and change the map. + * If a custom `event_cb` is added to the keyboard this function be called from it to handle the button clicks + * @param kb pointer to a keyboard + * @param event the triggering event + */ +void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event); + /********************** * MACROS **********************/ From ed9a1f3df59209b49a56a7475773d9a732083272 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 08:36:55 +0100 Subject: [PATCH 207/590] improve circle anti-alaisins --- src/lv_draw/lv_draw_rect.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 917415ebad71..ecd29b32def3 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -13,7 +13,7 @@ /********************* * DEFINES *********************/ -#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD 5 /*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity mapping*/ +#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD 1 /*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity mapping*/ #define SHADOW_OPA_EXTRA_PRECISION 8 /*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/ #define SHADOW_BOTTOM_AA_EXTRA_RADIUS 3 /*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/ @@ -1419,16 +1419,30 @@ static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h) */ static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_t opa) { - static const lv_opa_t opa_map[8] = {250, 242, 221, 196, 163, 122, 74, 18}; + /*Empirical non-linear values anti-aliasing values*/ + static const lv_opa_t opa_map2[2] = {210, 80}; + static const lv_opa_t opa_map3[3] = {230, 150, 60}; + static const lv_opa_t opa_map4[4] = {235, 185, 125, 50}; + static const lv_opa_t opa_map8[8] = {250, 242, 219, 191, 158, 117, 76, 40}; + +#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 1 + if(seg == 1) return 170; +#endif - if(seg == 0) return LV_OPA_TRANSP; - else if(seg == 1) return LV_OPA_80; - else { +#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 2 + if(seg == 2) return (opa_map2[px_id] * opa) >> 8; +#endif - uint8_t id = (uint32_t)((uint32_t)px_id * (sizeof(opa_map) - 1)) / (seg - 1); - return (uint32_t)((uint32_t) opa_map[id] * opa) >> 8; +#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 3 + if(seg == 3) return (opa_map3[px_id] * opa) >> 8; +#endif - } +#if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 4 + if(seg == 4) return (opa_map4[px_id] * opa) >> 8; +#endif + + uint8_t id = (uint32_t)((uint32_t)px_id * (sizeof(opa_map8) - 1)) / (seg - 1); + return (uint32_t)((uint32_t) opa_map8[id] * opa) >> 8; } From cd47fd72f634d16fc06144f938c76cd310234532 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 27 Mar 2019 08:37:08 +0100 Subject: [PATCH 208/590] minor zen theme fix --- src/lv_themes/lv_theme_zen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c index 94721e161830..1997e8977621 100644 --- a/src/lv_themes/lv_theme_zen.c +++ b/src/lv_themes/lv_theme_zen.c @@ -761,6 +761,9 @@ static void win_init(void) header.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90); header.text.color = lv_color_hex3(0x666); header.image.color = lv_color_hex3(0x666); + header.body.padding.top = 0; + header.body.padding.bottom = 0; + header.body.padding.inner = 0; lv_style_copy(&rel, &def); rel.body.opa = LV_OPA_TRANSP; From b8fece6e0a275e2da11dbb7dcb17bf8500e19f80 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 15:52:13 -0400 Subject: [PATCH 209/590] Add back prototype for lv_canvas_mult_buf It appears to have been accidentally removed in aaad794085eec36edaf8152645c604f61f8a324d. --- src/lv_objx/lv_canvas.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 4864b1150c24..fd37c22d9c19 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -137,6 +137,17 @@ lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type */ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); +/** + * Multiply a buffer with the canvas + * @param canvas pointer to a canvas object + * @param to_copy buffer to copy (multiply). LV_IMG_CF_TRUE_COLOR_ALPHA is not supported + * @param w width of the buffer to copy + * @param h height of the buffer to copy + * @param x left side of the destination position + * @param y top side of the destination position + */ +void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); + /** * Rotate and image and store the result on a canvas. * @param canvas pointer to a canvas object From 82a095b94a6f83b916e27b0d9b16abfc109d69c9 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 16:39:37 -0400 Subject: [PATCH 210/590] Add ability to select text on the text area --- src/lv_core/lv_style.c | 1 + src/lv_core/lv_style.h | 1 + src/lv_draw/lv_draw_img.c | 4 +-- src/lv_draw/lv_draw_label.c | 24 ++++++++++++++-- src/lv_draw/lv_draw_label.h | 5 ++-- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_calendar.c | 10 +++---- src/lv_objx/lv_chart.c | 4 +-- src/lv_objx/lv_ddlist.c | 4 +-- src/lv_objx/lv_gauge.c | 2 +- src/lv_objx/lv_img.c | 2 +- src/lv_objx/lv_label.c | 5 +++- src/lv_objx/lv_label.h | 2 ++ src/lv_objx/lv_roller.c | 2 +- src/lv_objx/lv_ta.c | 56 ++++++++++++++++++++++++++++++++----- src/lv_objx/lv_ta.h | 3 ++ src/lv_objx/lv_table.c | 2 +- 17 files changed, 100 insertions(+), 29 deletions(-) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 57c251d39c33..578403a909b1 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -95,6 +95,7 @@ void lv_style_init(void) lv_style_scr.text.opa = LV_OPA_COVER; lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30); + lv_style_scr.text.sel_color = lv_color_make(0x55, 0x96, 0xd8); lv_style_scr.text.font = LV_FONT_DEFAULT; lv_style_scr.text.letter_space = 2; lv_style_scr.text.line_space = 2; diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 3cde6854dead..c27db5abc8a0 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -84,6 +84,7 @@ typedef struct struct { lv_color_t color; + lv_color_t sel_color; const lv_font_t * font; lv_coord_t letter_space; lv_coord_t line_space; diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index b41c97a9797a..20bb667fa9f0 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -71,7 +71,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, if(src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); return; } @@ -81,7 +81,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, if(res == LV_RES_INV) { LV_LOG_WARN("Image draw error"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); return; } } diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index a1febd9d9884..588962050fdb 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -51,10 +51,11 @@ static uint8_t hex_char_to_num(char hex); * @param txt 0 terminated text to write * @param flag settings for the text from 'txt_flag_t' enum * @param offset text offset in x and y direction (NULL if unused) - * + * @param sel_start start index of selected area (-1 if none) + * @param sel_end end index of selected area (-1 if none) */ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset) + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, int sel_start, int sel_end) { const lv_font_t * font = style->text.font; lv_coord_t w; @@ -121,6 +122,9 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st uint16_t par_start = 0; lv_color_t recolor; lv_coord_t letter_w; + lv_style_t sel_style; + lv_style_copy(&sel_style, &lv_style_plain_color); + sel_style.body.main_color = sel_style.body.grad_color = style->text.sel_color; /*Write out all lines*/ while(txt[line_start] != '\0') { @@ -175,9 +179,23 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st if(cmd_state == CMD_STATE_IN) color = recolor; - lv_draw_letter(&pos, mask, font, letter, color, opa); letter_w = lv_font_get_width(font, letter); + if(sel_start != -1 && sel_end != -1) { + int char_ind = lv_encoded_get_char_id(txt, i); + /*Do not draw the rectangle on the character at `sel_start`.*/ + if(char_ind > sel_start && char_ind <= sel_end) { + lv_area_t sel_coords; + sel_coords.x1 = pos.x; + sel_coords.y1 = pos.y; + sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1; + sel_coords.y2 = pos.y + lv_font_get_height(font) - 1; + lv_draw_rect(&sel_coords, mask, &sel_style, opa); + } + } + lv_draw_letter(&pos, mask, font, letter, color, opa); + + if(letter_w > 0){ pos.x += letter_w + style->text.letter_space; } diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index 8798573d34e3..96b3a88d297b 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -36,10 +36,11 @@ extern "C" { * @param txt 0 terminated text to write * @param flag settings for the text from 'txt_flag_t' enum * @param offset text offset in x and y direction (NULL if unused) - * + * @param sel_start start index of selected area (-1 if none) + * @param sel_end end index of selected area (-1 if none) */ void lv_draw_label(const lv_area_t * coords,const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset); + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, int sel_start, int sel_end); /********************** * MACROS diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index c5c5485b1818..f0dd14c32505 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -683,7 +683,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo area_tmp.x2 = area_tmp.x1 + txt_size.x; area_tmp.y2 = area_tmp.y1 + txt_size.y; - lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL); + lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, -1, -1); } } return true; diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index a92e2dfc3135..cc8087de5010 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -686,19 +686,19 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); header_area.y1 += ext->style_header->body.padding.top; - lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL); + lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); /*Add the left arrow*/ lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.left; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; header_area.x1 = header_area.x2 - ext->style_header->body.padding.right - lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, -1, -1); } @@ -722,7 +722,7 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) for(i = 0; i < 7; i++) { label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; label_area.x2 = label_area.x1 + box_w; - lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, NULL); + lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, NULL, -1, -1); } } @@ -852,7 +852,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*Write the day's number*/ lv_utils_num_to_str(day_cnt, buf); - lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); + lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); /*Go to the next day*/ day_cnt ++; diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 92f545d533d1..5dcd3be20a15 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -1069,7 +1069,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) /* set the area at some distance of the major tick len left of the tick */ lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE) , (p2.y - size.y/2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y + size.y/2) }; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); } } } @@ -1183,7 +1183,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) /* set the area at some distance of the major tick len under of the tick */ lv_area_t a = { (p2.x - size.x/2) , (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x/2), (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE) }; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL); + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); } } } diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index ed4ee8e7cede..e98d73426cf1 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -574,7 +574,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.opa = sel_style->text.opa; lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist); lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, - lv_label_get_text(ext->label), flag, NULL); + lv_label_get_text(ext->label), flag, NULL, -1, -1); } } @@ -606,7 +606,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig if (area_ok) { lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, - LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ + LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL, -1, -1); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ } } } diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 385d9f9bc8c0..3b443198ec14 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -385,7 +385,7 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) label_cord.x2 = label_cord.x1 + label_size.x; label_cord.y2 = label_cord.y1 + label_size.y; - lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, -1); } } /** diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 02ad804b3317..214ac89cce4f 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -388,7 +388,7 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode lv_style_t style_mod; lv_style_copy(&style_mod, style); style_mod.text.color = style->image.color; - lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL); + lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, -1, -1); } else { /*Trigger the error handler of image drawer*/ LV_LOG_WARN("lv_img_design: image source type is unknown"); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 682cdc5fd64b..3723dc9a8a00 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -90,6 +90,9 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_speed = LV_LABEL_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; + ext->selection_start = -1; + ext->selection_end = -1; + lv_obj_set_design_cb(new_label, lv_label_design); lv_obj_set_signal_cb(new_label, lv_label_signal); @@ -675,7 +678,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } } - lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset); + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, ext->selection_start, ext->selection_end); } return true; } diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index b72bc8ecf8ee..65e33b0ee1d6 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -77,6 +77,8 @@ typedef struct uint8_t recolor :1; /*Enable in-line letter re-coloring*/ uint8_t expand :1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ uint8_t body_draw :1; /*Draw background body*/ + int selection_start; /*Left-most selection character*/ + int selection_end; /*Right-most selection character*/ } lv_label_ext_t; /********************** diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 57057539c6d1..61e9557ffdf8 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -373,7 +373,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig new_style.text.color = sel_style->text.color; new_style.text.opa = sel_style->text.opa; lv_draw_label(&ext->ddlist.label->coords, &mask_sel, &new_style, opa_scale, - lv_label_get_text(ext->ddlist.label), txt_align, NULL); + lv_label_get_text(ext->ddlist.label), txt_align, NULL, -1, -1); } } diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 237a15a733c6..5c6fcfdfb131 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -7,6 +7,7 @@ /********************* * INCLUDES *********************/ +#include #include "lv_ta.h" #if LV_USE_TA != 0 #include @@ -54,7 +55,7 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); static void placeholder_update(lv_obj_t * ta); -static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source); +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source); /********************** * STATIC VARIABLES @@ -1111,7 +1112,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ #endif cur_area.x1 += cur_style.body.padding.left; cur_area.y1 += cur_style.body.padding.top; - lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0); + lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0, -1, -1); } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { cur_style.body.opa = LV_OPA_TRANSP; @@ -1242,8 +1243,9 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } #endif } - else if(sign == LV_SIGNAL_PRESSED) { - update_cursor_position_on_click(ta, (lv_indev_t *) param); + else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING + || sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + update_cursor_position_on_click(ta, sign, (lv_indev_t *) param); } return res; } @@ -1287,8 +1289,9 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void } } } - else if(sign == LV_SIGNAL_PRESSED) { - update_cursor_position_on_click(ta, (lv_indev_t *)param); + else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST || + sign == LV_SIGNAL_RELEASED) { + update_cursor_position_on_click(ta, sign, (lv_indev_t *)param); } return res; @@ -1546,7 +1549,7 @@ static void placeholder_update(lv_obj_t * ta) } } -static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_source) +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source) { if(click_source == NULL) return; @@ -1558,6 +1561,7 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_so lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); lv_area_t label_coords; uint16_t index_of_char_at_position; @@ -1585,6 +1589,44 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_indev_t * click_so index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); } + if(!ext->selecting && sign == LV_SIGNAL_PRESSED) { + /*Input device just went down. Store the selection start position*/ + ext->tmp_sel_start = index_of_char_at_position; + ext->tmp_sel_end = -1; + ext->selecting = 1; + } else if(ext->selecting && sign == LV_SIGNAL_PRESSING) { + /*Input device may be moving. Store the end position */ + ext->tmp_sel_end = index_of_char_at_position; + } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + /*Input device is released. Check if anything was selected.*/ + ext->selecting = 0; + } + + /*If the selected area has changed then update the real values and*/ + /*invalidate the text area.*/ + if(ext->tmp_sel_start > ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_end || + ext_label->selection_end != ext->tmp_sel_start) { + ext_label->selection_start = ext->tmp_sel_end; + ext_label->selection_end = ext->tmp_sel_start; + lv_obj_invalidate(ta); + } + } else if(ext->tmp_sel_start < ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_start || + ext_label->selection_end != ext->tmp_sel_end) { + ext_label->selection_start = ext->tmp_sel_start; + ext_label->selection_end = ext->tmp_sel_end; + lv_obj_invalidate(ta); + } + } else { + if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { + ext_label->selection_start = -1; + ext_label->selection_end = -1; + lv_obj_invalidate(ta); + } + } + printf("Selection start: %d end: %d\n", ext_label->selection_start, ext_label->selection_end); + lv_ta_set_cursor_pos(ta, index_of_char_at_position); } diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index b31afdaab02e..8974c700b627 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -74,6 +74,9 @@ typedef struct lv_cursor_type_t type:4; /*Shape of the cursor*/ uint8_t state :1; /*Indicates that the cursor is visible now or not (Handled by the library)*/ } cursor; + int tmp_sel_start; /*Temporary value*/ + int tmp_sel_end; /*Temporary value*/ + uint8_t selecting :1; /*User is in process of selecting */ } lv_ta_ext_t; enum { diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index d3e15e93c7bb..43b9c8352b66 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -701,7 +701,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ bool label_mask_ok; label_mask_ok = lv_area_intersect(&label_mask, mask, &cell_area); if(label_mask_ok) { - lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, ext->cell_data[cell] + 1, txt_flags, NULL); + lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, ext->cell_data[cell] + 1, txt_flags, NULL, -1, -1); } /*Draw lines after '\n's*/ lv_point_t p1; From b14ed6288ab8ad589fcffa656656446c23852697 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 17:12:55 -0400 Subject: [PATCH 211/590] Add lv_ta_get_selection --- src/lv_objx/lv_ta.c | 27 +++++++++++++++++++++++++-- src/lv_objx/lv_ta.h | 12 ++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 5c6fcfdfb131..14aa07ace15e 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -7,7 +7,6 @@ /********************* * INCLUDES *********************/ -#include #include "lv_ta.h" #if LV_USE_TA != 0 #include @@ -935,6 +934,31 @@ lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) return style; } +/** + * Get the selection index of the text area. + * + * The last character is exclusive (i.e. if the API says that the selection + * ranges from 6 to 7, only character 6 is selected). + * @param ta Text area object + * @param sel_start pointer to int used to hold first selected character + * @param sel_end pointer to int used to hold last selected character + */ + +void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + + /*Force both values to -1 if there is no selection*/ + if(ext_label->selection_start == -1 || ext_label->selection_end == -1) { + *sel_start = -1; + *sel_end = -1; + return; + } + + *sel_start = ext_label->selection_start; + *sel_end = ext_label->selection_end; +} + /*===================== * Other functions *====================*/ @@ -1625,7 +1649,6 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_ lv_obj_invalidate(ta); } } - printf("Selection start: %d end: %d\n", ext_label->selection_start, ext_label->selection_end); lv_ta_set_cursor_pos(ta, index_of_char_at_position); } diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 8974c700b627..088ca015bff9 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -363,6 +363,18 @@ static inline bool lv_ta_get_edge_flash(lv_obj_t * ta) */ lv_style_t * lv_ta_get_style(const lv_obj_t *ta, lv_ta_style_t type); +/** + * Get the selection index of the text area. + * + * The last character is exclusive (i.e. if the API says that the selection + * ranges from 6 to 7, only character 6 is selected). + * @param ta Text area object + * @param sel_start pointer to int used to hold first selected character + * @param sel_end pointer to int used to hold last selected character + */ + +void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end); + /*===================== * Other functions *====================*/ From 0a4e8979ec7f97e15bf111841c11bc78e76949f0 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 17:22:44 -0400 Subject: [PATCH 212/590] Add lv_ta_clear_selection and fix a few bugs --- src/lv_objx/lv_ta.c | 20 ++++++++++++++++++++ src/lv_objx/lv_ta.h | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 14aa07ace15e..8ef4ae24e062 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -431,6 +431,9 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + /*Clear the existing selection*/ + lv_ta_clear_selection(ta); + /*Add the character one-by-one if not all characters are accepted or there is character limit.*/ if(lv_ta_get_accepted_chars(ta) || lv_ta_get_max_length(ta)) { lv_label_set_text(ext->label, ""); @@ -626,10 +629,13 @@ void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en) } txt[i] = '\0'; + lv_ta_clear_selection(ta); + lv_label_set_text(ext->label, NULL); } /*Pwd mode is now disabled*/ else if(ext->pwd_mode == 1 && en == false) { + lv_ta_clear_selection(ta); lv_label_set_text(ext->label, ext->pwd_tmp); lv_mem_free(ext->pwd_tmp); ext->pwd_tmp = NULL; @@ -963,6 +969,20 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { * Other functions *====================*/ +/** + * Clear the selection on the text area. + * @param ta Text area object + */ +void lv_ta_clear_selection(lv_obj_t * ta) { + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + + ext_label->selection_start = -1; + ext_label->selection_end = -1; + + lv_obj_invalidate(ta); +} + /** * Move the cursor one character right * @param ta pointer to a text area object diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 088ca015bff9..5b191edbe9ad 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -379,6 +379,12 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end); * Other functions *====================*/ +/** + * Clear the selection on the text area. + * @param ta Text area object + */ +void lv_ta_clear_selection(lv_obj_t * ta); + /** * Move the cursor one character right * @param ta pointer to a text area object From 3b747718eaf2f450217ada62e5132fb681107ca8 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 18:36:57 -0400 Subject: [PATCH 213/590] More text area fixes --- src/lv_objx/lv_ta.c | 25 +++++++++++++++++++++---- src/lv_objx/lv_ta.h | 7 +++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 8ef4ae24e062..670a6ab74195 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -231,6 +231,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ lv_label_ins_text(ext->label, ext->cursor.pos, (const char *)letter_buf); /*Insert the character*/ + lv_ta_clear_selection(ta); /*Clear selection*/ if(ext->pwd_mode != 0) { @@ -311,6 +312,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) /*Insert the text*/ lv_label_ins_text(ext->label, ext->cursor.pos, txt); + lv_ta_clear_selection(ta); if(ext->pwd_mode != 0) { ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + strlen(txt) + 1); @@ -380,6 +382,7 @@ void lv_ta_del_char(lv_obj_t * ta) lv_txt_cut(label_txt, ext->cursor.pos - 1, 1); /*Refresh the label*/ lv_label_set_text(ext->label, label_txt); + lv_ta_clear_selection(ta); /*Don't let 'width == 0' because cursor will not be visible*/ if(lv_obj_get_width(ext->label) == 0) { @@ -418,6 +421,7 @@ void lv_ta_del_char_forward(lv_obj_t * ta) if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta); } + /*===================== * Setter functions *====================*/ @@ -965,6 +969,18 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { *sel_end = ext_label->selection_end; } +/** + * Find whether text is selected or not. + * @param ta Text area object + * @return whether text is selected or not + */ +bool lv_ta_text_is_selected(const lv_obj_t *ta) { + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + + return (ext_label->selection_start == -1 || ext_label->selection_end == -1); +} + /*===================== * Other functions *====================*/ @@ -977,10 +993,11 @@ void lv_ta_clear_selection(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - ext_label->selection_start = -1; - ext_label->selection_end = -1; - - lv_obj_invalidate(ta); + if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { + ext_label->selection_start = -1; + ext_label->selection_end = -1; + lv_obj_invalidate(ta); + } } /** diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 5b191edbe9ad..be1e074366c6 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -375,6 +375,13 @@ lv_style_t * lv_ta_get_style(const lv_obj_t *ta, lv_ta_style_t type); void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end); +/** + * Find whether text is selected or not. + * @param ta Text area object + * @return whether text is selected or not + */ +bool lv_ta_text_is_selected(const lv_obj_t *ta); + /*===================== * Other functions *====================*/ From e63e1f230ab77271b2a08c99a12adc70ee529c92 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 19:11:04 -0400 Subject: [PATCH 214/590] Properly handle selection on multi-line text areas --- src/lv_objx/lv_label.c | 73 ++++++++++++++++++++++++++++++++++++++++++ src/lv_objx/lv_label.h | 8 +++++ src/lv_objx/lv_ta.c | 73 +++++++++++++++++++++++++++--------------- 3 files changed, 128 insertions(+), 26 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 3723dc9a8a00..a9389f174409 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -546,6 +546,79 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) return lv_encoded_get_char_id(txt, i); } +/** + * Check if a character is drawn under a point. + * @param label Label object + * @param pos Point to check for characte under + * @return whether a character is drawn under the point + */ +bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; + uint32_t new_line_start = 0; + lv_coord_t max_w = lv_obj_get_width(label); + lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + + if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; + if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; + if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; + + /*If the width will be expanded set the max length to very big */ + if(ext->long_mode == LV_LABEL_LONG_EXPAND || ext->long_mode == LV_LABEL_LONG_SCROLL) { + max_w = LV_COORD_MAX; + } + + /*Search the line of the index letter */; + while(txt[line_start] != '\0') { + new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + + if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ + y += letter_height + style->text.line_space; + + line_start = new_line_start; + } + + /*Calculate the x coordinate*/ + lv_coord_t x = 0; + lv_coord_t last_x = 0; + if(ext->align == LV_LABEL_ALIGN_CENTER) { + lv_coord_t line_w; + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, + font, style->text.letter_space, flag); + x += lv_obj_get_width(label) / 2 - line_w / 2; + } + + lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t i = line_start; + uint32_t i_current = i; + uint32_t letter; + while(i <= new_line_start - 1) { + letter = lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ + /*Handle the recolor command*/ + if((flag & LV_TXT_FLAG_RECOLOR) != 0) { + if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { + continue; /*Skip the letter is it is part of a command*/ + } + } + last_x = x; + x += lv_font_get_width(font, letter); + if(pos->x < x) { + i = i_current; + break; + } + x += style->text.letter_space; + i_current = i; + } + + int max_diff = lv_font_get_width(font, letter) + style->text.letter_space + 1; + return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff)); +} + /*===================== * Other functions diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 65e33b0ee1d6..e35f5d2b7937 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -230,6 +230,14 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t */ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos); +/** + * Check if a character is drawn under a point. + * @param label Label object + * @param pos Point to check for characte under + * @return whether a character is drawn under the point + */ +bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); + /** * Get the style of an label object * @param label pointer to an label object diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 670a6ab74195..26b3a1b24b6e 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -7,6 +7,7 @@ /********************* * INCLUDES *********************/ +#include #include "lv_ta.h" #if LV_USE_TA != 0 #include @@ -1625,12 +1626,17 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_ lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); lv_area_t label_coords; + bool click_outside_label; uint16_t index_of_char_at_position; lv_obj_get_coords(ext->label, &label_coords); - lv_point_t point_act; + lv_point_t point_act, vect_act; + lv_indev_get_point(click_source, &point_act); + + lv_indev_get_vect(click_source, &vect_act); + if(point_act.x < 0 || point_act.y < 0) return; /*Ignore event from keypad*/ lv_point_t relative_position; relative_position.x = point_act.x - label_coords.x1; @@ -1638,56 +1644,71 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_ lv_coord_t label_width = lv_obj_get_width(ext->label); + + /*Check if the click happened on the left side of the area outside the label*/ if (relative_position.x < 0) { index_of_char_at_position = 0; + click_outside_label = true; } /*Check if the click happened on the right side of the area outside the label*/ else if (relative_position.x >= label_width) { index_of_char_at_position = LV_TA_CURSOR_LAST; + click_outside_label = true; } else { index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); + click_outside_label = !lv_label_is_char_under_pos(ext->label, &relative_position); } - if(!ext->selecting && sign == LV_SIGNAL_PRESSED) { + if(!ext->selecting && !click_outside_label && sign == LV_SIGNAL_PRESSED) { /*Input device just went down. Store the selection start position*/ ext->tmp_sel_start = index_of_char_at_position; ext->tmp_sel_end = -1; ext->selecting = 1; + lv_obj_set_drag(lv_page_get_scrl(ta), false); } else if(ext->selecting && sign == LV_SIGNAL_PRESSING) { /*Input device may be moving. Store the end position */ ext->tmp_sel_end = index_of_char_at_position; - } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + } else if(ext->selecting && (sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED)) { /*Input device is released. Check if anything was selected.*/ - ext->selecting = 0; + lv_obj_set_drag(lv_page_get_scrl(ta), true); } - /*If the selected area has changed then update the real values and*/ - /*invalidate the text area.*/ - if(ext->tmp_sel_start > ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_end || - ext_label->selection_end != ext->tmp_sel_start) { - ext_label->selection_start = ext->tmp_sel_end; - ext_label->selection_end = ext->tmp_sel_start; - lv_obj_invalidate(ta); - } - } else if(ext->tmp_sel_start < ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_start || - ext_label->selection_end != ext->tmp_sel_end) { - ext_label->selection_start = ext->tmp_sel_start; - ext_label->selection_end = ext->tmp_sel_end; - lv_obj_invalidate(ta); + if(ext->selecting || sign == LV_SIGNAL_PRESSED) + lv_ta_set_cursor_pos(ta, index_of_char_at_position); + + if(ext->selecting) { + /*If the selected area has changed then update the real values and*/ + /*invalidate the text area.*/ + if(ext->tmp_sel_start > ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_end || + ext_label->selection_end != ext->tmp_sel_start) { + ext_label->selection_start = ext->tmp_sel_end; + ext_label->selection_end = ext->tmp_sel_start; + lv_obj_invalidate(ta); + } + } else if(ext->tmp_sel_start < ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_start || + ext_label->selection_end != ext->tmp_sel_end) { + ext_label->selection_start = ext->tmp_sel_start; + ext_label->selection_end = ext->tmp_sel_end; + lv_obj_invalidate(ta); + } + } else { + if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { + ext_label->selection_start = -1; + ext_label->selection_end = -1; + lv_obj_invalidate(ta); + } + } + /*Finish selection if necessary */ + if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + ext->selecting = 0; } - } else { - if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { - ext_label->selection_start = -1; - ext_label->selection_end = -1; - lv_obj_invalidate(ta); - } } - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + } #endif From f5609b6bcedcb6e5c4f997f9dc64c3f9668e2da6 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 19:12:46 -0400 Subject: [PATCH 215/590] Remove leftover inclusion of stdio.h --- src/lv_objx/lv_ta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 26b3a1b24b6e..e2cbe1565c7f 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -7,7 +7,6 @@ /********************* * INCLUDES *********************/ -#include #include "lv_ta.h" #if LV_USE_TA != 0 #include From 97089da7f52f16b98985e7b24e144980fefa4a24 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 19:17:48 -0400 Subject: [PATCH 216/590] Add lv_ta_set_sel_mode/lv_ta_get_sel_mode --- src/lv_objx/lv_ta.c | 25 ++++++++++++++++++++++++- src/lv_objx/lv_ta.h | 15 +++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index e2cbe1565c7f..da5a0fcfc727 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -791,6 +791,18 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) } } +/** + * Enable/disable selection mode. + * @param ta pointer to a text area object + * @param en true or false to enable/disable selection mode + */ +void lv_ta_set_sel_mode(lv_obj_t *ta, bool en) { + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->sel_mode = en; + if(!en) + lv_ta_clear_selection(ta); +} + /*===================== * Getter functions *====================*/ @@ -981,6 +993,17 @@ bool lv_ta_text_is_selected(const lv_obj_t *ta) { return (ext_label->selection_start == -1 || ext_label->selection_end == -1); } +/** + * Find whether selection mode is enabled. + * @param ta pointer to a text area object + * @return true: selection mode is enabled, false: disabled + */ +bool lv_ta_get_sel_mode(lv_obj_t *ta, bool en) { + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + return ext->sel_mode; +} + /*===================== * Other functions *====================*/ @@ -1660,7 +1683,7 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_ click_outside_label = !lv_label_is_char_under_pos(ext->label, &relative_position); } - if(!ext->selecting && !click_outside_label && sign == LV_SIGNAL_PRESSED) { + if(ext->sel_mode && !ext->selecting && !click_outside_label && sign == LV_SIGNAL_PRESSED) { /*Input device just went down. Store the selection start position*/ ext->tmp_sel_start = index_of_char_at_position; ext->tmp_sel_end = -1; diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index be1e074366c6..fa606e816149 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -77,6 +77,7 @@ typedef struct int tmp_sel_start; /*Temporary value*/ int tmp_sel_end; /*Temporary value*/ uint8_t selecting :1; /*User is in process of selecting */ + uint8_t sel_mode :1; /*Text can be selected on this text area*/ } lv_ta_ext_t; enum { @@ -251,6 +252,13 @@ static inline void lv_ta_set_edge_flash(lv_obj_t * ta, bool en) */ void lv_ta_set_style(lv_obj_t *ta, lv_ta_style_t type, lv_style_t *style); +/** + * Enable/disable selection mode. + * @param ta pointer to a text area object + * @param en true or false to enable/disable selection mode + */ +void lv_ta_set_sel_mode(lv_obj_t *ta, bool en); + /*===================== * Getter functions *====================*/ @@ -382,6 +390,13 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end); */ bool lv_ta_text_is_selected(const lv_obj_t *ta); +/** + * Find whether selection mode is enabled. + * @param ta pointer to a text area object + * @return true: selection mode is enabled, false: disabled + */ +bool lv_ta_get_sel_mode(lv_obj_t *ta, bool en); + /*===================== * Other functions *====================*/ From 5919cf5613712c03a2e9629024f44e7d2f861fc7 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 19:19:50 -0400 Subject: [PATCH 217/590] Draw selection rectangle with line height rather than font height --- src/lv_draw/lv_draw_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 588962050fdb..e8baee80c1ec 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -189,7 +189,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st sel_coords.x1 = pos.x; sel_coords.y1 = pos.y; sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1; - sel_coords.y2 = pos.y + lv_font_get_height(font) - 1; + sel_coords.y2 = pos.y + line_height - 1; lv_draw_rect(&sel_coords, mask, &sel_style, opa); } } From 272ee1b4661d429aadc86eaf6dbaa7a76525a7ee Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 27 Mar 2019 20:46:21 -0400 Subject: [PATCH 218/590] Fix potentially uninitialized variable in lv_label_is_char_under_pos --- src/lv_objx/lv_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index a9389f174409..665bfa50564f 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -596,7 +596,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; uint32_t i = line_start; uint32_t i_current = i; - uint32_t letter; + uint32_t letter = 0; while(i <= new_line_start - 1) { letter = lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ /*Handle the recolor command*/ From 1cd983941e70c5881d4f8cfef1d493996b206488 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 28 Mar 2019 06:11:50 +0100 Subject: [PATCH 219/590] make LV_TXT_UTF8 always enabled (remove the defeine checks) --- src/lv_conf_checker.h | 3 - src/lv_misc/lv_symbol_def.h | 59 --------------- src/lv_misc/lv_txt.c | 138 +----------------------------------- src/lv_objx/lv_label.c | 26 ------- src/lv_objx/lv_label.h | 4 -- src/lv_objx/lv_ta.c | 19 ++--- 6 files changed, 7 insertions(+), 242 deletions(-) diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index e1de81219b10..f7f11a6cd516 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -126,9 +126,6 @@ #endif /*Text settings*/ -#ifndef LV_TXT_UTF8 -#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */ -#endif #ifndef LV_TXT_BREAK_CHARS #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ #endif diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index 2ecbd18951a1..5ba3b715acb7 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -20,62 +20,6 @@ extern "C" { * - Reserved: 0xE060..0xE07F */ -#if LV_TXT_UTF8 == 0 -#define LV_SYMBOL_GLYPH_FIRST 0xC0 -#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE1(C0) -#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE1(C1) -#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE1(C2) -#define LV_SYMBOL_OK _LV_SYMBOL_VALUE1(C3) -#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE1(C4) -#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE1(C5) -#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE1(C6) -#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE1(C7) -#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE1(C8) -#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE1(C9) -#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE1(CA) -#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE1(CB) -#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE1(CC) -#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE1(CD) -#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE1(CE) -#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE1(CF) -#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE1(D0) -#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE1(D1) -#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE1(D2) -#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE1(D3) -#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE1(D4) -#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE1(D5) -#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE1(D6) -#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE1(D7) -#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE1(D8) -#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE1(D9) -#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE1(DA) -#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE1(DB) -#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE1(DC) -#define LV_SYMBOL_UP _LV_SYMBOL_VALUE1(DD) -#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE1(DE) -#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE1(DF) -#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE1(E0) -#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE1(E1) -#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE1(E2) -#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE1(E3) -#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE1(E4) -#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE1(E5) -#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE1(E6) -#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE1(E7) -#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE1(E8) -#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE1(E9) -#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE1(EA) -#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE1(EB) -#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE1(EC) -#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE1(ED) -#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE1(EE) -#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE1(EF) -#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE1(F0) -#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE1(F1) -#define LV_SYMBOL_GLYPH_LAST 0xF1 -#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE1(FF) /*Invalid symbol. If written before a string then `lv_img` will show it as a label*/ - -#else #define LV_SYMBOL_GLYPH_FIRST 0xF800 #define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) #define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) @@ -129,9 +73,7 @@ extern "C" { #define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) #define LV_SYMBOL_GLYPH_LAST 0xF831 #define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ -#endif -#define _LV_SYMBOL_VALUE1(x) (0x ## x) #define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) #define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym @@ -190,7 +132,6 @@ enum _LV_SYMBOL_NUMSTR(LV_SYMBOL_DUMMY), }; -#undef _LV_SYMBOL_VALUE1 #undef _LV_SYMBOL_VALUE3 #define _LV_SYMBOL_STR_(x) #x diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 36b1a3bb3bb9..fbcc3165e57d 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -35,7 +35,6 @@ **********************/ static bool is_break_char(uint32_t letter); -#if LV_TXT_UTF8 static uint8_t lv_txt_utf8_size(const char * str); static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni); static uint32_t lv_txt_utf8_conv_wc(uint32_t c); @@ -44,16 +43,6 @@ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start); static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id); static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id); static uint32_t lv_txt_utf8_get_length(const char * txt); -#else -static uint8_t lv_txt_ascii_size(const char * str); -static uint32_t lv_txt_unicode_to_ascii(uint32_t letter_uni); -static uint32_t lv_txt_ascii_conv_wc(uint32_t c); -static uint32_t lv_txt_ascii_next(const char * txt, uint32_t * i); -static uint32_t lv_txt_ascii_prev(const char * txt, uint32_t * i_start); -static uint32_t lv_txt_ascii_get_byte_id(const char * txt, uint32_t utf8_id); -static uint32_t lv_txt_ascii_get_char_id(const char * txt, uint32_t byte_id); -static uint32_t lv_txt_ascii_get_length(const char * txt); -#endif /********************** * STATIC VARIABLES @@ -63,7 +52,6 @@ static uint32_t lv_txt_ascii_get_length(const char * txt); /********************** * GLOBAL VARIABLES **********************/ -#if LV_TXT_UTF8 uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_utf8_size; uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_utf8; uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_utf8_conv_wc; @@ -72,16 +60,7 @@ uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_prev; uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id; uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id; uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length; -#else -uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_ascii_size; -uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_ascii; -uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_ascii_conv_wc; -uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_ascii_next; -uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_ascii_prev; -uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_ascii_get_byte_id; -uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_ascii_get_char_id; -uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_ascii_get_length; -#endif + /********************** * MACROS **********************/ @@ -384,9 +363,8 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) uint32_t old_len = strlen(txt_buf); uint32_t ins_len = strlen(ins_txt); uint32_t new_len = ins_len + old_len; -#if LV_TXT_UTF8 != 0 pos = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/ -#endif + /*Copy the second part into the end to make place to text to insert*/ uint32_t i; for(i = new_len; i >= pos + ins_len; i--) { @@ -407,10 +385,9 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) { uint32_t old_len = strlen(txt); -#if LV_TXT_UTF8 != 0 + pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/ len = lv_txt_encoded_get_byte_id(&txt[pos], len); -#endif /*Copy the second part into the end to make place to text to insert*/ uint32_t i; @@ -424,8 +401,6 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) * UTF-8 ENCODER/DECOER ******************************/ -#if LV_TXT_UTF8 - /** * Give the size of an UTF-8 coded character * @param str pointer to a character in a string @@ -647,9 +622,6 @@ static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id) */ static uint32_t lv_txt_utf8_get_length(const char * txt) { -#if LV_TXT_UTF8 == 0 - return strlen(txt); -#else uint32_t len = 0; uint32_t i = 0; @@ -659,112 +631,8 @@ static uint32_t lv_txt_utf8_get_length(const char * txt) } return len; -#endif } -#else -/** - * Give the size of an UTF-8 coded character - * @param str pointer to a character in a string - * @return length of the UTF-8 character (1,2,3 or 4). O on invalid code - */ -static uint8_t lv_txt_ascii_size(const char * str) -{ - return 1; -} - - -/** - * Convert an Unicode letter to UTF-8. - * @param letter_uni an Unicode letter - * @return UTF-8 coded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ű') - */ -static uint32_t lv_txt_unicode_to_ascii(uint32_t letter_uni) -{ - if(letter_uni < 128) return letter_uni; - else return ' '; -} - -/** - * Convert wide characters to ASCII, however wide characters in ASCII range (e.g. 'A') are ASCII compatible by default. - * So this function does nothing just returns with `c`. - * @param c a character, e.g. 'A' - * @return same as `c` - */ -static uint32_t lv_txt_ascii_conv_wc(uint32_t c) -{ - return c; -} - -/** - * Decode an UTF-8 character from a string. - * @param txt pointer to '\0' terminated string - * @param i start byte index in 'txt' where to start. - * After call it will point to the next UTF-8 char in 'txt'. - * NULL to use txt[0] as index - * @return the decoded Unicode character or 0 on invalid UTF-8 code - */ -static uint32_t lv_txt_ascii_next(const char * txt, uint32_t * i) -{ - if(i == NULL) return txt[1]; /*Get the next char */ - - uint8_t letter = txt[*i] ; - (*i)++; - return letter; -} - -/** - * Get previous UTF-8 character form a string. - * @param txt pointer to '\0' terminated string - * @param i start byte index in 'txt' where to start. After the call it will point to the previous UTF-8 char in 'txt'. - * @return the decoded Unicode character or 0 on invalid UTF-8 code - */ -static uint32_t lv_txt_ascii_prev(const char * txt, uint32_t * i) -{ - if(i == NULL) return *(txt - 1); /*Get the prev. char */ - - (*i)--; - uint8_t letter = txt[*i] ; - - return letter; -} - -/** - * Convert a character index (in an UTF-8 text) to byte index. - * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long - * @param txt a '\0' terminated UTF-8 string - * @param utf8_id character index - * @return byte index of the 'utf8_id'th letter - */ -static uint32_t lv_txt_ascii_get_byte_id(const char * txt, uint32_t utf8_id) -{ - return utf8_id; /*In Non encoded no difference*/ -} - - -/** - * Convert a byte index (in an UTF-8 text) to character index. - * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long - * @param txt a '\0' terminated UTF-8 string - * @param byte_id byte index - * @return character index of the letter at 'byte_id'th position - */ -static uint32_t lv_txt_ascii_get_char_id(const char * txt, uint32_t byte_id) -{ - return byte_id; /*In Non encoded no difference*/ -} - -/** - * Get the number of characters (and NOT bytes) in a string. Decode it with UTF-8 if enabled. - * E.g.: "ÁBC" is 3 characters (but 4 bytes) - * @param txt a '\0' terminated char string - * @return number of characters - */ -static uint32_t lv_txt_ascii_get_length(const char * txt) -{ - return strlen(txt); -} -#endif /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 682cdc5fd64b..95c1f3742725 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -574,11 +574,7 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) if(ext->text == NULL) return; if(pos == LV_LABEL_POS_LAST) { -#if LV_TXT_UTF8 == 0 - pos = old_len; -#else pos = lv_txt_get_encoded_length(ext->text); -#endif } lv_txt_ins(ext->text, pos, txt); @@ -853,19 +849,6 @@ static void lv_label_refr_text(lv_obj_t * label) uint32_t letter_id = lv_label_get_letter_on(label, &p); -#if LV_TXT_UTF8 == 0 - /*Save letters under the dots and replace them with dots*/ - uint8_t i; - for(i = 0; i < LV_LABEL_DOT_NUM; i++) { - ext->dot_tmp[i] = ext->text[letter_id + i]; - ext->text[letter_id + i] = '.'; - } - - ext->dot_tmp[LV_LABEL_DOT_NUM] = ext->text[letter_id + LV_LABEL_DOT_NUM]; - ext->text[letter_id + LV_LABEL_DOT_NUM] = '\0'; - - ext->dot_end = letter_id + LV_LABEL_DOT_NUM; -#else /*Save letters under the dots and replace them with dots*/ uint32_t i; uint32_t byte_id = lv_txt_encoded_get_byte_id(ext->text, letter_id); @@ -885,8 +868,6 @@ static void lv_label_refr_text(lv_obj_t * label) ext->text[byte_id_ori + LV_LABEL_DOT_NUM] = '\0'; ext->dot_end = letter_id + LV_LABEL_DOT_NUM; -#endif - } } /*In break mode only the height can change*/ @@ -907,12 +888,6 @@ static void lv_label_revert_dots(lv_obj_t * label) lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if(ext->long_mode != LV_LABEL_LONG_DOT) return; if(ext->dot_end == LV_LABEL_DOT_END_INV) return; -#if LV_TXT_UTF8 == 0 - uint32_t i; - for(i = 0; i <= LV_LABEL_DOT_NUM; i++) { - ext->text[ext->dot_end - i] = ext->dot_tmp[LV_LABEL_DOT_NUM - i]; - } -#else uint32_t letter_i = ext->dot_end - LV_LABEL_DOT_NUM; uint32_t byte_i = lv_txt_encoded_get_byte_id(ext->text, letter_i); @@ -922,7 +897,6 @@ static void lv_label_revert_dots(lv_obj_t * label) ext->text[byte_i + i] = ext->dot_tmp[i]; i++; } -#endif ext->dot_end = LV_LABEL_DOT_END_INV; } diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index b72bc8ecf8ee..73adae9db3aa 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -63,11 +63,7 @@ typedef struct /*New data for this type */ char * text; /*Text of the label*/ lv_label_long_mode_t long_mode; /*Determinate what to do with the long texts*/ -#if LV_TXT_UTF8 == 0 - char dot_tmp[LV_LABEL_DOT_NUM + 1]; /*Store the character which are replaced by dots (Handled by the library)*/ -#else char dot_tmp[LV_LABEL_DOT_NUM * 4 + 1]; /*Store the character which are replaced by dots (Handled by the library)*/ -#endif uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 237a15a733c6..2ff7150b1cfd 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -388,12 +388,9 @@ void lv_ta_del_char(lv_obj_t * ta) } if(ext->pwd_mode != 0) { -#if LV_TXT_UTF8 == 0 - lv_txt_cut(ext->pwd_tmp, ext->cursor.pos - 1, 1); -#else uint32_t byte_pos = lv_txt_encoded_get_byte_id(ext->pwd_tmp, ext->cursor.pos - 1); lv_txt_cut(ext->pwd_tmp, ext->cursor.pos - 1, lv_txt_encoded_size(&label_txt[byte_pos])); -#endif + ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 1); lv_mem_assert(ext->pwd_tmp); if(ext->pwd_tmp == NULL) return; @@ -1101,14 +1098,9 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ } else if(ext->cursor.type == LV_CURSOR_BLOCK) { lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); -#if LV_TXT_UTF8 == 0 - char letter_buf[2]; - letter_buf[0] = txt[ext->cursor.txt_byte_pos]; - letter_buf[1] = '\0'; -#else char letter_buf[8] = {0}; memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); -#endif + cur_area.x1 += cur_style.body.padding.left; cur_area.y1 += cur_style.body.padding.top; lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0); @@ -1435,14 +1427,11 @@ static void refr_cursor_area(lv_obj_t * ta) uint16_t cur_pos = lv_ta_get_cursor_pos(ta); const char * txt = lv_label_get_text(ext->label); + uint32_t byte_pos; -#if LV_TXT_UTF8 != 0 byte_pos = lv_txt_encoded_get_byte_id(txt, cur_pos); + uint32_t letter = lv_txt_encoded_next(&txt[byte_pos], NULL); -#else - byte_pos = cur_pos; - uint32_t letter = txt[byte_pos]; -#endif lv_coord_t letter_h = lv_font_get_height(label_style->text.font); /*Set letter_w (set not 0 on non printable but valid chars)*/ From 438ae64502ab43dc73436a204cd99126e436fa1e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 29 Mar 2019 16:10:18 +0100 Subject: [PATCH 220/590] fixes for #935 --- src/lv_core/lv_indev.c | 2 +- src/lv_core/lv_indev.h | 2 +- src/lv_hal/lv_hal_indev.h | 4 ++-- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_ddlist.c | 13 ++++++++++--- src/lv_objx/lv_ddlist.h | 4 ++-- src/lv_objx/lv_list.c | 4 ++-- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_preload.c | 4 ++-- src/lv_objx/lv_preload.h | 8 ++++---- src/lv_objx/lv_roller.c | 12 +----------- src/lv_objx/lv_roller.h | 6 +++++- src/lv_objx/lv_slider.c | 2 +- src/lv_objx/lv_spinbox.c | 2 +- src/lv_objx/lv_ta.c | 2 +- src/lv_objx/lv_tabview.c | 4 ++-- 16 files changed, 37 insertions(+), 36 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index d3222eb798d5..551a79c02c0c 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -85,7 +85,7 @@ lv_indev_t * lv_indev_get_act(void) * @param indev pointer to an input device * @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`) */ -lv_hal_indev_type_t lv_indev_get_type(const lv_indev_t * indev) +lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev) { if(indev == NULL) return LV_INDEV_TYPE_NONE; diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index ff422401506f..edf1c1afd588 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -46,7 +46,7 @@ lv_indev_t * lv_indev_get_act(void); * @param indev pointer to an input device * @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`) */ -lv_hal_indev_type_t lv_indev_get_type(const lv_indev_t * indev); +lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev); /** * Reset one or all input devices diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index b41f56565ac9..10a32d2838ca 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -46,7 +46,7 @@ enum { LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the screen*/ LV_INDEV_TYPE_ENCODER, /*Encoder with only Left, Right turn and a Button*/ }; -typedef uint8_t lv_hal_indev_type_t; +typedef uint8_t lv_indev_type_t; /*States for input devices*/ enum { @@ -68,7 +68,7 @@ typedef struct { /*Initialized by the user and registered by 'lv_indev_add()'*/ typedef struct _lv_indev_drv_t { - lv_hal_indev_type_t type; /*Input device type*/ + lv_indev_type_t type; /*Input device type*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ #if LV_USE_USER_DATA_MULTI diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index f0dd14c32505..82796811b0f5 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -811,7 +811,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); - lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_POINTER) { /*Select the clicked button*/ lv_point_t p1; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index e98d73426cf1..1228b4380b95 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -339,8 +339,9 @@ uint16_t lv_ddlist_get_selected(const lv_obj_t * ddlist) * Get the current selected option as a string * @param ddlist pointer to ddlist object * @param buf pointer to an array to store the string + * @param buf_size size of `buf` in bytes. 0: to ignore it. */ -void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf) +void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t buf_size) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -355,7 +356,13 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf) } uint16_t c; - for(c = 0; opt_txt[i] != '\n' && i < txt_len; c++, i++) buf[c] = opt_txt[i]; + for(c = 0; opt_txt[i] != '\n' && i < txt_len; c++, i++) { + if(buf_size && c >= buf_size - 1) { + LV_LOG_WARN("lv_ddlist_get_selected_str: the buffer was too small") + break; + } + buf[c] = opt_txt[i]; + } buf[c] = '\0'; } @@ -641,7 +648,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(ddlist); bool editing = lv_group_get_editing(g); - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 799df11e548a..077ba956a5fb 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -181,9 +181,9 @@ uint16_t lv_ddlist_get_selected(const lv_obj_t * ddlist); * Get the current selected option as a string * @param ddlist pointer to ddlist object * @param buf pointer to an array to store the string + * @param buf_size size of `buf` in bytes. 0: to ignore it. */ -void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf); - +void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t buf_size); /** * Get the fix height value. diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 875ed1a961fa..abdb02526474 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -745,7 +745,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) { /*If pressed/released etc by a KEYPAD or ENCODER delegate signal to the button*/ lv_indev_t * indev = lv_indev_get_act(); - lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_KEYPAD || (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(list)))) { @@ -783,7 +783,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { lv_group_t * g = lv_obj_get_group(list); diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index bfb1e8f7859f..72f3916af7c8 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -456,7 +456,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_indev_t * indev = lv_indev_get_act(); - lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_ENCODER) { /*In navigation mode don't select any button but in edit mode select the fist*/ lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm); diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 8c5e53ffc783..e70628250248 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -170,7 +170,7 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_ * @param preload pointer to pre loader object * @param type animation type of the preload * */ -void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type) +void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) { #if LV_USE_ANIMATION lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); @@ -290,7 +290,7 @@ lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t t * @param preload pointer to pre loader object * @return animation type * */ -lv_preloader_type_t lv_preload_get_animation_type(lv_obj_t * preload) +lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); return ext->anim_type; diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 913297a1a1eb..b69f45094946 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -45,7 +45,7 @@ enum { LV_PRELOAD_TYPE_SPINNING_ARC, LV_PRELOAD_TYPE_FILLSPIN_ARC, }; -typedef uint8_t lv_preloader_type_t; +typedef uint8_t lv_preload_type_t; /*Data of pre loader*/ typedef struct { @@ -53,7 +53,7 @@ typedef struct { /*New data for this type */ uint16_t arc_length; /*Length of the spinning indicator in degree*/ uint16_t time; /*Time of one round*/ - lv_preloader_type_t anim_type; /*Type of the arc animation*/ + lv_preload_type_t anim_type; /*Type of the arc animation*/ } lv_preload_ext_t; @@ -110,7 +110,7 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_ * @param preload pointer to pre loader object * @param type animation type of the preload * */ -void lv_preload_set_animation_type(lv_obj_t * preload, lv_preloader_type_t type); +void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type); /*===================== * Getter functions @@ -141,7 +141,7 @@ lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t t * @param preload pointer to pre loader object * @return animation type * */ -lv_preloader_type_t lv_preload_get_animation_type(lv_obj_t * preload); +lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload); /*===================== * Other functions diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 61e9557ffdf8..ebc67c91c037 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -244,16 +244,6 @@ uint16_t lv_roller_get_selected(const lv_obj_t *roller) } } -/** - * Get the current selected option as a string - * @param roller pointer to roller object - * @param buf pointer to an array to store the string - */ -void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf) -{ - lv_ddlist_get_selected_str(roller, buf); -} - /** * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER * @param roller pointer to a roller object @@ -432,7 +422,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index bb76de7a6e19..065544d01c24 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -137,8 +137,12 @@ uint16_t lv_roller_get_selected(const lv_obj_t *roller); * Get the current selected option as a string * @param roller pointer to roller object * @param buf pointer to an array to store the string + * @param buf_size size of `buf` in bytes. 0: to ignore it. */ -void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf); +static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, uint16_t buf_size) +{ + lv_ddlist_get_selected_str(roller, buf, buf_size); +} /** * Get the align attribute. Default alignment after _create is LV_LABEL_ALIGN_CENTER diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 56411bd011e9..da5fd1557af1 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -490,7 +490,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par /*Leave edit mode if released. (No need to wait for LONG_PRESS) */ lv_group_t * g = lv_obj_get_group(slider); bool editing = lv_group_get_editing(g); - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); if(indev_type == LV_INDEV_TYPE_ENCODER) { if(editing) lv_group_set_editing(g, false); } diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 5e42926906e5..3fe2f44ded24 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -358,7 +358,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p } } else if(sign == LV_SIGNAL_CONTROL) { - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ if(c == LV_GROUP_KEY_RIGHT) { diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 440f6ec6d20d..97f20771e955 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -1307,7 +1307,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) cur_type = lv_ta_get_cursor_type(ta); lv_group_t * g = lv_obj_get_group(ta); bool editing = lv_group_get_editing(g); - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 3f4e34c88538..ac496a3eb835 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -596,7 +596,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p /*If released by a KEYPAD or ENCODER then really the tab buttons should be released. * So simulate a CLICK on the tab buttons*/ lv_indev_t * indev = lv_indev_get_act(); - lv_hal_indev_type_t indev_type = lv_indev_get_type(indev); + lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_KEYPAD || (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) { @@ -611,7 +611,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p } if(sign == LV_SIGNAL_FOCUS) { - lv_hal_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); + lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*With ENCODER select the first button only in edit mode*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { #if LV_USE_GROUP From eb6daa51d75d44ea6ced39fc82608fd56ceec484 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 30 Mar 2019 06:03:23 +0100 Subject: [PATCH 221/590] move antialiasing and refr_task to the display level --- lv_conf_template.h | 3 +- src/lv_core/lv_disp.c | 18 + src/lv_core/lv_disp.h | 8 + src/lv_core/lv_obj.h | 2 +- src/lv_core/lv_refr.c | 92 +++--- src/lv_core/lv_refr.h | 6 + src/lv_draw/lv_draw.c | 2 +- src/lv_draw/lv_draw.h | 2 +- src/lv_draw/lv_draw_line.c | 227 +++++++------ src/lv_draw/lv_draw_rect.c | 661 +++++++++++++++++++------------------ src/lv_hal/lv_hal_disp.c | 29 +- src/lv_hal/lv_hal_disp.h | 15 + src/lv_objx/lv_ta.c | 2 +- src/lv_objx/lv_ta.h | 2 +- 14 files changed, 580 insertions(+), 489 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 8450b6ea85d8..8b7913692799 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -30,8 +30,7 @@ /* Enable anti-aliasing (lines, and radiuses will be smoothed) */ #define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ - -/*Screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ +/*Default screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ #define LV_REFR_PERIOD 30 /*[ms]*/ /* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index dc4578d17e25..b32323f9af19 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -112,6 +112,24 @@ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr); } +/** + * Get the a pointer to the screen refresher task. + * It's parameters can be modified with `lv_task_...` functions, + * @param disp pointer to a display + * @return pointer to the display refresher task. (NULL on error) + */ +lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) +{ + + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_disp_get_refr_task: no display registered to get its top layer"); + return NULL; + } + + return disp->refr_task; +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index b291213ed58c..4ca104c20752 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -62,6 +62,14 @@ lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp); */ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); +/** + * Get the a pointer to the screen refresher task. + * It's parameters can be modified with `lv_task_...` functions, + * @param disp pointer to a display + * @return pointer to the display refresher task. (NULL on error) + */ +lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) ; + /*------------------------------------------------ * To improve backward compatibility * Recommended only if you have one display diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 7918e10dc08b..febd01a16196 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -35,7 +35,7 @@ extern "C" { /*Error check of lv_conf.h*/ #if LV_HOR_RES_MAX == 0 || LV_VER_RES_MAX == 0 -#error "LittlevGL: LV_HOR_RES and LV_VER_RES must be greater than 0" +#error "LittlevGL: LV_HOR_RES_MAX and LV_VER_RES_MAX must be greater than 0" #endif #if LV_ANTIALIAS > 1 diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 307ae84849ce..b55fbe64b996 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -30,7 +30,6 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_refr_task(void * param); static void lv_refr_join_area(void); static void lv_refr_areas(void); static void lv_refr_area(const lv_area_t * area_p); @@ -59,9 +58,7 @@ static lv_disp_t * disp_refr; /*Display being refreshed*/ */ void lv_refr_init(void) { - lv_task_t * task; - task = lv_task_create(lv_refr_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, NULL); - lv_task_ready(task); /*Be sure the screen will be refreshed immediately on start up*/ + /*Nothing to do*/ } /** @@ -72,7 +69,7 @@ void lv_refr_init(void) */ void lv_refr_now(void) { - lv_refr_task(NULL); + lv_disp_refr_task(NULL); } @@ -133,77 +130,72 @@ lv_disp_t * lv_refr_get_disp_refreshing(void) return disp_refr; } -/********************** - * STATIC FUNCTIONS - **********************/ - /** * Called periodically to handle the refreshing - * @param param unused + * @param param point to a `lv_disp_t` to refresh */ -static void lv_refr_task(void * param) +void lv_disp_refr_task(void * param) { - (void)param; - LV_LOG_TRACE("lv_refr_task: started"); uint32_t start = lv_tick_get(); - LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), disp_refr) { - LV_LOG_TRACE("lv_refr_task: refreshing a display"); + disp_refr = param; - lv_refr_join_area(); + lv_refr_join_area(); - lv_refr_areas(); + lv_refr_areas(); - /*If refresh happened ...*/ - if(disp_refr->inv_p != 0) { - /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ - if(lv_disp_is_true_double_buf(disp_refr)) { - lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); + /*If refresh happened ...*/ + if(disp_refr->inv_p != 0) { + /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ + if(lv_disp_is_true_double_buf(disp_refr)) { + lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); - /*Flush the content of the VDB*/ - lv_refr_vdb_flush(); + /*Flush the content of the VDB*/ + lv_refr_vdb_flush(); - /* With true double buffering the flushing should be only the address change of the current frame buffer. - * Wait until the address change is ready and copy the changed content to the other frame buffer (new active VDB) - * to keep the buffers synchronized*/ - while(vdb->flushing); + /* With true double buffering the flushing should be only the address change of the current frame buffer. + * Wait until the address change is ready and copy the changed content to the other frame buffer (new active VDB) + * to keep the buffers synchronized*/ + while(vdb->flushing); - uint8_t * buf_act = (uint8_t *) vdb->buf_act; - uint8_t * buf_ina = (uint8_t *) vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; + uint8_t * buf_act = (uint8_t *) vdb->buf_act; + uint8_t * buf_ina = (uint8_t *) vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; - lv_coord_t hres = lv_disp_get_hor_res(disp_refr); - uint16_t a; - for(a = 0; a < disp_refr->inv_p; a++) { - if(disp_refr->inv_area_joined[a] == 0) { - lv_coord_t y; - uint32_t start_offs = (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t); - uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); + lv_coord_t hres = lv_disp_get_hor_res(disp_refr); + uint16_t a; + for(a = 0; a < disp_refr->inv_p; a++) { + if(disp_refr->inv_area_joined[a] == 0) { + lv_coord_t y; + uint32_t start_offs = (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t); + uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); - for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { - memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); - start_offs += hres * sizeof(lv_color_t); - } + for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { + memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); + start_offs += hres * sizeof(lv_color_t); } } - } /*End of true double buffer handling*/ + } + } /*End of true double buffer handling*/ - /*Clean up*/ - memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas)); - memset(disp_refr->inv_area_joined, 0, sizeof(disp_refr->inv_area_joined)); - disp_refr->inv_p = 0; + /*Clean up*/ + memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas)); + memset(disp_refr->inv_area_joined, 0, sizeof(disp_refr->inv_area_joined)); + disp_refr->inv_p = 0; - /*Call monitor cb if present*/ - if(disp_refr->driver.monitor_cb) { - disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num); - } + /*Call monitor cb if present*/ + if(disp_refr->driver.monitor_cb) { + disp_refr->driver.monitor_cb(&disp_refr->driver, lv_tick_elaps(start), px_num); } } LV_LOG_TRACE("lv_refr_task: ready"); } +/********************** + * STATIC FUNCTIONS + **********************/ /** * Join the areas which has got common parts diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index 789d478898dd..bdf406c69f04 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -66,6 +66,12 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); */ lv_disp_t * lv_refr_get_disp_refreshing(void); +/** + * Called periodically to handle the refreshing + * @param param point to a `lv_disp_t` to refresh + */ +void lv_disp_refr_task(void * param); + /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_draw/lv_draw.c b/src/lv_draw/lv_draw.c index af7c8a384062..b3ee3d7758b0 100644 --- a/src/lv_draw/lv_draw.c +++ b/src/lv_draw/lv_draw.c @@ -40,7 +40,7 @@ * STATIC FUNCTIONS **********************/ -#if LV_ANTIALIAS != 0 +#if LV_ANTIALIAS /** * Get the opacity of a pixel based it's position in a line segment diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index a3d41b745787..5a1350873fe5 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -51,7 +51,7 @@ typedef uint8_t lv_img_src_t; * GLOBAL PROTOTYPES **********************/ -#if LV_ANTIALIAS != 0 +#if LV_ANTIALIAS /** * Get the opacity of a pixel based it's position in a line segment diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index c456095c5944..8fa7b894c094 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -9,6 +9,7 @@ #include #include #include "lv_draw.h" +#include "../lv_core/lv_refr.h" #include "../lv_misc/lv_math.h" /********************* @@ -129,38 +130,41 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv else { bool dir_ori = false; #if LV_ANTIALIAS - lv_point_t p_tmp; - - if(main_line.hor) { - if(main_line.p1.y < main_line.p2.y) { - dir_ori = true; - p_tmp.x = main_line.p2.x; - p_tmp.y = main_line.p2.y - 1; - line_init(&main_line, &p1, &p_tmp); - main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ - } - else if(main_line.p1.y > main_line.p2.y) { - dir_ori = false; - p_tmp.x = main_line.p2.x; - p_tmp.y = main_line.p2.y + 1; - line_init(&main_line, &p1, &p_tmp); - main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ - } - } - else { - if(main_line.p1.x < main_line.p2.x) { - dir_ori = true; - p_tmp.x = main_line.p2.x - 1; - p_tmp.y = main_line.p2.y; - line_init(&main_line, &p1, &p_tmp); - main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + if(aa) { + lv_point_t p_tmp; + + if(main_line.hor) { + if(main_line.p1.y < main_line.p2.y) { + dir_ori = true; + p_tmp.x = main_line.p2.x; + p_tmp.y = main_line.p2.y - 1; + line_init(&main_line, &p1, &p_tmp); + main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ + } + else if(main_line.p1.y > main_line.p2.y) { + dir_ori = false; + p_tmp.x = main_line.p2.x; + p_tmp.y = main_line.p2.y + 1; + line_init(&main_line, &p1, &p_tmp); + main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ + } } - else if(main_line.p1.x > main_line.p2.x) { - dir_ori = false; - p_tmp.x = main_line.p2.x + 1; - p_tmp.y = main_line.p2.y; - line_init(&main_line, &p1, &p_tmp); - main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ + else { + if(main_line.p1.x < main_line.p2.x) { + dir_ori = true; + p_tmp.x = main_line.p2.x - 1; + p_tmp.y = main_line.p2.y; + line_init(&main_line, &p1, &p_tmp); + main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ + } + else if(main_line.p1.x > main_line.p2.x) { + dir_ori = false; + p_tmp.x = main_line.p2.x + 1; + p_tmp.y = main_line.p2.y; + line_init(&main_line, &p1, &p_tmp); + main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ + } } } #endif @@ -202,7 +206,6 @@ static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_coord_t width_1 = width & 0x1; lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; - lv_area_t act_area; act_area.x1 = main_line->p1.x - width_half; act_area.x2 = main_line->p2.x + width_half + width_1; @@ -221,7 +224,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ { lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; - + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_point_t vect_main, vect_norm; vect_main.x = main_line->p2.x - main_line->p1.x; vect_main.y = main_line->p2.y - main_line->p1.y; @@ -278,7 +281,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(sqr >= width_sqr) { width = i; #if LV_ANTIALIAS - width--; + if(aa) width--; #endif break; } @@ -288,11 +291,13 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } #if LV_ANTIALIAS + lv_coord_t aa_last_corner; lv_coord_t width_safe = width; - if(width == 0) width_safe = 1; + if(aa) { + if(width == 0) width_safe = 1; - lv_coord_t aa_last_corner; - aa_last_corner = 0; + aa_last_corner = 0; + } #endif lv_coord_t x_center_ofs = 0; @@ -312,54 +317,54 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ pattern[i].x -= x_center_ofs; pattern[i].y -= y_center_ofs; #if LV_ANTIALIAS - if(i != 0) { - if(main_line->hor) { - if(pattern[i - 1].x != pattern[i].x) { - lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y; - if(main_line->sy < 0) { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1, - -seg_w, mask, style->line.color, opa); - } else { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y, - -seg_w, mask, style->line.color, opa); + if(aa) { + if(i != 0) { + if(main_line->hor) { + if(pattern[i - 1].x != pattern[i].x) { + lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y; + if(main_line->sy < 0) { + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1, + -seg_w, mask, style->line.color, opa); + } else { + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y, + -seg_w, mask, style->line.color, opa); + } + aa_last_corner = i; } - aa_last_corner = i; - } - } else { - if(pattern[i - 1].y != pattern[i].y) { - lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x; - if(main_line->sx < 0) { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); - } else { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); + } else { + if(pattern[i - 1].y != pattern[i].y) { + lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x; + if(main_line->sx < 0) { + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p2.y + pattern[aa_last_corner].y + 1, + -seg_w, mask, style->line.color, opa); + } else { + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1, + -seg_w, mask, style->line.color, opa); + } + aa_last_corner = i; } - aa_last_corner = i; } - } + } } #endif } - - #if LV_ANTIALIAS /*Add the last part of anti-aliasing for the perpendicular ending*/ - if(width != 0) { /*Due to rounding error with very thin lines it looks ugly*/ + if(width != 0 && aa) { /*Due to rounding error with very thin lines it looks ugly*/ if(main_line->hor) { lv_coord_t seg_w = pattern[width_safe - 1].y - pattern[aa_last_corner].y; if(main_line->sy < 0) { @@ -402,25 +407,25 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/ lv_coord_t aa_shift1; lv_coord_t aa_shift2; - - if(main_line->hor == false) { - if(main_line->sx < 0) { - aa_shift1 = -1; - aa_shift2 = width == 0 ? 0 : aa_shift1; - } else { - aa_shift2 = 1; - aa_shift1 = width == 0 ? 0 : aa_shift2; - } - } else { - if(main_line->sy < 0) { - aa_shift1 = -1; - aa_shift2 = width == 0 ? 0 : aa_shift1; + if(aa) { + if(main_line->hor == false) { + if(main_line->sx < 0) { + aa_shift1 = -1; + aa_shift2 = width == 0 ? 0 : aa_shift1; + } else { + aa_shift2 = 1; + aa_shift1 = width == 0 ? 0 : aa_shift2; + } } else { - aa_shift2 = 1; - aa_shift1 = width == 0 ? 0 : aa_shift2; + if(main_line->sy < 0) { + aa_shift1 = -1; + aa_shift2 = width == 0 ? 0 : aa_shift1; + } else { + aa_shift2 = 1; + aa_shift1 = width == 0 ? 0 : aa_shift2; + } } } - #endif volatile lv_point_t prev_p; @@ -446,10 +451,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } #if LV_ANTIALIAS - lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, - -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa); - lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, - main_line->p_act.x - prev_p.x, mask, style->line.color, opa); + if(aa) { + lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, + -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa); + lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, + main_line->p_act.x - prev_p.x, mask, style->line.color, opa); + } #endif first_run = false; @@ -473,10 +480,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } #if LV_ANTIALIAS - lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, - -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa); - lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, - main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa); + if(aa) { + lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, + -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa); + lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, + main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa); + } #endif } /*Rather a vertical line*/ @@ -500,10 +509,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } #if LV_ANTIALIAS - lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, - -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa); - lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, - main_line->p_act.y - prev_p.y, mask, style->line.color, opa); + if(aa) { + lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, + -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa); + lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, + main_line->p_act.y - prev_p.y, mask, style->line.color, opa); + } #endif first_run = false; @@ -529,10 +540,12 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } #if LV_ANTIALIAS - lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, - -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa); - lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, - main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa); + if(aa) { + lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, + -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa); + lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, + main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa); + } #endif } } diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index ecd29b32def3..4de64642cc13 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -9,6 +9,7 @@ #include "lv_draw_rect.h" #include "../lv_misc/lv_circ.h" #include "../lv_misc/lv_math.h" +#include "../lv_core/lv_refr.h" /********************* * DEFINES @@ -102,6 +103,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_color_t mcolor = style->body.main_color; lv_color_t gcolor = style->body.grad_color; @@ -124,13 +126,14 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma work_area.y2 = coords->y2 - radius; if(style->body.radius != 0) { -#if LV_ANTIALIAS - work_area.y1 += 2; - work_area.y2 -= 2; -#else - work_area.y1 += 1; - work_area.y2 -= 1; -#endif + + if(aa) { + work_area.y1 += 2; + work_area.y2 -= 2; + } else { + work_area.y1 += 1; + work_area.y2 -= 1; + } } lv_draw_fill(&work_area, mask, mcolor, opa); @@ -141,13 +144,13 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma lv_color_t act_color; if(style->body.radius != 0) { -#if LV_ANTIALIAS - row_start += 2; - row_end -= 2; -#else - row_start += 1; - row_end -= 1; -#endif + if(aa) { + row_start += 2; + row_end -= 2; + } else { + row_start += 1; + row_end -= 1; + } } if(row_start < 0) row_start = 0; @@ -171,6 +174,7 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_color_t mcolor = style->body.main_color; lv_color_t gcolor = style->body.grad_color; @@ -187,17 +191,17 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_point_t rt_origo; /*Right Top origo*/ lv_point_t rb_origo; /*Left Bottom origo*/ - lt_origo.x = coords->x1 + radius + LV_ANTIALIAS; - lt_origo.y = coords->y1 + radius + LV_ANTIALIAS; + lt_origo.x = coords->x1 + radius + aa; + lt_origo.y = coords->y1 + radius + aa; - lb_origo.x = coords->x1 + radius + LV_ANTIALIAS; - lb_origo.y = coords->y2 - radius - LV_ANTIALIAS; + lb_origo.x = coords->x1 + radius + aa; + lb_origo.y = coords->y2 - radius - aa; - rt_origo.x = coords->x2 - radius - LV_ANTIALIAS; - rt_origo.y = coords->y1 + radius + LV_ANTIALIAS; + rt_origo.x = coords->x2 - radius - aa; + rt_origo.y = coords->y1 + radius + aa; - rb_origo.x = coords->x2 - radius - LV_ANTIALIAS; - rb_origo.y = coords->y2 - radius - LV_ANTIALIAS; + rb_origo.x = coords->x2 - radius - aa; + rb_origo.y = coords->y2 - radius - aa; lv_area_t edge_top_area; lv_area_t mid_top_area; @@ -229,57 +233,59 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir)); #if LV_ANTIALIAS - /*Store some internal states for anti-aliasing*/ - lv_coord_t out_y_seg_start = 0; - lv_coord_t out_y_seg_end = 0; - lv_coord_t out_x_last = radius; - - lv_color_t aa_color_hor_top; - lv_color_t aa_color_hor_bottom; - lv_color_t aa_color_ver; + /*Store some internal states for anti-aliasing*/ + lv_coord_t out_y_seg_start = 0; + lv_coord_t out_y_seg_end = 0; + lv_coord_t out_x_last = radius; + + lv_color_t aa_color_hor_top; + lv_color_t aa_color_hor_bottom; + lv_color_t aa_color_ver; #endif while(lv_circ_cont(&cir)) { -#if LV_ANTIALIAS != 0 - /*New step in y on the outter circle*/ - if(out_x_last != cir.x) { - out_y_seg_end = cir.y; - lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; - lv_point_t aa_p; +#if LV_ANTIALIAS + if(aa) { + /*New step in y on the outter circle*/ + if(out_x_last != cir.x) { + out_y_seg_end = cir.y; + lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; + lv_point_t aa_p; + + aa_p.x = out_x_last; + aa_p.y = out_y_seg_start; + + mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; + aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); + aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); + + lv_coord_t i; + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa; + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + aa_opa = antialias_get_opa_circ(seg_size, i, opa); + } else { + aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); + } - aa_p.x = out_x_last; - aa_p.y = out_y_seg_start; + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); - mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; - aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); - aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); + mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; + aa_color_ver = lv_color_mix(mcolor, gcolor, mix); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_coord_t i; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa; - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ - aa_opa = antialias_get_opa_circ(seg_size, i, opa); - } else { - aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); + aa_color_ver = lv_color_mix(gcolor, mcolor, mix); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); } - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); - - mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; - aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - - aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + out_x_last = cir.x; + out_y_seg_start = out_y_seg_end; } - - out_x_last = cir.x; - out_y_seg_start = out_y_seg_end; } #endif uint8_t edge_top_refr = 0; @@ -395,66 +401,65 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * #if LV_ANTIALIAS - /*The first and the last line is not drawn*/ - edge_top_area.x1 = coords->x1 + radius + 2; - edge_top_area.x2 = coords->x2 - radius - 2; - edge_top_area.y1 = coords->y1; - edge_top_area.y2 = coords->y1; - lv_draw_fill(&edge_top_area, mask, style->body.main_color, opa); - - edge_top_area.y1 = coords->y2; - edge_top_area.y2 = coords->y2; - lv_draw_fill(&edge_top_area, mask, style->body.grad_color, opa); - - /*Last parts of the anti-alias*/ - out_y_seg_end = cir.y; - lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; - lv_point_t aa_p; - - aa_p.x = out_x_last; - aa_p.y = out_y_seg_start; - - mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; - aa_color_hor_bottom = lv_color_mix(gcolor, mcolor, mix); - aa_color_hor_top = lv_color_mix(mcolor, gcolor, mix); - - lv_coord_t i; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); - - mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; - aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - - aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - } + if(aa) { + /*The first and the last line is not drawn*/ + edge_top_area.x1 = coords->x1 + radius + 2; + edge_top_area.x2 = coords->x2 - radius - 2; + edge_top_area.y1 = coords->y1; + edge_top_area.y2 = coords->y1; + lv_draw_fill(&edge_top_area, mask, style->body.main_color, opa); + + edge_top_area.y1 = coords->y2; + edge_top_area.y2 = coords->y2; + lv_draw_fill(&edge_top_area, mask, style->body.grad_color, opa); + + /*Last parts of the anti-alias*/ + out_y_seg_end = cir.y; + lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; + lv_point_t aa_p; - /*In some cases the last pixel is not drawn*/ - if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) { aa_p.x = out_x_last; - aa_p.y = out_x_last; + aa_p.y = out_y_seg_start; + + mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; + aa_color_hor_bottom = lv_color_mix(gcolor, mcolor, mix); + aa_color_hor_top = lv_color_mix(mcolor, gcolor, mix); + + lv_coord_t i; + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); + + mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; + aa_color_ver = lv_color_mix(mcolor, gcolor, mix); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + + aa_color_ver = lv_color_mix(gcolor, mcolor, mix); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + } - mix = (uint32_t)((uint32_t)(out_x_last) * 255) / height; - aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); - aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); + /*In some cases the last pixel is not drawn*/ + if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) { + aa_p.x = out_x_last; + aa_p.y = out_x_last; - lv_opa_t aa_opa = opa >> 1; - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, aa_opa); - } + mix = (uint32_t)((uint32_t)(out_x_last) * 255) / height; + aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); + aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); + lv_opa_t aa_opa = opa >> 1; + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, aa_opa); + } + } #endif - - } /** @@ -467,6 +472,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); @@ -484,10 +490,10 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area radius = lv_draw_cont_radius_corr(radius, width, height); if(radius < bwidth) { - length_corr = bwidth - radius - LV_ANTIALIAS; + length_corr = bwidth - radius - aa; corner_size = bwidth; } else { - corner_size = radius + LV_ANTIALIAS; + corner_size = radius + aa; } /*If radius == 0 is a special case*/ @@ -576,17 +582,17 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area /*Left top correction*/ if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { work_area.x1 = coords->x1; - work_area.x2 = coords->x1 + radius + LV_ANTIALIAS; - work_area.y1 = coords->y1 + radius + 1 + LV_ANTIALIAS; + work_area.x2 = coords->x1 + radius + aa; + work_area.y1 = coords->y1 + radius + 1 + aa; work_area.y2 = coords->y1 + bwidth; lv_draw_fill(&work_area, mask, color, opa); } /*Right top correction*/ if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - work_area.x1 = coords->x2 - radius - LV_ANTIALIAS; + work_area.x1 = coords->x2 - radius - aa; work_area.x2 = coords->x2; - work_area.y1 = coords->y1 + radius + 1 + LV_ANTIALIAS; + work_area.y1 = coords->y1 + radius + 1 + aa; work_area.y2 = coords->y1 + bwidth; lv_draw_fill(&work_area, mask, color, opa); } @@ -594,18 +600,18 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area /*Left bottom correction*/ if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { work_area.x1 = coords->x1; - work_area.x2 = coords->x1 + radius + LV_ANTIALIAS; + work_area.x2 = coords->x1 + radius + aa; work_area.y1 = coords->y2 - bwidth; - work_area.y2 = coords->y2 - radius - 1 - LV_ANTIALIAS; + work_area.y2 = coords->y2 - radius - 1 - aa; lv_draw_fill(&work_area, mask, color, opa); } /*Right bottom correction*/ if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - work_area.x1 = coords->x2 - radius - LV_ANTIALIAS; + work_area.x1 = coords->x2 - radius - aa; work_area.x2 = coords->x2; work_area.y1 = coords->y2 - bwidth; - work_area.y2 = coords->y2 - radius - 1 - LV_ANTIALIAS; + work_area.y2 = coords->y2 - radius - 1 - aa; lv_draw_fill(&work_area, mask, color, opa); } } @@ -615,35 +621,35 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area /*Left top corner*/ if(part & (LV_BORDER_TOP | LV_BORDER_LEFT)) { work_area.x1 = coords->x1; - work_area.x2 = coords->x1 + LV_ANTIALIAS; + work_area.x2 = coords->x1 + aa; work_area.y1 = coords->y1; - work_area.y2 = coords->y1 + LV_ANTIALIAS; + work_area.y2 = coords->y1 + aa; lv_draw_fill(&work_area, mask, color, opa); } /*Right top corner*/ if(part & (LV_BORDER_TOP | LV_BORDER_RIGHT)) { - work_area.x1 = coords->x2 - LV_ANTIALIAS; + work_area.x1 = coords->x2 - aa; work_area.x2 = coords->x2; work_area.y1 = coords->y1; - work_area.y2 = coords->y1 + LV_ANTIALIAS; + work_area.y2 = coords->y1 + aa; lv_draw_fill(&work_area, mask, color, opa); } /*Left bottom corner*/ if(part & (LV_BORDER_BOTTOM | LV_BORDER_LEFT)) { work_area.x1 = coords->x1; - work_area.x2 = coords->x1 + LV_ANTIALIAS; - work_area.y1 = coords->y2 - LV_ANTIALIAS; + work_area.x2 = coords->x1 + aa; + work_area.y1 = coords->y2 - aa; work_area.y2 = coords->y2; lv_draw_fill(&work_area, mask, color, opa); } /*Right bottom corner*/ if(part & (LV_BORDER_BOTTOM | LV_BORDER_RIGHT)) { - work_area.x1 = coords->x2 - LV_ANTIALIAS; + work_area.x1 = coords->x2 - aa; work_area.x2 = coords->x2; - work_area.y1 = coords->y2 - LV_ANTIALIAS; + work_area.y1 = coords->y2 - aa; work_area.y2 = coords->y2; lv_draw_fill(&work_area, mask, color, opa); } @@ -661,6 +667,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius ; + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); uint16_t bwidth = style->body.border.width; lv_color_t color = style->body.border.color; lv_border_part_t part = style->body.border.part; @@ -669,7 +676,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t bwidth--; #if LV_ANTIALIAS - bwidth--; /*Because of anti-aliasing the border seems one pixel ticker*/ + if(aa) bwidth--; /*Because of anti-aliasing the border seems one pixel ticker*/ #endif lv_coord_t width = lv_area_get_width(coords); @@ -682,17 +689,17 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t lv_point_t rt_origo; /*Right Top origo*/ lv_point_t rb_origo; /*Left Bottom origo*/ - lt_origo.x = coords->x1 + radius + LV_ANTIALIAS; - lt_origo.y = coords->y1 + radius + LV_ANTIALIAS; + lt_origo.x = coords->x1 + radius + aa; + lt_origo.y = coords->y1 + radius + aa; - lb_origo.x = coords->x1 + radius + LV_ANTIALIAS; - lb_origo.y = coords->y2 - radius - LV_ANTIALIAS; + lb_origo.x = coords->x1 + radius + aa; + lb_origo.y = coords->y2 - radius - aa; - rt_origo.x = coords->x2 - radius - LV_ANTIALIAS; - rt_origo.y = coords->y1 + radius + LV_ANTIALIAS; + rt_origo.x = coords->x2 - radius - aa; + rt_origo.y = coords->y1 + radius + aa; - rb_origo.x = coords->x2 - radius - LV_ANTIALIAS; - rb_origo.y = coords->y2 - radius - LV_ANTIALIAS; + rb_origo.x = coords->x2 - radius - aa; + rb_origo.y = coords->y2 - radius - aa; lv_point_t cir_out; lv_coord_t tmp_out; @@ -735,113 +742,114 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t act_w2 = act_w1 - 1; } -#if LV_ANTIALIAS != 0 - /*New step in y on the outter circle*/ - if(out_x_last != cir_out.x) { - out_y_seg_end = cir_out.y; - lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; - lv_point_t aa_p; - - aa_p.x = out_x_last; - aa_p.y = out_y_seg_start; - - lv_coord_t i; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa; +#if LV_ANTIALIAS + if(aa) { + /*New step in y on the outter circle*/ + if(out_x_last != cir_out.x) { + out_y_seg_end = cir_out.y; + lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; + lv_point_t aa_p; + + aa_p.x = out_x_last; + aa_p.y = out_y_seg_start; + + lv_coord_t i; + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa; + + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + aa_opa = antialias_get_opa_circ(seg_size, i, opa); + } else { + aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); + } - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ - aa_opa = antialias_get_opa_circ(seg_size, i, opa); - } else { - aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - } + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + } } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - } + out_x_last = cir_out.x; + out_y_seg_start = out_y_seg_end; } - out_x_last = cir_out.x; - out_y_seg_start = out_y_seg_end; - } - - /*New step in y on the inner circle*/ - if(in_x_last != cir_in.x) { - in_y_seg_end = cir_out.y; - lv_coord_t seg_size = in_y_seg_end - in_y_seg_start; - lv_point_t aa_p; - - aa_p.x = in_x_last; - aa_p.y = in_y_seg_start; - - lv_coord_t i; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa; - - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ - aa_opa = opa - antialias_get_opa_circ(seg_size, i, opa); - } else { - aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); - } - - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - } + /*New step in y on the inner circle*/ + if(in_x_last != cir_in.x) { + in_y_seg_end = cir_out.y; + lv_coord_t seg_size = in_y_seg_end - in_y_seg_start; + lv_point_t aa_p; - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - } + aa_p.x = in_x_last; + aa_p.y = in_y_seg_start; - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - } + lv_coord_t i; + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa; - if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - } + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + aa_opa = opa - antialias_get_opa_circ(seg_size, i, opa); + } else { + aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); + } - /*Be sure the pixels on the middle are not drawn twice*/ - if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } - } - } + /*Be sure the pixels on the middle are not drawn twice*/ + if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + } - in_x_last = cir_in.x; - in_y_seg_start = in_y_seg_end; + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + } - } + if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + } + + if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + } + } + + } + in_x_last = cir_in.x; + in_y_seg_start = in_y_seg_end; + + } + } #endif @@ -920,107 +928,107 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } -#if LV_ANTIALIAS != 0 - - /*Last parts of the outer anti-alias*/ - out_y_seg_end = cir_out.y; - lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; - lv_point_t aa_p; - - aa_p.x = out_x_last; - aa_p.y = out_y_seg_start; - - lv_coord_t i; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - } - - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - } - - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - } - - if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - } - } +#if LV_ANTIALIAS + if(aa) { + /*Last parts of the outer anti-alias*/ + out_y_seg_end = cir_out.y; + lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; + lv_point_t aa_p; - /*In some cases the last pixel in the outer middle is not drawn*/ - if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) { aa_p.x = out_x_last; - aa_p.y = out_x_last; + aa_p.y = out_y_seg_start; - lv_opa_t aa_opa = opa >> 1; + lv_coord_t i; + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, style->body.border.color, aa_opa); + if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + } } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, style->body.border.color, aa_opa); - } - } + /*In some cases the last pixel in the outer middle is not drawn*/ + if(LV_MATH_ABS(aa_p.x - aa_p.y) == seg_size) { + aa_p.x = out_x_last; + aa_p.y = out_x_last; - /*Last parts of the inner anti-alias*/ - in_y_seg_end = cir_in.y; - aa_p.x = in_x_last; - aa_p.y = in_y_seg_start; - seg_size = in_y_seg_end - in_y_seg_start; + lv_opa_t aa_opa = opa >> 1; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - } + if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, style->body.border.color, aa_opa); + } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, style->body.border.color, aa_opa); + } } - if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { + /*Last parts of the inner anti-alias*/ + in_y_seg_end = cir_in.y; + aa_p.x = in_x_last; + aa_p.y = in_y_seg_start; + seg_size = in_y_seg_end - in_y_seg_start; + + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + } + + if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + } + + if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + } + + if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + } + + if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + } } } } - #endif } @@ -1074,6 +1082,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask * the other corner. `col` also should start from `- swidth` */ + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; lv_coord_t swidth = style->body.shadow.width; @@ -1083,7 +1092,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask radius = lv_draw_cont_radius_corr(radius, width, height); - radius += LV_ANTIALIAS; + radius += aa; #if LV_COMPILER_VLA_SUPPORTED lv_coord_t curve_x[radius + swidth + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ @@ -1140,17 +1149,17 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask lv_point_t ofs_rt; lv_point_t ofs_lb; lv_point_t ofs_lt; - ofs_rb.x = coords->x2 - radius - LV_ANTIALIAS; - ofs_rb.y = coords->y2 - radius - LV_ANTIALIAS; + ofs_rb.x = coords->x2 - radius - aa; + ofs_rb.y = coords->y2 - radius - aa; - ofs_rt.x = coords->x2 - radius - LV_ANTIALIAS; - ofs_rt.y = coords->y1 + radius + LV_ANTIALIAS; + ofs_rt.x = coords->x2 - radius - aa; + ofs_rt.y = coords->y1 + radius + aa; - ofs_lb.x = coords->x1 + radius + LV_ANTIALIAS; - ofs_lb.y = coords->y2 - radius - LV_ANTIALIAS; + ofs_lb.x = coords->x1 + radius + aa; + ofs_lb.y = coords->y2 - radius - aa; - ofs_lt.x = coords->x1 + radius + LV_ANTIALIAS; - ofs_lt.y = coords->y1 + radius + LV_ANTIALIAS; + ofs_lt.x = coords->x1 + radius + aa; + ofs_lt.y = coords->y1 + radius + aa; bool line_ready; for(line = 0; line <= radius + swidth; line++) { /*Check all rows and make the 1D blur to 2D*/ line_ready = false; @@ -1235,14 +1244,15 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; lv_coord_t swidth = style->body.shadow.width; lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); - radius += LV_ANTIALIAS * SHADOW_BOTTOM_AA_EXTRA_RADIUS; - swidth += LV_ANTIALIAS; + radius += aa * SHADOW_BOTTOM_AA_EXTRA_RADIUS; + swidth += aa; #if LV_COMPILER_VLA_SUPPORTED lv_coord_t curve_x[radius + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else @@ -1284,10 +1294,10 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma lv_point_t ofs_r; ofs_l.x = coords->x1 + radius; - ofs_l.y = coords->y2 - radius + 1 - LV_ANTIALIAS; + ofs_l.y = coords->y2 - radius + 1 - aa; ofs_r.x = coords->x2 - radius; - ofs_r.y = coords->y2 - radius + 1 - LV_ANTIALIAS; + ofs_r.y = coords->y2 - radius + 1 - aa; for(col = 0; col <= radius; col++) { point_l.x = ofs_l.x - col ; @@ -1333,36 +1343,37 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, const lv_opa_t * map) { + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; lv_coord_t swidth = style->body.shadow.width;// + LV_ANTIALIAS; lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); - radius += LV_ANTIALIAS; + radius += aa; lv_area_t right_area; - right_area.x1 = coords->x2 + 1 - LV_ANTIALIAS; - right_area.y1 = coords->y1 + radius + LV_ANTIALIAS; + right_area.x1 = coords->x2 + 1 - aa; + right_area.y1 = coords->y1 + radius + aa; right_area.x2 = right_area.x1; - right_area.y2 = coords->y2 - radius - LV_ANTIALIAS; + right_area.y2 = coords->y2 - radius - aa; lv_area_t left_area; - left_area.x1 = coords->x1 - 1 + LV_ANTIALIAS; - left_area.y1 = coords->y1 + radius + LV_ANTIALIAS; + left_area.x1 = coords->x1 - 1 + aa; + left_area.y1 = coords->y1 + radius + aa; left_area.x2 = left_area.x1; - left_area.y2 = coords->y2 - radius - LV_ANTIALIAS; + left_area.y2 = coords->y2 - radius - aa; lv_area_t top_area; - top_area.x1 = coords->x1 + radius + LV_ANTIALIAS; - top_area.y1 = coords->y1 - 1 + LV_ANTIALIAS; - top_area.x2 = coords->x2 - radius - LV_ANTIALIAS; + top_area.x1 = coords->x1 + radius + aa; + top_area.y1 = coords->y1 - 1 + aa; + top_area.x2 = coords->x2 - radius - aa; top_area.y2 = top_area.y1; lv_area_t bottom_area; - bottom_area.x1 = coords->x1 + radius + LV_ANTIALIAS; - bottom_area.y1 = coords->y2 + 1 - LV_ANTIALIAS; - bottom_area.x2 = coords->x2 - radius - LV_ANTIALIAS; + bottom_area.x1 = coords->x1 + radius + aa; + bottom_area.y1 = coords->y2 + 1 - aa; + bottom_area.x2 = coords->x2 - radius - aa; bottom_area.y2 = bottom_area.y1; lv_opa_t opa_act; @@ -1393,6 +1404,8 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h) { + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + if(r >= (w >> 1)) { r = (w >> 1); if(r != 0) r--; @@ -1402,7 +1415,7 @@ static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h) if(r != 0) r--; } - if(r > 0) r -= LV_ANTIALIAS; + if(r > 0) r -= aa; return r; } diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 39e6853ae986..9993ae11b9ec 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -14,13 +14,13 @@ #include "lv_hal.h" #include "../lv_misc/lv_mem.h" #include "../lv_core/lv_obj.h" +#include "../lv_core/lv_refr.h" #include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) # include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ - /********************* * DEFINES *********************/ @@ -61,6 +61,10 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; +#if LV_ANTIALIAS + driver->antialiasing = true; +#endif + #if LV_USE_GPU driver->mem_blend = NULL; driver->mem_fill = NULL; @@ -132,6 +136,12 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) disp_def = disp_def_tmp; /*Revert the default display*/ + /*Create a refresh task*/ + disp->refr_task = lv_task_create(lv_disp_refr_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, disp); + lv_mem_assert(disp->refr_task); + if(disp->refr_task == NULL) return NULL; + + lv_task_ready(disp->refr_task); /*Be sure the screen will be refreshed immediately on start up*/ return disp; } @@ -205,6 +215,23 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) else return disp->driver.ver_res; } +/** + * Get if anti-aliasing is enabled for a display or not + * @param disp pointer to a display (NULL to use the default display) + * @return true: anti-aliasing is enabled; false: disabled + */ +bool lv_disp_get_antialiasing(lv_disp_t * disp) +{ +#if LV_ANTIALIAS == 0 + return false; +#else + if(disp == NULL) disp = lv_disp_get_default(); + if(disp == NULL) return false; + + return disp->driver.antialiasing ? true : false; +#endif +} + /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 89b5a22f8204..47818f51354c 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -21,6 +21,7 @@ extern "C" { #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_ll.h" +#include "../lv_misc/lv_task.h" /********************* * DEFINES @@ -67,6 +68,10 @@ typedef struct _disp_drv_t { * LittlevGL will use this buffer(s) to draw the screens contents */ lv_disp_buf_t * buffer; +#if LV_ANTIALIAS + uint32_t antialiasing :1; +#endif + /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); @@ -110,6 +115,9 @@ typedef struct _disp_t { /*Driver to the display*/ lv_disp_drv_t driver; + /*A task which periodically checks the dirty areas and refreshes them*/ + lv_task_t * refr_task; + /*Screens of the display*/ lv_ll_t scr_ll; struct _lv_obj_t * act_scr; @@ -192,6 +200,13 @@ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp); */ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); +/** + * Get if anti-aliasing is enabled for a display or not + * @param disp pointer to a display (NULL to use the default display) + * @return true: anti-aliasing is enabled; false: disabled + */ +bool lv_disp_get_antialiasing(lv_disp_t * disp); + /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 97f20771e955..6ec07a1b8e25 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -995,7 +995,7 @@ bool lv_ta_text_is_selected(const lv_obj_t *ta) { * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_sel_mode(lv_obj_t *ta, bool en) { +bool lv_ta_get_sel_mode(lv_obj_t *ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); return ext->sel_mode; diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index fa606e816149..53c8716b939a 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -395,7 +395,7 @@ bool lv_ta_text_is_selected(const lv_obj_t *ta); * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_sel_mode(lv_obj_t *ta, bool en); +bool lv_ta_get_sel_mode(lv_obj_t *ta); /*===================== * Other functions From 9515e800d49b4c7e62d73ec22d033e113cc0d1be Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 30 Mar 2019 06:04:56 +0100 Subject: [PATCH 222/590] minor comment fix --- lv_conf_template.h | 1 - src/lv_conf_checker.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 8b7913692799..3227bb42c4a7 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -77,7 +77,6 @@ #define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ /*Text settings*/ -#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */ #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ #define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */ #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index f7f11a6cd516..13b9cc252b6d 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -38,8 +38,7 @@ #define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ #endif - -/*Screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ +/*Default screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ #ifndef LV_REFR_PERIOD #define LV_REFR_PERIOD 30 /*[ms]*/ #endif From 09f362a1ed7d096eef62f9892da2c3f89eeed28e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 30 Mar 2019 06:23:41 +0100 Subject: [PATCH 223/590] add disp. rotate config for disp_drv --- src/lv_core/lv_refr.c | 4 ++-- src/lv_hal/lv_hal_disp.c | 24 ++++++++++++++++++++---- src/lv_hal/lv_hal_disp.h | 1 + 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index b55fbe64b996..29f97cfe9dc6 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -92,8 +92,8 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) lv_area_t scr_area; scr_area.x1 = 0; scr_area.y1 = 0; - scr_area.x2 = disp->driver.hor_res - 1; - scr_area.y2 = disp->driver.ver_res - 1; + scr_area.x2 = lv_disp_get_hor_res(disp) - 1; + scr_area.y2 = lv_disp_get_ver_res(disp) - 1; lv_area_t com_area; bool suc; diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 9993ae11b9ec..6389e0e60169 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -60,6 +60,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->hor_res = LV_HOR_RES_MAX; driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; + driver->rotated = 1; #if LV_ANTIALIAS driver->antialiasing = true; @@ -171,6 +172,21 @@ void lv_disp_remove(lv_disp_t * disp) if(was_default) lv_disp_set_default(lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll))); } +/** + * Update the driver in run time. + * @param disp Pointer toa display. (return value of `lv_disp_drv_register`) + * @param new_drv pointer to the new driver + */ +void lv_disp_update_drv(lv_disp_t * disp, lv_disp_drv_t * new_drv) +{ + memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t)); + + lv_obj_t * scr; + LV_LL_READ(disp->scr_ll, scr) { + lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); + } +} + /** * Set a default screen. The new screens will be created on it by default. * @param disp pointer to a display @@ -198,8 +214,8 @@ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); - if(disp == NULL) return LV_HOR_RES_MAX; - else return disp->driver.hor_res; + if(disp == NULL) return disp->driver.rotated == 0 ? LV_HOR_RES_MAX : LV_VER_RES_MAX; + else return disp->driver.rotated == 0 ? disp->driver.hor_res : disp->driver.ver_res; } /** @@ -211,8 +227,8 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); - if(disp == NULL) return LV_VER_RES_MAX; - else return disp->driver.ver_res; + if(disp == NULL) return disp->driver.rotated == 0 ? LV_VER_RES_MAX : LV_HOR_RES_MAX; + else return disp->driver.rotated == 0 ? disp->driver.ver_res : disp->driver.hor_res; } /** diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 47818f51354c..3bd091959fee 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -71,6 +71,7 @@ typedef struct _disp_drv_t { #if LV_ANTIALIAS uint32_t antialiasing :1; #endif + uint32_t rotated :1; /*1: turn the display by 90 degree.*/ /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); From 103f6c3041352938be4be8a65372696c22b1d39b Mon Sep 17 00:00:00 2001 From: embeddedt Date: Sun, 31 Mar 2019 19:15:37 -0400 Subject: [PATCH 224/590] Assume display is not rotated by default --- src/lv_hal/lv_hal_disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 6389e0e60169..715a288f4b34 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -60,7 +60,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->hor_res = LV_HOR_RES_MAX; driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; - driver->rotated = 1; + driver->rotated = 0; #if LV_ANTIALIAS driver->antialiasing = true; From af61c96802ad7141ed47ed303c4b877a33876963 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 2 Apr 2019 06:44:50 +0200 Subject: [PATCH 225/590] add LV_LABEL_LONG_ROLL_CIRC --- src/lv_objx/lv_label.c | 112 ++++++++++++++++++++++++----------------- src/lv_objx/lv_label.h | 4 +- src/lv_objx/lv_list.c | 2 +- 3 files changed, 70 insertions(+), 48 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 2ab9aae27cbf..2e481ce93b3a 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -256,7 +256,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) ext->offset.x = 0; ext->offset.y = 0; - if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_CROP) ext->expand = 1; + if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_ROLL_CIRC || long_mode == LV_LABEL_LONG_CROP) ext->expand = 1; else ext->expand = 0; /*Restore the character under the dots*/ @@ -327,7 +327,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) ext->anim_speed = anim_speed; - if(ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_label_refr_text(label); } } @@ -427,7 +427,7 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; /*If the width will be expanded the set the max length to very big */ - if(ext->long_mode == LV_LABEL_LONG_EXPAND || ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { max_w = LV_COORD_MAX; } @@ -498,7 +498,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; /*If the width will be expanded set the max length to very big */ - if(ext->long_mode == LV_LABEL_LONG_EXPAND || ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { max_w = LV_COORD_MAX; } @@ -569,7 +569,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; /*If the width will be expanded set the max length to very big */ - if(ext->long_mode == LV_LABEL_LONG_EXPAND || ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { max_w = LV_COORD_MAX; } @@ -737,7 +737,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ /* In ROLL mode the CENTER and RIGHT are pointless so remove them. * (In addition they will result mis-alignment is this case)*/ - if((ext->long_mode == LV_LABEL_LONG_ROLL) && + if((ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) && (ext->align == LV_LABEL_ALIGN_CENTER || ext->align == LV_LABEL_ALIGN_RIGHT)) { lv_point_t size; lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag); @@ -748,6 +748,26 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, ext->selection_start, ext->selection_end); + + if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { + lv_point_t size; + lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag); + + lv_point_t ofs; + /*Draw the text again next to the original to make an circular effect */ + if(size.x > lv_obj_get_width(label)) { + ofs.x = ext->offset.x + size.x + lv_font_get_width(style->text.font, ' ') * ANIM_WAIT_CHAR_COUNT; + ofs.y = ext->offset.y; + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, ext->selection_start, ext->selection_end); + } + + /*Draw the text again below the original to make an circular effect */ + if(size.y > lv_obj_get_height(label)) { + ofs.x = ext->offset.x; + ofs.y = ext->offset.y + size.y + lv_font_get_height(style->text.font); + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, ext->selection_start, ext->selection_end); + } + } } return true; } @@ -821,8 +841,7 @@ static void lv_label_refr_text(lv_obj_t * label) const lv_font_t * font = style->text.font; /*If the width will be expanded set the max length to very big */ - if(ext->long_mode == LV_LABEL_LONG_EXPAND || - ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { max_w = LV_COORD_MAX; } @@ -834,44 +853,8 @@ static void lv_label_refr_text(lv_obj_t * label) lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, flag); /*Set the full size in expand mode*/ - if(ext->long_mode == LV_LABEL_LONG_EXPAND || ext->long_mode == LV_LABEL_LONG_SCROLL) { + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { lv_obj_set_size(label, size.x, size.y); - - /*Start scrolling if the label is greater then its parent*/ - if(ext->long_mode == LV_LABEL_LONG_SCROLL) { -#if LV_USE_ANIMATION - lv_obj_t * parent = lv_obj_get_parent(label); - - /*Delete the potential previous scroller animations*/ - lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_x); - lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_y); - - lv_anim_t anim; - anim.var = label; - anim.repeat = 1; - anim.playback = 1; - anim.start = 0; - anim.act_time = 0; - anim.end_cb = NULL; - anim.path = lv_anim_path_linear; - - anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + - style->text.letter_space) * 1000) / ext->anim_speed) * ANIM_WAIT_CHAR_COUNT; - anim.repeat_pause = anim.playback_pause; - - if(lv_obj_get_width(label) > lv_obj_get_width(parent)) { - anim.end = lv_obj_get_width(parent) - lv_obj_get_width(label); - anim.fp = (lv_anim_fp_t) lv_obj_set_x; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); - lv_anim_create(&anim); - } else if(lv_obj_get_height(label) > lv_obj_get_height(parent)) { - anim.end = lv_obj_get_height(parent) - lv_obj_get_height(label) - lv_font_get_height(font); - anim.fp = (lv_anim_fp_t)lv_obj_set_y; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); - lv_anim_create(&anim); - } -#endif - } } /*In roll mode keep the size but start offset animations*/ else if(ext->long_mode == LV_LABEL_LONG_ROLL) { @@ -911,6 +894,45 @@ static void lv_label_refr_text(lv_obj_t * label) ext->offset.y = 0; } #endif + } + /*In roll inf. mode keep the size but start offset animations*/ + else if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { + #if LV_USE_ANIMATION + lv_anim_t anim; + anim.var = label; + anim.repeat = 1; + anim.playback = 0; + anim.start = 0; + anim.act_time = 0; + anim.end_cb = NULL; + anim.path = lv_anim_path_linear; + anim.playback_pause = 0; + anim.repeat_pause = 0; + + bool hor_anim = false; + if(size.x > lv_obj_get_width(label)) { + anim.end = - size.x - lv_font_get_width(font, ' ') * ANIM_WAIT_CHAR_COUNT; + anim.fp = (lv_anim_fp_t) lv_label_set_offset_x; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + lv_anim_create(&anim); + hor_anim = true; + } else { + /*Delete the offset animation if not required*/ + lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_x); + ext->offset.x = 0; + } + + if(size.y > lv_obj_get_height(label) && hor_anim == false) { + anim.end = - size.y - (lv_font_get_height(font)); + anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + lv_anim_create(&anim); + } else { + /*Delete the offset animation if not required*/ + lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_y); + ext->offset.y = 0; + } + #endif } else if(ext->long_mode == LV_LABEL_LONG_DOT) { if(size.y <= lv_obj_get_height(label)) { /*No dots are required, the text is short enough*/ ext->dot_end = LV_LABEL_DOT_END_INV; diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index d1f10ae55b3f..63a4c78d6d3d 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -41,9 +41,9 @@ enum { LV_LABEL_LONG_EXPAND, /*Expand the object size to the text size*/ LV_LABEL_LONG_BREAK, /*Keep the object width, break the too long lines and expand the object height*/ - LV_LABEL_LONG_SCROLL, /*Expand the object size and scroll the text on the parent (move the label object)*/ LV_LABEL_LONG_DOT, /*Keep the size and write dots at the end if the text is too long*/ - LV_LABEL_LONG_ROLL, /*Keep the size and roll the text infinitely*/ + LV_LABEL_LONG_ROLL, /*Keep the size and roll the text back and forth*/ + LV_LABEL_LONG_ROLL_CIRC,/*Keep the size and roll the text circularly*/ LV_LABEL_LONG_CROP, /*Keep the size and crop the text out of it*/ }; typedef uint8_t lv_label_long_mode_t; diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index abdb02526474..14110488dbde 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -217,7 +217,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_obj_t * label = lv_label_create(liste, NULL); lv_label_set_text(label, txt); lv_obj_set_click(label, false); - lv_label_set_long_mode(label, LV_LABEL_LONG_ROLL); + lv_label_set_long_mode(label, LV_LABEL_LONG_ROLL_CIRC); lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - btn_hor_pad); if(label_signal == NULL) label_signal = lv_obj_get_signal_func(label); } From 84ace677205b85d03318deee4acaef34e0b45305 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 2 Apr 2019 12:15:35 +0200 Subject: [PATCH 226/590] move INDEV settings from lv_conf.h to the indev driver --- src/lv_conf_checker.h | 12 +-- src/lv_core/lv_disp.c | 7 +- src/lv_core/lv_disp.h | 4 +- src/lv_core/lv_indev.c | 151 +++++++++++++++++++------------------- src/lv_core/lv_indev.h | 14 ++++ src/lv_core/lv_refr.c | 2 +- src/lv_hal/lv_hal_disp.c | 16 +++- src/lv_hal/lv_hal_disp.h | 10 +++ src/lv_hal/lv_hal_indev.c | 27 ++++--- src/lv_hal/lv_hal_indev.h | 32 ++++++-- src/lv_misc/lv_anim.c | 2 +- src/lv_objx/lv_sw.c | 2 +- src/lv_objx/lv_tabview.c | 6 +- src/lv_objx/lv_tileview.c | 12 +-- 14 files changed, 183 insertions(+), 114 deletions(-) diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 13b9cc252b6d..33297a3f8c07 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -40,7 +40,7 @@ /*Default screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ #ifndef LV_REFR_PERIOD -#define LV_REFR_PERIOD 30 /*[ms]*/ +#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ #endif /* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide @@ -106,22 +106,22 @@ /*Input device settings*/ #ifndef LV_INDEV_READ_PERIOD -#define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ +#define LV_INDEV_DEF_READ_PERIOD 30 /*Input device read period in milliseconds*/ #endif #ifndef LV_INDEV_POINT_MARKER #define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ #endif #ifndef LV_INDEV_DRAG_LIMIT -#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ +#define LV_INDEV_DEF_DRAG_LIMIT 10 /*Drag threshold in pixels */ #endif #ifndef LV_INDEV_DRAG_THROW -#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ +#define LV_INDEV_DEF_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ #endif #ifndef LV_INDEV_LONG_PRESS_TIME -#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ +#define LV_INDEV_DEF_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ #endif #ifndef LV_INDEV_LONG_PRESS_REP_TIME -#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ +#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ #endif /*Text settings*/ diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index b32323f9af19..0a1e62049199 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -113,17 +113,16 @@ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) } /** - * Get the a pointer to the screen refresher task. - * It's parameters can be modified with `lv_task_...` functions, + * Get a pointer to the screen refresher task to + * modify its parameters with `lv_task_...` functions. * @param disp pointer to a display * @return pointer to the display refresher task. (NULL on error) */ lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) { - if(!disp) disp = lv_disp_get_default(); if(!disp) { - LV_LOG_WARN("lv_disp_get_refr_task: no display registered to get its top layer"); + LV_LOG_WARN("lv_disp_get_refr_task: no display registered"); return NULL; } diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index 4ca104c20752..e47587f201ba 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -63,8 +63,8 @@ lv_obj_t * lv_disp_get_layer_sys(lv_disp_t * disp); void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); /** - * Get the a pointer to the screen refresher task. - * It's parameters can be modified with `lv_task_...` functions, + * Get a pointer to the screen refresher task to + * modify its parameters with `lv_task_...` functions. * @param disp pointer to a display * @return pointer to the display refresher task. (NULL on error) */ diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 551a79c02c0c..8044b5a2ef36 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -20,7 +20,7 @@ * DEFINES *********************/ -#if LV_INDEV_DRAG_THROW <= 0 +#if LV_INDEV_DEF_DRAG_THROW <= 0 #warning "LV_INDEV_DRAG_THROW must be greater than 0" #endif @@ -32,8 +32,6 @@ * STATIC PROTOTYPES **********************/ -#if LV_INDEV_READ_PERIOD != 0 -static void indev_proc_task(void * param); static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data); static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data); static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data); @@ -44,7 +42,6 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev); static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj); static void indev_drag(lv_indev_proc_t * state); static void indev_drag_throw(lv_indev_proc_t * proc); -#endif /********************** * STATIC VARIABLES @@ -64,13 +61,61 @@ static lv_indev_t * indev_act; */ void lv_indev_init(void) { -#if LV_INDEV_READ_PERIOD != 0 - lv_task_create(indev_proc_task, LV_INDEV_READ_PERIOD, LV_TASK_PRIO_MID, NULL); -#endif - lv_indev_reset(NULL); /*Reset all input devices*/ } +/** + * Called periodically to read the input devices + * @param param pointer to and input device to read + */ +void lv_indev_read_task(void * param) +{ + LV_LOG_TRACE("indev read task started"); + + lv_indev_data_t data; + + indev_act = param; + + /*Read and process all indevs*/ + if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/ + + /*Handle reset query before processing the point*/ + indev_proc_reset_query_handler(indev_act); + + if(indev_act->proc.disabled) return; + bool more_to_read; + do { + /*Read the data*/ + more_to_read = lv_indev_read(indev_act, &data); + + /*The active object might deleted even in the read function*/ + indev_proc_reset_query_handler(indev_act); + + indev_act->proc.state = data.state; + + if(indev_act->proc.state == LV_INDEV_STATE_PR) { + indev_act->last_activity_time = lv_tick_get(); + } + if(indev_act->driver.type == LV_INDEV_TYPE_POINTER) { + indev_pointer_proc(indev_act, &data); + } else if(indev_act->driver.type == LV_INDEV_TYPE_KEYPAD) { + indev_keypad_proc(indev_act, &data); + } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER) { + indev_encoder_proc(indev_act, &data); + } else if(indev_act->driver.type == LV_INDEV_TYPE_BUTTON) { + indev_button_proc(indev_act, &data); + } + /*Handle reset query if it happened in during processing*/ + indev_proc_reset_query_handler(indev_act); + } while(more_to_read); + + /*End of indev processing, so no act indev*/ + indev_act = NULL; + + LV_LOG_TRACE("indev read task finished"); +} + + /** * Get the currently processed input device. Can be used in action functions too. * @return pointer to the currently processed input device or NULL if no input device processing right now @@ -178,7 +223,7 @@ void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) */ void lv_indev_set_feedback(lv_indev_t *indev, lv_indev_feedback_t feedback) { - indev->feedback = feedback; + indev->feedback = feedback; } /** @@ -272,7 +317,7 @@ uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev) */ lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev) { - return indev->feedback; + return indev->feedback; } /** @@ -284,66 +329,25 @@ void lv_indev_wait_release(lv_indev_t * indev) indev->proc.wait_until_release = 1; } -/********************** - * STATIC FUNCTIONS - **********************/ - -#if LV_INDEV_READ_PERIOD != 0 /** - * Called periodically to handle the input devices - * @param param unused + * Get a pointer to the indev read task to + * modify its parameters with `lv_task_...` functions. + * @param indev pointer to an input device + * @return pointer to the indev read refresher task. (NULL on error) */ -static void indev_proc_task(void * param) +lv_task_t * lv_indev_get_read_task(lv_disp_t * indev) { - (void)param; - - - LV_LOG_TRACE("indev task started"); - - lv_indev_data_t data; - lv_indev_t * i; - i = lv_indev_next(NULL); - - /*Read and process all indevs*/ - while(i) { - if(i->driver.disp == NULL) continue; /*Not assigned to any displays*/ - indev_act = i; - - /*Handle reset query before processing the point*/ - indev_proc_reset_query_handler(i); - - if(i->proc.disabled == 0) { - bool more_to_read; - do { - /*Read the data*/ - more_to_read = lv_indev_read(i, &data); - indev_proc_reset_query_handler(i); /*The active object might deleted even in the read function*/ - i->proc.state = data.state; - - if(i->proc.state == LV_INDEV_STATE_PR) { - i->last_activity_time = lv_tick_get(); - } - if(i->driver.type == LV_INDEV_TYPE_POINTER) { - indev_pointer_proc(i, &data); - } else if(i->driver.type == LV_INDEV_TYPE_KEYPAD) { - indev_keypad_proc(i, &data); - } else if(i->driver.type == LV_INDEV_TYPE_ENCODER) { - indev_encoder_proc(i, &data); - } else if(i->driver.type == LV_INDEV_TYPE_BUTTON) { - indev_button_proc(i, &data); - } - /*Handle reset query if it happened in during processing*/ - indev_proc_reset_query_handler(i); - } while(more_to_read); - } - i = lv_indev_next(i); /*Go to the next indev*/ + if(!indev) { + LV_LOG_WARN("lv_indev_get_read_task: indev was NULL"); + return NULL; } - indev_act = NULL; /*End of indev processing, so no act indev*/ - - LV_LOG_TRACE("indev task finished"); + return indev->refr_task; } +/********************** + * STATIC FUNCTIONS + **********************/ /** * Process a new point from LV_INDEV_TYPE_POINTER input device @@ -355,7 +359,7 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) /*Move the cursor if set and moved*/ if(i->cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || - i->proc.types.pointer.last_point.y != data->point.y)) { + i->proc.types.pointer.last_point.y != data->point.y)) { lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } @@ -444,7 +448,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) { /*Long press time has elapsed?*/ - if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { i->proc.long_pr_sent = 1; if(data->key == LV_GROUP_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); @@ -455,7 +459,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Long press repeated time has elapsed?*/ - else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver.long_press_rep_time) { i->proc.longpr_rep_timestamp = lv_tick_get(); @@ -583,7 +587,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) + lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -800,7 +804,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is no drag then check for long press time*/ if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ - if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) { + if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); @@ -816,7 +820,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send long press repeated signal*/ if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 1) { /*Send a signal about the long press repeate if enough time elapsed*/ - if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) { + if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); @@ -1030,8 +1034,8 @@ static void indev_drag(lv_indev_proc_t * state) /*Enough move?*/ if(state->types.pointer.drag_limit_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ - if(LV_MATH_ABS(state->types.pointer.drag_sum.x) >= LV_INDEV_DRAG_LIMIT || - LV_MATH_ABS(state->types.pointer.drag_sum.y) >= LV_INDEV_DRAG_LIMIT) { + if(LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit || + LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit) { state->types.pointer.drag_limit_out = 1; } } @@ -1108,8 +1112,8 @@ static void indev_drag_throw(lv_indev_proc_t * proc) } /*Reduce the vectors*/ - proc->types.pointer.drag_throw_vect.x = proc->types.pointer.drag_throw_vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; - proc->types.pointer.drag_throw_vect.y = proc->types.pointer.drag_throw_vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; + proc->types.pointer.drag_throw_vect.x = proc->types.pointer.drag_throw_vect.x * (100 - indev_act->driver.drag_throw) / 100; + proc->types.pointer.drag_throw_vect.y = proc->types.pointer.drag_throw_vect.y * (100 - indev_act->driver.drag_throw) / 100; if(proc->types.pointer.drag_throw_vect.x != 0 || proc->types.pointer.drag_throw_vect.y != 0) { @@ -1144,4 +1148,3 @@ static void indev_drag_throw(lv_indev_proc_t * proc) } } -#endif diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index edf1c1afd588..4155cf151a0f 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -34,6 +34,12 @@ extern "C" { */ void lv_indev_init(void); +/** + * Called periodically to read the input devices + * @param param pointer to and input device to read + */ +void lv_indev_read_task(void * param); + /** * Get the currently processed input device. Can be used in action functions too. * @return pointer to the currently processed input device or NULL if no input device processing right now @@ -145,6 +151,14 @@ lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev); */ void lv_indev_wait_release(lv_indev_t * indev); +/** + * Get a pointer to the indev read task to + * modify its parameters with `lv_task_...` functions. + * @param indev pointer to an inout device + * @return pointer to the indev read refresher task. (NULL on error) + */ +lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); + /********************** * MACROS **********************/ diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 07c3a12f2dc6..8e16253bb1be 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -292,7 +292,7 @@ static void lv_refr_area(const lv_area_t * area_p) lv_coord_t y_tmp = max_row - 1; do { tmp.y2 = y_tmp; - disp_refr->driver.rounder_cb(&tmp); + disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp); /*If this height fits into `max_row` then fine*/ if(lv_area_get_height(&tmp) <= max_row) break; diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 715a288f4b34..6115cc9ec61d 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -138,7 +138,7 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) disp_def = disp_def_tmp; /*Revert the default display*/ /*Create a refresh task*/ - disp->refr_task = lv_task_create(lv_disp_refr_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, disp); + disp->refr_task = lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp); lv_mem_assert(disp->refr_task); if(disp->refr_task == NULL) return NULL; @@ -248,6 +248,20 @@ bool lv_disp_get_antialiasing(lv_disp_t * disp) #endif } + +/** + * Get the elapsed time since the last activity on a display. + * @param disp pointer to a display. + * @return the elapsed time since the last activity + */ +uint32_t lv_disp_get_inactive_time(lv_disp_t * disp) +{ + if(disp == NULL) disp = lv_disp_get_default(); + if(disp == NULL) return 0; + + return disp->last_activity; +} + /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 3bd091959fee..be74561ab9ab 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -129,6 +129,9 @@ typedef struct _disp_t { lv_area_t inv_areas[LV_INV_BUF_SIZE]; uint8_t inv_area_joined[LV_INV_BUF_SIZE]; uint32_t inv_p :10; + + /*Miscellaneous data*/ + uint32_t last_activity; } lv_disp_t; /********************** @@ -208,6 +211,13 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); */ bool lv_disp_get_antialiasing(lv_disp_t * disp); +/** + * Get the elapsed time since the last activity on a display. + * @param disp pointer to a display. + * @return the elapsed time since the last activity + */ +uint32_t lv_disp_get_inactive_time(lv_disp_t * disp); + /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_hal/lv_hal_indev.c b/src/lv_hal/lv_hal_indev.c index 3f7b27a16842..ca4b5d70c902 100644 --- a/src/lv_hal/lv_hal_indev.c +++ b/src/lv_hal/lv_hal_indev.c @@ -9,6 +9,7 @@ * INCLUDES *********************/ #include "../lv_hal/lv_hal_indev.h" +#include "../lv_core/lv_indev.h" #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_gc.h" #include "lv_hal_disp.h" @@ -53,6 +54,10 @@ void lv_indev_drv_init(lv_indev_drv_t * driver) memset(driver, 0, sizeof(lv_indev_drv_t)); driver->type = LV_INDEV_TYPE_NONE; + driver->drag_limit = LV_INDEV_DEF_DRAG_LIMIT; + driver->drag_throw = LV_INDEV_DEF_DRAG_THROW; + driver->long_press_time = LV_INDEV_DEF_LONG_PRESS_TIME; + driver->long_press_rep_time = LV_INDEV_DEF_LONG_PRESS_REP_TIME; } /** @@ -70,21 +75,23 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) return NULL; } - lv_indev_t * node = lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll)); - if(!node) { - lv_mem_assert(node); + lv_indev_t * indev = lv_ll_ins_head(&LV_GC_ROOT(_lv_indev_ll)); + if(!indev) { + lv_mem_assert(indev); return NULL; } - memset(node, 0, sizeof(lv_indev_t)); - memcpy(&node->driver, driver, sizeof(lv_indev_drv_t)); + memset(indev, 0, sizeof(lv_indev_t)); + memcpy(&indev->driver, driver, sizeof(lv_indev_drv_t)); - node->proc.reset_query = 1; - node->cursor = NULL; - node->group = NULL; - node->btn_points = NULL; + indev->proc.reset_query = 1; + indev->cursor = NULL; + indev->group = NULL; + indev->btn_points = NULL; - return node; + indev->driver.read_task = lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev); + + return indev; } /** diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index 10a32d2838ca..960db9644209 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -24,6 +24,7 @@ extern "C" { #include #include #include "../lv_misc/lv_area.h" +#include "../lv_misc/lv_task.h" /********************* * DEFINES @@ -68,17 +69,38 @@ typedef struct { /*Initialized by the user and registered by 'lv_indev_add()'*/ typedef struct _lv_indev_drv_t { - lv_indev_type_t type; /*Input device type*/ - bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ + + /*Input device type*/ + lv_indev_type_t type; + + /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ + bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); #if LV_USE_USER_DATA_MULTI - lv_indev_drv_user_data_t read_user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/ + lv_indev_drv_user_data_t read_user_data; #endif #if LV_USE_USER_DATA_SINGLE lv_indev_drv_user_data_t user_data; #endif - struct _disp_t * disp; /*Pointer to the assigned display*/ + + /*Pointer to the assigned display*/ + struct _disp_t * disp; + + /*Task to read the periodically read the input device*/ + lv_task_t * read_task; + + /*Number of pixels to slide before actually drag the object*/ + uint8_t drag_limit; + + /*Drag throw slow-down in [%]. Greater value means faster slow-down */ + uint8_t drag_throw; + + /*Long press time in milliseconds*/ + uint16_t long_press_time; + + /*Repeated trigger period in long press [ms] */ + uint16_t long_press_rep_time; } lv_indev_drv_t; @@ -90,7 +112,7 @@ typedef struct _lv_indev_proc_t { lv_point_t act_point; lv_point_t last_point; lv_point_t vect; - lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/ + lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DEF_DRAG_LIMIT*/ lv_point_t drag_throw_vect; struct _lv_obj_t * act_obj; /*The object being pressed*/ struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and other post-release event)*/ diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index c18c1a8667cc..7026330c4f60 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -58,7 +58,7 @@ void lv_anim_init(void) { lv_ll_init(&LV_GC_ROOT(_lv_anim_ll), sizeof(lv_anim_t)); last_task_run = lv_tick_get(); - lv_task_create(anim_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, NULL); + lv_task_create(anim_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, NULL); } /** diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 39445cd72270..902aa09a8397 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -307,7 +307,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(indev) { lv_point_t p = {0,0}; lv_indev_get_point(indev, &p); - if(LV_MATH_ABS(p.x - ext->start_x) > LV_INDEV_DRAG_LIMIT) ext->slided = 1; + if(LV_MATH_ABS(p.x - ext->start_x) > LV_INDEV_DEF_DRAG_LIMIT) ext->slided = 1; } /*If didn't slide then revert the min/max value. So click without slide won't move the switch as a slider*/ diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index ac496a3eb835..0c5762836fcf 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -735,7 +735,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_coord_t y_diff = point_act.y - ext->point_last.y; - if(!ext->scroll_ver && (x_diff >= LV_INDEV_DRAG_LIMIT || x_diff <= -LV_INDEV_DRAG_LIMIT)) { + if(!ext->scroll_ver && (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) { ext->draging = 1; /*Check if the page is on the edge */ if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || @@ -750,7 +750,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) } else if(ext->drag_hor == 0) { ext->drag_hor = 0; } - } else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) { + } else if(y_diff >= LV_INDEV_DEF_DRAG_LIMIT || y_diff <= -LV_INDEV_DEF_DRAG_LIMIT) { ext->drag_hor = 0; ext->draging = 1; ext->scroll_ver = 1; @@ -795,7 +795,7 @@ static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage) while(vect.x != 0) { x_predict += vect.x; - vect.x = vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; + vect.x = vect.x * (100 - LV_INDEV_DEF_DRAG_THROW) / 100; } lv_coord_t page_x1 = tabpage->coords.x1 - tabview->coords.x1 + x_predict; diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index ee44c9bb7e59..ddd8529e3a3f 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -361,14 +361,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void /*Set horizontal drag constraint if no vertical constraint an dragged to valid x direction */ if(ext->drag_ver == 0 && - ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DRAG_LIMIT) || - (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DRAG_LIMIT))) { + ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_hor = 1; } /*Set vertical drag constraint if no horizontal constraint an dragged to valid y direction */ if(ext->drag_hor == 0 && - ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DRAG_LIMIT) || - (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DRAG_LIMIT))) { + ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_ver = 1; } @@ -493,7 +493,7 @@ static void drag_end_handler(lv_obj_t * tileview) while(vect.x != 0) { predict += vect.x; - vect.x = vect.x * (100 - LV_INDEV_DRAG_THROW) / 100; + vect.x = vect.x * (100 - LV_INDEV_DEF_DRAG_THROW) / 100; } p.x -= predict; @@ -505,7 +505,7 @@ static void drag_end_handler(lv_obj_t * tileview) while(vect.y != 0) { predict += vect.y; - vect.y = vect.y * (100 - LV_INDEV_DRAG_THROW) / 100; + vect.y = vect.y * (100 - LV_INDEV_DEF_DRAG_THROW) / 100; } p.y -= predict; From 08722f5f8dd9c850978f009bf58a61530e812c0a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 2 Apr 2019 12:16:15 +0200 Subject: [PATCH 227/590] fix compile error --- src/lv_core/lv_refr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 07c3a12f2dc6..8e16253bb1be 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -292,7 +292,7 @@ static void lv_refr_area(const lv_area_t * area_p) lv_coord_t y_tmp = max_row - 1; do { tmp.y2 = y_tmp; - disp_refr->driver.rounder_cb(&tmp); + disp_refr->driver.rounder_cb(&disp_refr->driver, &tmp); /*If this height fits into `max_row` then fine*/ if(lv_area_get_height(&tmp) <= max_row) break; From 75f5849a7323fcd332446ef77f815d08c29bc166 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Tue, 2 Apr 2019 09:12:00 -0700 Subject: [PATCH 228/590] Few comment corrections --- README.md | 2 +- src/lv_core/lv_group.h | 2 +- src/lv_hal/lv_hal_disp.h | 2 +- src/lv_objx/lv_roller.h | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7d19c9997e0..86c0e0adbafd 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ In the most simple case you need to do these steps: ```c static lv_disp_buf_t disp_buf; static lv_color_t buf[LV_HOR_RES_MAX * 10]; /*Declare a buffer for 10 lines*/ -v_disp_buf_init(&disp_buf1, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/ +lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/ ``` 4. Implement and register a function which can **copy a pixel array** to an area of your diplay: ```c diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 7878d368843e..77779fc6e964 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -69,7 +69,7 @@ typedef struct _lv_group_t uint8_t frozen :1; /*1: can't focus to new object*/ uint8_t editing :1; /*1: Edit mode, 0: Navigate mode*/ uint8_t click_focus :1; /*1: If an object in a group is clicked by an indev then it will be focused */ - uint8_t refocus_policy :1; /*1: Focus prev if focused on deletion. 0: Focus prev if focused on deletion.*/ + uint8_t refocus_policy :1; /*1: Focus prev if focused on deletion. 0: Focus next if focused on deletion.*/ uint8_t wrap :1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end of list.*/ } lv_group_t; diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 3bd091959fee..59aae676537d 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -73,7 +73,7 @@ typedef struct _disp_drv_t { #endif uint32_t rotated :1; /*1: turn the display by 90 degree.*/ - /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished */ + /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_disp_flush_ready()' has to be called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index 065544d01c24..d6d751a0128d 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -70,6 +70,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy); * Set the options on a roller * @param roller pointer to roller object * @param options a string with '\n' separated options. E.g. "One\nTwo\nThree" + * @param inf True: Loop through the options */ void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf); From 1d986e13df0468d4d90cdc0d3fd770b2dcf083d1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 3 Apr 2019 15:47:36 +0200 Subject: [PATCH 229/590] lv_btnm, lv_kb: replace 'const char ** x' with const char * x[] --- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_btnm.h | 2 +- src/lv_objx/lv_kb.h | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 82796811b0f5..b39f741baca8 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -141,7 +141,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map) +void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) { if(map == NULL) return; diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index edadc03c7dcb..a49a7f240d3b 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -96,7 +96,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map); +void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]); /** * Set the button control map (hidden, disabled etc.) for a button matrix. The diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 63e49714986e..1d4c93f7971f 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -110,11 +110,24 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); * @param map pointer to a string array to describe the map. * See 'lv_btnm_set_map()' for more info. */ -static inline void lv_kb_set_map(lv_obj_t *kb, const char ** map) +static inline void lv_kb_set_map(lv_obj_t *kb, const char * map[]) { lv_btnm_set_map(kb, map); } +/** + * Set the button control map (hidden, disabled etc.) for the keyboard. The + * control map array will be copied and so may be deallocated after this + * function returns. + * @param kb pointer to a keyboard object + * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. + * See: `lv_btnm_set_ctrl_map` for more details. + */ +static inline void lv_kb_set_ctrl_map(lv_obj_t *kb, const lv_btnm_ctrl_t * ctrl_map) +{ + lv_btnm_set_ctrl_map(kb, ctrl_map); +} + /** * Set a style of a keyboard * @param kb pointer to a keyboard object From 787dd591c159e0c4202b538fcffe97f6df691c25 Mon Sep 17 00:00:00 2001 From: melnse Date: Wed, 3 Apr 2019 19:34:58 +0300 Subject: [PATCH 230/590] Realization of extended clickable area. Suitable for small lonely objects, which must be clicked. For activation add "#define USE_LV_EXTENDED_CLICK_AREA 1" to lv_conf.h --- src/lv_core/lv_indev.c | 6 +++- src/lv_core/lv_obj.c | 73 ++++++++++++++++++++++++++++++++++++++++++ src/lv_core/lv_obj.h | 23 +++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 551a79c02c0c..c45fab75cecd 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -976,7 +976,11 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) /*If the point is on this object*/ /*Check its children too*/ - if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { +#if USE_LV_EXTENDED_CLICK_AREA + if(lv_area_is_point_on(&obj->ext_coords, &proc->act_point)) { +#else + if(lv_area_is_point_on(&obj->coords, &proc->act_point)) { +#endif lv_obj_t * i; LV_LL_READ(obj->child_ll, i) { diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index df3f80156ab0..aade84c41e39 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -55,6 +55,20 @@ static const void * event_act_data; /*Stores the data passed to the ev /********************** * MACROS **********************/ +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Update coordinates of extended clickable area from object's coordinates and ext_paddings + * @param coords coordinates of an object + * @param ext_coords extended coordinates, which will be updated + * @param paddings paddings of extended clickable area + */ +#define UPDATE_EXT_COORDS(coords, ext_coords, paddings) do{\ + ext_coords.x1 = paddings.x1 > coords.x1 ? 0 : coords.x1 - paddings.x1; \ + ext_coords.x2 = coords.x2 + paddings.x2; \ + ext_coords.y1 = paddings.y1 > coords.y1 ? 0 : coords.y1 - paddings.y1; \ + ext_coords.y2 = coords.y2 + paddings.y2; \ + } while(0) +#endif /********************** * GLOBAL FUNCTIONS @@ -147,6 +161,13 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; new_obj->ext_size = 0; +#if USE_LV_EXTENDED_CLICK_AREA + lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); + new_obj->ext_paddings.x1 = 0; + new_obj->ext_paddings.x2 = 0; + new_obj->ext_paddings.y1 = 0; + new_obj->ext_paddings.y2 = 0; +#endif /*Init realign*/ #if LV_OBJ_REALIGN new_obj->realign.align = LV_ALIGN_CENTER; @@ -218,6 +239,13 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) LV_OBJ_DEF_HEIGHT; new_obj->ext_size = 0; +#if USE_LV_EXTENDED_CLICK_AREA + lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); + new_obj->ext_paddings.x1 = 0; + new_obj->ext_paddings.x2 = 0; + new_obj->ext_paddings.y1 = 0; + new_obj->ext_paddings.y2 = 0; +#endif /*Init realign*/ #if LV_OBJ_REALIGN new_obj->realign.align = LV_ALIGN_CENTER; @@ -273,6 +301,11 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_area_copy(&new_obj->coords, ©->coords); new_obj->ext_size = copy->ext_size; +#if USE_LV_EXTENDED_CLICK_AREA + lv_area_copy(&new_obj->ext_coords, ©->ext_coords); + lv_area_copy(&new_obj->ext_paddings, ©->ext_paddings); +#endif + /*Set free data*/ #if LV_USE_USER_DATA_SINGLE memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); @@ -559,6 +592,10 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) obj->coords.x2 += diff.x; obj->coords.y2 += diff.y; +#if USE_LV_EXTENDED_CLICK_AREA + UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); +#endif + refresh_children_position(obj, diff.x, diff.y); /*Inform the object about its new coordinates*/ @@ -620,6 +657,9 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) obj->coords.x2 = obj->coords.x1 + w - 1; obj->coords.y2 = obj->coords.y1 + h - 1; +#if USE_LV_EXTENDED_CLICK_AREA + UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); +#endif /*Send a signal to the object with its new coordinates*/ obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori); @@ -643,6 +683,24 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) #endif } +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param w extended width to both sides + * @param h extended height to both sides + */ +void lv_obj_set_ext_paddinds(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) +{ + obj->ext_paddings.x1 = w; + obj->ext_paddings.x2 = w; + obj->ext_paddings.y1 = h; + obj->ext_paddings.y2 = h; + + UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); +} +#endif + /** * Set the width of an object * @param obj pointer to an object @@ -1571,6 +1629,18 @@ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) return lv_obj_get_width(obj) - style->body.padding.top - style->body.padding.bottom; } + +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Copy the extended clickable area size of an object to an area + * @param obj pointer to an object + * @param cords_p pointer to an area to store the size + */ +void lv_obj_get_ext_paddings(const lv_obj_t * obj, lv_area_t * cords_p) +{ + lv_area_copy(cords_p, &obj->ext_paddings); +} + /** * Get the extended size attribute of an object * @param obj pointer to an object @@ -1971,6 +2041,9 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor i->coords.x2 += x_diff; i->coords.y2 += y_diff; +#if USE_LV_EXTENDED_CLICK_AREA + UPDATE_EXT_COORDS(i->coords, i->ext_coords, i->ext_paddings); +#endif refresh_children_position(i, x_diff, y_diff); } } diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index febd01a16196..417b98817d79 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -176,6 +176,10 @@ typedef struct _lv_obj_t lv_ll_t child_ll; /*Linked list to store the children objects*/ lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ +#if USE_LV_EXTENDED_CLICK_AREA + lv_area_t ext_coords; + lv_area_t ext_paddings; +#endif lv_event_cb_t event_cb; lv_signal_cb_t signal_cb; /*Object type specific signal function*/ @@ -337,6 +341,16 @@ void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y); */ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param w extended width to both sides + * @param h extended height to both sides + */ +void lv_obj_set_ext_paddinds(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); +#endif + /** * Set the width of an object * @param obj pointer to an object @@ -673,6 +687,15 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj); */ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Copy the extended clickable area size of an object to an area + * @param obj pointer to an object + * @param cords_p pointer to an area to store the size + */ +void lv_obj_get_ext_paddings(const lv_obj_t * obj, lv_area_t * cords_p); +#endif + /** * Get the extended size attribute of an object * @param obj pointer to an object From 6e047e6d27280b32c760ec438f141d8feff87ec1 Mon Sep 17 00:00:00 2001 From: melnse Date: Wed, 3 Apr 2019 20:09:33 +0300 Subject: [PATCH 231/590] Fixed typos, changed macro to static function. --- src/lv_core/lv_obj.c | 43 ++++++++++++++++++++++++------------------- src/lv_core/lv_obj.h | 2 +- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index aade84c41e39..bbd7697005e6 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -44,6 +44,9 @@ static void refresh_children_style(lv_obj_t * obj); static void delete_children(lv_obj_t * obj); static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); +#if USE_LV_EXTENDED_CLICK_AREA +static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, lv_area_t *paddings); +#endif /********************** * STATIC VARIABLES @@ -55,20 +58,6 @@ static const void * event_act_data; /*Stores the data passed to the ev /********************** * MACROS **********************/ -#if USE_LV_EXTENDED_CLICK_AREA -/** - * Update coordinates of extended clickable area from object's coordinates and ext_paddings - * @param coords coordinates of an object - * @param ext_coords extended coordinates, which will be updated - * @param paddings paddings of extended clickable area - */ -#define UPDATE_EXT_COORDS(coords, ext_coords, paddings) do{\ - ext_coords.x1 = paddings.x1 > coords.x1 ? 0 : coords.x1 - paddings.x1; \ - ext_coords.x2 = coords.x2 + paddings.x2; \ - ext_coords.y1 = paddings.y1 > coords.y1 ? 0 : coords.y1 - paddings.y1; \ - ext_coords.y2 = coords.y2 + paddings.y2; \ - } while(0) -#endif /********************** * GLOBAL FUNCTIONS @@ -593,7 +582,7 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) obj->coords.y2 += diff.y; #if USE_LV_EXTENDED_CLICK_AREA - UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); + update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); #endif refresh_children_position(obj, diff.x, diff.y); @@ -658,7 +647,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) obj->coords.y2 = obj->coords.y1 + h - 1; #if USE_LV_EXTENDED_CLICK_AREA - UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); + update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); #endif /*Send a signal to the object with its new coordinates*/ @@ -690,14 +679,14 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) * @param w extended width to both sides * @param h extended height to both sides */ -void lv_obj_set_ext_paddinds(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) +void lv_obj_set_ext_paddings(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) { obj->ext_paddings.x1 = w; obj->ext_paddings.x2 = w; obj->ext_paddings.y1 = h; obj->ext_paddings.y2 = h; - UPDATE_EXT_COORDS(obj->coords, obj->ext_coords, obj->ext_paddings); + update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); } #endif @@ -2042,7 +2031,7 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor i->coords.y2 += y_diff; #if USE_LV_EXTENDED_CLICK_AREA - UPDATE_EXT_COORDS(i->coords, i->ext_coords, i->ext_paddings); + update_ext_coords(&(i->coords), &(i->ext_coords), &(i->ext_paddings)); #endif refresh_children_position(i, x_diff, y_diff); } @@ -2154,3 +2143,19 @@ static void delete_children(lv_obj_t * obj) lv_mem_free(obj); /*Free the object itself*/ } + +#if USE_LV_EXTENDED_CLICK_AREA +/** + * Update coordinates of extended clickable area from object's coordinates and ext_paddings + * @param coords coordinates of an object + * @param ext_coords extended coordinates, which will be updated + * @param paddings paddings of extended clickable area + */ +static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, lv_area_t *paddings) +{ + ext_coords->x1 = paddings->x1 > coords->x1 ? 0 : coords->x1 - paddings->x1; + ext_coords->x2 = coords->x2 + paddings->x2; + ext_coords->y1 = paddings->y1 > coords->y1 ? 0 : coords->y1 - paddings->y1; + ext_coords->y2 = coords->y2 + paddings->y2; +} +#endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 417b98817d79..2f96c919a842 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -348,7 +348,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); * @param w extended width to both sides * @param h extended height to both sides */ -void lv_obj_set_ext_paddinds(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); +void lv_obj_set_ext_paddings(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); #endif /** From aec671dc67820a5e5e0cd948e1ede78156873d4f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 05:09:29 +0200 Subject: [PATCH 232/590] lv_list: don't sent CLICK event if dragged. fix #997 --- src/lv_objx/lv_list.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 14110488dbde..a6f17c11fba1 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -759,19 +759,20 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) lv_list_ext_t * ext = lv_obj_get_ext_attr(list); if(btn) { + bool drag = lv_indev_is_dragging(lv_indev_get_act()); if(sign == LV_SIGNAL_PRESSED) { lv_event_send(btn, LV_EVENT_PRESSED, NULL); } else if(sign == LV_SIGNAL_PRESSING) { lv_event_send(btn, LV_EVENT_PRESSING, NULL); } - else if(sign == LV_SIGNAL_LONG_PRESS) { + else if(sign == LV_SIGNAL_LONG_PRESS && !drag) { lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); } - else if(sign == LV_SIGNAL_LONG_PRESS_REP) { + else if(sign == LV_SIGNAL_LONG_PRESS_REP && !drag) { lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); } - else if(sign == LV_SIGNAL_RELEASED) { + else if(sign == LV_SIGNAL_RELEASED && !drag) { ext->last_sel = btn; if(indev->proc.long_pr_sent == 0) lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); if(lv_indev_is_dragging(indev) == false) lv_event_send(btn, LV_EVENT_CLICKED, NULL); From 889c21b6397f77465eba2bcfe144666107a812e1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:06:24 +0200 Subject: [PATCH 233/590] update lv_Conf_templ.h --- lv_conf_template.h | 470 ++++++++++++++++++++++++++------------------- 1 file changed, 274 insertions(+), 196 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 3227bb42c4a7..31bdbd9145a6 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -4,51 +4,76 @@ */ /* - * COPY THIS FILE AS lv_conf.h + * COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER */ #if 0 /*Set it to "1" to enable content*/ - #ifndef LV_CONF_H #define LV_CONF_H -/*=================== +/*==================== Graphical settings - *===================*/ + *====================*/ -/* Horizontal and vertical resolution of the library.*/ +/* Maximal horizontal and vertical resolution to support by the library.*/ #define LV_HOR_RES_MAX (480) #define LV_VER_RES_MAX (320) -/*Color settings*/ -#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ -#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ -#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ -#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ +/* Color depth: + * - 1: 1 byte per pixel + * - 8: RGB233 + * - 16: RGB565 + * - 32: ARGB8888 + */ +#define LV_COLOR_DEPTH 16 + +/* Swap the 2 bytes of RGB565 color. + * Useful if the display has a 8 bit interface (e.g. SPI)*/ +#define LV_COLOR_16_SWAP 0 + +/* 1: Enable screen transparency. + * Useful for OSD or other overlapping GUIs. + * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/ +#define LV_COLOR_SCREEN_TRANSP 0 + +/*Images pixels with this color will not be drawn (with chroma keying)*/ +#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/ /* Enable anti-aliasing (lines, and radiuses will be smoothed) */ -#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ +#define LV_ANTIALIAS 1 -/*Default screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ -#define LV_REFR_PERIOD 30 /*[ms]*/ +/* Default display refresh period. + * Can be changed in the display driver (`lv_disp_drv_t`).*/ +#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ -/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide +/* Dot Per Inch: used to initialize default sizes. + * E.g. a button with width = LV_DPI / 2 -> half inch wide * (Not so important, you can adjust it to modify default sizes and spaces)*/ #define LV_DPI 100 /*[px]*/ -/*=================== - Dynamic memory - *===================*/ +/*========================= + Memory manager settings + *=========================*/ + +/* LittelvGL's internal memory manager's settings. + * The graphical objects and other related data are stored here. */ -/* Memory size which will be used by the library - * to store the graphical objects and other data */ -#define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ +/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */ +#define LV_MEM_CUSTOM 0 #if LV_MEM_CUSTOM == 0 -# define LV_MEM_SIZE (32U * 1024U) /*Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ -# define LV_MEM_ATTR /*Complier prefix for big array declaration*/ -# define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/ -# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ +/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) + +/* Complier prefix for a big array declaration */ +# define LV_MEM_ATTR + +/* Set an address for the memory pool instead of allocating it as an array. + * Can be in external SRAM too. */ +# define LV_MEM_ADR 0 + +/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */ +# define LV_MEM_AUTO_DEFRAG 1 #else /*LV_MEM_CUSTOM*/ # define LV_MEM_CUSTOM_INCLUDE /*Header for the dynamic memory function*/ # define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/ @@ -56,62 +81,108 @@ #endif /*LV_MEM_CUSTOM*/ /* Garbage Collector settings - * Used if lvgl is binded to higher language and the memory is managed by that language */ + * Used if lvgl is binded to higher level language and the memory is managed by that language */ #define LV_ENABLE_GC 0 #if LV_ENABLE_GC != 0 +# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ # define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/ # define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/ -# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ #endif /* LV_ENABLE_GC */ -/*================= - Misc. setting - *=================*/ +/*======================= + Input device settings + *=======================*/ + +/* Input device default settings. + * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ + +/* Input device read period in milliseconds */ +#define LV_INDEV_DEF_READ_PERIOD 30 + +/* Drag threshold in pixels */ +#define LV_INDEV_DEF_DRAG_LIMIT 10 + +/* Drag throw slow-down in [%]. Greater value -> faster slow-down */ +#define LV_INDEV_DEF_DRAG_THROW 20 + +/* Long press time in milliseconds. + * Time to send `LV_EVENT_LONG_PRESSSED`) */ +#define LV_INDEV_DEF_LONG_PRESS_TIME 400 + +/* Repeated trigger period in long press [ms] + * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ +#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 + +/*================== + * Feature usage + *==================*/ -/*Input device settings*/ -#define LV_INDEV_READ_PERIOD 30 /*Input device read period in milliseconds*/ -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ -#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */ -#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ -#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ -#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ - -/*Text settings*/ -#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ -#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */ -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */ -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ - -/*Feature usage*/ -#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ -#define LV_USE_SHADOW 1 /*1: Enable shadows*/ -#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ +/*1: Enable the Animations */ +#define LV_USE_ANIMATION 1 + +/* 1: Enable shadow drawing*/ +#define LV_USE_SHADOW 1 + +/* 1: Enable object groups (for keyboard/encoder navigation) */ +#define LV_USE_GROUP 1 #if LV_USE_GROUP typedef void * lv_group_user_data_t; #endif /*LV_USE_GROUP*/ -#define LV_USE_GPU 1 /*1: Enable GPU interface*/ -#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ -#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ -#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ - -/*Compiler settings*/ -#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ -#define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */ -#define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/ -#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */ - -/*HAL settings*/ -#define LV_TICK_CUSTOM 0 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */ + +/* 1: Enable GPU interface*/ +#define LV_USE_GPU 1 + +/* 1: Enable file system (might be required for images */ +#define LV_USE_FILESYSTEM 1 + +/* 1: Enable indexed (palette) images */ +#define LV_IMG_CF_INDEXED 1 + +/* 1: Enable alpha indexed images */ +#define LV_IMG_CF_ALPHA 1 + +/*1: Add a `user_data` to drivers and objects*/ +#define LV_USE_USER_DATA_SINGLE 1 + +/*1: Add separate `user_data` for every callback*/ +#define LV_USE_USER_DATA_MULTI 0 + +/*===================== + * Compiler settings + *====================*/ +/* Define a custom attribute to `lv_tick_inc` function */ +#define LV_ATTRIBUTE_TICK_INC + +/* Define a custom attribute to `lv_task_handler` function */ +#define LV_ATTRIBUTE_TASK_HANDLER + +/* 1: Variable length array is supported*/ +#define LV_COMPILER_VLA_SUPPORTED 1 + +/* 1: Initialization with non constant values are supported */ +#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 + +/*=================== + * HAL settings + *==================*/ + +/* 1: use a custom tick source. + * It removes the need to manually update the tick with `lv_tick_inc`) */ +#define LV_TICK_CUSTOM 0 #if LV_TICK_CUSTOM == 1 #define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/ #endif /*LV_TICK_CUSTOM*/ -typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ -typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ -/*Log settings*/ -#define LV_USE_LOG 1 /*Enable/disable the log module*/ +/*================ + * Log settings + *===============*/ + +/*1: Enable the log module*/ +#define LV_USE_LOG 1 #if LV_USE_LOG /* How important log should be added: * LV_LOG_LEVEL_TRACE A lot of logs to give detailed information @@ -121,23 +192,24 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t */ # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN -/* 1: Print the log with 'printf'; 0: user need to register a callback*/ +/* 1: Print the log with 'printf'; + * 0: user need to register a callback with `lv_log_register_print`*/ # define LV_LOG_PRINTF 0 #endif /*LV_USE_LOG*/ /*================ * THEME USAGE *================*/ -#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ +#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ -#define LV_USE_THEME_TEMPL 0 /*Just for test*/ -#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ -#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ -#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ -#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/ -#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ -#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ -#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_TEMPL 1 /*Just for test*/ +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ /*================== * FONT USAGE @@ -146,27 +218,27 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t /* More info about fonts: https://docs.littlevgl.com/#Fonts * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#define LV_USE_FONT_DEJAVU_10 0 -#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 -#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 -#define LV_USE_FONT_SYMBOL_10 0 +#define LV_USE_FONT_DEJAVU_10 4 +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 4 +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 4 +#define LV_USE_FONT_SYMBOL_10 4 #define LV_USE_FONT_DEJAVU_20 4 #define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 #define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 #define LV_USE_FONT_SYMBOL_20 4 -#define LV_USE_FONT_DEJAVU_30 0 -#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 -#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 -#define LV_USE_FONT_SYMBOL_30 0 +#define LV_USE_FONT_DEJAVU_30 4 +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 4 +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 4 +#define LV_USE_FONT_SYMBOL_30 4 -#define LV_USE_FONT_DEJAVU_40 0 -#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 -#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 -#define LV_USE_FONT_SYMBOL_40 0 +#define LV_USE_FONT_DEJAVU_40 4 +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 4 +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 4 +#define LV_USE_FONT_SYMBOL_40 4 -#define LV_USE_FONT_MONOSPACE_8 0 +#define LV_USE_FONT_MONOSPACE_8 1 /* Optionally declare your custom fonts here. * You can use these fonts as default font too @@ -176,14 +248,33 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in t */ #define LV_FONT_CUSTOM_DECLARE - #define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/ +/*================= + * Text settings + *=================*/ + + /*Can break (wrap) texts on these chars*/ +#define LV_TXT_BREAK_CHARS " ,.;:-_" + +/* If a character is at least this long, will break wherever "prettiest" */ +#define LV_TXT_LINE_BREAK_LONG_LEN 12 + +/* Minimum number of characters of a word to put on a line before a break */ +#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 + +/* Minimum number of characters of a word to put on a line after a break */ +#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 + /*=================== * LV_OBJ SETTINGS *==================*/ -typedef void * lv_obj_user_data_t; /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ -#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ + +/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_obj_user_data_t; + +/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 1 /*================== * LV OBJ X USAGE @@ -192,95 +283,88 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data * Documentation of the object types: https://docs.littlevgl.com/#Object-types */ -/***************** - * Simple object - *****************/ - -/*Label (dependencies: -*/ -#define LV_USE_LABEL 1 -#if LV_USE_LABEL != 0 -# define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ -#endif - -/*Image (dependencies: lv_label*/ -#define LV_USE_IMG 1 -#if LV_USE_IMG != 0 -# define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ -# define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/ -#endif - -/*Line (dependencies: -*/ -#define LV_USE_LINE 1 - /*Arc (dependencies: -)*/ #define LV_USE_ARC 1 -/******************* - * Container objects - *******************/ +/*Bar (dependencies: -)*/ +#define LV_USE_BAR 1 -/*Container (dependencies: -*/ -#define LV_USE_CONT 1 +/*Button (dependencies: lv_cont*/ +#define LV_USE_BTN 1 +#if LV_USE_BTN != 0 +/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ +# define LV_BTN_INK_EFFECT 1 +#endif -/*Page (dependencies: lv_cont)*/ -#define LV_USE_PAGE 1 +/*Button matrix (dependencies: -)*/ +#define LV_USE_BTNM 1 -/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#define LV_USE_WIN 1 +/*Calendar (dependencies: -)*/ +#define LV_USE_CALENDAR 1 -/*Tab (dependencies: lv_page, lv_btnm)*/ -#define LV_USE_TABVIEW 1 -# if LV_USE_TABVIEW != 0 -# define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ -#endif +/*Canvas (dependencies: lv_img)*/ +#define LV_USE_CANVAS 1 -/*Tileview (dependencies: lv_page) */ -#define LV_USE_TILEVIEW 1 -#if LV_USE_TILEVIEW -# define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ -#endif +/*Check box (dependencies: lv_btn, lv_label)*/ +#define LV_USE_CB 1 -/************************* - * Data visualizer objects - *************************/ +/*Chart (dependencies: -)*/ +#define LV_USE_CHART 1 -/*Bar (dependencies: -)*/ -#define LV_USE_BAR 1 +/*Container (dependencies: -*/ +#define LV_USE_CONT 1 -/*Line meter (dependencies: *;)*/ -#define LV_USE_LMETER 1 +/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ +#define LV_USE_DDLIST 1 +#if LV_USE_DDLIST != 0 +/*Open and close default animation time [ms] (0: no animation)*/ +# define LV_DDLIST_DEF_ANIM_TIME 200 +#endif /*Gauge (dependencies:lv_bar, lv_lmeter)*/ #define LV_USE_GAUGE 1 -/*Chart (dependencies: -)*/ -#define LV_USE_CHART 1 -#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 +/*Image (dependencies: lv_label*/ +#define LV_USE_IMG 1 -/*Table (dependencies: lv_label)*/ -#define LV_USE_TABLE 1 -#if LV_USE_TABLE -# define LV_TABLE_COL_MAX 12 +/*Image Button (dependencies: lv_btn*/ +#define LV_USE_IMGBTN 1 +#if LV_USE_IMGBTN +/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ +# define LV_IMGBTN_TILED 0 +#endif + +/*Keyboard (dependencies: lv_btnm)*/ +#define LV_USE_KB 1 + +/*Label (dependencies: -*/ +#define LV_USE_LABEL 1 +#if LV_USE_LABEL != 0 +/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ +# define LV_LABEL_DEF_SCROLL_SPEED 25 #endif /*LED (dependencies: -)*/ #define LV_USE_LED 1 -/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#define LV_USE_MBOX 1 +/*Line (dependencies: -*/ +#define LV_USE_LINE 1 -/*Text area (dependencies: lv_label, lv_page)*/ -#define LV_USE_TA 1 -#if LV_USE_TA != 0 -# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ -# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ +/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ +#define LV_USE_LIST 1 +#if LV_USE_LIST != 0 +/*Default animation time of focusing to a list element [ms] (0: no animation) */ +# define LV_LIST_DEF_ANIM_TIME 100 #endif -/*Spinbox (dependencies: lv_ta)*/ -#define LV_USE_SPINBOX 1 +/*Line meter (dependencies: *;)*/ +#define LV_USE_LMETER 1 -/*Calendar (dependencies: -)*/ -#define LV_USE_CALENDAR 1 +/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ +#define LV_USE_MBOX 1 + +/*Page (dependencies: lv_cont)*/ +#define LV_USE_PAGE 1 /*Preload (dependencies: lv_arc)*/ #define LV_USE_PRELOAD 1 @@ -290,61 +374,56 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data # define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC #endif -/*Canvas (dependencies: lv_img)*/ -#define LV_USE_CANVAS 1 -/************************* - * User input objects - *************************/ - -/*Button (dependencies: lv_cont*/ -#define LV_USE_BTN 1 -#if LV_USE_BTN != 0 -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ -#endif - -/*Image Button (dependencies: lv_btn*/ -#define LV_USE_IMGBTN 1 -#if LV_USE_IMGBTN -# define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ +/*Roller (dependencies: lv_ddlist)*/ +#define LV_USE_ROLLER 1 +#if LV_USE_ROLLER != 0 +/*Focus animation time [ms] (0: no animation)*/ +# define LV_ROLLER_DEF_ANIM_TIME 200 #endif -/*Button matrix (dependencies: -)*/ -#define LV_USE_BTNM 1 +/*Slider (dependencies: lv_bar)*/ +#define LV_USE_SLIDER 1 -/*Keyboard (dependencies: lv_btnm)*/ -#define LV_USE_KB 1 +/*Spinbox (dependencies: lv_ta)*/ +#define LV_USE_SPINBOX 1 -/*Check box (dependencies: lv_btn, lv_label)*/ -#define LV_USE_CB 1 +/*Switch (dependencies: lv_slider)*/ +#define LV_USE_SW 1 -/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#define LV_USE_LIST 1 -#if LV_USE_LIST != 0 -# define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ +/*Text area (dependencies: lv_label, lv_page)*/ +#define LV_USE_TA 1 +#if LV_USE_TA != 0 +# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif -/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#define LV_USE_DDLIST 1 -#if LV_USE_DDLIST != 0 -# define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ +/*Table (dependencies: lv_label)*/ +#define LV_USE_TABLE 1 +#if LV_USE_TABLE +# define LV_TABLE_COL_MAX 12 #endif -/*Roller (dependencies: lv_ddlist)*/ -#define LV_USE_ROLLER 1 -#if LV_USE_ROLLER != 0 -# define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ -# define LV_ROLLER_INF_PAGES 7 /*With inifinite rollers the options are added multiple times (on select positioned back to the center)*/ +/*Tab (dependencies: lv_page, lv_btnm)*/ +#define LV_USE_TABVIEW 1 +# if LV_USE_TABVIEW != 0 +/*Time of slide animation [ms] (0: no animation)*/ +# define LV_TABVIEW_DEF_ANIM_TIME 300 #endif -/*Slider (dependencies: lv_bar)*/ -#define LV_USE_SLIDER 1 +/*Tileview (dependencies: lv_page) */ +#define LV_USE_TILEVIEW 1 +#if LV_USE_TILEVIEW +/*Time of slide animation [ms] (0: no animation)*/ +# define LV_TILEVIEW_DEF_ANIM_TIME 300 +#endif -/*Switch (dependencies: lv_slider)*/ -#define LV_USE_SW 1 +/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ +#define LV_USE_WIN 1 -/************************* +/*================== * Non-user section - *************************/ + *==================*/ + #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ # define _CRT_SECURE_NO_WARNINGS #endif @@ -356,5 +435,4 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data #endif /*LV_CONF_H*/ - #endif /*End of "Content enable"*/ From 41ee89e6d2ed119096559007f5bd77a13db6f9d1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:07:17 +0200 Subject: [PATCH 234/590] renames according to the new lv_conf_templ --- src/lv_conf_checker.h | 12 +++++----- src/lv_core/lv_disp.c | 42 +++++++++++++++++++++++++++++++++++ src/lv_core/lv_disp.h | 13 +++++++++++ src/lv_core/lv_indev.c | 29 +++--------------------- src/lv_core/lv_indev.h | 6 ----- src/lv_core/lv_obj.c | 8 +++---- src/lv_hal/lv_hal_disp.c | 46 +++++++++++++++------------------------ src/lv_hal/lv_hal_disp.h | 16 +++++++------- src/lv_hal/lv_hal_indev.c | 12 +++++++++- src/lv_hal/lv_hal_indev.h | 10 +++++++-- src/lv_objx/lv_ddlist.c | 8 +++---- src/lv_objx/lv_label.c | 4 ++-- src/lv_objx/lv_list.c | 12 +++++----- src/lv_objx/lv_roller.c | 8 +++---- src/lv_objx/lv_tabview.c | 8 +++---- src/lv_objx/lv_tileview.c | 8 +++---- 16 files changed, 136 insertions(+), 106 deletions(-) diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 33297a3f8c07..a1c98e01b24d 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -346,7 +346,7 @@ #endif #if LV_USE_LABEL != 0 #ifndef LV_LABEL_SCROLL_SPEED -# define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ +# define LV_LABEL_DEF_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif #endif @@ -398,7 +398,7 @@ #endif # if LV_USE_TABVIEW != 0 #ifndef LV_TABVIEW_ANIM_TIME -# define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ +# define LV_TABVIEW_DEF_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif #endif @@ -408,7 +408,7 @@ #endif #if LV_USE_TILEVIEW #ifndef LV_TILEVIEW_ANIM_TIME -# define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ +# define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ #endif #endif @@ -547,7 +547,7 @@ #endif #if LV_USE_LIST != 0 #ifndef LV_LIST_FOCUS_TIME -# define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ +# define LV_LIST_DEF_ANIM_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ #endif #endif @@ -557,7 +557,7 @@ #endif #if LV_USE_DDLIST != 0 #ifndef LV_DDLIST_ANIM_TIME -# define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ +# define LV_DDLIST_DEF_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ #endif #endif @@ -567,7 +567,7 @@ #endif #if LV_USE_ROLLER != 0 #ifndef LV_ROLLER_ANIM_TIME -# define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ +# define LV_ROLLER_DEF_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ #endif #ifndef LV_ROLLER_INF_PAGES # define LV_ROLLER_INF_PAGES 7 /*With inifinite rollers the options are added multiple times (on select positioned back to the center)*/ diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index 0a1e62049199..a5a5a9fc2d0c 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -7,6 +7,7 @@ * INCLUDES *********************/ #include "lv_disp.h" +#include "../lv_misc/lv_math.h" /********************* * DEFINES @@ -129,6 +130,47 @@ lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) return disp->refr_task; } +/** + * Get elapsed time since last user activity on a display (e.g. click) + * @param disp pointer to an display (NULL to get the overall smallest inactivity) + * @return elapsed ticks (milliseconds) since the last activity + */ +uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp) +{ + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_disp_get_inactive_time: no display registered"); + return 0; + } + + if(disp) return lv_tick_elaps(disp->last_activity_time); + + lv_disp_t * d; + uint32_t t = UINT32_MAX; + d = lv_disp_get_next(NULL); + while(d) { + t = LV_MATH_MIN(t, lv_tick_elaps(d->last_activity_time)); + d = lv_disp_get_next(d); + } + + return t; +} + +/** + * Manually trigger an activity on a display + * @param disp pointer to an display (NULL to use the default display) + */ +void lv_disp_trig_activity(const lv_disp_t * disp) +{ + if(!disp) disp = lv_disp_get_default(); + if(!disp) { + LV_LOG_WARN("lv_disp_trig_activity: no display registered"); + return; + } + + disp->last_activity_time = lv_tick_get(); +} + /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index e47587f201ba..276cca211822 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -70,6 +70,19 @@ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); */ lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) ; +/** + * Get elapsed time since last user activity on a display (e.g. click) + * @param disp pointer to an display (NULL to get the overall smallest inactivity) + * @return elapsed ticks (milliseconds) since the last activity + */ +uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp); + +/** + * Manually trigger an activity on a display + * @param disp pointer to an display (NULL to use the default display) + */ +void lv_disp_trig_activity(const lv_disp_t * disp); + /*------------------------------------------------ * To improve backward compatibility * Recommended only if you have one display diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 8044b5a2ef36..d9c33e467439 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -94,7 +94,7 @@ void lv_indev_read_task(void * param) indev_act->proc.state = data.state; if(indev_act->proc.state == LV_INDEV_STATE_PR) { - indev_act->last_activity_time = lv_tick_get(); + indev_act->driver.disp->last_activity_time = lv_tick_get(); } if(indev_act->driver.type == LV_INDEV_TYPE_POINTER) { indev_pointer_proc(indev_act, &data); @@ -144,10 +144,10 @@ void lv_indev_reset(lv_indev_t * indev) { if(indev) indev->proc.reset_query = 1; else { - lv_indev_t * i = lv_indev_next(NULL); + lv_indev_t * i = lv_indev_get_next(NULL); while(i) { i->proc.reset_query = 1; - i = lv_indev_next(i); + i = lv_indev_get_next(i); } } } @@ -287,29 +287,6 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) } } -/** - * Get elapsed time since last press - * @param indev pointer to an input device (NULL to get the overall smallest inactivity) - * @return Elapsed ticks (milliseconds) since last press - */ -uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev) -{ - - uint32_t t; - - if(indev) return t = lv_tick_elaps(indev->last_activity_time); - - lv_indev_t * i; - t = UINT16_MAX; - i = lv_indev_next(NULL); - while(i) { - t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time)); - i = lv_indev_next(i); - } - - return t; -} - /** * Get feedback callback for indev. * @param indev pointer to an input device diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index 4155cf151a0f..dfd5a15ecfa9 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -131,12 +131,6 @@ bool lv_indev_is_dragging(const lv_indev_t * indev); * @param point pointer to a point to store the vector */ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point); -/** - * Get elapsed time since last press - * @param indev pointer to an input device (NULL to get the overall smallest inactivity) - * @return Elapsed ticks (milliseconds) since last press - */ -uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev); /** * Get feedback callback for indev. diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index df3f80156ab0..91792f7496c3 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -386,7 +386,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /* Reset all input devices if * the object to delete is used*/ - lv_indev_t * indev = lv_indev_next(NULL); + lv_indev_t * indev = lv_indev_get_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); @@ -397,7 +397,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) lv_indev_reset(indev); } #endif - indev = lv_indev_next(indev); + indev = lv_indev_get_next(indev); } /* All children deleted. @@ -2056,7 +2056,7 @@ static void delete_children(lv_obj_t * obj) /* Reset the input devices if * the object to delete is used*/ - lv_indev_t * indev = lv_indev_next(NULL); + lv_indev_t * indev = lv_indev_get_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); @@ -2066,7 +2066,7 @@ static void delete_children(lv_obj_t * obj) lv_indev_reset(indev); } #endif - indev = lv_indev_next(indev); + indev = lv_indev_get_next(indev); } /*Remove the object from parent's children list*/ diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 6115cc9ec61d..e4541c6d8153 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -147,6 +147,21 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) return disp; } +/** + * Update the driver in run time. + * @param disp pointer to a display. (return value of `lv_disp_drv_register`) + * @param new_drv pointer to the new driver + */ +void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv) +{ + memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t)); + + lv_obj_t * scr; + LV_LL_READ(disp->scr_ll, scr) { + lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); + } +} + /** * Remove a display * @param disp pointer to display @@ -158,12 +173,12 @@ void lv_disp_remove(lv_disp_t * disp) /*Detach the input devices */ lv_indev_t * indev; - indev = lv_indev_next(NULL); + indev = lv_indev_get_next(NULL); while(indev) { if(indev->driver.disp == disp) { indev->driver.disp = NULL; } - indev = lv_indev_next(indev); + indev = lv_indev_get_next(indev); } lv_ll_rem(&LV_GC_ROOT(_lv_disp_ll), disp); @@ -172,20 +187,6 @@ void lv_disp_remove(lv_disp_t * disp) if(was_default) lv_disp_set_default(lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll))); } -/** - * Update the driver in run time. - * @param disp Pointer toa display. (return value of `lv_disp_drv_register`) - * @param new_drv pointer to the new driver - */ -void lv_disp_update_drv(lv_disp_t * disp, lv_disp_drv_t * new_drv) -{ - memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t)); - - lv_obj_t * scr; - LV_LL_READ(disp->scr_ll, scr) { - lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); - } -} /** * Set a default screen. The new screens will be created on it by default. @@ -249,19 +250,6 @@ bool lv_disp_get_antialiasing(lv_disp_t * disp) } -/** - * Get the elapsed time since the last activity on a display. - * @param disp pointer to a display. - * @return the elapsed time since the last activity - */ -uint32_t lv_disp_get_inactive_time(lv_disp_t * disp) -{ - if(disp == NULL) disp = lv_disp_get_default(); - if(disp == NULL) return 0; - - return disp->last_activity; -} - /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index be74561ab9ab..848f6b7faa94 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -131,7 +131,7 @@ typedef struct _disp_t { uint32_t inv_p :10; /*Miscellaneous data*/ - uint32_t last_activity; + uint32_t last_activity_time; } lv_disp_t; /********************** @@ -172,6 +172,13 @@ void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32 */ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver); +/** + * Update the driver in run time. + * @param disp pointer to a display. (return value of `lv_disp_drv_register`) + * @param new_drv pointer to the new driver + */ +void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv); + /** * Remove a display * @param disp pointer to display @@ -211,13 +218,6 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp); */ bool lv_disp_get_antialiasing(lv_disp_t * disp); -/** - * Get the elapsed time since the last activity on a display. - * @param disp pointer to a display. - * @return the elapsed time since the last activity - */ -uint32_t lv_disp_get_inactive_time(lv_disp_t * disp); - /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called diff --git a/src/lv_hal/lv_hal_indev.c b/src/lv_hal/lv_hal_indev.c index ca4b5d70c902..c0a03b4bd3c9 100644 --- a/src/lv_hal/lv_hal_indev.c +++ b/src/lv_hal/lv_hal_indev.c @@ -94,12 +94,22 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) return indev; } +/** + * Update the driver in run time. + * @param indev pointer to a input device. (return value of `lv_indev_drv_register`) + * @param new_drv pointer to the new driver + */ +void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv) +{ + memcpy(&indev->driver, new_drv, sizeof(lv_indev_drv_t)); +} + /** * Get the next input device. * @param indev pointer to the current input device. NULL to initialize. * @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL */ -lv_indev_t * lv_indev_next(lv_indev_t * indev) +lv_indev_t * lv_indev_get_next(lv_indev_t * indev) { if(indev == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll)); else return lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev); diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index 960db9644209..7b7e86f38c36 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -148,7 +148,6 @@ typedef struct _lv_indev_t { lv_indev_drv_t driver; lv_indev_proc_t proc; lv_indev_feedback_t feedback; - uint32_t last_activity_time; struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ struct _lv_group_t *group; /*Keypad destination group*/ const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ @@ -173,12 +172,19 @@ void lv_indev_drv_init(lv_indev_drv_t *driver); */ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t *driver); +/** + * Update the driver in run time. + * @param indev pointer to a input device. (return value of `lv_indev_drv_register`) + * @param new_drv pointer to the new driver + */ +void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv); + /** * Get the next input device. * @param indev pointer to the current input device. NULL to initialize. * @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL */ -lv_indev_t * lv_indev_next(lv_indev_t * indev); +lv_indev_t * lv_indev_get_next(lv_indev_t * indev); /** * Read data from an input device. diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index ecfd7464547a..0a6af7bc172f 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -24,11 +24,11 @@ *********************/ #if LV_USE_ANIMATION # ifndef LV_DDLIST_ANIM_TIME -# define LV_DDLIST_ANIM_TIME 200 /*ms*/ +# define LV_DDLIST_DEF_ANIM_TIME 200 /*ms*/ # endif #else -# undef LV_DDLIST_ANIM_TIME -# define LV_DDLIST_ANIM_TIME 0 /*No animation*/ +# undef LV_DDLIST_DEF_ANIM_TIME +# define LV_DDLIST_DEF_ANIM_TIME 0 /*No animation*/ #endif /********************** @@ -93,7 +93,7 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) ext->sel_opt_id = 0; ext->sel_opt_id_ori = 0; ext->option_cnt = 0; - ext->anim_time = LV_DDLIST_ANIM_TIME; + ext->anim_time = LV_DDLIST_DEF_ANIM_TIME; ext->sel_style = &lv_style_plain_color; ext->draw_arrow = 0; /*Do not draw arrow by default*/ ext->stay_open = 0; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 2e481ce93b3a..fb5b274e56bc 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -20,7 +20,7 @@ *********************/ /*Test configurations*/ #ifndef LV_LABEL_SCROLL_SPEED -#define LV_LABEL_SCROLL_SPEED (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ +#define LV_LABEL_DEF_SCROLL_SPEED (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif #define ANIM_WAIT_CHAR_COUNT 3 @@ -87,7 +87,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->align = LV_LABEL_ALIGN_LEFT; ext->dot_end = LV_LABEL_DOT_END_INV; ext->long_mode = LV_LABEL_LONG_EXPAND; - ext->anim_speed = LV_LABEL_SCROLL_SPEED; + ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; ext->selection_start = -1; diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 14110488dbde..11b4aca119ef 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -21,11 +21,11 @@ #if LV_USE_ANIMATION # ifndef LV_LIST_FOCUS_TIME -# define LV_LIST_FOCUS_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +# define LV_LIST_DEF_ANIM_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif #else -# undef LV_LIST_FOCUS_TIME -# define LV_LIST_FOCUS_TIME 0 /*No animations*/ +# undef LV_LIST_DEF_ANIM_TIME +# define LV_LIST_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -88,7 +88,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; - ext->anim_time = LV_LIST_FOCUS_TIME; + ext->anim_time = LV_LIST_DEF_ANIM_TIME; ext->single_mode = false; ext->size = 0; @@ -643,7 +643,7 @@ void lv_list_up(const lv_obj_t * list) a.path = lv_anim_path_linear; a.end_cb = NULL; a.act_time = 0; - a.time = LV_LIST_FOCUS_TIME; + a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; a.playback_pause = 0; a.repeat = 0; @@ -686,7 +686,7 @@ void lv_list_down(const lv_obj_t * list) a.path = lv_anim_path_linear; a.end_cb = NULL; a.act_time = 0; - a.time = LV_LIST_FOCUS_TIME; + a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; a.playback_pause = 0; a.repeat = 0; diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index ebc67c91c037..d9910e4839b1 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -18,11 +18,11 @@ *********************/ #if LV_USE_ANIMATION # ifndef LV_ROLLER_ANIM_TIME -# define LV_ROLLER_ANIM_TIME 200 /*ms*/ +# define LV_ROLLER_DEF_ANIM_TIME 200 /*ms*/ # endif #else -# undef LV_ROLLER_ANIM_TIME -# define LV_ROLLER_ANIM_TIME 0 /*No animation*/ +# undef LV_ROLLER_DEF_ANIM_TIME +# define LV_ROLLER_DEF_ANIM_TIME 0 /*No animation*/ #endif @@ -88,7 +88,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); - lv_ddlist_set_anim_time(new_roller, LV_ROLLER_ANIM_TIME); + lv_ddlist_set_anim_time(new_roller, LV_ROLLER_DEF_ANIM_TIME); lv_ddlist_set_stay_open(new_roller, true); lv_roller_set_visible_row_count(new_roller, 3); lv_label_set_align(ext->ddlist.label, LV_LABEL_ALIGN_CENTER); diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 0c5762836fcf..9ac94c2b01f3 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -18,11 +18,11 @@ *********************/ #if LV_USE_ANIMATION # ifndef LV_TABVIEW_ANIM_TIME -# define LV_TABVIEW_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +# define LV_TABVIEW_DEF_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ # endif #else -# undef LV_TABVIEW_ANIM_TIME -# define LV_TABVIEW_ANIM_TIME 0 /*No animations*/ +# undef LV_TABVIEW_DEF_ANIM_TIME +# define LV_TABVIEW_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -91,7 +91,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->indic = NULL; ext->btns = NULL; ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; - ext->anim_time = LV_TABVIEW_ANIM_TIME; + ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; ext->btns_hide = 0; diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index ddd8529e3a3f..81211f858c36 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -18,11 +18,11 @@ *********************/ #if LV_USE_ANIMATION # ifndef LV_TILEVIEW_ANIM_TIME -# define LV_TILEVIEW_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ +# define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ # endif #else -# undef LV_TILEVIEW_ANIM_TIME -# define LV_TILEVIEW_ANIM_TIME 0 /*No animations*/ +# undef LV_TILEVIEW_DEF_ANIM_TIME +# define LV_TILEVIEW_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -77,7 +77,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_tileview); /*Initialize the allocated 'ext' */ - ext->anim_time = LV_TILEVIEW_ANIM_TIME; + ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME; ext->act_id.x = 0; ext->act_id.y = 0; ext->valid_pos = NULL; From f19f8a9b5c83cdaa03bb4a4c2f18aef5548f360d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:10:34 +0200 Subject: [PATCH 235/590] minor fix --- src/lv_core/lv_disp.c | 2 +- src/lv_core/lv_disp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index a5a5a9fc2d0c..0ae440bcf925 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -160,7 +160,7 @@ uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp) * Manually trigger an activity on a display * @param disp pointer to an display (NULL to use the default display) */ -void lv_disp_trig_activity(const lv_disp_t * disp) +void lv_disp_trig_activity(lv_disp_t * disp) { if(!disp) disp = lv_disp_get_default(); if(!disp) { diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index 276cca211822..ab04a5730a6c 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -81,7 +81,7 @@ uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp); * Manually trigger an activity on a display * @param disp pointer to an display (NULL to use the default display) */ -void lv_disp_trig_activity(const lv_disp_t * disp); +void lv_disp_trig_activity(lv_disp_t * disp); /*------------------------------------------------ * To improve backward compatibility From a8c8b6b7a2d465543b75fbed7329b0b15a9d8439 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:12:48 +0200 Subject: [PATCH 236/590] add /* clang-format off */ to lv_conf_templ.h --- lv_conf_template.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lv_conf_template.h b/lv_conf_template.h index 31bdbd9145a6..23910e28fe8f 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -11,6 +11,7 @@ #ifndef LV_CONF_H #define LV_CONF_H +/* clang-format off */ /*==================== Graphical settings From 80e2a1d5d53c696a61aa0a2c9513b6f4cd6287df Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:14:08 +0200 Subject: [PATCH 237/590] add clang-format file --- .clang-format | 97 ++++++++++++++++++++++++++++++++++++++ scripts/clang-formatter.sh | 13 +++++ 2 files changed, 110 insertions(+) create mode 100644 .clang-format create mode 100755 scripts/clang-formatter.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000000..0329eeab9ab7 --- /dev/null +++ b/.clang-format @@ -0,0 +1,97 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: false +AlignEscapedNewlinesLeft: false +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: false +BinPackArguments: true +BinPackParameters: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: true + BeforeCatch: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: false +BreakBeforeBinaryOperators: None +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 100 +CommentPragmas: '^ IWYU pragma:' +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +IncludeCategories: + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + Priority: 2 + - Regex: '^(<|"(gtest|isl|json)/)' + Priority: 3 + - Regex: '.*' + Priority: 1 +IncludeIsMainRegex: '$' +IndentCaseLabels: true +IndentWidth: 4 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Middle +ReflowComments: true +SortIncludes: false +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: Never +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: false +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 4 +UseTab: Never +... + diff --git a/scripts/clang-formatter.sh b/scripts/clang-formatter.sh new file mode 100755 index 000000000000..d831917c3bbf --- /dev/null +++ b/scripts/clang-formatter.sh @@ -0,0 +1,13 @@ +clang-format-7 -style=file ../src/lv_core/*.c -i +clang-format-7 -style=file ../src/lv_draw/*.c -i +clang-format-7 -style=file ../src/lv_hal/*.c -i +clang-format-7 -style=file ../src/lv_misc/*.c -i +clang-format-7 -style=file ../src/lv_objx/*.c -i +clang-format-7 -style=file ../src/lv_themes/*.c -i + +clang-format-7 -style=file ../src/lv_core/*.h -i +clang-format-7 -style=file ../src/lv_draw/*.h -i +clang-format-7 -style=file ../src/lv_hal/*.h -i +clang-format-7 -style=file ../src/lv_misc/*.h -i +clang-format-7 -style=file ../src/lv_objx/*.h -i +clang-format-7 -style=file ../src/lv_themes/*.h -i From ba2160042a3b61787c3c57c4b4cca210e3dee308 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:15:40 +0200 Subject: [PATCH 238/590] run clang format --- src/lv_core/lv_disp.c | 8 +- src/lv_core/lv_disp.h | 10 +- src/lv_core/lv_group.c | 133 +++--- src/lv_core/lv_group.h | 80 ++-- src/lv_core/lv_indev.c | 378 ++++++++-------- src/lv_core/lv_indev.h | 23 +- src/lv_core/lv_obj.c | 361 +++++++-------- src/lv_core/lv_obj.h | 170 +++---- src/lv_core/lv_refr.c | 119 ++--- src/lv_core/lv_refr.h | 10 +- src/lv_core/lv_style.c | 233 +++++----- src/lv_core/lv_style.h | 69 +-- src/lv_draw/lv_draw.c | 48 +- src/lv_draw/lv_draw.h | 15 +- src/lv_draw/lv_draw_arc.c | 124 +++--- src/lv_draw/lv_draw_arc.h | 4 +- src/lv_draw/lv_draw_basic.c | 239 +++++----- src/lv_draw/lv_draw_basic.h | 20 +- src/lv_draw/lv_draw_img.c | 660 +++++++++++++--------------- src/lv_draw/lv_draw_img.h | 98 +++-- src/lv_draw/lv_draw_label.c | 102 ++--- src/lv_draw/lv_draw_label.h | 6 +- src/lv_draw/lv_draw_line.c | 254 ++++++----- src/lv_draw/lv_draw_line.h | 1 - src/lv_draw/lv_draw_rect.c | 678 ++++++++++++++++------------ src/lv_draw/lv_draw_rect.h | 4 +- src/lv_draw/lv_draw_triangle.c | 45 +- src/lv_draw/lv_draw_triangle.h | 4 +- src/lv_hal/lv_hal_disp.c | 88 ++-- src/lv_hal/lv_hal_disp.h | 43 +- src/lv_hal/lv_hal_indev.c | 32 +- src/lv_hal/lv_hal_indev.h | 103 +++-- src/lv_hal/lv_hal_tick.c | 6 +- src/lv_hal/lv_hal_tick.h | 2 +- src/lv_misc/lv_anim.c | 135 +++--- src/lv_misc/lv_anim.h | 38 +- src/lv_misc/lv_area.c | 26 +- src/lv_misc/lv_area.h | 6 +- src/lv_misc/lv_circ.c | 4 +- src/lv_misc/lv_circ.h | 2 - src/lv_misc/lv_color.c | 2 +- src/lv_misc/lv_color.h | 315 ++++++------- src/lv_misc/lv_font.c | 49 +-- src/lv_misc/lv_font.h | 42 +- src/lv_misc/lv_fs.c | 89 ++-- src/lv_misc/lv_fs.h | 100 +++-- src/lv_misc/lv_gc.c | 4 +- src/lv_misc/lv_gc.h | 35 +- src/lv_misc/lv_ll.c | 64 +-- src/lv_misc/lv_ll.h | 10 +- src/lv_misc/lv_log.c | 11 +- src/lv_misc/lv_log.h | 49 ++- src/lv_misc/lv_math.c | 37 +- src/lv_misc/lv_math.h | 13 +- src/lv_misc/lv_mem.c | 101 +++-- src/lv_misc/lv_mem.h | 28 +- src/lv_misc/lv_symbol_def.h | 121 ++--- src/lv_misc/lv_task.c | 80 ++-- src/lv_misc/lv_task.h | 23 +- src/lv_misc/lv_templ.h | 1 - src/lv_misc/lv_txt.c | 241 +++++----- src/lv_misc/lv_txt.h | 64 +-- src/lv_misc/lv_utils.c | 39 +- src/lv_misc/lv_utils.h | 7 +- src/lv_objx/lv_arc.c | 42 +- src/lv_objx/lv_arc.h | 14 +- src/lv_objx/lv_bar.c | 154 ++++--- src/lv_objx/lv_bar.h | 29 +- src/lv_objx/lv_btn.c | 281 ++++++------ src/lv_objx/lv_btn.h | 25 +- src/lv_objx/lv_btnm.c | 369 ++++++++-------- src/lv_objx/lv_btnm.h | 49 ++- src/lv_objx/lv_calendar.c | 473 ++++++++++---------- src/lv_objx/lv_calendar.h | 59 +-- src/lv_objx/lv_canvas.c | 317 ++++++++------ src/lv_objx/lv_canvas.h | 80 ++-- src/lv_objx/lv_cb.c | 73 ++- src/lv_objx/lv_cb.h | 10 +- src/lv_objx/lv_chart.c | 548 +++++++++++------------ src/lv_objx/lv_chart.h | 93 ++-- src/lv_objx/lv_cont.c | 222 +++++----- src/lv_objx/lv_cont.h | 53 ++- src/lv_objx/lv_ddlist.c | 358 ++++++++------- src/lv_objx/lv_ddlist.h | 40 +- src/lv_objx/lv_gauge.c | 127 +++--- src/lv_objx/lv_gauge.h | 21 +- src/lv_objx/lv_img.c | 82 ++-- src/lv_objx/lv_img.h | 42 +- src/lv_objx/lv_imgbtn.c | 38 +- src/lv_objx/lv_imgbtn.h | 38 +- src/lv_objx/lv_kb.c | 349 +++++++++------ src/lv_objx/lv_kb.h | 28 +- src/lv_objx/lv_label.c | 462 ++++++++++--------- src/lv_objx/lv_label.h | 89 ++-- src/lv_objx/lv_led.c | 42 +- src/lv_objx/lv_led.h | 10 +- src/lv_objx/lv_line.c | 45 +- src/lv_objx/lv_line.h | 28 +- src/lv_objx/lv_list.c | 359 +++++++-------- src/lv_objx/lv_list.h | 54 +-- src/lv_objx/lv_lmeter.c | 68 +-- src/lv_objx/lv_lmeter.h | 21 +- src/lv_objx/lv_mbox.c | 106 ++--- src/lv_objx/lv_mbox.h | 22 +- src/lv_objx/lv_objx_templ.c | 27 +- src/lv_objx/lv_objx_templ.h | 13 +- src/lv_objx/lv_page.c | 581 ++++++++++++------------ src/lv_objx/lv_page.h | 126 +++--- src/lv_objx/lv_preload.c | 162 +++---- src/lv_objx/lv_preload.h | 19 +- src/lv_objx/lv_roller.c | 218 ++++----- src/lv_objx/lv_roller.h | 28 +- src/lv_objx/lv_slider.c | 230 +++++----- src/lv_objx/lv_slider.h | 23 +- src/lv_objx/lv_spinbox.c | 107 +++-- src/lv_objx/lv_spinbox.h | 28 +- src/lv_objx/lv_sw.c | 130 +++--- src/lv_objx/lv_sw.h | 33 +- src/lv_objx/lv_ta.c | 689 ++++++++++++++--------------- src/lv_objx/lv_ta.h | 85 ++-- src/lv_objx/lv_table.c | 367 ++++++++-------- src/lv_objx/lv_table.h | 34 +- src/lv_objx/lv_tabview.c | 354 +++++++-------- src/lv_objx/lv_tabview.h | 33 +- src/lv_objx/lv_tileview.c | 193 ++++---- src/lv_objx/lv_tileview.h | 32 +- src/lv_objx/lv_win.c | 123 +++--- src/lv_objx/lv_win.h | 41 +- src/lv_themes/lv_theme.c | 21 +- src/lv_themes/lv_theme.h | 317 ++++++++------ src/lv_themes/lv_theme_alien.c | 706 +++++++++++++++--------------- src/lv_themes/lv_theme_alien.h | 2 +- src/lv_themes/lv_theme_default.c | 206 ++++----- src/lv_themes/lv_theme_default.h | 2 +- src/lv_themes/lv_theme_material.c | 653 ++++++++++++++------------- src/lv_themes/lv_theme_material.h | 2 +- src/lv_themes/lv_theme_mono.c | 267 ++++++----- src/lv_themes/lv_theme_mono.h | 2 +- src/lv_themes/lv_theme_nemo.c | 662 ++++++++++++++-------------- src/lv_themes/lv_theme_nemo.h | 2 +- src/lv_themes/lv_theme_night.c | 569 ++++++++++++------------ src/lv_themes/lv_theme_night.h | 2 +- src/lv_themes/lv_theme_templ.c | 204 ++++----- src/lv_themes/lv_theme_templ.h | 2 +- src/lv_themes/lv_theme_zen.c | 574 ++++++++++++------------ src/lv_themes/lv_theme_zen.h | 2 +- 146 files changed, 9679 insertions(+), 9418 deletions(-) diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index 0ae440bcf925..a59debbcf292 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -35,7 +35,8 @@ /** * Return with a pointer to the active screen - * @param disp pointer to display which active screen should be get. (NULL to use the default screen) + * @param disp pointer to display which active screen should be get. (NULL to use the default + * screen) * @return pointer to the active screen object (loaded by 'lv_scr_load()') */ lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp) @@ -79,7 +80,8 @@ lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp) } /** - * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) + * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top + * layer) * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen) * @return pointer to the sys layer object (transparent screen sized lv_obj) */ @@ -147,7 +149,7 @@ uint32_t lv_disp_get_inactive_time(const lv_disp_t * disp) lv_disp_t * d; uint32_t t = UINT32_MAX; - d = lv_disp_get_next(NULL); + d = lv_disp_get_next(NULL); while(d) { t = LV_MATH_MIN(t, lv_tick_elaps(d->last_activity_time)); d = lv_disp_get_next(d); diff --git a/src/lv_core/lv_disp.h b/src/lv_core/lv_disp.h index ab04a5730a6c..c0b0e0af10ac 100644 --- a/src/lv_core/lv_disp.h +++ b/src/lv_core/lv_disp.h @@ -30,7 +30,8 @@ extern "C" { /** * Return with a pointer to the active screen - * @param disp pointer to display which active screen should be get. (NULL to use the default screen) + * @param disp pointer to display which active screen should be get. (NULL to use the default + * screen) * @return pointer to the active screen object (loaded by 'lv_scr_load()') */ lv_obj_t * lv_disp_get_scr_act(lv_disp_t * disp); @@ -49,7 +50,8 @@ void lv_disp_set_scr_act(lv_obj_t * scr); lv_obj_t * lv_disp_get_layer_top(lv_disp_t * disp); /** - * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top layer) + * Return with the sys. layer. (Same on every screen and it is above the normal screen and the top + * layer) * @param disp pointer to display which sys. layer should be get. (NULL to use the default screen) * @return pointer to the sys layer object (transparent screen sized lv_obj) */ @@ -68,7 +70,7 @@ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr); * @param disp pointer to a display * @return pointer to the display refresher task. (NULL on error) */ -lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp) ; +lv_task_t * lv_disp_get_refr_task(lv_disp_t * disp); /** * Get elapsed time since last user activity on a display (e.g. click) @@ -95,7 +97,6 @@ void lv_disp_trig_activity(lv_disp_t * disp); static inline lv_obj_t * lv_scr_act(void) { return lv_disp_get_scr_act(lv_disp_get_default()); - } /** @@ -121,7 +122,6 @@ static inline void lv_scr_load(lv_obj_t * scr) lv_disp_set_scr_act(scr); } - /********************** * MACROS **********************/ diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 4391c0dc2eee..66782fa4b70f 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -13,7 +13,7 @@ #include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* @@ -30,12 +30,11 @@ static void style_mod_def(lv_group_t * group, lv_style_t * style); static void style_mod_edit_def(lv_group_t * group, lv_style_t * style); static void refresh_theme(lv_group_t * g, lv_theme_t * th); -static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), void * (*move)(const lv_ll_t *, const void *)); +static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), + void * (*move)(const lv_ll_t *, const void *)); static void lv_group_refocus(lv_group_t * g); static void obj_to_foreground(lv_obj_t * obj); - - /********************** * STATIC VARIABLES **********************/ @@ -67,13 +66,13 @@ lv_group_t * lv_group_create(void) if(group == NULL) return NULL; lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *)); - group->obj_focus = NULL; - group->frozen = 0; - group->focus_cb = NULL; - group->click_focus = 1; - group->editing = 0; + group->obj_focus = NULL; + group->frozen = 0; + group->focus_cb = NULL; + group->click_focus = 1; + group->editing = 0; group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; - group->wrap = 1; + group->wrap = 1; #if LV_USE_USER_DATA_SINGLE memset(&group->user_data, 0, sizeof(lv_group_user_data_t)); @@ -85,7 +84,6 @@ lv_group_t * lv_group_create(void) memset(&group->style_mod_edit_user_data, 0, sizeof(lv_group_user_data_t)); #endif - /*Initialize style modification callbacks from current theme*/ refresh_theme(group, lv_theme_get_current()); @@ -106,7 +104,8 @@ void lv_group_del(lv_group_t * group) /*Remove the objects from the group*/ lv_obj_t ** obj; - LV_LL_READ(group->obj_ll, obj) { + LV_LL_READ(group->obj_ll, obj) + { (*obj)->group_p = NULL; } @@ -125,7 +124,8 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj) /*Do not add the object twice*/ lv_obj_t ** obj_i; - LV_LL_READ(group->obj_ll, obj_i) { + LV_LL_READ(group->obj_ll, obj_i) + { if((*obj_i) == obj) { LV_LOG_INFO("lv_group_add_obj: the object is already added to this group"); return; @@ -141,7 +141,7 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj) } } - obj->group_p = group; + obj->group_p = group; lv_obj_t ** next = lv_ll_ins_tail(&group->obj_ll); lv_mem_assert(next); if(next == NULL) return; @@ -162,12 +162,14 @@ void lv_group_remove_obj(lv_obj_t * obj) { lv_group_t * g = obj->group_p; if(g == NULL) return; - if(g->obj_focus == NULL) return; /*Just to be sure (Not possible if there is at least one object in the group)*/ + if(g->obj_focus == NULL) + return; /*Just to be sure (Not possible if there is at least one object in the group)*/ /*Focus on the next object*/ if(*g->obj_focus == obj) { /*If this is the only object in the group then focus to nothing.*/ - if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) { + if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && + lv_ll_get_tail(&g->obj_ll) == g->obj_focus) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); } /*If there more objects in the group then focus to the next/prev object*/ @@ -176,15 +178,17 @@ void lv_group_remove_obj(lv_obj_t * obj) } } - /* If the focuses object is still the same then it was the only object in the group but it will be deleted. - * Set the `obj_focus` to NULL to get back to the initial state of the group with zero objects*/ + /* If the focuses object is still the same then it was the only object in the group but it will + * be deleted. Set the `obj_focus` to NULL to get back to the initial state of the group with + * zero objects*/ if(*g->obj_focus == obj) { g->obj_focus = NULL; } /*Search the object and remove it from its group */ lv_obj_t ** i; - LV_LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) + { if(*i == obj) { lv_ll_rem(&g->obj_ll, i); lv_mem_free(i); @@ -210,9 +214,10 @@ void lv_group_focus_obj(lv_obj_t * obj) lv_group_set_editing(g, false); lv_obj_t ** i; - LV_LL_READ(g->obj_ll, i) { + LV_LL_READ(g->obj_ll, i) + { if(*i == obj) { - if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ + if(g->obj_focus == i) return; /*Don't focus the already focused object again*/ if(g->obj_focus != NULL) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); lv_res_t res = lv_event_send(*g->obj_focus, LV_EVENT_DEFOCUSED, NULL); @@ -262,8 +267,10 @@ void lv_group_focus_prev(lv_group_t * group) */ void lv_group_focus_freeze(lv_group_t * group, bool en) { - if(en == false) group->frozen = 0; - else group->frozen = 1; + if(en == false) + group->frozen = 0; + else + group->frozen = 1; } /** @@ -321,13 +328,14 @@ void lv_group_set_editing(lv_group_t * group, bool edit) { uint8_t en_val = edit ? 1 : 0; - if(en_val == group->editing) return; /*Do not set the same mode again*/ + if(en_val == group->editing) return; /*Do not set the same mode again*/ - group->editing = en_val; + group->editing = en_val; lv_obj_t * focused = lv_group_get_focused(group); if(focused) { - focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/ + focused->signal_cb(focused, LV_SIGNAL_FOCUS, + NULL); /*Focus again to properly leave/open edit/navigate mode*/ lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL); if(res != LV_RES_OK) return; } @@ -345,7 +353,8 @@ void lv_group_set_click_focus(lv_group_t * group, bool en) group->click_focus = en ? 1 : 0; } -void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy) { +void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy) +{ group->refocus_policy = policy & 0x01; } @@ -403,7 +412,6 @@ lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group) } #endif - /** * Get a the style modifier function of a group * @param group pointer to a group @@ -412,7 +420,7 @@ lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group) lv_group_style_mod_func_t lv_group_get_style_mod_cb(const lv_group_t * group) { if(!group) return false; - return group->style_mod ; + return group->style_mod; } /** @@ -471,7 +479,8 @@ bool lv_group_get_wrap(lv_group_t * group) } /** - * Notify the group that current theme changed and style modification callbacks need to be refreshed. + * Notify the group that current theme changed and style modification callbacks need to be + * refreshed. * @param group pointer to group. If NULL then all groups are notified. */ void lv_group_report_style_mod(lv_group_t * group) @@ -484,7 +493,8 @@ void lv_group_report_style_mod(lv_group_t * group) } lv_group_t * i; - LV_LL_READ(LV_GC_ROOT(_lv_group_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_group_ll), i) + { refresh_theme(i, th); } } @@ -493,10 +503,11 @@ void lv_group_report_style_mod(lv_group_t * group) * STATIC FUNCTIONS **********************/ -static void lv_group_refocus(lv_group_t *g) { +static void lv_group_refocus(lv_group_t * g) +{ /*Refocus must temporarily allow wrapping to work correctly*/ uint8_t temp_wrap = g->wrap; - g->wrap = 1; + g->wrap = 1; if(g->refocus_policy == LV_GROUP_REFOCUS_POLICY_NEXT) lv_group_focus_next(g); @@ -513,28 +524,28 @@ static void lv_group_refocus(lv_group_t *g) { */ static void style_mod_def(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif - } /** @@ -544,57 +555,56 @@ static void style_mod_def(lv_group_t * group, lv_style_t * style) */ static void style_mod_edit_def(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif - } static void refresh_theme(lv_group_t * g, lv_theme_t * th) { - g->style_mod = style_mod_def; + g->style_mod = style_mod_def; g->style_mod_edit = style_mod_edit_def; if(th) { - if(th->group.style_mod) - g->style_mod = th->group.style_mod; - if(th->group.style_mod_edit) - g->style_mod_edit = th->group.style_mod_edit; + if(th->group.style_mod) g->style_mod = th->group.style_mod; + if(th->group.style_mod_edit) g->style_mod_edit = th->group.style_mod_edit; } } -static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), void * (*move)(const lv_ll_t *, const void *)) +static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *), + void * (*move)(const lv_ll_t *, const void *)) { - if (group->frozen) return; + if(group->frozen) return; - lv_obj_t ** obj_next = group->obj_focus; + lv_obj_t ** obj_next = group->obj_focus; lv_obj_t ** obj_sentinel = NULL; - bool can_move = true; - bool can_begin = true; + bool can_move = true; + bool can_begin = true; for(;;) { if(obj_next == NULL) { if(group->wrap || obj_sentinel == NULL) { if(!can_begin) return; - obj_next = begin(&group->obj_ll); - can_move = false; + obj_next = begin(&group->obj_ll); + can_move = false; can_begin = false; } else { /*Currently focused object is the last/first in the group, keep it that way*/ @@ -622,7 +632,8 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(!lv_obj_get_hidden(*obj_next)) break; } - if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/ + if(obj_next == group->obj_focus) + return; /*There's only one visible object and it's already focused*/ if(group->obj_focus) { (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); @@ -648,7 +659,7 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) static void obj_to_foreground(lv_obj_t * obj) { /*Search for 'top' attribute*/ - lv_obj_t * i = obj; + lv_obj_t * i = obj; lv_obj_t * last_top = NULL; while(i != NULL) { if(i->top != 0) last_top = i; diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 77779fc6e964..fa364432f97d 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -26,20 +26,20 @@ extern "C" { *********************/ /*Predefined keys to control the focused object via lv_group_send(group, c)*/ /*For compatibility in signal function define the keys regardless to LV_GROUP*/ -#define LV_GROUP_KEY_UP 17 /*0x11*/ -#define LV_GROUP_KEY_DOWN 18 /*0x12*/ -#define LV_GROUP_KEY_RIGHT 19 /*0x13*/ -#define LV_GROUP_KEY_LEFT 20 /*0x14*/ -#define LV_GROUP_KEY_ESC 27 /*0x1B*/ -#define LV_GROUP_KEY_DEL 127 /*0x7F*/ -#define LV_GROUP_KEY_BACKSPACE 8 /*0x08*/ -#define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/ -#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ -#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ -#define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ -#define LV_GROUP_KEY_END 3 /*0x03, ETX*/ - -#if LV_USE_GROUP != 0 +#define LV_GROUP_KEY_UP 17 /*0x11*/ +#define LV_GROUP_KEY_DOWN 18 /*0x12*/ +#define LV_GROUP_KEY_RIGHT 19 /*0x13*/ +#define LV_GROUP_KEY_LEFT 20 /*0x14*/ +#define LV_GROUP_KEY_ESC 27 /*0x1B*/ +#define LV_GROUP_KEY_DEL 127 /*0x7F*/ +#define LV_GROUP_KEY_BACKSPACE 8 /*0x08*/ +#define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/ +#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ +#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ +#define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ +#define LV_GROUP_KEY_END 3 /*0x03, ETX*/ + +#if LV_USE_GROUP != 0 /********************** * TYPEDEFS **********************/ @@ -50,33 +50,35 @@ typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *); typedef struct _lv_group_t { - lv_ll_t obj_ll; /*Linked list to store the objects in the group */ - lv_obj_t ** obj_focus; /*The object in focus*/ - lv_group_style_mod_func_t style_mod; /*A function which modifies the style of the focused object*/ - lv_group_style_mod_func_t style_mod_edit;/*A function which modifies the style of the focused object*/ - lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ - lv_style_t style_tmp; /*Stores the modified style of the focused object */ + lv_ll_t obj_ll; /*Linked list to store the objects in the group */ + lv_obj_t ** obj_focus; /*The object in focus*/ + lv_group_style_mod_func_t + style_mod; /*A function which modifies the style of the focused object*/ + lv_group_style_mod_func_t + style_mod_edit; /*A function which modifies the style of the focused object*/ + lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ + lv_style_t style_tmp; /*Stores the modified style of the focused object */ #if LV_USE_USER_DATA_SINGLE - lv_group_user_data_t user_data; + lv_group_user_data_t user_data; #endif #if LV_USE_USER_DATA_MULTI - lv_group_user_data_t focus_user_data; - lv_group_user_data_t style_mod_user_data; - lv_group_user_data_t style_mod_edit_user_data; + lv_group_user_data_t focus_user_data; + lv_group_user_data_t style_mod_user_data; + lv_group_user_data_t style_mod_edit_user_data; #endif - uint8_t frozen :1; /*1: can't focus to new object*/ - uint8_t editing :1; /*1: Edit mode, 0: Navigate mode*/ - uint8_t click_focus :1; /*1: If an object in a group is clicked by an indev then it will be focused */ - uint8_t refocus_policy :1; /*1: Focus prev if focused on deletion. 0: Focus next if focused on deletion.*/ - uint8_t wrap :1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end of list.*/ + uint8_t frozen : 1; /*1: can't focus to new object*/ + uint8_t editing : 1; /*1: Edit mode, 0: Navigate mode*/ + uint8_t click_focus : 1; /*1: If an object in a group is clicked by an indev then it will be + focused */ + uint8_t refocus_policy : 1; /*1: Focus prev if focused on deletion. 0: Focus next if focused on + deletion.*/ + uint8_t wrap : 1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end + of list.*/ } lv_group_t; -enum { - LV_GROUP_REFOCUS_POLICY_NEXT = 0, - LV_GROUP_REFOCUS_POLICY_PREV = 1 -}; +enum { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 }; typedef uint8_t lv_group_refocus_policy_t; /********************** @@ -84,9 +86,9 @@ typedef uint8_t lv_group_refocus_policy_t; **********************/ /** -* Init. the group module -* @remarks Internal function, do not call directly. -*/ + * Init. the group module + * @remarks Internal function, do not call directly. + */ void lv_group_init(void); /** @@ -169,7 +171,8 @@ void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_func_ void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb); /** - * Set whether the next or previous item in a group is focused if the currently focussed obj is deleted. + * Set whether the next or previous item in a group is focused if the currently focussed obj is + * deleted. * @param group pointer to a group * @param new refocus policy enum */ @@ -264,7 +267,8 @@ bool lv_group_get_click_focus(const lv_group_t * group); bool lv_group_get_wrap(lv_group_t * group); /** - * Notify the group that current theme changed and style modification callbacks need to be refreshed. + * Notify the group that current theme changed and style modification callbacks need to be + * refreshed. * @param group pointer to group. If NULL then all groups are notified. */ void lv_group_report_style_mod(lv_group_t * group); diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index d9c33e467439..2da59a3d3222 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -61,7 +61,7 @@ static lv_indev_t * indev_act; */ void lv_indev_init(void) { - lv_indev_reset(NULL); /*Reset all input devices*/ + lv_indev_reset(NULL); /*Reset all input devices*/ } /** @@ -77,7 +77,7 @@ void lv_indev_read_task(void * param) indev_act = param; /*Read and process all indevs*/ - if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/ + if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/ /*Handle reset query before processing the point*/ indev_proc_reset_query_handler(indev_act); @@ -115,10 +115,10 @@ void lv_indev_read_task(void * param) LV_LOG_TRACE("indev read task finished"); } - /** * Get the currently processed input device. Can be used in action functions too. - * @return pointer to the currently processed input device or NULL if no input device processing right now + * @return pointer to the currently processed input device or NULL if no input device processing + * right now */ lv_indev_t * lv_indev_get_act(void) { @@ -142,12 +142,13 @@ lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev) */ void lv_indev_reset(lv_indev_t * indev) { - if(indev) indev->proc.reset_query = 1; + if(indev) + indev->proc.reset_query = 1; else { lv_indev_t * i = lv_indev_get_next(NULL); while(i) { i->proc.reset_query = 1; - i = lv_indev_get_next(i); + i = lv_indev_get_next(i); } } } @@ -158,9 +159,9 @@ void lv_indev_reset(lv_indev_t * indev) */ void lv_indev_reset_long_press(lv_indev_t * indev) { - indev->proc.long_pr_sent = 0; + indev->proc.long_pr_sent = 0; indev->proc.longpr_rep_timestamp = lv_tick_get(); - indev->proc.pr_timestamp = lv_tick_get(); + indev->proc.pr_timestamp = lv_tick_get(); } /** @@ -186,7 +187,8 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) indev->cursor = cur_obj; lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); + lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, + indev->proc.types.pointer.act_point.y); } #if LV_USE_GROUP @@ -221,7 +223,7 @@ void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) * @param indev pointer to an input device * @param feedback feedback callback */ -void lv_indev_set_feedback(lv_indev_t *indev, lv_indev_feedback_t feedback) +void lv_indev_set_feedback(lv_indev_t * indev, lv_indev_feedback_t feedback) { indev->feedback = feedback; } @@ -249,24 +251,29 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point) */ uint32_t lv_indev_get_key(const lv_indev_t * indev) { - if(indev->driver.type != LV_INDEV_TYPE_KEYPAD) return 0; - else return indev->proc.types.keypad.last_key; + if(indev->driver.type != LV_INDEV_TYPE_KEYPAD) + return 0; + else + return indev->proc.types.keypad.last_key; } /** - * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) + * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and + * LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device * @return true: drag is in progress */ bool lv_indev_is_dragging(const lv_indev_t * indev) { if(indev == NULL) return false; - if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) return false; + if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) + return false; return indev->proc.types.pointer.drag_in_prog == 0 ? false : true; } /** - * Get the types.pointer.vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) + * Get the types.pointer.vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and + * LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device * @param point pointer to a point to store the types.pointer.vector */ @@ -292,7 +299,7 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) * @param indev pointer to an input device * @return feedback callback */ -lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev) +lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t * indev) { return indev->feedback; } @@ -334,9 +341,8 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev) static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ - if(i->cursor != NULL && - (i->proc.types.pointer.last_point.x != data->point.x || - i->proc.types.pointer.last_point.y != data->point.y)) { + if(i->cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || + i->proc.types.pointer.last_point.y != data->point.y)) { lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } @@ -364,10 +370,10 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return; if(i->proc.wait_until_release) { - i->proc.wait_until_release = 0; - i->proc.pr_timestamp = 0; - i->proc.long_pr_sent = 0; - i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ + i->proc.wait_until_release = 0; + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; + i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ } lv_group_t * g = i->group; @@ -386,35 +392,36 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /* Save the previous state so we can detect state changes below and also set the last state now * so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered * for the next time*/ - uint32_t prev_state = i->proc.types.keypad.last_state; + uint32_t prev_state = i->proc.types.keypad.last_state; i->proc.types.keypad.last_state = data->state; /*Key press happened*/ - if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_REL) - { + if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_REL) { i->proc.pr_timestamp = lv_tick_get(); /*Simulate a press on the object if ENTER was pressed*/ if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ /*Send the ENTER as a normal KEY*/ lv_group_send_data(g, LV_GROUP_KEY_ENTER); } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, + false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on PREV*/ else if(data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, + false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { @@ -422,76 +429,78 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) - { + else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) { /*Long press time has elapsed?*/ - if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { + if(i->proc.long_pr_sent == 0 && + lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { i->proc.long_pr_sent = 1; if(data->key == LV_GROUP_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } } /*Long press repeated time has elapsed?*/ - else if(i->proc.long_pr_sent != 0 && lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver.long_press_rep_time) { + else if(i->proc.long_pr_sent != 0 && + lv_tick_elaps(i->proc.longpr_rep_timestamp) > i->driver.long_press_rep_time) { i->proc.longpr_rep_timestamp = lv_tick_get(); /*Send LONG_PRESS_REP on ENTER*/ if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on NEXT again*/ else if(data->key == LV_GROUP_KEY_NEXT) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing( + g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on PREV again*/ else if(data->key == LV_GROUP_KEY_PREV) { - lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing( + g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { lv_group_send_data(g, data->key); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && prev_state == LV_INDEV_STATE_PR) - { + else if(data->state == LV_INDEV_STATE_REL && prev_state == LV_INDEV_STATE_PR) { /*The user might clear the key when it was released. Always release the pressed key*/ data->key = prev_key; if(data->key == LV_GROUP_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ if(i->proc.long_pr_sent == 0) { lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); } lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } #else (void)data; /*Unused*/ - (void)i; /*Unused*/ + (void)i; /*Unused*/ #endif } @@ -507,10 +516,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->state == LV_INDEV_STATE_PR && i->proc.wait_until_release) return; if(i->proc.wait_until_release) { - i->proc.wait_until_release = 0; - i->proc.pr_timestamp = 0; - i->proc.long_pr_sent = 0; - i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ + i->proc.wait_until_release = 0; + i->proc.pr_timestamp = 0; + i->proc.long_pr_sent = 0; + i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ } lv_group_t * g = i->group; @@ -546,26 +555,24 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(focused == NULL) return; /*Button press happened*/ - if(data->state == LV_INDEV_STATE_PR && - i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) - { + if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_PR && + i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) - { + lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -573,21 +580,24 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(editable) { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ if(lv_ll_is_empty(&g->obj_ll) == false) { - lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ + lv_group_set_editing(g, lv_group_get_editing(g) + ? false + : true); /*Toggle edit mode on long press*/ } } /*If not editable then just send a long press signal*/ else { focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } i->proc.long_pr_sent = 1; } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_REL && + i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -595,39 +605,40 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ if(i->proc.long_pr_sent == 0) lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*An object is being edited and the button is released. */ else if(g->editing) { /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ lv_group_send_data(g, LV_GROUP_KEY_ENTER); } } - /*If the focused object is editable and now in navigate mode then on enter switch edit mode*/ + /*If the focused object is editable and now in navigate mode then on enter switch edit + mode*/ else if(editable && !g->editing && !i->proc.long_pr_sent) { - lv_group_set_editing(g, true); /*Set edit mode*/ + lv_group_set_editing(g, true); /*Set edit mode*/ } i->proc.pr_timestamp = 0; @@ -635,10 +646,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } i->proc.types.keypad.last_state = data->state; - i->proc.types.keypad.last_key = data->key; + i->proc.types.keypad.last_key = data->key; #else (void)data; /*Unused*/ - (void)i; /*Unused*/ + (void)i; /*Unused*/ #endif } @@ -655,9 +666,8 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) /*Still the same point is pressed*/ if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && - i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && - data->state == LV_INDEV_STATE_PR) - { + i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && + data->state == LV_INDEV_STATE_PR) { indev_proc_press(&i->proc); } else { /*If a new point comes always make a release*/ @@ -689,14 +699,14 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*If there is last object but it is not dragged and not protected also search*/ else if(proc->types.pointer.drag_in_prog == 0 && - lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now types.pointer.act_obj != NULL*/ + lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST) == + false) { /*Now types.pointer.act_obj != NULL*/ pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If a dragable or a protected object was the last then keep it*/ else { - } /*If a new object was found reset some variables and send a pressed signal*/ @@ -707,29 +717,31 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If a new object found the previous was lost, so send a signal*/ if(proc->types.pointer.act_obj != NULL) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, + LV_SIGNAL_PRESS_LOST, indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } - proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ - proc->types.pointer.last_obj = proc->types.pointer.act_obj; /*Refresh the types.pointer.last_obj*/ + proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ + proc->types.pointer.last_obj = + proc->types.pointer.act_obj; /*Refresh the types.pointer.last_obj*/ if(proc->types.pointer.act_obj != NULL) { /* Save the time when the obj pressed. * It is necessary to count the long press time.*/ - proc->pr_timestamp = lv_tick_get(); - proc->long_pr_sent = 0; + proc->pr_timestamp = lv_tick_get(); + proc->long_pr_sent = 0; proc->types.pointer.drag_limit_out = 0; - proc->types.pointer.drag_in_prog = 0; - proc->types.pointer.drag_sum.x = 0; - proc->types.pointer.drag_sum.y = 0; - proc->types.pointer.vect.x = 0; - proc->types.pointer.vect.y = 0; + proc->types.pointer.drag_in_prog = 0; + proc->types.pointer.drag_sum.x = 0; + proc->types.pointer.drag_sum.y = 0; + proc->types.pointer.vect.x = 0; + proc->types.pointer.vect.y = 0; /*Search for 'top' attribute*/ - lv_obj_t * i = proc->types.pointer.act_obj; + lv_obj_t * i = proc->types.pointer.act_obj; lv_obj_t * last_top = NULL; while(i != NULL) { if(i->top != 0) last_top = i; @@ -745,10 +757,11 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*Send a signal about the press*/ - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, + indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } } @@ -759,21 +772,26 @@ static void indev_proc_press(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.x = (proc->types.pointer.drag_throw_vect.x * 5) >> 3; proc->types.pointer.drag_throw_vect.y = (proc->types.pointer.drag_throw_vect.y * 5) >> 3; - if(proc->types.pointer.drag_throw_vect.x < 0) proc->types.pointer.drag_throw_vect.x++; - else if(proc->types.pointer.drag_throw_vect.x > 0) proc->types.pointer.drag_throw_vect.x--; + if(proc->types.pointer.drag_throw_vect.x < 0) + proc->types.pointer.drag_throw_vect.x++; + else if(proc->types.pointer.drag_throw_vect.x > 0) + proc->types.pointer.drag_throw_vect.x--; - if(proc->types.pointer.drag_throw_vect.y < 0) proc->types.pointer.drag_throw_vect.y++; - else if(proc->types.pointer.drag_throw_vect.y > 0) proc->types.pointer.drag_throw_vect.y--; + if(proc->types.pointer.drag_throw_vect.y < 0) + proc->types.pointer.drag_throw_vect.y++; + else if(proc->types.pointer.drag_throw_vect.y > 0) + proc->types.pointer.drag_throw_vect.y--; proc->types.pointer.drag_throw_vect.x += (proc->types.pointer.vect.x * 4) >> 3; proc->types.pointer.drag_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3; /*If there is active object and it can be dragged run the drag*/ if(proc->types.pointer.act_obj != NULL) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, + indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSING, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ indev_drag(proc); if(proc->reset_query != 0) return; @@ -783,9 +801,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ /*Mark the signal sending to do not send it again*/ proc->long_pr_sent = 1; @@ -799,11 +817,10 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ proc->longpr_rep_timestamp = lv_tick_get(); - } } } @@ -816,67 +833,73 @@ static void indev_proc_press(lv_indev_proc_t * proc) static void indev_proc_release(lv_indev_proc_t * proc) { if(proc->wait_until_release != 0) { - proc->types.pointer.act_obj = NULL; + proc->types.pointer.act_obj = NULL; proc->types.pointer.last_obj = NULL; - proc->pr_timestamp = 0; - proc->longpr_rep_timestamp = 0; - proc->wait_until_release = 0; + proc->pr_timestamp = 0; + proc->longpr_rep_timestamp = 0; + proc->wait_until_release = 0; } /*Forget the act obj and send a released signal */ if(proc->types.pointer.act_obj) { /* If the object was protected against press lost then it possible that * the object is already not pressed but still it is the `act_obj`. - * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if the indev is ON the `types.pointer.act_obj` */ + * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if + * the indev is ON the `types.pointer.act_obj` */ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, + indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, + indev_act); + if(proc->reset_query) return; /*The object might be deleted*/ if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } if(proc->reset_query != 0) return; - /*Handle click focus*/ + /*Handle click focus*/ #if LV_USE_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); if(lv_group_get_editing(g)) lv_group_set_editing(g, false); /*Check, if the parent is in a group focus on it.*/ - if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click focus protection*/ + if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == + false) { /*Respect the click focus protection*/ lv_obj_t * parent = proc->types.pointer.act_obj; while(g == NULL) { parent = lv_obj_get_parent(parent); if(parent == NULL) break; - if(lv_obj_is_protected(parent, LV_PROTECT_CLICK_FOCUS)) { /*Ignore is the protected against click focus*/ + if(lv_obj_is_protected( + parent, + LV_PROTECT_CLICK_FOCUS)) { /*Ignore is the protected against click focus*/ parent = NULL; break; } @@ -898,18 +921,19 @@ static void indev_proc_release(lv_indev_proc_t * proc) * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL); - if(proc->reset_query) return; /*Not so strict as it's only the previous object and indev not uses it.*/ + if(proc->reset_query) + return; /*Not so strict as it's only the previous object and indev not uses it.*/ lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ proc->types.pointer.last_pressed = proc->types.pointer.act_obj; } if(proc->reset_query != 0) return; proc->types.pointer.act_obj = NULL; - proc->pr_timestamp = 0; - proc->longpr_rep_timestamp = 0; + proc->pr_timestamp = 0; + proc->longpr_rep_timestamp = 0; } /*The reset can be set in the signal function. @@ -930,19 +954,19 @@ static void indev_proc_release(lv_indev_proc_t * proc) static void indev_proc_reset_query_handler(lv_indev_t * indev) { if(indev->proc.reset_query) { - indev->proc.types.pointer.act_obj = NULL; - indev->proc.types.pointer.last_obj = NULL; - indev->proc.types.pointer.last_pressed = NULL; - indev->proc.types.pointer.drag_limit_out = 0; - indev->proc.types.pointer.drag_in_prog = 0; - indev->proc.long_pr_sent = 0; - indev->proc.pr_timestamp = 0; - indev->proc.longpr_rep_timestamp = 0; - indev->proc.types.pointer.drag_sum.x = 0; - indev->proc.types.pointer.drag_sum.y = 0; + indev->proc.types.pointer.act_obj = NULL; + indev->proc.types.pointer.last_obj = NULL; + indev->proc.types.pointer.last_pressed = NULL; + indev->proc.types.pointer.drag_limit_out = 0; + indev->proc.types.pointer.drag_in_prog = 0; + indev->proc.long_pr_sent = 0; + indev->proc.pr_timestamp = 0; + indev->proc.longpr_rep_timestamp = 0; + indev->proc.types.pointer.drag_sum.x = 0; + indev->proc.types.pointer.drag_sum.y = 0; indev->proc.types.pointer.drag_throw_vect.x = 0; indev->proc.types.pointer.drag_throw_vect.y = 0; - indev->proc.reset_query = 0; + indev->proc.reset_query = 0; } } /** @@ -960,7 +984,8 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { lv_obj_t * i; - LV_LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) + { found_p = indev_search_obj(proc, i); /*If a child was found then break*/ @@ -980,7 +1005,6 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) /*No parent found with hidden == true*/ if(hidden_i == NULL) found_p = obj; } - } return found_p; @@ -995,8 +1019,7 @@ static void indev_drag(lv_indev_proc_t * state) lv_obj_t * drag_obj = state->types.pointer.act_obj; /*If drag parent is active check recursively the drag_parent attribute*/ - while(lv_obj_get_drag_parent(drag_obj) != false && - drag_obj != NULL) { + while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) { drag_obj = lv_obj_get_parent(drag_obj); } @@ -1012,7 +1035,7 @@ static void indev_drag(lv_indev_proc_t * state) if(state->types.pointer.drag_limit_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ if(LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit || - LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit) { + LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit) { state->types.pointer.drag_limit_out = 1; } } @@ -1020,26 +1043,27 @@ static void indev_drag(lv_indev_proc_t * state) /*If the drag limit is exceeded handle the dragging*/ if(state->types.pointer.drag_limit_out != 0) { /*Set new position if the vector is not zero*/ - if(state->types.pointer.vect.x != 0 || - state->types.pointer.vect.y != 0) - { + if(state->types.pointer.vect.x != 0 || state->types.pointer.vect.y != 0) { /*Get the coordinates of the object and modify them*/ - lv_coord_t act_x = lv_obj_get_x(drag_obj); - lv_coord_t act_y = lv_obj_get_y(drag_obj); - uint16_t inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); /*Get the number of currently invalidated areas*/ + lv_coord_t act_x = lv_obj_get_x(drag_obj); + lv_coord_t act_y = lv_obj_get_y(drag_obj); + uint16_t inv_buf_size = lv_disp_get_inv_buf_size( + indev_act->driver.disp); /*Get the number of currently invalidated areas*/ - lv_coord_t prev_x = drag_obj->coords.x1; - lv_coord_t prev_y = drag_obj->coords.y1; + lv_coord_t prev_x = drag_obj->coords.x1; + lv_coord_t prev_y = drag_obj->coords.y1; lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); - lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, + act_y + state->types.pointer.vect.y); /*Set the drag in progress flag if the object is really moved*/ if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { - if(state->types.pointer.drag_in_prog != 0) { /*Send the drag begin signal on first move*/ - drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); + if(state->types.pointer.drag_in_prog != + 0) { /*Send the drag begin signal on first move*/ + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; } state->types.pointer.drag_in_prog = 1; @@ -1053,7 +1077,8 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); if(act_par_w == prev_par_w && act_par_h == prev_par_h) { uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); - lv_disp_pop_from_inv_buf(indev_act->driver.disp, new_inv_buf_size - inv_buf_size); + lv_disp_pop_from_inv_buf(indev_act->driver.disp, + new_inv_buf_size - inv_buf_size); } } } @@ -1072,8 +1097,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) lv_obj_t * drag_obj = proc->types.pointer.last_obj; /*If drag parent is active check recursively the drag_parent attribute*/ - while(lv_obj_get_drag_parent(drag_obj) != false && - drag_obj != NULL) { + while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) { drag_obj = lv_obj_get_parent(drag_obj); } @@ -1089,11 +1113,12 @@ static void indev_drag_throw(lv_indev_proc_t * proc) } /*Reduce the vectors*/ - proc->types.pointer.drag_throw_vect.x = proc->types.pointer.drag_throw_vect.x * (100 - indev_act->driver.drag_throw) / 100; - proc->types.pointer.drag_throw_vect.y = proc->types.pointer.drag_throw_vect.y * (100 - indev_act->driver.drag_throw) / 100; + proc->types.pointer.drag_throw_vect.x = + proc->types.pointer.drag_throw_vect.x * (100 - indev_act->driver.drag_throw) / 100; + proc->types.pointer.drag_throw_vect.y = + proc->types.pointer.drag_throw_vect.y * (100 - indev_act->driver.drag_throw) / 100; - if(proc->types.pointer.drag_throw_vect.x != 0 || - proc->types.pointer.drag_throw_vect.y != 0) { + if(proc->types.pointer.drag_throw_vect.x != 0 || proc->types.pointer.drag_throw_vect.y != 0) { /*Get the coordinates and modify them*/ lv_area_t coords_ori; lv_obj_get_coords(drag_obj, &coords_ori); @@ -1106,22 +1131,21 @@ static void indev_drag_throw(lv_indev_proc_t * proc) /*If non of the coordinates are changed then do not continue throwing*/ if((coords_ori.x1 == coord_new.x1 || proc->types.pointer.drag_throw_vect.x == 0) && - (coords_ori.y1 == coord_new.y1 || proc->types.pointer.drag_throw_vect.y == 0)) { - proc->types.pointer.drag_in_prog = 0; - proc->types.pointer.vect.x = 0; - proc->types.pointer.vect.y = 0; + (coords_ori.y1 == coord_new.y1 || proc->types.pointer.drag_throw_vect.y == 0)) { + proc->types.pointer.drag_in_prog = 0; + proc->types.pointer.vect.x = 0; + proc->types.pointer.vect.y = 0; proc->types.pointer.drag_throw_vect.x = 0; proc->types.pointer.drag_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ - + if(proc->reset_query) return; /*The object might be deleted*/ } } - /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end signal*/ + /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end + signal*/ else { proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + if(proc->reset_query) return; /*The object might be deleted*/ } - } diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index dfd5a15ecfa9..92ebe8701d2a 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -42,11 +42,11 @@ void lv_indev_read_task(void * param); /** * Get the currently processed input device. Can be used in action functions too. - * @return pointer to the currently processed input device or NULL if no input device processing right now + * @return pointer to the currently processed input device or NULL if no input device processing + * right now */ lv_indev_t * lv_indev_get_act(void); - /** * Get the type of an input device * @param indev pointer to an input device @@ -78,7 +78,7 @@ void lv_indev_enable(lv_indev_t * indev, bool en); * @param indev pointer to an input device * @param cur_obj pointer to an object to be used as cursor */ -void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); +void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj); #if LV_USE_GROUP /** @@ -86,7 +86,7 @@ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); * @param indev pointer to an input device * @param group point to a group */ -void lv_indev_set_group(lv_indev_t *indev, lv_group_t *group); +void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group); #endif /** @@ -95,14 +95,14 @@ void lv_indev_set_group(lv_indev_t *indev, lv_group_t *group); * @param indev pointer to an input device * @param group point to a group */ -void lv_indev_set_button_points(lv_indev_t *indev, const lv_point_t *points); +void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points); /** * Set feedback callback for indev. * @param indev pointer to an input device * @param feedback feedback callback */ -void lv_indev_set_feedback(lv_indev_t *indev, lv_indev_feedback_t feedback); +void lv_indev_set_feedback(lv_indev_t * indev, lv_indev_feedback_t feedback); /** * Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) @@ -119,14 +119,16 @@ void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point); uint32_t lv_indev_get_key(const lv_indev_t * indev); /** - * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) + * Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and + * LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device * @return true: drag is in progress */ bool lv_indev_is_dragging(const lv_indev_t * indev); /** - * Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) + * Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and + * LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device * @param point pointer to a point to store the vector */ @@ -137,7 +139,7 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point); * @param indev pointer to an input device * @return feedback callback */ -lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev); +lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t * indev); /** * Do nothing until the next release @@ -157,9 +159,8 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_INDEV_H*/ +#endif /*LV_INDEV_H*/ diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 91792f7496c3..ce87afa80875 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -22,14 +22,14 @@ #include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* * DEFINES *********************/ -#define LV_OBJ_DEF_WIDTH (LV_DPI) -#define LV_OBJ_DEF_HEIGHT (2 * LV_DPI / 3) +#define LV_OBJ_DEF_WIDTH (LV_DPI) +#define LV_OBJ_DEF_HEIGHT (2 * LV_DPI / 3) /********************** * TYPEDEFS @@ -42,16 +42,16 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor static void report_style_mod_core(void * style_p, lv_obj_t * obj); static void refresh_children_style(lv_obj_t * obj); static void delete_children(lv_obj_t * obj); -static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); +static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); /********************** * STATIC VARIABLES **********************/ static bool lv_initialized = false; -static lv_obj_t * event_act_obj; /*Stores the which event is currently being executed*/ -static bool event_act_obj_deleted; /*Shows that the object was deleted in the event function*/ -static const void * event_act_data; /*Stores the data passed to the event*/ +static lv_obj_t * event_act_obj; /*Stores the which event is currently being executed*/ +static bool event_act_obj_deleted; /*Shows that the object was deleted in the event function*/ +static const void * event_act_data; /*Stores the data passed to the event*/ /********************** * MACROS **********************/ @@ -66,7 +66,7 @@ static const void * event_act_data; /*Stores the data passed to the ev void lv_init(void) { /* Do nothing if already initialized */ - if (lv_initialized) { + if(lv_initialized) { LV_LOG_WARN("lv_init: already inited"); return; } @@ -99,7 +99,6 @@ void lv_init(void) lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t)); lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t)); - #if LV_INDEV_READ_PERIOD != 0 /*Init the input device handling*/ lv_indev_init(); @@ -120,7 +119,7 @@ void lv_init(void) * @param copy pointer to a base object, if not NULL then the new object will be copied from it * @return pointer to the new object */ -lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) +lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) { lv_obj_t * new_obj = NULL; @@ -129,7 +128,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) LV_LOG_TRACE("Screen create started"); lv_disp_t * disp = lv_disp_get_default(); if(!disp) { - LV_LOG_WARN("lv_obj_create: not display created to so far. No place to assign the new screen"); + LV_LOG_WARN( + "lv_obj_create: not display created to so far. No place to assign the new screen"); return NULL; } @@ -145,14 +145,14 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->coords.y1 = 0; new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1; new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; - new_obj->ext_size = 0; + new_obj->ext_size = 0; /*Init realign*/ #if LV_OBJ_REALIGN - new_obj->realign.align = LV_ALIGN_CENTER; - new_obj->realign.xofs = 0; - new_obj->realign.yofs = 0; - new_obj->realign.base = NULL; + new_obj->realign.align = LV_ALIGN_CENTER; + new_obj->realign.xofs = 0; + new_obj->realign.yofs = 0; + new_obj->realign.base = NULL; new_obj->realign.auto_realign = 0; #endif @@ -182,15 +182,15 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->group_p = NULL; #endif /*Set attributes*/ - new_obj->click = 0; - new_obj->drag = 0; - new_obj->drag_throw = 0; - new_obj->drag_parent = 0; - new_obj->hidden = 0; - new_obj->top = 0; - new_obj->protect = LV_PROTECT_NONE; + new_obj->click = 0; + new_obj->drag = 0; + new_obj->drag_throw = 0; + new_obj->drag_parent = 0; + new_obj->hidden = 0; + new_obj->top = 0; + new_obj->protect = LV_PROTECT_NONE; new_obj->opa_scale_en = 0; - new_obj->opa_scale = LV_OPA_COVER; + new_obj->opa_scale = LV_OPA_COVER; new_obj->parent_event = 0; new_obj->ext_attr = NULL; @@ -205,25 +205,22 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_mem_assert(new_obj); if(new_obj == NULL) return NULL; - new_obj->par = parent; /*Set the parent*/ lv_ll_init(&(new_obj->child_ll), sizeof(lv_obj_t)); /*Set coordinates left top corner of parent*/ new_obj->coords.x1 = parent->coords.x1; new_obj->coords.y1 = parent->coords.y1; - new_obj->coords.x2 = parent->coords.x1 + - LV_OBJ_DEF_WIDTH; - new_obj->coords.y2 = parent->coords.y1 + - LV_OBJ_DEF_HEIGHT; - new_obj->ext_size = 0; + new_obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH; + new_obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT; + new_obj->ext_size = 0; /*Init realign*/ #if LV_OBJ_REALIGN - new_obj->realign.align = LV_ALIGN_CENTER; - new_obj->realign.xofs = 0; - new_obj->realign.yofs = 0; - new_obj->realign.base = NULL; + new_obj->realign.align = LV_ALIGN_CENTER; + new_obj->realign.xofs = 0; + new_obj->realign.yofs = 0; + new_obj->realign.base = NULL; new_obj->realign.auto_realign = 0; #endif /*Set appearance*/ @@ -254,14 +251,14 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #endif /*Set attributes*/ - new_obj->click = 1; - new_obj->drag = 0; - new_obj->drag_throw = 0; - new_obj->drag_parent = 0; - new_obj->hidden = 0; - new_obj->top = 0; - new_obj->protect = LV_PROTECT_NONE; - new_obj->opa_scale = LV_OPA_COVER; + new_obj->click = 1; + new_obj->drag = 0; + new_obj->drag_throw = 0; + new_obj->drag_parent = 0; + new_obj->hidden = 0; + new_obj->top = 0; + new_obj->protect = LV_PROTECT_NONE; + new_obj->opa_scale = LV_OPA_COVER; new_obj->opa_scale_en = 0; new_obj->parent_event = 0; @@ -285,28 +282,29 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Copy realign*/ #if LV_OBJ_REALIGN - new_obj->realign.align = copy->realign.align; - new_obj->realign.xofs = copy->realign.xofs; - new_obj->realign.yofs = copy->realign.yofs; - new_obj->realign.base = copy->realign.base; + new_obj->realign.align = copy->realign.align; + new_obj->realign.xofs = copy->realign.xofs; + new_obj->realign.yofs = copy->realign.yofs; + new_obj->realign.base = copy->realign.base; new_obj->realign.auto_realign = copy->realign.auto_realign; #endif - /*Only copy the `event_cb`. `signal_cb` and `design_cb` will be copied the the derived object type (e.g. `lv_btn`)*/ - new_obj-> event_cb = copy->event_cb; + /*Only copy the `event_cb`. `signal_cb` and `design_cb` will be copied the the derived + * object type (e.g. `lv_btn`)*/ + new_obj->event_cb = copy->event_cb; /*Copy attributes*/ - new_obj->click = copy->click; - new_obj->drag = copy->drag; - new_obj->drag_throw = copy->drag_throw; - new_obj->drag_parent = copy->drag_parent; - new_obj->hidden = copy->hidden; - new_obj->top = copy->top; + new_obj->click = copy->click; + new_obj->drag = copy->drag; + new_obj->drag_throw = copy->drag_throw; + new_obj->drag_parent = copy->drag_parent; + new_obj->hidden = copy->hidden; + new_obj->top = copy->top; new_obj->parent_event = copy->parent_event; new_obj->opa_scale_en = copy->opa_scale_en; - new_obj->protect = copy->protect; - new_obj->opa_scale = copy->opa_scale; + new_obj->protect = copy->protect; + new_obj->opa_scale = copy->opa_scale; new_obj->style_p = copy->style_p; @@ -322,7 +320,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) LV_LOG_INFO("Object create ready"); } - /*Send a signal to the parent to notify it about the new child*/ if(parent != NULL) { parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, new_obj); @@ -345,7 +342,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; - /*Delete from the group*/ + /*Delete from the group*/ #if LV_USE_GROUP bool was_focused = false; @@ -405,7 +402,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL); /*Delete the base objects*/ - if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); + if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); lv_mem_free(obj); /*Free the object itself*/ /*Send a signal to the parent to notify it about the child delete*/ @@ -443,14 +440,13 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*Invalidate the object only if it belongs to the 'LV_GC_ROOT(_lv_act_scr)'*/ lv_obj_t * obj_scr = lv_obj_get_screen(obj); - lv_disp_t * disp = lv_obj_get_disp(obj_scr); - if(obj_scr == lv_disp_get_scr_act(disp) || - obj_scr == lv_disp_get_layer_top(disp)|| - obj_scr == lv_disp_get_layer_sys(disp)) { + lv_disp_t * disp = lv_obj_get_disp(obj_scr); + if(obj_scr == lv_disp_get_scr_act(disp) || obj_scr == lv_disp_get_layer_top(disp) || + obj_scr == lv_disp_get_layer_sys(disp)) { /*Truncate recursively to the parents*/ lv_area_t area_trunc; lv_obj_t * par = lv_obj_get_parent(obj); - bool union_ok = true; + bool union_ok = true; /*Start with the original coordinates*/ lv_coord_t ext_size = obj->ext_size; lv_area_copy(&area_trunc, &obj->coords); @@ -462,8 +458,9 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*Check through all parents*/ while(par != NULL) { union_ok = lv_area_intersect(&area_trunc, &area_trunc, &par->coords); - if(union_ok == false) break; /*If no common parts with parent break;*/ - if(lv_obj_get_hidden(par)) return; /*If the parent is hidden then the child is hidden and won't be drawn*/ + if(union_ok == false) break; /*If no common parts with parent break;*/ + if(lv_obj_get_hidden(par)) + return; /*If the parent is hidden then the child is hidden and won't be drawn*/ par = lv_obj_get_parent(par); } @@ -472,7 +469,6 @@ void lv_obj_invalidate(const lv_obj_t * obj) } } - /*===================== * Setter functions *====================*/ @@ -498,7 +494,6 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent) return; } - lv_obj_invalidate(obj); lv_point_t old_pos; @@ -534,13 +529,13 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) { /*Convert x and y to absolute coordinates*/ lv_obj_t * par = obj->par; - x = x + par->coords.x1; - y = y + par->coords.y1; + x = x + par->coords.x1; + y = y + par->coords.y1; /*Calculate and set the movement*/ lv_point_t diff; - diff.x = x - obj->coords.x1; - diff.y = y - obj->coords.y1; + diff.x = x - obj->coords.x1; + diff.y = y - obj->coords.y1; /* Do nothing if the position is not changed */ /* It is very important else recursive positioning can @@ -571,7 +566,6 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_obj_invalidate(obj); } - /** * Set the x coordinate of a object * @param obj pointer to an object @@ -582,7 +576,6 @@ void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x) lv_obj_set_pos(obj, x, lv_obj_get_y(obj)); } - /** * Set the y coordinate of a object * @param obj pointer to an object @@ -616,11 +609,10 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) lv_area_t ori; lv_obj_get_coords(obj, &ori); - //Set the length and height + // Set the length and height obj->coords.x2 = obj->coords.x1 + w - 1; obj->coords.y2 = obj->coords.y1 + h - 1; - /*Send a signal to the object with its new coordinates*/ obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori); @@ -630,8 +622,9 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) /*Tell the children the parent's size has changed*/ lv_obj_t * i; - LV_LL_READ(obj->child_ll, i) { - i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + LV_LL_READ(obj->child_ll, i) + { + i->signal_cb(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } /*Invalidate the new area*/ @@ -671,7 +664,8 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h) * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod) +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, + lv_coord_t y_mod) { lv_coord_t new_x = lv_obj_get_x(obj); lv_coord_t new_y = lv_obj_get_y(obj); @@ -731,12 +725,12 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co case LV_ALIGN_OUT_TOP_MID: new_x = lv_obj_get_width(base) / 2 - lv_obj_get_width(obj) / 2; - new_y = - lv_obj_get_height(obj); + new_y = -lv_obj_get_height(obj); break; case LV_ALIGN_OUT_TOP_RIGHT: new_x = lv_obj_get_width(base) - lv_obj_get_width(obj); - new_y = - lv_obj_get_height(obj); + new_y = -lv_obj_get_height(obj); break; case LV_ALIGN_OUT_BOTTOM_LEFT: @@ -755,17 +749,17 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co break; case LV_ALIGN_OUT_LEFT_TOP: - new_x = - lv_obj_get_width(obj); + new_x = -lv_obj_get_width(obj); new_y = 0; break; case LV_ALIGN_OUT_LEFT_MID: - new_x = - lv_obj_get_width(obj); + new_x = -lv_obj_get_width(obj); new_y = lv_obj_get_height(base) / 2 - lv_obj_get_height(obj) / 2; break; case LV_ALIGN_OUT_LEFT_BOTTOM: - new_x = - lv_obj_get_width(obj); + new_x = -lv_obj_get_width(obj); new_y = lv_obj_get_height(base) - lv_obj_get_height(obj); break; @@ -786,11 +780,11 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co } /*Bring together the coordination system of base and obj*/ - lv_obj_t * par = lv_obj_get_parent(obj); + lv_obj_t * par = lv_obj_get_parent(obj); lv_coord_t base_abs_x = base->coords.x1; lv_coord_t base_abs_y = base->coords.y1; - lv_coord_t par_abs_x = par->coords.x1; - lv_coord_t par_abs_y = par->coords.y1; + lv_coord_t par_abs_x = par->coords.x1; + lv_coord_t par_abs_y = par->coords.y1; new_x += x_mod + base_abs_x; new_y += y_mod + base_abs_y; new_x -= par_abs_x; @@ -800,10 +794,10 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co #if LV_OBJ_REALIGN /*Save the last align parameters to use them in `lv_obj_realign`*/ - obj->realign.align = align; - obj->realign.xofs = x_mod; - obj->realign.yofs = y_mod; - obj->realign.base = base; + obj->realign.align = align; + obj->realign.xofs = x_mod; + obj->realign.yofs = y_mod; + obj->realign.base = base; obj->realign.origo_align = 0; #endif } @@ -816,12 +810,13 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod) +void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, + lv_coord_t y_mod) { lv_coord_t new_x = lv_obj_get_x(obj); lv_coord_t new_y = lv_obj_get_y(obj); - lv_coord_t obj_w_half = lv_obj_get_width(obj) / 2; + lv_coord_t obj_w_half = lv_obj_get_width(obj) / 2; lv_coord_t obj_h_half = lv_obj_get_height(obj) / 2; if(base == NULL) { @@ -884,7 +879,7 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, case LV_ALIGN_OUT_TOP_RIGHT: new_x = lv_obj_get_width(base) - obj_w_half; - new_y = - obj_h_half; + new_y = -obj_h_half; break; case LV_ALIGN_OUT_BOTTOM_LEFT: @@ -903,17 +898,17 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, break; case LV_ALIGN_OUT_LEFT_TOP: - new_x = - obj_w_half ; - new_y = - obj_h_half; + new_x = -obj_w_half; + new_y = -obj_h_half; break; case LV_ALIGN_OUT_LEFT_MID: - new_x = - obj_w_half; + new_x = -obj_w_half; new_y = lv_obj_get_height(base) / 2 - obj_h_half; break; case LV_ALIGN_OUT_LEFT_BOTTOM: - new_x = - obj_w_half; + new_x = -obj_w_half; new_y = lv_obj_get_height(base) - obj_h_half; break; @@ -934,11 +929,11 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, } /*Bring together the coordination system of base and obj*/ - lv_obj_t * par = lv_obj_get_parent(obj); + lv_obj_t * par = lv_obj_get_parent(obj); lv_coord_t base_abs_x = base->coords.x1; lv_coord_t base_abs_y = base->coords.y1; - lv_coord_t par_abs_x = par->coords.x1; - lv_coord_t par_abs_y = par->coords.y1; + lv_coord_t par_abs_x = par->coords.x1; + lv_coord_t par_abs_y = par->coords.y1; new_x += x_mod + base_abs_x; new_y += y_mod + base_abs_y; new_x -= par_abs_x; @@ -948,10 +943,10 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, #if LV_OBJ_REALIGN /*Save the last align parameters to use them in `lv_obj_realign`*/ - obj->realign.align = align; - obj->realign.xofs = x_mod; - obj->realign.yofs = y_mod; - obj->realign.base = base; + obj->realign.align = align; + obj->realign.xofs = x_mod; + obj->realign.yofs = y_mod; + obj->realign.base = base; obj->realign.origo_align = 1; #endif } @@ -963,16 +958,21 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, void lv_obj_realign(lv_obj_t * obj) { #if LV_OBJ_REALIGN - if(obj->realign.origo_align) lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs); - else lv_obj_align(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs); + if(obj->realign.origo_align) + lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, + obj->realign.yofs); + else + lv_obj_align(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, + obj->realign.yofs); #else - (void) obj; + (void)obj; LV_LOG_WARN("lv_obj_realaign: no effect because LV_OBJ_REALIGN = 0"); #endif } /** - * Enable the automatic realign of the object when its size has changed based on the last `lv_obj_align` parameters. + * Enable the automatic realign of the object when its size has changed based on the last + * `lv_obj_align` parameters. * @param obj pointer to an object * @param en true: enable auto realign; false: disable auto realign */ @@ -981,8 +981,8 @@ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en) #if LV_OBJ_REALIGN obj->realign.auto_realign = en ? 1 : 0; #else - (void) obj; - (void) en; + (void)obj; + (void)en; LV_LOG_WARN("lv_obj_set_auto_realign: no effect because LV_OBJ_REALIGN = 0"); #endif } @@ -1016,7 +1016,6 @@ void lv_obj_refresh_style(lv_obj_t * obj) lv_obj_invalidate(obj); obj->signal_cb(obj, LV_SIGNAL_STYLE_CHG, NULL); lv_obj_invalidate(obj); - } /** @@ -1030,7 +1029,8 @@ void lv_obj_report_style_mod(lv_style_t * style) while(d) { lv_obj_t * i; - LV_LL_READ(d->scr_ll, i) { + LV_LL_READ(d->scr_ll, i) + { if(i->style_p == style || style == NULL) { lv_obj_refresh_style(i); } @@ -1052,15 +1052,16 @@ void lv_obj_report_style_mod(lv_style_t * style) */ void lv_obj_set_hidden(lv_obj_t * obj, bool en) { - if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ + if(!obj->hidden) + lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ obj->hidden = en == false ? 0 : 1; - if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ + if(!obj->hidden) + lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ lv_obj_t * par = lv_obj_get_parent(obj); par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj); - } /** @@ -1091,7 +1092,7 @@ void lv_obj_set_top(lv_obj_t * obj, bool en) */ void lv_obj_set_drag(lv_obj_t * obj, bool en) { - if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/ + if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/ obj->drag = (en == true ? 1 : 0); } @@ -1133,7 +1134,7 @@ void lv_obj_set_parent_event(lv_obj_t * obj, bool en) */ void lv_obj_set_opa_scale_enable(lv_obj_t * obj, bool en) { - obj->opa_scale_en = en ? 1 : 0; + obj->opa_scale_en = en ? 1 : 0; } /** @@ -1191,22 +1192,22 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) if(obj == NULL) return LV_RES_OK; /*If the event was send from an other event save the current states to restore it at the end*/ - lv_obj_t * prev_obj_act = event_act_obj; + lv_obj_t * prev_obj_act = event_act_obj; bool prev_obj_act_deleted = event_act_obj_deleted; - const void * prev_data = event_act_data; + const void * prev_data = event_act_data; - event_act_obj = obj; + event_act_obj = obj; event_act_obj_deleted = false; - event_act_data = data; + event_act_data = data; if(obj->event_cb) obj->event_cb(obj, event); bool deleted = event_act_obj_deleted; /*Restore the previous states*/ - event_act_obj = prev_obj_act; + event_act_obj = prev_obj_act; event_act_obj_deleted = prev_obj_act_deleted; - event_act_data = prev_data; + event_act_data = prev_data; if(deleted) { return LV_RES_INV; @@ -1298,71 +1299,71 @@ void lv_obj_refresh_ext_size(lv_obj_t * obj) * @param delay delay before the animation in milliseconds * @param cb a function to call when the animation is ready */ -void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, void (*cb)(lv_obj_t *)) +void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, + void (*cb)(lv_obj_t *)) { lv_obj_t * par = lv_obj_get_parent(obj); /*Get the direction*/ bool out = (type & LV_ANIM_DIR_MASK) == LV_ANIM_IN ? false : true; - type = type & (~LV_ANIM_DIR_MASK); + type = type & (~LV_ANIM_DIR_MASK); lv_anim_t a; - a.var = obj; - a.time = time; - a.act_time = (int32_t) - delay; - a.end_cb = (void(*)(void *))cb; - a.path = lv_anim_path_linear; + a.var = obj; + a.time = time; + a.act_time = (int32_t)-delay; + a.end_cb = (void (*)(void *))cb; + a.path = lv_anim_path_linear; a.playback_pause = 0; - a.repeat_pause = 0; - a.playback = 0; - a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; + a.repeat = 0; /*Init to ANIM_IN*/ switch(type) { case LV_ANIM_FLOAT_LEFT: - a.fp = (void(*)(void *, int32_t))lv_obj_set_x; + a.fp = (void (*)(void *, int32_t))lv_obj_set_x; a.start = -lv_obj_get_width(obj); - a.end = lv_obj_get_x(obj); + a.end = lv_obj_get_x(obj); break; case LV_ANIM_FLOAT_RIGHT: - a.fp = (void(*)(void *, int32_t))lv_obj_set_x; + a.fp = (void (*)(void *, int32_t))lv_obj_set_x; a.start = lv_obj_get_width(par); - a.end = lv_obj_get_x(obj); + a.end = lv_obj_get_x(obj); break; case LV_ANIM_FLOAT_TOP: - a.fp = (void(*)(void *, int32_t))lv_obj_set_y; + a.fp = (void (*)(void *, int32_t))lv_obj_set_y; a.start = -lv_obj_get_height(obj); - a.end = lv_obj_get_y(obj); + a.end = lv_obj_get_y(obj); break; case LV_ANIM_FLOAT_BOTTOM: - a.fp = (void(*)(void *, int32_t))lv_obj_set_y; + a.fp = (void (*)(void *, int32_t))lv_obj_set_y; a.start = lv_obj_get_height(par); - a.end = lv_obj_get_y(obj); + a.end = lv_obj_get_y(obj); break; case LV_ANIM_GROW_H: - a.fp = (void(*)(void *, int32_t))lv_obj_set_width; + a.fp = (void (*)(void *, int32_t))lv_obj_set_width; a.start = 0; - a.end = lv_obj_get_width(obj); + a.end = lv_obj_get_width(obj); break; case LV_ANIM_GROW_V: - a.fp = (void(*)(void *, int32_t))lv_obj_set_height; + a.fp = (void (*)(void *, int32_t))lv_obj_set_height; a.start = 0; - a.end = lv_obj_get_height(obj); + a.end = lv_obj_get_height(obj); break; case LV_ANIM_NONE: - a.fp = NULL; + a.fp = NULL; a.start = 0; - a.end = 0; - break; - default: + a.end = 0; break; + default: break; } /*Swap start and end in case of ANIM OUT*/ if(out != false) { int32_t tmp = a.start; - a.start = a.end; - a.end = tmp; + a.start = a.end; + a.end = tmp; } lv_anim_create(&a); @@ -1386,7 +1387,7 @@ lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj) do { act_p = par; - par = lv_obj_get_parent(act_p); + par = lv_obj_get_parent(act_p); } while(par != NULL); return (lv_obj_t *)act_p; @@ -1401,13 +1402,17 @@ lv_disp_t * lv_obj_get_disp(const lv_obj_t * obj) { const lv_obj_t * scr; - if(obj->par == NULL) scr = obj; /*`obj` is a screen*/ - else scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/ + if(obj->par == NULL) + scr = obj; /*`obj` is a screen*/ + else + scr = lv_obj_get_screen(obj); /*get the screen of `obj`*/ lv_disp_t * d; - LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), d) { + LV_LL_READ(LV_GC_ROOT(_lv_disp_ll), d) + { lv_obj_t * s; - LV_LL_READ(d->scr_ll, s) { + LV_LL_READ(d->scr_ll, s) + { if(s == scr) return d; } } @@ -1499,7 +1504,6 @@ void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p) lv_area_copy(cords_p, &obj->coords); } - /** * Get the x coordinate of object * @param obj pointer to an object @@ -1509,7 +1513,7 @@ lv_coord_t lv_obj_get_x(const lv_obj_t * obj) { lv_coord_t rel_x; lv_obj_t * parent = lv_obj_get_parent(obj); - rel_x = obj->coords.x1 - parent->coords.x1; + rel_x = obj->coords.x1 - parent->coords.x1; return rel_x; } @@ -1523,7 +1527,7 @@ lv_coord_t lv_obj_get_y(const lv_obj_t * obj) { lv_coord_t rel_y; lv_obj_t * parent = lv_obj_get_parent(obj); - rel_y = obj->coords.y1 - parent->coords.y1; + rel_y = obj->coords.y1 - parent->coords.y1; return rel_y; } @@ -1591,7 +1595,7 @@ bool lv_obj_get_auto_realign(lv_obj_t * obj) #if LV_OBJ_REALIGN return obj->realign.auto_realign ? true : false; #else - (void) obj; + (void)obj; return false; #endif } @@ -1752,7 +1756,7 @@ lv_opa_t lv_obj_get_opa_scale(const lv_obj_t * obj) */ uint8_t lv_obj_get_protect(const lv_obj_t * obj) { - return obj->protect ; + return obj->protect; } /** @@ -1763,7 +1767,7 @@ uint8_t lv_obj_get_protect(const lv_obj_t * obj) */ bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot) { - return (obj->protect & prot) == 0 ? false : true ; + return (obj->protect & prot) == 0 ? false : true; } /** @@ -1821,7 +1825,6 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) if(tmp.type[cnt] == NULL) break; } - /*Swap the order. The real type comes first*/ uint8_t i; for(i = 0; i < cnt; i++) { @@ -1880,7 +1883,7 @@ bool lv_obj_is_focused(const lv_obj_t * obj) * LV_DESIGN_DRAW: draw the object (always return 'true') * @param return true/false, depends on 'mode' */ -static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode) +static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode) { if(mode == LV_DESIGN_COVER_CHK) { @@ -1934,11 +1937,10 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) lv_style_t * style = lv_obj_get_style(obj); - lv_indev_t *indev_act = lv_indev_get_act(); + lv_indev_t * indev_act = lv_indev_get_act(); if(sign > _LV_SIGNAL_FEEDBACK_SECTION_START && sign < _LV_SIGNAL_FEEDBACK_SECTION_END) { - if(indev_act != NULL && indev_act->feedback != NULL) - indev_act->feedback(indev_act, sign); + if(indev_act != NULL && indev_act->feedback != NULL) indev_act->feedback(indev_act, sign); } if(sign == LV_SIGNAL_CHILD_CHG) { @@ -1946,11 +1948,11 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) if(lv_obj_is_protected(obj, LV_PROTECT_CHILD_CHG) != false) res = LV_RES_INV; } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { if(style->body.shadow.width > obj->ext_size) obj->ext_size = style->body.shadow.width; - } else if(sign == LV_SIGNAL_STYLE_CHG) { + } else if(sign == LV_SIGNAL_STYLE_CHG) { lv_obj_refresh_ext_size(obj); - } else if(sign == LV_SIGNAL_GET_TYPE) { + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; - buf->type[0] = "lv_obj"; + buf->type[0] = "lv_obj"; } return res; @@ -1965,7 +1967,8 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coord_t y_diff) { lv_obj_t * i; - LV_LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) + { i->coords.x1 += x_diff; i->coords.y1 += y_diff; i->coords.x2 += x_diff; @@ -1983,7 +1986,8 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor static void report_style_mod_core(void * style_p, lv_obj_t * obj) { lv_obj_t * i; - LV_LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) + { if(i->style_p == style_p || style_p == NULL) { refresh_children_style(i); lv_obj_refresh_style(i); @@ -2003,8 +2007,8 @@ static void refresh_children_style(lv_obj_t * obj) lv_obj_t * child = lv_obj_get_child(obj, NULL); while(child != NULL) { if(child->style_p == NULL) { - refresh_children_style(child); /*Check children too*/ - lv_obj_refresh_style(child); /*Notify the child about the style change*/ + refresh_children_style(child); /*Check children too*/ + lv_obj_refresh_style(child); /*Notify the child about the style change*/ } else if(child->style_p->glass) { /*Children with 'glass' parent might be effected if their style == NULL*/ refresh_children_style(child); @@ -2026,8 +2030,8 @@ static void delete_children(lv_obj_t * obj) lv_obj_t * i_next; i = lv_ll_get_head(&(obj->child_ll)); - /*Remove from the group; remove before transversing children so that - * the object still has access to all children during the + /*Remove from the group; remove before transversing children so that + * the object still has access to all children during the * LV_SIGNAL_DEFOCUS call*/ #if LV_USE_GROUP bool was_focused = false; @@ -2077,7 +2081,6 @@ static void delete_children(lv_obj_t * obj) obj->signal_cb(obj, LV_SIGNAL_CLEANUP, NULL); /*Delete the base objects*/ - if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); + if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); lv_mem_free(obj); /*Free the object itself*/ - } diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index febd01a16196..b2aeba8991d3 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -42,11 +42,11 @@ extern "C" { #error "LittlevGL: LV_ANTIALIAS can be only 0 or 1" #endif -#define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/ -#define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/ -#define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/ +#define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/ +#define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/ +#define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/ -#define LV_MAX_ANCESTOR_NUM 8 +#define LV_MAX_ANCESTOR_NUM 8 /********************** * TYPEDEFS @@ -54,35 +54,35 @@ extern "C" { struct _lv_obj_t; -enum -{ +enum { LV_DESIGN_DRAW_MAIN, LV_DESIGN_DRAW_POST, LV_DESIGN_COVER_CHK, }; typedef uint8_t lv_design_mode_t; -typedef bool (* lv_design_cb_t) (struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); +typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, + lv_design_mode_t mode); -enum -{ - LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action function or an operation was failed*/ - LV_RES_OK, /*The object is valid (no deleted) after the action*/ +enum { + LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action + function or an operation was failed*/ + LV_RES_OK, /*The object is valid (no deleted) after the action*/ }; typedef uint8_t lv_res_t; - enum { - LV_EVENT_PRESSED, /*The object has been pressed*/ - LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ - LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ - LV_EVENT_SHORT_CLICKED, /*Released before long press time. Not called if dragged.*/ - LV_EVENT_LONG_PRESSED, /*Pressing for `LV_INDEV_LONG_PRESS_TIME` time. Not called if dragged.*/ - LV_EVENT_LONG_PRESSED_REPEAT, /*Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ - LV_EVENT_CLICKED, /*Called on release if not dragged (regardless to long press)*/ - LV_EVENT_RELEASED, /*Called in every cases when the object has been released*/ - LV_EVENT_LONG_HOVER_IN, /*TODO*/ - LV_EVENT_LONG_HOVER_OUT, /*TODO*/ + LV_EVENT_PRESSED, /*The object has been pressed*/ + LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ + LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ + LV_EVENT_SHORT_CLICKED, /*Released before long press time. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED, /*Pressing for `LV_INDEV_LONG_PRESS_TIME` time. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED_REPEAT, /*Called after `LV_INDEV_LONG_PRESS_TIME` in every + `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ + LV_EVENT_CLICKED, /*Called on release if not dragged (regardless to long press)*/ + LV_EVENT_RELEASED, /*Called in every cases when the object has been released*/ + LV_EVENT_LONG_HOVER_IN, /*TODO*/ + LV_EVENT_LONG_HOVER_OUT, /*TODO*/ LV_EVENT_DRAG_BEGIN, LV_EVENT_DRAG_END, LV_EVENT_DRAG_THROW_BEGIN, @@ -92,15 +92,14 @@ enum { LV_EVENT_INSERT, LV_EVENT_SELECTED, LV_EVENT_REFRESH, - LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ - LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ + LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ + LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ }; typedef uint8_t lv_event_t; typedef void (*lv_event_cb_t)(struct _lv_obj_t * obj, lv_event_t event); -enum -{ +enum { /*General signals*/ LV_SIGNAL_CLEANUP, LV_SIGNAL_CHILD_CHG, @@ -110,7 +109,7 @@ enum LV_SIGNAL_REFR_EXT_SIZE, LV_SIGNAL_GET_TYPE, - _LV_SIGNAL_FEEDBACK_SECTION_START, + _LV_SIGNAL_FEEDBACK_SECTION_START, /*Input device related*/ LV_SIGNAL_PRESSED, LV_SIGNAL_PRESSING, @@ -130,10 +129,9 @@ enum }; typedef uint8_t lv_signal_t; -typedef lv_res_t (* lv_signal_cb_t) (struct _lv_obj_t * obj, lv_signal_t sign, void * param); +typedef lv_res_t (*lv_signal_cb_t)(struct _lv_obj_t * obj, lv_signal_t sign, void * param); -enum -{ +enum { LV_ALIGN_CENTER = 0, LV_ALIGN_IN_TOP_LEFT, LV_ALIGN_IN_TOP_MID, @@ -159,47 +157,50 @@ enum typedef uint8_t lv_align_t; #if LV_OBJ_REALIGN -typedef struct { +typedef struct +{ const struct _lv_obj_t * base; lv_coord_t xofs; lv_coord_t yofs; lv_align_t align; - uint8_t auto_realign :1; - uint8_t origo_align :1; /*1: the oigo (center of the object) was aligned with `lv_obj_align_origo`*/ -}lv_reailgn_t; + uint8_t auto_realign : 1; + uint8_t origo_align : 1; /*1: the oigo (center of the object) was aligned with + `lv_obj_align_origo`*/ +} lv_reailgn_t; #endif - typedef struct _lv_obj_t { - struct _lv_obj_t * par; /*Pointer to the parent object*/ - lv_ll_t child_ll; /*Linked list to store the children objects*/ + struct _lv_obj_t * par; /*Pointer to the parent object*/ + lv_ll_t child_ll; /*Linked list to store the children objects*/ - lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ + lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ lv_event_cb_t event_cb; - lv_signal_cb_t signal_cb; /*Object type specific signal function*/ - lv_design_cb_t design_cb; /*Object type specific design function*/ + lv_signal_cb_t signal_cb; /*Object type specific signal function*/ + lv_design_cb_t design_cb; /*Object type specific design function*/ - void * ext_attr; /*Object type specific extended data*/ - lv_style_t * style_p; /*Pointer to the object's style*/ + void * ext_attr; /*Object type specific extended data*/ + lv_style_t * style_p; /*Pointer to the object's style*/ #if LV_USE_GROUP != 0 - void * group_p; /*Pointer to the group of the object*/ + void * group_p; /*Pointer to the group of the object*/ #endif /*Attributes and states*/ - uint8_t click :1; /*1: Can be pressed by an input device*/ - uint8_t drag :1; /*1: Enable the dragging*/ - uint8_t drag_throw :1; /*1: Enable throwing with drag*/ - uint8_t drag_parent :1; /*1: Parent will be dragged instead*/ - uint8_t hidden :1; /*1: Object is hidden*/ - uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/ - uint8_t opa_scale_en :1; /*1: opa_scale is set*/ - uint8_t parent_event :1; /*1: Send the object's events to the parent too. */ - uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from `lv_protect_t`*/ - lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ - - lv_coord_t ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/ + uint8_t click : 1; /*1: Can be pressed by an input device*/ + uint8_t drag : 1; /*1: Enable the dragging*/ + uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ + uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ + uint8_t hidden : 1; /*1: Object is hidden*/ + uint8_t top : 1; /*1: If the object or its children is clicked it goes to the foreground*/ + uint8_t opa_scale_en : 1; /*1: opa_scale is set*/ + uint8_t parent_event : 1; /*1: Send the object's events to the parent too. */ + uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from + `lv_protect_t`*/ + lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ + + lv_coord_t + ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/ #if LV_OBJ_REALIGN lv_reailgn_t realign; #endif @@ -217,33 +218,34 @@ typedef struct _lv_obj_t } lv_obj_t; /*Protect some attributes (max. 8 bit)*/ -enum -{ +enum { LV_PROTECT_NONE = 0x00, - LV_PROTECT_CHILD_CHG = 0x01, /*Disable the child change signal. Used by the library*/ - LV_PROTECT_PARENT = 0x02, /*Prevent automatic parent change (e.g. in lv_page)*/ - LV_PROTECT_POS = 0x04, /*Prevent automatic positioning (e.g. in lv_cont layout)*/ - LV_PROTECT_FOLLOW = 0x08, /*Prevent the object be followed in automatic ordering (e.g. in lv_cont PRETTY layout)*/ - LV_PROTECT_PRESS_LOST= 0x10, /*If the `indev` was pressing this object but swiped out while pressing do not search other object.*/ - LV_PROTECT_CLICK_FOCUS= 0x20,/*Prevent focusing the object by clicking on it*/ + LV_PROTECT_CHILD_CHG = 0x01, /*Disable the child change signal. Used by the library*/ + LV_PROTECT_PARENT = 0x02, /*Prevent automatic parent change (e.g. in lv_page)*/ + LV_PROTECT_POS = 0x04, /*Prevent automatic positioning (e.g. in lv_cont layout)*/ + LV_PROTECT_FOLLOW = 0x08, /*Prevent the object be followed in automatic ordering (e.g. in + lv_cont PRETTY layout)*/ + LV_PROTECT_PRESS_LOST = 0x10, /*If the `indev` was pressing this object but swiped out while + pressing do not search other object.*/ + LV_PROTECT_CLICK_FOCUS = 0x20, /*Prevent focusing the object by clicking on it*/ }; typedef uint8_t lv_protect_t; - /*Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/ -typedef struct { - const char * type[LV_MAX_ANCESTOR_NUM]; /*[0]: the actual type, [1]: ancestor, [2] #1's ancestor ... [x]: "lv_obj" */ +typedef struct +{ + const char * type[LV_MAX_ANCESTOR_NUM]; /*[0]: the actual type, [1]: ancestor, [2] #1's ancestor + ... [x]: "lv_obj" */ } lv_obj_type_t; -enum -{ +enum { LV_ANIM_NONE = 0, - LV_ANIM_FLOAT_TOP, /*Float from/to the top*/ - LV_ANIM_FLOAT_LEFT, /*Float from/to the left*/ - LV_ANIM_FLOAT_BOTTOM, /*Float from/to the bottom*/ - LV_ANIM_FLOAT_RIGHT, /*Float from/to the right*/ - LV_ANIM_GROW_H, /*Grow/shrink horizontally*/ - LV_ANIM_GROW_V, /*Grow/shrink vertically*/ + LV_ANIM_FLOAT_TOP, /*Float from/to the top*/ + LV_ANIM_FLOAT_LEFT, /*Float from/to the left*/ + LV_ANIM_FLOAT_BOTTOM, /*Float from/to the bottom*/ + LV_ANIM_FLOAT_RIGHT, /*Float from/to the right*/ + LV_ANIM_GROW_H, /*Grow/shrink horizontally*/ + LV_ANIM_GROW_V, /*Grow/shrink vertically*/ }; typedef uint8_t lv_anim_builtin_t; @@ -267,7 +269,7 @@ void lv_init(void); * @param copy pointer to a base object, if not NULL then the new object will be copied from it * @return pointer to the new object */ -lv_obj_t * lv_obj_create(lv_obj_t * parent,const lv_obj_t * copy); +lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy); /** * Delete 'obj' and all of its children @@ -280,7 +282,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj); * Delete all children of an object * @param obj pointer to an object */ -void lv_obj_clean(lv_obj_t *obj); +void lv_obj_clean(lv_obj_t * obj); /** * Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task' @@ -359,7 +361,8 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h); * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align(lv_obj_t * obj,const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, + lv_coord_t y_mod); /** * Align an object to an other object. @@ -369,7 +372,8 @@ void lv_obj_align(lv_obj_t * obj,const lv_obj_t * base, lv_align_t align, lv_coo * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); +void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, + lv_coord_t y_mod); /** * Realign the object based on the last `lv_obj_align` parameters. @@ -378,7 +382,8 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, void lv_obj_realign(lv_obj_t * obj); /** - * Enable the automatic realign of the object when its size has changed based on the last `lv_obj_align` parameters. + * Enable the automatic realign of the object when its size has changed based on the last + * `lv_obj_align` parameters. * @param obj pointer to an object * @param en true: enable auto realign; false: disable auto realign */ @@ -563,7 +568,8 @@ void lv_obj_refresh_ext_size(lv_obj_t * obj); * @param delay delay before the animation in milliseconds * @param cb a function to call when the animation is ready */ -void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, void (*cb) (lv_obj_t *)); +void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, + void (*cb)(lv_obj_t *)); #endif /*======================= @@ -814,7 +820,6 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); */ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); - #if LV_USE_USER_DATA_SINGLE /** * Get a pointer to the object's user data @@ -832,7 +837,6 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); */ void * lv_obj_get_group(const lv_obj_t * obj); - /** * Tell whether the object is the focused object of a group or not. * @param obj pointer to an object @@ -842,12 +846,10 @@ bool lv_obj_is_focused(const lv_obj_t * obj); #endif - /********************** * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 8e16253bb1be..7c3b04a25572 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -16,7 +16,7 @@ #include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* @@ -43,7 +43,7 @@ static void lv_refr_vdb_flush(void); * STATIC VARIABLES **********************/ static uint32_t px_num; -static lv_disp_t * disp_refr; /*Display being refreshed*/ +static lv_disp_t * disp_refr; /*Display being refreshed*/ /********************** * MACROS @@ -63,20 +63,20 @@ void lv_refr_init(void) /** * Redraw the invalidated areas now. - * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can - * prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process (e.g. progress bar) - * this function can be called when the screen should be updated. + * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process + * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process + * (e.g. progress bar) this function can be called when the screen should be updated. */ void lv_refr_now(void) { lv_disp_refr_task(NULL); } - /** * Invalidate an area on display to redraw it * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas) - * @param disp pointer to display where the area should be invalidated (NULL can be used if there is only one display) + * @param disp pointer to display where the area should be invalidated (NULL can be used if there is + * only one display) */ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) { @@ -113,11 +113,11 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) /*Save the area*/ if(disp->inv_p < LV_INV_BUF_SIZE) { lv_area_copy(&disp->inv_areas[disp->inv_p], &com_area); - } else {/*If no place for the area add the screen*/ + } else { /*If no place for the area add the screen*/ disp->inv_p = 0; lv_area_copy(&disp->inv_areas[disp->inv_p], &scr_area); } - disp->inv_p ++; + disp->inv_p++; } } @@ -148,28 +148,33 @@ void lv_disp_refr_task(void * param) /*If refresh happened ...*/ if(disp_refr->inv_p != 0) { - /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/ + /*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to + * date*/ if(lv_disp_is_true_double_buf(disp_refr)) { lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*Flush the content of the VDB*/ lv_refr_vdb_flush(); - /* With true double buffering the flushing should be only the address change of the current frame buffer. - * Wait until the address change is ready and copy the changed content to the other frame buffer (new active VDB) - * to keep the buffers synchronized*/ - while(vdb->flushing); + /* With true double buffering the flushing should be only the address change of the + * current frame buffer. Wait until the address change is ready and copy the changed + * content to the other frame buffer (new active VDB) to keep the buffers synchronized*/ + while(vdb->flushing) + ; - uint8_t * buf_act = (uint8_t *) vdb->buf_act; - uint8_t * buf_ina = (uint8_t *) vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; + uint8_t * buf_act = (uint8_t *)vdb->buf_act; + uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; lv_coord_t hres = lv_disp_get_hor_res(disp_refr); uint16_t a; for(a = 0; a < disp_refr->inv_p; a++) { if(disp_refr->inv_area_joined[a] == 0) { lv_coord_t y; - uint32_t start_offs = (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t); - uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); + uint32_t start_offs = + (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * + sizeof(lv_color_t); + uint32_t line_length = + lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); @@ -177,7 +182,7 @@ void lv_disp_refr_task(void * param) } } } - } /*End of true double buffer handling*/ + } /*End of true double buffer handling*/ /*Clean up*/ memset(disp_refr->inv_areas, 0, sizeof(disp_refr->inv_areas)); @@ -216,8 +221,8 @@ static void lv_refr_join_area(void) } /*Check if the areas are on each other*/ - if(lv_area_is_on(&disp_refr->inv_areas[join_in], - &disp_refr->inv_areas[join_from]) == false) { + if(lv_area_is_on(&disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]) == + false) { continue; } @@ -226,7 +231,8 @@ static void lv_refr_join_area(void) /*Join two area only if the joined area size is smaller*/ if(lv_area_get_size(&joined_area) < - (lv_area_get_size(&disp_refr->inv_areas[join_in]) + lv_area_get_size(&disp_refr->inv_areas[join_from]))) { + (lv_area_get_size(&disp_refr->inv_areas[join_in]) + + lv_area_get_size(&disp_refr->inv_areas[join_from]))) { lv_area_copy(&disp_refr->inv_areas[join_in], &joined_area); /*Mark 'join_form' is joined into 'join_in'*/ @@ -261,24 +267,27 @@ static void lv_refr_areas(void) */ static void lv_refr_area(const lv_area_t * area_p) { - /*True double buffering: there are two screen sized buffers. Just redraw directly into a buffer*/ + /*True double buffering: there are two screen sized buffers. Just redraw directly into a + * buffer*/ if(lv_disp_is_true_double_buf(disp_refr)) { lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); - vdb->area.x1 = 0; - vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1; - vdb->area.y1 = 0; - vdb->area.y2 = lv_disp_get_ver_res(disp_refr) - 1; + vdb->area.x1 = 0; + vdb->area.x2 = lv_disp_get_hor_res(disp_refr) - 1; + vdb->area.y1 = 0; + vdb->area.y2 = lv_disp_get_ver_res(disp_refr) - 1; lv_refr_area_part(area_p); } /*The buffer is smaller: refresh the area in parts*/ else { lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*Calculate the max row num*/ - lv_coord_t w = lv_area_get_width(area_p); - lv_coord_t h = lv_area_get_height(area_p); - lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? y2 = lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2; + lv_coord_t w = lv_area_get_width(area_p); + lv_coord_t h = lv_area_get_height(area_p); + lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(disp_refr) + ? y2 = lv_disp_get_ver_res(disp_refr) - 1 + : area_p->y2; - int32_t max_row = (uint32_t) vdb->size / w; + int32_t max_row = (uint32_t)vdb->size / w; if(max_row > h) max_row = h; @@ -298,11 +307,12 @@ static void lv_refr_area(const lv_area_t * area_p) if(lv_area_get_height(&tmp) <= max_row) break; /*Decrement the height of the area until it fits into `max_row` after rounding*/ - y_tmp --; + y_tmp--; } while(y_tmp != 0); if(y_tmp == 0) { - LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to small VDB)"); + LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to " + "small VDB)"); return; } else { max_row = tmp.y2 + 1; @@ -312,7 +322,7 @@ static void lv_refr_area(const lv_area_t * area_p) /*Always use the full row*/ lv_coord_t row; lv_coord_t row_last = 0; - for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) { + for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) { /*Calc. the next y coordinates of VDB*/ vdb->area.x1 = area_p->x1; vdb->area.x2 = area_p->x2; @@ -346,9 +356,11 @@ static void lv_refr_area_part(const lv_area_t * area_p) lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); - /*In non double buffered mode, before rendering the next part wait until the previous image is flushed*/ + /*In non double buffered mode, before rendering the next part wait until the previous image is + * flushed*/ if(lv_disp_is_double_buf(disp_refr) == false) { - while(vdb->flushing); + while(vdb->flushing) + ; } lv_obj_t * top_p; @@ -388,7 +400,8 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If this object is fully cover the draw area check the children too */ if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) { - LV_LL_READ(obj->child_ll, i) { + LV_LL_READ(obj->child_ll, i) + { found_p = lv_refr_get_top_obj(area_p, i); /*If a children is ok then break*/ @@ -401,8 +414,8 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) if(found_p == NULL) { lv_style_t * style = lv_obj_get_style(obj); if(style->body.opa == LV_OPA_COVER && - obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && - lv_obj_get_opa_scale(obj) == LV_OPA_COVER) { + obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && + lv_obj_get_opa_scale(obj) == LV_OPA_COVER) { found_p = obj; } } @@ -469,7 +482,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) /*Do not refresh hidden objects*/ if(obj->hidden != 0) return; - bool union_ok; /* Store the return value of area_union */ + bool union_ok; /* Store the return value of area_union */ /* Truncate the original mask to the coordinates of the parent * because the parent and its children are visible only here */ lv_area_t obj_mask; @@ -488,8 +501,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) /* Redraw the object */ obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN); - //usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/ - + // usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/ /*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/ lv_obj_get_coords(obj, &obj_area); @@ -498,7 +510,8 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) lv_area_t mask_child; /*Mask from obj and its child*/ lv_obj_t * child_p; lv_area_t child_area; - LV_LL_READ_BACK(obj->child_ll, child_p) { + LV_LL_READ_BACK(obj->child_ll, child_p) + { lv_obj_get_coords(child_p, &child_area); ext_size = child_p->ext_size; child_area.x1 -= ext_size; @@ -519,7 +532,6 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) /* If all the children are redrawn make 'post draw' design */ obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST); - } } @@ -530,9 +542,11 @@ static void lv_refr_vdb_flush(void) { lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); - /*In double buffered mode wait until the other buffer is flushed before flushing the current one*/ + /*In double buffered mode wait until the other buffer is flushed before flushing the current + * one*/ if(lv_disp_is_double_buf(disp_refr)) { - while(vdb->flushing); + while(vdb->flushing) + ; } vdb->flushing = 1; @@ -541,14 +555,15 @@ static void lv_refr_vdb_flush(void) lv_disp_t * disp = lv_refr_get_disp_refreshing(); if(disp->driver.flush_cb) disp->driver.flush_cb(&disp->driver, &vdb->area, vdb->buf_act); - if(vdb->buf1 && vdb->buf2) { - if(vdb->buf_act == vdb->buf1) vdb->buf_act = vdb->buf2; - else vdb->buf_act = vdb->buf1; + if(vdb->buf_act == vdb->buf1) + vdb->buf_act = vdb->buf2; + else + vdb->buf_act = vdb->buf1; - /*If the screen is transparent initialize it when the new VDB is selected*/ -# if LV_COLOR_SCREEN_TRANSP + /*If the screen is transparent initialize it when the new VDB is selected*/ +#if LV_COLOR_SCREEN_TRANSP memset(vdb[vdb_active].buf, 0x00, LV_VDB_SIZE_IN_BYTES); -# endif /*LV_COLOR_SCREEN_TRANSP*/ +#endif /*LV_COLOR_SCREEN_TRANSP*/ } } diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index bdf406c69f04..990e32f87f56 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -47,16 +47,17 @@ void lv_refr_init(void); /** * Redraw the invalidated areas now. - * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can - * prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process (e.g. progress bar) - * this function can be called when the screen should be updated. + * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process + * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process + * (e.g. progress bar) this function can be called when the screen should be updated. */ void lv_refr_now(void); /** * Invalidate an area on display to redraw it * @param area_p pointer to area which should be invalidated (NULL: delete the invalidated areas) - * @param disp pointer to display where the area should be invalidated (NULL can be used if there is only one display) + * @param disp pointer to display where the area should be invalidated (NULL can be used if there is + * only one display) */ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); @@ -76,7 +77,6 @@ void lv_disp_refr_task(void * param); * STATIC FUNCTIONS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 578403a909b1..6f5190f8f6f9 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -12,19 +12,25 @@ /********************* * DEFINES *********************/ -#define STYLE_MIX_MAX 256 -#define STYLE_MIX_SHIFT 8 /*log2(STYLE_MIX_MAX)*/ - -#define VAL_PROP(v1, v2, r) v1 + (((v2-v1) * r) >> STYLE_MIX_SHIFT) -#define STYLE_ATTR_MIX(attr, r) if(start->attr != end->attr) {res->attr = VAL_PROP(start->attr, end->attr, r);} else {res->attr = start->attr;} - +#define STYLE_MIX_MAX 256 +#define STYLE_MIX_SHIFT 8 /*log2(STYLE_MIX_MAX)*/ + +#define VAL_PROP(v1, v2, r) v1 + (((v2 - v1) * r) >> STYLE_MIX_SHIFT) +#define STYLE_ATTR_MIX(attr, r) \ + if(start->attr != end->attr) { \ + res->attr = VAL_PROP(start->attr, end->attr, r); \ + } else { \ + res->attr = start->attr; \ + } /********************** * TYPEDEFS **********************/ #if LV_USE_ANIMATION -typedef struct { - lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it will be modified too*/ +typedef struct +{ + lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it + will be modified too*/ lv_style_t style_end; lv_style_t * style_anim; void (*end_cb)(void *); @@ -73,89 +79,89 @@ void lv_style_init(void) * HUE = 210*/ /*Screen style*/ - lv_style_scr.glass = 0; - lv_style_scr.body.opa = LV_OPA_COVER; - lv_style_scr.body.main_color = LV_COLOR_WHITE; - lv_style_scr.body.grad_color = LV_COLOR_WHITE; - lv_style_scr.body.radius = 0; - lv_style_scr.body.padding.left = 0; - lv_style_scr.body.padding.right = 0; - lv_style_scr.body.padding.top = 0; + lv_style_scr.glass = 0; + lv_style_scr.body.opa = LV_OPA_COVER; + lv_style_scr.body.main_color = LV_COLOR_WHITE; + lv_style_scr.body.grad_color = LV_COLOR_WHITE; + lv_style_scr.body.radius = 0; + lv_style_scr.body.padding.left = 0; + lv_style_scr.body.padding.right = 0; + lv_style_scr.body.padding.top = 0; lv_style_scr.body.padding.bottom = 0; - lv_style_scr.body.padding.inner = LV_DPI / 12; + lv_style_scr.body.padding.inner = LV_DPI / 12; lv_style_scr.body.border.color = LV_COLOR_BLACK; - lv_style_scr.body.border.opa = LV_OPA_COVER; + lv_style_scr.body.border.opa = LV_OPA_COVER; lv_style_scr.body.border.width = 0; - lv_style_scr.body.border.part = LV_BORDER_FULL; + lv_style_scr.body.border.part = LV_BORDER_FULL; lv_style_scr.body.shadow.color = LV_COLOR_GRAY; - lv_style_scr.body.shadow.type = LV_SHADOW_FULL; + lv_style_scr.body.shadow.type = LV_SHADOW_FULL; lv_style_scr.body.shadow.width = 0; - lv_style_scr.text.opa = LV_OPA_COVER; - lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30); - lv_style_scr.text.sel_color = lv_color_make(0x55, 0x96, 0xd8); - lv_style_scr.text.font = LV_FONT_DEFAULT; + lv_style_scr.text.opa = LV_OPA_COVER; + lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30); + lv_style_scr.text.sel_color = lv_color_make(0x55, 0x96, 0xd8); + lv_style_scr.text.font = LV_FONT_DEFAULT; lv_style_scr.text.letter_space = 2; - lv_style_scr.text.line_space = 2; + lv_style_scr.text.line_space = 2; - lv_style_scr.image.opa = LV_OPA_COVER; - lv_style_scr.image.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_scr.image.opa = LV_OPA_COVER; + lv_style_scr.image.color = lv_color_make(0x20, 0x20, 0x20); lv_style_scr.image.intense = LV_OPA_TRANSP; - lv_style_scr.line.opa = LV_OPA_COVER; - lv_style_scr.line.color = lv_color_make(0x20, 0x20, 0x20); - lv_style_scr.line.width = 2; + lv_style_scr.line.opa = LV_OPA_COVER; + lv_style_scr.line.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_scr.line.width = 2; lv_style_scr.line.rounded = 0; /*Plain style (by default near the same as the screen style)*/ memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t)); - lv_style_plain.body.padding.left = LV_DPI / 12; - lv_style_plain.body.padding.right = LV_DPI / 12; - lv_style_plain.body.padding.top = LV_DPI / 12; + lv_style_plain.body.padding.left = LV_DPI / 12; + lv_style_plain.body.padding.right = LV_DPI / 12; + lv_style_plain.body.padding.top = LV_DPI / 12; lv_style_plain.body.padding.bottom = LV_DPI / 12; /*Plain color style*/ memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t)); - lv_style_plain_color.text.color = lv_color_make(0xf0, 0xf0, 0xf0); - lv_style_plain_color.image.color = lv_color_make(0xf0, 0xf0, 0xf0); - lv_style_plain_color.line.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.text.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.image.color = lv_color_make(0xf0, 0xf0, 0xf0); + lv_style_plain_color.line.color = lv_color_make(0xf0, 0xf0, 0xf0); lv_style_plain_color.body.main_color = lv_color_make(0x55, 0x96, 0xd8); lv_style_plain_color.body.grad_color = lv_style_plain_color.body.main_color; /*Pretty style */ memcpy(&lv_style_pretty, &lv_style_plain, sizeof(lv_style_t)); - lv_style_pretty.text.color = lv_color_make(0x20, 0x20, 0x20); - lv_style_pretty.image.color = lv_color_make(0x20, 0x20, 0x20); - lv_style_pretty.line.color = lv_color_make(0x20, 0x20, 0x20); - lv_style_pretty.body.main_color = LV_COLOR_WHITE; - lv_style_pretty.body.grad_color = LV_COLOR_SILVER; - lv_style_pretty.body.radius = LV_DPI / 15; + lv_style_pretty.text.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_pretty.image.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_pretty.line.color = lv_color_make(0x20, 0x20, 0x20); + lv_style_pretty.body.main_color = LV_COLOR_WHITE; + lv_style_pretty.body.grad_color = LV_COLOR_SILVER; + lv_style_pretty.body.radius = LV_DPI / 15; lv_style_pretty.body.border.color = lv_color_make(0x40, 0x40, 0x40); - lv_style_pretty.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; - lv_style_pretty.body.border.opa = LV_OPA_30; + lv_style_pretty.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; + lv_style_pretty.body.border.opa = LV_OPA_30; /*Pretty color style*/ memcpy(&lv_style_pretty_color, &lv_style_pretty, sizeof(lv_style_t)); - lv_style_pretty_color.text.color = lv_color_make(0xe0, 0xe0, 0xe0); - lv_style_pretty_color.image.color = lv_color_make(0xe0, 0xe0, 0xe0); - lv_style_pretty_color.line.color = lv_color_make(0xc0, 0xc0, 0xc0); - lv_style_pretty_color.body.main_color = lv_color_make(0x6b, 0x9a, 0xc7); - lv_style_pretty_color.body.grad_color = lv_color_make(0x2b, 0x59, 0x8b); + lv_style_pretty_color.text.color = lv_color_make(0xe0, 0xe0, 0xe0); + lv_style_pretty_color.image.color = lv_color_make(0xe0, 0xe0, 0xe0); + lv_style_pretty_color.line.color = lv_color_make(0xc0, 0xc0, 0xc0); + lv_style_pretty_color.body.main_color = lv_color_make(0x6b, 0x9a, 0xc7); + lv_style_pretty_color.body.grad_color = lv_color_make(0x2b, 0x59, 0x8b); lv_style_pretty_color.body.border.color = lv_color_make(0x15, 0x2c, 0x42); /*Transparent style*/ memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t)); - lv_style_transp.glass = 1; + lv_style_transp.glass = 1; lv_style_transp.body.border.width = 0; - lv_style_transp.body.opa = LV_OPA_TRANSP; + lv_style_transp.body.opa = LV_OPA_TRANSP; /*Transparent fitting size*/ memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t)); - lv_style_transp_fit.body.padding.left = 0; - lv_style_transp_fit.body.padding.right = 0; - lv_style_transp_fit.body.padding.top = 0; + lv_style_transp_fit.body.padding.left = 0; + lv_style_transp_fit.body.padding.right = 0; + lv_style_transp_fit.body.padding.top = 0; lv_style_transp_fit.body.padding.bottom = 0; /*Transparent tight style*/ @@ -164,58 +170,57 @@ void lv_style_init(void) /*Button released style*/ memcpy(&lv_style_btn_rel, &lv_style_plain, sizeof(lv_style_t)); - lv_style_btn_rel.body.main_color = lv_color_make(0x76, 0xa2, 0xd0); - lv_style_btn_rel.body.grad_color = lv_color_make(0x19, 0x3a, 0x5d); - lv_style_btn_rel.body.radius = LV_DPI / 15; - lv_style_btn_rel.body.padding.left= LV_DPI / 4; - lv_style_btn_rel.body.padding.right = LV_DPI / 4; - lv_style_btn_rel.body.padding.top = LV_DPI / 6; + lv_style_btn_rel.body.main_color = lv_color_make(0x76, 0xa2, 0xd0); + lv_style_btn_rel.body.grad_color = lv_color_make(0x19, 0x3a, 0x5d); + lv_style_btn_rel.body.radius = LV_DPI / 15; + lv_style_btn_rel.body.padding.left = LV_DPI / 4; + lv_style_btn_rel.body.padding.right = LV_DPI / 4; + lv_style_btn_rel.body.padding.top = LV_DPI / 6; lv_style_btn_rel.body.padding.bottom = LV_DPI / 6; - lv_style_btn_rel.body.padding.inner = LV_DPI / 10; - lv_style_btn_rel.body.border.color = lv_color_make(0x0b, 0x19, 0x28); - lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; - lv_style_btn_rel.body.border.opa = LV_OPA_70; - lv_style_btn_rel.body.shadow.color = LV_COLOR_GRAY; - lv_style_btn_rel.body.shadow.width = 0; - lv_style_btn_rel.text.color = lv_color_make(0xff, 0xff, 0xff); - lv_style_btn_rel.image.color = lv_color_make(0xff, 0xff, 0xff); + lv_style_btn_rel.body.padding.inner = LV_DPI / 10; + lv_style_btn_rel.body.border.color = lv_color_make(0x0b, 0x19, 0x28); + lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1; + lv_style_btn_rel.body.border.opa = LV_OPA_70; + lv_style_btn_rel.body.shadow.color = LV_COLOR_GRAY; + lv_style_btn_rel.body.shadow.width = 0; + lv_style_btn_rel.text.color = lv_color_make(0xff, 0xff, 0xff); + lv_style_btn_rel.image.color = lv_color_make(0xff, 0xff, 0xff); /*Button pressed style*/ memcpy(&lv_style_btn_pr, &lv_style_btn_rel, sizeof(lv_style_t)); lv_style_btn_pr.body.main_color = lv_color_make(0x33, 0x62, 0x94); lv_style_btn_pr.body.grad_color = lv_color_make(0x10, 0x26, 0x3c); - lv_style_btn_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); - lv_style_btn_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); - lv_style_btn_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button toggle released style*/ memcpy(&lv_style_btn_tgl_rel, &lv_style_btn_rel, sizeof(lv_style_t)); - lv_style_btn_tgl_rel.body.main_color = lv_color_make(0x0a, 0x11, 0x22); - lv_style_btn_tgl_rel.body.grad_color = lv_color_make(0x37, 0x62, 0x90); + lv_style_btn_tgl_rel.body.main_color = lv_color_make(0x0a, 0x11, 0x22); + lv_style_btn_tgl_rel.body.grad_color = lv_color_make(0x37, 0x62, 0x90); lv_style_btn_tgl_rel.body.border.color = lv_color_make(0x01, 0x07, 0x0d); - lv_style_btn_tgl_rel.text.color = lv_color_make(0xc8, 0xdd, 0xf4); - lv_style_btn_tgl_rel.image.color = lv_color_make(0xc8, 0xdd, 0xf4); - lv_style_btn_tgl_rel.line.color = lv_color_make(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.text.color = lv_color_make(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.image.color = lv_color_make(0xc8, 0xdd, 0xf4); + lv_style_btn_tgl_rel.line.color = lv_color_make(0xc8, 0xdd, 0xf4); /*Button toggle pressed style*/ memcpy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel, sizeof(lv_style_t)); lv_style_btn_tgl_pr.body.main_color = lv_color_make(0x02, 0x14, 0x27); lv_style_btn_tgl_pr.body.grad_color = lv_color_make(0x2b, 0x4c, 0x70); - lv_style_btn_tgl_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); - lv_style_btn_tgl_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); - lv_style_btn_tgl_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.image.color = lv_color_make(0xa4, 0xb5, 0xc6); + lv_style_btn_tgl_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button inactive style*/ memcpy(&lv_style_btn_ina, &lv_style_btn_rel, sizeof(lv_style_t)); - lv_style_btn_ina.body.main_color = lv_color_make(0xd8, 0xd8, 0xd8); - lv_style_btn_ina.body.grad_color = lv_color_make(0xd8, 0xd8, 0xd8); + lv_style_btn_ina.body.main_color = lv_color_make(0xd8, 0xd8, 0xd8); + lv_style_btn_ina.body.grad_color = lv_color_make(0xd8, 0xd8, 0xd8); lv_style_btn_ina.body.border.color = lv_color_make(0x90, 0x90, 0x90); - lv_style_btn_ina.text.color = lv_color_make(0x70, 0x70, 0x70); - lv_style_btn_ina.image.color = lv_color_make(0x70, 0x70, 0x70); - lv_style_btn_ina.line.color = lv_color_make(0x70, 0x70, 0x70); + lv_style_btn_ina.text.color = lv_color_make(0x70, 0x70, 0x70); + lv_style_btn_ina.image.color = lv_color_make(0x70, 0x70, 0x70); + lv_style_btn_ina.line.color = lv_color_make(0x70, 0x70, 0x70); } - /** * Copy a style to an other * @param dest pointer to the destination style @@ -226,7 +231,6 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src) memcpy(dest, src, sizeof(lv_style_t)); } - /** * Mix two styles according to a given ratio * @param start start style @@ -234,7 +238,8 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src) * @param res store the result style here * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style */ -void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio) +void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, + uint16_t ratio) { STYLE_ATTR_MIX(body.opa, ratio); STYLE_ATTR_MIX(body.radius, ratio); @@ -256,26 +261,26 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * lv_opa_t opa = ratio == STYLE_MIX_MAX ? LV_OPA_COVER : ratio; - res->body.main_color = lv_color_mix(end->body.main_color, start->body.main_color, opa); - res->body.grad_color = lv_color_mix(end->body.grad_color, start->body.grad_color, opa); + res->body.main_color = lv_color_mix(end->body.main_color, start->body.main_color, opa); + res->body.grad_color = lv_color_mix(end->body.grad_color, start->body.grad_color, opa); res->body.border.color = lv_color_mix(end->body.border.color, start->body.border.color, opa); res->body.shadow.color = lv_color_mix(end->body.shadow.color, start->body.shadow.color, opa); - res->text.color = lv_color_mix(end->text.color, start->text.color, opa); - res->image.color = lv_color_mix(end->image.color, start->image.color, opa); - res->line.color = lv_color_mix(end->line.color, start->line.color, opa); + res->text.color = lv_color_mix(end->text.color, start->text.color, opa); + res->image.color = lv_color_mix(end->image.color, start->image.color, opa); + res->line.color = lv_color_mix(end->line.color, start->line.color, opa); if(ratio < (STYLE_MIX_MAX >> 1)) { res->body.border.part = start->body.border.part; - res->glass = start->glass; - res->text.font = start->text.font; + res->glass = start->glass; + res->text.font = start->text.font; res->body.shadow.type = start->body.shadow.type; - res->line.rounded = start->line.rounded; + res->line.rounded = start->line.rounded; } else { res->body.border.part = end->body.border.part; - res->glass = end->glass; - res->text.font = end->text.font; + res->glass = end->glass; + res->text.font = end->text.font; res->body.shadow.type = end->body.shadow.type; - res->line.rounded = end->line.rounded; + res->line.rounded = end->line.rounded; } } @@ -284,7 +289,8 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * /** * Create an animation from a pre-configured 'lv_style_anim_t' variable * @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied) - * @return pointer to a descriptor. Really this variable will be animated. (Can be used in `lv_anim_del(dsc, NULL)`) + * @return pointer to a descriptor. Really this variable will be animated. (Can be used in + * `lv_anim_del(dsc, NULL)`) */ void * lv_style_anim_create(lv_style_anim_t * anim) { @@ -299,20 +305,19 @@ void * lv_style_anim_create(lv_style_anim_t * anim) memcpy(dsc->style_anim, anim->style_start, sizeof(lv_style_t)); dsc->end_cb = anim->end_cb; - lv_anim_t a; - a.var = (void *)dsc; - a.start = 0; - a.end = STYLE_MIX_MAX; - a.fp = (lv_anim_fp_t)style_animator; - a.path = lv_anim_path_linear; - a.end_cb = style_animation_common_end_cb; - a.act_time = anim->act_time; - a.time = anim->time; - a.playback = anim->playback; + a.var = (void *)dsc; + a.start = 0; + a.end = STYLE_MIX_MAX; + a.fp = (lv_anim_fp_t)style_animator; + a.path = lv_anim_path_linear; + a.end_cb = style_animation_common_end_cb; + a.act_time = anim->act_time; + a.time = anim->time; + a.playback = anim->playback; a.playback_pause = anim->playback_pause; - a.repeat = anim->repeat; - a.repeat_pause = anim->repeat_pause; + a.repeat = anim->repeat; + a.repeat_pause = anim->repeat_pause; lv_anim_create(&a); @@ -332,8 +337,8 @@ void * lv_style_anim_create(lv_style_anim_t * anim) static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val) { const lv_style_t * start = &dsc->style_start; - const lv_style_t * end = &dsc->style_end; - lv_style_t * act = dsc->style_anim; + const lv_style_t * end = &dsc->style_end; + lv_style_t * act = dsc->style_anim; lv_style_mix(start, end, act, val); @@ -347,7 +352,7 @@ static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val) */ static void style_animation_common_end_cb(void * ptr) { - lv_style_anim_dsc_t * dsc = ptr; /*To avoid casting*/ + lv_style_anim_dsc_t * dsc = ptr; /*To avoid casting*/ if(dsc->end_cb) dsc->end_cb(dsc); diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index c27db5abc8a0..e77b8085ae50 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -22,28 +22,26 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_RADIUS_CIRCLE (LV_COORD_MAX) /*A very big radius to always draw as circle*/ +#define LV_RADIUS_CIRCLE (LV_COORD_MAX) /*A very big radius to always draw as circle*/ /********************** * TYPEDEFS **********************/ /*Border types (Use 'OR'ed values)*/ -enum -{ - LV_BORDER_NONE = 0x00, - LV_BORDER_BOTTOM = 0x01, - LV_BORDER_TOP = 0x02, - LV_BORDER_LEFT = 0x04, - LV_BORDER_RIGHT = 0x08, - LV_BORDER_FULL = 0x0F, - LV_BORDER_INTERNAL = 0x10, /*FOR matrix-like objects (e.g. Button matrix)*/ +enum { + LV_BORDER_NONE = 0x00, + LV_BORDER_BOTTOM = 0x01, + LV_BORDER_TOP = 0x02, + LV_BORDER_LEFT = 0x04, + LV_BORDER_RIGHT = 0x08, + LV_BORDER_FULL = 0x0F, + LV_BORDER_INTERNAL = 0x10, /*FOR matrix-like objects (e.g. Button matrix)*/ }; typedef uint8_t lv_border_part_t; /*Shadow types*/ -enum -{ +enum { LV_SHADOW_BOTTOM = 0, LV_SHADOW_FULL, }; @@ -51,28 +49,32 @@ typedef uint8_t lv_shadow_type_t; typedef struct { - uint8_t glass :1; /*1: Do not inherit this style*/ + uint8_t glass : 1; /*1: Do not inherit this style*/ - struct { + struct + { lv_color_t main_color; - lv_color_t grad_color; /*`grad_color` will be removed in v6.0, use `aux_color` instead*/ + lv_color_t grad_color; /*`grad_color` will be removed in v6.0, use `aux_color` instead*/ lv_coord_t radius; lv_opa_t opa; - struct { + struct + { lv_color_t color; lv_coord_t width; lv_border_part_t part; lv_opa_t opa; } border; - struct { + struct + { lv_color_t color; lv_coord_t width; lv_shadow_type_t type; } shadow; - struct { + struct + { lv_coord_t top; lv_coord_t bottom; lv_coord_t left; @@ -81,8 +83,8 @@ typedef struct } padding; } body; - - struct { + struct + { lv_color_t color; lv_color_t sel_color; const lv_font_t * font; @@ -91,22 +93,25 @@ typedef struct lv_opa_t opa; } text; - struct { + struct + { lv_color_t color; lv_opa_t intense; lv_opa_t opa; } image; - struct { + struct + { lv_color_t color; lv_coord_t width; lv_opa_t opa; - uint8_t rounded :1; /*1: rounded line endings*/ + uint8_t rounded : 1; /*1: rounded line endings*/ } line; } lv_style_t; #if LV_USE_ANIMATION -typedef struct { +typedef struct +{ const lv_style_t * style_start; /*Pointer to the starting style*/ const lv_style_t * style_end; /*Pointer to the destination style*/ lv_style_t * style_anim; /*Pointer to a style to animate*/ @@ -115,8 +120,8 @@ typedef struct { int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ uint16_t playback_pause; /*Wait before play back*/ uint16_t repeat_pause; /*Wait before repeat*/ - uint8_t playback :1; /*When the animation is ready play it back*/ - uint8_t repeat :1; /*Repeat the animation infinitely*/ + uint8_t playback : 1; /*When the animation is ready play it back*/ + uint8_t repeat : 1; /*Repeat the animation infinitely*/ } lv_style_anim_t; /* Example initialization @@ -142,7 +147,7 @@ lv_style_anim_create(&a); /** * Init the basic styles */ -void lv_style_init (void); +void lv_style_init(void); /** * Copy a style to an other @@ -151,7 +156,6 @@ void lv_style_init (void); */ void lv_style_copy(lv_style_t * dest, const lv_style_t * src); - /** * Mix two styles according to a given ratio * @param start start style @@ -159,14 +163,16 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src); * @param res store the result style here * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style */ -void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio); +void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, + uint16_t ratio); #if LV_USE_ANIMATION /** * Create an animation from a pre-configured 'lv_style_anim_t' variable * @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied) - * @return pointer to a descriptor. Really this variable will be animated. (Can be used in `lv_anim_del(dsc, NULL)`) + * @return pointer to a descriptor. Really this variable will be animated. (Can be used in + * `lv_anim_del(dsc, NULL)`) */ void * lv_style_anim_create(lv_style_anim_t * anim); #endif @@ -192,9 +198,8 @@ extern lv_style_t lv_style_btn_ina; * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_STYLE_H*/ +#endif /*LV_STYLE_H*/ diff --git a/src/lv_draw/lv_draw.c b/src/lv_draw/lv_draw.c index b3ee3d7758b0..c7bcad1e2326 100644 --- a/src/lv_draw/lv_draw.c +++ b/src/lv_draw/lv_draw.c @@ -58,36 +58,36 @@ lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa) * * * | * * Anti-aliased pixels come to the '*' characters - * Calculate what percentage of the pixels should be covered if real line (not rasterized) would be drawn: + * Calculate what percentage of the pixels should be covered if real line (not rasterized) would + * be drawn: * 1. A real line should start on (0;0) and end on (2;1) - * 2. So the line intersection coordinates on the first pixel: (0;0) (1;0.5) -> 25% covered pixel in average + * 2. So the line intersection coordinates on the first pixel: (0;0) (1;0.5) -> 25% covered + * pixel in average * 3. For the second pixel: (1;0.5) (2;1) -> 75% covered pixel in average * 4. The equation: (px_id * 2 + 1) / (segment_width * 2) - * segment_width: the line segment which is being anti-aliased (was 2 in the example) - * px_id: pixel ID from 0 to (segment_width - 1) - * result: [0..1] coverage of the pixel + * segment_width: the line segment which is being anti-aliased (was 2 in the + * example) px_id: pixel ID from 0 to (segment_width - 1) result: [0..1] coverage of the pixel */ /*Accelerate the common segment sizes to avoid division*/ - static const lv_opa_t seg1[1] = {128}; - static const lv_opa_t seg2[2] = {64, 192}; - static const lv_opa_t seg3[3] = {42, 128, 212}; - static const lv_opa_t seg4[4] = {32, 96, 159, 223}; - static const lv_opa_t seg5[5] = {26, 76, 128, 178, 230}; - static const lv_opa_t seg6[6] = {21, 64, 106, 148, 191, 234}; - static const lv_opa_t seg7[7] = {18, 55, 91, 128, 164, 200, 237}; - static const lv_opa_t seg8[8] = {16, 48, 80, 112, 143, 175, 207, 239}; - - static const lv_opa_t * seg_map[] = {seg1, seg2, seg3, seg4, - seg5, seg6, seg7, seg8 - }; - - if(seg == 0) return LV_OPA_TRANSP; - else if(seg < 8) return (uint32_t)((uint32_t)seg_map[seg - 1][px_id] * base_opa) >> 8; + static const lv_opa_t seg1[1] = {128}; + static const lv_opa_t seg2[2] = {64, 192}; + static const lv_opa_t seg3[3] = {42, 128, 212}; + static const lv_opa_t seg4[4] = {32, 96, 159, 223}; + static const lv_opa_t seg5[5] = {26, 76, 128, 178, 230}; + static const lv_opa_t seg6[6] = {21, 64, 106, 148, 191, 234}; + static const lv_opa_t seg7[7] = {18, 55, 91, 128, 164, 200, 237}; + static const lv_opa_t seg8[8] = {16, 48, 80, 112, 143, 175, 207, 239}; + + static const lv_opa_t * seg_map[] = {seg1, seg2, seg3, seg4, seg5, seg6, seg7, seg8}; + + if(seg == 0) + return LV_OPA_TRANSP; + else if(seg < 8) + return (uint32_t)((uint32_t)seg_map[seg - 1][px_id] * base_opa) >> 8; else { return ((px_id * 2 + 1) * base_opa) / (2 * seg); } - } /** @@ -99,7 +99,8 @@ lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa) * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) +void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, + lv_color_t color, lv_opa_t opa) { bool aa_inv = false; if(length < 0) { @@ -124,7 +125,8 @@ void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) +void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, + lv_color_t color, lv_opa_t opa) { bool aa_inv = false; if(length < 0) { diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index 5a1350873fe5..0d346653af33 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -27,11 +27,11 @@ extern "C" { *********************/ /*If image pixels contains alpha we need to know how much byte is a pixel*/ #if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 -# define LV_IMG_PX_SIZE_ALPHA_BYTE 2 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 2 #elif LV_COLOR_DEPTH == 16 -# define LV_IMG_PX_SIZE_ALPHA_BYTE 3 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 3 #elif LV_COLOR_DEPTH == 32 -# define LV_IMG_PX_SIZE_ALPHA_BYTE 4 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 4 #endif /********************** @@ -46,7 +46,6 @@ enum { }; typedef uint8_t lv_img_src_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -71,7 +70,8 @@ lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa) * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa); +void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, + lv_color_t color, lv_opa_t opa); /** * Add a horizontal anti-aliasing segment (pixels with decreasing opacity) @@ -82,7 +82,8 @@ void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa); +void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, + lv_color_t color, lv_opa_t opa); #endif /********************** @@ -107,4 +108,4 @@ void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ } /* extern "C" */ #endif -#endif /*LV_DRAW_H*/ +#endif /*LV_DRAW_H*/ diff --git a/src/lv_draw/lv_draw_arc.c b/src/lv_draw/lv_draw_arc.c index 0177d1449faa..e33c22b09865 100644 --- a/src/lv_draw/lv_draw_arc.c +++ b/src/lv_draw/lv_draw_arc.c @@ -21,8 +21,10 @@ * STATIC PROTOTYPES **********************/ static uint16_t fast_atan2(int x, int y); -static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa); -static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa); +static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, + lv_color_t color, lv_opa_t opa); +static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, + lv_color_t color, lv_opa_t opa); static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end); static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end); @@ -50,33 +52,41 @@ static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end); * @param opa_scale scale down all opacities by the factor */ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, - uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale) + uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, + lv_opa_t opa_scale) { lv_coord_t thickness = style->line.width; if(thickness > radius) thickness = radius; lv_coord_t r_out = radius; - lv_coord_t r_in = r_out - thickness; + lv_coord_t r_in = r_out - thickness; int16_t deg_base; int16_t deg; lv_coord_t x_start[4]; lv_coord_t x_end[4]; lv_color_t color = style->line.color; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; - + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; bool (*deg_test)(uint16_t, uint16_t, uint16_t); - if(start_angle <= end_angle) deg_test = deg_test_norm; - else deg_test = deg_test_inv; - - if(deg_test(270, start_angle, end_angle)) hor_line(center_x - r_out + 1, center_y, mask, thickness - 1, color, opa); // Left Middle - if(deg_test(90, start_angle, end_angle)) hor_line(center_x + r_in, center_y, mask, thickness - 1, color, opa); // Right Middle - if(deg_test(180, start_angle, end_angle)) ver_line(center_x, center_y - r_out + 1, mask, thickness - 1, color, opa); // Top Middle - if(deg_test(0, start_angle, end_angle)) ver_line(center_x, center_y + r_in, mask, thickness - 1, color, opa); // Bottom middle + if(start_angle <= end_angle) + deg_test = deg_test_norm; + else + deg_test = deg_test_inv; + + if(deg_test(270, start_angle, end_angle)) + hor_line(center_x - r_out + 1, center_y, mask, thickness - 1, color, opa); // Left Middle + if(deg_test(90, start_angle, end_angle)) + hor_line(center_x + r_in, center_y, mask, thickness - 1, color, opa); // Right Middle + if(deg_test(180, start_angle, end_angle)) + ver_line(center_x, center_y - r_out + 1, mask, thickness - 1, color, opa); // Top Middle + if(deg_test(0, start_angle, end_angle)) + ver_line(center_x, center_y + r_in, mask, thickness - 1, color, opa); // Bottom middle uint32_t r_out_sqr = r_out * r_out; - uint32_t r_in_sqr = r_in * r_in; + uint32_t r_in_sqr = r_in * r_in; int16_t xi; int16_t yi; for(yi = -r_out; yi < 0; yi++) { @@ -84,16 +94,16 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons x_start[1] = LV_COORD_MIN; x_start[2] = LV_COORD_MIN; x_start[3] = LV_COORD_MIN; - x_end[0] = LV_COORD_MIN; - x_end[1] = LV_COORD_MIN; - x_end[2] = LV_COORD_MIN; - x_end[3] = LV_COORD_MIN; + x_end[0] = LV_COORD_MIN; + x_end[1] = LV_COORD_MIN; + x_end[2] = LV_COORD_MIN; + x_end[3] = LV_COORD_MIN; for(xi = -r_out; xi < 0; xi++) { uint32_t r_act_sqr = xi * xi + yi * yi; if(r_act_sqr > r_out_sqr) continue; - deg_base = fast_atan2(xi, yi) - 180; + deg_base = fast_atan2(xi, yi) - 180; deg = 180 + deg_base; if(deg_test(deg, start_angle, end_angle)) { @@ -123,10 +133,11 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons x_end[3] = xi - 1; } - if(r_act_sqr < r_in_sqr) break; /*No need to continue the iteration in x once we found the inner edge of the arc*/ + if(r_act_sqr < r_in_sqr) + break; /*No need to continue the iteration in x once we found the inner edge of the + arc*/ } - if(x_start[0] != LV_COORD_MIN) { if(x_end[0] == LV_COORD_MIN) x_end[0] = xi - 1; hor_line(center_x + x_start[0], center_y + yi, mask, x_end[0] - x_start[0], color, opa); @@ -139,20 +150,20 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons if(x_start[2] != LV_COORD_MIN) { if(x_end[2] == LV_COORD_MIN) x_end[2] = xi - 1; - hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), color, opa); + hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), + color, opa); } if(x_start[3] != LV_COORD_MIN) { if(x_end[3] == LV_COORD_MIN) x_end[3] = xi - 1; - hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), color, opa); + hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), + color, opa); } - #if LV_ANTIALIAS /*TODO*/ #endif - } } @@ -171,61 +182,61 @@ static uint16_t fast_atan2(int x, int y) unsigned char negflag; unsigned char tempdegree; unsigned char comp; - unsigned int degree; // this will hold the result - //signed int x; // these hold the XY vector at the start - //signed int y; // (and they will be destroyed) + unsigned int degree; // this will hold the result + // signed int x; // these hold the XY vector at the start + // signed int y; // (and they will be destroyed) unsigned int ux; unsigned int uy; // Save the sign flags then remove signs and get XY as unsigned ints negflag = 0; if(x < 0) { - negflag += 0x01; // x flag bit - x = (0 - x); // is now + + negflag += 0x01; // x flag bit + x = (0 - x); // is now + } - ux = x; // copy to unsigned var before multiply + ux = x; // copy to unsigned var before multiply if(y < 0) { - negflag += 0x02; // y flag bit - y = (0 - y); // is now + + negflag += 0x02; // y flag bit + y = (0 - y); // is now + } - uy = y; // copy to unsigned var before multiply + uy = y; // copy to unsigned var before multiply // 1. Calc the scaled "degrees" if(ux > uy) { - degree = (uy * 45) / ux; // degree result will be 0-45 range - negflag += 0x10; // octant flag bit + degree = (uy * 45) / ux; // degree result will be 0-45 range + negflag += 0x10; // octant flag bit } else { - degree = (ux * 45) / uy; // degree result will be 0-45 range + degree = (ux * 45) / uy; // degree result will be 0-45 range } // 2. Compensate for the 4 degree error curve - comp = 0; - tempdegree = degree; // use an unsigned char for speed! - if(tempdegree > 22) { // if top half of range + comp = 0; + tempdegree = degree; // use an unsigned char for speed! + if(tempdegree > 22) { // if top half of range if(tempdegree <= 44) comp++; if(tempdegree <= 41) comp++; if(tempdegree <= 37) comp++; - if(tempdegree <= 32) comp++; // max is 4 degrees compensated - } else { // else is lower half of range + if(tempdegree <= 32) comp++; // max is 4 degrees compensated + } else { // else is lower half of range if(tempdegree >= 2) comp++; if(tempdegree >= 6) comp++; if(tempdegree >= 10) comp++; - if(tempdegree >= 15) comp++; // max is 4 degrees compensated + if(tempdegree >= 15) comp++; // max is 4 degrees compensated } - degree += comp; // degree is now accurate to +/- 1 degree! + degree += comp; // degree is now accurate to +/- 1 degree! // Invert degree if it was X>Y octant, makes 0-45 into 90-45 if(negflag & 0x10) degree = (90 - degree); // 3. Degree is now 0-90 range for this quadrant, // need to invert it for whichever quadrant it was in - if(negflag & 0x02) { // if -Y - if(negflag & 0x01) // if -Y -X + if(negflag & 0x02) { // if -Y + if(negflag & 0x01) // if -Y -X degree = (180 + degree); - else // else is -Y +X + else // else is -Y +X degree = (180 - degree); - } else { // else is +Y - if(negflag & 0x01) // if +Y -X + } else { // else is +Y + if(negflag & 0x01) // if +Y -X degree = (360 - degree); } return degree; @@ -234,7 +245,8 @@ static uint16_t fast_atan2(int x, int y) /********************** * STATIC FUNCTIONS **********************/ -static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa) +static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, + lv_color_t color, lv_opa_t opa) { lv_area_t area; lv_area_set(&area, x, y, x, y + len); @@ -242,7 +254,8 @@ static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coor lv_draw_fill(&area, mask, color, opa); } -static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa) +static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, + lv_color_t color, lv_opa_t opa) { lv_area_t area; lv_area_set(&area, x, y, x + len, y); @@ -252,13 +265,16 @@ static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coor static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end) { - if(deg >= start && deg <= end) return true; - else return false; + if(deg >= start && deg <= end) + return true; + else + return false; } static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end) { if(deg >= start || deg <= end) { return true; - } else return false; + } else + return false; } diff --git a/src/lv_draw/lv_draw_arc.h b/src/lv_draw/lv_draw_arc.h index 203eabe61823..faff91a615e5 100644 --- a/src/lv_draw/lv_draw_arc.h +++ b/src/lv_draw/lv_draw_arc.h @@ -39,13 +39,13 @@ extern "C" { * @param opa_scale scale down all opacities by the factor */ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, - uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale); + uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, + lv_opa_t opa_scale); /********************** * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 59774d8b68fb..16f30ffdaaf4 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -26,7 +26,8 @@ /********************* * DEFINES *********************/ -#define VFILL_HW_ACC_SIZE_LIMIT 50 /*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/ +#define VFILL_HW_ACC_SIZE_LIMIT \ + 50 /*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/ #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATTRIBUTE_MEM_ALIGN @@ -40,10 +41,12 @@ * STATIC PROTOTYPES **********************/ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa); +static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, + lv_color_t color, lv_opa_t opa); #if LV_COLOR_SCREEN_TRANSP -static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa); +static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, + lv_color_t fg_color, lv_opa_t fg_opa); #endif /********************** @@ -66,21 +69,20 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, * @param color pixel color * @param opa opacity of the area (0..255) */ -void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, + lv_opa_t opa) { if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; - /*Pixel out of the mask*/ - if(x < mask_p->x1 || x > mask_p->x2 || - y < mask_p->y1 || y > mask_p->y2) { + if(x < mask_p->x1 || x > mask_p->x2 || y < mask_p->y1 || y > mask_p->y2) { return; } - lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); - uint32_t vdb_width = lv_area_get_width(&vdb->area); + uint32_t vdb_width = lv_area_get_width(&vdb->area); /*Make the coordinates relative to VDB*/ x -= vdb->area.x1; @@ -103,7 +105,6 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t } } - /** * Fill an area in the Virtual Display Buffer * @param cords_p coordinates of the area to fill @@ -111,8 +112,8 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, - lv_color_t color, lv_opa_t opa) +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, + lv_opa_t opa) { if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; @@ -128,23 +129,23 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, /*If there are common part of the three area then draw to the vdb*/ if(union_ok == false) return; - lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); - lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/ + lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/ vdb_rel_a.x1 = res_a.x1 - vdb->area.x1; vdb_rel_a.y1 = res_a.y1 - vdb->area.y1; vdb_rel_a.x2 = res_a.x2 - vdb->area.x1; vdb_rel_a.y2 = res_a.y2 - vdb->area.y1; lv_color_t * vdb_buf_tmp = vdb->buf_act; - uint32_t vdb_width = lv_area_get_width(&vdb->area); + uint32_t vdb_width = lv_area_get_width(&vdb->area); /*Move the vdb_tmp to the first row*/ vdb_buf_tmp += vdb_width * vdb_rel_a.y1; - #if LV_USE_GPU - static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ + static LV_ATTRIBUTE_MEM_ALIGN lv_color_t + color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ static lv_coord_t last_width = -1; lv_coord_t w = lv_area_get_width(&vdb_rel_a); @@ -211,7 +212,6 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, else { sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); } - } #else sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); @@ -227,17 +227,14 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, - const lv_font_t * font_p, uint32_t letter, - lv_color_t color, lv_opa_t opa) +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, + uint32_t letter, lv_color_t color, lv_opa_t opa) { - const uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ - const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ - const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255 - }; + const uint8_t bpp1_opa_table[2] = { + 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}; if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; @@ -250,7 +247,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, lv_coord_t pos_y = pos_p->y; uint8_t letter_w = lv_font_get_real_width(font_p, letter); uint8_t letter_h = lv_font_get_height(font_p); - uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ + uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ const uint8_t * bpp_opa_table; uint8_t mask_init; uint8_t mask; @@ -259,26 +256,24 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, pos_x += (lv_font_get_width(font_p, letter) - letter_w) / 2; } - switch(bpp) { case 1: bpp_opa_table = bpp1_opa_table; - mask_init = 0x80; + mask_init = 0x80; break; case 2: bpp_opa_table = bpp2_opa_table; - mask_init = 0xC0; + mask_init = 0xC0; break; case 4: bpp_opa_table = bpp4_opa_table; - mask_init = 0xF0; + mask_init = 0xF0; break; case 8: bpp_opa_table = NULL; - mask_init = 0xFF; - break; /*No opa table, pixel value will be used directly*/ - default: - return; /*Invalid bpp. Can't render the letter*/ + mask_init = 0xFF; + break; /*No opa table, pixel value will be used directly*/ + default: return; /*Invalid bpp. Can't render the letter*/ } const uint8_t * map_p = lv_font_get_bitmap(font_p, letter); @@ -286,31 +281,32 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, if(map_p == NULL) return; /*If the letter is completely out of mask don't draw it */ - if(pos_x + letter_w < mask_p->x1 || pos_x > mask_p->x2 || - pos_y + letter_h < mask_p->y1 || pos_y > mask_p->y2) return; + if(pos_x + letter_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + letter_h < mask_p->y1 || + pos_y > mask_p->y2) + return; - lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); - lv_coord_t vdb_width = lv_area_get_width(&vdb->area); + lv_coord_t vdb_width = lv_area_get_width(&vdb->area); lv_color_t * vdb_buf_tmp = vdb->buf_act; lv_coord_t col, row; uint8_t col_bit; uint8_t col_byte_cnt; - uint8_t width_byte_scr = letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ + uint8_t width_byte_scr = + letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ if(letter_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ + uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ if((letter_w * bpp) & 0x7) width_byte_bpp++; /* Calculate the col/row start/end on the map*/ lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x; - lv_coord_t col_end = pos_x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_x + 1; + lv_coord_t col_end = pos_x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_x + 1; lv_coord_t row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y; - lv_coord_t row_end = pos_y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_y + 1; + lv_coord_t row_end = pos_y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_y + 1; /*Set a pointer on VDB to the first pixel of the letter*/ - vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) - + pos_x - vdb->area.x1; + vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + pos_x - vdb->area.x1; /*If the letter is partially out of mask the move there on VDB*/ vdb_buf_tmp += (row_start * vdb_width) + col_start; @@ -320,30 +316,30 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, uint8_t letter_px; lv_opa_t px_opa; - for(row = row_start; row < row_end; row ++) { + for(row = row_start; row < row_end; row++) { col_byte_cnt = 0; - col_bit = (col_start * bpp) % 8; - mask = mask_init >> col_bit; - for(col = col_start; col < col_end; col ++) { + col_bit = (col_start * bpp) % 8; + mask = mask_init >> col_bit; + for(col = col_start; col < col_end; col++) { letter_px = (*map_p & mask) >> (8 - col_bit - bpp); if(letter_px != 0) { if(opa == LV_OPA_COVER) { px_opa = bpp == 8 ? letter_px : bpp_opa_table[letter_px]; } else { - px_opa = bpp == 8 ? - (uint16_t)((uint16_t)letter_px * opa) >> 8 : - (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; + px_opa = bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8 + : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; } if(disp->driver.set_px_cb) { disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, - (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, - color, px_opa); + (col + pos_x) - vdb->area.x1, + (row + pos_y) - vdb->area.y1, color, px_opa); } else { #if LV_COLOR_SCREEN_TRANSP == 0 *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa); #else - *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); + *vdb_buf_tmp = + color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); #endif } } @@ -355,14 +351,14 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, mask = mask >> bpp; } else { col_bit = 0; - col_byte_cnt ++; + col_byte_cnt++; mask = mask_init; - map_p ++; + map_p++; } } - map_p += (width_byte_bpp) - col_byte_cnt; - vdb_buf_tmp += vdb_width - (col_end - col_start); /*Next row in VDB*/ + map_p += (width_byte_bpp)-col_byte_cnt; + vdb_buf_tmp += vdb_width - (col_end - col_start); /*Next row in VDB*/ } } @@ -377,9 +373,9 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa) +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, + lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, + lv_opa_t recolor_opa) { if(opa < LV_OPA_MIN) return; @@ -390,11 +386,11 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, /*Get the union of map size and mask*/ /* The mask is already truncated to the vdb size - * in 'lv_refr_area_with_vdb' function */ + * in 'lv_refr_area_with_vdb' function */ union_ok = lv_area_intersect(&masked_a, cords_p, mask_p); /*If there are common part of the three area then draw to the vdb*/ - if(union_ok == false) return; + if(union_ok == false) return; /*The pixel size in byte is different if an alpha byte is added too*/ uint8_t px_size_byte = alpha_byte ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t); @@ -402,13 +398,13 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, /*If the map starts OUT of the masked area then calc. the first pixel*/ lv_coord_t map_width = lv_area_get_width(cords_p); if(cords_p->y1 < masked_a.y1) { - map_p += (uint32_t) map_width * ((masked_a.y1 - cords_p->y1)) * px_size_byte; + map_p += (uint32_t)map_width * ((masked_a.y1 - cords_p->y1)) * px_size_byte; } if(cords_p->x1 < masked_a.x1) { map_p += (masked_a.x1 - cords_p->x1) * px_size_byte; } - lv_disp_t * disp = lv_refr_get_disp_refreshing(); + lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); /*Stores coordinates relative to the current VDB*/ @@ -417,16 +413,17 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, masked_a.x2 = masked_a.x2 - vdb->area.x1; masked_a.y2 = masked_a.y2 - vdb->area.y1; - lv_coord_t vdb_width = lv_area_get_width(&vdb->area); + lv_coord_t vdb_width = lv_area_get_width(&vdb->area); lv_color_t * vdb_buf_tmp = vdb->buf_act; - vdb_buf_tmp += (uint32_t) vdb_width * masked_a.y1; /*Move to the first row*/ - vdb_buf_tmp += (uint32_t) masked_a.x1; /*Move to the first col*/ + vdb_buf_tmp += (uint32_t)vdb_width * masked_a.y1; /*Move to the first row*/ + vdb_buf_tmp += (uint32_t)masked_a.x1; /*Move to the first col*/ lv_coord_t row; lv_coord_t map_useful_w = lv_area_get_width(&masked_a); /*The simplest case just copy the pixels into the VDB*/ - if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) { + if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && + recolor_opa == LV_OPA_TRANSP) { /*Use the custom VDB write function is exists*/ if(disp->driver.set_px_cb) { @@ -434,9 +431,10 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]); - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, + col + masked_a.x1, row, px_color, opa); } - map_p += map_width * px_size_byte; /*Next row on the map*/ + map_p += map_width * px_size_byte; /*Next row on the map*/ } } /*Normal native VDB*/ @@ -451,8 +449,8 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, #else sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); #endif - map_p += map_width * px_size_byte; /*Next row on the map*/ - vdb_buf_tmp += vdb_width; /*Next row on the VDB*/ + map_p += map_width * px_size_byte; /*Next row on the map*/ + vdb_buf_tmp += vdb_width; /*Next row on the VDB*/ } } } @@ -461,12 +459,12 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, else { lv_color_t chroma_key_color = LV_COLOR_TRANSP; lv_coord_t col; - lv_color_t last_img_px = LV_COLOR_BLACK; + lv_color_t last_img_px = LV_COLOR_BLACK; lv_color_t recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa); for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { - lv_opa_t opa_result = opa; - uint8_t * px_color_p = (uint8_t *) &map_p[(uint32_t)col * px_size_byte]; + lv_opa_t opa_result = opa; + uint8_t * px_color_p = (uint8_t *)&map_p[(uint32_t)col * px_size_byte]; lv_color_t px_color; /*Calculate with the pixel level alpha*/ @@ -474,14 +472,17 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, #if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1 px_color.full = px_color_p[0]; #elif LV_COLOR_DEPTH == 16 - /*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/ + /*Because of Alpha byte 16 bit color can start on odd address which can cause + * crash*/ px_color.full = px_color_p[0] + (px_color_p[1] << 8); #elif LV_COLOR_DEPTH == 32 px_color = *((lv_color_t *)px_color_p); #endif lv_opa_t px_opa = *(px_color_p + LV_IMG_PX_SIZE_ALPHA_BYTE - 1); - if(px_opa == LV_OPA_TRANSP) continue; - else if(px_opa != LV_OPA_COVER) opa_result = (uint32_t)((uint32_t)px_opa * opa_result) >> 8; + if(px_opa == LV_OPA_TRANSP) + continue; + else if(px_opa != LV_OPA_COVER) + opa_result = (uint32_t)((uint32_t)px_opa * opa_result) >> 8; } else { px_color = *((lv_color_t *)px_color_p); } @@ -491,40 +492,48 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, /*Re-color the pixel if required*/ if(recolor_opa != LV_OPA_TRANSP) { - if(last_img_px.full != px_color.full) { /*Minor acceleration: calculate only for new colors (save the last)*/ - last_img_px = px_color; + if(last_img_px.full != px_color.full) { /*Minor acceleration: calculate only for + new colors (save the last)*/ + last_img_px = px_color; recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa); } /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, recolored_px, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, + col + masked_a.x1, row, recolored_px, opa_result); } /*Normal native VDB write*/ else { - if(opa_result == LV_OPA_COVER) vdb_buf_tmp[col].full = recolored_px.full; - else vdb_buf_tmp[col] = lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result); + if(opa_result == LV_OPA_COVER) + vdb_buf_tmp[col].full = recolored_px.full; + else + vdb_buf_tmp[col] = + lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result); } } else { /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, px_color, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, + col + masked_a.x1, row, px_color, opa_result); } /*Normal native VDB write*/ else { - if(opa_result == LV_OPA_COVER) vdb_buf_tmp[col] = px_color; + if(opa_result == LV_OPA_COVER) + vdb_buf_tmp[col] = px_color; else { #if LV_COLOR_SCREEN_TRANSP == 0 vdb_buf_tmp[col] = lv_color_mix(px_color, vdb_buf_tmp[col], opa_result); #else - vdb_buf_tmp[col] = color_mix_2_alpha(vdb_buf_tmp[col], vdb_buf_tmp[col].alpha, px_color, opa_result); + vdb_buf_tmp[col] = color_mix_2_alpha( + vdb_buf_tmp[col], vdb_buf_tmp[col].alpha, px_color, opa_result); #endif } } } } - map_p += map_width * px_size_byte; /*Next row on the map*/ - vdb_buf_tmp += vdb_width; /*Next row on the VDB*/ + map_p += map_width * px_size_byte; /*Next row on the map*/ + vdb_buf_tmp += vdb_width; /*Next row on the VDB*/ } } } @@ -560,7 +569,8 @@ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t len * @param color fill color * @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover) */ -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa) +static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, + lv_color_t color, lv_opa_t opa) { /*Set all row in vdb to the given color*/ lv_coord_t row; @@ -571,11 +581,12 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ if(disp->driver.set_px_cb) { for(col = fill_area->x1; col <= fill_area->x2; col++) { for(row = fill_area->y1; row <= fill_area->y2; row++) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, + opa); } } } else { - mem += fill_area->y1 * mem_width; /*Go to the first row*/ + mem += fill_area->y1 * mem_width; /*Go to the first row*/ /*Run simpler function without opacity*/ if(opa == LV_OPA_COVER) { @@ -587,7 +598,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ /*Copy the first row to all other rows*/ lv_color_t * mem_first = &mem[fill_area->x1]; - lv_coord_t copy_size = (fill_area->x2 - fill_area->x1 + 1) * sizeof(lv_color_t); + lv_coord_t copy_size = (fill_area->x2 - fill_area->x1 + 1) * sizeof(lv_color_t); mem += mem_width; for(row = fill_area->y1 + 1; row <= fill_area->y2; row++) { @@ -599,7 +610,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ else { #if LV_COLOR_SCREEN_TRANSP == 0 - lv_color_t bg_tmp = LV_COLOR_BLACK; + lv_color_t bg_tmp = LV_COLOR_BLACK; lv_color_t opa_tmp = lv_color_mix(color, bg_tmp, opa); #endif for(row = fill_area->y1; row <= fill_area->y2; row++) { @@ -607,7 +618,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ #if LV_COLOR_SCREEN_TRANSP == 0 /*If the bg color changed recalculate the result color*/ if(mem[col].full != bg_tmp.full) { - bg_tmp = mem[col]; + bg_tmp = mem[col]; opa_tmp = lv_color_mix(color, bg_tmp, opa); } @@ -633,7 +644,8 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ * @param fg_opa alpha of the foreground color * @return the mixed color. the alpha channel (color.alpha) contains the result alpha */ -static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa) +static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, + lv_color_t fg_color, lv_opa_t fg_opa) { /* Pick the foreground if it's fully opaque or the Background is fully transparent*/ if(fg_opa == LV_OPA_COVER || bg_opa <= LV_OPA_MIN) { @@ -651,32 +663,31 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, /*Both colors have alpha. Expensive calculation need to be applied*/ else { /*Save the parameters and the result. If they will be asked again don't compute again*/ - static lv_opa_t fg_opa_save = 0; - static lv_opa_t bg_opa_save = 0; + static lv_opa_t fg_opa_save = 0; + static lv_opa_t bg_opa_save = 0; static lv_color_t fg_color_save = {{0}}; static lv_color_t bg_color_save = {{0}}; - static lv_color_t c = {{0}}; + static lv_color_t c = {{0}}; - if(fg_opa != fg_opa_save || bg_opa != bg_opa_save || - fg_color.full != fg_color_save.full || bg_color.full != bg_color_save.full) - { - fg_opa_save = fg_opa; - bg_opa_save = bg_opa; + if(fg_opa != fg_opa_save || bg_opa != bg_opa_save || fg_color.full != fg_color_save.full || + bg_color.full != bg_color_save.full) { + fg_opa_save = fg_opa; + bg_opa_save = bg_opa; fg_color.full = fg_color_save.full; bg_color.full = bg_color_save.full; - /*Info: https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ + /*Info: + * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ lv_opa_t alpha_res = 255 - ((uint16_t)((uint16_t)(255 - fg_opa) * (255 - bg_opa)) >> 8); if(alpha_res == 0) { - while(1); + while(1) + ; } - lv_opa_t ratio = (uint16_t)((uint16_t) fg_opa * 255) / alpha_res; - c = lv_color_mix(fg_color, bg_color, ratio); - c.ch.alpha = alpha_res; + lv_opa_t ratio = (uint16_t)((uint16_t)fg_opa * 255) / alpha_res; + c = lv_color_mix(fg_color, bg_color, ratio); + c.ch.alpha = alpha_res; } return c; - } } #endif /*LV_COLOR_SCREEN_TRANSP*/ - diff --git a/src/lv_draw/lv_draw_basic.h b/src/lv_draw/lv_draw_basic.h index ec261744d7dc..97dfb33499a1 100644 --- a/src/lv_draw/lv_draw_basic.h +++ b/src/lv_draw/lv_draw_basic.h @@ -35,7 +35,8 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ -void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, + lv_opa_t opa); /** * Fill an area in the Virtual Display Buffer * @param cords_p coordinates of the area to fill @@ -43,8 +44,8 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, - lv_color_t color, lv_opa_t opa); +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, + lv_opa_t opa); /** * Draw a letter in the Virtual Display Buffer @@ -55,9 +56,8 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, - const lv_font_t * font_p, uint32_t letter, - lv_color_t color, lv_opa_t opa); +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, + uint32_t letter, lv_color_t color, lv_opa_t opa); /** * Draw a color map to the display (image) @@ -70,9 +70,9 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, - const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte, - lv_color_t recolor, lv_opa_t recolor_opa); +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, + lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, + lv_opa_t recolor_opa); /********************** * MACROS @@ -82,4 +82,4 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, } /* extern "C" */ #endif -#endif /*LV_DRAW_BASIC_H*/ +#endif /*LV_DRAW_BASIC_H*/ diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 20bb667fa9f0..85e106be8736 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -20,14 +20,16 @@ /********************** * STATIC PROTOTYPES **********************/ -static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale); +static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, const void * src, + const lv_style_t * style, lv_opa_t opa_scale); static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style); static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); static void lv_img_decoder_close(void); -static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); -static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); +static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); /********************** * STATIC VARIABLES @@ -65,28 +67,29 @@ static lv_img_decoder_close_f_t lv_img_decoder_close_custom; * @param style style of the image * @param opa_scale scale down all opacities by the factor */ -void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale) +void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, + const lv_style_t * style, lv_opa_t opa_scale) { if(src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, + NULL, -1, -1); return; } lv_res_t res; res = lv_img_draw_core(coords, mask, src, style, opa_scale); - if(res == LV_RES_INV) { + if(res == LV_RES_INV) { LV_LOG_WARN("Image draw error"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, + NULL, -1, -1); return; } } - /** * Initialize and `lv_img_dsc_t` variable with the image's info * @param src variable, filename or symbol @@ -100,13 +103,13 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) if(lv_img_decoder_info_custom) { lv_res_t custom_res; custom_res = lv_img_decoder_info_custom(src, header); - if(custom_res == LV_RES_OK) return LV_RES_OK; /*Custom info has supported this source*/ + if(custom_res == LV_RES_OK) return LV_RES_OK; /*Custom info has supported this source*/ } lv_img_src_t src_type = lv_img_src_get_type(src); if(src_type == LV_IMG_SRC_VARIABLE) { - header->w = ((lv_img_dsc_t *)src)->header.w; - header->h = ((lv_img_dsc_t *)src)->header.h; + header->w = ((lv_img_dsc_t *)src)->header.w; + header->h = ((lv_img_dsc_t *)src)->header.h; header->cf = ((lv_img_dsc_t *)src)->header.cf; } #if LV_USE_FILESYSTEM @@ -121,8 +124,8 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) /*Create a dummy header on fs error*/ if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { - header->w = LV_DPI; - header->h = LV_DPI; + header->w = LV_DPI; + header->h = LV_DPI; header->cf = LV_IMG_CF_UNKNOWN; } @@ -130,36 +133,38 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) } #endif else if(src_type == LV_IMG_SRC_SYMBOL) { - /*The size depend on the font but it is unknown here. It should be handled outside of the function*/ + /*The size depend on the font but it is unknown here. It should be handled outside of the + * function*/ header->w = 1; header->h = 1; - /* Symbols always have transparent parts. Important because of cover check in the design function. - * The actual value doesn't matter because lv_draw_label will draw it*/ - header->cf = LV_IMG_CF_ALPHA_1BIT; + /* Symbols always have transparent parts. Important because of cover check in the design + * function. The actual value doesn't matter because lv_draw_label will draw it*/ + header->cf = LV_IMG_CF_ALPHA_1BIT; } else { LV_LOG_WARN("Image get info found unknown src type"); return false; } return true; -} - +} + /** * Get the color of an image's pixel * @param dsc an image descriptor * @param x x coordinate of the point to get * @param y x coordinate of the point to get - * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows the color. - * Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not used. + * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows + * the color. Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not + * used. * @return color of the point */ -lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_style_t * style) +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_style_t * style) { lv_color_t p_color = LV_COLOR_BLACK; if(x >= dsc->header.w) { x = dsc->header.w - 1; LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); - } - else if(x < 0) { + } else if(x < 0) { x = 0; LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); } @@ -167,64 +172,56 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y if(y >= dsc->header.h) { y = dsc->header.h - 1; LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); - } - else if(y < 0) { + } else if(y < 0) { y = 0; LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); } - uint8_t * buf_u8 = (uint8_t *) dsc->data; + uint8_t * buf_u8 = (uint8_t *)dsc->data; if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) - { + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; - uint32_t px = dsc->header.w * y * px_size + x * px_size; + uint32_t px = dsc->header.w * y * px_size + x * px_size; memcpy(&p_color, &buf_u8[px], sizeof(lv_color_t)); #if LV_COLOR_SIZE == 32 - p_color.ch.alpha = 0xFF; /*Only the color should be get so use a deafult alpha value*/ + p_color.ch.alpha = 0xFF; /*Only the color should be get so use a deafult alpha value*/ #endif - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { buf_u8 += 4 * 2; uint8_t bit = x & 0x7; - x = x >> 3; + x = x >> 3; - uint32_t px = (dsc->header.w >> 3) * y + x; + uint32_t px = (dsc->header.w >> 3) * y + x; p_color.full = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { buf_u8 += 4 * 4; uint8_t bit = (x & 0x3) * 2; - x = x >> 2; + x = x >> 2; - uint32_t px = (dsc->header.w >> 2) * y + x; + uint32_t px = (dsc->header.w >> 2) * y + x; p_color.full = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { buf_u8 += 4 * 16; uint8_t bit = (x & 0x1) * 4; - x = x >> 1; + x = x >> 1; - uint32_t px = (dsc->header.w >> 1) * y + x; + uint32_t px = (dsc->header.w >> 1) * y + x; p_color.full = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { buf_u8 += 4 * 256; - uint32_t px = dsc->header.w * y + x; + uint32_t px = dsc->header.w * y + x; p_color.full = buf_u8[px]; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) - { - if(style) p_color = style->image.color; - else p_color = LV_COLOR_BLACK; + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + if(style) + p_color = style->image.color; + else + p_color = LV_COLOR_BLACK; } return p_color; -} +} /** * Get the alpha value of an image's pixel @@ -233,13 +230,12 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y * @param y x coordinate of the point to set * @return alpha value of the point */ -lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) +lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y) { if(x >= dsc->header.w) { x = dsc->header.w - 1; LV_LOG_WARN("lv_canvas_get_px: x is too large (out of canvas)"); - } - else if(x < 0) { + } else if(x < 0) { x = 0; LV_LOG_WARN("lv_canvas_get_px: x is < 0 (out of canvas)"); } @@ -247,58 +243,50 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) if(y >= dsc->header.h) { y = dsc->header.h - 1; LV_LOG_WARN("lv_canvas_get_px: y is too large (out of canvas)"); - } - else if(y < 0) { + } else if(y < 0) { y = 0; LV_LOG_WARN("lv_canvas_get_px: y is < 0 (out of canvas)"); } - uint8_t * buf_u8 = (uint8_t *) dsc->data; + uint8_t * buf_u8 = (uint8_t *)dsc->data; - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) - { + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { uint32_t px = dsc->header.w * y * LV_IMG_PX_SIZE_ALPHA_BYTE + x * LV_IMG_PX_SIZE_ALPHA_BYTE; return buf_u8[px + LV_IMG_PX_SIZE_ALPHA_BYTE - 1]; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { uint8_t bit = x & 0x7; - x = x >> 3; + x = x >> 3; - uint32_t px = (dsc->header.w >> 3) * y + x; + uint32_t px = (dsc->header.w >> 3) * y + x; uint8_t px_opa = (buf_u8[px] & (1 << (7 - bit))) >> (7 - bit); return px_opa ? LV_OPA_TRANSP : LV_OPA_COVER; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { - const uint8_t opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { + const uint8_t opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ uint8_t bit = (x & 0x3) * 2; - x = x >> 2; + x = x >> 2; - uint32_t px = (dsc->header.w >> 2) * y + x; + uint32_t px = (dsc->header.w >> 2) * y + x; uint8_t px_opa = (buf_u8[px] & (3 << (6 - bit))) >> (6 - bit); return opa_table[px_opa]; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { - const uint8_t opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255}; + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { + const uint8_t opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}; uint8_t bit = (x & 0x1) * 4; - x = x >> 1; + x = x >> 1; - uint32_t px = (dsc->header.w >> 1) * y + x; + uint32_t px = (dsc->header.w >> 1) * y + x; uint8_t px_opa = (buf_u8[px] & (0xF << (4 - bit))) >> (4 - bit); return opa_table[px_opa]; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { uint32_t px = dsc->header.w * y + x; return buf_u8[px]; } return LV_OPA_COVER; } - + /** * Set the color of a pixel of an image. The alpha channel won't be affected. * @param dsc pointer to an image descriptor @@ -306,54 +294,48 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y) * @param y x coordinate of the point to set * @param c color of the point */ -void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c) -{ - uint8_t * buf_u8 = (uint8_t *) dsc->data; +void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c) +{ + uint8_t * buf_u8 = (uint8_t *)dsc->data; if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; - uint32_t px = dsc->header.w * y * px_size + x * px_size; + uint32_t px = dsc->header.w * y * px_size + x * px_size; memcpy(&buf_u8[px], &c, px_size); - } - else if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { + } else if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; - uint32_t px = dsc->header.w * y * px_size + x * px_size; - memcpy(&buf_u8[px], &c, px_size - 1); /*-1 to not overwrite the alpha value*/ - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { + uint32_t px = dsc->header.w * y * px_size + x * px_size; + memcpy(&buf_u8[px], &c, px_size - 1); /*-1 to not overwrite the alpha value*/ + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT) { buf_u8 += sizeof(lv_color32_t) * 2; /*Skip the palette*/ uint8_t bit = x & 0x7; - x = x >> 3; + x = x >> 3; uint32_t px = (dsc->header.w >> 3) * y + x; - buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { + buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0x1) << (7 - bit)); + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_2BIT) { buf_u8 += sizeof(lv_color32_t) * 4; /*Skip the palette*/ uint8_t bit = (x & 0x3) * 2; - x = x >> 2; + x = x >> 2; uint32_t px = (dsc->header.w >> 2) * y + x; buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); buf_u8[px] = buf_u8[px] | ((c.full & 0x3) << (6 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_4BIT) { buf_u8 += sizeof(lv_color32_t) * 16; /*Skip the palette*/ uint8_t bit = (x & 0x1) * 4; - x = x >> 1; + x = x >> 1; uint32_t px = (dsc->header.w >> 1) * y + x; - buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); - buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); + buf_u8[px] = buf_u8[px] | ((c.full & 0xF) << (4 - bit)); + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { buf_u8 += sizeof(lv_color32_t) * 256; /*Skip the palette*/ uint32_t px = dsc->header.w * y + x; - buf_u8[px] = c.full; + buf_u8[px] = c.full; } } @@ -364,44 +346,39 @@ void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_c * @param y x coordinate of the point to set * @param opa the desired opacity */ -void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa) +void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa) { - uint8_t * buf_u8 = (uint8_t *) dsc->data; + uint8_t * buf_u8 = (uint8_t *)dsc->data; - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) - { - uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; - uint32_t px = dsc->header.w * y * px_size + x * px_size; + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; + uint32_t px = dsc->header.w * y * px_size + x * px_size; buf_u8[px + px_size - 1] = opa; - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { - opa = opa >> 7; /*opa -> [0,1]*/ + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT) { + opa = opa >> 7; /*opa -> [0,1]*/ uint8_t bit = x & 0x7; - x = x >> 3; + x = x >> 3; uint32_t px = (dsc->header.w >> 3) * y + x; - buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); - buf_u8[px] = buf_u8[px] | ((opa & 0x1) << (7 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { - opa = opa >> 6; /*opa -> [0,3]*/ + buf_u8[px] = buf_u8[px] & ~(1 << (7 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0x1) << (7 - bit)); + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_2BIT) { + opa = opa >> 6; /*opa -> [0,3]*/ uint8_t bit = (x & 0x3) * 2; - x = x >> 2; + x = x >> 2; uint32_t px = (dsc->header.w >> 2) * y + x; - buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); - buf_u8[px] = buf_u8[px] | ((opa & 0x3) << (6 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { - opa = opa >> 4; /*opa -> [0,15]*/ + buf_u8[px] = buf_u8[px] & ~(3 << (6 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0x3) << (6 - bit)); + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_4BIT) { + opa = opa >> 4; /*opa -> [0,15]*/ uint8_t bit = (x & 0x1) * 4; - x = x >> 1; + x = x >> 1; uint32_t px = (dsc->header.w >> 1) * y + x; - buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); - buf_u8[px] = buf_u8[px] | ((opa & 0xF) << (4 - bit)); - } - else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + buf_u8[px] = buf_u8[px] & ~(0xF << (4 - bit)); + buf_u8[px] = buf_u8[px] | ((opa & 0xF) << (4 - bit)); + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { uint32_t px = dsc->header.w * y + x; - buf_u8[px] = opa; + buf_u8[px] = opa; } } @@ -415,24 +392,22 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_o * - for `LV_IMG_CF_INDEXED8`: 0..255 * @param color the color to set */ -void lv_img_buf_set_palette(lv_img_dsc_t *dsc, int color_id, lv_color_t color) +void lv_img_buf_set_palette(lv_img_dsc_t * dsc, int color_id, lv_color_t color) { if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && color_id > 1) || (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && color_id > 3) || (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && color_id > 15) || - (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT && color_id > 255)) - { + (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT && color_id > 255)) { LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'color_id'"); return; } lv_color32_t c32; - c32.full= lv_color_to32(color); - uint32_t * buf = (uint32_t*) dsc->data; - buf[color_id] = c32.full; + c32.full = lv_color_to32(color); + uint32_t * buf = (uint32_t *)dsc->data; + buf[color_id] = c32.full; } - /** * Get the pixel size of a color format in bits * @param cf a color format (`LV_IMG_CF_...`) @@ -443,36 +418,20 @@ uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf) uint8_t px_size = 0; switch(cf) { - case LV_IMG_CF_UNKNOWN: - case LV_IMG_CF_RAW: - px_size = 0; - break; - case LV_IMG_CF_TRUE_COLOR: - case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: - px_size = LV_COLOR_SIZE; - break; - case LV_IMG_CF_TRUE_COLOR_ALPHA: - px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3; - break; - case LV_IMG_CF_INDEXED_1BIT: - case LV_IMG_CF_ALPHA_1BIT: - px_size = 1; - break; - case LV_IMG_CF_INDEXED_2BIT: - case LV_IMG_CF_ALPHA_2BIT: - px_size = 2; - break; - case LV_IMG_CF_INDEXED_4BIT: - case LV_IMG_CF_ALPHA_4BIT: - px_size = 4; - break; - case LV_IMG_CF_INDEXED_8BIT: - case LV_IMG_CF_ALPHA_8BIT: - px_size = 8; - break; - default: - px_size = 0; - break; + case LV_IMG_CF_UNKNOWN: + case LV_IMG_CF_RAW: px_size = 0; break; + case LV_IMG_CF_TRUE_COLOR: + case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: px_size = LV_COLOR_SIZE; break; + case LV_IMG_CF_TRUE_COLOR_ALPHA: px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3; break; + case LV_IMG_CF_INDEXED_1BIT: + case LV_IMG_CF_ALPHA_1BIT: px_size = 1; break; + case LV_IMG_CF_INDEXED_2BIT: + case LV_IMG_CF_ALPHA_2BIT: px_size = 2; break; + case LV_IMG_CF_INDEXED_4BIT: + case LV_IMG_CF_ALPHA_4BIT: px_size = 4; break; + case LV_IMG_CF_INDEXED_8BIT: + case LV_IMG_CF_ALPHA_8BIT: px_size = 8; break; + default: px_size = 0; break; } return px_size; @@ -488,23 +447,18 @@ bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf) bool is_chroma_keyed = false; switch(cf) { - case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: - case LV_IMG_CF_RAW_CHROMA_KEYED: - case LV_IMG_CF_INDEXED_1BIT: - case LV_IMG_CF_INDEXED_2BIT: - case LV_IMG_CF_INDEXED_4BIT: - case LV_IMG_CF_INDEXED_8BIT: - is_chroma_keyed = true; - break; - default: - is_chroma_keyed = false; - break; + case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED: + case LV_IMG_CF_RAW_CHROMA_KEYED: + case LV_IMG_CF_INDEXED_1BIT: + case LV_IMG_CF_INDEXED_2BIT: + case LV_IMG_CF_INDEXED_4BIT: + case LV_IMG_CF_INDEXED_8BIT: is_chroma_keyed = true; break; + default: is_chroma_keyed = false; break; } return is_chroma_keyed; } - /** * Check if a color format has alpha channel or not * @param cf a color format (`LV_IMG_CF_...`) @@ -515,17 +469,13 @@ bool lv_img_color_format_has_alpha(lv_img_cf_t cf) bool has_alpha = false; switch(cf) { - case LV_IMG_CF_TRUE_COLOR_ALPHA: - case LV_IMG_CF_RAW_ALPHA: - case LV_IMG_CF_ALPHA_1BIT: - case LV_IMG_CF_ALPHA_2BIT: - case LV_IMG_CF_ALPHA_4BIT: - case LV_IMG_CF_ALPHA_8BIT: - has_alpha = true; - break; - default: - has_alpha = false; - break; + case LV_IMG_CF_TRUE_COLOR_ALPHA: + case LV_IMG_CF_RAW_ALPHA: + case LV_IMG_CF_ALPHA_1BIT: + case LV_IMG_CF_ALPHA_2BIT: + case LV_IMG_CF_ALPHA_4BIT: + case LV_IMG_CF_ALPHA_8BIT: has_alpha = true; break; + default: has_alpha = false; break; } return has_alpha; @@ -548,14 +498,14 @@ lv_img_src_t lv_img_src_get_type(const void * src) /*The first byte shows the type of the image source*/ if(u8_p[0] >= 0x20 && u8_p[0] <= 0x7F) { - img_src_type = LV_IMG_SRC_FILE; /*If it's an ASCII character then it's file name*/ + img_src_type = LV_IMG_SRC_FILE; /*If it's an ASCII character then it's file name*/ } else if(u8_p[0] >= 0x80) { - img_src_type = LV_IMG_SRC_SYMBOL; /*Symbols begins after 0x7F*/ + img_src_type = LV_IMG_SRC_SYMBOL; /*Symbols begins after 0x7F*/ } else { img_src_type = LV_IMG_SRC_VARIABLE; /*`lv_img_dsc_t` is design to the first byte < 0x20*/ } - if (LV_IMG_SRC_UNKNOWN == img_src_type) { + if(LV_IMG_SRC_UNKNOWN == img_src_type) { LV_LOG_WARN("lv_img_src_get_type: unknown image type"); } @@ -563,39 +513,42 @@ lv_img_src_t lv_img_src_get_type(const void * src) } /** - * Set custom decoder functions. See the typdefs of the function typed above for more info about them + * Set custom decoder functions. See the typdefs of the function typed above for more info about + * them * @param info_fp info get function * @param open_fp open function * @param read_fp read line function * @param close_fp clode function */ -void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, - lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp) +void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, + lv_img_decoder_read_line_f_t read_fp, + lv_img_decoder_close_f_t close_fp) { - lv_img_decoder_info_custom = info_fp; - lv_img_decoder_open_custom = open_fp; + lv_img_decoder_info_custom = info_fp; + lv_img_decoder_open_custom = open_fp; lv_img_decoder_read_line_custom = read_fp; - lv_img_decoder_close_custom = close_fp; + lv_img_decoder_close_custom = close_fp; } - /********************** * STATIC FUNCTIONS **********************/ - -static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale) +static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, const void * src, + const lv_style_t * style, lv_opa_t opa_scale) { - lv_area_t mask_com; /*Common area of mask and coords*/ + lv_area_t mask_com; /*Common area of mask and coords*/ bool union_ok; union_ok = lv_area_intersect(&mask_com, mask, coords); if(union_ok == false) { - return LV_RES_OK; /*Out of mask. There is nothing to draw so the image is drawn successfully.*/ + return LV_RES_OK; /*Out of mask. There is nothing to draw so the image is drawn + successfully.*/ } - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->image.opa : (uint16_t)((uint16_t) style->image.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->image.opa + : (uint16_t)((uint16_t)style->image.opa * opa_scale) >> 8; lv_img_header_t header; lv_res_t header_res; @@ -607,7 +560,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas } bool chroma_keyed = lv_img_color_format_is_chroma_keyed(header.cf); - bool alpha_byte = lv_img_color_format_has_alpha(header.cf); + bool alpha_byte = lv_img_color_format_has_alpha(header.cf); const uint8_t * img_data = lv_img_decoder_open(src, style); if(img_data == LV_IMG_DECODER_OPEN_FAIL) { @@ -619,7 +572,8 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas /* The decoder open could open the image and gave the entire uncompressed image. * Just draw it!*/ if(img_data) { - lv_draw_map(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); + lv_draw_map(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, + style->image.intense); } /* The whole uncompressed image is not available. Try to read it line-by-line*/ else { @@ -628,7 +582,8 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas #if LV_COMPILER_VLA_SUPPORTED uint8_t buf[(lv_area_get_width(&mask_com) * ((LV_COLOR_DEPTH >> 3) + 1))]; #else - uint8_t buf[LV_HOR_RES_MAX * ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ + uint8_t buf[LV_HOR_RES_MAX * + ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ #endif lv_area_t line; lv_area_copy(&line, &mask_com); @@ -644,7 +599,8 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas LV_LOG_WARN("Image draw can't read the line"); return LV_RES_INV; } - lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); + lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, + style->image.intense); line.y1++; line.y2++; y++; @@ -656,7 +612,6 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas return LV_RES_OK; } - static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style) { decoder_custom = false; @@ -666,19 +621,20 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * const uint8_t * custom_res; custom_res = lv_img_decoder_open_custom(src, style); if(custom_res != LV_IMG_DECODER_OPEN_FAIL) { - decoder_custom = true; /*Mark that custom decoder function should be used for this img source.*/ - return custom_res; /*Custom open supported this source*/ + decoder_custom = + true; /*Mark that custom decoder function should be used for this img source.*/ + return custom_res; /*Custom open supported this source*/ } } - decoder_src = src; - decoder_style = style; + decoder_src = src; + decoder_style = style; decoder_src_type = lv_img_src_get_type(src); lv_res_t header_res; header_res = lv_img_dsc_get_info(src, &decoder_header); if(header_res == LV_RES_INV) { - decoder_src = NULL; + decoder_src = NULL; decoder_src_type = LV_IMG_SRC_UNKNOWN; LV_LOG_WARN("Built-in image decoder can't get the header info"); return LV_IMG_DECODER_OPEN_FAIL; @@ -698,23 +654,20 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * #endif } - /*Process the different color formats*/ lv_img_cf_t cf = decoder_header.cf; - if(cf == LV_IMG_CF_TRUE_COLOR || - cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - /*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's pointer*/ + /*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's + * pointer*/ return ((lv_img_dsc_t *)decoder_src)->data; } else { /*If it's file it need to be read line by line later*/ return NULL; } - } else if(cf == LV_IMG_CF_INDEXED_1BIT || - cf == LV_IMG_CF_INDEXED_2BIT || - cf == LV_IMG_CF_INDEXED_4BIT || - cf == LV_IMG_CF_INDEXED_8BIT) { + } else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || + cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED #if LV_USE_FILESYSTEM @@ -722,17 +675,18 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * #endif lv_color32_t * palette_p = NULL; - uint8_t px_size = lv_img_color_format_get_px_size(cf); - uint32_t palette_size = 1 << px_size; + uint8_t px_size = lv_img_color_format_get_px_size(cf); + uint32_t palette_size = 1 << px_size; if(decoder_src_type == LV_IMG_SRC_FILE) { /*Read the palette from file*/ #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, 4); /*Skip the header*/ + lv_fs_seek(&decoder_file, 4); /*Skip the header*/ lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); palette_p = palette_file; #else - LV_LOG_WARN("Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN( + "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { @@ -742,30 +696,28 @@ static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * uint32_t i; for(i = 0; i < palette_size; i++) { - decoder_index_map[i] = lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); + decoder_index_map[i] = + lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); } return NULL; #else LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED"); return LV_IMG_DECODER_OPEN_FAIL; #endif - } else if(cf == LV_IMG_CF_ALPHA_1BIT || - cf == LV_IMG_CF_ALPHA_2BIT || - cf == LV_IMG_CF_ALPHA_4BIT || - cf == LV_IMG_CF_ALPHA_8BIT) { + } else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || + cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { #if LV_IMG_CF_ALPHA - return NULL; /*Nothing to process*/ + return NULL; /*Nothing to process*/ #else LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { LV_LOG_WARN("Image decoder open: unknown color format") - return LV_IMG_DECODER_OPEN_FAIL; + return LV_IMG_DECODER_OPEN_FAIL; } } - static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { /*Try to read the line with the custom functions*/ @@ -777,7 +729,7 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t } else { LV_LOG_WARN("Image open with custom decoder but read not supported") } - return LV_RES_INV; /*It"s an error if not returned earlier*/ + return LV_RES_INV; /*It"s an error if not returned earlier*/ } if(decoder_src_type == LV_IMG_SRC_FILE) { @@ -787,32 +739,32 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t lv_fs_res_t res; if(decoder_header.cf == LV_IMG_CF_TRUE_COLOR || - decoder_header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - decoder_header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + decoder_header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + decoder_header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { uint32_t pos = ((y * decoder_header.w + x) * px_size) >> 3; - pos += 4; /*Skip the header*/ + pos += 4; /*Skip the header*/ res = lv_fs_seek(&decoder_file, pos); if(res != LV_FS_RES_OK) { LV_LOG_WARN("Built-in image decoder seek failed"); return false; } uint32_t btr = len * (px_size >> 3); - uint32_t br = 0; + uint32_t br = 0; lv_fs_read(&decoder_file, buf, btr, &br); if(res != LV_FS_RES_OK || btr != br) { LV_LOG_WARN("Built-in image decoder read failed"); return false; } } else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { + decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { lv_img_built_in_decoder_line_alpha(x, y, len, buf); } else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { + decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { lv_img_built_in_decoder_line_indexed(x, y, len, buf); } else { LV_LOG_WARN("Built-in image decoder read not supports the color format"); @@ -826,14 +778,14 @@ static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t const lv_img_dsc_t * img_dsc = decoder_src; if(img_dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || + img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { lv_img_built_in_decoder_line_alpha(x, y, len, buf); } else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { lv_img_built_in_decoder_line_indexed(x, y, len, buf); } else { LV_LOG_WARN("Built-in image decoder not supports the color format"); @@ -860,21 +812,21 @@ static void lv_img_decoder_close(void) } #endif decoder_src_type = LV_IMG_SRC_UNKNOWN; - decoder_src = NULL; + decoder_src = NULL; } } -static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) { #if LV_IMG_CF_ALPHA - const lv_opa_t alpha1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ - const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ - const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255 - }; + const lv_opa_t alpha1_opa_table[2] = { + 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, 136, 153, + 170, 187, 204, 221, 238, 255}; /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ lv_color_t bg_color = decoder_style->image.color; @@ -894,72 +846,72 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l } const lv_opa_t * opa_table = NULL; - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); - uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ + uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); + uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ lv_coord_t w = 0; uint32_t ofs = 0; - int8_t pos = 0; + int8_t pos = 0; switch(decoder_header.cf) { - case LV_IMG_CF_ALPHA_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - pos = 7 - (x & 0x7); - opa_table = alpha1_opa_table; - break; - case LV_IMG_CF_ALPHA_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - pos = 6 - ((x & 0x3) * 2); - opa_table = alpha2_opa_table; - break; - case LV_IMG_CF_ALPHA_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - pos = 4 - ((x & 0x1) * 4); - opa_table = alpha4_opa_table; - break; - case LV_IMG_CF_ALPHA_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - pos = 0; - break; + case LV_IMG_CF_ALPHA_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + pos = 7 - (x & 0x7); + opa_table = alpha1_opa_table; + break; + case LV_IMG_CF_ALPHA_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + pos = 6 - ((x & 0x3) * 2); + opa_table = alpha2_opa_table; + break; + case LV_IMG_CF_ALPHA_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + pos = 4 - ((x & 0x1) * 4); + opa_table = alpha4_opa_table; + break; + case LV_IMG_CF_ALPHA_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM -# if LV_COMPILER_VLA_SUPPORTED +#if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; -# else +#else uint8_t fs_buf[LV_HOR_RES_MAX]; -# endif +#endif #endif const uint8_t * data_tmp = NULL; if(decoder_src_type == LV_IMG_SRC_VARIABLE) { const lv_img_dsc_t * img_dsc = decoder_src; - data_tmp = img_dsc->data + ofs; + data_tmp = img_dsc->data + ofs; } else { #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ + lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); - data_tmp = NULL; /*To avoid warnings*/ + LV_LOG_WARN( + "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); + data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif } - uint8_t byte_act = 0; uint8_t val_act; - for(i = 0; i < len; i ++) { + for(i = 0; i < len; i++) { val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; pos -= px_size; if(pos < 0) { @@ -971,70 +923,73 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, l return LV_RES_OK; #else - LV_LOG_WARN("Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); + LV_LOG_WARN( + "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); return LV_RES_INV; #endif } -static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) { #if LV_IMG_CF_INDEXED uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); - uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ + uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ lv_coord_t w = 0; - int8_t pos = 0; + int8_t pos = 0; uint32_t ofs = 0; switch(decoder_header.cf) { - case LV_IMG_CF_INDEXED_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - ofs += 8; /*Skip the palette*/ - pos = 7 - (x & 0x7); - break; - case LV_IMG_CF_INDEXED_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - ofs += 16; /*Skip the palette*/ - pos = 6 - ((x & 0x3) * 2); - break; - case LV_IMG_CF_INDEXED_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - ofs += 64; /*Skip the palette*/ - pos = 4 - ((x & 0x1) * 4); - break; - case LV_IMG_CF_INDEXED_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - ofs += 1024; /*Skip the palette*/ - pos = 0; - break; + case LV_IMG_CF_INDEXED_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + ofs += 8; /*Skip the palette*/ + pos = 7 - (x & 0x7); + break; + case LV_IMG_CF_INDEXED_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + ofs += 16; /*Skip the palette*/ + pos = 6 - ((x & 0x3) * 2); + break; + case LV_IMG_CF_INDEXED_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + ofs += 64; /*Skip the palette*/ + pos = 4 - ((x & 0x1) * 4); + break; + case LV_IMG_CF_INDEXED_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + ofs += 1024; /*Skip the palette*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM -# if LV_COMPILER_VLA_SUPPORTED +#if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; -# else +#else uint8_t fs_buf[LV_HOR_RES_MAX]; -# endif +#endif #endif const uint8_t * data_tmp = NULL; if(decoder_src_type == LV_IMG_SRC_VARIABLE) { const lv_img_dsc_t * img_dsc = decoder_src; - data_tmp = img_dsc->data + ofs; + data_tmp = img_dsc->data + ofs; } else { #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ + lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ lv_fs_read(&decoder_file, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN("Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); - data_tmp = NULL; /*To avoid warnings*/ + LV_LOG_WARN( + "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); + data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif } @@ -1042,8 +997,8 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, uint8_t byte_act = 0; uint8_t val_act; lv_coord_t i; - lv_color_t * cbuf = (lv_color_t *) buf; - for(i = 0; i < len; i ++) { + lv_color_t * cbuf = (lv_color_t *)buf; + for(i = 0; i < len; i++) { val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; cbuf[i] = decoder_index_map[val_act]; @@ -1056,7 +1011,8 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, return LV_RES_OK; #else - LV_LOG_WARN("Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); + LV_LOG_WARN( + "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); return LV_RES_INV; #endif } diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index cc6999a55305..07a1be9dedea 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -19,47 +19,52 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_IMG_DECODER_OPEN_FAIL ((void*)(-1)) +#define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)) /********************** * TYPEDEFS **********************/ struct _lv_img_t; -typedef struct { +typedef struct +{ /* The first 8 bit is very important to distinguish the different source types. * For more info see `lv_img_get_src_type()` in lv_img.c */ - uint32_t cf :5; /* Color format: See `lv_img_color_format_t`*/ - uint32_t always_zero :3; /*It the upper bits of the first byte. Always zero to look like a non-printable character*/ + uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/ + uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a + non-printable character*/ - uint32_t reserved :2; /*Reserved to be used later*/ + uint32_t reserved : 2; /*Reserved to be used later*/ - uint32_t w:11; /*Width of the image map*/ - uint32_t h:11; /*Height of the image map*/ + uint32_t w : 11; /*Width of the image map*/ + uint32_t h : 11; /*Height of the image map*/ } lv_img_header_t; /*Image color format*/ enum { LV_IMG_CF_UNKNOWN = 0, - LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ - LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder function*/ - LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs custom decoder function*/ - - LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ - LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ - LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels will be transparent*/ - - LV_IMG_CF_INDEXED_1BIT, /*Can have 2 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_2BIT, /*Can have 4 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_4BIT, /*Can have 16 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_8BIT, /*Can have 256 different colors in a palette (always chroma keyed)*/ - - LV_IMG_CF_ALPHA_1BIT, /*Can have one color and it can be drawn or not*/ - LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/ - LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/ - LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/ + LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ + LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder + function*/ + LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs + custom decoder function*/ + + LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ + LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ + LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels + will be transparent*/ + + LV_IMG_CF_INDEXED_1BIT, /*Can have 2 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_2BIT, /*Can have 4 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_4BIT, /*Can have 16 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_8BIT, /*Can have 256 different colors in a palette (always chroma keyed)*/ + + LV_IMG_CF_ALPHA_1BIT, /*Can have one color and it can be drawn or not*/ + LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/ + LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/ + LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/ }; typedef uint8_t lv_img_cf_t; @@ -74,10 +79,10 @@ typedef struct /* Decoder function definitions */ - /** * Get info from an image and store in the `header` - * @param src the image source. Can be a pointer to a C array or a file name (Use `lv_img_src_get_type` to determine the type) + * @param src the image source. Can be a pointer to a C array or a file name (Use + * `lv_img_src_get_type` to determine the type) * @param header store the info here * @return LV_RES_OK: info written correctly; LV_RES_INV: failed */ @@ -85,12 +90,14 @@ typedef lv_res_t (*lv_img_decoder_info_f_t)(const void * src, lv_img_header_t * /** * Open an image for decoding. Prepare it as it is required to read it later - * @param src the image source. Can be a pointer to a C array or a file name (Use `lv_img_src_get_type` to determine the type) + * @param src the image source. Can be a pointer to a C array or a file name (Use + * `lv_img_src_get_type` to determine the type) * @param style the style of image (maybe it will be required to determine a color or something) * @return there are 3 possible return values: * 1) buffer with the decoded image - * 2) if can decode the whole image NULL. decoder_read_line will be called to read the image line-by-line - * 3) LV_IMG_DECODER_OPEN_FAIL if the image format is unknown to the decoder or an error occurred + * 2) if can decode the whole image NULL. decoder_read_line will be called to read the image + * line-by-line 3) LV_IMG_DECODER_OPEN_FAIL if the image format is unknown to the decoder or an + * error occurred */ typedef const uint8_t * (*lv_img_decoder_open_f_t)(const void * src, const lv_style_t * style); @@ -103,7 +110,8 @@ typedef const uint8_t * (*lv_img_decoder_open_f_t)(const void * src, const lv_st * @param buf a buffer to store the decoded pixels * @return LV_RES_OK: ok; LV_RES_INV: failed */ -typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); /** * Close the pending decoding. Free resources etc. @@ -122,9 +130,8 @@ typedef void (*lv_img_decoder_close_f_t)(void); * @param style style of the image * @param opa_scale scale down all opacities by the factor */ -void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, - const void * src, const lv_style_t * style, lv_opa_t opa_scale); - +void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, + const lv_style_t * style, lv_opa_t opa_scale); /** * Initialize and `lv_img_dsc_t` variable with the image's info @@ -145,25 +152,29 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header); lv_img_src_t lv_img_src_get_type(const void * src); /** - * Set custom decoder functions. See the typdefs of the function typed above for more info about them + * Set custom decoder functions. See the typdefs of the function typed above for more info about + * them * @param info_fp info get function * @param open_fp open function * @param read_fp read line function * @param close_fp clode function */ -void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, - lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp); +void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, + lv_img_decoder_read_line_f_t read_fp, + lv_img_decoder_close_f_t close_fp); /** * Get the color of an image's pixel * @param dsc an image descriptor * @param x x coordinate of the point to get * @param y x coordinate of the point to get - * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows the color. - * Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not used. + * @param style style of the image. In case of `LV_IMG_CF_ALPHA_1/2/4/8` `style->image.color` shows + * the color. Can be `NULL` but for `ALPHA` images black will be returned. In other cases it is not + * used. * @return color of the point */ -lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_style_t * style); +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_style_t * style); /** * Get the alpha value of an image's pixel * @param dsc pointer to an image descriptor @@ -171,7 +182,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y * @param y x coordinate of the point to set * @return alpha value of the point */ -lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y); +lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y); /** * Set the color of a pixel of an image. The alpha channel won't be affected. @@ -180,7 +191,7 @@ lv_opa_t lv_img_buf_get_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y); * @param y x coordinate of the point to set * @param c color of the point */ -void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_color_t c); +void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t c); /** * Set the alpha value of a pixel of an image. The color won't be affected @@ -189,7 +200,7 @@ void lv_img_buf_set_px_color(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_c * @param y x coordinate of the point to set * @param opa the desired opacity */ -void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa); +void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_opa_t opa); /** * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` @@ -201,7 +212,7 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t *dsc, lv_coord_t x, lv_coord_t y, lv_o * - for `LV_IMG_CF_INDEXED8`: 0..255 * @param color the color to set */ -void lv_img_buf_set_palette(lv_img_dsc_t *dsc, int color_id, lv_color_t color); +void lv_img_buf_set_palette(lv_img_dsc_t * dsc, int color_id, lv_color_t color); /** * Get the pixel size of a color format in bits @@ -228,7 +239,6 @@ bool lv_img_color_format_has_alpha(lv_img_cf_t cf); * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index e8baee80c1ec..332324c6fa8f 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -12,7 +12,7 @@ /********************* * DEFINES *********************/ -#define LABEL_RECOLOR_PAR_LENGTH 6 +#define LABEL_RECOLOR_PAR_LENGTH 6 /********************** * TYPEDEFS @@ -33,7 +33,6 @@ static uint8_t hex_char_to_num(char hex); * STATIC VARIABLES **********************/ - /********************** * MACROS **********************/ @@ -54,8 +53,9 @@ static uint8_t hex_char_to_num(char hex); * @param sel_start start index of selected area (-1 if none) * @param sel_end end index of selected area (-1 if none) */ -void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset, int sel_start, int sel_end) +void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale, const char * txt, lv_txt_flag_t flag, lv_point_t * offset, + int sel_start, int sel_end) { const lv_font_t * font = style->text.font; lv_coord_t w; @@ -65,13 +65,13 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } else { /*If EXAPND is enabled then not limit the text's width to the object's width*/ lv_point_t p; - lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag); + lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, flag); w = p.x; } lv_coord_t line_height = lv_font_get_height(font) + style->text.line_space; - /*Init variables for the first line*/ lv_coord_t line_width = 0; lv_point_t pos; @@ -87,7 +87,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } uint32_t line_start = 0; - uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag); + uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag); /*Go the first visible line*/ while(pos.y + line_height < mask->y1) { @@ -101,21 +101,22 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st /*Align to middle*/ if(flag & LV_TXT_FLAG_CENTER) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, - font, style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, + style->text.letter_space, flag); pos.x += (lv_area_get_width(coords) - line_width) / 2; } /*Align to the right*/ else if(flag & LV_TXT_FLAG_RIGHT) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, - font, style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, + style->text.letter_space, flag); pos.x += lv_area_get_width(coords) - line_width; } - - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->text.opa : (uint16_t)((uint16_t) style->text.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->text.opa + : (uint16_t)((uint16_t)style->text.opa * opa_scale) >> 8; cmd_state_t cmd_state = CMD_STATE_WAIT; uint32_t i; @@ -133,7 +134,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } /*Write all letter of a line*/ cmd_state = CMD_STATE_WAIT; - i = line_start; + i = line_start; uint32_t letter; while(i < line_end) { letter = lv_txt_encoded_next(txt, &i); @@ -145,7 +146,8 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st par_start = i; cmd_state = CMD_STATE_PAR; continue; - } else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */ + } else if(cmd_state == + CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */ cmd_state = CMD_STATE_WAIT; } else if(cmd_state == CMD_STATE_IN) { /*Command end */ cmd_state = CMD_STATE_WAIT; @@ -162,9 +164,9 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st memcpy(buf, &txt[par_start], LABEL_RECOLOR_PAR_LENGTH); buf[LABEL_RECOLOR_PAR_LENGTH] = '\0'; int r, g, b; - r = (hex_char_to_num(buf[0]) << 4) + hex_char_to_num(buf[1]); - g = (hex_char_to_num(buf[2]) << 4) + hex_char_to_num(buf[3]); - b = (hex_char_to_num(buf[4]) << 4) + hex_char_to_num(buf[5]); + r = (hex_char_to_num(buf[0]) << 4) + hex_char_to_num(buf[1]); + g = (hex_char_to_num(buf[2]) << 4) + hex_char_to_num(buf[3]); + b = (hex_char_to_num(buf[4]) << 4) + hex_char_to_num(buf[5]); recolor = lv_color_make(r, g, b); } else { recolor.full = style->text.color.full; @@ -182,21 +184,20 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st letter_w = lv_font_get_width(font, letter); if(sel_start != -1 && sel_end != -1) { - int char_ind = lv_encoded_get_char_id(txt, i); - /*Do not draw the rectangle on the character at `sel_start`.*/ - if(char_ind > sel_start && char_ind <= sel_end) { - lv_area_t sel_coords; - sel_coords.x1 = pos.x; - sel_coords.y1 = pos.y; - sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1; - sel_coords.y2 = pos.y + line_height - 1; - lv_draw_rect(&sel_coords, mask, &sel_style, opa); - } + int char_ind = lv_encoded_get_char_id(txt, i); + /*Do not draw the rectangle on the character at `sel_start`.*/ + if(char_ind > sel_start && char_ind <= sel_end) { + lv_area_t sel_coords; + sel_coords.x1 = pos.x; + sel_coords.y1 = pos.y; + sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1; + sel_coords.y2 = pos.y + line_height - 1; + lv_draw_rect(&sel_coords, mask, &sel_style, opa); + } } lv_draw_letter(&pos, mask, font, letter, color, opa); - - if(letter_w > 0){ + if(letter_w > 0) { pos.x += letter_w + style->text.letter_space; } } @@ -207,16 +208,16 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st pos.x = coords->x1; /*Align to middle*/ if(flag & LV_TXT_FLAG_CENTER) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, - font, style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, + style->text.letter_space, flag); pos.x += (lv_area_get_width(coords) - line_width) / 2; } /*Align to the right*/ else if(flag & LV_TXT_FLAG_RIGHT) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, - font, style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, + style->text.letter_space, flag); pos.x += lv_area_get_width(coords) - line_width; } @@ -242,32 +243,17 @@ static uint8_t hex_char_to_num(char hex) if(hex >= '0' && hex <= '9') { result = hex - '0'; - } - else { - if(hex >= 'a') hex -= 'a' - 'A'; /*Convert to upper case*/ + } else { + if(hex >= 'a') hex -= 'a' - 'A'; /*Convert to upper case*/ switch(hex) { - case 'A': - result = 10; - break; - case 'B': - result = 11; - break; - case 'C': - result = 12; - break; - case 'D': - result = 13; - break; - case 'E': - result = 14; - break; - case 'F': - result = 15; - break; - default: - result = 0; - break; + case 'A': result = 10; break; + case 'B': result = 11; break; + case 'C': result = 12; break; + case 'D': result = 13; break; + case 'E': result = 14; break; + case 'F': result = 15; break; + default: result = 0; break; } } diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index 96b3a88d297b..b51961d949cf 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -39,14 +39,14 @@ extern "C" { * @param sel_start start index of selected area (-1 if none) * @param sel_end end index of selected area (-1 if none) */ -void lv_draw_label(const lv_area_t * coords,const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset, int sel_start, int sel_end); +void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale, const char * txt, lv_txt_flag_t flag, lv_point_t * offset, + int sel_start, int sel_end); /********************** * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index 8fa7b894c094..470b5cea0c53 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -16,27 +16,29 @@ * DEFINES *********************/ #if LV_COMPILER_VLA_SUPPORTED == 0 -#define LINE_MAX_WIDTH 64 +#define LINE_MAX_WIDTH 64 #endif /********************** * TYPEDEFS **********************/ -typedef struct { +typedef struct +{ lv_point_t p1; lv_point_t p2; lv_point_t p_act; lv_coord_t dx; - lv_coord_t sx; /*-1: x1 < x2; 1: x2 >= x1*/ + lv_coord_t sx; /*-1: x1 < x2; 1: x2 >= x1*/ lv_coord_t dy; - lv_coord_t sy; /*-1: y1 < y2; 1: y2 >= y1*/ + lv_coord_t sy; /*-1: y1 < y2; 1: y2 >= y1*/ lv_coord_t err; lv_coord_t e2; - bool hor; /*Rather horizontal or vertical*/ + bool hor; /*Rather horizontal or vertical*/ } line_draw_t; -typedef struct { +typedef struct +{ lv_coord_t width; lv_coord_t width_1; lv_coord_t width_half; @@ -45,9 +47,12 @@ typedef struct { /********************** * STATIC PROTOTYPES **********************/ -static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); +static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2); static bool line_next(line_draw_t * line); static bool line_next_y(line_draw_t * line); @@ -74,7 +79,7 @@ static bool line_next_x(line_draw_t * line); * @param opa_scale scale down all opacities by the factor */ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) + const lv_style_t * style, lv_opa_t opa_scale) { if(style->line.width == 0) return; @@ -117,7 +122,6 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv line_init(&main_line, &p1, &p2); - /*Special case draw a horizontal line*/ if(main_line.p1.y == main_line.p2.y) { line_draw_hor(&main_line, mask, style, opa_scale); @@ -140,30 +144,31 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv p_tmp.x = main_line.p2.x; p_tmp.y = main_line.p2.y - 1; line_init(&main_line, &p1, &p_tmp); - main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ - } - else if(main_line.p1.y > main_line.p2.y) { + main_line.sy = LV_MATH_ABS( + main_line.sy); /*The sign can change if the line becomes horizontal*/ + } else if(main_line.p1.y > main_line.p2.y) { dir_ori = false; p_tmp.x = main_line.p2.x; p_tmp.y = main_line.p2.y + 1; line_init(&main_line, &p1, &p_tmp); - main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ + main_line.sy = -LV_MATH_ABS( + main_line.sy); /*The sign can change if the line becomes horizontal*/ } - } - else { + } else { if(main_line.p1.x < main_line.p2.x) { dir_ori = true; p_tmp.x = main_line.p2.x - 1; p_tmp.y = main_line.p2.y; line_init(&main_line, &p1, &p_tmp); - main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ - } - else if(main_line.p1.x > main_line.p2.x) { + main_line.sx = LV_MATH_ABS( + main_line.sx); /*The sign can change if the line becomes vertical*/ + } else if(main_line.p1.x > main_line.p2.x) { dir_ori = false; p_tmp.x = main_line.p2.x + 1; p_tmp.y = main_line.p2.y; line_init(&main_line, &p1, &p_tmp); - main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ + main_line.sx = -LV_MATH_ABS( + main_line.sx); /*The sign can change if the line becomes vertical*/ } } } @@ -172,24 +177,25 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv } } - /********************** * STATIC FUNCTIONS **********************/ - -static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { - lv_coord_t width = style->line.width - 1; + lv_coord_t width = style->line.width - 1; lv_coord_t width_half = width >> 1; - lv_coord_t width_1 = width & 0x1; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; + lv_coord_t width_1 = width & 0x1; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->line.opa + : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; lv_area_t act_area; act_area.x1 = main_line->p1.x; act_area.x2 = main_line->p2.x; act_area.y1 = main_line->p1.y - width_half - width_1; - act_area.y2 = main_line->p2.y + width_half ; + act_area.y2 = main_line->p2.y + width_half; lv_area_t draw_area; draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); @@ -199,12 +205,15 @@ static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_draw_fill(&draw_area, mask, style->line.color, opa); } -static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { - lv_coord_t width = style->line.width - 1; + lv_coord_t width = style->line.width - 1; lv_coord_t width_half = width >> 1; - lv_coord_t width_1 = width & 0x1; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; + lv_coord_t width_1 = width & 0x1; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->line.opa + : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; lv_area_t act_area; act_area.x1 = main_line->p1.x - width_half; @@ -220,10 +229,13 @@ static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_draw_fill(&draw_area, mask, style->line.color, opa); } -static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->line.opa + : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_point_t vect_main, vect_norm; vect_main.x = main_line->p2.x - main_line->p1.x; @@ -231,7 +243,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(main_line->hor) { if(main_line->p1.y < main_line->p2.y + dir_ori) { - vect_norm.x = - vect_main.y; + vect_norm.x = -vect_main.y; vect_norm.y = vect_main.x; } else { vect_norm.x = vect_main.y; @@ -240,9 +252,9 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ } else { if(main_line->p1.x < main_line->p2.x + dir_ori) { vect_norm.x = vect_main.y; - vect_norm.y = - vect_main.x; + vect_norm.y = -vect_main.x; } else { - vect_norm.x = - vect_main.y; + vect_norm.x = -vect_main.y; vect_norm.y = vect_main.x; } } @@ -272,12 +284,14 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ uint32_t width_sqr = width * width; /* Run for a lot of times. Meanwhile the real width will be determined as well */ - for(i = 0; i < (lv_coord_t)sizeof(pattern); i ++) { + for(i = 0; i < (lv_coord_t)sizeof(pattern); i++) { pattern[i].x = pattern_line.p_act.x; pattern[i].y = pattern_line.p_act.y; - /*Finish the pattern line if it's length equal to the desired width (Use Pythagoras theorem)*/ - uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + pattern_line.p_act.y * pattern_line.p_act.y; + /*Finish the pattern line if it's length equal to the desired width (Use Pythagoras + * theorem)*/ + uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + + pattern_line.p_act.y * pattern_line.p_act.y; if(sqr >= width_sqr) { width = i; #if LV_ANTIALIAS @@ -306,10 +320,9 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(width != 0) { x_center_ofs = pattern[width - 1].x / 2; y_center_ofs = pattern[width - 1].y / 2; - } - else { - if(main_line->hor && main_line->p1.y >= main_line->p2.y + dir_ori) pattern[0].y --; - if(!main_line->hor && main_line->p1.x >= main_line->p2.x + dir_ori) pattern[0].x --; + } else { + if(main_line->hor && main_line->p1.y >= main_line->p2.y + dir_ori) pattern[0].y--; + if(!main_line->hor && main_line->p1.x >= main_line->p2.x + dir_ori) pattern[0].x--; } /* Make the coordinates relative to the center */ @@ -323,17 +336,23 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(pattern[i - 1].x != pattern[i].x) { lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y; if(main_line->sy < 0) { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1, - -seg_w, mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, + main_line->p1.y + pattern[aa_last_corner].y + seg_w + + 1, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, + main_line->p2.y + pattern[aa_last_corner].y + seg_w + + 1, + -seg_w, mask, style->line.color, opa); } else { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y, - seg_w, mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, + main_line->p1.y + pattern[aa_last_corner].y, seg_w, + mask, style->line.color, opa); - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y, - -seg_w, mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, + main_line->p2.y + pattern[aa_last_corner].y, -seg_w, + mask, style->line.color, opa); } aa_last_corner = i; } @@ -341,22 +360,27 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(pattern[i - 1].y != pattern[i].y) { lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x; if(main_line->sx < 0) { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + + 1, + main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w, mask, style->line.color, opa); + + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + + 1, + main_line->p2.y + pattern[aa_last_corner].y + 1, + -seg_w, mask, style->line.color, opa); } else { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, + main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w, mask, style->line.color, opa); - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, + main_line->p2.y + pattern[aa_last_corner].y + 1, + -seg_w, mask, style->line.color, opa); } aa_last_corner = i; } } - } } #endif @@ -364,40 +388,47 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ #if LV_ANTIALIAS /*Add the last part of anti-aliasing for the perpendicular ending*/ - if(width != 0 && aa) { /*Due to rounding error with very thin lines it looks ugly*/ + if(width != 0 && aa) { /*Due to rounding error with very thin lines it looks ugly*/ if(main_line->hor) { lv_coord_t seg_w = pattern[width_safe - 1].y - pattern[aa_last_corner].y; if(main_line->sy < 0) { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w, - seg_w + main_line->sy, mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, + main_line->p1.y + pattern[aa_last_corner].y + seg_w, + seg_w + main_line->sy, mask, style->line.color, opa); - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w, - -(seg_w + main_line->sy), mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, + main_line->p2.y + pattern[aa_last_corner].y + seg_w, + -(seg_w + main_line->sy), mask, style->line.color, opa); } else { - lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y, - seg_w + main_line->sy, mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, + main_line->p1.y + pattern[aa_last_corner].y, + seg_w + main_line->sy, mask, style->line.color, opa); - lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y, - -(seg_w + main_line->sy), mask, style->line.color, opa); + lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, + main_line->p2.y + pattern[aa_last_corner].y, + -(seg_w + main_line->sy), mask, style->line.color, opa); } } else { lv_coord_t seg_w = pattern[width_safe - 1].x - pattern[aa_last_corner].x; if(main_line->sx < 0) { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w + main_line->sx, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w, + main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w + main_line->sx, mask, style->line.color, opa); - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w, main_line->p2.y + pattern[aa_last_corner].y + 1, - -(seg_w + main_line->sx), mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w, + main_line->p2.y + pattern[aa_last_corner].y + 1, + -(seg_w + main_line->sx), mask, style->line.color, opa); } else { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w + main_line->sx, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, + main_line->p1.y + pattern[aa_last_corner].y - 1, + seg_w + main_line->sx, mask, style->line.color, opa); - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1, - -(seg_w + main_line->sx), mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, + main_line->p2.y + pattern[aa_last_corner].y + 1, + -(seg_w + main_line->sx), mask, style->line.color, opa); } - } } #endif @@ -444,18 +475,21 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps - * When stepping in y one pixel remains empty on every corner (don't do this on the first segment ) */ + * When stepping in y one pixel remains empty on every corner (don't do this on the + * first segment ) */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, + opa); } } #if LV_ANTIALIAS if(aa) { lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, - -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa); - lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, - main_line->p_act.x - prev_p.x, mask, style->line.color, opa); + -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa); + lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, + prev_p.y + pattern[width_safe - 1].y + aa_shift2, + main_line->p_act.x - prev_p.x, mask, style->line.color, opa); } #endif @@ -475,16 +509,18 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /* Fill the gaps * When stepping in y one pixel remains empty on every corner */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, + opa); } } #if LV_ANTIALIAS if(aa) { lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, - -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa); - lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, - main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa); + -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa); + lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, + prev_p.y + pattern[width_safe - 1].y + aa_shift2, + main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa); } #endif } @@ -501,19 +537,21 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_draw_fill(&draw_area, mask, style->line.color, opa); /* Fill the gaps - * When stepping in x one pixel remains empty on every corner (don't do this on the first segment ) */ + * When stepping in x one pixel remains empty on every corner (don't do this on the + * first segment ) */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, + opa); } - } #if LV_ANTIALIAS if(aa) { lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, - -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa); - lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, - main_line->p_act.y - prev_p.y, mask, style->line.color, opa); + -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa); + lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, + prev_p.y + pattern[width_safe - 1].y, + main_line->p_act.y - prev_p.y, mask, style->line.color, opa); } #endif @@ -535,22 +573,23 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /* Fill the gaps * When stepping in x one pixel remains empty on every corner */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, + opa); } } #if LV_ANTIALIAS if(aa) { lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, - -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa); - lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, - main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa); + -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa); + lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, + prev_p.y + pattern[width_safe - 1].y, + main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa); } #endif } } - static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2) { line->p1.x = p1->x; @@ -558,12 +597,12 @@ static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_ line->p2.x = p2->x; line->p2.y = p2->y; - line->dx = LV_MATH_ABS(line->p2.x - line->p1.x); - line->sx = line->p1.x < line->p2.x ? 1 : -1; - line->dy = LV_MATH_ABS(line->p2.y - line->p1.y); - line->sy = line->p1.y < line->p2.y ? 1 : -1; + line->dx = LV_MATH_ABS(line->p2.x - line->p1.x); + line->sx = line->p1.x < line->p2.x ? 1 : -1; + line->dy = LV_MATH_ABS(line->p2.y - line->p1.y); + line->sy = line->p1.y < line->p2.y ? 1 : -1; line->err = (line->dx > line->dy ? line->dx : -line->dy) / 2; - line->e2 = 0; + line->e2 = 0; line->hor = line->dx > line->dy ? true : false; /*Rather horizontal or vertical*/ line->p_act.x = line->p1.x; @@ -599,7 +638,6 @@ static bool line_next_y(line_draw_t * line) } while(last_y == line->p_act.y); return true; - } /** @@ -616,6 +654,4 @@ static bool line_next_x(line_draw_t * line) } while(last_x == line->p_act.x); return true; - } - diff --git a/src/lv_draw/lv_draw_line.h b/src/lv_draw/lv_draw_line.h index 4269475ee231..208bd05105eb 100644 --- a/src/lv_draw/lv_draw_line.h +++ b/src/lv_draw/lv_draw_line.h @@ -41,7 +41,6 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 4de64642cc13..a2db9dab44dc 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -14,10 +14,14 @@ /********************* * DEFINES *********************/ -#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD 1 /*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity mapping*/ +#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD \ + 1 /*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity \ + mapping*/ -#define SHADOW_OPA_EXTRA_PRECISION 8 /*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/ -#define SHADOW_BOTTOM_AA_EXTRA_RADIUS 3 /*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/ +#define SHADOW_OPA_EXTRA_PRECISION \ + 8 /*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/ +#define SHADOW_BOTTOM_AA_EXTRA_RADIUS \ + 3 /*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/ /********************** * TYPEDEFS @@ -26,16 +30,24 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); #if LV_USE_SHADOW -static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, const lv_opa_t * map); +static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, const lv_opa_t * map); #endif static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h); @@ -63,7 +75,8 @@ static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_ * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; @@ -80,7 +93,8 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty } } - if(style->body.border.width != 0 && style->body.border.part != LV_BORDER_NONE && style->body.border.opa >= LV_OPA_MIN) { + if(style->body.border.width != 0 && style->body.border.part != LV_BORDER_NONE && + style->body.border.opa >= LV_OPA_MIN) { lv_draw_rect_border_straight(coords, mask, style, opa_scale); if(style->body.radius != 0) { @@ -100,22 +114,25 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty * @param rects_p pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_color_t mcolor = style->body.main_color; lv_color_t gcolor = style->body.grad_color; uint8_t mix; lv_coord_t height = lv_area_get_height(coords); - lv_coord_t width = lv_area_get_width(coords); - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + lv_coord_t width = lv_area_get_width(coords); + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; radius = lv_draw_cont_radius_corr(radius, width, height); /*If the radius is too big then there is no body*/ - if(radius > height / 2) return; + if(radius > height / 2) return; lv_area_t work_area; work_area.x1 = coords->x1; @@ -140,7 +157,7 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma } else { lv_coord_t row; lv_coord_t row_start = coords->y1 + radius; - lv_coord_t row_end = coords->y2 - radius; + lv_coord_t row_end = coords->y2 - radius; lv_color_t act_color; if(style->body.radius != 0) { @@ -154,11 +171,11 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma } if(row_start < 0) row_start = 0; - for(row = row_start; row <= row_end; row ++) { + for(row = row_start; row <= row_end; row++) { work_area.y1 = row; work_area.y2 = row; - mix = (uint32_t)((uint32_t)(coords->y2 - work_area.y1) * 255) / height; - act_color = lv_color_mix(mcolor, gcolor, mix); + mix = (uint32_t)((uint32_t)(coords->y2 - work_area.y1) * 255) / height; + act_color = lv_color_mix(mcolor, gcolor, mix); lv_draw_fill(&work_area, mask, act_color, opa); } @@ -171,25 +188,28 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma * @param rects_p pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_color_t mcolor = style->body.main_color; lv_color_t gcolor = style->body.grad_color; lv_color_t act_color; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; uint8_t mix; lv_coord_t height = lv_area_get_height(coords); - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); radius = lv_draw_cont_radius_corr(radius, width, height); - lv_point_t lt_origo; /*Left Top origo*/ - lv_point_t lb_origo; /*Left Bottom origo*/ - lv_point_t rt_origo; /*Right Top origo*/ - lv_point_t rb_origo; /*Left Bottom origo*/ + lv_point_t lt_origo; /*Left Top origo*/ + lv_point_t lb_origo; /*Left Bottom origo*/ + lv_point_t rt_origo; /*Right Top origo*/ + lv_point_t rb_origo; /*Left Bottom origo*/ lt_origo.x = coords->x1 + radius + aa; lt_origo.y = coords->y1 + radius + aa; @@ -213,34 +233,26 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_circ_init(&cir, &cir_tmp, radius); /*Init the areas*/ - lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), - lb_origo.y + LV_CIRC_OCT4_Y(cir), - rb_origo.x + LV_CIRC_OCT1_X(cir), - rb_origo.y + LV_CIRC_OCT1_Y(cir)); - - lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), - lb_origo.y + LV_CIRC_OCT3_Y(cir), - rb_origo.x + LV_CIRC_OCT2_X(cir), - rb_origo.y + LV_CIRC_OCT2_Y(cir)); - - lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), - lt_origo.y + LV_CIRC_OCT5_Y(cir), - rt_origo.x + LV_CIRC_OCT8_X(cir), - rt_origo.y + LV_CIRC_OCT8_Y(cir)); - - lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), - lt_origo.y + LV_CIRC_OCT6_Y(cir), - rt_origo.x + LV_CIRC_OCT7_X(cir), - rt_origo.y + LV_CIRC_OCT7_Y(cir)); + lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), lb_origo.y + LV_CIRC_OCT4_Y(cir), + rb_origo.x + LV_CIRC_OCT1_X(cir), rb_origo.y + LV_CIRC_OCT1_Y(cir)); + + lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), lb_origo.y + LV_CIRC_OCT3_Y(cir), + rb_origo.x + LV_CIRC_OCT2_X(cir), rb_origo.y + LV_CIRC_OCT2_Y(cir)); + + lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), lt_origo.y + LV_CIRC_OCT5_Y(cir), + rt_origo.x + LV_CIRC_OCT8_X(cir), rt_origo.y + LV_CIRC_OCT8_Y(cir)); + + lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), lt_origo.y + LV_CIRC_OCT6_Y(cir), + rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir)); #if LV_ANTIALIAS - /*Store some internal states for anti-aliasing*/ - lv_coord_t out_y_seg_start = 0; - lv_coord_t out_y_seg_end = 0; - lv_coord_t out_x_last = radius; - - lv_color_t aa_color_hor_top; - lv_color_t aa_color_hor_bottom; - lv_color_t aa_color_ver; + /*Store some internal states for anti-aliasing*/ + lv_coord_t out_y_seg_start = 0; + lv_coord_t out_y_seg_end = 0; + lv_coord_t out_x_last = radius; + + lv_color_t aa_color_hor_top; + lv_color_t aa_color_hor_bottom; + lv_color_t aa_color_ver; #endif while(lv_circ_cont(&cir)) { @@ -248,49 +260,62 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * if(aa) { /*New step in y on the outter circle*/ if(out_x_last != cir.x) { - out_y_seg_end = cir.y; + out_y_seg_end = cir.y; lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; lv_point_t aa_p; aa_p.x = out_x_last; aa_p.y = out_y_seg_start; - mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; - aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); + mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; + aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); lv_coord_t i; - for(i = 0; i < seg_size; i++) { + for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa; - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping + on the first segment*/ aa_opa = antialias_get_opa_circ(seg_size, i, opa); } else { aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); } - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, + rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, + aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, + lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, + aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, + lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, + aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, + rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, + aa_opa); mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, + rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, + lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, + lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, + rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); } - out_x_last = cir.x; + out_x_last = cir.x; out_y_seg_start = out_y_seg_end; } } #endif uint8_t edge_top_refr = 0; - uint8_t mid_top_refr = 0; - uint8_t mid_bot_refr = 0; + uint8_t mid_top_refr = 0; + uint8_t mid_bot_refr = 0; uint8_t edge_bot_refr = 0; /* If a new row coming draw the previous @@ -305,27 +330,30 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * /*Draw the areas which are not disabled*/ if(edge_top_refr != 0) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&edge_top_area, mask, act_color, opa); } if(mid_top_refr != 0) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&mid_top_area, mask, act_color, opa); } if(mid_bot_refr != 0) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&mid_bot_area, mask, act_color, opa); @@ -333,73 +361,73 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * if(edge_bot_refr != 0) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&edge_bot_area, mask, act_color, opa); } /*Save the current coordinates*/ - lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), - lb_origo.y + LV_CIRC_OCT4_Y(cir), - rb_origo.x + LV_CIRC_OCT1_X(cir), + lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), + lb_origo.y + LV_CIRC_OCT4_Y(cir), rb_origo.x + LV_CIRC_OCT1_X(cir), rb_origo.y + LV_CIRC_OCT1_Y(cir)); lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), - lb_origo.y + LV_CIRC_OCT3_Y(cir), - rb_origo.x + LV_CIRC_OCT2_X(cir), + lb_origo.y + LV_CIRC_OCT3_Y(cir), rb_origo.x + LV_CIRC_OCT2_X(cir), rb_origo.y + LV_CIRC_OCT2_Y(cir)); - lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), - lt_origo.y + LV_CIRC_OCT5_Y(cir), - rt_origo.x + LV_CIRC_OCT8_X(cir), + lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), + lt_origo.y + LV_CIRC_OCT5_Y(cir), rt_origo.x + LV_CIRC_OCT8_X(cir), rt_origo.y + LV_CIRC_OCT8_Y(cir)); lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), - lt_origo.y + LV_CIRC_OCT6_Y(cir), - rt_origo.x + LV_CIRC_OCT7_X(cir), + lt_origo.y + LV_CIRC_OCT6_Y(cir), rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir)); lv_circ_next(&cir, &cir_tmp); } - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - edge_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&edge_top_area, mask, act_color, opa); if(edge_top_area.y1 != mid_top_area.y1) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - mid_top_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&mid_top_area, mask, act_color, opa); } - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - mid_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&mid_bot_area, mask, act_color, opa); if(edge_bot_area.y1 != mid_bot_area.y1) { - if(mcolor.full == gcolor.full) act_color = mcolor; + if(mcolor.full == gcolor.full) + act_color = mcolor; else { - mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; + mix = (uint32_t)((uint32_t)(coords->y2 - edge_bot_area.y1) * 255) / height; act_color = lv_color_mix(mcolor, gcolor, mix); } lv_draw_fill(&edge_bot_area, mask, act_color, opa); } - #if LV_ANTIALIAS if(aa) { /*The first and the last line is not drawn*/ @@ -414,33 +442,41 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_draw_fill(&edge_top_area, mask, style->body.grad_color, opa); /*Last parts of the anti-alias*/ - out_y_seg_end = cir.y; + out_y_seg_end = cir.y; lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; lv_point_t aa_p; aa_p.x = out_x_last; aa_p.y = out_y_seg_start; - mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; + mix = (uint32_t)((uint32_t)(radius - out_x_last) * 255) / height; aa_color_hor_bottom = lv_color_mix(gcolor, mcolor, mix); - aa_color_hor_top = lv_color_mix(mcolor, gcolor, mix); + aa_color_hor_top = lv_color_mix(mcolor, gcolor, mix); lv_coord_t i; - for(i = 0; i < seg_size; i++) { + for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_top, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_bottom, aa_opa); - - mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, + mask, aa_color_hor_top, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, + mask, aa_color_hor_top, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, + mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, + mask, aa_color_hor_bottom, aa_opa); + + mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, + mask, aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, + mask, aa_color_ver, aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, + mask, aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, + mask, aa_color_ver, aa_opa); } /*In some cases the last pixel is not drawn*/ @@ -448,15 +484,19 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * aa_p.x = out_x_last; aa_p.y = out_x_last; - mix = (uint32_t)((uint32_t)(out_x_last) * 255) / height; - aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); + mix = (uint32_t)((uint32_t)(out_x_last)*255) / height; + aa_color_hor_top = lv_color_mix(gcolor, mcolor, mix); aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); lv_opa_t aa_opa = opa >> 1; - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, + aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, + aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, + aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, + aa_color_hor_top, aa_opa); } } #endif @@ -469,17 +509,20 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * * @param rstyle pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { uint16_t radius = style->body.radius; - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); - uint16_t bwidth = style->body.border.width; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa : (uint16_t)((uint16_t) style->body.border.opa * opa_scale) >> 8; + uint16_t bwidth = style->body.border.width; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.border.opa + : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; lv_border_part_t part = style->body.border.part; - lv_color_t color = style->body.border.color; + lv_color_t color = style->body.border.color; lv_area_t work_area; lv_coord_t length_corr = 0; lv_coord_t corner_size = 0; @@ -537,14 +580,18 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area } /* Modify the corner_size if corner is drawn */ - corner_size ++; + corner_size++; /*Depending one which part's are drawn modify the area lengths */ - if(part & LV_BORDER_TOP) work_area.y1 = coords->y1 + corner_size; - else work_area.y1 = coords->y1 + radius; + if(part & LV_BORDER_TOP) + work_area.y1 = coords->y1 + corner_size; + else + work_area.y1 = coords->y1 + radius; - if(part & LV_BORDER_BOTTOM) work_area.y2 = coords->y2 - corner_size; - else work_area.y2 = coords->y2 - radius; + if(part & LV_BORDER_BOTTOM) + work_area.y2 = coords->y2 - corner_size; + else + work_area.y2 = coords->y2 - radius; /*Left border*/ if(part & LV_BORDER_LEFT) { @@ -656,7 +703,6 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area } } - /** * Draw the corners of a rectangle border * @param coords the coordinates of the original rectangle @@ -664,30 +710,33 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { - uint16_t radius = style->body.radius ; - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); - uint16_t bwidth = style->body.border.width; - lv_color_t color = style->body.border.color; + uint16_t radius = style->body.radius; + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + uint16_t bwidth = style->body.border.width; + lv_color_t color = style->body.border.color; lv_border_part_t part = style->body.border.part; - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa : (uint16_t)((uint16_t) style->body.border.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.border.opa + : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; /*0 px border width drawn as 1 px, so decrement the bwidth*/ bwidth--; #if LV_ANTIALIAS - if(aa) bwidth--; /*Because of anti-aliasing the border seems one pixel ticker*/ + if(aa) bwidth--; /*Because of anti-aliasing the border seems one pixel ticker*/ #endif - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); - lv_point_t lt_origo; /*Left Top origo*/ - lv_point_t lb_origo; /*Left Bottom origo*/ - lv_point_t rt_origo; /*Right Top origo*/ - lv_point_t rb_origo; /*Left Bottom origo*/ + lv_point_t lt_origo; /*Left Top origo*/ + lv_point_t lb_origo; /*Left Bottom origo*/ + lv_point_t rt_origo; /*Right Top origo*/ + lv_point_t rb_origo; /*Left Bottom origo*/ lt_origo.x = coords->x1 + radius + aa; lt_origo.y = coords->y1 + radius + aa; @@ -722,13 +771,12 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t #if LV_ANTIALIAS /*Store some internal states for anti-aliasing*/ lv_coord_t out_y_seg_start = 0; - lv_coord_t out_y_seg_end = 0; - lv_coord_t out_x_last = radius; - + lv_coord_t out_y_seg_end = 0; + lv_coord_t out_x_last = radius; lv_coord_t in_y_seg_start = 0; - lv_coord_t in_y_seg_end = 0; - lv_coord_t in_x_last = radius - bwidth; + lv_coord_t in_y_seg_end = 0; + lv_coord_t in_x_last = radius - bwidth; #endif while(cir_out.y <= cir_out.x) { @@ -746,7 +794,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t if(aa) { /*New step in y on the outter circle*/ if(out_x_last != cir_out.x) { - out_y_seg_end = cir_out.y; + out_y_seg_end = cir_out.y; lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; lv_point_t aa_p; @@ -754,44 +802,60 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t aa_p.y = out_y_seg_start; lv_coord_t i; - for(i = 0; i < seg_size; i++) { + for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa; - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping + on the first segment*/ aa_opa = antialias_get_opa_circ(seg_size, i, opa); } else { aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, + rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, + rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, + lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, + lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } - if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, + lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, + lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, + rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, + rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } } - out_x_last = cir_out.x; + out_x_last = cir_out.x; out_y_seg_start = out_y_seg_end; } /*New step in y on the inner circle*/ if(in_x_last != cir_in.x) { - in_y_seg_end = cir_out.y; + in_y_seg_end = cir_out.y; lv_coord_t seg_size = in_y_seg_end - in_y_seg_start; lv_point_t aa_p; @@ -799,60 +863,74 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t aa_p.y = in_y_seg_start; lv_coord_t i; - for(i = 0; i < seg_size; i++) { + for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa; - if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping on the first segment*/ + if(seg_size > CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD) { /*Use non-linear opa mapping + on the first segment*/ aa_opa = opa - antialias_get_opa_circ(seg_size, i, opa); } else { aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, + rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, + lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, + lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, + rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } /*Be sure the pixels on the middle are not drawn twice*/ if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, + rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, + lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, + lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, + rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } } - } - in_x_last = cir_in.x; + in_x_last = cir_in.x; in_y_seg_start = in_y_seg_end; - } } #endif - /*Draw the octets to the right bottom corner*/ if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { circ_area.x1 = rb_origo.x + LV_CIRC_OCT1_X(cir_out) - act_w2; @@ -927,11 +1005,10 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } } - #if LV_ANTIALIAS if(aa) { /*Last parts of the outer anti-alias*/ - out_y_seg_end = cir_out.y; + out_y_seg_end = cir_out.y; lv_coord_t seg_size = out_y_seg_end - out_y_seg_start; lv_point_t aa_p; @@ -939,26 +1016,42 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t aa_p.y = out_y_seg_start; lv_coord_t i; - for(i = 0; i < seg_size; i++) { + for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, + rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, + aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, + rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, + lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, + aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, + lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, + lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, + aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, + lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, + rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, + aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, + rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, + aa_opa); } } @@ -970,67 +1063,86 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t lv_opa_t aa_opa = opa >> 1; if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), + mask, style->body.border.color, aa_opa); } } /*Last parts of the inner anti-alias*/ in_y_seg_end = cir_in.y; - aa_p.x = in_x_last; - aa_p.y = in_y_seg_start; - seg_size = in_y_seg_end - in_y_seg_start; + aa_p.x = in_x_last; + aa_p.y = in_y_seg_start; + seg_size = in_y_seg_end - in_y_seg_start; - for(i = 0; i < seg_size; i++) { - lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); + for(i = 0; i < seg_size; i++) { + lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, + rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, + lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, + lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, + aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, + rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, + aa_opa); } if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, + rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, + lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, + lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, + rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } } } } #endif - } #if LV_USE_SHADOW @@ -1041,13 +1153,14 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * @param mask pointer to a mask area (from the design functions) * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { /* If mask is in the middle of cords do not draw shadow*/ lv_coord_t radius = style->body.radius; - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); - radius = lv_draw_cont_radius_corr(radius, width, height); + radius = lv_draw_cont_radius_corr(radius, width, height); lv_area_t area_tmp; /*Check horizontally without radius*/ @@ -1069,17 +1182,19 @@ static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, con } } -static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { /* KNOWN ISSUE - * The algorithm calculates the shadow only above the middle point of the radius (speaking about the left top corner). - * It causes an error because it doesn't consider how long the straight edge is which effects the value of bottom of the corner shadow. - * In addition the straight shadow is drawn from the middles point of the radius however - * the ends of the straight parts still should be effected by the corner shadow. - * It also causes an issue in opacity. A smaller radius means smaller average shadow opacity. - * The solution should be to start `line` from `- swidth` and handle if the straight part is short (or zero) and the value is taken from - * the other corner. `col` also should start from `- swidth` + * The algorithm calculates the shadow only above the middle point of the radius (speaking about + * the left top corner). It causes an error because it doesn't consider how long the straight + * edge is which effects the value of bottom of the corner shadow. In addition the straight + * shadow is drawn from the middles point of the radius however the ends of the straight parts + * still should be effected by the corner shadow. It also causes an issue in opacity. A smaller + * radius means smaller average shadow opacity. The solution should be to start `line` from `- + * swidth` and handle if the straight part is short (or zero) and the value is taken from the + * other corner. `col` also should start from `- swidth` */ bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); @@ -1087,7 +1202,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask lv_coord_t radius = style->body.radius; lv_coord_t swidth = style->body.shadow.width; - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); @@ -1095,13 +1210,13 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask radius += aa; #if LV_COMPILER_VLA_SUPPORTED - lv_coord_t curve_x[radius + swidth + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ + lv_coord_t curve_x[radius + swidth + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else -# if LV_HOR_RES_MAX > LV_VER_RES_MAX +#if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_coord_t curve_x[LV_HOR_RES_MAX]; -# else +#else lv_coord_t curve_x[LV_VER_RES_MAX]; -# endif +#endif #endif memset(curve_x, 0, sizeof(curve_x)); lv_point_t circ; @@ -1118,27 +1233,31 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask #if LV_COMPILER_VLA_SUPPORTED uint32_t line_1d_blur[filter_width]; #else -# if LV_HOR_RES_MAX > LV_VER_RES_MAX +#if LV_HOR_RES_MAX > LV_VER_RES_MAX uint32_t line_1d_blur[LV_HOR_RES_MAX]; -# else +#else uint32_t line_1d_blur[LV_VER_RES_MAX]; -# endif +#endif #endif /*1D Blur horizontally*/ - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; for(line = 0; line < filter_width; line++) { - line_1d_blur[line] = (uint32_t)((uint32_t)(filter_width - line) * (opa * 2) << SHADOW_OPA_EXTRA_PRECISION) / (filter_width * filter_width); + line_1d_blur[line] = + (uint32_t)((uint32_t)(filter_width - line) * (opa * 2) << SHADOW_OPA_EXTRA_PRECISION) / + (filter_width * filter_width); } uint16_t col; #if LV_COMPILER_VLA_SUPPORTED lv_opa_t line_2d_blur[radius + swidth + 1]; #else -# if LV_HOR_RES_MAX > LV_VER_RES_MAX +#if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_opa_t line_2d_blur[LV_HOR_RES_MAX]; -# else +#else lv_opa_t line_2d_blur[LV_VER_RES_MAX]; -# endif +#endif #endif lv_point_t point_rt; @@ -1161,38 +1280,46 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask ofs_lt.x = coords->x1 + radius + aa; ofs_lt.y = coords->y1 + radius + aa; bool line_ready; - for(line = 0; line <= radius + swidth; line++) { /*Check all rows and make the 1D blur to 2D*/ + for(line = 0; line <= radius + swidth; line++) { /*Check all rows and make the 1D blur to 2D*/ line_ready = false; - for(col = 0; col <= radius + swidth; col++) { /*Check all pixels in a 1D blur line (from the origo to last shadow pixel (radius + swidth))*/ + for(col = 0; col <= radius + swidth; + col++) { /*Check all pixels in a 1D blur line (from the origo to last shadow pixel + (radius + swidth))*/ /*Sum the opacities from the lines above and below this 'row'*/ int16_t line_rel; uint32_t px_opa_sum = 0; - for(line_rel = -swidth; line_rel <= swidth; line_rel ++) { + for(line_rel = -swidth; line_rel <= swidth; line_rel++) { /*Get the relative x position of the 'line_rel' to 'line'*/ int16_t col_rel; - if(line + line_rel < 0) { /*Below the radius, here is the blur of the edge */ + if(line + line_rel < 0) { /*Below the radius, here is the blur of the edge */ col_rel = radius - curve_x[line] - col; - } else if(line + line_rel > radius) { /*Above the radius, here won't be more 1D blur*/ + } else if(line + line_rel > + radius) { /*Above the radius, here won't be more 1D blur*/ break; - } else { /*Blur from the curve*/ + } else { /*Blur from the curve*/ col_rel = curve_x[line + line_rel] - curve_x[line] - col; } /*Add the value of the 1D blur on 'col_rel' position*/ - if(col_rel < -swidth) { /*Outside of the blurred area. */ - if(line_rel == -swidth) line_ready = true; /*If no data even on the very first line then it wont't be anything else in this line*/ - break; /*Break anyway because only smaller 'col_rel' values will come */ - } else if(col_rel > swidth) px_opa_sum += line_1d_blur[0]; /*Inside the not blurred area*/ - else px_opa_sum += line_1d_blur[swidth - col_rel]; /*On the 1D blur (+ swidth to align to the center)*/ + if(col_rel < -swidth) { /*Outside of the blurred area. */ + if(line_rel == -swidth) + line_ready = true; /*If no data even on the very first line then it wont't + be anything else in this line*/ + break; /*Break anyway because only smaller 'col_rel' values will come */ + } else if(col_rel > swidth) + px_opa_sum += line_1d_blur[0]; /*Inside the not blurred area*/ + else + px_opa_sum += + line_1d_blur[swidth - + col_rel]; /*On the 1D blur (+ swidth to align to the center)*/ } line_2d_blur[col] = px_opa_sum >> SHADOW_OPA_EXTRA_PRECISION; if(line_ready) { - col++; /*To make this line to the last one ( drawing will go to '< col')*/ + col++; /*To make this line to the last one ( drawing will go to '< col')*/ break; } - } /*Flush the line*/ @@ -1202,7 +1329,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask point_rb.x = curve_x[line] + ofs_rb.x + 1; point_rb.y = ofs_rb.y + line; - point_lt.x = ofs_lt.x - curve_x[line] - 1; + point_lt.x = ofs_lt.x - curve_x[line] - 1; point_lt.y = ofs_lt.y - line; point_lb.x = ofs_lb.x - curve_x[line] - 1; @@ -1241,26 +1368,26 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask } } - -static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, lv_opa_t opa_scale) { - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; lv_coord_t swidth = style->body.shadow.width; - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); radius += aa * SHADOW_BOTTOM_AA_EXTRA_RADIUS; swidth += aa; #if LV_COMPILER_VLA_SUPPORTED - lv_coord_t curve_x[radius + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ + lv_coord_t curve_x[radius + 1]; /*Stores the 'x' coordinates of a quarter circle.*/ #else -# if LV_HOR_RES_MAX > LV_VER_RES_MAX +#if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_coord_t curve_x[LV_HOR_RES_MAX]; -# else +#else lv_coord_t curve_x[LV_VER_RES_MAX]; -# endif +#endif #endif lv_point_t circ; lv_coord_t circ_tmp; @@ -1275,14 +1402,16 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma #if LV_COMPILER_VLA_SUPPORTED lv_opa_t line_1d_blur[swidth]; #else -# if LV_HOR_RES_MAX > LV_VER_RES_MAX +#if LV_HOR_RES_MAX > LV_VER_RES_MAX lv_opa_t line_1d_blur[LV_HOR_RES_MAX]; -# else +#else lv_opa_t line_1d_blur[LV_VER_RES_MAX]; -# endif +#endif #endif - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; for(col = 0; col < swidth; col++) { line_1d_blur[col] = (uint32_t)((uint32_t)(swidth - col) * opa / 2) / (swidth); } @@ -1300,7 +1429,7 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma ofs_r.y = coords->y2 - radius + 1 - aa; for(col = 0; col <= radius; col++) { - point_l.x = ofs_l.x - col ; + point_l.x = ofs_l.x - col; point_l.y = ofs_l.y + curve_x[col]; point_r.x = ofs_r.x + col; @@ -1310,22 +1439,22 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma int16_t diff = col == 0 ? 0 : curve_x[col - 1] - curve_x[col]; uint16_t d; for(d = 0; d < swidth; d++) { - /*When stepping a pixel in y calculate the average with the pixel from the prev. column to make a blur */ + /*When stepping a pixel in y calculate the average with the pixel from the prev. column + * to make a blur */ if(diff == 0) { px_opa = line_1d_blur[d]; } else { px_opa = (uint16_t)((uint16_t)line_1d_blur[d] + line_1d_blur[d - diff]) >> 1; } lv_draw_px(point_l.x, point_l.y, mask, style->body.shadow.color, px_opa); - point_l.y ++; + point_l.y++; /*Don't overdraw the pixel on the middle*/ if(point_r.x > ofs_l.x) { lv_draw_px(point_r.x, point_r.y, mask, style->body.shadow.color, px_opa); } - point_r.y ++; + point_r.y++; } - } area_mid.x1 = ofs_l.x + 1; @@ -1336,17 +1465,18 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma uint16_t d; for(d = 0; d < swidth; d++) { lv_draw_fill(&area_mid, mask, style->body.shadow.color, line_1d_blur[d]); - area_mid.y1 ++; - area_mid.y2 ++; + area_mid.y1++; + area_mid.y2++; } } -static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, const lv_opa_t * map) +static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, + const lv_style_t * style, const lv_opa_t * map) { - bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); + bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; - lv_coord_t swidth = style->body.shadow.width;// + LV_ANTIALIAS; - lv_coord_t width = lv_area_get_width(coords); + lv_coord_t swidth = style->body.shadow.width; // + LV_ANTIALIAS; + lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); radius = lv_draw_cont_radius_corr(radius, width, height); @@ -1378,7 +1508,7 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area lv_opa_t opa_act; int16_t d; - for(d = 1 /*+ LV_ANTIALIAS*/; d <= swidth/* - LV_ANTIALIAS*/; d++) { + for(d = 1 /*+ LV_ANTIALIAS*/; d <= swidth /* - LV_ANTIALIAS*/; d++) { opa_act = map[d]; lv_draw_fill(&right_area, mask, style->body.shadow.color, opa_act); @@ -1401,7 +1531,6 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area #endif - static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h) { bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); @@ -1433,10 +1562,10 @@ static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h) static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_t opa) { /*Empirical non-linear values anti-aliasing values*/ - static const lv_opa_t opa_map2[2] = {210, 80}; - static const lv_opa_t opa_map3[3] = {230, 150, 60}; - static const lv_opa_t opa_map4[4] = {235, 185, 125, 50}; - static const lv_opa_t opa_map8[8] = {250, 242, 219, 191, 158, 117, 76, 40}; + static const lv_opa_t opa_map2[2] = {210, 80}; + static const lv_opa_t opa_map3[3] = {230, 150, 60}; + static const lv_opa_t opa_map4[4] = {235, 185, 125, 50}; + static const lv_opa_t opa_map8[8] = {250, 242, 219, 191, 158, 117, 76, 40}; #if CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD < 1 if(seg == 1) return 170; @@ -1455,8 +1584,7 @@ static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_ #endif uint8_t id = (uint32_t)((uint32_t)px_id * (sizeof(opa_map8) - 1)) / (seg - 1); - return (uint32_t)((uint32_t) opa_map8[id] * opa) >> 8; - + return (uint32_t)((uint32_t)opa_map8[id] * opa) >> 8; } #endif diff --git a/src/lv_draw/lv_draw_rect.h b/src/lv_draw/lv_draw_rect.h index 933590ca9c45..3d347eb8fd3d 100644 --- a/src/lv_draw/lv_draw_rect.h +++ b/src/lv_draw/lv_draw_rect.h @@ -34,13 +34,13 @@ extern "C" { * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); +void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); /********************** * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 587d23aa7a76..52d512aef58d 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -41,7 +41,8 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { lv_point_t tri[3]; @@ -62,18 +63,18 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l /*Draw the triangle*/ lv_point_t edge1; - lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x); - lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1; - lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y); - lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1; + lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x); + lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1; + lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y); + lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1; lv_coord_t err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; lv_coord_t err_tmp1; lv_point_t edge2; - lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x); - lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1; - lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y); - lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1; + lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x); + lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1; + lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y); + lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1; lv_coord_t err2 = (dx1 > dy2 ? dx2 : -dy2) / 2; lv_coord_t err_tmp2; @@ -87,21 +88,22 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l lv_area_t act_area; lv_area_t draw_area; - - lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; while(1) { act_area.x1 = edge1.x; - act_area.x2 = edge2.x ; + act_area.x2 = edge2.x; act_area.y1 = edge1.y; - act_area.y2 = edge2.y ; - + act_area.y2 = edge2.y; draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); - draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent triangle*/ + draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent + triangle*/ lv_draw_fill(&draw_area, mask, style->body.main_color, opa); /*Calc. the next point of edge1*/ @@ -109,12 +111,13 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l do { if(edge1.x == tri[1].x && edge1.y == tri[1].y) { - dx1 = LV_MATH_ABS(tri[1].x - tri[2].x); - sx1 = tri[1].x < tri[2].x ? 1 : -1; - dy1 = LV_MATH_ABS(tri[1].y - tri[2].y); - sy1 = tri[1].y < tri[2].y ? 1 : -1; + dx1 = LV_MATH_ABS(tri[1].x - tri[2].x); + sx1 = tri[1].x < tri[2].x ? 1 : -1; + dy1 = LV_MATH_ABS(tri[1].y - tri[2].y); + sy1 = tri[1].y < tri[2].y ? 1 : -1; err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; - } else if(edge1.x == tri[2].x && edge1.y == tri[2].y) return; + } else if(edge1.x == tri[2].x && edge1.y == tri[2].y) + return; err_tmp1 = err1; if(err_tmp1 > -dx1) { err1 -= dy1; @@ -147,7 +150,6 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l * STATIC FUNCTIONS **********************/ - /** * Swap two points * p1 pointer to the first point @@ -164,5 +166,4 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2) p2->x = tmp.x; p2->y = tmp.y; - } diff --git a/src/lv_draw/lv_draw_triangle.h b/src/lv_draw/lv_draw_triangle.h index d4070e34e15a..35bd9b0ed66f 100644 --- a/src/lv_draw/lv_draw_triangle.h +++ b/src/lv_draw/lv_draw_triangle.h @@ -34,13 +34,13 @@ extern "C" { * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); /********************** * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index e4541c6d8153..892bfac09573 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -18,7 +18,7 @@ #include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* @@ -57,10 +57,10 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) memset(driver, 0, sizeof(lv_disp_drv_t)); driver->flush_cb = NULL; - driver->hor_res = LV_HOR_RES_MAX; - driver->ver_res = LV_VER_RES_MAX; - driver->buffer = NULL; - driver->rotated = 0; + driver->hor_res = LV_HOR_RES_MAX; + driver->ver_res = LV_VER_RES_MAX; + driver->buffer = NULL; + driver->rotated = 0; #if LV_ANTIALIAS driver->antialiasing = true; @@ -68,13 +68,12 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) #if LV_USE_GPU driver->mem_blend = NULL; - driver->mem_fill = NULL; + driver->mem_fill = NULL; #endif driver->set_px_cb = NULL; } - /** * Initialize a display buffer * @param disp_buf pointer `lv_disp_buf_t` variable to initialize @@ -86,21 +85,20 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) * (sending to the display) parallel. * In the `disp_drv->flush` you should use DMA or similar hardware to send * the image to the display in the background. - * It lets LittlevGL to render next frame into the other buffer while previous is being sent. - * Set to `NULL` if unused. + * It lets LittlevGL to render next frame into the other buffer while previous is being + * sent. Set to `NULL` if unused. * @param size size of the `buf1` and `buf2` in pixel count. */ void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size) { memset(disp_buf, 0, sizeof(lv_disp_buf_t)); - disp_buf->buf1 = buf1; - disp_buf->buf2 = buf2; + disp_buf->buf1 = buf1; + disp_buf->buf2 = buf2; disp_buf->buf_act = disp_buf->buf1; - disp_buf->size = size; + disp_buf->size = size; } - /** * Register an initialized display driver. * Automatically set the first display as active. @@ -122,12 +120,13 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) if(disp_def == NULL) disp_def = disp; - lv_disp_t * disp_def_tmp = disp_def; - disp_def = disp; /*Temporarily change the default screen to create the default screens on the new display*/ + lv_disp_t * disp_def_tmp = disp_def; + disp_def = disp; /*Temporarily change the default screen to create the default screens on the + new display*/ - disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ - disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ - disp->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ + disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ + disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ + disp->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ lv_obj_set_style(disp->top_layer, &lv_style_transp); lv_obj_set_style(disp->sys_layer, &lv_style_transp); @@ -135,14 +134,15 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) lv_obj_invalidate(disp->act_scr); - disp_def = disp_def_tmp; /*Revert the default display*/ + disp_def = disp_def_tmp; /*Revert the default display*/ /*Create a refresh task*/ - disp->refr_task = lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp); + disp->refr_task = + lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp); lv_mem_assert(disp->refr_task); if(disp->refr_task == NULL) return NULL; - lv_task_ready(disp->refr_task); /*Be sure the screen will be refreshed immediately on start up*/ + lv_task_ready(disp->refr_task); /*Be sure the screen will be refreshed immediately on start up*/ return disp; } @@ -157,7 +157,8 @@ void lv_disp_drv_update(lv_disp_t * disp, lv_disp_drv_t * new_drv) memcpy(&disp->driver, new_drv, sizeof(lv_disp_drv_t)); lv_obj_t * scr; - LV_LL_READ(disp->scr_ll, scr) { + LV_LL_READ(disp->scr_ll, scr) + { lv_obj_set_size(scr, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp)); } } @@ -187,7 +188,6 @@ void lv_disp_remove(lv_disp_t * disp) if(was_default) lv_disp_set_default(lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll))); } - /** * Set a default screen. The new screens will be created on it by default. * @param disp pointer to a display @@ -215,8 +215,10 @@ lv_coord_t lv_disp_get_hor_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); - if(disp == NULL) return disp->driver.rotated == 0 ? LV_HOR_RES_MAX : LV_VER_RES_MAX; - else return disp->driver.rotated == 0 ? disp->driver.hor_res : disp->driver.ver_res; + if(disp == NULL) + return disp->driver.rotated == 0 ? LV_HOR_RES_MAX : LV_VER_RES_MAX; + else + return disp->driver.rotated == 0 ? disp->driver.hor_res : disp->driver.ver_res; } /** @@ -228,8 +230,10 @@ lv_coord_t lv_disp_get_ver_res(lv_disp_t * disp) { if(disp == NULL) disp = lv_disp_get_default(); - if(disp == NULL) return disp->driver.rotated == 0 ? LV_VER_RES_MAX : LV_HOR_RES_MAX; - else return disp->driver.rotated == 0 ? disp->driver.ver_res : disp->driver.hor_res; + if(disp == NULL) + return disp->driver.rotated == 0 ? LV_VER_RES_MAX : LV_HOR_RES_MAX; + else + return disp->driver.rotated == 0 ? disp->driver.ver_res : disp->driver.hor_res; } /** @@ -249,7 +253,6 @@ bool lv_disp_get_antialiasing(lv_disp_t * disp) #endif } - /** * Call in the display driver's `flush_cb` function when the flushing is finished * @param disp_drv pointer to display driver in `flush_cb` where this function is called @@ -264,7 +267,6 @@ LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv) #endif } - /** * Get the next display. * @param disp pointer to the current display. NULL to initialize. @@ -272,8 +274,10 @@ LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv) */ lv_disp_t * lv_disp_get_next(lv_disp_t * disp) { - if(disp == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); - else return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); + if(disp == NULL) + return lv_ll_get_head(&LV_GC_ROOT(_lv_disp_ll)); + else + return lv_ll_get_next(&LV_GC_ROOT(_lv_disp_ll), disp); } /** @@ -302,8 +306,10 @@ uint16_t lv_disp_get_inv_buf_size(lv_disp_t * disp) void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) { - if(disp->inv_p < num) disp->inv_p = 0; - else disp->inv_p -= num; + if(disp->inv_p < num) + disp->inv_p = 0; + else + disp->inv_p -= num; } /** @@ -313,12 +319,15 @@ void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num) */ bool lv_disp_is_double_buf(lv_disp_t * disp) { - if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2) return true; - else return false; + if(disp->driver.buffer->buf1 && disp->driver.buffer->buf2) + return true; + else + return false; } /** - * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and `size` is screen sized) + * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and + * `size` is screen sized) * @param disp pointer to to display to check * @return true: double buffered; false: not double buffered */ @@ -326,16 +335,13 @@ bool lv_disp_is_true_double_buf(lv_disp_t * disp) { uint32_t scr_size = disp->driver.hor_res * disp->driver.ver_res; - if(lv_disp_is_double_buf(disp) && - disp->driver.buffer->size == scr_size) { + if(lv_disp_is_double_buf(disp) && disp->driver.buffer->size == scr_size) { return true; - } - else { + } else { return false; } } - /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 948366068bef..5a138cceb440 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -27,11 +27,11 @@ extern "C" { * DEFINES *********************/ #ifndef LV_INV_BUF_SIZE -#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */ +#define LV_INV_BUF_SIZE 32 /*Buffer size for invalid areas */ #endif #ifndef LV_ATTRIBUTE_FLUSH_READY -# define LV_ATTRIBUTE_FLUSH_READY +#define LV_ATTRIBUTE_FLUSH_READY #endif /********************** @@ -41,7 +41,6 @@ extern "C" { struct _disp_t; struct _disp_drv_t; - typedef struct { void * buf1; @@ -49,16 +48,16 @@ typedef struct /*Used by the library*/ void * buf_act; - uint32_t size; /*In pixel count*/ + uint32_t size; /*In pixel count*/ lv_area_t area; - volatile uint32_t flushing :1; -}lv_disp_buf_t; - + volatile uint32_t flushing : 1; +} lv_disp_buf_t; /** * Display Driver structure to be registered by HAL */ -typedef struct _disp_drv_t { +typedef struct _disp_drv_t +{ /*Horizontal and vertical resolution*/ lv_coord_t hor_res; @@ -69,11 +68,12 @@ typedef struct _disp_drv_t { lv_disp_buf_t * buffer; #if LV_ANTIALIAS - uint32_t antialiasing :1; + uint32_t antialiasing : 1; #endif - uint32_t rotated :1; /*1: turn the display by 90 degree.*/ + uint32_t rotated : 1; /*1: turn the display by 90 degree.*/ - /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_disp_flush_ready()' has to be called when finished */ + /* MANDATORY: Write the internal buffer (VDB) to the display. 'lv_disp_flush_ready()' has to be + * called when finished */ void (*flush_cb)(struct _disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p); /* OPTIONAL: Extend the invalidated areas to match with the display drivers requirements @@ -83,12 +83,13 @@ typedef struct _disp_drv_t { /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * Note: Much slower then drawing with supported color formats. */ - void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa); + void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, + lv_coord_t y, lv_color_t color, lv_opa_t opa); - /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the number of flushed pixels */ + /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the + * number of flushed pixels */ void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); - #if LV_USE_USER_DATA_SINGLE lv_disp_drv_user_data_t user_data; #endif @@ -112,7 +113,8 @@ typedef struct _disp_drv_t { struct _lv_obj_t; -typedef struct _disp_t { +typedef struct _disp_t +{ /*Driver to the display*/ lv_disp_drv_t driver; @@ -128,7 +130,7 @@ typedef struct _disp_t { /*Invalidated (marked to redraw) areas*/ lv_area_t inv_areas[LV_INV_BUF_SIZE]; uint8_t inv_area_joined[LV_INV_BUF_SIZE]; - uint32_t inv_p :10; + uint32_t inv_p : 10; /*Miscellaneous data*/ uint32_t last_activity_time; @@ -146,7 +148,6 @@ typedef struct _disp_t { */ void lv_disp_drv_init(lv_disp_drv_t * driver); - /** * Initialize a display buffer * @param disp_buf pointer `lv_disp_buf_t` variable to initialize @@ -158,8 +159,8 @@ void lv_disp_drv_init(lv_disp_drv_t * driver); * (sending to the display) parallel. * In the `disp_drv->flush` you should use DMA or similar hardware to send * the image to the display in the background. - * It lets LittlevGL to render next frame into the other buffer while previous is being sent. - * Set to `NULL` if unused. + * It lets LittlevGL to render next frame into the other buffer while previous is being + * sent. Set to `NULL` if unused. * @param size size of the `buf1` and `buf2` in pixel count. */ void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size); @@ -224,7 +225,6 @@ bool lv_disp_get_antialiasing(lv_disp_t * disp); */ LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv); - /** * Get the next display. * @param disp pointer to the current display. NULL to initialize. @@ -259,7 +259,8 @@ void lv_disp_pop_from_inv_buf(lv_disp_t * disp, uint16_t num); bool lv_disp_is_double_buf(lv_disp_t * disp); /** - * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and `size` is screen sized) + * Check the driver configuration if it's TRUE double buffered (both `buf1` and `buf2` are set and + * `size` is screen sized) * @param disp pointer to to display to check * @return true: double buffered; false: not double buffered */ diff --git a/src/lv_hal/lv_hal_indev.c b/src/lv_hal/lv_hal_indev.c index c0a03b4bd3c9..9629cef3033d 100644 --- a/src/lv_hal/lv_hal_indev.c +++ b/src/lv_hal/lv_hal_indev.c @@ -15,10 +15,9 @@ #include "lv_hal_disp.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ - /********************* * DEFINES *********************/ @@ -53,10 +52,10 @@ void lv_indev_drv_init(lv_indev_drv_t * driver) { memset(driver, 0, sizeof(lv_indev_drv_t)); - driver->type = LV_INDEV_TYPE_NONE; - driver->drag_limit = LV_INDEV_DEF_DRAG_LIMIT; - driver->drag_throw = LV_INDEV_DEF_DRAG_THROW; - driver->long_press_time = LV_INDEV_DEF_LONG_PRESS_TIME; + driver->type = LV_INDEV_TYPE_NONE; + driver->drag_limit = LV_INDEV_DEF_DRAG_LIMIT; + driver->drag_throw = LV_INDEV_DEF_DRAG_THROW; + driver->long_press_time = LV_INDEV_DEF_LONG_PRESS_TIME; driver->long_press_rep_time = LV_INDEV_DEF_LONG_PRESS_REP_TIME; } @@ -71,7 +70,8 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) if(driver->disp == NULL) driver->disp = lv_disp_get_default(); if(driver->disp == NULL) { - LV_LOG_WARN("lv_indev_drv_register: no display registered hence can't attache the indev to a display"); + LV_LOG_WARN("lv_indev_drv_register: no display registered hence can't attache the indev to " + "a display"); return NULL; } @@ -85,11 +85,12 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) memcpy(&indev->driver, driver, sizeof(lv_indev_drv_t)); indev->proc.reset_query = 1; - indev->cursor = NULL; - indev->group = NULL; - indev->btn_points = NULL; + indev->cursor = NULL; + indev->group = NULL; + indev->btn_points = NULL; - indev->driver.read_task = lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev); + indev->driver.read_task = + lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev); return indev; } @@ -107,12 +108,15 @@ void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv) /** * Get the next input device. * @param indev pointer to the current input device. NULL to initialize. - * @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL + * @return the next input devise or NULL if no more. Give the first input device when the parameter + * is NULL */ lv_indev_t * lv_indev_get_next(lv_indev_t * indev) { - if(indev == NULL) return lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll)); - else return lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev); + if(indev == NULL) + return lv_ll_get_head(&LV_GC_ROOT(_lv_indev_ll)); + else + return lv_ll_get_next(&LV_GC_ROOT(_lv_indev_ll), indev); } /** diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index 7b7e86f38c36..f53d8e0aa158 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -41,40 +41,41 @@ struct _lv_indev_drv_t; /*Possible input device types*/ enum { - LV_INDEV_TYPE_NONE, /*Show uninitialized state*/ - LV_INDEV_TYPE_POINTER, /*Touch pad, mouse, external button*/ - LV_INDEV_TYPE_KEYPAD, /*Keypad or keyboard*/ - LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the screen*/ - LV_INDEV_TYPE_ENCODER, /*Encoder with only Left, Right turn and a Button*/ + LV_INDEV_TYPE_NONE, /*Show uninitialized state*/ + LV_INDEV_TYPE_POINTER, /*Touch pad, mouse, external button*/ + LV_INDEV_TYPE_KEYPAD, /*Keypad or keyboard*/ + LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the + screen*/ + LV_INDEV_TYPE_ENCODER, /*Encoder with only Left, Right turn and a Button*/ }; typedef uint8_t lv_indev_type_t; /*States for input devices*/ -enum { - LV_INDEV_STATE_REL = 0, - LV_INDEV_STATE_PR -}; +enum { LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR }; typedef uint8_t lv_indev_state_t; /*Data type when an input device is read */ -typedef struct { - lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ - uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ - uint32_t btn_id; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ - int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ +typedef struct +{ + lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/ + uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/ + uint32_t btn_id; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/ + int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ - lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ + lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ } lv_indev_data_t; /*Initialized by the user and registered by 'lv_indev_add()'*/ -typedef struct _lv_indev_drv_t { +typedef struct _lv_indev_drv_t +{ /*Input device type*/ lv_indev_type_t type; - /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb (buffered)*/ - bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t *data); + /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb + * (buffered)*/ + bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data); #if LV_USE_USER_DATA_MULTI lv_indev_drv_user_data_t read_user_data; @@ -103,39 +104,43 @@ typedef struct _lv_indev_drv_t { uint16_t long_press_rep_time; } lv_indev_drv_t; - /*Run time data of input devices*/ -typedef struct _lv_indev_proc_t { +typedef struct _lv_indev_proc_t +{ lv_indev_state_t state; - union { - struct { /*Pointer and button data*/ + union + { + struct + { /*Pointer and button data*/ lv_point_t act_point; lv_point_t last_point; lv_point_t vect; - lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DEF_DRAG_LIMIT*/ + lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DEF_DRAG_LIMIT*/ lv_point_t drag_throw_vect; - struct _lv_obj_t * act_obj; /*The object being pressed*/ - struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and other post-release event)*/ - struct _lv_obj_t * last_pressed; /*The lastly pressed object*/ + struct _lv_obj_t * act_obj; /*The object being pressed*/ + struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and + other post-release event)*/ + struct _lv_obj_t * last_pressed; /*The lastly pressed object*/ /*Flags*/ - uint8_t drag_limit_out :1; - uint8_t drag_in_prog :1; - }pointer; - struct { /*Keypad data*/ + uint8_t drag_limit_out : 1; + uint8_t drag_in_prog : 1; + } pointer; + struct + { /*Keypad data*/ lv_indev_state_t last_state; uint32_t last_key; - }keypad; - }types; + } keypad; + } types; - uint32_t pr_timestamp; /*Pressed time stamp*/ - uint32_t longpr_rep_timestamp; /*Long press repeat time stamp*/ + uint32_t pr_timestamp; /*Pressed time stamp*/ + uint32_t longpr_rep_timestamp; /*Long press repeat time stamp*/ /*Flags*/ - uint8_t long_pr_sent :1; - uint8_t reset_query :1; - uint8_t disabled :1; - uint8_t wait_until_release :1; + uint8_t long_pr_sent : 1; + uint8_t reset_query : 1; + uint8_t disabled : 1; + uint8_t wait_until_release : 1; } lv_indev_proc_t; typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); @@ -143,14 +148,17 @@ typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); struct _lv_obj_t; struct _lv_group_t; -/*The main input device descriptor with driver, runtime data ('proc') and some additional information*/ -typedef struct _lv_indev_t { +/*The main input device descriptor with driver, runtime data ('proc') and some additional + * information*/ +typedef struct _lv_indev_t +{ lv_indev_drv_t driver; lv_indev_proc_t proc; lv_indev_feedback_t feedback; - struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ - struct _lv_group_t *group; /*Keypad destination group*/ - const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/ + struct _lv_obj_t * cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ + struct _lv_group_t * group; /*Keypad destination group*/ + const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed + here by the buttons*/ } lv_indev_t; /********************** @@ -163,14 +171,14 @@ typedef struct _lv_indev_t { * After it you can set the fields. * @param driver pointer to driver variable to initialize */ -void lv_indev_drv_init(lv_indev_drv_t *driver); +void lv_indev_drv_init(lv_indev_drv_t * driver); /** * Register an initialized input device driver. * @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable) * @return pointer to the new input device or NULL on error */ -lv_indev_t * lv_indev_drv_register(lv_indev_drv_t *driver); +lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver); /** * Update the driver in run time. @@ -182,7 +190,8 @@ void lv_indev_drv_update(lv_indev_t * indev, lv_indev_drv_t * new_drv); /** * Get the next input device. * @param indev pointer to the current input device. NULL to initialize. - * @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL + * @return the next input devise or NULL if no more. Give the first input device when the parameter + * is NULL */ lv_indev_t * lv_indev_get_next(lv_indev_t * indev); @@ -192,7 +201,7 @@ lv_indev_t * lv_indev_get_next(lv_indev_t * indev); * @param data input device will write its data here * @return false: no more data; true: there more data to read (buffered) */ -bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t *data); +bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data); /********************** * MACROS diff --git a/src/lv_hal/lv_hal_tick.c b/src/lv_hal/lv_hal_tick.c index 621e05f53061..cdfec32c3ee8 100644 --- a/src/lv_hal/lv_hal_tick.c +++ b/src/lv_hal/lv_hal_tick.c @@ -65,8 +65,9 @@ uint32_t lv_tick_get(void) uint32_t result; do { tick_irq_flag = 1; - result = sys_time; - } while(!tick_irq_flag); /*'lv_tick_inc()' clears this flag which can be in an interrupt. Continue until make a non interrupted cycle */ + result = sys_time; + } while(!tick_irq_flag); /*'lv_tick_inc()' clears this flag which can be in an interrupt. + Continue until make a non interrupted cycle */ return result; #else @@ -97,4 +98,3 @@ uint32_t lv_tick_elaps(uint32_t prev_tick) /********************** * STATIC FUNCTIONS **********************/ - diff --git a/src/lv_hal/lv_hal_tick.h b/src/lv_hal/lv_hal_tick.h index e016abbf680a..7d6c0523aeba 100644 --- a/src/lv_hal/lv_hal_tick.h +++ b/src/lv_hal/lv_hal_tick.h @@ -63,4 +63,4 @@ uint32_t lv_tick_elaps(uint32_t prev_tick); } /* extern "C" */ #endif -#endif /*LV_HAL_TICK_H*/ +#endif /*LV_HAL_TICK_H*/ diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 7026330c4f60..a8fda05b144f 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -17,15 +17,14 @@ #include "lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ - /********************* * DEFINES *********************/ -#define LV_ANIM_RESOLUTION 1024 -#define LV_ANIM_RES_SHIFT 10 +#define LV_ANIM_RESOLUTION 1024 +#define LV_ANIM_RES_SHIFT 10 /********************** * TYPEDEFS @@ -69,7 +68,8 @@ void lv_anim_create(lv_anim_t * anim_p) { LV_LOG_TRACE("animation create started") /* Do not let two animations for the same 'var' with the same 'fp'*/ - if(anim_p->fp != NULL) lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/ + if(anim_p->fp != NULL) + lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/ /*Add the new animation to the animation linked list*/ lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll)); @@ -102,7 +102,7 @@ bool lv_anim_del(void * var, lv_anim_fp_t fp) lv_anim_t * a; lv_anim_t * a_next; bool del = false; - a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); + a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); while(a != NULL) { /*'a' might be deleted, so get the next object while 'a' is valid*/ a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a); @@ -110,7 +110,8 @@ bool lv_anim_del(void * var, lv_anim_fp_t fp) if(a->var == var && (a->fp == fp || fp == NULL)) { lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); - anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in the linked list*/ + anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in + the linked list*/ del = true; } @@ -142,7 +143,7 @@ uint16_t lv_anim_count_running(void) */ uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end) { - int32_t d = LV_MATH_ABS((int32_t) start - end); + int32_t d = LV_MATH_ABS((int32_t)start - end); uint32_t time = (int32_t)((int32_t)(d * 1000) / speed); if(time > UINT16_MAX) time = UINT16_MAX; @@ -163,13 +164,15 @@ int32_t lv_anim_path_linear(const lv_anim_t * a) { /*Calculate the current step*/ uint16_t step; - if(a->time == a->act_time) step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/ - else step = (a->act_time * LV_ANIM_RESOLUTION) / a->time; + if(a->time == a->act_time) + step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/ + else + step = (a->act_time * LV_ANIM_RESOLUTION) / a->time; /* Get the new value which will be proportional to `step` * and the `start` and `end` values*/ int32_t new_value; - new_value = (int32_t) step * (a->end - a->start); + new_value = (int32_t)step * (a->end - a->start); new_value = new_value >> LV_ANIM_RES_SHIFT; new_value += a->start; @@ -185,17 +188,18 @@ int32_t lv_anim_path_ease_in(const lv_anim_t * a) { /*Calculate the current step*/ uint32_t t; - if(a->time == a->act_time) t = 1024; - else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; + if(a->time == a->act_time) + t = 1024; + else + t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; int32_t step = lv_bezier3(t, 0, 1, 1, 1024); int32_t new_value; - new_value = (int32_t) step * (a->end - a->start); + new_value = (int32_t)step * (a->end - a->start); new_value = new_value >> 10; new_value += a->start; - return new_value; } @@ -209,17 +213,18 @@ int32_t lv_anim_path_ease_out(const lv_anim_t * a) /*Calculate the current step*/ uint32_t t; - if(a->time == a->act_time) t = 1024; - else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; + if(a->time == a->act_time) + t = 1024; + else + t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; int32_t step = lv_bezier3(t, 0, 1023, 1023, 1024); int32_t new_value; - new_value = (int32_t) step * (a->end - a->start); + new_value = (int32_t)step * (a->end - a->start); new_value = new_value >> 10; new_value += a->start; - return new_value; } @@ -233,17 +238,18 @@ int32_t lv_anim_path_ease_in_out(const lv_anim_t * a) /*Calculate the current step*/ uint32_t t; - if(a->time == a->act_time) t = 1024; - else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; + if(a->time == a->act_time) + t = 1024; + else + t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; int32_t step = lv_bezier3(t, 0, 100, 924, 1024); int32_t new_value; - new_value = (int32_t) step * (a->end - a->start); + new_value = (int32_t)step * (a->end - a->start); new_value = new_value >> 10; new_value += a->start; - return new_value; } @@ -257,17 +263,18 @@ int32_t lv_anim_path_overshoot(const lv_anim_t * a) /*Calculate the current step*/ uint32_t t; - if(a->time == a->act_time) t = 1024; - else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; + if(a->time == a->act_time) + t = 1024; + else + t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; int32_t step = lv_bezier3(t, 0, 600, 1300, 1024); int32_t new_value; - new_value = (int32_t) step * (a->end - a->start); + new_value = (int32_t)step * (a->end - a->start); new_value = new_value >> 10; new_value += a->start; - return new_value; } @@ -280,41 +287,39 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a) { /*Calculate the current step*/ uint32_t t; - if(a->time == a->act_time) t = 1024; - else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; + if(a->time == a->act_time) + t = 1024; + else + t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time; int32_t diff = (a->end - a->start); /*3 bounces has 5 parts: 3 down and 2 up. One part is t / 5 long*/ - if(t < 408){ + if(t < 408) { /*Go down*/ - t = (t * 2500) >> 10; /*[0..1024] range*/ - } - else if(t >= 408 && t < 614) { + t = (t * 2500) >> 10; /*[0..1024] range*/ + } else if(t >= 408 && t < 614) { /*First bounce back*/ t -= 408; - t = t * 5; /*to [0..1024] range*/ - t = 1024 - t; + t = t * 5; /*to [0..1024] range*/ + t = 1024 - t; diff = diff / 6; - } - else if(t >= 614 && t < 819) { + } else if(t >= 614 && t < 819) { /*Fall back*/ t -= 614; - t = t * 5; /*to [0..1024] range*/ + t = t * 5; /*to [0..1024] range*/ diff = diff / 6; - } - else if(t >= 819 && t < 921) { + } else if(t >= 819 && t < 921) { /*Second bounce back*/ t -= 819; - t = t * 10; /*to [0..1024] range*/ - t = 1024 - t; + t = t * 10; /*to [0..1024] range*/ + t = 1024 - t; diff = diff / 16; - } - else if(t >= 921 && t <= 1024) { + } else if(t >= 921 && t <= 1024) { /*Fall back*/ t -= 921; - t = t * 10; /*to [0..1024] range*/ + t = t * 10; /*to [0..1024] range*/ diff = diff / 16; } @@ -324,11 +329,10 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a) int32_t new_value; - new_value = (int32_t) step * diff; + new_value = (int32_t)step * diff; new_value = new_value >> 10; new_value = a->end - new_value; - return new_value; } @@ -340,8 +344,10 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a) */ int32_t lv_anim_path_step(const lv_anim_t * a) { - if(a->act_time >= a->time) return a->end; - else return a->start; + if(a->act_time >= a->time) + return a->end; + else + return a->start; } /********************** @@ -357,21 +363,24 @@ static void anim_task(void * param) (void)param; lv_anim_t * a; - LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) { + LV_LL_READ(LV_GC_ROOT(_lv_anim_ll), a) + { a->has_run = 0; } uint32_t elaps = lv_tick_elaps(last_task_run); - a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); + a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); while(a != NULL) { - /*It can be set by `lv_anim_del()` typically in `end_cb`. If set then an animation delete happened in `anim_ready_handler` - * which could make this linked list reading corrupt because the list is changed meanwhile + /*It can be set by `lv_anim_del()` typically in `end_cb`. If set then an animation delete + * happened in `anim_ready_handler` which could make this linked list reading corrupt + * because the list is changed meanwhile */ anim_list_changed = false; if(!a->has_run) { - a->has_run = 1; /*The list readying might be reseted so need to know which anim has run already*/ + a->has_run = + 1; /*The list readying might be reseted so need to know which anim has run already*/ a->act_time += elaps; if(a->act_time >= 0) { if(a->act_time > a->time) a->act_time = a->time; @@ -390,8 +399,10 @@ static void anim_task(void * param) /* If the linked list changed due to anim. delete then it's not safe to continue * the reading of the list from here -> start from the head*/ - if(anim_list_changed) a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); - else a = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a); + if(anim_list_changed) + a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); + else + a = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a); } last_task_run = lv_tick_get(); @@ -410,9 +421,9 @@ static bool anim_ready_handler(lv_anim_t * a) * - no repeat and no play back (simple one shot animation) * - no repeat, play back is enabled and play back is ready */ if((a->repeat == 0 && a->playback == 0) || - (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { + (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { void (*cb)(void *) = a->end_cb; - void * p = a->var; + void * p = a->var; lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); anim_list_changed = true; @@ -424,19 +435,19 @@ static bool anim_ready_handler(lv_anim_t * a) } /*If the animation is not deleted then restart it*/ else { - a->act_time = - a->repeat_pause; /*Restart the animation*/ + a->act_time = -a->repeat_pause; /*Restart the animation*/ /*Swap the start and end values in play back mode*/ if(a->playback != 0) { /*If now turning back use the 'playback_pause*/ - if(a->playback_now == 0) a->act_time = - a->playback_pause; + if(a->playback_now == 0) a->act_time = -a->playback_pause; /*Toggle the play back state*/ a->playback_now = a->playback_now == 0 ? 1 : 0; /*Swap the start and end values*/ int32_t tmp; - tmp = a->start; + tmp = a->start; a->start = a->end; - a->end = tmp; + a->end = tmp; } } diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 70e0db9f08ac..7f17cf3c9b17 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -35,28 +34,28 @@ extern "C" { struct _lv_anim_t; -typedef int32_t(*lv_anim_path_t)(const struct _lv_anim_t*); +typedef int32_t (*lv_anim_path_t)(const struct _lv_anim_t *); typedef void (*lv_anim_fp_t)(void *, int32_t); typedef void (*lv_anim_cb_t)(void *); typedef struct _lv_anim_t { - void * var; /*Variable to animate*/ - lv_anim_fp_t fp; /*Animator function*/ - lv_anim_cb_t end_cb; /*Call it when the animation is ready*/ - lv_anim_path_t path; /*An array with the steps of animations*/ - int32_t start; /*Start value*/ - int32_t end; /*End value*/ - uint16_t time; /*Animation time in ms*/ - int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ - uint16_t playback_pause; /*Wait before play back*/ - uint16_t repeat_pause; /*Wait before repeat*/ - uint8_t playback :1; /*When the animation is ready play it back*/ - uint8_t repeat :1; /*Repeat the animation infinitely*/ + void * var; /*Variable to animate*/ + lv_anim_fp_t fp; /*Animator function*/ + lv_anim_cb_t end_cb; /*Call it when the animation is ready*/ + lv_anim_path_t path; /*An array with the steps of animations*/ + int32_t start; /*Start value*/ + int32_t end; /*End value*/ + uint16_t time; /*Animation time in ms*/ + int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ + uint16_t playback_pause; /*Wait before play back*/ + uint16_t repeat_pause; /*Wait before repeat*/ + uint8_t playback : 1; /*When the animation is ready play it back*/ + uint8_t repeat : 1; /*Repeat the animation infinitely*/ /*Animation system use these - user shouldn't set*/ - uint8_t playback_now :1; /*Play back is in progress*/ - uint32_t has_run :1; /*Indicates the animation has run it this round*/ + uint8_t playback_now : 1; /*Play back is in progress*/ + uint32_t has_run : 1; /*Indicates the animation has run it this round*/ } lv_anim_t; /*Example initialization @@ -119,7 +118,7 @@ uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end); * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_linear(const lv_anim_t *a); +int32_t lv_anim_path_linear(const lv_anim_t * a); /** * Calculate the current value of an animation slowing down the start phase @@ -140,7 +139,7 @@ int32_t lv_anim_path_ease_out(const lv_anim_t * a); * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_in_out(const lv_anim_t *a); +int32_t lv_anim_path_ease_in_out(const lv_anim_t * a); /** * Calculate the current value of an animation with overshoot at the end @@ -162,7 +161,7 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a); * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_step(const lv_anim_t *a); +int32_t lv_anim_path_step(const lv_anim_t * a); /********************** * MACROS **********************/ @@ -174,4 +173,3 @@ int32_t lv_anim_path_step(const lv_anim_t *a); #endif #endif /*LV_ANIM_H*/ - diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index f340690a4701..45ea1b78cdae 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -79,8 +79,8 @@ void lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y) { lv_coord_t w = lv_area_get_width(area_p); lv_coord_t h = lv_area_get_height(area_p); - area_p->x1 = x; - area_p->y1 = y; + area_p->x1 = x; + area_p->y1 = y; lv_area_set_width(area_p, w); lv_area_set_height(area_p, h); } @@ -94,8 +94,7 @@ uint32_t lv_area_get_size(const lv_area_t * area_p) { uint32_t size; - size = (uint32_t)(area_p->x2 - area_p->x1 + 1) * - (area_p->y2 - area_p->y1 + 1); + size = (uint32_t)(area_p->x2 - area_p->x1 + 1) * (area_p->y2 - area_p->y1 + 1); return size; } @@ -117,8 +116,7 @@ bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_ /*If x1 or y1 greater then x2 or y2 then the areas union is empty*/ bool union_ok = true; - if((res_p->x1 > res_p->x2) || - (res_p->y1 > res_p->y2)) { + if((res_p->x1 > res_p->x2) || (res_p->y1 > res_p->y2)) { union_ok = false; } @@ -148,8 +146,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) { bool is_on = false; - if((p_p->x >= a_p->x1 && p_p->x <= a_p->x2) && - ((p_p->y >= a_p->y1 && p_p->y <= a_p->y2))) { + if((p_p->x >= a_p->x1 && p_p->x <= a_p->x2) && ((p_p->y >= a_p->y1 && p_p->y <= a_p->y2))) { is_on = true; } @@ -164,15 +161,12 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) */ bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p) { - if((a1_p->x1 <= a2_p->x2) && - (a1_p->x2 >= a2_p->x1) && - (a1_p->y1 <= a2_p->y2) && - (a1_p->y2 >= a2_p->y1)) { + if((a1_p->x1 <= a2_p->x2) && (a1_p->x2 >= a2_p->x1) && (a1_p->y1 <= a2_p->y2) && + (a1_p->y2 >= a2_p->y1)) { return true; } else { return false; } - } /** @@ -185,10 +179,8 @@ bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p) { bool is_in = false; - if(ain_p->x1 >= aholder_p->x1 && - ain_p->y1 >= aholder_p->y1 && - ain_p->x2 <= aholder_p->x2 && - ain_p->y2 <= aholder_p->y2) { + if(ain_p->x1 >= aholder_p->x1 && ain_p->y1 >= aholder_p->y1 && ain_p->x2 <= aholder_p->x2 && + ain_p->y2 <= aholder_p->y2) { is_in = true; } diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index fc8b7dec849e..10e0d6a639fe 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -21,8 +20,8 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_COORD_MAX (16383) /*To avoid overflow don't let the max [-32,32k] range */ -#define LV_COORD_MIN (-16384) +#define LV_COORD_MAX (16383) /*To avoid overflow don't let the max [-32,32k] range */ +#define LV_COORD_MIN (-16384) /********************** * TYPEDEFS @@ -165,5 +164,4 @@ bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p); } /* extern "C" */ #endif - #endif diff --git a/src/lv_misc/lv_circ.c b/src/lv_misc/lv_circ.c index d89d833d187f..acb941c37832 100644 --- a/src/lv_misc/lv_circ.c +++ b/src/lv_misc/lv_circ.c @@ -67,10 +67,10 @@ void lv_circ_next(lv_point_t * c, lv_coord_t * tmp) c->y++; if(*tmp <= 0) { - (*tmp) += 2 * c->y + 1; // Change in decision criterion for y -> y+1 + (*tmp) += 2 * c->y + 1; // Change in decision criterion for y -> y+1 } else { c->x--; - (*tmp) += 2 * (c->y - c->x) + 1; // Change for y -> y+1, x -> x-1 + (*tmp) += 2 * (c->y - c->x) + 1; // Change for y -> y+1, x -> x-1 } } diff --git a/src/lv_misc/lv_circ.h b/src/lv_misc/lv_circ.h index f2065f71bdd0..405a4b6c3a86 100644 --- a/src/lv_misc/lv_circ.h +++ b/src/lv_misc/lv_circ.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -75,5 +74,4 @@ void lv_circ_next(lv_point_t * c, lv_coord_t * tmp); } /* extern "C" */ #endif - #endif diff --git a/src/lv_misc/lv_color.c b/src/lv_misc/lv_color.c index 84ae5b660d30..f5bec62bb77d 100644 --- a/src/lv_misc/lv_color.c +++ b/src/lv_misc/lv_color.c @@ -60,7 +60,7 @@ lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) return lv_color_make(v, v, v); } - region = h / 43; + region = h / 43; remainder = (h - (region * 43)) * 6; p = (v * (255 - s)) >> 8; diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index fc2a483d85c4..e611facb109d 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -32,58 +32,57 @@ extern "C" { #error "LV_COLOR_16_SWAP requires LV_COLOR_DEPTH == 16. Set it in lv_conf.h" #endif - #include /********************* * DEFINES *********************/ -#define LV_COLOR_WHITE LV_COLOR_MAKE(0xFF,0xFF,0xFF) -#define LV_COLOR_SILVER LV_COLOR_MAKE(0xC0,0xC0,0xC0) -#define LV_COLOR_GRAY LV_COLOR_MAKE(0x80,0x80,0x80) -#define LV_COLOR_BLACK LV_COLOR_MAKE(0x00,0x00,0x00) -#define LV_COLOR_RED LV_COLOR_MAKE(0xFF,0x00,0x00) -#define LV_COLOR_MAROON LV_COLOR_MAKE(0x80,0x00,0x00) -#define LV_COLOR_YELLOW LV_COLOR_MAKE(0xFF,0xFF,0x00) -#define LV_COLOR_OLIVE LV_COLOR_MAKE(0x80,0x80,0x00) -#define LV_COLOR_LIME LV_COLOR_MAKE(0x00,0xFF,0x00) -#define LV_COLOR_GREEN LV_COLOR_MAKE(0x00,0x80,0x00) -#define LV_COLOR_CYAN LV_COLOR_MAKE(0x00,0xFF,0xFF) -#define LV_COLOR_AQUA LV_COLOR_CYAN -#define LV_COLOR_TEAL LV_COLOR_MAKE(0x00,0x80,0x80) -#define LV_COLOR_BLUE LV_COLOR_MAKE(0x00,0x00,0xFF) -#define LV_COLOR_NAVY LV_COLOR_MAKE(0x00,0x00,0x80) -#define LV_COLOR_MAGENTA LV_COLOR_MAKE(0xFF,0x00,0xFF) -#define LV_COLOR_PURPLE LV_COLOR_MAKE(0x80,0x00,0x80) -#define LV_COLOR_ORANGE LV_COLOR_MAKE(0xFF,0xA5,0x00) +#define LV_COLOR_WHITE LV_COLOR_MAKE(0xFF, 0xFF, 0xFF) +#define LV_COLOR_SILVER LV_COLOR_MAKE(0xC0, 0xC0, 0xC0) +#define LV_COLOR_GRAY LV_COLOR_MAKE(0x80, 0x80, 0x80) +#define LV_COLOR_BLACK LV_COLOR_MAKE(0x00, 0x00, 0x00) +#define LV_COLOR_RED LV_COLOR_MAKE(0xFF, 0x00, 0x00) +#define LV_COLOR_MAROON LV_COLOR_MAKE(0x80, 0x00, 0x00) +#define LV_COLOR_YELLOW LV_COLOR_MAKE(0xFF, 0xFF, 0x00) +#define LV_COLOR_OLIVE LV_COLOR_MAKE(0x80, 0x80, 0x00) +#define LV_COLOR_LIME LV_COLOR_MAKE(0x00, 0xFF, 0x00) +#define LV_COLOR_GREEN LV_COLOR_MAKE(0x00, 0x80, 0x00) +#define LV_COLOR_CYAN LV_COLOR_MAKE(0x00, 0xFF, 0xFF) +#define LV_COLOR_AQUA LV_COLOR_CYAN +#define LV_COLOR_TEAL LV_COLOR_MAKE(0x00, 0x80, 0x80) +#define LV_COLOR_BLUE LV_COLOR_MAKE(0x00, 0x00, 0xFF) +#define LV_COLOR_NAVY LV_COLOR_MAKE(0x00, 0x00, 0x80) +#define LV_COLOR_MAGENTA LV_COLOR_MAKE(0xFF, 0x00, 0xFF) +#define LV_COLOR_PURPLE LV_COLOR_MAKE(0x80, 0x00, 0x80) +#define LV_COLOR_ORANGE LV_COLOR_MAKE(0xFF, 0xA5, 0x00) enum { - LV_OPA_TRANSP = 0, - LV_OPA_0 = 0, - LV_OPA_10 = 25, - LV_OPA_20 = 51, - LV_OPA_30 = 76, - LV_OPA_40 = 102, - LV_OPA_50 = 127, - LV_OPA_60 = 153, - LV_OPA_70 = 178, - LV_OPA_80 = 204, - LV_OPA_90 = 229, - LV_OPA_100 = 255, - LV_OPA_COVER = 255, + LV_OPA_TRANSP = 0, + LV_OPA_0 = 0, + LV_OPA_10 = 25, + LV_OPA_20 = 51, + LV_OPA_30 = 76, + LV_OPA_40 = 102, + LV_OPA_50 = 127, + LV_OPA_60 = 153, + LV_OPA_70 = 178, + LV_OPA_80 = 204, + LV_OPA_90 = 229, + LV_OPA_100 = 255, + LV_OPA_COVER = 255, }; -#define LV_OPA_MIN 16 /*Opacities below this will be transparent*/ -#define LV_OPA_MAX 251 /*Opacities above this will fully cover*/ +#define LV_OPA_MIN 16 /*Opacities below this will be transparent*/ +#define LV_OPA_MAX 251 /*Opacities above this will fully cover*/ #if LV_COLOR_DEPTH == 1 -#define LV_COLOR_SIZE 8 +#define LV_COLOR_SIZE 8 #elif LV_COLOR_DEPTH == 8 -#define LV_COLOR_SIZE 8 +#define LV_COLOR_SIZE 8 #elif LV_COLOR_DEPTH == 16 -#define LV_COLOR_SIZE 16 +#define LV_COLOR_SIZE 16 #elif LV_COLOR_DEPTH == 32 -#define LV_COLOR_SIZE 32 +#define LV_COLOR_SIZE 32 #else #error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!" #endif @@ -94,20 +93,20 @@ enum { typedef union { - uint8_t blue :1; - uint8_t green :1; - uint8_t red :1; - uint8_t full :1; + uint8_t blue : 1; + uint8_t green : 1; + uint8_t red : 1; + uint8_t full : 1; } lv_color1_t; typedef union { struct { - uint8_t blue :2; - uint8_t green :3; - uint8_t red :3; - }ch; + uint8_t blue : 2; + uint8_t green : 3; + uint8_t red : 3; + } ch; uint8_t full; } lv_color8_t; @@ -116,16 +115,16 @@ typedef union struct { #if LV_COLOR_16_SWAP == 0 - uint16_t blue :5; - uint16_t green :6; - uint16_t red :5; + uint16_t blue : 5; + uint16_t green : 6; + uint16_t red : 5; #else - uint16_t green_h :3; - uint16_t red :5; - uint16_t blue :5; - uint16_t green_l :3; + uint16_t green_h : 3; + uint16_t red : 5; + uint16_t blue : 5; + uint16_t green_l : 3; #endif - }ch; + } ch; uint16_t full; } lv_color16_t; @@ -137,7 +136,7 @@ typedef union uint8_t green; uint8_t red; uint8_t alpha; - }ch; + } ch; uint32_t full; } lv_color32_t; @@ -189,32 +188,24 @@ static inline uint8_t lv_color_to1(lv_color_t color) #if LV_COLOR_DEPTH == 1 return color.full; #elif LV_COLOR_DEPTH == 8 - if((color.ch.red & 0x4) || - (color.ch.green & 0x4) || - (color.ch.blue & 0x2)) { + if((color.ch.red & 0x4) || (color.ch.green & 0x4) || (color.ch.blue & 0x2)) { return 1; } else { return 0; } #elif LV_COLOR_DEPTH == 16 -# if LV_COLOR_16_SWAP == 0 - if((color.ch.red & 0x10) || - (color.ch.green & 0x20) || - (color.ch.blue & 0x10)) { +#if LV_COLOR_16_SWAP == 0 + if((color.ch.red & 0x10) || (color.ch.green & 0x20) || (color.ch.blue & 0x10)) { return 1; -# else - if((color.ch.red & 0x10) || - (color.ch.green_h & 0x20) || - (color.ch.blue & 0x10)) { +#else + if((color.ch.red & 0x10) || (color.ch.green_h & 0x20) || (color.ch.blue & 0x10)) { return 1; -# endif +#endif } else { return 0; } #elif LV_COLOR_DEPTH == 32 - if((color.ch.red & 0x80) || - (color.ch.green & 0x80) || - (color.ch.blue & 0x80)) { + if((color.ch.red & 0x80) || (color.ch.green & 0x80) || (color.ch.blue & 0x80)) { return 1; } else { return 0; @@ -225,30 +216,32 @@ static inline uint8_t lv_color_to1(lv_color_t color) static inline uint8_t lv_color_to8(lv_color_t color) { #if LV_COLOR_DEPTH == 1 - if(color.full == 0) return 0; - else return 0xFF; + if(color.full == 0) + return 0; + else + return 0xFF; #elif LV_COLOR_DEPTH == 8 return color.full; #elif LV_COLOR_DEPTH == 16 -# if LV_COLOR_16_SWAP == 0 +#if LV_COLOR_16_SWAP == 0 lv_color8_t ret; - ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ - ret.ch.green = color.ch.green >> 3; /* 6 - 3 = 3*/ - ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ + ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ + ret.ch.green = color.ch.green >> 3; /* 6 - 3 = 3*/ + ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ return ret.full; -# else +#else lv_color8_t ret; - ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ - ret.ch.green = color.ch.green_h; /* 6 - 3 = 3*/ - ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ + ret.ch.red = color.ch.red >> 2; /* 5 - 3 = 2*/ + ret.ch.green = color.ch.green_h; /* 6 - 3 = 3*/ + ret.ch.blue = color.ch.blue >> 3; /* 5 - 2 = 3*/ return ret.full; -# endif +#endif #elif LV_COLOR_DEPTH == 32 lv_color8_t ret; - ret.ch.red = color.ch.red >> 5; /* 8 - 3 = 5*/ - ret.ch.green = color.ch.green >> 5; /* 8 - 3 = 5*/ - ret.ch.blue = color.ch.blue >> 6; /* 8 - 2 = 6*/ + ret.ch.red = color.ch.red >> 5; /* 8 - 3 = 5*/ + ret.ch.green = color.ch.green >> 5; /* 8 - 3 = 5*/ + ret.ch.blue = color.ch.blue >> 6; /* 8 - 2 = 6*/ return ret.full; #endif } @@ -256,36 +249,38 @@ static inline uint8_t lv_color_to8(lv_color_t color) static inline uint16_t lv_color_to16(lv_color_t color) { #if LV_COLOR_DEPTH == 1 - if(color.full == 0) return 0; - else return 0xFFFF; + if(color.full == 0) + return 0; + else + return 0xFFFF; #elif LV_COLOR_DEPTH == 8 lv_color16_t ret; -# if LV_COLOR_16_SWAP == 0 - ret.ch.red = color.ch.red * 4; /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/ - ret.ch.green = color.ch.green * 9; /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/ - ret.ch.blue = color.ch.blue * 10; /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/ -# else - ret.red = color.ch.red * 4; - uint8_t g_tmp = color.ch.green * 9; +#if LV_COLOR_16_SWAP == 0 + ret.ch.red = color.ch.red * 4; /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/ + ret.ch.green = color.ch.green * 9; /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/ + ret.ch.blue = color.ch.blue * 10; /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/ +#else + ret.red = color.ch.red * 4; + uint8_t g_tmp = color.ch.green * 9; ret.ch.green_h = (g_tmp & 0x1F) >> 3; ret.ch.green_l = g_tmp & 0x07; - ret.ch.blue = color.ch.blue * 10; -# endif + ret.ch.blue = color.ch.blue * 10; +#endif return ret.full; #elif LV_COLOR_DEPTH == 16 return color.full; #elif LV_COLOR_DEPTH == 32 lv_color16_t ret; -# if LV_COLOR_16_SWAP == 0 - ret.ch.red = color.ch.red >> 3; /* 8 - 5 = 3*/ - ret.ch.green = color.ch.green >> 2; /* 8 - 6 = 2*/ - ret.ch.blue = color.ch.blue >> 3; /* 8 - 5 = 3*/ -# else - ret.ch.red = color.ch.red >> 3; +#if LV_COLOR_16_SWAP == 0 + ret.ch.red = color.ch.red >> 3; /* 8 - 5 = 3*/ + ret.ch.green = color.ch.green >> 2; /* 8 - 6 = 2*/ + ret.ch.blue = color.ch.blue >> 3; /* 8 - 5 = 3*/ +#else + ret.ch.red = color.ch.red >> 3; ret.ch.green_h = (color.ch.green & 0xE0) >> 5; ret.ch.green_l = (color.ch.green & 0x1C) >> 2; - ret.ch.blue = color.ch.blue >> 3; -# endif + ret.ch.blue = color.ch.blue >> 3; +#endif return ret.full; #endif } @@ -293,31 +288,34 @@ static inline uint16_t lv_color_to16(lv_color_t color) static inline uint32_t lv_color_to32(lv_color_t color) { #if LV_COLOR_DEPTH == 1 - if(color.full == 0) return 0; - else return 0xFFFFFFFF; + if(color.full == 0) + return 0; + else + return 0xFFFFFFFF; #elif LV_COLOR_DEPTH == 8 lv_color32_t ret; - ret.ch.red = color.ch.red * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ - ret.ch.green = color.ch.green * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ - ret.ch.blue = color.ch.blue * 85; /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/ + ret.ch.red = color.ch.red * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ + ret.ch.green = color.ch.green * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/ + ret.ch.blue = color.ch.blue * 85; /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/ ret.ch.alpha = 0xFF; return ret.full; #elif LV_COLOR_DEPTH == 16 -# if LV_COLOR_16_SWAP == 0 +#if LV_COLOR_16_SWAP == 0 lv_color32_t ret; - ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.ch.green = color.ch.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ - ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.green = color.ch.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ + ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ ret.ch.alpha = 0xFF; return ret.full; -# else +#else lv_color32_t ret; - ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.ch.green = ((color.ch.green_h << 3) + color.ch.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ - ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.green = + ((color.ch.green_h << 3) + color.ch.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ + ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ ret.ch.alpha = 0xFF; return ret.full; -# endif +#endif #elif LV_COLOR_DEPTH == 32 return color.full; #endif @@ -328,21 +326,21 @@ static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) lv_color_t ret; #if LV_COLOR_DEPTH != 1 /*LV_COLOR_DEPTH == 8, 16 or 32*/ - ret.ch.red = (uint16_t)((uint16_t) c1.ch.red * mix + (c2.ch.red * (255 - mix))) >> 8; -# if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP + ret.ch.red = (uint16_t)((uint16_t)c1.ch.red * mix + (c2.ch.red * (255 - mix))) >> 8; +#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP /*If swapped Green is in 2 parts*/ - uint16_t g_1 = (c1.ch.green_h << 3) + c1.ch.green_l; - uint16_t g_2 = (c2.ch.green_h << 3) + c2.ch.green_l; - uint16_t g_out = (uint16_t)((uint16_t) g_1 * mix + (g_2 * (255 - mix))) >> 8; + uint16_t g_1 = (c1.ch.green_h << 3) + c1.ch.green_l; + uint16_t g_2 = (c2.ch.green_h << 3) + c2.ch.green_l; + uint16_t g_out = (uint16_t)((uint16_t)g_1 * mix + (g_2 * (255 - mix))) >> 8; ret.ch.green_h = g_out >> 3; ret.ch.green_l = g_out & 0x7; -# else - ret.ch.green = (uint16_t)((uint16_t) c1.ch.green * mix + (c2.ch.green * (255 - mix))) >> 8; -# endif - ret.ch.blue = (uint16_t)((uint16_t) c1.ch.blue * mix + (c2.ch.blue * (255 - mix))) >> 8; -# if LV_COLOR_DEPTH == 32 +#else + ret.ch.green = (uint16_t)((uint16_t)c1.ch.green * mix + (c2.ch.green * (255 - mix))) >> 8; +#endif + ret.ch.blue = (uint16_t)((uint16_t)c1.ch.blue * mix + (c2.ch.blue * (255 - mix))) >> 8; +#if LV_COLOR_DEPTH == 32 ret.ch.alpha = 0xFF; -# endif +#endif #else /*LV_COLOR_DEPTH == 1*/ ret.full = mix > LV_OPA_50 ? c1.full : c2.full; @@ -359,52 +357,57 @@ static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) static inline uint8_t lv_color_brightness(lv_color_t color) { lv_color32_t c32; - c32.full = lv_color_to32(color); + c32.full = lv_color_to32(color); uint16_t bright = 3 * c32.ch.red + c32.ch.blue + 4 * c32.ch.green; - return (uint16_t) bright >> 3; + return (uint16_t)bright >> 3; } /* The most simple macro to create a color from R,G and B values */ #if LV_COLOR_DEPTH == 1 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)}) -static inline lv_color_t lv_color_make(int r8, int g8, int b8){ +static inline lv_color_t lv_color_make(int r8, int g8, int b8) +{ lv_color_t color; color.full = (b8 >> 7 | g8 >> 7 | r8 >> 7); return color; } #elif LV_COLOR_DEPTH == 8 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 6, g8 >> 5, r8 >> 5}}) -static inline lv_color_t lv_color_make(uint8_t r8, int g8, int b8){ +static inline lv_color_t lv_color_make(uint8_t r8, int g8, int b8) +{ lv_color_t color; - color.ch.blue = b8 >> 6; + color.ch.blue = b8 >> 6; color.ch.green = g8 >> 5; - color.ch.red = r8 >> 5; + color.ch.red = r8 >> 5; return color; } #elif LV_COLOR_DEPTH == 16 -# if LV_COLOR_16_SWAP == 0 -# define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 3, g8 >> 2, r8 >> 3}}) -static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ +#if LV_COLOR_16_SWAP == 0 +#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 3, g8 >> 2, r8 >> 3}}) +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8) +{ lv_color_t color; color.ch.blue = (uint16_t)(b8 >> 3); color.ch.green = (uint16_t)(g8 >> 2); color.ch.red = (uint16_t)(r8 >> 3); return color; } -# else -# define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}}) -static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ +#else +#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}}) +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8) +{ lv_color_t color; - color.ch.green_h = (uint16_t)(g8 >> 5); - color.ch.red = (uint16_t)(r8 >> 3); - color.ch.blue = (uint16_t)(b8 >> 3); - color.ch.green_l = (uint16_t)((g8 >> 2) & 0x7); + color.ch.green_h = (uint16_t)(g8 >> 5); + color.ch.red = (uint16_t)(r8 >> 3); + color.ch.blue = (uint16_t)(b8 >> 3); + color.ch.green_l = (uint16_t)((g8 >> 2) & 0x7); return color; } -# endif +#endif #elif LV_COLOR_DEPTH == 32 -#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/ -static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ +#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/ +static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8) +{ lv_color_t color; color.ch.blue = b8; color.ch.green = g8; @@ -414,16 +417,17 @@ static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8){ } #endif -static inline lv_color_t lv_color_hex(uint32_t c) { - return lv_color_make((uint8_t) ((c >> 16) & 0xFF), - (uint8_t) ((c >> 8) & 0xFF), - (uint8_t) (c & 0xFF)); +static inline lv_color_t lv_color_hex(uint32_t c) +{ + return lv_color_make((uint8_t)((c >> 16) & 0xFF), (uint8_t)((c >> 8) & 0xFF), + (uint8_t)(c & 0xFF)); } -static inline lv_color_t lv_color_hex3(uint32_t c) { - return lv_color_make((uint8_t) (((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), - (uint8_t) ((c & 0xF0) | ((c & 0xF0) >> 4)), - (uint8_t) ((c & 0xF) | ((c & 0xF) << 4))); +static inline lv_color_t lv_color_hex3(uint32_t c) +{ + return lv_color_make((uint8_t)(((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), + (uint8_t)((c & 0xF0) | ((c & 0xF0) >> 4)), + (uint8_t)((c & 0xF) | ((c & 0xF) << 4))); } /** @@ -444,7 +448,6 @@ lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v); */ lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r, uint8_t g, uint8_t b); - /********************** * MACROS **********************/ diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index ed5550a7a203..df89aea99565 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -23,7 +23,7 @@ * STATIC PROTOTYPES **********************/ -static int32_t lv_font_codeCompare (const void* pRef, const void* pElement); +static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** * STATIC VARIABLES @@ -63,7 +63,6 @@ void lv_font_add(lv_font_t * child, lv_font_t * parent) } parent->next_page = child; - } /** @@ -83,7 +82,6 @@ void lv_font_remove(lv_font_t * child, lv_font_t * parent) parent->next_page = child->next_page; } - /** * Tells if font which contains `letter` is monospace or not * @param font_p point to font @@ -150,7 +148,6 @@ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter) } return 0; - } /** @@ -190,11 +187,11 @@ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter) } return 0; - } /** - * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in the range + * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in + * the range * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found @@ -209,7 +206,8 @@ const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t u } /** - * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse) + * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters + * in the range (sparse) * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found @@ -219,16 +217,13 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - uint32_t* pUnicode; + uint32_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, + sizeof(uint32_t), lv_font_codeCompare); - if (pUnicode != NULL) { - uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); + if(pUnicode != NULL) { + uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); return &font->glyph_bitmap[font->glyph_dsc[idx].glyph_index]; } @@ -236,7 +231,8 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico } /** - * Generic glyph width get function used in 'font->get_width' when the font contains all characters in the range + * Generic glyph width get function used in 'font->get_width' when the font contains all characters + * in the range * @param font pointer to font * @param unicode_letter an unicode letter which width should be get * @return width of the gylph or -1 if not found @@ -253,7 +249,8 @@ int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_le } /** - * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse) + * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all + * characters in the range (sparse) * @param font pointer to font * @param unicode_letter an unicode letter which width should be get * @return width of the glyph or -1 if not found @@ -263,16 +260,13 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return -1; - uint32_t* pUnicode; + uint32_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, - (uint32_t*) font->unicode_list, - font->glyph_cnt, - sizeof(uint32_t), - lv_font_codeCompare); + pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, + sizeof(uint32_t), lv_font_codeCompare); - if (pUnicode != NULL) { - uint32_t idx = (uint32_t) (pUnicode - font->unicode_list); + if(pUnicode != NULL) { + uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); return font->glyph_dsc[idx].w_px; } @@ -296,8 +290,7 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter * @retval > 0 Reference is less than element. * */ -static int32_t lv_font_codeCompare (const void* pRef, - const void* pElement) +static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) { - return (*(uint32_t*) pRef) - (*(uint32_t*) pElement); + return (*(uint32_t *)pRef) - (*(uint32_t *)pElement); } diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index b09674b337ab..ec7b5ba1b068 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -36,14 +35,14 @@ extern "C" { typedef struct { - uint32_t w_px :8; - uint32_t glyph_index :24; + uint32_t w_px : 8; + uint32_t glyph_index : 24; } lv_font_glyph_dsc_t; typedef struct { - uint32_t unicode :21; - uint32_t glyph_dsc_index :11; + uint32_t unicode : 21; + uint32_t glyph_dsc_index : 11; } lv_font_unicode_map_t; typedef struct _lv_font_struct @@ -53,13 +52,15 @@ typedef struct _lv_font_struct const uint8_t * glyph_bitmap; const lv_font_glyph_dsc_t * glyph_dsc; const uint32_t * unicode_list; - const uint8_t * (*get_bitmap)(const struct _lv_font_struct *,uint32_t); /*Get a glyph's bitmap from a font*/ - int16_t (*get_width)(const struct _lv_font_struct *,uint32_t); /*Get a glyph's with with a given font*/ - struct _lv_font_struct * next_page; /*Pointer to a font extension*/ - uint32_t h_px :8; - uint32_t bpp :4; /*Bit per pixel: 1, 2 or 4*/ - uint32_t monospace :8; /*Fix width (0: normal width)*/ - uint16_t glyph_cnt; /*Number of glyphs (letters) in the font*/ + const uint8_t * (*get_bitmap)(const struct _lv_font_struct *, + uint32_t); /*Get a glyph's bitmap from a font*/ + int16_t (*get_width)(const struct _lv_font_struct *, + uint32_t); /*Get a glyph's with with a given font*/ + struct _lv_font_struct * next_page; /*Pointer to a font extension*/ + uint32_t h_px : 8; + uint32_t bpp : 4; /*Bit per pixel: 1, 2 or 4*/ + uint32_t monospace : 8; /*Fix width (0: normal width)*/ + uint16_t glyph_cnt; /*Number of glyphs (letters) in the font*/ } lv_font_t; /********************** @@ -76,7 +77,7 @@ void lv_font_init(void); * @param child the font to add * @param parent this font will be extended. Using it later will contain the characters from `child` */ -void lv_font_add(lv_font_t *child, lv_font_t *parent); +void lv_font_add(lv_font_t * child, lv_font_t * parent); /** * Remove a font from a character set. @@ -109,7 +110,6 @@ const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter); */ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter); - /** * Get the width of the letter without overwriting it with the `monospace` attribute * @param font_p pointer to a font @@ -137,7 +137,8 @@ static inline uint8_t lv_font_get_height(const lv_font_t * font_p) uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter); /** - * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in the range + * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in + * the range * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found @@ -145,14 +146,16 @@ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter); const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t unicode_letter); /** - * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse) + * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters + * in the range (sparse) * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unicode_letter); /** - * Generic glyph width get function used in 'font->get_width' when the font contains all characters in the range + * Generic glyph width get function used in 'font->get_width' when the font contains all characters + * in the range * @param font pointer to font * @param unicode_letter an unicode letter which width should be get * @return width of the gylph or -1 if not found @@ -160,7 +163,8 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_letter); /** - * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse) + * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all + * characters in the range (sparse) * @param font pointer to font * @param unicode_letter an unicode letter which width should be get * @return width of the glyph or -1 if not found @@ -173,7 +177,6 @@ int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; - /********************** * ADD BUILT IN FONTS **********************/ @@ -189,4 +192,3 @@ LV_FONT_CUSTOM_DECLARE #endif #endif /*USE_FONT*/ - diff --git a/src/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c index 9b5c2f267fc4..252f59a440d7 100644 --- a/src/lv_misc/lv_fs.c +++ b/src/lv_misc/lv_fs.c @@ -14,7 +14,7 @@ #include "lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* @@ -39,7 +39,6 @@ static const char * lv_fs_get_real_path(const char * path); static lv_fs_drv_t * lv_fs_get_drv(char letter); - /********************** * STATIC VARIABLES **********************/ @@ -61,7 +60,8 @@ void lv_fs_init(void) } /** - * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be returned. + * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be + * returned. * @param letter letter of the drive * @return true: drive is ready; false: drive is not ready */ @@ -69,9 +69,9 @@ bool lv_fs_is_ready(char letter) { lv_fs_drv_t * drv = lv_fs_get_drv(letter); - if(drv == NULL) return false; /*An unknown driver in not ready*/ + if(drv == NULL) return false; /*An unknown driver in not ready*/ - if(drv->ready == NULL) return true; /*Assume the driver is always ready if no handler provided*/ + if(drv->ready == NULL) return true; /*Assume the driver is always ready if no handler provided*/ return drv->ready(); } @@ -85,7 +85,7 @@ bool lv_fs_is_ready(char letter) */ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode) { - file_p->drv = NULL; + file_p->drv = NULL; file_p->file_d = NULL; if(path == NULL) return LV_FS_RES_INV_PARAM; @@ -101,7 +101,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo if(file_p->drv->ready != NULL) { if(file_p->drv->ready() == false) { - file_p->drv = NULL; + file_p->drv = NULL; file_p->file_d = NULL; return LV_FS_RES_HW_ERR; } @@ -111,7 +111,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo lv_mem_assert(file_p->file_d); if(file_p->file_d == NULL) { file_p->drv = NULL; - return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ + return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ } if(file_p->drv->open == NULL) { @@ -119,12 +119,12 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = file_p->drv->open(file_p->file_d, real_path, mode); + lv_fs_res_t res = file_p->drv->open(file_p->file_d, real_path, mode); if(res != LV_FS_RES_OK) { lv_mem_free(file_p->file_d); file_p->file_d = NULL; - file_p->drv = NULL; + file_p->drv = NULL; } return res; @@ -147,9 +147,9 @@ lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p) lv_fs_res_t res = file_p->drv->close(file_p->file_d); - lv_mem_free(file_p->file_d); /*Clean up*/ + lv_mem_free(file_p->file_d); /*Clean up*/ file_p->file_d = NULL; - file_p->drv = NULL; + file_p->drv = NULL; file_p->file_d = NULL; return res; @@ -176,7 +176,7 @@ lv_fs_res_t lv_fs_remove(const char * path) if(drv->remove == NULL) return LV_FS_RES_NOT_IMP; const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = drv->remove(real_path); + lv_fs_res_t res = drv->remove(real_path); return res; } @@ -224,7 +224,7 @@ lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, u uint32_t bw_tmp = 0; lv_fs_res_t res = file_p->drv->write(file_p->file_d, buf, btw, &bw_tmp); - if(bw != NULL) *bw = bw_tmp; + if(bw != NULL) *bw = bw_tmp; return res; } @@ -256,7 +256,7 @@ lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos) * @param pos_p pointer to store the position of the read write pointer * @return LV_FS_RES_OK or any error from 'fs_res_t' */ -lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) +lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) { if(file_p->drv == NULL) { pos = 0; @@ -307,7 +307,6 @@ lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size) if(file_p->drv->size == NULL) return LV_FS_RES_NOT_IMP; - if(size == NULL) return LV_FS_RES_INV_PARAM; lv_fs_res_t res = file_p->drv->size(file_p->file_d, size); @@ -343,12 +342,11 @@ lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname) const char * old_real = lv_fs_get_real_path(oldname); const char * new_real = lv_fs_get_real_path(newname); - lv_fs_res_t res = drv->rename(old_real, new_real); + lv_fs_res_t res = drv->rename(old_real, new_real); return res; } - /** * Initialize a 'fs_read_dir_t' variable for directory reading * @param rddir_p pointer to a 'fs_read_dir_t' variable @@ -372,7 +370,7 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path) lv_mem_assert(rddir_p->dir_d); if(rddir_p->dir_d == NULL) { rddir_p->dir_d = NULL; - return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ + return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ } if(rddir_p->drv->dir_open == NULL) { @@ -380,7 +378,7 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path) } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = rddir_p->drv->dir_open(rddir_p->dir_d, real_path); + lv_fs_res_t res = rddir_p->drv->dir_open(rddir_p->dir_d, real_path); return res; } @@ -422,14 +420,14 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p) lv_fs_res_t res; if(rddir_p->drv->dir_close == NULL) { - res = LV_FS_RES_NOT_IMP; + res = LV_FS_RES_NOT_IMP; } else { res = rddir_p->drv->dir_close(rddir_p->dir_d); } - lv_mem_free(rddir_p->dir_d); /*Clean up*/ + lv_mem_free(rddir_p->dir_d); /*Clean up*/ rddir_p->dir_d = NULL; - rddir_p->drv = NULL; + rddir_p->drv = NULL; rddir_p->dir_d = NULL; return res; @@ -453,11 +451,11 @@ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) lv_fs_res_t res; if(drv->free_space == NULL) { - res = LV_FS_RES_NOT_IMP; + res = LV_FS_RES_NOT_IMP; } else { uint32_t total_tmp = 0; - uint32_t free_tmp = 0; - res = drv->free_space(&total_tmp, &free_tmp); + uint32_t free_tmp = 0; + res = drv->free_space(&total_tmp, &free_tmp); if(total_p != NULL) *total_p = total_tmp; if(free_p != NULL) *free_p = free_tmp; @@ -475,7 +473,7 @@ void lv_fs_add_drv(lv_fs_drv_t * drv_p) { /*Save the new driver*/ lv_fs_drv_t * new_drv; - new_drv = lv_ll_ins_head(&LV_GC_ROOT(_lv_drv_ll)); + new_drv = lv_ll_ins_head(&LV_GC_ROOT(_lv_drv_ll)); lv_mem_assert(new_drv); if(new_drv == NULL) return; @@ -487,12 +485,13 @@ void lv_fs_add_drv(lv_fs_drv_t * drv_p) * @param buf buffer to store the letters ('\0' added after the last letter) * @return the buffer */ -char * lv_fs_get_letters(char * buf) +char * lv_fs_get_letters(char * buf) { lv_fs_drv_t * drv; uint8_t i = 0; - LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) + { buf[i] = drv->letter; i++; } @@ -502,7 +501,6 @@ char * lv_fs_get_letters(char * buf) return buf; } - /** * Return with the extension of the filename * @param fn string with a filename @@ -511,11 +509,11 @@ char * lv_fs_get_letters(char * buf) const char * lv_fs_get_ext(const char * fn) { uint16_t i; - for(i = strlen(fn); i > 0; i --) { + for(i = strlen(fn); i > 0; i--) { if(fn[i] == '.') { return &fn[i + 1]; } else if(fn[i] == '/' || fn[i] == '\\') { - return ""; /*No extension if a '\' or '/' found*/ + return ""; /*No extension if a '\' or '/' found*/ } } @@ -532,17 +530,19 @@ char * lv_fs_up(char * path) uint16_t len = strlen(path); if(len == 0) return path; - len --; /*Go before the trailing '\0'*/ + len--; /*Go before the trailing '\0'*/ /*Ignore trailing '/' or '\'*/ while(path[len] == '/' || path[len] == '\\') { path[len] = '\0'; - if(len > 0) len --; - else return path; + if(len > 0) + len--; + else + return path; } uint16_t i; - for(i = len; i > 0; i --) { + for(i = len; i > 0; i--) { if(path[i] == '/' || path[i] == '\\') break; } @@ -561,16 +561,18 @@ const char * lv_fs_get_last(const char * path) uint16_t len = strlen(path); if(len == 0) return path; - len --; /*Go before the trailing '\0'*/ + len--; /*Go before the trailing '\0'*/ /*Ignore trailing '/' or '\'*/ while(path[len] == '/' || path[len] == '\\') { - if(len > 0) len --; - else return path; + if(len > 0) + len--; + else + return path; } uint16_t i; - for(i = len; i > 0; i --) { + for(i = len; i > 0; i--) { if(path[i] == '/' || path[i] == '\\') break; } @@ -593,11 +595,11 @@ static const char * lv_fs_get_real_path(const char * path) /* Example path: "S:/folder/file.txt" * Leave the letter and the : / \ characters*/ - path ++; /*Ignore the driver letter*/ + path++; /*Ignore the driver letter*/ while(*path != '\0') { if(*path == ':' || *path == '\\' || *path == '/') { - path ++; + path++; } else { break; } @@ -615,7 +617,8 @@ static lv_fs_drv_t * lv_fs_get_drv(char letter) { lv_fs_drv_t * drv; - LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) { + LV_LL_READ(LV_GC_ROOT(_lv_drv_ll), drv) + { if(drv->letter == letter) { return drv; } diff --git a/src/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h index 3559d35ce9f5..8fa7ada685c4 100644 --- a/src/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -28,26 +28,25 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_FS_MAX_FN_LENGTH 64 +#define LV_FS_MAX_FN_LENGTH 64 /********************** * TYPEDEFS **********************/ -enum -{ +enum { LV_FS_RES_OK = 0, - LV_FS_RES_HW_ERR, /*Low level hardware error*/ - LV_FS_RES_FS_ERR, /*Error in the file system structure */ - LV_FS_RES_NOT_EX, /*Driver, file or directory is not exists*/ - LV_FS_RES_FULL, /*Disk full*/ - LV_FS_RES_LOCKED, /*The file is already opened*/ - LV_FS_RES_DENIED, /*Access denied. Check 'fs_open' modes and write protect*/ - LV_FS_RES_BUSY, /*The file system now can't handle it, try later*/ - LV_FS_RES_TOUT, /*Process time outed*/ - LV_FS_RES_NOT_IMP, /*Requested function is not implemented*/ - LV_FS_RES_OUT_OF_MEM, /*Not enough memory for an internal operation*/ - LV_FS_RES_INV_PARAM, /*Invalid parameter among arguments*/ - LV_FS_RES_UNKNOWN, /*Other unknown error*/ + LV_FS_RES_HW_ERR, /*Low level hardware error*/ + LV_FS_RES_FS_ERR, /*Error in the file system structure */ + LV_FS_RES_NOT_EX, /*Driver, file or directory is not exists*/ + LV_FS_RES_FULL, /*Disk full*/ + LV_FS_RES_LOCKED, /*The file is already opened*/ + LV_FS_RES_DENIED, /*Access denied. Check 'fs_open' modes and write protect*/ + LV_FS_RES_BUSY, /*The file system now can't handle it, try later*/ + LV_FS_RES_TOUT, /*Process time outed*/ + LV_FS_RES_NOT_IMP, /*Requested function is not implemented*/ + LV_FS_RES_OUT_OF_MEM, /*Not enough memory for an internal operation*/ + LV_FS_RES_INV_PARAM, /*Invalid parameter among arguments*/ + LV_FS_RES_UNKNOWN, /*Other unknown error*/ }; typedef uint8_t lv_fs_res_t; @@ -56,18 +55,16 @@ struct __lv_fs_drv_t; typedef struct { void * file_d; - struct __lv_fs_drv_t* drv; + struct __lv_fs_drv_t * drv; } lv_fs_file_t; - typedef struct { void * dir_d; struct __lv_fs_drv_t * drv; } lv_fs_dir_t; -enum -{ +enum { LV_FS_MODE_WR = 0x01, LV_FS_MODE_RD = 0x02, }; @@ -78,23 +75,23 @@ typedef struct __lv_fs_drv_t char letter; uint16_t file_size; uint16_t rddir_size; - bool (*ready) (void); - - lv_fs_res_t (*open) (void * file_p, const char * path, lv_fs_mode_t mode); - lv_fs_res_t (*close) (void * file_p); - lv_fs_res_t (*remove) (const char * fn); - lv_fs_res_t (*read) (void * file_p, void * buf, uint32_t btr, uint32_t * br); - lv_fs_res_t (*write) (void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - lv_fs_res_t (*seek) (void * file_p, uint32_t pos); - lv_fs_res_t (*tell) (void * file_p, uint32_t * pos_p); - lv_fs_res_t (*trunc) (void * file_p); - lv_fs_res_t (*size) (void * file_p, uint32_t * size_p); - lv_fs_res_t (*rename) (const char * oldname, const char * newname); - lv_fs_res_t (*free_space) (uint32_t * total_p, uint32_t * free_p); - - lv_fs_res_t (*dir_open) (void * rddir_p, const char * path); - lv_fs_res_t (*dir_read) (void * rddir_p, char * fn); - lv_fs_res_t (*dir_close) (void * rddir_p); + bool (*ready)(void); + + lv_fs_res_t (*open)(void * file_p, const char * path, lv_fs_mode_t mode); + lv_fs_res_t (*close)(void * file_p); + lv_fs_res_t (*remove)(const char * fn); + lv_fs_res_t (*read)(void * file_p, void * buf, uint32_t btr, uint32_t * br); + lv_fs_res_t (*write)(void * file_p, const void * buf, uint32_t btw, uint32_t * bw); + lv_fs_res_t (*seek)(void * file_p, uint32_t pos); + lv_fs_res_t (*tell)(void * file_p, uint32_t * pos_p); + lv_fs_res_t (*trunc)(void * file_p); + lv_fs_res_t (*size)(void * file_p, uint32_t * size_p); + lv_fs_res_t (*rename)(const char * oldname, const char * newname); + lv_fs_res_t (*free_space)(uint32_t * total_p, uint32_t * free_p); + + lv_fs_res_t (*dir_open)(void * rddir_p, const char * path); + lv_fs_res_t (*dir_read)(void * rddir_p, char * fn); + lv_fs_res_t (*dir_close)(void * rddir_p); } lv_fs_drv_t; /********************** @@ -114,7 +111,8 @@ void lv_fs_init(void); void lv_fs_add_drv(lv_fs_drv_t * drv_p); /** - * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be returned. + * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be + * returned. * @param letter letter of the drive * @return true: drive is ready; false: drive is not ready */ @@ -127,21 +125,21 @@ bool lv_fs_is_ready(char letter); * @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_open (lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode); +lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode); /** * Close an already opened file * @param file_p pointer to a lv_fs_file_t variable * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_close (lv_fs_file_t * file_p); +lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p); /** * Delete a file * @param path path of the file to delete * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_remove (const char * path); +lv_fs_res_t lv_fs_remove(const char * path); /** * Read from a file @@ -151,7 +149,7 @@ lv_fs_res_t lv_fs_remove (const char * path); * @param br the number of real read bytes (Bytes Read). NULL if unused. * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_read (lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br); +lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br); /** * Write into a file @@ -161,7 +159,7 @@ lv_fs_res_t lv_fs_read (lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_ * @param br the number of real written bytes (Bytes Written). NULL if unused. * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_write (lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw); +lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw); /** * Set the position of the 'cursor' (read write pointer) in a file @@ -169,7 +167,7 @@ lv_fs_res_t lv_fs_write (lv_fs_file_t * file_p, const void * buf, uint32_t btw, * @param pos the new position expressed in bytes index (0: start of file) * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_seek (lv_fs_file_t * file_p, uint32_t pos); +lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos); /** * Give the position of the read write pointer @@ -177,7 +175,7 @@ lv_fs_res_t lv_fs_seek (lv_fs_file_t * file_p, uint32_t pos); * @param pos_p pointer to store the position of the read write pointer * @return LV_FS_RES_OK or any error from 'fs_res_t' */ -lv_fs_res_t lv_fs_tell (lv_fs_file_t * file_p, uint32_t * pos); +lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos); /** * Truncate the file size to the current position of the read write pointer @@ -185,7 +183,7 @@ lv_fs_res_t lv_fs_tell (lv_fs_file_t * file_p, uint32_t * pos); * @return LV_FS_RES_OK: no error, the file is read * any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_trunc (lv_fs_file_t * file_p); +lv_fs_res_t lv_fs_trunc(lv_fs_file_t * file_p); /** * Give the size of a file bytes @@ -193,7 +191,7 @@ lv_fs_res_t lv_fs_trunc (lv_fs_file_t * file_p); * @param size pointer to a variable to store the size * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_size (lv_fs_file_t * file_p, uint32_t * size); +lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size); /** * Rename a file @@ -201,7 +199,7 @@ lv_fs_res_t lv_fs_size (lv_fs_file_t * file_p, uint32_t * size); * @param newname path with the new name * @return LV_FS_RES_OK or any error from 'fs_res_t' */ -lv_fs_res_t lv_fs_rename (const char * oldname, const char * newname); +lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname); /** * Initialize a 'fs_dir_t' variable for directory reading @@ -218,14 +216,14 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path); * @param fn pointer to a buffer to store the filename * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_dir_read (lv_fs_dir_t * rddir_p, char * fn); +lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn); /** * Close the directory reading * @param rddir_p pointer to an initialized 'fs_dir_t' variable * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_dir_close (lv_fs_dir_t * rddir_p); +lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p); /** * Get the free and total size of a driver in kB @@ -234,14 +232,14 @@ lv_fs_res_t lv_fs_dir_close (lv_fs_dir_t * rddir_p); * @param free_p pointer to store the free size [kB] * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ -lv_fs_res_t lv_fs_free_space (char letter, uint32_t * total_p, uint32_t * free_p); +lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p); /** * Fill a buffer with the letters of existing drivers * @param buf buffer to store the letters ('\0' added after the last letter) * @return the buffer */ -char * lv_fs_get_letters(char * buf); +char * lv_fs_get_letters(char * buf); /** * Return with the extension of the filename diff --git a/src/lv_misc/lv_gc.c b/src/lv_misc/lv_gc.c index 71effb63add3..70dfc9a84cce 100644 --- a/src/lv_misc/lv_gc.c +++ b/src/lv_misc/lv_gc.c @@ -24,8 +24,8 @@ /********************** * STATIC VARIABLES **********************/ -#if (!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0 -LV_ROOTS +#if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0 +LV_ROOTS #endif /* LV_ENABLE_GC */ /********************** * MACROS diff --git a/src/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h index c6c89e1ef68f..97aeb6b7963c 100644 --- a/src/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -29,30 +29,28 @@ extern "C" { * DEFINES *********************/ -#define LV_GC_ROOTS(prefix) \ - prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \ - prefix lv_ll_t _lv_disp_ll; /*Linked list of screens*/ \ - prefix lv_ll_t _lv_indev_ll; /*Linked list of screens*/ \ - prefix lv_ll_t _lv_drv_ll;\ - prefix lv_ll_t _lv_file_ll;\ - prefix lv_ll_t _lv_anim_ll;\ - prefix lv_ll_t _lv_group_ll;\ - prefix void * _lv_task_act;\ - - +#define LV_GC_ROOTS(prefix) \ + prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \ + prefix lv_ll_t _lv_disp_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_indev_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_drv_ll; \ + prefix lv_ll_t _lv_file_ll; \ + prefix lv_ll_t _lv_anim_ll; \ + prefix lv_ll_t _lv_group_ll; \ + prefix void * _lv_task_act; + #define LV_NO_PREFIX #define LV_ROOTS LV_GC_ROOTS(LV_NO_PREFIX) #if LV_ENABLE_GC == 1 -# if LV_MEM_CUSTOM != 1 -# error "GC requires CUSTOM_MEM" -# endif /* LV_MEM_CUSTOM */ -#else /* LV_ENABLE_GC */ -# define LV_GC_ROOT(x) x - LV_GC_ROOTS(extern) +#if LV_MEM_CUSTOM != 1 +#error "GC requires CUSTOM_MEM" +#endif /* LV_MEM_CUSTOM */ +#else /* LV_ENABLE_GC */ +#define LV_GC_ROOT(x) x +LV_GC_ROOTS(extern) #endif /* LV_ENABLE_GC */ - /********************** * TYPEDEFS **********************/ @@ -65,7 +63,6 @@ extern "C" { * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c index 297b5a5f0038..dd5432b94678 100644 --- a/src/lv_misc/lv_ll.c +++ b/src/lv_misc/lv_ll.c @@ -16,9 +16,9 @@ /********************* * DEFINES *********************/ -#define LL_NODE_META_SIZE (sizeof(lv_ll_node_t*) + sizeof(lv_ll_node_t*)) +#define LL_NODE_META_SIZE (sizeof(lv_ll_node_t *) + sizeof(lv_ll_node_t *)) #define LL_PREV_P_OFFSET(ll_p) (ll_p->n_size) -#define LL_NEXT_P_OFFSET(ll_p) (ll_p->n_size + sizeof(lv_ll_node_t*)) +#define LL_NEXT_P_OFFSET(ll_p) (ll_p->n_size + sizeof(lv_ll_node_t *)) /********************** * TYPEDEFS @@ -80,15 +80,15 @@ void * lv_ll_ins_head(lv_ll_t * ll_p) n_new = lv_mem_alloc(ll_p->n_size + LL_NODE_META_SIZE); if(n_new != NULL) { - node_set_prev(ll_p, n_new, NULL); /*No prev. before the new head*/ - node_set_next(ll_p, n_new, ll_p->head); /*After new comes the old head*/ + node_set_prev(ll_p, n_new, NULL); /*No prev. before the new head*/ + node_set_next(ll_p, n_new, ll_p->head); /*After new comes the old head*/ if(ll_p->head != NULL) { /*If there is old head then before it goes the new*/ node_set_prev(ll_p, ll_p->head, n_new); } - ll_p->head = n_new; /*Set the new head in the dsc.*/ - if(ll_p->tail == NULL) {/*If there is no tail (1. node) set the tail too*/ + ll_p->head = n_new; /*Set the new head in the dsc.*/ + if(ll_p->tail == NULL) { /*If there is no tail (1. node) set the tail too*/ ll_p->tail = n_new; } } @@ -139,9 +139,9 @@ void * lv_ll_ins_tail(lv_ll_t * ll_p) if(n_new == NULL) return NULL; if(n_new != NULL) { - node_set_next(ll_p, n_new, NULL); /*No next after the new tail*/ + node_set_next(ll_p, n_new, NULL); /*No next after the new tail*/ node_set_prev(ll_p, n_new, ll_p->tail); /*The prev. before new is tho old tail*/ - if(ll_p->tail != NULL) { /*If there is old tail then the new comes after it*/ + if(ll_p->tail != NULL) { /*If there is old tail then the new comes after it*/ node_set_next(ll_p, ll_p->tail, n_new); } @@ -154,14 +154,13 @@ void * lv_ll_ins_tail(lv_ll_t * ll_p) return n_new; } - /** * Remove the node 'node_p' from 'll_p' linked list. * It does not free the the memory of node. * @param ll_p pointer to the linked list of 'node_p' * @param node_p pointer to node in 'll_p' linked list */ -void lv_ll_rem(lv_ll_t * ll_p, void * node_p) +void lv_ll_rem(lv_ll_t * ll_p, void * node_p) { if(lv_ll_get_head(ll_p) == node_p) { /*The new head will be the node after 'n_act'*/ @@ -197,7 +196,7 @@ void lv_ll_clear(lv_ll_t * ll_p) void * i; void * i_next; - i = lv_ll_get_head(ll_p); + i = lv_ll_get_head(ll_p); i_next = NULL; while(i != NULL) { @@ -228,8 +227,8 @@ void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node) node_set_prev(ll_new_p, ll_new_p->head, node); } - ll_new_p->head = node; /*Set the new head in the dsc.*/ - if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/ + ll_new_p->head = node; /*Set the new head in the dsc.*/ + if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/ ll_new_p->tail = node; } } @@ -243,7 +242,7 @@ void * lv_ll_get_head(const lv_ll_t * ll_p) { void * head = NULL; - if(ll_p != NULL) { + if(ll_p != NULL) { head = ll_p->head; } @@ -259,7 +258,7 @@ void * lv_ll_get_tail(const lv_ll_t * ll_p) { void * tail = NULL; - if(ll_p != NULL) { + if(ll_p != NULL) { tail = ll_p->tail; } @@ -272,11 +271,11 @@ void * lv_ll_get_tail(const lv_ll_t * ll_p) * @param n_act pointer a node * @return pointer to the next node */ -void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act) +void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act) { void * next = NULL; - if(ll_p != NULL) { + if(ll_p != NULL) { const lv_ll_node_t * n_act_d = n_act; memcpy(&next, n_act_d + LL_NEXT_P_OFFSET(ll_p), sizeof(void *)); } @@ -290,7 +289,7 @@ void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act) * @param n_act pointer a node * @return pointer to the previous node */ -void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act) +void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act) { void * prev = NULL; @@ -318,14 +317,15 @@ void lv_ll_swap(lv_ll_t * ll_p, void * n1_p, void * n2_p) */ void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after) { - if(n_act == n_after) return; /*Can't move before itself*/ - + if(n_act == n_after) return; /*Can't move before itself*/ void * n_before; - if(n_after != NULL) n_before = lv_ll_get_prev(ll_p, n_after); - else n_before = lv_ll_get_tail(ll_p); /*if `n_after` is NULL `n_act` should be the new tail*/ + if(n_after != NULL) + n_before = lv_ll_get_prev(ll_p, n_after); + else + n_before = lv_ll_get_tail(ll_p); /*if `n_after` is NULL `n_act` should be the new tail*/ - if(n_act == n_before) return; /*Already before `n_after`*/ + if(n_act == n_before) return; /*Already before `n_after`*/ /*It's much easier to remove from the list and add again*/ lv_ll_rem(ll_p, n_act); @@ -354,7 +354,6 @@ bool lv_ll_is_empty(lv_ll_t * ll_p) return false; } - /********************** * STATIC FUNCTIONS **********************/ @@ -367,11 +366,13 @@ bool lv_ll_is_empty(lv_ll_t * ll_p) */ static void node_set_prev(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * prev) { - if(act == NULL) return; /*Can't set the prev node of `NULL`*/ + if(act == NULL) return; /*Can't set the prev node of `NULL`*/ uint32_t node_p_size = sizeof(lv_ll_node_t *); - if(prev) memcpy(act + LL_PREV_P_OFFSET(ll_p), &prev, node_p_size); - else memset(act + LL_PREV_P_OFFSET(ll_p), 0, node_p_size); + if(prev) + memcpy(act + LL_PREV_P_OFFSET(ll_p), &prev, node_p_size); + else + memset(act + LL_PREV_P_OFFSET(ll_p), 0, node_p_size); } /** @@ -382,10 +383,11 @@ static void node_set_prev(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * pre */ static void node_set_next(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * next) { - if(act == NULL) return; /*Can't set the next node of `NULL`*/ + if(act == NULL) return; /*Can't set the next node of `NULL`*/ uint32_t node_p_size = sizeof(lv_ll_node_t *); - if(next) memcpy(act + LL_NEXT_P_OFFSET(ll_p), &next, node_p_size); - else memset(act + LL_NEXT_P_OFFSET(ll_p), 0, node_p_size); + if(next) + memcpy(act + LL_NEXT_P_OFFSET(ll_p), &next, node_p_size); + else + memset(act + LL_NEXT_P_OFFSET(ll_p), 0, node_p_size); } - diff --git a/src/lv_misc/lv_ll.h b/src/lv_misc/lv_ll.h index 6fc4827ac86a..bad5383acdd7 100644 --- a/src/lv_misc/lv_ll.h +++ b/src/lv_misc/lv_ll.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -34,8 +33,8 @@ typedef uint8_t lv_ll_node_t; typedef struct { uint32_t n_size; - lv_ll_node_t* head; - lv_ll_node_t* tail; + lv_ll_node_t * head; + lv_ll_node_t * tail; } lv_ll_t; /********************** @@ -77,7 +76,7 @@ void * lv_ll_ins_tail(lv_ll_t * ll_p); * @param ll_p pointer to the linked list of 'node_p' * @param node_p pointer to node in 'll_p' linked list */ -void lv_ll_rem(lv_ll_t * ll_p, void * node_p); +void lv_ll_rem(lv_ll_t * ll_p, void * node_p); /** * Remove and free all elements from a linked list. The list remain valid but become empty. @@ -143,7 +142,8 @@ bool lv_ll_is_empty(lv_ll_t * ll_p); #define LV_LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) -#define LV_LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) +#define LV_LL_READ_BACK(list, i) \ + for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) #ifdef __cplusplus } /* extern "C" */ diff --git a/src/lv_misc/lv_log.c b/src/lv_misc/lv_log.c index 7c9e2c53e74c..67680b855a27 100644 --- a/src/lv_misc/lv_log.c +++ b/src/lv_misc/lv_log.c @@ -27,7 +27,7 @@ /********************** * STATIC VARIABLES **********************/ -static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *); +static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *); /********************** * MACROS @@ -40,9 +40,10 @@ static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *); /** * Register custom print (or anything else) function to call when log is added * @param f a function pointer: - * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)` + * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * + * dsc)` */ -void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)) +void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)) { print_cb = f; } @@ -56,13 +57,13 @@ void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const */ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc) { - if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/ + if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/ if(level >= LV_LOG_LEVEL) { #if LV_LOG_PRINTF static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error"}; - printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line); + printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line); #else if(print_cb) print_cb(level, file, line, dsc); #endif diff --git a/src/lv_misc/lv_log.h b/src/lv_misc/lv_log.h index 9e399e802fd0..26557cae8507 100644 --- a/src/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -26,11 +26,11 @@ extern "C" { /*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/ -#define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/ -#define LV_LOG_LEVEL_INFO 1 /*Log important events*/ -#define LV_LOG_LEVEL_WARN 2 /*Log if something unwanted happened but didn't caused problem*/ -#define LV_LOG_LEVEL_ERROR 3 /*Only critical issue, when the system may fail*/ -#define _LV_LOG_LEVEL_NUM 4 +#define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/ +#define LV_LOG_LEVEL_INFO 1 /*Log important events*/ +#define LV_LOG_LEVEL_WARN 2 /*Log if something unwanted happened but didn't caused problem*/ +#define LV_LOG_LEVEL_ERROR 3 /*Only critical issue, when the system may fail*/ +#define _LV_LOG_LEVEL_NUM 4 typedef int8_t lv_log_level_t; @@ -39,7 +39,6 @@ typedef int8_t lv_log_level_t; * TYPEDEFS **********************/ - /********************** * GLOBAL PROTOTYPES **********************/ @@ -47,9 +46,10 @@ typedef int8_t lv_log_level_t; /** * Register custom print (or anything else) function to call when log is added * @param f a function pointer: - * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)` + * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * + * dsc)` */ -void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)); +void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)); /** * Add a log @@ -64,19 +64,34 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * * MACROS **********************/ -#define LV_LOG_TRACE(dsc) lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, dsc); -#define LV_LOG_INFO(dsc) lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, dsc); -#define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc); -#define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc); +#define LV_LOG_TRACE(dsc) lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, dsc); +#define LV_LOG_INFO(dsc) lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, dsc); +#define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc); +#define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc); #else /*LV_USE_LOG*/ /*Do nothing if `LV_USE_LOG 0`*/ -#define lv_log_add(level, file, line, dsc) {;} -#define LV_LOG_TRACE(dsc) {;} -#define LV_LOG_INFO(dsc) {;} -#define LV_LOG_WARN(dsc) {;} -#define LV_LOG_ERROR(dsc) {;} +#define lv_log_add(level, file, line, dsc) \ + { \ + ; \ + } +#define LV_LOG_TRACE(dsc) \ + { \ + ; \ + } +#define LV_LOG_INFO(dsc) \ + { \ + ; \ + } +#define LV_LOG_WARN(dsc) \ + { \ + ; \ + } +#define LV_LOG_ERROR(dsc) \ + { \ + ; \ + } #endif /*LV_USE_LOG*/ #ifdef __cplusplus diff --git a/src/lv_misc/lv_math.c b/src/lv_misc/lv_math.c index 7c56ea6f4655..9f16d3625927 100644 --- a/src/lv_misc/lv_math.c +++ b/src/lv_misc/lv_math.c @@ -26,18 +26,13 @@ * STATIC VARIABLES **********************/ static int16_t sin0_90_table[] = { - 0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126, - 5690, 6252, 6813, 7371, 7927, 8481, 9032, 9580, 10126, 10668, - 11207, 11743, 12275, 12803, 13328, 13848, 14364, 14876, 15383, 15886, - 16383, 16876, 17364, 17846, 18323, 18794, 19260, 19720, 20173, 20621, - 21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964, 24351, 24730, - 25101, 25465, 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087, - 28377, 28659, 28932, 29196, 29451, 29697, 29934, 30162, 30381, 30591, - 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, 32051, 32165, - 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, - 32767 -}; - + 0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126, 5690, 6252, 6813, + 7371, 7927, 8481, 9032, 9580, 10126, 10668, 11207, 11743, 12275, 12803, 13328, 13848, + 14364, 14876, 15383, 15886, 16383, 16876, 17364, 17846, 18323, 18794, 19260, 19720, 20173, + 20621, 21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964, 24351, 24730, 25101, 25465, + 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087, 28377, 28659, 28932, 29196, 29451, + 29697, 29934, 30162, 30381, 30591, 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, + 32051, 32165, 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, 32767}; /********************** * MACROS @@ -55,7 +50,7 @@ static int16_t sin0_90_table[] = { int16_t lv_trigo_sin(int16_t angle) { int16_t ret = 0; - angle = angle % 360; + angle = angle % 360; if(angle < 0) angle = 360 + angle; @@ -63,13 +58,13 @@ int16_t lv_trigo_sin(int16_t angle) ret = sin0_90_table[angle]; } else if(angle >= 90 && angle < 180) { angle = 180 - angle; - ret = sin0_90_table[angle]; + ret = sin0_90_table[angle]; } else if(angle >= 180 && angle < 270) { angle = angle - 180; - ret = - sin0_90_table[angle]; + ret = -sin0_90_table[angle]; } else { /*angle >=270*/ angle = 360 - angle; - ret = - sin0_90_table[angle]; + ret = -sin0_90_table[angle]; } return ret; @@ -86,12 +81,11 @@ int16_t lv_trigo_sin(int16_t angle) */ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) { - uint32_t t_rem = 1024 - t; + uint32_t t_rem = 1024 - t; uint32_t t_rem2 = (t_rem * t_rem) >> 10; uint32_t t_rem3 = (t_rem2 * t_rem) >> 10; - uint32_t t2 = (t * t) >> 10; - uint32_t t3 = (t2 * t) >> 10; - + uint32_t t2 = (t * t) >> 10; + uint32_t t3 = (t2 * t) >> 10; uint32_t v1 = ((uint32_t)t_rem3 * u0) >> 10; uint32_t v2 = ((uint32_t)3 * t_rem2 * t * u1) >> 20; @@ -99,11 +93,8 @@ int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3) uint32_t v4 = ((uint32_t)t3 * u3) >> 10; return v1 + v2 + v3 + v4; - } /********************** * STATIC FUNCTIONS **********************/ - - diff --git a/src/lv_misc/lv_math.h b/src/lv_misc/lv_math.h index fea5bc950c00..a4c0110fa033 100644 --- a/src/lv_misc/lv_math.h +++ b/src/lv_misc/lv_math.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -19,15 +18,15 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_MATH_MIN(a,b) ((a) < (b) ? (a) : (b)) -#define LV_MATH_MAX(a,b) ((a) > (b) ? (a) : (b)) +#define LV_MATH_MIN(a, b) ((a) < (b) ? (a) : (b)) +#define LV_MATH_MAX(a, b) ((a) > (b) ? (a) : (b)) #define LV_MATH_ABS(x) ((x) > 0 ? (x) : (-(x))) -#define LV_TRIGO_SIN_MAX 32767 -#define LV_TRIGO_SHIFT 15 /* >> LV_TRIGO_SHIFT to normalize*/ +#define LV_TRIGO_SIN_MAX 32767 +#define LV_TRIGO_SHIFT 15 /* >> LV_TRIGO_SHIFT to normalize*/ -#define LV_BEZIER_VAL_MAX 1024 /*Max time in Bezier functions (not [0..1] to use integers) */ -#define LV_BEZIER_VAL_SHIFT 10 /*log2(LV_BEZIER_VAL_MAX): used to normalize up scaled values*/ +#define LV_BEZIER_VAL_MAX 1024 /*Max time in Bezier functions (not [0..1] to use integers) */ +#define LV_BEZIER_VAL_SHIFT 10 /*log2(LV_BEZIER_VAL_MAX): used to normalize up scaled values*/ /********************** * TYPEDEFS diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index 8a53469cc9df..dd2ed2402ede 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -18,16 +18,15 @@ /********************* * DEFINES *********************/ -#define LV_MEM_ADD_JUNK 0 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ - +#define LV_MEM_ADD_JUNK \ + 0 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ #ifdef LV_MEM_ENV64 -# define MEM_UNIT uint64_t +#define MEM_UNIT uint64_t #else -# define MEM_UNIT uint32_t +#define MEM_UNIT uint32_t #endif - /********************** * TYPEDEFS **********************/ @@ -35,17 +34,20 @@ #if LV_ENABLE_GC == 0 /*gc custom allocations must not include header*/ /*The size of this union must be 4 bytes (uint32_t)*/ -typedef union { - struct { - MEM_UNIT used: 1; //1: if the entry is used - MEM_UNIT d_size: 31; //Size off the data (1 means 4 bytes) +typedef union +{ + struct + { + MEM_UNIT used : 1; // 1: if the entry is used + MEM_UNIT d_size : 31; // Size off the data (1 means 4 bytes) } s; - MEM_UNIT header; //The header (used + d_size) + MEM_UNIT header; // The header (used + d_size) } lv_mem_header_t; -typedef struct { +typedef struct +{ lv_mem_header_t header; - uint8_t first_data; /*First data byte in the allocated data (Just for easily create a pointer)*/ + uint8_t first_data; /*First data byte in the allocated data (Just for easily create a pointer)*/ } lv_mem_ent_t; #endif /* LV_ENABLE_GC */ @@ -54,7 +56,7 @@ typedef struct { * STATIC PROTOTYPES **********************/ #if LV_MEM_CUSTOM == 0 -static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e); +static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e); static void * ent_alloc(lv_mem_ent_t * e, uint32_t size); static void ent_trunc(lv_mem_ent_t * e, uint32_t size); #endif @@ -66,7 +68,7 @@ static void ent_trunc(lv_mem_ent_t * e, uint32_t size); static uint8_t * work_mem; #endif -static uint32_t zero_mem; /*Give the address of this variable if 0 byte should be allocated*/ +static uint32_t zero_mem; /*Give the address of this variable if 0 byte should be allocated*/ /********************** * MACROS @@ -86,9 +88,9 @@ void lv_mem_init(void) #if LV_MEM_ADR == 0 /*Allocate a large array to store the dynamically allocated data*/ static LV_MEM_ATTR MEM_UNIT work_mem_int[LV_MEM_SIZE / sizeof(MEM_UNIT)]; - work_mem = (uint8_t *) work_mem_int; + work_mem = (uint8_t *)work_mem_int; #else - work_mem = (uint8_t *) LV_MEM_ADR; + work_mem = (uint8_t *)LV_MEM_ADR; #endif lv_mem_ent_t * full = (lv_mem_ent_t *)work_mem; @@ -127,32 +129,31 @@ void * lv_mem_alloc(uint32_t size) #if LV_MEM_CUSTOM == 0 /*Use the allocation from dyn_mem*/ lv_mem_ent_t * e = NULL; - //Search for a appropriate entry + // Search for a appropriate entry do { - //Get the next entry + // Get the next entry e = ent_get_next(e); /*If there is next entry then try to allocate there*/ if(e != NULL) { alloc = ent_alloc(e, size); } - //End if there is not next entry OR the alloc. is successful + // End if there is not next entry OR the alloc. is successful } while(e != NULL && alloc == NULL); - -#else /*Use custom, user defined malloc function*/ +#else /*Use custom, user defined malloc function*/ #if LV_ENABLE_GC == 1 /*gc must not include header*/ alloc = LV_MEM_CUSTOM_ALLOC(size); -#else /* LV_ENABLE_GC */ +#else /* LV_ENABLE_GC */ /*Allocate a header too to store the size*/ alloc = LV_MEM_CUSTOM_ALLOC(size + sizeof(lv_mem_header_t)); if(alloc != NULL) { - ((lv_mem_ent_t *) alloc)->header.s.d_size = size; - ((lv_mem_ent_t *) alloc)->header.s.used = 1; - alloc = &((lv_mem_ent_t *) alloc)->first_data; + ((lv_mem_ent_t *)alloc)->header.s.d_size = size; + ((lv_mem_ent_t *)alloc)->header.s.used = 1; + alloc = &((lv_mem_ent_t *)alloc)->first_data; } -#endif /* LV_ENABLE_GC */ -#endif /* LV_MEM_CUSTOM */ +#endif /* LV_ENABLE_GC */ +#endif /* LV_MEM_CUSTOM */ #if LV_MEM_ADD_JUNK if(alloc != NULL) memset(alloc, 0xaa, size); @@ -172,14 +173,13 @@ void lv_mem_free(const void * data) if(data == &zero_mem) return; if(data == NULL) return; - #if LV_MEM_ADD_JUNK memset((void *)data, 0xbb, lv_mem_get_size(data)); #endif -#if LV_ENABLE_GC==0 +#if LV_ENABLE_GC == 0 /*e points to the header*/ - lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data - sizeof(lv_mem_header_t)); + lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data - sizeof(lv_mem_header_t)); e->header.s.used = 0; #endif @@ -199,10 +199,10 @@ void lv_mem_free(const void * data) } #endif #else /*Use custom, user defined free function*/ -#if LV_ENABLE_GC==0 +#if LV_ENABLE_GC == 0 LV_MEM_CUSTOM_FREE(e); #else - LV_MEM_CUSTOM_FREE((void*)data); + LV_MEM_CUSTOM_FREE((void *)data); #endif /*LV_ENABLE_GC*/ #endif } @@ -215,26 +215,27 @@ void lv_mem_free(const void * data) * @return pointer to the new memory */ -#if LV_ENABLE_GC==0 +#if LV_ENABLE_GC == 0 void * lv_mem_realloc(void * data_p, uint32_t new_size) { /*data_p could be previously freed pointer (in this case it is invalid)*/ if(data_p != NULL) { - lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data_p - sizeof(lv_mem_header_t)); + lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t)); if(e->header.s.used == 0) { data_p = NULL; } } uint32_t old_size = lv_mem_get_size(data_p); - if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/ + if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/ #if LV_MEM_CUSTOM == 0 /* Only truncate the memory is possible - * If the 'old_size' was extended by a header size in 'ent_trunc' it avoids reallocating this same memory */ + * If the 'old_size' was extended by a header size in 'ent_trunc' it avoids reallocating this + * same memory */ if(new_size < old_size) { - lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data_p - sizeof(lv_mem_header_t)); + lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t)); ent_trunc(e, new_size); return &e->first_data; } @@ -251,7 +252,6 @@ void * lv_mem_realloc(void * data_p, uint32_t new_size) } } - if(new_p == NULL) LV_LOG_WARN("Couldn't allocate memory"); return new_p; @@ -325,7 +325,7 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p) e = ent_get_next(e); - while(e != NULL) { + while(e != NULL) { if(e->header.s.used == 0) { mon_p->free_cnt++; mon_p->free_size += e->header.s.d_size; @@ -339,9 +339,9 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p) e = ent_get_next(e); } mon_p->total_size = LV_MEM_SIZE; - mon_p->used_pct = 100 - (100U * mon_p->free_size) / mon_p->total_size; - mon_p->frag_pct = (uint32_t)mon_p->free_biggest_size * 100U / mon_p->free_size; - mon_p->frag_pct = 100 - mon_p->frag_pct; + mon_p->used_pct = 100 - (100U * mon_p->free_size) / mon_p->total_size; + mon_p->frag_pct = (uint32_t)mon_p->free_biggest_size * 100U / mon_p->free_size; + mon_p->frag_pct = 100 - mon_p->frag_pct; #endif } @@ -351,14 +351,14 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p) * @return the size of data memory in bytes */ -#if LV_ENABLE_GC==0 +#if LV_ENABLE_GC == 0 uint32_t lv_mem_get_size(const void * data) { if(data == NULL) return 0; if(data == &zero_mem) return 0; - lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *) data - sizeof(lv_mem_header_t)); + lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data - sizeof(lv_mem_header_t)); return e->header.s.d_size; } @@ -387,10 +387,10 @@ static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e) lv_mem_ent_t * next_e = NULL; if(act_e == NULL) { /*NULL means: get the first entry*/ - next_e = (lv_mem_ent_t *) work_mem; + next_e = (lv_mem_ent_t *)work_mem; } else { /*Get the next entry */ uint8_t * data = &act_e->first_data; - next_e = (lv_mem_ent_t *)&data[act_e->header.s.d_size]; + next_e = (lv_mem_ent_t *)&data[act_e->header.s.d_size]; if(&next_e->first_data >= &work_mem[LV_MEM_SIZE]) next_e = NULL; } @@ -398,7 +398,6 @@ static lv_mem_ent_t * ent_get_next(lv_mem_ent_t * act_e) return next_e; } - /** * Try to do the real allocation with a given size * @param e try to allocate to this entry @@ -414,7 +413,7 @@ static void * ent_alloc(lv_mem_ent_t * e, uint32_t size) /*Truncate the entry to the desired size */ ent_trunc(e, size), - e->header.s.used = 1; + e->header.s.used = 1; /*Save the allocated data*/ alloc = &e->first_data; @@ -451,9 +450,9 @@ static void ent_trunc(lv_mem_ent_t * e, uint32_t size) /* Create the new entry after the current if there is space for it */ if(e->header.s.d_size != size) { - uint8_t * e_data = &e->first_data; - lv_mem_ent_t * after_new_e = (lv_mem_ent_t *)&e_data[size]; - after_new_e->header.s.used = 0; + uint8_t * e_data = &e->first_data; + lv_mem_ent_t * after_new_e = (lv_mem_ent_t *)&e_data[size]; + after_new_e->header.s.used = 0; after_new_e->header.s.d_size = e->header.s.d_size - size - sizeof(lv_mem_header_t); } diff --git a/src/lv_misc/lv_mem.h b/src/lv_misc/lv_mem.h index 257e18536ca8..b62abc586999 100644 --- a/src/lv_misc/lv_mem.h +++ b/src/lv_misc/lv_mem.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -29,14 +28,14 @@ extern "C" { *********************/ // Check windows #ifdef __WIN64 -# define LV_MEM_ENV64 +#define LV_MEM_ENV64 #endif // Check GCC #ifdef __GNUC__ -# if defined(__x86_64__) || defined(__ppc64__) -# define LV_MEM_ENV64 -# endif +#if defined(__x86_64__) || defined(__ppc64__) +#define LV_MEM_ENV64 +#endif #endif /********************** @@ -58,7 +57,6 @@ typedef struct * GLOBAL PROTOTYPES **********************/ - /** * Initiaize the dyn_mem module (work memory and other variables) */ @@ -105,7 +103,6 @@ void lv_mem_monitor(lv_mem_monitor_t * mon_p); */ uint32_t lv_mem_get_size(const void * data); - /********************** * MACROS **********************/ @@ -115,13 +112,24 @@ uint32_t lv_mem_get_size(const void * data); * p pointer to a memory */ #if LV_USE_LOG == 0 -# define lv_mem_assert(p) {if(p == NULL) while(1); } +#define lv_mem_assert(p) \ + { \ + if(p == NULL) \ + while(1) \ + ; \ + } #else -# define lv_mem_assert(p) {if(p == NULL) {LV_LOG_ERROR("Out of memory!"); while(1); }} +#define lv_mem_assert(p) \ + { \ + if(p == NULL) { \ + LV_LOG_ERROR("Out of memory!"); \ + while(1) \ + ; \ + } \ + } #endif #ifdef __cplusplus } /* extern "C" */ #endif #endif /*LV_MEM_H*/ - diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index 5ba3b715acb7..50149b5bab8f 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -20,65 +20,66 @@ extern "C" { * - Reserved: 0xE060..0xE07F */ -#define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) -#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) -#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF,A0,82) -#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF,A0,83) -#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF,A0,84) -#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF,A0,85) -#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF,A0,86) -#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF,A0,87) -#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF,A0,88) -#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF,A0,89) -#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF,A0,8A) -#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF,A0,8B) -#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF,A0,8C) -#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF,A0,8D) -#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF,A0,8E) -#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF,A0,8F) -#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF,A0,90) -#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF,A0,91) -#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF,A0,92) -#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF,A0,93) -#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF,A0,94) -#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF,A0,95) -#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF,A0,96) -#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF,A0,97) -#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF,A0,98) -#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF,A0,99) -#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF,A0,9A) -#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF,A0,9B) -#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF,A0,9C) -#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF,A0,9D) -#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF,A0,9E) -#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF,A0,9F) -#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF,A0,A0) -#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF,A0,A1) -#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF,A0,A2) -#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF,A0,A3) -#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF,A0,A4) -#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF,A0,A5) -#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF,A0,A6) -#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF,A0,A7) -#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF,A0,A8) -#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF,A0,A9) -#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF,A0,AA) -#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF,A0,AB) -#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF,A0,AC) -#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF,A0,AD) -#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF,A0,AE) -#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF,A0,AF) -#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF,A0,B0) -#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) -#define LV_SYMBOL_GLYPH_LAST 0xF831 -#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_GLYPH_FIRST 0xF800 +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF, A0, 80) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF, A0, 81) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF, A0, 82) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF, A0, 83) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF, A0, 84) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF, A0, 85) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF, A0, 86) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF, A0, 87) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF, A0, 88) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF, A0, 89) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF, A0, 8A) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF, A0, 8B) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF, A0, 8C) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF, A0, 8D) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF, A0, 8E) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF, A0, 8F) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF, A0, 90) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF, A0, 91) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF, A0, 92) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF, A0, 93) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF, A0, 94) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF, A0, 95) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF, A0, 96) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF, A0, 97) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF, A0, 98) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF, A0, 99) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF, A0, 9A) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF, A0, 9B) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF, A0, 9C) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF, A0, 9D) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF, A0, 9E) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF, A0, 9F) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF, A0, A0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF, A0, A1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF, A0, A2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF, A0, A3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF, A0, A4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF, A0, A5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF, A0, A6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF, A0, A7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF, A0, A8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF, A0, A9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF, A0, AA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF, A0, AB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF, A0, AC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF, A0, AD) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF, A0, AE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF, A0, AF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF, A0, B0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF, A0, B1) +#define LV_SYMBOL_GLYPH_LAST 0xF831 +#define LV_SYMBOL_DUMMY \ + _LV_SYMBOL_VALUE3(EF, A3, BF) /*Invalid symbol at (U+F831). If written before a string then \ + `lv_img` will show it as a label*/ -#define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) -#define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym +#define _LV_SYMBOL_VALUE3(x, y, z) (0x##z##y##x) +#define _LV_SYMBOL_NUMSTR(sym) LV_##sym##_NUMSTR = sym -enum -{ +enum { _LV_SYMBOL_NUMSTR(LV_SYMBOL_AUDIO), _LV_SYMBOL_NUMSTR(LV_SYMBOL_VIDEO), _LV_SYMBOL_NUMSTR(LV_SYMBOL_LIST), @@ -136,13 +137,13 @@ enum #define _LV_SYMBOL_STR_(x) #x #define _LV_SYMBOL_STR(x) _LV_SYMBOL_STR_(x) -#define _LV_SYMBOL_CHAR(c) \x ## c +#define _LV_SYMBOL_CHAR(c) \x##c #define _LV_SYMBOL_VALUE1(x) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)) -#define _LV_SYMBOL_VALUE3(x, y, z) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)_LV_SYMBOL_CHAR(y)_LV_SYMBOL_CHAR(z)) +#define _LV_SYMBOL_VALUE3(x, y, z) \ + _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x) _LV_SYMBOL_CHAR(y) _LV_SYMBOL_CHAR(z)) #ifdef __cplusplus } /* extern "C" */ #endif - #endif /*LV_LV_SYMBOL_DEF_H*/ diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index c43213a71c9c..6fabb6397313 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -13,13 +13,13 @@ #include "lv_gc.h" #if defined(LV_GC_INCLUDE) -# include LV_GC_INCLUDE +#include LV_GC_INCLUDE #endif /* LV_ENABLE_GC */ /********************* * DEFINES *********************/ -#define IDLE_MEAS_PERIOD 500 /*[ms]*/ +#define IDLE_MEAS_PERIOD 500 /*[ms]*/ /********************** * TYPEDEFS @@ -33,7 +33,7 @@ static bool lv_task_exec(lv_task_t * lv_task_p); /********************** * STATIC VARIABLES **********************/ -static bool lv_task_run = false; +static bool lv_task_run = false; static uint8_t idle_last = 0; static bool task_deleted; static bool task_created; @@ -70,8 +70,8 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) task_handler_mutex = true; static uint32_t idle_period_start = 0; - static uint32_t handler_start = 0; - static uint32_t busy_time = 0; + static uint32_t handler_start = 0; + static uint32_t busy_time = 0; if(lv_task_run == false) return; @@ -84,9 +84,9 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) lv_task_t * next; bool end_flag; do { - end_flag = true; - task_deleted = false; - task_created = false; + end_flag = true; + task_deleted = false; + task_created = false; LV_GC_ROOT(_lv_task_act) = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll)); while(LV_GC_ROOT(_lv_task_act)) { /* The task might be deleted if it runs only once ('once = 1') @@ -100,9 +100,10 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) /*Here is the interrupter task. Don't execute it again.*/ if(LV_GC_ROOT(_lv_task_act) == task_interrupter) { - task_interrupter = NULL; /*From this point only task after the interrupter comes, so the interrupter is not interesting anymore*/ + task_interrupter = NULL; /*From this point only task after the interrupter comes, so + the interrupter is not interesting anymore*/ LV_GC_ROOT(_lv_task_act) = next; - continue; /*Load the next task*/ + continue; /*Load the next task*/ } /*Just try to run the tasks with highest priority.*/ @@ -113,7 +114,8 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) else if(task_interrupter) { if(((lv_task_t *)LV_GC_ROOT(_lv_task_act))->prio > task_interrupter->prio) { if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) { - task_interrupter = LV_GC_ROOT(_lv_task_act); /*Check all tasks again from the highest priority */ + task_interrupter = LV_GC_ROOT( + _lv_task_act); /*Check all tasks again from the highest priority */ end_flag = false; break; } @@ -123,16 +125,19 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) * Just run the remaining tasks*/ else { if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) { - task_interrupter = LV_GC_ROOT(_lv_task_act); /*Check all tasks again from the highest priority */ + task_interrupter = LV_GC_ROOT( + _lv_task_act); /*Check all tasks again from the highest priority */ end_flag = false; break; } } - if(task_deleted) break; /*If a task was deleted then this or the next item might be corrupted*/ - if(task_created) break; /*If a task was deleted then this or the next item might be corrupted*/ + if(task_deleted) + break; /*If a task was deleted then this or the next item might be corrupted*/ + if(task_created) + break; /*If a task was deleted then this or the next item might be corrupted*/ - LV_GC_ROOT(_lv_task_act) = next; /*Load the next task*/ + LV_GC_ROOT(_lv_task_act) = next; /*Load the next task*/ } } while(!end_flag); @@ -140,15 +145,14 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) uint32_t idle_period_time = lv_tick_elaps(idle_period_start); if(idle_period_time >= IDLE_MEAS_PERIOD) { - idle_last = (uint32_t)((uint32_t)busy_time * 100) / IDLE_MEAS_PERIOD; /*Calculate the busy percentage*/ - idle_last = idle_last > 100 ? 0 : 100 - idle_last; /*But we need idle time*/ - busy_time = 0; + idle_last = (uint32_t)((uint32_t)busy_time * 100) / + IDLE_MEAS_PERIOD; /*Calculate the busy percentage*/ + idle_last = idle_last > 100 ? 0 : 100 - idle_last; /*But we need idle time*/ + busy_time = 0; idle_period_start = lv_tick_get(); - - } - task_handler_mutex = false; /*Release the mutex*/ + task_handler_mutex = false; /*Release the mutex*/ LV_LOG_TRACE("lv_task_handler ready"); } @@ -168,7 +172,7 @@ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t /*Create task lists in order of priority from high to low*/ tmp = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll)); - if(NULL == tmp) { /*First task*/ + if(NULL == tmp) { /*First task*/ new_lv_task = lv_ll_ins_head(&LV_GC_ROOT(_lv_task_ll)); lv_mem_assert(new_lv_task); if(new_lv_task == NULL) return NULL; @@ -183,18 +187,18 @@ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t tmp = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), tmp); } while(tmp != NULL); - if(tmp == NULL) { /*Only too high priority tasks were found*/ + if(tmp == NULL) { /*Only too high priority tasks were found*/ new_lv_task = lv_ll_ins_tail(&LV_GC_ROOT(_lv_task_ll)); lv_mem_assert(new_lv_task); if(new_lv_task == NULL) return NULL; } } - new_lv_task->period = period; - new_lv_task->task = task; - new_lv_task->prio = prio; - new_lv_task->param = param; - new_lv_task->once = 0; + new_lv_task->period = period; + new_lv_task->task = task; + new_lv_task->prio = prio; + new_lv_task->param = param; + new_lv_task->once = 0; new_lv_task->last_run = lv_tick_get(); task_created = true; @@ -212,7 +216,7 @@ void lv_task_del(lv_task_t * lv_task_p) lv_mem_free(lv_task_p); - if(LV_GC_ROOT(_lv_task_act) == lv_task_p) task_deleted = true; /*The active task was deleted*/ + if(LV_GC_ROOT(_lv_task_act) == lv_task_p) task_deleted = true; /*The active task was deleted*/ } /** @@ -224,7 +228,8 @@ void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio) { /*Find the tasks with new priority*/ lv_task_t * i; - LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i) { + LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i) + { if(i->prio <= prio) { if(i != lv_task_p) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, i); break; @@ -236,7 +241,6 @@ void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, NULL); } - lv_task_p->prio = prio; } @@ -296,7 +300,6 @@ uint8_t lv_task_get_idle(void) return idle_last; } - /********************** * STATIC FUNCTIONS **********************/ @@ -314,19 +317,18 @@ static bool lv_task_exec(lv_task_t * lv_task_p) uint32_t elp = lv_tick_elaps(lv_task_p->last_run); if(elp >= lv_task_p->period) { lv_task_p->last_run = lv_tick_get(); - task_deleted = false; - task_created = false; + task_deleted = false; + task_created = false; lv_task_p->task(lv_task_p->param); /*Delete if it was a one shot lv_task*/ - if(task_deleted == false) { /*The task might be deleted by itself as well*/ - if(lv_task_p->once != 0) { - lv_task_del(lv_task_p); - } + if(task_deleted == false) { /*The task might be deleted by itself as well*/ + if(lv_task_p->once != 0) { + lv_task_del(lv_task_p); + } } exec = true; } return exec; } - diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index a63420fd653a..94fb4a13cac8 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -37,8 +37,7 @@ extern "C" { /** * Possible priorities for lv_tasks */ -enum -{ +enum { LV_TASK_PRIO_OFF = 0, LV_TASK_PRIO_LOWEST, LV_TASK_PRIO_LOW, @@ -56,10 +55,10 @@ typedef struct { uint32_t period; uint32_t last_run; - void (*task) (void*); + void (*task)(void *); void * param; - uint8_t prio:3; - uint8_t once:1; + uint8_t prio : 3; + uint8_t once : 1; } lv_task_t; /********************** @@ -84,34 +83,34 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); * @param param free parameter * @return pointer to the new task */ -lv_task_t* lv_task_create(void (*task) (void *), uint32_t period, lv_task_prio_t prio, void * param); +lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, + void * param); /** * Delete a lv_task * @param lv_task_p pointer to task created by lv_task_p */ -void lv_task_del(lv_task_t* lv_task_p); +void lv_task_del(lv_task_t * lv_task_p); /** * Set new priority for a lv_task * @param lv_task_p pointer to a lv_task * @param prio the new priority */ -void lv_task_set_prio(lv_task_t* lv_task_p, lv_task_prio_t prio); +void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio); /** * Set new period for a lv_task * @param lv_task_p pointer to a lv_task * @param period the new period */ -void lv_task_set_period(lv_task_t* lv_task_p, uint32_t period); +void lv_task_set_period(lv_task_t * lv_task_p, uint32_t period); /** * Make a lv_task ready. It will not wait its period. * @param lv_task_p pointer to a lv_task. */ -void lv_task_ready(lv_task_t* lv_task_p); - +void lv_task_ready(lv_task_t * lv_task_p); /** * Delete the lv_task after one call @@ -124,7 +123,7 @@ void lv_task_once(lv_task_t * lv_task_p); * It will be called the previously set period milliseconds later. * @param lv_task_p pointer to a lv_task. */ -void lv_task_reset(lv_task_t* lv_task_p); +void lv_task_reset(lv_task_t * lv_task_p); /** * Enable or disable the whole lv_task handling diff --git a/src/lv_misc/lv_templ.h b/src/lv_misc/lv_templ.h index a5459e8d38d0..1f1b92d6db89 100644 --- a/src/lv_misc/lv_templ.h +++ b/src/lv_misc/lv_templ.h @@ -30,7 +30,6 @@ extern "C" { * MACROS **********************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index fbcc3165e57d..dbfc894ab1e6 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -12,18 +12,21 @@ /********************* * DEFINES *********************/ -#define NO_BREAK_FOUND UINT32_MAX +#define NO_BREAK_FOUND UINT32_MAX #ifndef LV_TXT_LINE_BREAK_LONG_LEN -#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */ +#define LV_TXT_LINE_BREAK_LONG_LEN \ + 12 /* If a character is at least this long, will break wherever "prettiest" */ #endif #ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */ +#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN \ + 3 /* Minimum number of characters of a word to put on a line before a break */ #endif #ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ +#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN \ + 1 /* Minimum number of characters of a word to put on a line after a break */ #endif /********************** @@ -48,18 +51,17 @@ static uint32_t lv_txt_utf8_get_length(const char * txt); * STATIC VARIABLES **********************/ - /********************** * GLOBAL VARIABLES **********************/ -uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_utf8_size; -uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_utf8; -uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_utf8_conv_wc; -uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_utf8_next; -uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_prev; +uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_utf8_size; +uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_utf8; +uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_utf8_conv_wc; +uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_utf8_next; +uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_prev; uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id; -uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id; -uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length; +uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id; +uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length; /********************** * MACROS @@ -77,10 +79,12 @@ uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_l * @param letter_space letter space of the text * @param txt.line_space line space of the text * @param flags settings for the text from 'txt_flag_t' enum - * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks + * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid + * line breaks */ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag) + lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, + lv_txt_flag_t flag) { size_res->x = 0; size_res->y = 0; @@ -90,23 +94,24 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX; - uint32_t line_start = 0; + uint32_t line_start = 0; uint32_t new_line_start = 0; lv_coord_t act_line_length; uint8_t letter_height = lv_font_get_height(font); /*Calc. the height and longest line*/ while(text[line_start] != '\0') { - new_line_start += lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, flag); - size_res->y += letter_height ; + new_line_start += + lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, flag); + size_res->y += letter_height; size_res->y += line_space; /*Calculate the the longest line*/ - act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, - font, letter_space, flag); + act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, font, + letter_space, flag); size_res->x = LV_MATH_MAX(act_line_length, size_res->x); - line_start = new_line_start; + line_start = new_line_start; } /*Ma ke the text one line taller if the last character is '\n' or '\r'*/ @@ -115,9 +120,10 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * } /*Correction with the last line space or set the height manually if the text is empty*/ - if(size_res->y == 0) size_res->y = letter_height; - else size_res->y -= line_space; - + if(size_res->y == 0) + size_res->y = letter_height; + else + size_res->y -= line_space; } /** @@ -125,25 +131,27 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * * @param txt a '\0' terminated string * @param font pointer to a font * @param letter_space letter space - * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks + * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid + * line breaks * @param flags settings for the text from 'txt_flag_type' enum - * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 they are different) + * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 + * they are different) */ -uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t max_width, lv_txt_flag_t flag) +uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, + lv_coord_t max_width, lv_txt_flag_t flag) { if(txt == NULL) return 0; if(font == NULL) return 0; if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX; - uint32_t i = 0; - lv_coord_t cur_w = 0; - lv_coord_t w_at_last_break = 0; + uint32_t i = 0; + lv_coord_t cur_w = 0; + lv_coord_t w_at_last_break = 0; uint32_t n_char_since_last_break = 0; /* Used count word length of long words */ - uint32_t last_break = NO_BREAK_FOUND; - lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t letter = 0; + uint32_t last_break = NO_BREAK_FOUND; + lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t letter = 0; while(txt[i] != '\0') { lv_coord_t letter_width; @@ -152,36 +160,37 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { - continue; /*Skip the letter is it is part of a command*/ + continue; /*Skip the letter is it is part of a command*/ } } - /*Check for new line chars*/ if(letter == '\n' || letter == '\r') { - uint32_t i_tmp = i; + uint32_t i_tmp = i; uint32_t letter_next = lv_txt_encoded_next(txt, &i_tmp); - if(letter == '\r' && letter_next == '\n') i = i_tmp; + if(letter == '\r' && letter_next == '\n') i = i_tmp; - return i; /*Return with the first letter of the next line*/ + return i; /*Return with the first letter of the next line*/ } else { /*Check the actual length*/ n_char_since_last_break++; letter_width = lv_font_get_width(font, letter); - cur_w += letter_width; + cur_w += letter_width; - /* Get the length of the current work and determine best place + /* Get the length of the current work and determine best place * to break the line. */ if(cur_w > max_width) { - if( last_break != NO_BREAK_FOUND ) { - /* Continue searching for next breakable character to see if the next word will fit */ + if(last_break != NO_BREAK_FOUND) { + /* Continue searching for next breakable character to see if the next word will + * fit */ uint32_t n_char_fit = n_char_since_last_break - 1; - if( n_char_since_last_break <= LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN ) { + if(n_char_since_last_break <= LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN) { i = last_break; - } - else { + } else { uint32_t i_tmp = i; - cur_w -= w_at_last_break + letter_space; /*ignore the first letter_space after the break char */ + cur_w -= + w_at_last_break + + letter_space; /*ignore the first letter_space after the break char */ bool other = true; while(txt[i_tmp] != '\0') { letter = lv_txt_encoded_next(txt, &i_tmp); @@ -189,7 +198,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { - continue; /*Skip the letter is it is part of a command*/ + continue; /*Skip the letter is it is part of a command*/ } } @@ -199,18 +208,17 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, /* Figure out the prettiest place to break */ uint32_t char_remain; lv_txt_encoded_prev(txt, &i); - for(char_remain=n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; - char_remain++) { + for(char_remain = n_char_since_last_break - n_char_fit; + char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; + char_remain++) { lv_txt_encoded_prev(txt, &i); } - } - else{ + } else { i = last_break; } other = false; break; - } + } n_char_since_last_break++; lv_coord_t letter_width2 = lv_font_get_width(font, letter); cur_w += letter_width2; @@ -220,29 +228,30 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, other = false; break; } - if(letter_width2 > 0){ + if(letter_width2 > 0) { cur_w += letter_space; } } - if( other ) { + if(other) { if(n_char_since_last_break >= LV_TXT_LINE_BREAK_LONG_LEN) { /* Figure out the prettiest place to break */ uint32_t char_remain; lv_txt_encoded_prev(txt, &i); - for(char_remain=n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; - char_remain++){ + for(char_remain = n_char_since_last_break - n_char_fit; + char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; + char_remain++) { lv_txt_encoded_prev(txt, &i); } - } - else{ + } else { i = last_break; } } } } else { - /* Now this character is out of the area so it will be first character of the next line*/ - /* But 'i' already points to the next character (because of lv_txt_utf8_next) step beck one*/ + /* Now this character is out of the area so it will be first character of the + * next line*/ + /* But 'i' already points to the next character (because of lv_txt_utf8_next) + * step beck one*/ lv_txt_encoded_prev(txt, &i); } @@ -255,7 +264,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, /*If this char still can fit to this line then check if * txt can be broken here later */ else if(is_break_char(letter)) { - last_break = i; /*Save the first char index after break*/ + last_break = i; /*Save the first char index after break*/ w_at_last_break = cur_w; if(letter_width > 0) { w_at_last_break += letter_space; @@ -275,25 +284,26 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, /** * Give the length of a text with a given font * @param txt a '\0' terminate string - * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in UTF-8) + * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in + * UTF-8) * @param font pointer to a font * @param letter_space letter space * @param flags settings for the text from 'txt_flag_t' enum * @return length of a char_num long text */ -lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, - const lv_font_t * font, lv_coord_t letter_space, lv_txt_flag_t flag) +lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, + lv_coord_t letter_space, lv_txt_flag_t flag) { if(txt == NULL) return 0; if(font == NULL) return 0; - uint32_t i = 0; - lv_coord_t width = 0; + uint32_t i = 0; + lv_coord_t width = 0; lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; uint32_t letter; if(length != 0) { - while(i< length){ + while(i < length) { letter = lv_txt_encoded_next(txt, &i); if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { @@ -302,14 +312,15 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, } lv_coord_t char_width = lv_font_get_width(font, letter); - if(char_width > 0){ + if(char_width > 0) { width += lv_font_get_width(font, letter); width += letter_space; } } if(width > 0) { - width -= letter_space; /*Trim the last letter space. Important if the text is center aligned */ + width -= letter_space; /*Trim the last letter space. Important if the text is center + aligned */ } } @@ -318,8 +329,8 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, /** * Check next character in a string and decide if the character is part of the command or not - * @param state pointer to a txt_cmd_state_t variable which stores the current state of command processing - * (Initied. to TXT_CMD_STATE_WAIT ) + * @param state pointer to a txt_cmd_state_t variable which stores the current state of command + * processing (Initied. to TXT_CMD_STATE_WAIT ) * @param c the current character * @return true: the character is part of a command and should not be written, * false: the character should be written @@ -331,12 +342,13 @@ bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c) if(c == (uint32_t)LV_TXT_COLOR_CMD[0]) { if(*state == LV_TXT_CMD_STATE_WAIT) { /*Start char*/ *state = LV_TXT_CMD_STATE_PAR; - ret = true; - } else if(*state == LV_TXT_CMD_STATE_PAR) { /*Other start char in parameter is escaped cmd. char */ + ret = true; + } else if(*state == + LV_TXT_CMD_STATE_PAR) { /*Other start char in parameter is escaped cmd. char */ *state = LV_TXT_CMD_STATE_WAIT; } else if(*state == LV_TXT_CMD_STATE_IN) { /*Command end */ *state = LV_TXT_CMD_STATE_WAIT; - ret = true; + ret = true; } } @@ -354,8 +366,8 @@ bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c) /** * Insert a string into an other * @param txt_buf the original text (must be big enough for the result text) - * @param pos position to insert. Expressed in character index and not byte index (Different in UTF-8) - * 0: before the original text, 1: after the first char etc. + * @param pos position to insert. Expressed in character index and not byte index (Different in + * UTF-8) 0: before the original text, 1: after the first char etc. * @param ins_txt text to insert */ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) @@ -363,7 +375,8 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) uint32_t old_len = strlen(txt_buf); uint32_t ins_len = strlen(ins_txt); uint32_t new_len = ins_len + old_len; - pos = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/ + pos = + lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/ /*Copy the second part into the end to make place to text to insert*/ uint32_t i; @@ -378,7 +391,8 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) /** * Delete a part of a string * @param txt string to modify - * @param pos position where to start the deleting (0: before the first char, 1: after the first char etc.) + * @param pos position where to start the deleting (0: before the first char, 1: after the first + * char etc.) * @param len number of characters to delete */ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) @@ -386,7 +400,7 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) uint32_t old_len = strlen(txt); - pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/ + pos = lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/ len = lv_txt_encoded_get_byte_id(&txt[pos], len); /*Copy the second part into the end to make place to text to insert*/ @@ -396,7 +410,6 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) } } - /******************************* * UTF-8 ENCODER/DECOER ******************************/ @@ -408,14 +421,17 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) */ static uint8_t lv_txt_utf8_size(const char * str) { - if((str[0] & 0x80) == 0) return 1; - else if((str[0] & 0xE0) == 0xC0) return 2; - else if((str[0] & 0xF0) == 0xE0) return 3; - else if((str[0] & 0xF8) == 0xF0) return 4; - return 1; /*If the char was invalid step tell it's 1 byte long*/ + if((str[0] & 0x80) == 0) + return 1; + else if((str[0] & 0xE0) == 0xC0) + return 2; + else if((str[0] & 0xF0) == 0xE0) + return 3; + else if((str[0] & 0xF8) == 0xF0) + return 4; + return 1; /*If the char was invalid step tell it's 1 byte long*/ } - /** * Convert an Unicode letter to UTF-8. * @param letter_uni an Unicode letter @@ -427,20 +443,20 @@ static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni) uint8_t bytes[4]; if(letter_uni < 0x0800) { - bytes[0] = ((letter_uni >> 6) & 0x1F) | 0xC0; - bytes[1] = ((letter_uni >> 0) & 0x3F) | 0x80; + bytes[0] = ((letter_uni >> 6) & 0x1F) | 0xC0; + bytes[1] = ((letter_uni >> 0) & 0x3F) | 0x80; bytes[2] = 0; bytes[3] = 0; } else if(letter_uni < 0x010000) { bytes[0] = ((letter_uni >> 12) & 0x0F) | 0xE0; - bytes[1] = ((letter_uni >> 6) & 0x3F) | 0x80; - bytes[2] = ((letter_uni >> 0) & 0x3F) | 0x80; + bytes[1] = ((letter_uni >> 6) & 0x3F) | 0x80; + bytes[2] = ((letter_uni >> 0) & 0x3F) | 0x80; bytes[3] = 0; } else if(letter_uni < 0x110000) { bytes[0] = ((letter_uni >> 18) & 0x07) | 0xF0; bytes[1] = ((letter_uni >> 12) & 0x3F) | 0x80; - bytes[2] = ((letter_uni >> 6) & 0x3F) | 0x80; - bytes[3] = ((letter_uni >> 0) & 0x3F) | 0x80; + bytes[2] = ((letter_uni >> 6) & 0x3F) | 0x80; + bytes[3] = ((letter_uni >> 0) & 0x3F) | 0x80; } uint32_t * res_p = (uint32_t *)bytes; @@ -462,7 +478,8 @@ static uint32_t lv_txt_utf8_conv_wc(uint32_t c) swapped = (c8[0] << 24) + (c8[1] << 16) + (c8[2] << 8) + (c8[3]); uint8_t i; for(i = 0; i < 4; i++) { - if((swapped & 0xFF) == 0) swapped = (swapped >> 8); /*Ignore leading zeros (they were in the end originally)*/ + if((swapped & 0xFF) == 0) + swapped = (swapped >> 8); /*Ignore leading zeros (they were in the end originally)*/ } c = swapped; } @@ -504,7 +521,7 @@ static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i) if((txt[*i] & 0xE0) == 0xC0) { result = (uint32_t)(txt[*i] & 0x1F) << 6; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += (txt[*i] & 0x3F); (*i)++; } @@ -513,11 +530,11 @@ static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i) result = (uint32_t)(txt[*i] & 0x0F) << 12; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += (uint32_t)(txt[*i] & 0x3F) << 6; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += (txt[*i] & 0x3F); (*i)++; } @@ -526,15 +543,15 @@ static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i) result = (uint32_t)(txt[*i] & 0x07) << 18; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += (uint32_t)(txt[*i] & 0x3F) << 12; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += (uint32_t)(txt[*i] & 0x3F) << 6; (*i)++; - if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ + if((txt[*i] & 0xC0) != 0x80) return 0; /*Invalid UTF-8 code*/ result += txt[*i] & 0x3F; (*i)++; } else { @@ -547,7 +564,8 @@ static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i) /** * Get previous UTF-8 character form a string. * @param txt pointer to '\0' terminated string - * @param i start byte index in 'txt' where to start. After the call it will point to the previous UTF-8 char in 'txt'. + * @param i start byte index in 'txt' where to start. After the call it will point to the previous + * UTF-8 char in 'txt'. * @return the decoded Unicode character or 0 on invalid UTF-8 code */ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i) @@ -558,21 +576,22 @@ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i) /*Try to find a !0 long UTF-8 char by stepping one character back*/ (*i)--; do { - if(cnt >= 4) return 0; /*No UTF-8 char found before the initial*/ + if(cnt >= 4) return 0; /*No UTF-8 char found before the initial*/ c_size = lv_txt_encoded_size(&txt[*i]); if(c_size == 0) { - if(*i != 0)(*i)--; - else return 0; + if(*i != 0) + (*i)--; + else + return 0; } cnt++; } while(c_size == 0); - uint32_t i_tmp = *i; - uint32_t letter = lv_txt_encoded_next(txt, &i_tmp); /*Character found, get it*/ + uint32_t i_tmp = *i; + uint32_t letter = lv_txt_encoded_next(txt, &i_tmp); /*Character found, get it*/ return letter; - } /** @@ -593,7 +612,6 @@ static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id) return byte_cnt; } - /** * Convert a byte index (in an UTF-8 text) to character index. * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long @@ -603,7 +621,7 @@ static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id) */ static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id) { - uint32_t i = 0; + uint32_t i = 0; uint32_t char_cnt = 0; while(i < byte_id) { @@ -623,7 +641,7 @@ static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id) static uint32_t lv_txt_utf8_get_length(const char * txt) { uint32_t len = 0; - uint32_t i = 0; + uint32_t i = 0; while(txt[i] != '\0') { lv_txt_encoded_next(txt, &i); @@ -657,4 +675,3 @@ static bool is_break_char(uint32_t letter) return ret; } - diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index c1d955ad160d..df418fb1c310 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -27,26 +27,24 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_TXT_COLOR_CMD "#" +#define LV_TXT_COLOR_CMD "#" /********************** * TYPEDEFS **********************/ -enum -{ - LV_TXT_FLAG_NONE = 0x00, - LV_TXT_FLAG_RECOLOR = 0x01, /*Enable parsing of recolor command*/ - LV_TXT_FLAG_EXPAND = 0x02, /*Ignore width to avoid automatic word wrapping*/ - LV_TXT_FLAG_CENTER = 0x04, /*Align the text to the middle*/ - LV_TXT_FLAG_RIGHT = 0x08, /*Align the text to the right*/ +enum { + LV_TXT_FLAG_NONE = 0x00, + LV_TXT_FLAG_RECOLOR = 0x01, /*Enable parsing of recolor command*/ + LV_TXT_FLAG_EXPAND = 0x02, /*Ignore width to avoid automatic word wrapping*/ + LV_TXT_FLAG_CENTER = 0x04, /*Align the text to the middle*/ + LV_TXT_FLAG_RIGHT = 0x08, /*Align the text to the right*/ }; typedef uint8_t lv_txt_flag_t; -enum -{ - LV_TXT_CMD_STATE_WAIT, /*Waiting for command*/ - LV_TXT_CMD_STATE_PAR, /*Processing the parameter*/ - LV_TXT_CMD_STATE_IN, /*Processing the command*/ +enum { + LV_TXT_CMD_STATE_WAIT, /*Waiting for command*/ + LV_TXT_CMD_STATE_PAR, /*Processing the parameter*/ + LV_TXT_CMD_STATE_IN, /*Processing the command*/ }; typedef uint8_t lv_txt_cmd_state_t; @@ -62,39 +60,44 @@ typedef uint8_t lv_txt_cmd_state_t; * @param letter_space letter space of the text * @param line_space line space of the text * @param flags settings for the text from 'txt_flag_t' enum - * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks + * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid + * line breaks */ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag); + lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, + lv_txt_flag_t flag); /** * Get the next line of text. Check line length and break chars too. * @param txt a '\0' terminated string * @param font pointer to a font * @param letter_space letter space - * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks + * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid + * line breaks * @param flags settings for the text from 'txt_flag_type' enum - * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 they are different) + * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 + * they are different) */ -uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t max_width, lv_txt_flag_t flag); +uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, + lv_coord_t max_width, lv_txt_flag_t flag); /** * Give the length of a text with a given font * @param txt a '\0' terminate string - * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in UTF-8) + * @param length length of 'txt' in byte count and not characters (Á is 1 character but 2 bytes in + * UTF-8) * @param font pointer to a font * @param letter_space letter space * @param flags settings for the text from 'txt_flag_t' enum * @return length of a char_num long text */ -lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, - const lv_font_t * font, lv_coord_t letter_space, lv_txt_flag_t flag); - +lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, + lv_coord_t letter_space, lv_txt_flag_t flag); /** * Check next character in a string and decide if te character is part of the command or not - * @param state pointer to a txt_cmd_state_t variable which stores the current state of command processing + * @param state pointer to a txt_cmd_state_t variable which stores the current state of command + * processing * @param c the current character * @return true: the character is part of a command and should not be written, * false: the character should be written @@ -112,7 +115,8 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt); /** * Delete a part of a string * @param txt string to modify - * @param pos position where to start the deleting (0: before the first char, 1: after the first char etc.) + * @param pos position where to start the deleting (0: before the first char, 1: after the first + * char etc.) * @param len number of characters to delete */ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len); @@ -128,20 +132,19 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len); */ extern uint8_t (*lv_txt_encoded_size)(const char *); - /** * Convert an Unicode letter to encoded * @param letter_uni an Unicode letter * @return Encoded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ü') */ -extern uint32_t (*lv_txt_unicode_to_encoded)(uint32_t ); +extern uint32_t (*lv_txt_unicode_to_encoded)(uint32_t); /** * Convert a wide character, e.g. 'Á' little endian to be compatible with the encoded format. * @param c a wide character * @return `c` in the encoded format */ -extern uint32_t (*lv_txt_encoded_conv_wc) (uint32_t c); +extern uint32_t (*lv_txt_encoded_conv_wc)(uint32_t c); /** * Decode the next encoded character from a string. @@ -151,12 +154,13 @@ extern uint32_t (*lv_txt_encoded_conv_wc) (uint32_t c); * NULL to use txt[0] as index * @return the decoded Unicode character or 0 on invalid data code */ -extern uint32_t (*lv_txt_encoded_next)(const char *, uint32_t * ); +extern uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *); /** * Get the previous encoded character form a string. * @param txt pointer to '\0' terminated string - * @param i_start index in 'txt' where to start. After the call it will point to the previous encoded char in 'txt'. + * @param i_start index in 'txt' where to start. After the call it will point to the previous + * encoded char in 'txt'. * @return the decoded Unicode character or 0 on invalid data */ extern uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *); diff --git a/src/lv_misc/lv_utils.c b/src/lv_misc/lv_utils.c index 2d91526fadb9..3f1895605c11 100644 --- a/src/lv_misc/lv_utils.c +++ b/src/lv_misc/lv_utils.c @@ -43,28 +43,28 @@ */ char * lv_utils_num_to_str(int32_t num, char * buf) { - if (num == 0) { + if(num == 0) { buf[0] = '0'; buf[1] = '\0'; return buf; } int8_t digitCount = 0; - int8_t i = 0; - if (num < 0) { + int8_t i = 0; + if(num < 0) { buf[digitCount++] = '-'; - num = LV_MATH_ABS(num); + num = LV_MATH_ABS(num); ++i; } - while (num) { - char digit = num % 10; + while(num) { + char digit = num % 10; buf[digitCount++] = digit + 48; num /= 10; } buf[digitCount] = '\0'; digitCount--; - while (digitCount > i) { - char temp = buf[i]; - buf[i] = buf[digitCount]; + while(digitCount > i) { + char temp = buf[i]; + buf[i] = buf[digitCount]; buf[digitCount] = temp; digitCount--; i++; @@ -72,7 +72,6 @@ char * lv_utils_num_to_str(int32_t num, char * buf) return buf; } - /** Searches base[0] to base[n - 1] for an item that matches *key. * * @note The function cmp must return negative if its first @@ -85,25 +84,27 @@ char * lv_utils_num_to_str(int32_t num, char * buf) * @param base Pointer to first element to search * @param n Number of elements * @param size Size of each element - * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function example) + * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function + * example) * * @return a pointer to a matching item, or NULL if none exists. */ -void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, int32_t (* cmp)(const void * pRef, const void * pElement)) +void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, + int32_t (*cmp)(const void * pRef, const void * pElement)) { const char * middle; int32_t c; - for (middle = base; n != 0;) { - middle += (n/2) * size; - if ((c = (*cmp)(key, middle)) > 0) { - n = (n/2) - ((n&1) == 0); + for(middle = base; n != 0;) { + middle += (n / 2) * size; + if((c = (*cmp)(key, middle)) > 0) { + n = (n / 2) - ((n & 1) == 0); base = (middle += size); - } else if (c < 0) { + } else if(c < 0) { n /= 2; middle = base; } else { - return (char *) middle; + return (char *)middle; } } return NULL; @@ -112,5 +113,3 @@ void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_ /********************** * STATIC FUNCTIONS **********************/ - - diff --git a/src/lv_misc/lv_utils.h b/src/lv_misc/lv_utils.h index f39adc351924..6eed79501d3d 100644 --- a/src/lv_misc/lv_utils.h +++ b/src/lv_misc/lv_utils.h @@ -10,7 +10,6 @@ extern "C" { #endif - /********************* * INCLUDES *********************/ @@ -48,11 +47,13 @@ char * lv_utils_num_to_str(int32_t num, char * buf); * @param base Pointer to first element to search * @param n Number of elements * @param size Size of each element - * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function example) + * @param cmp Pointer to comparison function (see #lv_font_codeCompare as a comparison function + * example) * * @return a pointer to a matching item, or NULL if none exists. */ -void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, int32_t (* cmp)(const void * pRef, const void * pElement)); +void * lv_utils_bsearch(const void * key, const void * base, uint32_t n, uint32_t size, + int32_t (*cmp)(const void * pRef, const void * pElement)); /********************** * MACROS diff --git a/src/lv_objx/lv_arc.c b/src/lv_objx/lv_arc.c index e11ebe7e08b0..ec79e2f7795b 100644 --- a/src/lv_objx/lv_arc.c +++ b/src/lv_objx/lv_arc.c @@ -3,7 +3,6 @@ * */ - /********************* * INCLUDES *********************/ @@ -14,7 +13,6 @@ #include "../lv_draw/lv_draw_arc.h" #include "../lv_themes/lv_theme.h" - /********************* * DEFINES *********************/ @@ -69,7 +67,7 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->angle_start = 45; - ext->angle_end = 315; + ext->angle_end = 315; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_arc, lv_arc_signal); @@ -89,8 +87,8 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing arc*/ else { lv_arc_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->angle_start = copy_ext->angle_start; - ext->angle_end = copy_ext->angle_end; + ext->angle_start = copy_ext->angle_start; + ext->angle_end = copy_ext->angle_end; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_arc); @@ -109,7 +107,6 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) * New object specific "add" or "remove" functions come here */ - /*===================== * Setter functions *====================*/ @@ -128,7 +125,7 @@ void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end) if(end > 360) end = 360; ext->angle_start = start; - ext->angle_end = end; + ext->angle_end = end; lv_obj_invalidate(arc); } @@ -142,9 +139,7 @@ void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end) void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t * style) { switch(type) { - case LV_ARC_STYLE_MAIN: - lv_obj_set_style(arc, style); - break; + case LV_ARC_STYLE_MAIN: lv_obj_set_style(arc, style); break; } } @@ -187,12 +182,8 @@ lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type) lv_style_t * style = NULL; switch(type) { - case LV_ARC_STYLE_MAIN: - style = lv_obj_get_style(arc); - break; - default: - style = NULL; - break; + case LV_ARC_STYLE_MAIN: style = lv_obj_get_style(arc); break; + default: style = NULL; break; } return style; @@ -231,24 +222,25 @@ static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc); lv_style_t * style = lv_arc_get_style(arc, LV_ARC_STYLE_MAIN); - lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(arc), lv_obj_get_height(arc))) / 2; - lv_coord_t x = arc->coords.x1 + lv_obj_get_width(arc) / 2; - lv_coord_t y = arc->coords.y1 + lv_obj_get_height(arc) / 2; + lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(arc), lv_obj_get_height(arc))) / 2; + lv_coord_t x = arc->coords.x1 + lv_obj_get_width(arc) / 2; + lv_coord_t y = arc->coords.y1 + lv_obj_get_height(arc) / 2; lv_opa_t opa_scale = lv_obj_get_opa_scale(arc); lv_draw_arc(x, y, r, mask, ext->angle_start, ext->angle_end, style, opa_scale); - /*Draw circle on the ends if enabled */ if(style->line.rounded) { lv_coord_t thick_half = style->line.width / 2; - lv_coord_t cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); - lv_coord_t cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT); + lv_coord_t cir_x = + ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); + lv_coord_t cir_y = + ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT); lv_style_t cir_style; lv_style_copy(&cir_style, &lv_style_plain); cir_style.body.grad_color = style->line.color; cir_style.body.main_color = cir_style.body.grad_color; - cir_style.body.radius = LV_RADIUS_CIRCLE; + cir_style.body.radius = LV_RADIUS_CIRCLE; lv_area_t cir_area; cir_area.x1 = cir_x + x - thick_half; cir_area.y1 = cir_y + y - thick_half; @@ -271,7 +263,6 @@ static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -292,13 +283,12 @@ static lv_res_t lv_arc_signal(lv_obj_t * arc, lv_signal_t sign, void * param) res = ancestor_signal(arc, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_arc"; diff --git a/src/lv_objx/lv_arc.h b/src/lv_objx/lv_arc.h index 49595f34cc34..023ccc85d4be 100644 --- a/src/lv_objx/lv_arc.h +++ b/src/lv_objx/lv_arc.h @@ -3,7 +3,6 @@ * */ - #ifndef LV_ARC_H #define LV_ARC_H @@ -32,21 +31,19 @@ extern "C" { * TYPEDEFS **********************/ /*Data of arc*/ -typedef struct { +typedef struct +{ /*New data for this type */ lv_coord_t angle_start; lv_coord_t angle_end; } lv_arc_ext_t; - /*Styles*/ enum { LV_ARC_STYLE_MAIN, }; typedef uint8_t lv_arc_style_t; - - /********************** * GLOBAL PROTOTYPES **********************/ @@ -63,7 +60,6 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy); * Add/remove functions *=====================*/ - /*===================== * Setter functions *====================*/ @@ -82,7 +78,7 @@ void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end); * @param type which style should be set * @param style pointer to a style * */ -void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t *style); +void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -118,10 +114,10 @@ lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type); * MACROS **********************/ -#endif /*LV_USE_ARC*/ +#endif /*LV_USE_ARC*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_ARC_H*/ +#endif /*LV_ARC_H*/ diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index f6210756a69a..599cb6dc650f 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -70,14 +70,14 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->min_value = 0; - ext->max_value = 100; - ext->cur_value = 0; - ext->anim_time = 200; - ext->anim_start = 0; - ext->anim_end = 0; - ext->anim_state = LV_BAR_ANIM_STATE_INV; - ext->sym = 0; + ext->min_value = 0; + ext->max_value = 100; + ext->cur_value = 0; + ext->anim_time = 200; + ext->anim_start = 0; + ext->anim_end = 0; + ext->anim_state = LV_BAR_ANIM_STATE_INV; + ext->sym = 0; ext->style_indic = &lv_style_pretty_color; lv_obj_set_signal_cb(new_bar, lv_bar_signal); @@ -98,11 +98,11 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) } } else { lv_bar_ext_t * ext_copy = lv_obj_get_ext_attr(copy); - ext->min_value = ext_copy->min_value; - ext->max_value = ext_copy->max_value; - ext->cur_value = ext_copy->cur_value; - ext->style_indic = ext_copy->style_indic; - ext->sym = ext_copy->sym; + ext->min_value = ext_copy->min_value; + ext->max_value = ext_copy->max_value; + ext->cur_value = ext_copy->cur_value; + ext->style_indic = ext_copy->style_indic; + ext->sym = ext_copy->sym; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_bar); @@ -146,34 +146,33 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) /*No animation in progress -> simply set the values*/ if(ext->anim_state == LV_BAR_ANIM_STATE_INV) { ext->anim_start = ext->cur_value; - ext->anim_end = new_value; + ext->anim_end = new_value; } /*Animation in progress. Start from the animation end value*/ else { ext->anim_start = ext->anim_end; - ext->anim_end = new_value; + ext->anim_end = new_value; } lv_anim_t a; - a.var = bar; - a.start = LV_BAR_ANIM_STATE_START; - a.end = LV_BAR_ANIM_STATE_END; - a.fp = (lv_anim_fp_t)lv_bar_animate; - a.path = lv_anim_path_linear; - a.end_cb = lv_bar_anim_ready; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; + a.var = bar; + a.start = LV_BAR_ANIM_STATE_START; + a.end = LV_BAR_ANIM_STATE_END; + a.fp = (lv_anim_fp_t)lv_bar_animate; + a.path = lv_anim_path_linear; + a.end_cb = lv_bar_anim_ready; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif } } - /** * Set minimum and the maximum values of a bar * @param bar pointer to the bar object @@ -199,14 +198,15 @@ void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max) } /** - * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum position. + * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum + * position. * @param bar pointer to a bar object * @param en true: enable disable symmetric behavior; false: disable */ void lv_bar_set_sym(lv_obj_t * bar, bool en) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - ext->sym = en ? 1 : 0; + ext->sym = en ? 1 : 0; } /** @@ -220,9 +220,7 @@ void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style) lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); switch(type) { - case LV_BAR_STYLE_BG: - lv_obj_set_style(bar, style); - break; + case LV_BAR_STYLE_BG: lv_obj_set_style(bar, style); break; case LV_BAR_STYLE_INDIC: ext->style_indic = style; lv_obj_refresh_ext_size(bar); @@ -245,7 +243,8 @@ int16_t lv_bar_get_value(const lv_obj_t * bar) /*If animated tell that it's already at the end value*/ if(ext->anim_state != LV_BAR_ANIM_STATE_INV) return ext->anim_end; /*No animation, simple return the current value*/ - else return ext->cur_value; + else + return ext->cur_value; } /** @@ -293,15 +292,9 @@ lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type) lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); switch(type) { - case LV_BAR_STYLE_BG: - style = lv_obj_get_style(bar); - break; - case LV_BAR_STYLE_INDIC: - style = ext->style_indic; - break; - default: - style = NULL; - break; + case LV_BAR_STYLE_BG: style = lv_obj_get_style(bar); break; + case LV_BAR_STYLE_INDIC: style = ext->style_indic; break; + default: style = NULL; break; } return style; @@ -325,7 +318,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode { if(mode == LV_DESIGN_COVER_CHK) { /*Return false if the object is not covers the mask area*/ - return ancestor_design_f(bar, mask, mode); + return ancestor_design_f(bar, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); @@ -333,7 +326,8 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode ancestor_design_f(bar, mask, mode); #else /* Draw the borders later if the bar is focused. - * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ + * At value = 100% the indicator can cover to whole background and the focused style won't + * be visible*/ if(lv_obj_is_focused(bar)) { lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; @@ -346,7 +340,8 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - if(ext->cur_value != ext->min_value || ext->sym || ext->anim_start != LV_BAR_ANIM_STATE_INV) { + if(ext->cur_value != ext->min_value || ext->sym || + ext->anim_start != LV_BAR_ANIM_STATE_INV) { lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); @@ -362,21 +357,31 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode /*Horizontal*/ if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ - lv_coord_t anim_start_x = (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); - lv_coord_t anim_end_x = (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - indic_area.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + lv_coord_t anim_start_x = + (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / + (ext->max_value - ext->min_value); + lv_coord_t anim_end_x = + (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / + (ext->max_value - ext->min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + indic_area.x2 = + anim_start_x + + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); } else { - indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); + indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / + (ext->max_value - ext->min_value); } indic_area.x2 = indic_area.x1 + indic_area.x2 - 1; if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { /*Calculate the coordinate of the zero point*/ lv_coord_t zero; - zero = indic_area.x1 + (-ext->min_value * w) / (ext->max_value - ext->min_value); - if(indic_area.x2 > zero) indic_area.x1 = zero; + zero = + indic_area.x1 + (-ext->min_value * w) / (ext->max_value - ext->min_value); + if(indic_area.x2 > zero) + indic_area.x1 = zero; else { indic_area.x1 = indic_area.x2; indic_area.x2 = zero; @@ -385,13 +390,21 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } else { if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ - lv_coord_t anim_start_y = (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); - lv_coord_t anim_end_y = (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - indic_area.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + lv_coord_t anim_start_y = + (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / + (ext->max_value - ext->min_value); + lv_coord_t anim_end_y = + (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / + (ext->max_value - ext->min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + indic_area.y1 = + anim_start_y + + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); } else { - indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); + indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / + (ext->max_value - ext->min_value); } indic_area.y1 = indic_area.y2 - indic_area.y1 + 1; @@ -399,8 +412,10 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { /*Calculate the coordinate of the zero point*/ lv_coord_t zero; - zero = indic_area.y2 - (-ext->min_value * h) / (ext->max_value - ext->min_value); - if(indic_area.y1 < zero) indic_area.y2 = zero; + zero = + indic_area.y2 - (-ext->min_value * h) / (ext->max_value - ext->min_value); + if(indic_area.y1 < zero) + indic_area.y2 = zero; else { indic_area.y2 = indic_area.y1; indic_area.y1 = zero; @@ -408,7 +423,6 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } } - /*Draw the indicator*/ lv_draw_rect(&indic_area, mask, style_indic, opa_scale); } @@ -416,16 +430,15 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #if LV_USE_GROUP /*Draw the border*/ if(lv_obj_is_focused(bar)) { - lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); + lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); - style_tmp.body.opa = LV_OPA_TRANSP; + style_tmp.body.opa = LV_OPA_TRANSP; style_tmp.body.shadow.width = 0; lv_draw_rect(&bar->coords, mask, &style_tmp, opa_scale); } #endif - } return true; } @@ -447,11 +460,12 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_REFR_EXT_SIZE) { lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); - if(style_indic->body.shadow.width > bar->ext_size) bar->ext_size = style_indic->body.shadow.width; + if(style_indic->body.shadow.width > bar->ext_size) + bar->ext_size = style_indic->body.shadow.width; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_bar"; @@ -460,20 +474,18 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) return res; } - static void lv_bar_animate(void * bar, int32_t value) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - ext->anim_state = value; + ext->anim_state = value; lv_obj_invalidate(bar); } static void lv_bar_anim_ready(void * bar) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - ext->anim_state = LV_BAR_ANIM_STATE_INV; + ext->anim_state = LV_BAR_ANIM_STATE_INV; lv_bar_set_value(bar, ext->anim_end, false); - } #endif diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index 71cb32fe3018..5634a5fbbe56 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -29,10 +29,10 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_BAR_ANIM_STATE_START 0 -#define LV_BAR_ANIM_STATE_END 256 -#define LV_BAR_ANIM_STATE_INV -1 -#define LV_BAR_ANIM_STATE_NORM 8 /*log2(LV_BAR_ANIM_STATE_END) used to normalize data*/ +#define LV_BAR_ANIM_STATE_START 0 +#define LV_BAR_ANIM_STATE_END 256 +#define LV_BAR_ANIM_STATE_INV -1 +#define LV_BAR_ANIM_STATE_NORM 8 /*log2(LV_BAR_ANIM_STATE_END) used to normalize data*/ /********************** * TYPEDEFS @@ -41,17 +41,17 @@ extern "C" { /*Data of bar*/ typedef struct { - /*No inherited ext*/ /*Ext. of ancestor*/ + /*No inherited ext*/ /*Ext. of ancestor*/ /*New data for this type */ - int16_t cur_value; /*Current value of the bar*/ - int16_t min_value; /*Minimum value of the bar*/ - int16_t max_value; /*Maximum value of the bar*/ + int16_t cur_value; /*Current value of the bar*/ + int16_t min_value; /*Minimum value of the bar*/ + int16_t max_value; /*Maximum value of the bar*/ int16_t anim_start; int16_t anim_end; int16_t anim_state; uint16_t anim_time; - uint8_t sym :1; /*Symmetric: means the center is around zero value*/ - lv_style_t *style_indic; /*Style of the indicator*/ + uint8_t sym : 1; /*Symmetric: means the center is around zero value*/ + lv_style_t * style_indic; /*Style of the indicator*/ } lv_bar_ext_t; enum { @@ -93,7 +93,8 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim); void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max); /** - * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum position. + * Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum + * position. * @param bar pointer to a bar object * @param en true: enable disable symmetric behavior; false: disable */ @@ -105,7 +106,7 @@ void lv_bar_set_sym(lv_obj_t * bar, bool en); * @param type which style should be set * @param style pointer to a style */ -void lv_bar_set_style(lv_obj_t *bar, lv_bar_style_t type, lv_style_t *style); +void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -145,13 +146,13 @@ bool lv_bar_get_sym(lv_obj_t * bar); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_bar_get_style(const lv_obj_t *bar, lv_bar_style_t type); +lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type); /********************** * MACROS **********************/ -#endif /*LV_USE_BAR*/ +#endif /*LV_USE_BAR*/ #ifdef __cplusplus } /* extern "C" */ diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 5b72f07d99b6..6c64f3871ad9 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -21,8 +21,8 @@ /********************* * DEFINES *********************/ -#define LV_BTN_INK_VALUE_MAX 256 -#define LV_BTN_INK_VALUE_MAX_SHIFT 8 +#define LV_BTN_INK_VALUE_MAX 256 +#define LV_BTN_INK_VALUE_MAX_SHIFT 8 /********************** * TYPEDEFS @@ -89,17 +89,17 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) ext->state = LV_BTN_STATE_REL; - ext->styles[LV_BTN_STATE_REL] = &lv_style_btn_rel; - ext->styles[LV_BTN_STATE_PR] = &lv_style_btn_pr; + ext->styles[LV_BTN_STATE_REL] = &lv_style_btn_rel; + ext->styles[LV_BTN_STATE_PR] = &lv_style_btn_pr; ext->styles[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; - ext->styles[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; - ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina; + ext->styles[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; + ext->styles[LV_BTN_STATE_INA] = &lv_style_btn_ina; ext->toggle = 0; #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT - ext->ink_in_time = 0; + ext->ink_in_time = 0; ext->ink_wait_time = 0; - ext->ink_out_time = 0; + ext->ink_out_time = 0; #endif lv_obj_set_signal_cb(new_btn, lv_btn_signal); @@ -112,7 +112,7 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) lv_btn_set_layout(new_btn, LV_LAYOUT_CENTER); } - lv_obj_set_click(new_btn, true); /*Be sure the button is clickable*/ + lv_obj_set_click(new_btn, true); /*Be sure the button is clickable*/ /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -129,12 +129,12 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy 'copy'*/ else { lv_btn_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->state = copy_ext->state; - ext->toggle = copy_ext->toggle; + ext->state = copy_ext->state; + ext->toggle = copy_ext->toggle; #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT - ext->ink_in_time = copy_ext->ink_in_time; + ext->ink_in_time = copy_ext->ink_in_time; ext->ink_wait_time = copy_ext->ink_wait_time; - ext->ink_out_time = copy_ext->ink_out_time; + ext->ink_out_time = copy_ext->ink_out_time; #endif memcpy(ext->styles, copy_ext->styles, sizeof(ext->styles)); @@ -185,20 +185,11 @@ void lv_btn_toggle(lv_obj_t * btn) { lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); switch(ext->state) { - case LV_BTN_STATE_REL: - lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - break; - case LV_BTN_STATE_PR: - lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); - break; - case LV_BTN_STATE_TGL_REL: - lv_btn_set_state(btn, LV_BTN_STATE_REL); - break; - case LV_BTN_STATE_TGL_PR: - lv_btn_set_state(btn, LV_BTN_STATE_PR); - break; - default: - break; + case LV_BTN_STATE_REL: lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); break; + case LV_BTN_STATE_PR: lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); break; + case LV_BTN_STATE_TGL_REL: lv_btn_set_state(btn, LV_BTN_STATE_REL); break; + case LV_BTN_STATE_TGL_PR: lv_btn_set_state(btn, LV_BTN_STATE_PR); break; + default: break; } } @@ -211,11 +202,12 @@ void lv_btn_set_ink_in_time(lv_obj_t * btn, uint16_t time) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - ext->ink_in_time = time; + ext->ink_in_time = time; #else - (void)btn; /*Unused*/ + (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_ink_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION " + "is disabled") #endif } @@ -231,9 +223,10 @@ void lv_btn_set_ink_wait_time(lv_obj_t * btn, uint16_t time) lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); ext->ink_wait_time = time; #else - (void)btn; /*Unused*/ + (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_wait_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION " + "is disabled") #endif } @@ -246,11 +239,12 @@ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - ext->ink_out_time = time; + ext->ink_out_time = time; #else - (void)btn; /*Unused*/ + (void)btn; /*Unused*/ (void)time; /*Unused*/ - LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION is disabled") + LV_LOG_WARN("`lv_btn_set_ink_out_time` has no effect if LV_BTN_INK_EFEFCT or LV_USE_ANIMATION " + "is disabled") #endif } @@ -265,28 +259,17 @@ void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, lv_style_t * style) lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); switch(type) { - case LV_BTN_STYLE_REL: - ext->styles[LV_BTN_STATE_REL] = style; - break; - case LV_BTN_STYLE_PR: - ext->styles[LV_BTN_STATE_PR] = style; - break; - case LV_BTN_STYLE_TGL_REL: - ext->styles[LV_BTN_STATE_TGL_REL] = style; - break; - case LV_BTN_STYLE_TGL_PR: - ext->styles[LV_BTN_STATE_TGL_PR] = style; - break; - case LV_BTN_STYLE_INA: - ext->styles[LV_BTN_STATE_INA] = style; - break; + case LV_BTN_STYLE_REL: ext->styles[LV_BTN_STATE_REL] = style; break; + case LV_BTN_STYLE_PR: ext->styles[LV_BTN_STATE_PR] = style; break; + case LV_BTN_STYLE_TGL_REL: ext->styles[LV_BTN_STATE_TGL_REL] = style; break; + case LV_BTN_STYLE_TGL_PR: ext->styles[LV_BTN_STATE_TGL_PR] = style; break; + case LV_BTN_STYLE_INA: ext->styles[LV_BTN_STATE_INA] = style; break; } /*Refresh the object with the new style*/ lv_obj_set_style(btn, ext->styles[ext->state]); } - /*===================== * Getter functions *====================*/ @@ -330,7 +313,6 @@ uint16_t lv_btn_get_ink_in_time(const lv_obj_t * btn) #endif } - /** * Get the wait time before the ink disappears * @param btn pointer to a button object @@ -374,24 +356,12 @@ lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); switch(type) { - case LV_BTN_STYLE_REL: - style = ext->styles[LV_BTN_STATE_REL]; - break; - case LV_BTN_STYLE_PR: - style = ext->styles[LV_BTN_STATE_PR]; - break; - case LV_BTN_STYLE_TGL_REL: - style = ext->styles[LV_BTN_STATE_TGL_REL]; - break; - case LV_BTN_STYLE_TGL_PR: - style = ext->styles[LV_BTN_STATE_TGL_PR]; - break; - case LV_BTN_STYLE_INA: - style = ext->styles[LV_BTN_STATE_INA]; - break; - default: - style = NULL; - break; + case LV_BTN_STYLE_REL: style = ext->styles[LV_BTN_STATE_REL]; break; + case LV_BTN_STYLE_PR: style = ext->styles[LV_BTN_STATE_PR]; break; + case LV_BTN_STYLE_TGL_REL: style = ext->styles[LV_BTN_STATE_TGL_REL]; break; + case LV_BTN_STYLE_TGL_PR: style = ext->styles[LV_BTN_STATE_TGL_PR]; break; + case LV_BTN_STYLE_INA: style = ext->styles[LV_BTN_STATE_INA]; break; + default: style = NULL; break; } return style; @@ -401,7 +371,6 @@ lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) * STATIC FUNCTIONS **********************/ - /** * Handle the drawing related tasks of the drop down lists * @param btn pointer to an object @@ -432,17 +401,19 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode style_tmp.body.shadow.width = ext->styles[ink_top_state]->body.shadow.width; lv_draw_rect(&btn->coords, mask, &style_tmp, opa_scale); - lv_coord_t w = lv_obj_get_width(btn); - lv_coord_t h = lv_obj_get_height(btn); + lv_coord_t w = lv_obj_get_width(btn); + lv_coord_t h = lv_obj_get_height(btn); lv_coord_t r_max = LV_MATH_MIN(w, h) / 2; /*In the first part of the animation increase the size of the circle (ink effect) */ lv_area_t cir_area; - lv_coord_t coord_state = ink_act_value < LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value : LV_BTN_INK_VALUE_MAX / 2; + lv_coord_t coord_state = ink_act_value < LV_BTN_INK_VALUE_MAX / 2 + ? ink_act_value + : LV_BTN_INK_VALUE_MAX / 2; lv_point_t p_act; - p_act.x = ink_point.x; - p_act.y = ink_point.y; + p_act.x = ink_point.x; + p_act.y = ink_point.y; lv_coord_t x_err = (btn->coords.x1 + w / 2) - p_act.x; lv_coord_t y_err = (btn->coords.y1 + h / 2) - p_act.y; @@ -450,18 +421,28 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode p_act.y += (y_err * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1); lv_coord_t half_side = LV_MATH_MAX(w, h) / 2; - cir_area.x1 = p_act.x - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.y1 = p_act.y - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.x2 = p_act.x + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.y2 = p_act.y + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - - lv_area_intersect(&cir_area, &btn->coords, &cir_area); /*Limit the area. (It might be too big on the smaller side)*/ + cir_area.x1 = + p_act.x - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.y1 = + p_act.y - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.x2 = + p_act.x + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.y2 = + p_act.y + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + + lv_area_intersect( + &cir_area, &btn->coords, + &cir_area); /*Limit the area. (It might be too big on the smaller side)*/ /*In the second part animate the radius. Circle -> body.radius*/ - lv_coord_t r_state = ink_act_value > LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value - LV_BTN_INK_VALUE_MAX / 2 : 0; + lv_coord_t r_state = ink_act_value > LV_BTN_INK_VALUE_MAX / 2 + ? ink_act_value - LV_BTN_INK_VALUE_MAX / 2 + : 0; lv_style_copy(&style_tmp, ext->styles[ink_top_state]); - style_tmp.body.radius = r_max + (((ext->styles[ink_bg_state]->body.radius - r_max) * r_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + style_tmp.body.radius = + r_max + (((ext->styles[ink_bg_state]->body.radius - r_max) * r_state) >> + (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); style_tmp.body.border.width = 0; /*Draw the circle*/ @@ -469,9 +450,9 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode } else { lv_style_t res; lv_style_copy(&res, ext->styles[ink_bg_state]); - lv_style_mix(ext->styles[ink_bg_state], ext->styles[ink_top_state], &res, ink_act_value); + lv_style_mix(ext->styles[ink_bg_state], ext->styles[ink_top_state], &res, + ink_act_value); lv_draw_rect(&btn->coords, mask, &res, opa_scale); - } } #else @@ -500,20 +481,20 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - bool tgl = lv_btn_get_toggle(btn); + bool tgl = lv_btn_get_toggle(btn); if(sign == LV_SIGNAL_PRESSED) { /*Refresh the state*/ if(ext->state == LV_BTN_STATE_REL) { lv_btn_set_state(btn, LV_BTN_STATE_PR); #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT - ink_bg_state = LV_BTN_STATE_REL; + ink_bg_state = LV_BTN_STATE_REL; ink_top_state = LV_BTN_STATE_PR; #endif } else if(ext->state == LV_BTN_STATE_TGL_REL) { lv_btn_set_state(btn, LV_BTN_STATE_TGL_PR); #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT - ink_bg_state = LV_BTN_STATE_TGL_REL; + ink_bg_state = LV_BTN_STATE_TGL_REL; ink_top_state = LV_BTN_STATE_TGL_PR; #endif } @@ -527,36 +508,40 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } /*Save the new data for inking and start it's animation if enabled*/ if(ext->ink_in_time > 0) { - ink_obj = btn; + ink_obj = btn; ink_playback = false; - ink_ready = false; + ink_ready = false; lv_indev_get_point(lv_indev_get_act(), &ink_point); lv_anim_t a; - a.var = btn; - a.start = 0; - a.end = LV_BTN_INK_VALUE_MAX; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; - a.act_time = 0; - a.time = ext->ink_in_time; - a.playback = 0; + a.var = btn; + a.start = 0; + a.end = LV_BTN_INK_VALUE_MAX; + a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; + a.path = lv_anim_path_linear; + a.end_cb = lv_btn_ink_effect_anim_ready; + a.act_time = 0; + a.time = ext->ink_in_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); } #endif } else if(sign == LV_SIGNAL_PRESS_LOST) { /*Refresh the state*/ - if(ext->state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - else if(ext->state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); + if(ext->state == LV_BTN_STATE_PR) + lv_btn_set_state(btn, LV_BTN_STATE_REL); + else if(ext->state == LV_BTN_STATE_TGL_PR) + lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); } else if(sign == LV_SIGNAL_PRESSING) { /*When the button begins to drag revert pressed states to released*/ if(lv_indev_is_dragging(param) != false) { - if(ext->state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); - else if(ext->state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); + if(ext->state == LV_BTN_STATE_PR) + lv_btn_set_state(btn, LV_BTN_STATE_REL); + else if(ext->state == LV_BTN_STATE_TGL_PR) + lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); } } else if(sign == LV_SIGNAL_RELEASED) { /*If not dragged and it was not long press action then @@ -592,23 +577,24 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } /*If not a toggle button and the "IN" inking is ready then start an "OUT" inking*/ else if(ink_ready && ext->ink_out_time > 0) { - ink_obj = btn; - ink_playback = true; /*It is the playback. If not set `lv_btn_ink_effect_anim_ready` will start its own playback*/ + ink_obj = btn; + ink_playback = true; /*It is the playback. If not set `lv_btn_ink_effect_anim_ready` + will start its own playback*/ lv_indev_get_point(lv_indev_get_act(), &ink_point); lv_anim_t a; - a.var = ink_obj; - a.start = LV_BTN_INK_VALUE_MAX; - a.end = 0; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; - a.act_time = 0; - a.time = ext->ink_out_time; - a.playback = 0; + a.var = ink_obj; + a.start = LV_BTN_INK_VALUE_MAX; + a.end = 0; + a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; + a.path = lv_anim_path_linear; + a.end_cb = lv_btn_ink_effect_anim_ready; + a.act_time = 0; + a.time = ext->ink_out_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); } #endif @@ -620,17 +606,21 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); } -// else if(c == LV_GROUP_KEY_ENTER) { -// if(lv_btn_get_toggle(btn)) { -// if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); -// else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); -// } else { -// if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL); -// else if(state == LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); -// } -// res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); -// if(res != LV_RES_OK) return res; -// } + // else if(c == LV_GROUP_KEY_ENTER) { + // if(lv_btn_get_toggle(btn)) { + // if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) + // lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); else if(state == + // LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) + // lv_btn_set_state(btn, LV_BTN_STATE_REL); + // } else { + // if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) + // lv_btn_set_state(btn, LV_BTN_STATE_REL); else if(state == + // LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) + // lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); + // } + // res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); + // if(res != LV_RES_OK) return res; + // } } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { @@ -641,7 +631,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_btn"; @@ -671,28 +661,29 @@ static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val) */ static void lv_btn_ink_effect_anim_ready(void * p) { - (void) p; /*Unused*/ + (void)p; /*Unused*/ - lv_btn_ext_t * ext = lv_obj_get_ext_attr(ink_obj); + lv_btn_ext_t * ext = lv_obj_get_ext_attr(ink_obj); lv_btn_state_t state = lv_btn_get_state(ink_obj); lv_obj_invalidate(ink_obj); ink_ready = true; - if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && ink_playback == false) { + if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && + ink_playback == false) { lv_anim_t a; - a.var = ink_obj; - a.start = LV_BTN_INK_VALUE_MAX; - a.end = 0; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; - a.act_time = -ext->ink_wait_time; - a.time = ext->ink_out_time; - a.playback = 0; + a.var = ink_obj; + a.start = LV_BTN_INK_VALUE_MAX; + a.end = 0; + a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; + a.path = lv_anim_path_linear; + a.end_cb = lv_btn_ink_effect_anim_ready; + a.act_time = -ext->ink_wait_time; + a.time = ext->ink_out_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); ink_playback = true; diff --git a/src/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h index 203f069c3b59..5898b7ed73eb 100644 --- a/src/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -39,8 +39,7 @@ extern "C" { /* Button states * It can be used not only by buttons but other button-like objects too*/ -enum -{ +enum { LV_BTN_STATE_REL, LV_BTN_STATE_PR, LV_BTN_STATE_TGL_REL, @@ -55,14 +54,14 @@ typedef struct { lv_cont_ext_t cont; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ - lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/ + lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ + lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/ #if LV_BTN_INK_EFFECT - uint16_t ink_in_time; /*[ms] Time of ink fill effect (0: disable ink effect)*/ - uint16_t ink_wait_time; /*[ms] Wait before the ink disappears */ - uint16_t ink_out_time; /*[ms] Time of ink disappearing*/ + uint16_t ink_in_time; /*[ms] Time of ink fill effect (0: disable ink effect)*/ + uint16_t ink_wait_time; /*[ms] Wait before the ink disappears */ + uint16_t ink_out_time; /*[ms] Time of ink disappearing*/ #endif - uint8_t toggle :1; /*1: Toggle enabled*/ + uint8_t toggle : 1; /*1: Toggle enabled*/ } lv_btn_ext_t; /*Styles*/ @@ -130,7 +129,8 @@ static inline void lv_btn_set_layout(lv_obj_t * btn, lv_layout_t layout) * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) +static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, + lv_fit_t bottom) { lv_cont_set_fit4(btn, left, right, top, bottom); } @@ -185,7 +185,7 @@ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time); * @param type which style should be set * @param style pointer to a style * */ -void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, lv_style_t *style); +void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -255,7 +255,6 @@ static inline lv_fit_t lv_btn_get_fit_bottom(const lv_obj_t * btn) return lv_cont_get_fit_bottom(btn); } - /** * Get time of the ink in effect (draw a circle on click to animate in the new state) * @param btn pointer to a button object @@ -289,10 +288,10 @@ lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type); * MACROS **********************/ -#endif /*LV_USE_BUTTON*/ +#endif /*LV_USE_BUTTON*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_BTN_H*/ +#endif /*LV_BTN_H*/ diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index b39f741baca8..7d4e74fdd836 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -39,14 +39,12 @@ static uint16_t get_button_from_point(lv_obj_t * btnm, lv_point_t * p); static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** map); static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx); static bool maps_are_identical(const char ** map1, const char ** map2); -static void make_one_button_toggled(lv_obj_t *btnm, uint16_t btn_idx); +static void make_one_button_toggled(lv_obj_t * btnm, uint16_t btn_idx); /********************** * STATIC VARIABLES **********************/ -static const char * lv_btnm_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", - "Btn4", "Btn5", "" - }; +static const char * lv_btnm_def_map[] = {"Btn1", "Btn2", "Btn3", "\n", "Btn4", "Btn5", ""}; static lv_design_cb_t ancestor_design_f; static lv_signal_cb_t ancestor_signal; @@ -62,7 +60,8 @@ static lv_signal_cb_t ancestor_signal; /** * Create a button matrix objects * @param par pointer to an object, it will be the parent of the new button matrix - * @param copy pointer to a button matrix object, if not NULL then the new object will be copied from it + * @param copy pointer to a button matrix object, if not NULL then the new object will be copied + * from it * @return pointer to the created button matrix */ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) @@ -81,19 +80,19 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->btn_cnt = 0; - ext->btn_id_pr = LV_BTNM_BTN_NONE; - ext->btn_id_act = LV_BTNM_BTN_NONE; - ext->button_areas = NULL; - ext->ctrl_bits = NULL; - ext->map_p = NULL; - ext->recolor = 0; - ext->one_toggle = 0; - ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; - ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; + ext->btn_cnt = 0; + ext->btn_id_pr = LV_BTNM_BTN_NONE; + ext->btn_id_act = LV_BTNM_BTN_NONE; + ext->button_areas = NULL; + ext->ctrl_bits = NULL; + ext->map_p = NULL; + ext->recolor = 0; + ext->one_toggle = 0; + ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; + ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; - ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; - ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; + ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; + ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_btnm); @@ -157,7 +156,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) * set/allocation when map hasn't changed. */ lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (!maps_are_identical(ext->map_p, map)) { + if(!maps_are_identical(ext->map_p, map)) { /*Analyze the map and create the required number of buttons*/ allocate_btn_areas_and_controls(btnm, map); @@ -166,43 +165,45 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) /*Set size and positions of the buttons*/ lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); - lv_coord_t max_w = lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; - lv_coord_t max_h = lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom; + lv_coord_t max_w = + lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t max_h = + lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom; lv_coord_t act_y = style_bg->body.padding.top; /*Count the lines to calculate button height*/ uint8_t line_cnt = 1; uint8_t li; for(li = 0; strlen(map[li]) != 0; li++) { - if(strcmp(map[li], "\n") == 0) line_cnt ++; + if(strcmp(map[li], "\n") == 0) line_cnt++; } lv_coord_t btn_h = max_h - ((line_cnt - 1) * style_bg->body.padding.inner); - btn_h = btn_h / line_cnt; - btn_h --; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/ + btn_h = btn_h / line_cnt; + btn_h--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/ /* Count the units and the buttons in a line * (A button can be 1,2,3... unit wide)*/ - uint16_t unit_cnt; /*Number of units in a row*/ - uint16_t unit_act_cnt; /*Number of units currently put in a row*/ - uint16_t btn_cnt; /*Number of buttons in a row*/ - uint16_t i_tot = 0; /*Act. index in the str map*/ - uint16_t btn_i = 0; /*Act. index of button areas*/ - const char ** map_p_tmp = map; + uint16_t unit_cnt; /*Number of units in a row*/ + uint16_t unit_act_cnt; /*Number of units currently put in a row*/ + uint16_t btn_cnt; /*Number of buttons in a row*/ + uint16_t i_tot = 0; /*Act. index in the str map*/ + uint16_t btn_i = 0; /*Act. index of button areas*/ + const char ** map_p_tmp = map; /*Count the units and the buttons in a line*/ while(1) { unit_cnt = 0; - btn_cnt = 0; + btn_cnt = 0; /*Count the buttons in a line*/ while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && - strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ + strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ unit_cnt += get_button_width(ext->ctrl_bits[btn_i + btn_cnt]); - btn_cnt ++; + btn_cnt++; } /*Make sure the last row is at the bottom of 'btnm'*/ - if(map_p_tmp[btn_cnt][0] == '\0') { /*Last row?*/ + if(map_p_tmp[btn_cnt][0] == '\0') { /*Last row?*/ btn_h = max_h - act_y + style_bg->body.padding.bottom - 1; } @@ -221,33 +222,34 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) * act_unit_w = one_unit_w * button_width * do this two operations but the multiply first to divide a greater number */ act_unit_w = (all_unit_w * get_button_width(ext->ctrl_bits[btn_i])) / unit_cnt; - act_unit_w --; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/ + act_unit_w--; /*-1 because e.g. width = 100 means 101 pixels (0..100)*/ /*Always recalculate act_x because of rounding errors */ - act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner + style_bg->body.padding.left; + act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * style_bg->body.padding.inner + + style_bg->body.padding.left; /* Set the button's area. - * If inner padding is zero then use the prev. button x2 as x1 to avoid rounding errors*/ + * If inner padding is zero then use the prev. button x2 as x1 to avoid rounding + * errors*/ if(style_bg->body.padding.inner == 0 && act_x != style_bg->body.padding.left) { - lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, + lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w, act_y + btn_h); } else { - lv_area_set(&ext->button_areas[btn_i], act_x, act_y, - act_x + act_unit_w, act_y + btn_h); + lv_area_set(&ext->button_areas[btn_i], act_x, act_y, act_x + act_unit_w, + act_y + btn_h); } unit_act_cnt += get_button_width(ext->ctrl_bits[btn_i]); - i_tot ++; - btn_i ++; + i_tot++; + btn_i++; } } act_y += btn_h + style_bg->body.padding.inner; - if(strlen(map_p_tmp[btn_cnt]) == 0) break; /*Break on end of map*/ - map_p_tmp = &map_p_tmp[btn_cnt + 1]; /*Set the map to the next line*/ - i_tot ++; /*Skip the '\n'*/ + map_p_tmp = &map_p_tmp[btn_cnt + 1]; /*Set the map to the next line*/ + i_tot++; /*Skip the '\n'*/ } lv_obj_invalidate(btnm); @@ -287,17 +289,14 @@ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (id >= ext->btn_cnt && id != LV_BTNM_BTN_NONE) - return; + if(id >= ext->btn_cnt && id != LV_BTNM_BTN_NONE) return; - if (id == ext->btn_id_pr) - return; + if(id == ext->btn_id_pr) return; ext->btn_id_pr = id; lv_obj_invalidate(btnm); } - /** * Set a style of a button matrix * @param btnm pointer to a button matrix object @@ -309,9 +308,7 @@ void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); switch(type) { - case LV_BTNM_STYLE_BG: - lv_obj_set_style(btnm, style); - break; + case LV_BTNM_STYLE_BG: lv_obj_set_style(btnm, style); break; case LV_BTNM_STYLE_BTN_REL: ext->styles_btn[LV_BTN_STATE_REL] = style; lv_obj_invalidate(btnm); @@ -366,7 +363,6 @@ void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t } invalidate_button_area(btnm, btn_id); - } /** @@ -379,7 +375,7 @@ void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); uint16_t i; - for(i= 0; i < ext->btn_cnt; i++) { + for(i = 0; i < ext->btn_cnt; i++) { lv_btnm_set_btn_ctrl(btnm, i, ctrl, en); } } @@ -396,7 +392,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if (btn_id >= ext->btn_cnt) return; + if(btn_id >= ext->btn_cnt) return; ext->ctrl_bits[btn_id] &= (~LV_BTNM_WIDTH_MASK); ext->ctrl_bits[btn_id] |= (LV_BTNM_WIDTH_MASK & width); @@ -408,12 +404,13 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ -void lv_btnm_set_one_toggle(lv_obj_t *btnm, bool one_toggle) { - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - ext->one_toggle = one_toggle; +void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + ext->one_toggle = one_toggle; - /*If more than one button is toggled only the first one should be*/ - make_one_button_toggled(btnm, 0); + /*If more than one button is toggled only the first one should be*/ + make_one_button_toggled(btnm, 0); } /*===================== @@ -471,7 +468,6 @@ const char * lv_btnm_get_active_btn_text(const lv_obj_t * btnm) } } - /** * Get the pressed button's index. * The button be really pressed by the user or manually set to pressed with `lv_btnm_set_pressed` @@ -487,34 +483,36 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm) /** * Get the button's text * @param btnm pointer to button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (The return value of + * lv_btnm_get_pressed/released) * @return text of btn_index` button */ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - if(btn_id > ext->btn_cnt) return NULL; + if(btn_id > ext->btn_cnt) return NULL; - uint16_t txt_i = 0; - uint16_t btn_i = 0; + uint16_t txt_i = 0; + uint16_t btn_i = 0; - /* Search the text of ext->btn_pr the buttons text in the map - * Skip "\n"-s*/ - while(btn_i != btn_id) { - btn_i ++; - txt_i ++; - if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++; - } + /* Search the text of ext->btn_pr the buttons text in the map + * Skip "\n"-s*/ + while(btn_i != btn_id) { + btn_i++; + txt_i++; + if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i++; + } - if(btn_i == ext->btn_cnt) return NULL; + if(btn_i == ext->btn_cnt) return NULL; - return ext->map_p[txt_i]; + return ext->map_p[txt_i]; } /** * Get the whether a control value is enabled or disabled for button of a button matrix * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (E.g. the return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (E.g. the return value of + * lv_btnm_get_pressed/released) * @param ctrl control values to check (ORed value can be used) * @return true: long press repeat is disabled; false: long press repeat enabled */ @@ -534,31 +532,17 @@ bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) */ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); switch(type) { - case LV_BTNM_STYLE_BG: - style = lv_obj_get_style(btnm); - break; - case LV_BTNM_STYLE_BTN_REL: - style = ext->styles_btn[LV_BTN_STATE_REL]; - break; - case LV_BTNM_STYLE_BTN_PR: - style = ext->styles_btn[LV_BTN_STATE_PR]; - break; - case LV_BTNM_STYLE_BTN_TGL_REL: - style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; - break; - case LV_BTNM_STYLE_BTN_TGL_PR: - style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; - break; - case LV_BTNM_STYLE_BTN_INA: - style = ext->styles_btn[LV_BTN_STATE_INA]; - break; - default: - style = NULL; - break; + case LV_BTNM_STYLE_BG: style = lv_obj_get_style(btnm); break; + case LV_BTNM_STYLE_BTN_REL: style = ext->styles_btn[LV_BTN_STATE_REL]; break; + case LV_BTNM_STYLE_BTN_PR: style = ext->styles_btn[LV_BTN_STATE_PR]; break; + case LV_BTNM_STYLE_BTN_TGL_REL: style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; break; + case LV_BTNM_STYLE_BTN_TGL_PR: style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; break; + case LV_BTNM_STYLE_BTN_INA: style = ext->styles_btn[LV_BTN_STATE_INA]; break; + default: style = NULL; break; } return style; @@ -569,10 +553,11 @@ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) * @param btnm Button matrix object * @return whether "one toggle" mode is enabled */ -bool lv_btnm_get_one_toggle(const lv_obj_t *btnm) { - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); +bool lv_btnm_get_one_toggle(const lv_obj_t * btnm) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - return ext->one_toggle; + return ext->one_toggle; } /********************** @@ -600,7 +585,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo ancestor_design_f(btnm, mask, mode); - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); lv_style_t * bg_style = lv_obj_get_style(btnm); lv_style_t * btn_style; lv_opa_t opa_scale = lv_obj_get_opa_scale(btnm); @@ -619,10 +604,10 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo if(ext->recolor) txt_flag = LV_TXT_FLAG_RECOLOR; - for(btn_i = 0; btn_i < ext->btn_cnt; btn_i ++, txt_i ++) { + for(btn_i = 0; btn_i < ext->btn_cnt; btn_i++, txt_i++) { /*Search the next valid text in the map*/ while(strcmp(ext->map_p[txt_i], "\n") == 0) { - txt_i ++; + txt_i++; } /*Skip hidden buttons*/ @@ -639,12 +624,19 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo /*Load the style*/ bool tgl_state = button_get_tgl_state(ext->ctrl_bits[btn_i]); - if(button_is_inactive(ext->ctrl_bits[btn_i])) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); - else if(btn_i != ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); - else if(btn_i == ext->btn_id_pr && tgl_state == false) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); - else if(btn_i != ext->btn_id_pr && tgl_state == true) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); - else if(btn_i == ext->btn_id_pr && tgl_state == true) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR); - else btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/ + if(button_is_inactive(ext->ctrl_bits[btn_i])) + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_INA); + else if(btn_i != ext->btn_id_pr && tgl_state == false) + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); + else if(btn_i == ext->btn_id_pr && tgl_state == false) + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_PR); + else if(btn_i != ext->btn_id_pr && tgl_state == true) + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_REL); + else if(btn_i == ext->btn_id_pr && tgl_state == true) + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR); + else + btn_style = lv_btnm_get_style( + btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/ lv_style_copy(&style_tmp, btn_style); @@ -659,13 +651,12 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo if(txt_i == 0) { style_tmp.body.border.part &= ~LV_BORDER_LEFT; - } - else if(strcmp(ext->map_p[txt_i - 1],"\n") == 0) { + } else if(strcmp(ext->map_p[txt_i - 1], "\n") == 0) { style_tmp.body.border.part &= ~LV_BORDER_LEFT; } if(ext->map_p[txt_i + 1][0] == '\0' || strcmp(ext->map_p[txt_i + 1], "\n") == 0) { - style_tmp.body.border.part &= ~LV_BORDER_RIGHT; + style_tmp.body.border.part &= ~LV_BORDER_RIGHT; } } lv_draw_rect(&area_tmp, mask, &style_tmp, opa_scale); @@ -674,16 +665,16 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo if(btn_style->glass) btn_style = bg_style; const lv_font_t * font = btn_style->text.font; lv_point_t txt_size; - lv_txt_get_size(&txt_size, ext->map_p[txt_i], font, - btn_style->text.letter_space, btn_style->text.line_space, - lv_area_get_width(&area_btnm), txt_flag); + lv_txt_get_size(&txt_size, ext->map_p[txt_i], font, btn_style->text.letter_space, + btn_style->text.line_space, lv_area_get_width(&area_btnm), txt_flag); area_tmp.x1 += (btn_w - txt_size.x) / 2; area_tmp.y1 += (btn_h - txt_size.y) / 2; area_tmp.x2 = area_tmp.x1 + txt_size.x; area_tmp.y2 = area_tmp.y1 + txt_size.y; - lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, -1, -1); + lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, + -1, -1); } } return true; @@ -711,38 +702,36 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_mem_free(ext->ctrl_bits); } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) { lv_btnm_set_map(btnm, ext->map_p); - } - else if(sign == LV_SIGNAL_PRESSED) { + } else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = lv_indev_get_act(); - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || + lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { uint16_t btn_pr; /*Search the pressed area*/ lv_indev_get_point(param, &p); btn_pr = get_button_from_point(btnm, &p); - invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/; - ext->btn_id_pr = btn_pr; + invalidate_button_area(btnm, ext->btn_id_pr) /*Invalidate the old area*/; + ext->btn_id_pr = btn_pr; ext->btn_id_act = btn_pr; - invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ + invalidate_button_area(btnm, ext->btn_id_pr); /*Invalidate the new area*/ } if(ext->btn_id_act != LV_BTNM_BTN_NONE) { if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == false && - button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && - button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) - { + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } - } - else if(sign == LV_SIGNAL_PRESSING) { + } else if(sign == LV_SIGNAL_PRESSING) { uint16_t btn_pr; /*Search the pressed area*/ lv_indev_get_point(param, &p); btn_pr = get_button_from_point(btnm, &p); /*Invalidate to old and the new areas*/; if(btn_pr != ext->btn_id_pr) { - lv_indev_reset_long_press(param); /*Start the log press time again on the new button*/ + lv_indev_reset_long_press(param); /*Start the log press time again on the new button*/ if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { invalidate_button_area(btnm, ext->btn_id_pr); } @@ -753,10 +742,9 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } } - ext->btn_id_pr = btn_pr; + ext->btn_id_pr = btn_pr; ext->btn_id_act = btn_pr; - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { if(ext->btn_id_pr != LV_BTNM_BTN_NONE) { /*Toggle the button if enabled*/ if(button_is_tgl_enabled(ext->ctrl_bits[ext->btn_id_pr])) { @@ -765,8 +753,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } else { ext->ctrl_bits[ext->btn_id_pr] |= LV_BTNM_CTRL_TGL_STATE; } - if(ext->one_toggle) - make_one_button_toggled(btnm, ext->btn_id_pr); + if(ext->one_toggle) make_one_button_toggled(btnm, ext->btn_id_pr); } /*Invalidate to old pressed area*/; @@ -783,34 +770,28 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) #endif if(button_is_click_trig(ext->ctrl_bits[ext->btn_id_act]) == true && - button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && - button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) - { + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; lv_event_send(btnm, LV_EVENT_SELECTED, &b); } - } - } - else if(sign == LV_SIGNAL_LONG_PRESS_REP) { + } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { if(ext->btn_id_act != LV_BTNM_BTN_NONE) { if(button_is_repeat_disabled(ext->ctrl_bits[ext->btn_id_act]) == false && - button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && - button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) - { + button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && + button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } - } - else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { - ext->btn_id_pr = LV_BTNM_BTN_NONE; + } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { + ext->btn_id_pr = LV_BTNM_BTN_NONE; ext->btn_id_act = LV_BTNM_BTN_NONE; lv_obj_invalidate(btnm); - } - else if(sign == LV_SIGNAL_FOCUS) { + } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_POINTER) { /*Select the clicked button*/ @@ -819,10 +800,12 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) uint16_t btn_i = get_button_from_point(btnm, &p1); ext->btn_id_pr = btn_i; - } else if(indev_type == LV_INDEV_TYPE_ENCODER) { + } else if(indev_type == LV_INDEV_TYPE_ENCODER) { /*In navigation mode don't select any button but in edit mode select the fist*/ - if(lv_group_get_editing(lv_obj_get_group(btnm))) ext->btn_id_pr = 0; - else ext->btn_id_pr = LV_BTNM_BTN_NONE; + if(lv_group_get_editing(lv_obj_get_group(btnm))) + ext->btn_id_pr = 0; + else + ext->btn_id_pr = LV_BTNM_BTN_NONE; } else { ext->btn_id_pr = 0; } @@ -832,35 +815,35 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } - else if(sign == LV_SIGNAL_CONTROL) { + } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT) { - if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; - else ext->btn_id_pr++; + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) + ext->btn_id_pr = 0; + else + ext->btn_id_pr++; if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1; ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } - else if(c == LV_GROUP_KEY_LEFT) { - if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; + } else if(c == LV_GROUP_KEY_LEFT) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; if(ext->btn_id_pr > 0) ext->btn_id_pr--; ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } - else if(c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_GROUP_KEY_DOWN) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ - if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; } else { uint16_t area_below; - lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); + lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); - for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below ++) { - if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 && - pr_center >= ext->button_areas[area_below].x1 && - pr_center <= ext->button_areas[area_below].x2 + style->body.padding.left) { + for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below++) { + if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 && + pr_center >= ext->button_areas[area_below].x1 && + pr_center <= ext->button_areas[area_below].x2 + style->body.padding.left) { break; } } @@ -869,44 +852,40 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } - else if(c == LV_GROUP_KEY_UP) { + } else if(c == LV_GROUP_KEY_UP) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ - if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { + if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; } else { int16_t area_above; - lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); + lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); - for(area_above = ext->btn_id_pr; area_above >= 0; area_above --) { + for(area_above = ext->btn_id_pr; area_above >= 0; area_above--) { if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 && - pr_center >= ext->button_areas[area_above].x1 - style->body.padding.left && - pr_center <= ext->button_areas[area_above].x2) { + pr_center >= ext->button_areas[area_above].x1 - style->body.padding.left && + pr_center <= ext->button_areas[area_above].x2) { break; } } if(area_above >= 0) ext->btn_id_pr = area_above; - } ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } - } - else if(sign == LV_SIGNAL_GET_EDITABLE) { + } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; - } - else if(sign == LV_SIGNAL_GET_TYPE) { + *editable = true; + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_btnm"; } - return res; } @@ -919,10 +898,10 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** { /*Count the buttons in the map*/ uint16_t btn_cnt = 0; - uint16_t i = 0; + uint16_t i = 0; while(strlen(map[i]) != 0) { if(strcmp(map[i], "\n") != 0) { /*Do not count line breaks*/ - btn_cnt ++; + btn_cnt++; } i++; } @@ -957,7 +936,7 @@ static void allocate_btn_areas_and_controls(const lv_obj_t * btnm, const char ** static uint8_t get_button_width(lv_btnm_ctrl_t ctrl_bits) { uint8_t w = ctrl_bits & LV_BTNM_WIDTH_MASK; - return w != 0 ? w: 1; + return w != 0 ? w : 1; } static bool button_is_hidden(lv_btnm_ctrl_t ctrl_bits) @@ -1048,15 +1027,12 @@ static void invalidate_button_area(const lv_obj_t * btnm, uint16_t btn_idx) */ static bool maps_are_identical(const char ** map1, const char ** map2) { - if (map1 == map2) - return true; - if (map1 == NULL || map2 == NULL) - return map1 == map2; + if(map1 == map2) return true; + if(map1 == NULL || map2 == NULL) return map1 == map2; uint16_t i = 0; - while (map1[i][0] != '\0' && map2[i][0] != '\0') { - if (strcmp(map1[i], map2[i]) !=0 ) - return false; + while(map1[i][0] != '\0' && map2[i][0] != '\0') { + if(strcmp(map1[i], map2[i]) != 0) return false; i++; } return map1[i][0] == '\0' && map2[i][0] == '\0'; @@ -1068,15 +1044,14 @@ static bool maps_are_identical(const char ** map1, const char ** map2) * @param btnm Button matrix object * @param btn_idx Button that should remain toggled */ -static void make_one_button_toggled(lv_obj_t *btnm, uint16_t btn_idx) +static void make_one_button_toggled(lv_obj_t * btnm, uint16_t btn_idx) { - /*Save whether the button was toggled*/ - bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); + /*Save whether the button was toggled*/ + bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); - lv_btnm_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE, false); + lv_btnm_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE, false); - if(was_toggled) - lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE, true); + if(was_toggled) lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE, true); } #endif diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index a49a7f240d3b..c6d75eec81ec 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -3,7 +3,6 @@ * */ - #ifndef LV_BTNM_H #define LV_BTNM_H @@ -29,8 +28,8 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_BTNM_WIDTH_MASK 0x0007 -#define LV_BTNM_BTN_NONE 0xFFFF +#define LV_BTNM_WIDTH_MASK 0x0007 +#define LV_BTNM_BTN_NONE 0xFFFF /********************** * TYPEDEFS @@ -38,12 +37,12 @@ extern "C" { /* Type to store button control bits (disabled, hidden etc.) */ enum { - LV_BTNM_CTRL_HIDDEN = 0x0008, - LV_BTNM_CTRL_NO_REPEAT = 0x0010, - LV_BTNM_CTRL_INACTIVE = 0x0020, - LV_BTNM_CTRL_TGL_ENABLE = 0x0040, - LV_BTNM_CTRL_TGL_STATE = 0x0080, - LV_BTNM_CTRL_CLICK_TRIG = 0x0100, + LV_BTNM_CTRL_HIDDEN = 0x0008, + LV_BTNM_CTRL_NO_REPEAT = 0x0010, + LV_BTNM_CTRL_INACTIVE = 0x0020, + LV_BTNM_CTRL_TGL_ENABLE = 0x0040, + LV_BTNM_CTRL_TGL_STATE = 0x0080, + LV_BTNM_CTRL_CLICK_TRIG = 0x0100, }; typedef uint16_t lv_btnm_ctrl_t; @@ -52,15 +51,16 @@ typedef struct { /*No inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ - const char ** map_p; /*Pointer to the current map*/ - lv_area_t *button_areas; /*Array of areas of buttons*/ - lv_btnm_ctrl_t *ctrl_bits; /*Array of control bytes*/ - lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ - uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ - uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ - uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ - uint8_t recolor :1; /*Enable button recoloring*/ - uint8_t one_toggle :1; /*Single button toggled at once*/ + const char ** map_p; /*Pointer to the current map*/ + lv_area_t * button_areas; /*Array of areas of buttons*/ + lv_btnm_ctrl_t * ctrl_bits; /*Array of control bytes*/ + lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ + uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ + uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ + uint16_t + btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ + uint8_t recolor : 1; /*Enable button recoloring*/ + uint8_t one_toggle : 1; /*Single button toggled at once*/ } lv_btnm_ext_t; enum { @@ -80,7 +80,8 @@ typedef uint8_t lv_btnm_style_t; /** * Create a button matrix objects * @param par pointer to an object, it will be the parent of the new button matrix - * @param copy pointer to a button matrix object, if not NULL then the new object will be copied from it + * @param copy pointer to a button matrix object, if not NULL then the new object will be copied + * from it * @return pointer to the created button matrix */ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); @@ -172,7 +173,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ -void lv_btnm_set_one_toggle(lv_obj_t *btnm, bool one_toggle); +void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle); /*===================== * Getter functions @@ -219,7 +220,8 @@ uint16_t lv_btnm_get_pressed_btn(const lv_obj_t * btnm); /** * Get the button's text * @param btnm pointer to button matrix object - * @param btn_id the index a button not counting new line characters. (The return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (The return value of + * lv_btnm_get_pressed/released) * @return text of btn_index` button */ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); @@ -227,7 +229,8 @@ const char * lv_btnm_get_btn_text(const lv_obj_t * btnm, uint16_t btn_id); /** * Get the whether a control value is enabled or disabled for button of a button matrix * @param btnm pointer to a button matrix object - * @param btn_id the index a button not counting new line characters. (E.g. the return value of lv_btnm_get_pressed/released) + * @param btn_id the index a button not counting new line characters. (E.g. the return value of + * lv_btnm_get_pressed/released) * @param ctrl control values to check (ORed value can be used) * @return true: long press repeat is disabled; false: long press repeat enabled */ @@ -246,7 +249,7 @@ lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type); * @param btnm Button matrix object * @return whether "one toggle" mode is enabled */ -bool lv_btnm_get_one_toggle(const lv_obj_t *btnm); +bool lv_btnm_get_one_toggle(const lv_obj_t * btnm); /********************** * MACROS **********************/ diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index cc8087de5010..35585defcf30 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -48,17 +48,15 @@ static const char * get_month_name(lv_obj_t * calendar, int32_t month); static uint8_t get_month_length(int32_t year, int32_t month); static uint8_t is_leap_year(uint32_t year); - /********************** * STATIC VARIABLES **********************/ static lv_signal_cb_t ancestor_signal; static lv_design_cb_t ancestor_design; -static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}; -static const char * month_name[12] = {"January", "February", "March", "April", - "May", "June", "July", "August", - "September", "October", "November", "December" -}; +static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}; +static const char * month_name[12] = {"January", "February", "March", "April", + "May", "June", "July", "August", + "September", "October", "November", "December"}; /********************** * MACROS @@ -91,29 +89,29 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_calendar); /*Initialize the allocated 'ext' */ - ext->today.year = 2018; + ext->today.year = 2018; ext->today.month = 1; - ext->today.day = 1; + ext->today.day = 1; - ext->showed_date.year = 2018; + ext->showed_date.year = 2018; ext->showed_date.month = 1; - ext->showed_date.day = 1; + ext->showed_date.day = 1; - ext->pressed_date.year = 0; + ext->pressed_date.year = 0; ext->pressed_date.month = 0; - ext->pressed_date.day = 0; - - ext->highlighted_dates = NULL; - ext->highlighted_dates_num = 0; - ext->day_names = NULL; - ext->month_names = NULL; - ext->style_header = &lv_style_plain_color; - ext->style_header_pr = &lv_style_pretty_color; + ext->pressed_date.day = 0; + + ext->highlighted_dates = NULL; + ext->highlighted_dates_num = 0; + ext->day_names = NULL; + ext->month_names = NULL; + ext->style_header = &lv_style_plain_color; + ext->style_header_pr = &lv_style_pretty_color; ext->style_highlighted_days = &lv_style_plain_color; - ext->style_inactive_days = &lv_style_btn_ina; - ext->style_week_box = &lv_style_plain_color; - ext->style_today_box = &lv_style_pretty_color; - ext->style_day_names = &lv_style_pretty; + ext->style_inactive_days = &lv_style_btn_ina; + ext->style_week_box = &lv_style_plain_color; + ext->style_today_box = &lv_style_pretty_color; + ext->style_day_names = &lv_style_pretty; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_calendar, lv_calendar_signal); @@ -127,13 +125,20 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_theme_t * th = lv_theme_get_current(); if(th) { lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, th->style.calendar.bg); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, th->style.calendar.header); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, th->style.calendar.header_pr); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, th->style.calendar.day_names); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, th->style.calendar.week_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, th->style.calendar.today_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, th->style.calendar.highlighted_days); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, th->style.calendar.inactive_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, + th->style.calendar.header); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, + th->style.calendar.header_pr); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, + th->style.calendar.day_names); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, + th->style.calendar.week_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, + th->style.calendar.today_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, + th->style.calendar.highlighted_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, + th->style.calendar.inactive_days); } else { lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, &lv_style_pretty); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, ext->style_header); @@ -141,33 +146,35 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, ext->style_day_names); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, ext->style_week_box); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, ext->style_today_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, ext->style_highlighted_days); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, ext->style_inactive_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, + ext->style_highlighted_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, + ext->style_inactive_days); } } /*Copy an existing calendar*/ else { lv_calendar_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->today.year = copy_ext->today.year; - ext->today.month = copy_ext->today.month; - ext->today.day = copy_ext->today.day; + ext->today.year = copy_ext->today.year; + ext->today.month = copy_ext->today.month; + ext->today.day = copy_ext->today.day; - ext->showed_date.year = copy_ext->showed_date.year; + ext->showed_date.year = copy_ext->showed_date.year; ext->showed_date.month = copy_ext->showed_date.month; - ext->showed_date.day = copy_ext->showed_date.day; + ext->showed_date.day = copy_ext->showed_date.day; - ext->highlighted_dates = copy_ext->highlighted_dates; + ext->highlighted_dates = copy_ext->highlighted_dates; ext->highlighted_dates_num = copy_ext->highlighted_dates_num; - ext->day_names = copy_ext->day_names; + ext->day_names = copy_ext->day_names; - ext->month_names = copy_ext->month_names; - ext->style_header = copy_ext->style_header; - ext->style_header_pr = copy_ext->style_header_pr; + ext->month_names = copy_ext->month_names; + ext->style_header = copy_ext->style_header; + ext->style_header_pr = copy_ext->style_header_pr; ext->style_highlighted_days = copy_ext->style_highlighted_days; - ext->style_inactive_days = copy_ext->style_inactive_days; - ext->style_week_box = copy_ext->style_week_box; - ext->style_today_box = copy_ext->style_today_box; - ext->style_day_names = copy_ext->style_day_names; + ext->style_inactive_days = copy_ext->style_inactive_days; + ext->style_week_box = copy_ext->style_week_box; + ext->style_today_box = copy_ext->style_today_box; + ext->style_day_names = copy_ext->style_day_names; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_calendar); } @@ -185,7 +192,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) * New object specific "add" or "remove" functions come here */ - /*===================== * Setter functions *====================*/ @@ -193,14 +199,15 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) /** * Set the today's date * @param calendar pointer to a calendar object - * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value will be saved it can be local variable too. + * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value + * will be saved it can be local variable too. */ void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->today.year = today->year; - ext->today.month = today->month; - ext->today.day = today->day; + ext->today.year = today->year; + ext->today.month = today->month; + ext->today.day = today->day; lv_obj_invalidate(calendar); } @@ -208,14 +215,15 @@ void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today) /** * Set the currently showed * @param calendar pointer to a calendar object - * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value will be saved it can be local variable too. + * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value + * will be saved it can be local variable too. */ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showed) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->showed_date.year = showed->year; - ext->showed_date.month = showed->month; - ext->showed_date.day = showed->day; + ext->showed_date.year = showed->year; + ext->showed_date.month = showed->month; + ext->showed_date.day = showed->day; lv_obj_invalidate(calendar); } @@ -223,42 +231,45 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe /** * Set the the highlighted dates * @param calendar pointer to a calendar object - * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER WILL BE SAVED! CAN'T BE LOCAL ARRAY. + * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER + * WILL BE SAVED! CAN'T BE LOCAL ARRAY. * @param date_num number of dates in the array */ -void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num) +void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, + uint16_t date_num) { - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->highlighted_dates = highlighted; + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + ext->highlighted_dates = highlighted; ext->highlighted_dates_num = date_num; lv_obj_invalidate(calendar); } - /** * Set the name of the days * @param calendar pointer to a calendar object - * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon", ...}` - * Only the pointer will be saved so this variable can't be local which will be destroyed later. + * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. */ void lv_calendar_set_day_names(lv_obj_t * calendar, const char ** day_names) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->day_names = day_names; + ext->day_names = day_names; lv_obj_invalidate(calendar); } /** * Set the name of the month * @param calendar pointer to a calendar object - * @param day_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb", ...}` - * Only the pointer will be saved so this variable can't be local which will be destroyed later. + * @param day_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. */ void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** day_names) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->month_names = day_names; + ext->month_names = day_names; lv_obj_invalidate(calendar); } @@ -273,30 +284,14 @@ void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_sty lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); switch(type) { - case LV_CALENDAR_STYLE_BG: - lv_obj_set_style(calendar, style); - break; - case LV_CALENDAR_STYLE_DAY_NAMES: - ext->style_day_names = style; - break; - case LV_CALENDAR_STYLE_HEADER: - ext->style_header = style; - break; - case LV_CALENDAR_STYLE_HEADER_PR: - ext->style_header_pr = style; - break; - case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: - ext->style_highlighted_days = style; - break; - case LV_CALENDAR_STYLE_INACTIVE_DAYS: - ext->style_inactive_days = style; - break; - case LV_CALENDAR_STYLE_TODAY_BOX: - ext->style_today_box = style; - break; - case LV_CALENDAR_STYLE_WEEK_BOX: - ext->style_week_box = style; - break; + case LV_CALENDAR_STYLE_BG: lv_obj_set_style(calendar, style); break; + case LV_CALENDAR_STYLE_DAY_NAMES: ext->style_day_names = style; break; + case LV_CALENDAR_STYLE_HEADER: ext->style_header = style; break; + case LV_CALENDAR_STYLE_HEADER_PR: ext->style_header_pr = style; break; + case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: ext->style_highlighted_days = style; break; + case LV_CALENDAR_STYLE_INACTIVE_DAYS: ext->style_inactive_days = style; break; + case LV_CALENDAR_STYLE_TODAY_BOX: ext->style_today_box = style; break; + case LV_CALENDAR_STYLE_WEEK_BOX: ext->style_week_box = style; break; } lv_obj_invalidate(calendar); @@ -391,37 +386,19 @@ const char ** lv_calendar_get_month_names(const lv_obj_t * calendar) * */ lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); switch(type) { - case LV_CALENDAR_STYLE_BG: - style = lv_obj_get_style(calendar); - break; - case LV_CALENDAR_STYLE_HEADER: - style = ext->style_header; - break; - case LV_CALENDAR_STYLE_HEADER_PR: - style = ext->style_header_pr; - break; - case LV_CALENDAR_STYLE_DAY_NAMES: - style = ext->style_day_names; - break; - case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: - style = ext->style_highlighted_days; - break; - case LV_CALENDAR_STYLE_INACTIVE_DAYS: - style = ext->style_inactive_days; - break; - case LV_CALENDAR_STYLE_WEEK_BOX: - style = ext->style_week_box; - break; - case LV_CALENDAR_STYLE_TODAY_BOX: - style = ext->style_today_box; - break; - default: - style = NULL; - break; + case LV_CALENDAR_STYLE_BG: style = lv_obj_get_style(calendar); break; + case LV_CALENDAR_STYLE_HEADER: style = ext->style_header; break; + case LV_CALENDAR_STYLE_HEADER_PR: style = ext->style_header_pr; break; + case LV_CALENDAR_STYLE_DAY_NAMES: style = ext->style_day_names; break; + case LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS: style = ext->style_highlighted_days; break; + case LV_CALENDAR_STYLE_INACTIVE_DAYS: style = ext->style_inactive_days; break; + case LV_CALENDAR_STYLE_WEEK_BOX: style = ext->style_week_box; break; + case LV_CALENDAR_STYLE_TODAY_BOX: style = ext->style_today_box; break; + default: style = NULL; break; } return style; @@ -458,7 +435,8 @@ static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_d /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); - lv_draw_rect(&calendar->coords, mask, lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG), opa_scale); + lv_draw_rect(&calendar->coords, mask, lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG), + opa_scale); draw_header(calendar, mask); draw_day_names(calendar, mask); @@ -467,7 +445,6 @@ static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_d } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -488,7 +465,6 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * res = ancestor_signal(calendar, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_PRESSING) { @@ -516,13 +492,13 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * ext->btn_pressing = 0; } else { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); - ext->btn_pressing = 0; + ext->btn_pressing = 0; ext->pressed_date.year = 0; } } else if(sign == LV_SIGNAL_PRESS_LOST) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->pressed_date.year = 0; - ext->btn_pressing = 0; + ext->pressed_date.year = 0; + ext->btn_pressing = 0; lv_obj_invalidate(calendar); } else if(sign == LV_SIGNAL_RELEASED) { @@ -530,51 +506,49 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * if(ext->btn_pressing < 0) { if(ext->showed_date.month <= 1) { ext->showed_date.month = 12; - ext->showed_date.year --; + ext->showed_date.year--; } else { - ext->showed_date.month --; + ext->showed_date.month--; } - } else if(ext->btn_pressing > 0) { + } else if(ext->btn_pressing > 0) { if(ext->showed_date.month >= 12) { ext->showed_date.month = 1; - ext->showed_date.year ++; + ext->showed_date.year++; } else { - ext->showed_date.month ++; + ext->showed_date.month++; } - } - else if(ext->pressed_date.year != 0) - { + } else if(ext->pressed_date.year != 0) { res = lv_event_send(calendar, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } ext->pressed_date.year = 0; - ext->btn_pressing = 0; + ext->btn_pressing = 0; lv_obj_invalidate(calendar); } else if(sign == LV_SIGNAL_CONTROL) { - uint8_t c = *((uint8_t *) param); + uint8_t c = *((uint8_t *)param); lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { if(ext->showed_date.month >= 12) { ext->showed_date.month = 1; - ext->showed_date.year ++; + ext->showed_date.year++; } else { - ext->showed_date.month ++; + ext->showed_date.month++; } lv_obj_invalidate(calendar); } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { if(ext->showed_date.month <= 1) { ext->showed_date.month = 12; - ext->showed_date.year --; + ext->showed_date.year--; } else { - ext->showed_date.month --; + ext->showed_date.month--; } lv_obj_invalidate(calendar); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set date*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set date*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_calendar"; @@ -598,41 +572,45 @@ static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touche lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); days_area.x1 += style_bg->body.padding.left; days_area.x2 -= style_bg->body.padding.right; - days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) - style_bg->body.padding.top; + days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + + get_day_names_height(calendar) - style_bg->body.padding.top; if(lv_area_is_point_on(&days_area, touched_point)) { - lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7; - lv_coord_t h = (days_area.y2 - days_area.y1 + 1) / 6; + lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7; + lv_coord_t h = (days_area.y2 - days_area.y1 + 1) / 6; uint8_t x_pos = 0; - x_pos = (touched_point->x - days_area.x1) / w; + x_pos = (touched_point->x - days_area.x1) / w; if(x_pos > 6) x_pos = 6; uint8_t y_pos = 0; - y_pos = (touched_point->y - days_area.y1) / h; + y_pos = (touched_point->y - days_area.y1) / h; if(y_pos > 5) y_pos = 5; - uint8_t i_pos = 0; - i_pos = (y_pos * 7) + x_pos; + uint8_t i_pos = 0; + i_pos = (y_pos * 7) + x_pos; lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(i_pos < get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) ) { + if(i_pos < get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1)) { ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0); - ext->pressed_date.month = ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); - ext->pressed_date.day = get_month_length(ext->pressed_date.year, ext->pressed_date.month) - - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos; - } - else if(i_pos < (get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + - get_month_length(ext->showed_date.year, ext->showed_date.month))) { - ext->pressed_date.year = ext->showed_date.year; + ext->pressed_date.month = + ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); + ext->pressed_date.day = + get_month_length(ext->pressed_date.year, ext->pressed_date.month) - + get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos; + } else if(i_pos < (get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + + get_month_length(ext->showed_date.year, ext->showed_date.month))) { + ext->pressed_date.year = ext->showed_date.year; ext->pressed_date.month = ext->showed_date.month; - ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); - } - else if(i_pos < 42) { + ext->pressed_date.day = + i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); + } else if(i_pos < 42) { ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0); - ext->pressed_date.month = ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); - ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) - - get_month_length(ext->showed_date.year, ext->showed_date.month); + ext->pressed_date.month = + ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); + ext->pressed_date.day = + i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) - + get_month_length(ext->showed_date.year, ext->showed_date.month); } return true; - }else { + } else { return false; } } @@ -646,7 +624,8 @@ static lv_coord_t get_header_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_header->text.font) + ext->style_header->body.padding.top + ext->style_header->body.padding.bottom ; + return lv_font_get_height(ext->style_header->text.font) + ext->style_header->body.padding.top + + ext->style_header->body.padding.bottom; } /** @@ -658,7 +637,8 @@ static lv_coord_t get_day_names_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.top + ext->style_day_names->body.padding.bottom; + return lv_font_get_height(ext->style_day_names->text.font) + + ext->style_day_names->body.padding.top + ext->style_day_names->body.padding.bottom; } /** @@ -669,7 +649,7 @@ static lv_coord_t get_day_names_height(lv_obj_t * calendar) static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); + lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); lv_area_t header_area; header_area.x1 = calendar->coords.x1; @@ -682,24 +662,27 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) /*Add the year + month name*/ char txt_buf[64]; lv_utils_num_to_str(ext->showed_date.year, txt_buf); - txt_buf[4] = ' '; - txt_buf[5] = '\0'; + txt_buf[4] = ' '; + txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); header_area.y1 += ext->style_header->body.padding.top; - lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, + NULL, -1, -1); /*Add the left arrow*/ lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.left; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, + NULL, -1, -1); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; - header_area.x1 = header_area.x2 - ext->style_header->body.padding.right - - lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, - arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, -1, -1); - + header_area.x1 = + header_area.x2 - ext->style_header->body.padding.right - + lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, + arrow_style->text.line_space, LV_TXT_FLAG_NONE); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, + NULL, -1, -1); } /** @@ -710,21 +693,23 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); + lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); lv_coord_t l_pad = ext->style_day_names->body.padding.left; - lv_coord_t w = lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - ext->style_day_names->body.padding.right; + lv_coord_t w = lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - + ext->style_day_names->body.padding.right; lv_coord_t box_w = w / 7; lv_area_t label_area; - label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; + label_area.y1 = + calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; label_area.y2 = label_area.y1 + lv_font_get_height(ext->style_day_names->text.font); uint32_t i; for(i = 0; i < 7; i++) { label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; label_area.x2 = label_area.x1 + box_w; - lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), + LV_TXT_FLAG_CENTER, NULL, -1, -1); } - } /** @@ -735,41 +720,42 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); + lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); lv_area_t label_area; lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); - label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + - ext->style_day_names->body.padding.top + lv_font_get_height(ext->style_day_names->text.font) + - ext->style_day_names->body.padding.bottom; + label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + + ext->style_day_names->body.padding.top + + lv_font_get_height(ext->style_day_names->text.font) + + ext->style_day_names->body.padding.bottom; label_area.y2 = label_area.y1 + lv_font_get_height(style_bg->text.font); - lv_coord_t w = lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; - lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom; - lv_coord_t box_w = w / 7; + lv_coord_t w = + lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom; + lv_coord_t box_w = w / 7; lv_coord_t vert_space = (h - (6 * lv_font_get_height(style_bg->text.font))) / 5; uint32_t week; uint8_t day_cnt; uint8_t month_start_day = get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); - day_draw_state_t draw_state; /*true: Not the prev. or next month is drawn*/ + day_draw_state_t draw_state; /*true: Not the prev. or next month is drawn*/ lv_style_t * act_style; /*If starting with the first day of the week then the previous month is not visible*/ if(month_start_day == 0) { - day_cnt = 1; + day_cnt = 1; draw_state = DAY_DRAW_ACT_MONTH; - act_style = style_bg; + act_style = style_bg; } else { draw_state = DAY_DRAW_PREV_MONTH; - day_cnt = get_month_length(ext->showed_date.year, ext->showed_date.month - 1); /*Length of the previous month*/ - day_cnt -= month_start_day - 1; /*First visible number of the previous month*/ + day_cnt = get_month_length(ext->showed_date.year, + ext->showed_date.month - 1); /*Length of the previous month*/ + day_cnt -= month_start_day - 1; /*First visible number of the previous month*/ act_style = ext->style_inactive_days; } - bool month_of_today_shown = false; - if(ext->showed_date.year == ext->today.year && - ext->showed_date.month == ext->today.month) { + if(ext->showed_date.year == ext->today.year && ext->showed_date.month == ext->today.month) { month_of_today_shown = true; } @@ -780,13 +766,16 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) for(week = 0; week < 6; week++) { /*Draw the "week box"*/ - if(month_of_today_shown && - ((draw_state == DAY_DRAW_ACT_MONTH && ext->today.day >= day_cnt && ext->today.day < day_cnt + 7) || - (draw_state == DAY_DRAW_PREV_MONTH && ext->today.day <= 7 - month_start_day && week == 0))) { + if(month_of_today_shown && ((draw_state == DAY_DRAW_ACT_MONTH && + ext->today.day >= day_cnt && ext->today.day < day_cnt + 7) || + (draw_state == DAY_DRAW_PREV_MONTH && + ext->today.day <= 7 - month_start_day && week == 0))) { lv_area_t week_box_area; - lv_area_copy(&week_box_area, &label_area); /*'label_area' is already set for this row*/ - week_box_area.x1 = calendar->coords.x1 + style_bg->body.padding.left - ext->style_week_box->body.padding.left; - week_box_area.x2 = calendar->coords.x2 - style_bg->body.padding.right + ext->style_week_box->body.padding.right; + lv_area_copy(&week_box_area, &label_area); /*'label_area' is already set for this row*/ + week_box_area.x1 = calendar->coords.x1 + style_bg->body.padding.left - + ext->style_week_box->body.padding.left; + week_box_area.x2 = calendar->coords.x2 - style_bg->body.padding.right + + ext->style_week_box->body.padding.right; week_box_area.y1 -= ext->style_week_box->body.padding.top; week_box_area.y2 += ext->style_week_box->body.padding.bottom; @@ -803,22 +792,24 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*The previous month is over*/ if(draw_state == DAY_DRAW_PREV_MONTH && day == month_start_day) { draw_state = DAY_DRAW_ACT_MONTH; - day_cnt = 1; - act_style = style_bg; + day_cnt = 1; + act_style = style_bg; } /*The current month is over*/ if(draw_state == DAY_DRAW_ACT_MONTH && - day_cnt > get_month_length(ext->showed_date.year, ext->showed_date.month)) { + day_cnt > get_month_length(ext->showed_date.year, ext->showed_date.month)) { draw_state = DAY_DRAW_NEXT_MONTH; - day_cnt = 1; - act_style = ext->style_inactive_days; + day_cnt = 1; + act_style = ext->style_inactive_days; } - label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + style_bg->body.padding.right; + label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + + style_bg->body.padding.right; label_area.x2 = label_area.x1 + box_w; /*Draw the "today box"*/ - if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && ext->today.day == day_cnt) { + if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && + ext->today.day == day_cnt) { lv_area_t today_box_area; lv_area_copy(&today_box_area, &label_area); today_box_area.x1 = label_area.x1; @@ -832,31 +823,34 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*Get the final style : highlighted/week box/today box/normal*/ lv_style_t * final_style; if(draw_state == DAY_DRAW_PREV_MONTH && - is_highlighted(calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0), - ext->showed_date.month == 1 ? 12 : ext->showed_date.month - 1, - day_cnt)) { + is_highlighted( + calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0), + ext->showed_date.month == 1 ? 12 : ext->showed_date.month - 1, day_cnt)) { final_style = ext->style_highlighted_days; } else if(draw_state == DAY_DRAW_ACT_MONTH && - is_highlighted(calendar, ext->showed_date.year, - ext->showed_date.month, - day_cnt)) { + is_highlighted(calendar, ext->showed_date.year, ext->showed_date.month, + day_cnt)) { final_style = ext->style_highlighted_days; } else if(draw_state == DAY_DRAW_NEXT_MONTH && - is_highlighted(calendar, ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0), - ext->showed_date.month == 12 ? 1 : ext->showed_date.month + 1, - day_cnt)) { + is_highlighted( + calendar, ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0), + ext->showed_date.month == 12 ? 1 : ext->showed_date.month + 1, day_cnt)) { final_style = ext->style_highlighted_days; - } else if(month_of_today_shown && day_cnt == ext->today.day && draw_state == DAY_DRAW_ACT_MONTH) final_style = ext->style_today_box; - else if(in_week_box && draw_state == DAY_DRAW_ACT_MONTH) final_style = ext->style_week_box; - else final_style = act_style; + } else if(month_of_today_shown && day_cnt == ext->today.day && + draw_state == DAY_DRAW_ACT_MONTH) + final_style = ext->style_today_box; + else if(in_week_box && draw_state == DAY_DRAW_ACT_MONTH) + final_style = ext->style_week_box; + else + final_style = act_style; /*Write the day's number*/ lv_utils_num_to_str(day_cnt, buf); - lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, + -1, -1); /*Go to the next day*/ - day_cnt ++; - + day_cnt++; } /*Got to the next weeks row*/ @@ -881,9 +875,8 @@ static bool is_highlighted(lv_obj_t * calendar, int32_t year, int32_t month, int uint32_t i; for(i = 0; i < ext->highlighted_dates_num; i++) { - if(ext->highlighted_dates[i].year == year && - ext->highlighted_dates[i].month == month && - ext->highlighted_dates[i].day == day) { + if(ext->highlighted_dates[i].year == year && ext->highlighted_dates[i].month == month && + ext->highlighted_dates[i].day == day) { return true; } } @@ -901,48 +894,52 @@ static const char * get_day_name(lv_obj_t * calendar, uint8_t day) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(ext->day_names) return ext->day_names[day]; - else return day_name[day]; + if(ext->day_names) + return ext->day_names[day]; + else + return day_name[day]; } /** * Get the month name * @param calendar pointer to a calendar object - * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle previous year + * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle + * previous year * @return */ static const char * get_month_name(lv_obj_t * calendar, int32_t month) { - month --; /*Range of months id [1..12] but range of indexes is [0..11]*/ + month--; /*Range of months id [1..12] but range of indexes is [0..11]*/ if(month < 0) month = 12 + month; lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(ext->month_names) return ext->month_names[month]; - else return month_name[month]; + if(ext->month_names) + return ext->month_names[month]; + else + return month_name[month]; } /** * Get the number of days in a month * @param year a year - * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle previous year + * @param month a month. The range is basically [1..12] but [-11..1] is also supported to handle + * previous year * @return [28..31] */ static uint8_t get_month_length(int32_t year, int32_t month) { - month --; /*Range of months id [1..12] but range of indexes is [0..11]*/ + month--; /*Range of months id [1..12] but range of indexes is [0..11]*/ if(month < 0) { - year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/ + year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/ month = 12 + month; /*`month` is negative, the result will be < 12*/ } if(month >= 12) { - year ++; + year++; month -= 12; } /*month == 1 is february*/ return (month == 1) ? (28 + is_leap_year(year)) : 31 - month % 7 % 2; - - } /** @@ -967,8 +964,8 @@ static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day) uint32_t a = month < 3 ? 1 : 0; uint32_t b = year - a; - uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + - b + (b / 4) - (b / 100) + (b / 400)) % 7; + uint32_t day_of_week = + (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400)) % 7; return day_of_week; } diff --git a/src/lv_objx/lv_calendar.h b/src/lv_objx/lv_calendar.h index 19ca98349eb3..bd6049726ff1 100644 --- a/src/lv_objx/lv_calendar.h +++ b/src/lv_objx/lv_calendar.h @@ -31,24 +31,29 @@ extern "C" { * TYPEDEFS **********************/ -typedef struct { +typedef struct +{ uint16_t year; int8_t month; int8_t day; } lv_calendar_date_t; /*Data of calendar*/ -typedef struct { +typedef struct +{ /*None*/ /*Ext. of ancestor*/ /*New data for this type */ - lv_calendar_date_t today; /*Date of today*/ - lv_calendar_date_t showed_date; /*Currently visible month (day is ignored)*/ - lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an array defined by the user)*/ - uint8_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/ - int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/ + lv_calendar_date_t today; /*Date of today*/ + lv_calendar_date_t showed_date; /*Currently visible month (day is ignored)*/ + lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an + array defined by the user)*/ + uint8_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/ + int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/ lv_calendar_date_t pressed_date; - const char ** day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/ - const char ** month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ + const char ** + day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/ + const char ** + month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ /*Styles*/ lv_style_t * style_header; @@ -62,7 +67,7 @@ typedef struct { /*Styles*/ enum { - LV_CALENDAR_STYLE_BG, /*Also the style of the "normal" date numbers*/ + LV_CALENDAR_STYLE_BG, /*Also the style of the "normal" date numbers*/ LV_CALENDAR_STYLE_HEADER, LV_CALENDAR_STYLE_HEADER_PR, LV_CALENDAR_STYLE_DAY_NAMES, @@ -73,9 +78,6 @@ enum { }; typedef uint8_t lv_calendar_style_t; - - - /********************** * GLOBAL PROTOTYPES **********************/ @@ -92,7 +94,6 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy); * Add/remove functions *=====================*/ - /*===================== * Setter functions *====================*/ @@ -100,39 +101,44 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy); /** * Set the today's date * @param calendar pointer to a calendar object - * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value will be saved it can be local variable too. + * @param today pointer to an `lv_calendar_date_t` variable containing the date of today. The value + * will be saved it can be local variable too. */ void lv_calendar_set_today_date(lv_obj_t * calendar, lv_calendar_date_t * today); /** * Set the currently showed * @param calendar pointer to a calendar object - * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value will be saved it can be local variable too. + * @param showed pointer to an `lv_calendar_date_t` variable containing the date to show. The value + * will be saved it can be local variable too. */ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showed); /** * Set the the highlighted dates * @param calendar pointer to a calendar object - * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER WILL BE SAVED! CAN'T BE LOCAL ARRAY. + * @param highlighted pointer to an `lv_calendar_date_t` array containing the dates. ONLY A POINTER + * WILL BE SAVED! CAN'T BE LOCAL ARRAY. * @param date_num number of dates in the array */ -void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num); - +void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, + uint16_t date_num); /** * Set the name of the days * @param calendar pointer to a calendar object - * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon", ...}` - * Only the pointer will be saved so this variable can't be local which will be destroyed later. + * @param day_names pointer to an array with the names. E.g. `const char * days[7] = {"Sun", "Mon", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. */ void lv_calendar_set_day_names(lv_obj_t * calendar, const char ** day_names); /** * Set the name of the month * @param calendar pointer to a calendar object - * @param day_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb", ...}` - * Only the pointer will be saved so this variable can't be local which will be destroyed later. + * @param day_names pointer to an array with the names. E.g. `const char * days[12] = {"Jan", "Feb", + * ...}` Only the pointer will be saved so this variable can't be local which will be destroyed + * later. */ void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** day_names); @@ -142,7 +148,7 @@ void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** day_names); * @param type which style should be set * @param style pointer to a style * */ -void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_style_t *style); +void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -183,7 +189,6 @@ lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * calendar */ uint16_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * calendar); - /** * Get the name of the days * @param calendar pointer to a calendar object @@ -214,10 +219,10 @@ lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_ * MACROS **********************/ -#endif /*LV_USE_CALENDAR*/ +#endif /*LV_USE_CALENDAR*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_CALENDAR_H*/ +#endif /*LV_CALENDAR_H*/ diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 0d713a91f3e8..d2e8baa19401 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -8,7 +8,7 @@ *********************/ #include #include "lv_canvas.h" -#include "../lv_misc/lv_math.h" +#include "../lv_misc/lv_math.h" #include "../lv_draw/lv_draw_img.h" #if LV_USE_CANVAS != 0 @@ -63,11 +63,11 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->dsc.header.always_zero = 0; - ext->dsc.header.cf = LV_IMG_CF_TRUE_COLOR; - ext->dsc.header.h = 0; - ext->dsc.header.w = 0; - ext->dsc.data_size = 0; - ext->dsc.data = NULL; + ext->dsc.header.cf = LV_IMG_CF_TRUE_COLOR; + ext->dsc.header.h = 0; + ext->dsc.header.w = 0; + ext->dsc.data_size = 0; + ext->dsc.data = NULL; lv_img_set_src(new_canvas, &ext->dsc); @@ -112,9 +112,9 @@ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_ lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); ext->dsc.header.cf = cf; - ext->dsc.header.w = w; - ext->dsc.header.h = h; - ext->dsc.data = buf; + ext->dsc.header.w = w; + ext->dsc.header.h = h; + ext->dsc.data = buf; ext->dsc.data_size = (lv_img_color_format_get_px_size(cf) * w * h) / 8; lv_img_set_src(canvas, &ext->dsc); @@ -128,12 +128,11 @@ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_ * @param c color of the point */ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) -{ - lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); +{ + lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); lv_img_buf_set_px_color(&ext->dsc, x, y, c); lv_obj_invalidate(canvas); - } /** @@ -145,9 +144,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * style) { switch(type) { - case LV_CANVAS_STYLE_MAIN: - lv_img_set_style(canvas, style); - break; + case LV_CANVAS_STYLE_MAIN: lv_img_set_style(canvas, style); break; } } @@ -165,8 +162,8 @@ void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); - + lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); + return lv_img_buf_get_px_color(&ext->dsc, x, y, style); } @@ -194,11 +191,8 @@ lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type lv_style_t * style = NULL; switch(type) { - case LV_CANVAS_STYLE_MAIN: - style = lv_img_get_style(canvas); - break; - default: - style = NULL; + case LV_CANVAS_STYLE_MAIN: style = lv_img_get_style(canvas); break; + default: style = NULL; } return style; @@ -211,13 +205,15 @@ lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type /** * Copy a buffer to the canvas * @param canvas pointer to a canvas object - * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color format + * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color + * format * @param w width of the buffer to copy * @param h height of the buffer to copy * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y) +void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, + lv_coord_t x, lv_coord_t y) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); if(x + w >= ext->dsc.header.w || y + h >= ext->dsc.header.h) { @@ -225,12 +221,12 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l return; } - uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3; - uint32_t px = ext->dsc.header.w * y * px_size + x * px_size; - uint8_t * to_copy8 = (uint8_t *) to_copy; + uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3; + uint32_t px = ext->dsc.header.w * y * px_size + x * px_size; + uint8_t * to_copy8 = (uint8_t *)to_copy; lv_coord_t i; for(i = 0; i < h; i++) { - memcpy((void*)&ext->dsc.data[px], to_copy8, w * px_size); + memcpy((void *)&ext->dsc.data[px], to_copy8, w * px_size); px += ext->dsc.header.w * px_size; to_copy8 += w * px_size; } @@ -245,7 +241,8 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y) +void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, + lv_coord_t y) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); if(x + w >= ext->dsc.header.w || y + h >= ext->dsc.header.h) { @@ -258,35 +255,50 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor return; } - uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3; - uint32_t px = ext->dsc.header.w * y * px_size + x * px_size; - lv_color_t * copy_buf_color = (lv_color_t *) to_copy; - lv_color_t * canvas_buf_color = (lv_color_t *) &ext->dsc.data[px]; + uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3; + uint32_t px = ext->dsc.header.w * y * px_size + x * px_size; + lv_color_t * copy_buf_color = (lv_color_t *)to_copy; + lv_color_t * canvas_buf_color = (lv_color_t *)&ext->dsc.data[px]; lv_coord_t i; lv_coord_t j; for(i = 0; i < h; i++) { for(j = 0; j < w; j++) { #if LV_COLOR_DEPTH == 32 - canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 8; - canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 8; - canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 8; + canvas_buf_color[j].ch.red = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 8; + canvas_buf_color[j].ch.green = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> + 8; + canvas_buf_color[j].ch.blue = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 8; #elif LV_COLOR_DEPTH == 16 - canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 5; - canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 5; -# if LV_COLOR_16_SWAP == 0 - canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 6; -# else - canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; - canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 6; - canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; -# endif /*LV_COLOR_16_SWAP*/ + canvas_buf_color[j].ch.red = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 5; + canvas_buf_color[j].ch.blue = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 5; +#if LV_COLOR_16_SWAP == 0 + canvas_buf_color[j].ch.green = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> + 6; +#else + canvas_buf_color[j].ch.red = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; + canvas_buf_color[j].ch.blue = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 6; + canvas_buf_color[j].ch.red = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; +#endif /*LV_COLOR_16_SWAP*/ #elif LV_COLOR_DEPTH == 8 - canvas_buf_color[j].ch.red = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 3; - canvas_buf_color[j].ch.green = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 3; - canvas_buf_color[j].ch.blue = (uint16_t) ((uint16_t) canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 2; + canvas_buf_color[j].ch.red = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 3; + canvas_buf_color[j].ch.green = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> + 3; + canvas_buf_color[j].ch.blue = + (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 2; #endif } copy_buf_color += w; @@ -307,22 +319,23 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor * @param pivot_y pivot Y of rotation. Relative to the source canvas * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, + lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) { lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas); - lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); - int32_t sinma = lv_trigo_sin(-angle); - int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ + lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); + int32_t sinma = lv_trigo_sin(-angle); + int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ - int32_t img_width = img->header.w; - int32_t img_height = img->header.h; - int32_t dest_width = ext_dst->dsc.header.w; + int32_t img_width = img->header.w; + int32_t img_height = img->header.h; + int32_t dest_width = ext_dst->dsc.header.w; int32_t dest_height = ext_dst->dsc.header.h; int32_t x; int32_t y; - for (x = -offset_x; x < dest_width - offset_x; x++) { - for (y = -offset_y; y < dest_height - offset_y; y++) { + for(x = -offset_x; x < dest_width - offset_x; x++) { + for(y = -offset_y; y < dest_height - offset_y; y++) { /*Get the target point relative coordinates to the pivot*/ int32_t xt = x - pivot_x; int32_t yt = y - pivot_y; @@ -335,13 +348,15 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co int xs_int = xs >> 8; int ys_int = ys >> 8; + if(xs_int >= img_width) + continue; + else if(xs_int < 0) + continue; - if(xs_int >= img_width) continue; - else if(xs_int < 0) continue; - - - if(ys_int >= img_height) continue; - else if(ys_int < 0) continue; + if(ys_int >= img_height) + continue; + else if(ys_int < 0) + continue; /*Get the fractional part of the source pixel*/ int xs_fract = xs & 0xff; @@ -351,43 +366,43 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co * If the fractional > 0x90 mix the source pixel with the right/bottom pixel * In the 0x70..0x90 range use the unchanged source pixel */ - int xn; /*x neightboor*/ - lv_opa_t xr; /*x mix ratio*/ + int xn; /*x neightboor*/ + lv_opa_t xr; /*x mix ratio*/ if(xs_fract < 0x70) { xn = xs_int - 1; xr = xs_fract * 2; - } - else if(xs_fract > 0x90) { + } else if(xs_fract > 0x90) { xn = xs_int + 1; xr = (0xFF - xs_fract) * 2; - } - else { + } else { xn = xs_int; xr = 0xFF; } /*Handle under/overflow*/ - if(xn >= img_width) continue; - else if(xn < 0) continue; + if(xn >= img_width) + continue; + else if(xn < 0) + continue; - int yn; /*y neightboor*/ - lv_opa_t yr; /*y mix ratio*/ + int yn; /*y neightboor*/ + lv_opa_t yr; /*y mix ratio*/ if(ys_fract < 0x70) { yn = ys_int - 1; yr = ys_fract * 2; - } - else if(ys_fract > 0x90) { + } else if(ys_fract > 0x90) { yn = ys_int + 1; yr = (0xFF - ys_fract) * 2; - } - else { + } else { yn = ys_int; yr = 0xFF; } /*Handle under/overflow*/ - if(yn >= img_height) continue; - else if(yn < 0) continue; + if(yn >= img_height) + continue; + else if(yn < 0) + continue; /*Get the mixture of the original source and the neightboor pixels in both directions*/ lv_color_t c_dest_int = lv_img_buf_get_px_color(img, xs_int, ys_int, style); @@ -399,58 +414,71 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co lv_color_t c_dest_xn = lv_img_buf_get_px_color(img, xn, ys_int, style); lv_color_t c_dest_yn = lv_img_buf_get_px_color(img, xs_int, yn, style); - lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); - lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); + lv_color_t x_dest = lv_color_mix(c_dest_int, c_dest_xn, xr); + lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); lv_color_t color_res = lv_color_mix(x_dest, y_dest, LV_OPA_50); - if (x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) - { + if(x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && + y + offset_y < dest_height) { /*If the image has no alpha channel just simple set the result color on the canvas*/ if(lv_img_color_format_has_alpha(img->header.cf) == false) { lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); } else { /*Get result pixel opacity*/ lv_opa_t opa_int = lv_img_buf_get_px_alpha(img, xs_int, ys_int); - lv_opa_t opa_xn = lv_img_buf_get_px_alpha(img, xn, ys_int); - lv_opa_t opa_yn = lv_img_buf_get_px_alpha(img, xs_int, yn); - lv_opa_t opa_x = (opa_int * xr + (opa_xn * (255 - xr))) >> 8; - lv_opa_t opa_y = (opa_int * yr + (opa_yn * (255 - yr))) >> 8; + lv_opa_t opa_xn = lv_img_buf_get_px_alpha(img, xn, ys_int); + lv_opa_t opa_yn = lv_img_buf_get_px_alpha(img, xs_int, yn); + lv_opa_t opa_x = (opa_int * xr + (opa_xn * (255 - xr))) >> 8; + lv_opa_t opa_y = (opa_int * yr + (opa_yn * (255 - yr))) >> 8; lv_opa_t opa_res = (opa_x + opa_y) / 2; if(opa_res <= LV_OPA_MIN) continue; - lv_color_t bg_color = lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style); + lv_color_t bg_color = + lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style); - /*If the canvas has no alpha but the image has mix the image's color with canvas*/ + /*If the canvas has no alpha but the image has mix the image's color with + * canvas*/ if(lv_img_color_format_has_alpha(ext_dst->dsc.header.cf) == false) { - if(opa_res < LV_OPA_MAX) color_res = lv_color_mix(color_res, bg_color, opa_res); - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); + if(opa_res < LV_OPA_MAX) + color_res = lv_color_mix(color_res, bg_color, opa_res); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, + color_res); } - /*Both the image and canvas has alpha channel. Some extra calculation is required*/ + /*Both the image and canvas has alpha channel. Some extra calculation is + required*/ else { - lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y); - /* Pick the foreground if it's fully opaque or the Background is fully transparent*/ + lv_opa_t bg_opa = + lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y); + /* Pick the foreground if it's fully opaque or the Background is fully + * transparent*/ if(opa_res >= LV_OPA_MAX || bg_opa <= LV_OPA_MIN) { - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); - lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, + color_res); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, + opa_res); } /*Opaque background: use simple mix*/ else if(bg_opa >= LV_OPA_MAX) { - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(color_res, bg_color, opa_res)); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, + lv_color_mix(color_res, bg_color, opa_res)); } /*Both colors have alpha. Expensive calculation need to be applied*/ else { - /*Info: https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ - lv_opa_t opa_res_2 = 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8); + /*Info: + * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ + lv_opa_t opa_res_2 = + 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8); if(opa_res_2 == 0) { - opa_res_2 = 1; /*never happens, just to be sure*/ + opa_res_2 = 1; /*never happens, just to be sure*/ } - lv_opa_t ratio = (uint16_t)((uint16_t) opa_res * 255) / opa_res_2; + lv_opa_t ratio = (uint16_t)((uint16_t)opa_res * 255) / opa_res_2; - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(color_res, bg_color, ratio)); - lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res_2); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, + lv_color_mix(color_res, bg_color, ratio)); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, + opa_res_2); } - } } } @@ -458,7 +486,6 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co } lv_obj_invalidate(canvas); - } /** @@ -469,14 +496,14 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co * @param radius radius of the circle * @param color border color of the circle */ -void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, lv_color_t color) +void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, + lv_color_t color) { - int x = radius; - int y = 0; + int x = radius; + int y = 0; int err = 0; - while (x >= y) - { + while(x >= y) { lv_canvas_set_px(canvas, x0 + x, y0 + y, color); lv_canvas_set_px(canvas, x0 + y, y0 + x, color); lv_canvas_set_px(canvas, x0 - y, y0 + x, color); @@ -486,16 +513,14 @@ void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_c lv_canvas_set_px(canvas, x0 + y, y0 - x, color); lv_canvas_set_px(canvas, x0 + x, y0 - y, color); - if (err <= 0) - { + if(err <= 0) { y += 1; - err += 2*y + 1; + err += 2 * y + 1; } - if (err > 0) - { + if(err > 0) { x -= 1; - err -= 2*x + 1; + err -= 2 * x + 1; } } } @@ -518,17 +543,23 @@ void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2 x1 = point2.x; y1 = point2.y; - int dx = abs(x1-x0), sx = x0dy ? dx : -dy)/2, e2; + int dx = abs(x1 - x0), sx = x0 < x1 ? 1 : -1; + int dy = abs(y1 - y0), sy = y0 < y1 ? 1 : -1; + int err = (dx > dy ? dx : -dy) / 2, e2; - for(;;){ + for(;;) { lv_canvas_set_px(canvas, x0, y0, color); - if (x0==x1 && y0==y1) break; + if(x0 == x1 && y0 == y1) break; e2 = err; - if (e2 >-dx) { err -= dy; x0 += sx; } - if (e2 < dy) { err += dx; y0 += sy; } + if(e2 > -dx) { + err -= dy; + x0 += sx; + } + if(e2 < dy) { + err += dx; + y0 += sy; + } } } @@ -565,7 +596,7 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, { uint8_t i; - for(i=0; i < (size - 1); i++) { + for(i = 0; i < (size - 1); i++) { lv_canvas_draw_line(canvas, points[i], points[i + 1], color); } @@ -580,12 +611,13 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, * @param boundary_color line color of the polygon * @param fill_color fill color of the polygon */ -void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t boundary_color, lv_color_t fill_color) +void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, + lv_color_t boundary_color, lv_color_t fill_color) { uint32_t x = 0, y = 0; uint8_t i; - for(i=0; itype[i] == NULL) break; } buf->type[i] = "lv_canvas"; diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index fd37c22d9c19..ff1cf548e5d0 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -32,20 +32,19 @@ extern "C" { * TYPEDEFS **********************/ /*Data of canvas*/ -typedef struct { +typedef struct +{ lv_img_ext_t img; /*Ext. of ancestor*/ /*New data for this type */ lv_img_dsc_t dsc; } lv_canvas_ext_t; - /*Styles*/ enum { LV_CANVAS_STYLE_MAIN, }; typedef uint8_t lv_canvas_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -75,7 +74,8 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy); * @param cf color format. The following formats are supported: * LV_IMG_CF_TRUE_COLOR, LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, LV_IMG_CF_INDEXES_1/2/4/8BIT */ -void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf); +void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, + lv_img_cf_t cf); /** * Set the color of a pixel on the canvas @@ -129,13 +129,15 @@ lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type /** * Copy a buffer to the canvas * @param canvas pointer to a canvas object - * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color format + * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color + * format * @param w width of the buffer to copy * @param h height of the buffer to copy * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); +void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, + lv_coord_t x, lv_coord_t y); /** * Multiply a buffer with the canvas @@ -146,7 +148,8 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); +void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, + lv_coord_t y); /** * Rotate and image and store the result on a canvas. @@ -161,7 +164,8 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor * @param pivot_y pivot Y of rotation. Relative to the source canvas * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_coord_t offset_x, lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, + lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); /** * Draw circle function of the canvas @@ -171,7 +175,8 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle,lv_co * @param radius radius of the circle * @param color border color of the circle */ -void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, lv_color_t color); +void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, + lv_color_t color); /** * Draw line function of the canvas @@ -217,16 +222,18 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, * @param boundary_color line color of the polygon * @param fill_color fill color of the polygon */ -void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t boundary_color, lv_color_t fill_color); +void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, + lv_color_t boundary_color, lv_color_t fill_color); /** * Boundary fill function of the canvas * @param canvas pointer to a canvas object * @param x x coordinate of the start position (seed) * @param y y coordinate of the start position (seed) * @param boundary_color edge/boundary color of the area - * @param fill_color fill color of the area + * @param fill_color fill color of the area */ -void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t boundary_color, lv_color_t fill_color); +void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, + lv_color_t boundary_color, lv_color_t fill_color); /** * Flood fill function of the canvas @@ -236,31 +243,42 @@ void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_ * @param fill_color fill color of the area * @param bg_color background color of the area */ -void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t fill_color, lv_color_t bg_color); +void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t fill_color, + lv_color_t bg_color); /********************** * MACROS **********************/ -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w,h) ((LV_COLOR_SIZE / 8) * w * h) -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w,h) ((LV_COLOR_SIZE / 8) * w * h) -#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w,h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) - -#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w,h) ((((w / 8) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w,h) + 4 * 2) /*4 * 2: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w,h) ((((w / 4) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w,h) + 4 * 4) /*4 * 4: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w,h) ((((w / 2) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w,h) + 4 * 16) /*4 * 16: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w,h) ((w * h)) -#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w,h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w,h) + 4 * 256) /*4 * 256: palette*/ - -#endif /*LV_USE_CANVAS*/ +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_SIZE / 8) * w * h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h) +#define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) + +#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) \ + ((((w / 8) + 1) * \ + h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) \ + (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) /*4 * 2: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) \ + ((((w / 4) + 1) * \ + h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) \ + (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) /*4 * 4: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) \ + ((((w / 2) + 1) * \ + h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) \ + (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) /*4 * 16: palette*/ + +#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h)) +#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) \ + (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) /*4 * 256: palette*/ + +#endif /*LV_USE_CANVAS*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_CANVAS_H*/ +#endif /*LV_CANVAS_H*/ diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index a049fc227d98..a96e1bd9d37e 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -66,7 +66,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; ext->bullet = NULL; - ext->label = NULL; + ext->label = NULL; lv_obj_set_signal_cb(new_cb, lv_cb_signal); lv_obj_set_design_cb(new_cb, lv_cb_design); @@ -74,7 +74,8 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new checkbox object*/ if(copy == NULL) { ext->bullet = lv_btn_create(new_cb, NULL); - if(ancestor_bullet_design == NULL) ancestor_bullet_design = lv_obj_get_design_func(ext->bullet); + if(ancestor_bullet_design == NULL) + ancestor_bullet_design = lv_obj_get_design_func(ext->bullet); lv_obj_set_click(ext->bullet, false); ext->label = lv_label_create(new_cb, NULL); @@ -100,8 +101,8 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) } } else { lv_cb_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->bullet = lv_btn_create(new_cb, copy_ext->bullet); - ext->label = lv_label_create(new_cb, copy_ext->label); + ext->bullet = lv_btn_create(new_cb, copy_ext->bullet); + ext->label = lv_label_create(new_cb, copy_ext->label); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_cb); @@ -109,7 +110,6 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_design_cb(ext->bullet, lv_bullet_design); - LV_LOG_INFO("check box created"); return new_cb; @@ -137,7 +137,8 @@ void lv_cb_set_text(lv_obj_t * cb, const char * txt) * @param cb pointer to a check box * @param txt the text of the check box. NULL to refresh with the current text. */ -void lv_cb_set_static_text(lv_obj_t * cb, const char * txt) { +void lv_cb_set_static_text(lv_obj_t * cb, const char * txt) +{ lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); lv_label_set_static_text(ext->label, txt); } @@ -160,26 +161,18 @@ void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, lv_style_t * style) lv_btn_set_style(cb, LV_BTN_STYLE_TGL_PR, style); lv_btn_set_style(cb, LV_BTN_STYLE_INA, style); break; - case LV_CB_STYLE_BOX_REL: - lv_btn_set_style(ext->bullet, LV_BTN_STYLE_REL, style); - break; - case LV_CB_STYLE_BOX_PR: - lv_btn_set_style(ext->bullet, LV_BTN_STYLE_PR, style); - break; + case LV_CB_STYLE_BOX_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_REL, style); break; + case LV_CB_STYLE_BOX_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_PR, style); break; case LV_CB_STYLE_BOX_TGL_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_REL, style); break; case LV_CB_STYLE_BOX_TGL_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_PR, style); break; - case LV_CB_STYLE_BOX_INA: - lv_btn_set_style(ext->bullet, LV_BTN_STYLE_INA, style); - break; + case LV_CB_STYLE_BOX_INA: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_INA, style); break; } } - - /*===================== * Getter functions *====================*/ @@ -195,7 +188,6 @@ const char * lv_cb_get_text(const lv_obj_t * cb) return lv_label_get_text(ext->label); } - /** * Get a style of a button * @param cb pointer to check box object @@ -205,27 +197,19 @@ const char * lv_cb_get_text(const lv_obj_t * cb) lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type) { lv_style_t * style = NULL; - lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); + lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); switch(type) { - case LV_CB_STYLE_BOX_REL: - style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_REL); - break; - case LV_CB_STYLE_BOX_PR: - style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_PR); - break; + case LV_CB_STYLE_BOX_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_REL); break; + case LV_CB_STYLE_BOX_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_PR); break; case LV_CB_STYLE_BOX_TGL_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_REL); break; case LV_CB_STYLE_BOX_TGL_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_PR); break; - case LV_CB_STYLE_BOX_INA: - style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_INA); - break; - default: - style = NULL; - break; + case LV_CB_STYLE_BOX_INA: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_INA); break; + default: style = NULL; break; } return style; @@ -253,7 +237,7 @@ static bool lv_cb_design(lv_obj_t * cb, const lv_area_t * mask, lv_design_mode_t /*Return false if the object is not covers the mask_p area*/ result = ancestor_bg_design(cb, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN || mode == LV_DESIGN_DRAW_POST) { - lv_cb_ext_t * cb_ext = lv_obj_get_ext_attr(cb); + lv_cb_ext_t * cb_ext = lv_obj_get_ext_attr(cb); lv_btn_ext_t * bullet_ext = lv_obj_get_ext_attr(cb_ext->bullet); /*Be sure the state of the bullet is the same as the parent button*/ @@ -287,22 +271,22 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig /* If the check box is the active in a group and * the background is not visible (transparent) * then activate the style of the bullet*/ - lv_style_t * style_ori = lv_obj_get_style(bullet); - lv_obj_t * bg = lv_obj_get_parent(bullet); + lv_style_t * style_ori = lv_obj_get_style(bullet); + lv_obj_t * bg = lv_obj_get_parent(bullet); lv_style_t * style_page = lv_obj_get_style(bg); - lv_group_t * g = lv_obj_get_group(bg); + lv_group_t * g = lv_obj_get_group(bg); if(style_page->body.opa == LV_OPA_TRANSP) { /*Is the Background visible?*/ if(lv_group_get_focused(g) == bg) { lv_style_t * style_mod; - style_mod = lv_group_mod_style(g, style_ori); - bullet->style_p = style_mod; /*Temporally change the style to the activated */ + style_mod = lv_group_mod_style(g, style_ori); + bullet->style_p = style_mod; /*Temporally change the style to the activated */ } } #endif ancestor_bullet_design(bullet, mask, mode); #if LV_USE_GROUP - bullet->style_p = style_ori; /*Revert the style*/ + bullet->style_p = style_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { ancestor_bullet_design(bullet, mask, mode); @@ -311,7 +295,6 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig return true; } - /** * Signal function of the check box * @param cb pointer to a check box object @@ -331,22 +314,22 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_STYLE_CHG) { lv_style_t * label_style = lv_label_get_style(ext->label); - lv_obj_set_size(ext->bullet, lv_font_get_height(label_style->text.font), lv_font_get_height(label_style->text.font)); + lv_obj_set_size(ext->bullet, lv_font_get_height(label_style->text.font), + lv_font_get_height(label_style->text.font)); lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); - } else if(sign == LV_SIGNAL_PRESSED || - sign == LV_SIGNAL_RELEASED || + } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN || - c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { + if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN || c == LV_GROUP_KEY_LEFT || + c == LV_GROUP_KEY_UP) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_cb"; diff --git a/src/lv_objx/lv_cb.h b/src/lv_objx/lv_cb.h index 3e8c38f20480..cae312fa171f 100644 --- a/src/lv_objx/lv_cb.h +++ b/src/lv_objx/lv_cb.h @@ -47,8 +47,8 @@ typedef struct { lv_btn_ext_t bg_btn; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * bullet; /*Pointer to button*/ - lv_obj_t * label; /*Pointer to label*/ + lv_obj_t * bullet; /*Pointer to button*/ + lv_obj_t * label; /*Pointer to label*/ } lv_cb_ext_t; enum { @@ -118,7 +118,7 @@ static inline void lv_cb_set_inactive(lv_obj_t * cb) * @param type which style should be set * @param style pointer to a style * */ -void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, lv_style_t *style); +void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -153,10 +153,10 @@ lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type); * MACROS **********************/ -#endif /*LV_USE_CB*/ +#endif /*LV_USE_CB*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_CB_H*/ +#endif /*LV_CB_H*/ diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 5dcd3be20a15..80a25758f3a3 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -15,14 +15,14 @@ /********************* * DEFINES *********************/ -#define LV_CHART_YMIN_DEF 0 -#define LV_CHART_YMAX_DEF 100 -#define LV_CHART_HDIV_DEF 3 -#define LV_CHART_VDIV_DEF 5 -#define LV_CHART_PNUM_DEF 10 +#define LV_CHART_YMIN_DEF 0 +#define LV_CHART_YMAX_DEF 100 +#define LV_CHART_HDIV_DEF 3 +#define LV_CHART_VDIV_DEF 5 +#define LV_CHART_PNUM_DEF 10 #define LV_CHART_AXIS_TO_LABEL_DISTANCE 4 -#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1/15 -#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2/3 +#define LV_CHART_AXIS_MAJOR_TICK_LEN_COE 1 / 15 +#define LV_CHART_AXIS_MINOR_TICK_LEN_COE 2 / 3 #define LV_CHART_AXIS_X_TICK_OFFSET_FIX 1 #define LV_CHART_AXIS_Y_TICK_OFFSET_FIX 0 @@ -60,7 +60,8 @@ static lv_signal_cb_t ancestor_signal; /** * Create a chart background objects * @param par pointer to an object, it will be the parent of the new chart background - * @param copy pointer to a chart background object, if not NULL then the new object will be copied from it + * @param copy pointer to a chart background object, if not NULL then the new object will be copied + * from it * @return pointer to the created chart background */ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) @@ -78,17 +79,17 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; lv_ll_init(&ext->series_ll, sizeof(lv_chart_series_t)); - ext->series.num = 0; - ext->ymin = LV_CHART_YMIN_DEF; - ext->ymax = LV_CHART_YMAX_DEF; - ext->hdiv_cnt = LV_CHART_HDIV_DEF; - ext->vdiv_cnt = LV_CHART_VDIV_DEF; - ext->point_cnt = LV_CHART_PNUM_DEF; - ext->type = LV_CHART_TYPE_LINE; - ext->series.opa = LV_OPA_COVER; - ext->series.dark = LV_OPA_50; + ext->series.num = 0; + ext->ymin = LV_CHART_YMIN_DEF; + ext->ymax = LV_CHART_YMAX_DEF; + ext->hdiv_cnt = LV_CHART_HDIV_DEF; + ext->vdiv_cnt = LV_CHART_VDIV_DEF; + ext->point_cnt = LV_CHART_PNUM_DEF; + ext->type = LV_CHART_TYPE_LINE; + ext->series.opa = LV_OPA_COVER; + ext->series.dark = LV_OPA_50; ext->series.width = 2; - ext->margin = 0; + ext->margin = 0; memset(&ext->x_axis, 0, sizeof(ext->x_axis)); memset(&ext->y_axis, 0, sizeof(ext->y_axis)); @@ -112,14 +113,14 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) } else { lv_chart_ext_t * ext_copy = lv_obj_get_ext_attr(copy); - ext->type = ext_copy->type; - ext->ymin = ext_copy->ymin; - ext->ymax = ext_copy->ymax; - ext->hdiv_cnt = ext_copy->hdiv_cnt; - ext->vdiv_cnt = ext_copy->vdiv_cnt; - ext->point_cnt = ext_copy->point_cnt; - ext->series.opa = ext_copy->series.opa; - ext->margin = ext_copy->margin; + ext->type = ext_copy->type; + ext->ymin = ext_copy->ymin; + ext->ymax = ext_copy->ymax; + ext->hdiv_cnt = ext_copy->hdiv_cnt; + ext->vdiv_cnt = ext_copy->vdiv_cnt; + ext->point_cnt = ext_copy->point_cnt; + ext->series.opa = ext_copy->series.opa; + ext->margin = ext_copy->margin; memcpy(&ext->x_axis, &ext_copy->x_axis, sizeof(lv_chart_axis_cfg_t)); memcpy(&ext->y_axis, &ext_copy->y_axis, sizeof(lv_chart_axis_cfg_t)); @@ -129,7 +130,6 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) LV_LOG_INFO("chart created"); - return new_chart; } @@ -145,7 +145,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) */ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); lv_chart_series_t * ser = lv_ll_ins_head(&ext->series_ll); lv_mem_assert(ser); if(ser == NULL) return NULL; @@ -185,19 +185,16 @@ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color) */ void lv_chart_clear_serie(lv_obj_t * chart, lv_chart_series_t * serie) { - if(chart == NULL || serie == NULL) - return; + if(chart == NULL || serie == NULL) return; lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); if(ext == NULL) return; uint32_t i; - for(i = 0; i < ext->point_cnt; i++) - { + for(i = 0; i < ext->point_cnt; i++) { serie->points[i] = LV_CHART_POINT_DEF; } serie->start_point = 0; - } /*===================== @@ -270,7 +267,8 @@ void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt) if(point_cnt < 1) point_cnt = 1; - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { if(ser->start_point != 0) { lv_coord_t * new_points = lv_mem_alloc(sizeof(lv_coord_t) * point_cnt); lv_mem_assert(new_points); @@ -278,14 +276,16 @@ void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt) if(point_cnt >= point_cnt_old) { for(i = 0; i < point_cnt_old; i++) { - new_points[i] = ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/ + new_points[i] = ser->points[(i + ser->start_point) % + point_cnt_old]; /*Copy old contents to new array*/ } for(i = point_cnt_old; i < point_cnt; i++) { - new_points[i] = def; /*Fill up the rest with default value*/ + new_points[i] = def; /*Fill up the rest with default value*/ } } else { for(i = 0; i < point_cnt; i++) { - new_points[i] = ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/ + new_points[i] = ser->points[(i + ser->start_point) % + point_cnt_old]; /*Copy old contents to new array*/ } } @@ -394,7 +394,8 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - ser->points[ser->start_point] = y; /*This was the place of the former left most value, after shifting it is the rightmost*/ + ser->points[ser->start_point] = + y; /*This was the place of the former left most value, after shifting it is the rightmost*/ ser->start_point = (ser->start_point + 1) % ext->point_cnt; lv_chart_refresh(chart); @@ -404,11 +405,11 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) * Set the margin around the chart, used for axes value and labels * @param margin value of the margin */ -void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin) +void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - ext->margin = margin; - lv_obj_refresh_ext_size(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + ext->margin = margin; + lv_obj_refresh_ext_size(chart); } /** @@ -421,34 +422,28 @@ void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin) * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ -void lv_chart_set_x_ticks( lv_obj_t* chart, - const char* list_of_values, - uint8_t num_tick_marks, - uint8_t major_tick_len, - uint8_t minor_tick_len, - lv_chart_axis_options_t options) +void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, + uint8_t major_tick_len, uint8_t minor_tick_len, + lv_chart_axis_options_t options) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->x_axis.num_tick_marks = num_tick_marks; ext->x_axis.list_of_values = list_of_values; ext->x_axis.major_tick_len = major_tick_len; ext->x_axis.minor_tick_len = minor_tick_len; - ext->x_axis.options = options; + ext->x_axis.options = options; } -void lv_chart_set_y_ticks( lv_obj_t* chart, - const char* list_of_values, - uint8_t num_tick_marks, - uint8_t major_tick_len, - uint8_t minor_tick_len, - lv_chart_axis_options_t options) +void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, + uint8_t major_tick_len, uint8_t minor_tick_len, + lv_chart_axis_options_t options) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->y_axis.num_tick_marks = num_tick_marks; ext->y_axis.list_of_values = list_of_values; ext->y_axis.major_tick_len = major_tick_len; ext->y_axis.minor_tick_len = minor_tick_len; - ext->y_axis.options = options; + ext->y_axis.options = options; } /*===================== @@ -528,10 +523,10 @@ void lv_chart_refresh(lv_obj_t * chart) * @param chart pointer to an chart object * @param return value of the margin */ -uint16_t lv_chart_get_margin(lv_obj_t* chart) +uint16_t lv_chart_get_margin(lv_obj_t * chart) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - return ext->margin; + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + return ext->margin; } /********************** @@ -589,20 +584,21 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(sign == LV_SIGNAL_CLEANUP) { lv_coord_t ** datal; - LV_LL_READ(ext->series_ll, datal) { + LV_LL_READ(ext->series_ll, datal) + { lv_mem_free(*datal); } lv_ll_clear(&ext->series_ll); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_chart"; } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - /*Provide extra px draw area around the chart*/ - chart->ext_size = ext->margin; + /*Provide extra px draw area around the chart*/ + chart->ext_size = ext->margin; } return res; @@ -616,16 +612,16 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_style_t * style = lv_obj_get_style(chart); - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_style_t * style = lv_obj_get_style(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); uint8_t div_i; uint8_t div_i_end; uint8_t div_i_start; lv_point_t p1; lv_point_t p2; - lv_coord_t w = lv_obj_get_width(chart) - 1; - lv_coord_t h = lv_obj_get_height(chart) - 1; + lv_coord_t w = lv_obj_get_width(chart) - 1; + lv_coord_t h = lv_obj_get_height(chart) - 1; lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; @@ -633,19 +629,21 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) /*Draw slide lines if no border*/ if(style->body.border.width != 0) { div_i_start = 1; - div_i_end = ext->hdiv_cnt; + div_i_end = ext->hdiv_cnt; } else { div_i_start = 0; - div_i_end = ext->hdiv_cnt + 1; + div_i_end = ext->hdiv_cnt + 1; } p1.x = 0 + x_ofs; p2.x = w + x_ofs; for(div_i = div_i_start; div_i <= div_i_end; div_i++) { p1.y = (int32_t)((int32_t)h * div_i) / (ext->hdiv_cnt + 1); - p1.y += y_ofs; - if(div_i == div_i_start) p1.y += (style->line.width >> 1) + 1; /*The first line might not be visible*/ - if(div_i == div_i_end) p1.y -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ + p1.y += y_ofs; + if(div_i == div_i_start) + p1.y += (style->line.width >> 1) + 1; /*The first line might not be visible*/ + if(div_i == div_i_end) + p1.y -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ p2.y = p1.y; lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -656,19 +654,21 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) /*Draw slide lines if no border*/ if(style->body.border.width != 0) { div_i_start = 1; - div_i_end = ext->vdiv_cnt; + div_i_end = ext->vdiv_cnt; } else { div_i_start = 0; - div_i_end = ext->vdiv_cnt + 1; + div_i_end = ext->vdiv_cnt + 1; } p1.y = 0 + y_ofs; p2.y = h + y_ofs; - for(div_i = div_i_start; div_i <= div_i_end; div_i ++) { + for(div_i = div_i_start; div_i <= div_i_end; div_i++) { p1.x = (int32_t)((int32_t)w * div_i) / (ext->vdiv_cnt + 1); - p1.x += x_ofs; - if(div_i == div_i_start) p1.x += (style->line.width >> 1) + 1; /*The first line might not be visible*/ - if(div_i == div_i_end) p1.x -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ + p1.x += x_ofs; + if(div_i == div_i_start) + p1.x += (style->line.width >> 1) + 1; /*The first line might not be visible*/ + if(div_i == div_i_end) + p1.x -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ p2.x = p1.x; lv_draw_line(&p1, &p2, mask, style, opa_scale); } @@ -686,8 +686,8 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) uint16_t i; lv_point_t p1; lv_point_t p2; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; int32_t y_tmp; @@ -697,22 +697,23 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); lv_style_t style; lv_style_copy(&style, &lv_style_plain); - style.line.opa = ext->series.opa; + style.line.opa = ext->series.opa; style.line.width = ext->series.width; /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { style.line.color = ser->color; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; p_prev = ser->start_point; - y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; + y_tmp = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; - for(i = 1; i < ext->point_cnt; i ++) { + for(i = 1; i < ext->point_cnt; i++) { p1.x = p2.x; p1.y = p2.y; @@ -720,11 +721,12 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) p_act = (ser->start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; + p2.y = h - y_tmp + y_ofs; - if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) + if(ser->points[p_prev] != LV_CHART_POINT_DEF && + ser->points[p_act] != LV_CHART_POINT_DEF) lv_draw_line(&p1, &p2, mask, &style, opa_scale); p_prev = p_act; @@ -743,8 +745,8 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) uint16_t i; lv_area_t cir_a; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; int32_t y_tmp; @@ -755,22 +757,23 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) lv_style_copy(&style_point, &lv_style_plain); style_point.body.border.width = 0; - style_point.body.radius = LV_RADIUS_CIRCLE; - style_point.body.opa = ext->series.opa; - style_point.body.radius = ext->series.width; + style_point.body.radius = LV_RADIUS_CIRCLE; + style_point.body.opa = ext->series.opa; + style_point.body.radius = ext->series.width; /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { style_point.body.main_color = ser->color; style_point.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); - for(i = 0; i < ext->point_cnt; i ++) { + for(i = 0; i < ext->point_cnt; i++) { cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; cir_a.x2 = cir_a.x1 + style_point.body.radius; cir_a.x1 -= style_point.body.radius; - p_act = (ser->start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); + p_act = (ser->start_point + i) % ext->point_cnt; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); cir_a.y1 = h - y_tmp + y_ofs; cir_a.y2 = cir_a.y1 + style_point.body.radius; cir_a.y1 -= style_point.body.radius; @@ -800,35 +803,37 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) int32_t y_tmp; lv_chart_series_t * ser; lv_style_t rects; - lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ - lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ + lv_coord_t col_w = + w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ + lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ lv_style_copy(&rects, &lv_style_plain); rects.body.border.width = 0; - rects.body.radius = 0; - rects.body.opa = ext->series.opa; + rects.body.radius = 0; + rects.body.opa = ext->series.opa; col_a.y2 = chart->coords.y2; lv_coord_t x_act; /*Go through all points*/ - for(i = 0; i < ext->point_cnt; i ++) { - x_act = (int32_t)((int32_t) w * i) / ext->point_cnt; + for(i = 0; i < ext->point_cnt; i++) { + x_act = (int32_t)((int32_t)w * i) / ext->point_cnt; x_act += chart->coords.x1 + x_ofs; /*Draw the current point of all data line*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { rects.body.main_color = ser->color; rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); - col_a.x1 = x_act; - col_a.x2 = col_a.x1 + col_w; + col_a.x1 = x_act; + col_a.x2 = col_a.x1 + col_w; x_act += col_w; lv_coord_t p_act = (ser->start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - col_a.y1 = h - y_tmp + chart->coords.y1; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + col_a.y1 = h - y_tmp + chart->coords.y1; mask_ret = lv_area_intersect(&col_mask, mask, &col_a); if(mask_ret != false && ser->points[p_act] != LV_CHART_POINT_DEF) { @@ -846,7 +851,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t w = lv_obj_get_width(chart); /*Vertical lines works only if the width == point count. Else use the normal line type*/ if(ext->point_cnt != w) { lv_chart_draw_lines(chart, mask); @@ -856,7 +861,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas uint16_t i; lv_point_t p1; lv_point_t p2; - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; int32_t y_tmp; @@ -864,29 +869,28 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); lv_style_t style; lv_style_copy(&style, &lv_style_plain); - style.line.opa = ext->series.opa; + style.line.opa = ext->series.opa; style.line.width = ext->series.width; /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { style.line.color = ser->color; - p1.x = 0 + x_ofs; - p2.x = 0 + x_ofs; - y_tmp = (int32_t)((int32_t) ser->points[0] - ext->ymin) * h; + p1.x = 0 + x_ofs; + p2.x = 0 + x_ofs; + y_tmp = (int32_t)((int32_t)ser->points[0] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; - p1.y = p2.y; + p2.y = h - y_tmp + y_ofs; + p1.y = p2.y; - for(i = 0; i < ext->point_cnt; i++) - { + for(i = 0; i < ext->point_cnt; i++) { - y_tmp = (int32_t)((int32_t) ser->points[i] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t)ser->points[i] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; + p2.y = h - y_tmp + y_ofs; - if(p1.y == p2.y) - { + if(p1.y == p2.y) { p2.x++; } @@ -912,8 +916,8 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) uint16_t i; lv_point_t p1; lv_point_t p2; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; int32_t y_tmp; @@ -925,31 +929,33 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) lv_style_copy(&style, &lv_style_plain); /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { style.body.main_color = ser->color; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; p_prev = ser->start_point; - y_tmp = (int32_t)((int32_t) ser->points[p_prev] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; + y_tmp = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + p2.y = h - y_tmp + y_ofs; - for(i = 1; i < ext->point_cnt; i ++) { + for(i = 1; i < ext->point_cnt; i++) { p1.x = p2.x; p1.y = p2.y; - p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; p_act = (ser->start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); - p2.y = h - y_tmp + y_ofs; + p2.y = h - y_tmp + y_ofs; - if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { + if(ser->points[p_prev] != LV_CHART_POINT_DEF && + ser->points[p_act] != LV_CHART_POINT_DEF) { lv_point_t triangle_points[3]; - triangle_points[0] = p1; + triangle_points[0] = p1; triangle_points[1].x = p2.x; triangle_points[1].y = y_ofs + h; triangle_points[2].x = p1.x; @@ -970,9 +976,9 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) if(ext->y_axis.list_of_values != NULL || ext->y_axis.num_tick_marks != 0) { const lv_style_t * style = lv_obj_get_style(chart); - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); - uint8_t i,j; + uint8_t i, j; uint8_t list_index; uint8_t num_of_labels; uint8_t num_scale_ticks; @@ -981,96 +987,95 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_point_t p2; lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; - lv_coord_t h = lv_obj_get_height(chart); - lv_coord_t w = lv_obj_get_width(chart); - char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + + 1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ if(ext->y_axis.major_tick_len == 0) - major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; else - major_tick_len = ext->y_axis.major_tick_len; + major_tick_len = ext->y_axis.major_tick_len; if(ext->y_axis.minor_tick_len == 0) - minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; else - minor_tick_len = ext->y_axis.minor_tick_len; + minor_tick_len = ext->y_axis.minor_tick_len; /* count the '\n'-s to determine the number of options */ - list_index = 0; + list_index = 0; num_of_labels = 0; - if(ext->y_axis.list_of_values != NULL) - { - for(j = 0; ext->y_axis.list_of_values[j] != '\0'; j++) { - if(ext->y_axis.list_of_values[j] == '\n') - num_of_labels++; - } + if(ext->y_axis.list_of_values != NULL) { + for(j = 0; ext->y_axis.list_of_values[j] != '\0'; j++) { + if(ext->y_axis.list_of_values[j] == '\n') num_of_labels++; + } - num_of_labels++; /* last option in the at row*/ + num_of_labels++; /* last option in the at row*/ } /* we can't have string labels without ticks step, set to 1 if not specified */ - if(ext->y_axis.num_tick_marks == 0) - ext->y_axis.num_tick_marks = 1; + if(ext->y_axis.num_tick_marks == 0) ext->y_axis.num_tick_marks = 1; /* calculate total number of ticks */ if(num_of_labels < 2) - num_scale_ticks = ext->y_axis.num_tick_marks; + num_scale_ticks = ext->y_axis.num_tick_marks; else - num_scale_ticks = (ext->y_axis.num_tick_marks * (num_of_labels - 1)); + num_scale_ticks = (ext->y_axis.num_tick_marks * (num_of_labels - 1)); - for(i = 0; i < (num_scale_ticks + 1); i++ ) { /* one extra loop - it may not exist in the list, empty label */ - /* first point of the tick */ + for(i = 0; i < (num_scale_ticks + 1); + i++) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ p1.x = 0 + x_ofs; - /* second point of the tick */ - if( (num_of_labels != 0) && (i == 0 || i % ext->y_axis.num_tick_marks == 0) ) - p2.x = p1.x - major_tick_len; /* major tick */ - else - p2.x = p1.x - minor_tick_len; /* minor tick */ + /* second point of the tick */ + if((num_of_labels != 0) && (i == 0 || i % ext->y_axis.num_tick_marks == 0)) + p2.x = p1.x - major_tick_len; /* major tick */ + else + p2.x = p1.x - minor_tick_len; /* minor tick */ /* draw a line at moving y position */ - p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - LV_CHART_AXIS_Y_TICK_OFFSET_FIX; + p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - + LV_CHART_AXIS_Y_TICK_OFFSET_FIX; - if( i != num_scale_ticks ) - lv_draw_line(&p1, &p2, mask, style, opa_scale); - else - if( (ext->y_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0 ) - lv_draw_line(&p1, &p2, mask, style, opa_scale); + if(i != num_scale_ticks) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + else if((ext->y_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0) + lv_draw_line(&p1, &p2, mask, style, opa_scale); /* draw values if available */ - if (num_of_labels != 0) - { - /* add text only to major tick */ - if( i == 0 || i % ext->y_axis.num_tick_marks == 0 ) - { - /* search for tick string */ - j = 0; - while( ext->y_axis.list_of_values[list_index] != '\n' && - ext->y_axis.list_of_values[list_index] != '\0') - { - /* do not overflow the buffer, but move to the end of the current label */ - if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) - buf[j++] = ext->y_axis.list_of_values[list_index++]; - else - list_index++; - } - - /* this was a string, but not end of the list, so jump to the next string */ - if(ext->y_axis.list_of_values[list_index] == '\n') - list_index++; - - /* terminate the string */ - buf[j] = '\0'; - - /* reserve appropriate area */ - lv_point_t size; - lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); - - /* set the area at some distance of the major tick len left of the tick */ - lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE) , (p2.y - size.y/2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y + size.y/2) }; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); - } + if(num_of_labels != 0) { + /* add text only to major tick */ + if(i == 0 || i % ext->y_axis.num_tick_marks == 0) { + /* search for tick string */ + j = 0; + while(ext->y_axis.list_of_values[list_index] != '\n' && + ext->y_axis.list_of_values[list_index] != '\0') { + /* do not overflow the buffer, but move to the end of the current label */ + if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) + buf[j++] = ext->y_axis.list_of_values[list_index++]; + else + list_index++; + } + + /* this was a string, but not end of the list, so jump to the next string */ + if(ext->y_axis.list_of_values[list_index] == '\n') list_index++; + + /* terminate the string */ + buf[j] = '\0'; + + /* reserve appropriate area */ + lv_point_t size; + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + + /* set the area at some distance of the major tick len left of the tick */ + lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), + (p2.y - size.y / 2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), + (p2.y + size.y / 2)}; + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, + -1); + } } } } @@ -1084,9 +1089,9 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) if(ext->x_axis.list_of_values != NULL || ext->x_axis.num_tick_marks != 0) { const lv_style_t * style = lv_obj_get_style(chart); - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); - uint8_t i,j; + uint8_t i, j; uint8_t list_index; uint8_t num_of_labels; uint8_t num_scale_ticks; @@ -1095,96 +1100,95 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_point_t p2; lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; - lv_coord_t h = lv_obj_get_height(chart); - lv_coord_t w = lv_obj_get_width(chart); - char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN+1]; /* up to N symbols per label + null terminator */ + lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t w = lv_obj_get_width(chart); + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + + 1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ if(ext->x_axis.major_tick_len == 0) - major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; + major_tick_len = (int32_t)w * LV_CHART_AXIS_MAJOR_TICK_LEN_COE; else - major_tick_len = ext->x_axis.major_tick_len; + major_tick_len = ext->x_axis.major_tick_len; if(ext->x_axis.minor_tick_len == 0) - minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; + minor_tick_len = major_tick_len * LV_CHART_AXIS_MINOR_TICK_LEN_COE; else - minor_tick_len = ext->x_axis.minor_tick_len; + minor_tick_len = ext->x_axis.minor_tick_len; /* count the '\n'-s to determine the number of options */ - list_index = 0; + list_index = 0; num_of_labels = 0; - if(ext->x_axis.list_of_values != NULL) - { - for(j = 0; ext->x_axis.list_of_values[j] != '\0'; j++) { - if(ext->x_axis.list_of_values[j] == '\n') - num_of_labels++; - } + if(ext->x_axis.list_of_values != NULL) { + for(j = 0; ext->x_axis.list_of_values[j] != '\0'; j++) { + if(ext->x_axis.list_of_values[j] == '\n') num_of_labels++; + } - num_of_labels++; /* last option in the at row*/ + num_of_labels++; /* last option in the at row*/ } /* we can't have string labels without ticks step, set to 1 if not specified */ - if(ext->x_axis.num_tick_marks == 0) - ext->x_axis.num_tick_marks = 1; + if(ext->x_axis.num_tick_marks == 0) ext->x_axis.num_tick_marks = 1; /* calculate total number of marks */ if(num_of_labels < 2) - num_scale_ticks = ext->x_axis.num_tick_marks; + num_scale_ticks = ext->x_axis.num_tick_marks; else - num_scale_ticks = (ext->x_axis.num_tick_marks * (num_of_labels - 1)); + num_scale_ticks = (ext->x_axis.num_tick_marks * (num_of_labels - 1)); - for(i = 0; i < (num_scale_ticks + 1); i++ ) { /* one extra loop - it may not exist in the list, empty label */ - /* first point of the tick */ + for(i = 0; i < (num_scale_ticks + 1); + i++) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ p1.y = h + y_ofs; - /* second point of the tick */ - if( (num_of_labels != 0) && (i == 0 || i % ext->x_axis.num_tick_marks == 0) ) - p2.y = p1.y + major_tick_len; /* major tick */ - else - p2.y = p1.y + minor_tick_len; /* minor tick */ + /* second point of the tick */ + if((num_of_labels != 0) && (i == 0 || i % ext->x_axis.num_tick_marks == 0)) + p2.y = p1.y + major_tick_len; /* major tick */ + else + p2.y = p1.y + minor_tick_len; /* minor tick */ /* draw a line at moving x position */ - p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - LV_CHART_AXIS_X_TICK_OFFSET_FIX; + p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - + LV_CHART_AXIS_X_TICK_OFFSET_FIX; - if( i != num_scale_ticks ) - lv_draw_line(&p1, &p2, mask, style, opa_scale); - else - if( (ext->x_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0 ) - lv_draw_line(&p1, &p2, mask, style, opa_scale); + if(i != num_scale_ticks) + lv_draw_line(&p1, &p2, mask, style, opa_scale); + else if((ext->x_axis.options & LV_CHART_AXIS_DRAW_LAST_TICK) != 0) + lv_draw_line(&p1, &p2, mask, style, opa_scale); /* draw values if available */ - if (num_of_labels != 0) - { - /* add text only to major tick */ - if( i == 0 || i % ext->x_axis.num_tick_marks == 0 ) - { - /* search for tick string */ - j = 0; - while( ext->x_axis.list_of_values[list_index] != '\n' && - ext->x_axis.list_of_values[list_index] != '\0') - { - /* do not overflow the buffer, but move to the end of the current label */ - if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) - buf[j++] = ext->x_axis.list_of_values[list_index++]; - else - list_index++; - } - - /* this was a string, but not end of the list, so jump to the next string */ - if(ext->x_axis.list_of_values[list_index] == '\n') - list_index++; - - /* terminate the string */ - buf[j] = '\0'; - - /* reserve appropriate area */ - lv_point_t size; - lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); - - /* set the area at some distance of the major tick len under of the tick */ - lv_area_t a = { (p2.x - size.x/2) , (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x/2), (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE) }; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); - } + if(num_of_labels != 0) { + /* add text only to major tick */ + if(i == 0 || i % ext->x_axis.num_tick_marks == 0) { + /* search for tick string */ + j = 0; + while(ext->x_axis.list_of_values[list_index] != '\n' && + ext->x_axis.list_of_values[list_index] != '\0') { + /* do not overflow the buffer, but move to the end of the current label */ + if(j < LV_CHART_AXIS_TICK_LABEL_MAX_LEN) + buf[j++] = ext->x_axis.list_of_values[list_index++]; + else + list_index++; + } + + /* this was a string, but not end of the list, so jump to the next string */ + if(ext->x_axis.list_of_values[list_index] == '\n') list_index++; + + /* terminate the string */ + buf[j] = '\0'; + + /* reserve appropriate area */ + lv_point_t size; + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + + /* set the area at some distance of the major tick len under of the tick */ + lv_area_t a = {(p2.x - size.x / 2), (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), + (p2.x + size.x / 2), + (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE)}; + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, + -1); + } } } } diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 3448c2c7f79b..da7f3650d7cd 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -27,20 +27,20 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_CHART_POINT_DEF (LV_COORD_MIN) +#define LV_CHART_POINT_DEF (LV_COORD_MIN) /********************** * TYPEDEFS **********************/ /*Chart types*/ -enum -{ - LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ - LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ - LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ - LV_CHART_TYPE_VERTICAL_LINE = 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ - LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ +enum { + LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ + LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ + LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ + LV_CHART_TYPE_VERTICAL_LINE = + 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ + LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ }; typedef uint8_t lv_chart_type_t; @@ -52,19 +52,18 @@ typedef struct } lv_chart_series_t; /*Data of axis */ -enum -{ - LV_CHART_AXIS_DRAW_LAST_TICK = 0x01 /* draw the last tick */ +enum { + LV_CHART_AXIS_DRAW_LAST_TICK = 0x01 /* draw the last tick */ }; typedef uint8_t lv_chart_axis_options_t; typedef struct { - const char* list_of_values; - uint8_t num_tick_marks; - lv_chart_axis_options_t options; - uint8_t major_tick_len; - uint8_t minor_tick_len; + const char * list_of_values; + uint8_t num_tick_marks; + lv_chart_axis_options_t options; + uint8_t major_tick_len; + uint8_t minor_tick_len; } lv_chart_axis_cfg_t; /*Data of chart */ @@ -72,26 +71,25 @@ typedef struct { /*No inherited ext*/ /*Ext. of ancestor*/ /*New data for this type */ - lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_dl_t)*/ - lv_coord_t ymin; /*y min value (used to scale the data)*/ - lv_coord_t ymax; /*y max value (used to scale the data)*/ - uint8_t hdiv_cnt; /*Number of horizontal division lines*/ - uint8_t vdiv_cnt; /*Number of vertical division lines*/ - uint16_t point_cnt; /*Point number in a data line*/ - lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ + lv_ll_t series_ll; /*Linked list for the data line pointers (stores lv_chart_dl_t)*/ + lv_coord_t ymin; /*y min value (used to scale the data)*/ + lv_coord_t ymax; /*y max value (used to scale the data)*/ + uint8_t hdiv_cnt; /*Number of horizontal division lines*/ + uint8_t vdiv_cnt; /*Number of vertical division lines*/ + uint16_t point_cnt; /*Point number in a data line*/ + lv_chart_type_t type; /*Line, column or point chart (from 'lv_chart_type_t')*/ lv_chart_axis_cfg_t y_axis; lv_chart_axis_cfg_t x_axis; uint16_t margin; - struct { - lv_coord_t width; /*Line width or point radius*/ - uint8_t num; /*Number of data lines in dl_ll*/ - lv_opa_t opa; /*Opacity of data lines*/ - lv_opa_t dark; /*Dark level of the point/column bottoms*/ + struct + { + lv_coord_t width; /*Line width or point radius*/ + uint8_t num; /*Number of data lines in dl_ll*/ + lv_opa_t opa; /*Opacity of data lines*/ + lv_opa_t dark; /*Dark level of the point/column bottoms*/ } series; } lv_chart_ext_t; - - /********************** * GLOBAL PROTOTYPES **********************/ @@ -99,7 +97,8 @@ typedef struct /** * Create a chart background objects * @param par pointer to an object, it will be the parent of the new chart background - * @param copy pointer to a chart background object, if not NULL then the new object will be copied from it + * @param copy pointer to a chart background object, if not NULL then the new object will be copied + * from it * @return pointer to the created chart background */ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy); @@ -207,7 +206,7 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y); * @param chart pointer to a chart object * @param style pointer to a style */ -static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style) +static inline void lv_chart_set_style(lv_obj_t * chart, lv_style_t * style) { lv_obj_set_style(chart, style); } @@ -217,7 +216,7 @@ static inline void lv_chart_set_style(lv_obj_t *chart, lv_style_t *style) * @param chart pointer to an chart object * @param margin value of the margin */ -void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin); +void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin); /** * Set the x/y-axis ticks of a chart @@ -229,19 +228,13 @@ void lv_chart_set_margin(lv_obj_t* chart, uint16_t margin); * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ -void lv_chart_set_x_ticks( lv_obj_t* chart, - const char* list_of_values, - uint8_t num_tick_marks, - uint8_t major_tick_len, - uint8_t minor_tick_len, - lv_chart_axis_options_t options); - -void lv_chart_set_y_ticks( lv_obj_t* chart, - const char* list_of_values, - uint8_t num_tick_marks, - uint8_t major_tick_len, - uint8_t minor_tick_len, - lv_chart_axis_options_t options); +void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, + uint8_t major_tick_len, uint8_t minor_tick_len, + lv_chart_axis_options_t options); + +void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, + uint8_t major_tick_len, uint8_t minor_tick_len, + lv_chart_axis_options_t options); /*===================== * Getter functions @@ -287,7 +280,7 @@ lv_opa_t lv_chart_get_series_darking(const lv_obj_t * chart); * @param chart pointer to an chart object * @return pointer to the chart's style */ -static inline lv_style_t* lv_chart_get_style(const lv_obj_t *chart) +static inline lv_style_t * lv_chart_get_style(const lv_obj_t * chart) { return lv_obj_get_style(chart); } @@ -297,7 +290,7 @@ static inline lv_style_t* lv_chart_get_style(const lv_obj_t *chart) * @param chart pointer to an chart object * @param return value of the margin */ -uint16_t lv_chart_get_margin(lv_obj_t* chart); +uint16_t lv_chart_get_margin(lv_obj_t * chart); /*===================== * Other functions @@ -313,10 +306,10 @@ void lv_chart_refresh(lv_obj_t * chart); * MACROS **********************/ -#endif /*LV_USE_CHART*/ +#endif /*LV_USE_CHART*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_CHART_H*/ +#endif /*LV_CHART_H*/ diff --git a/src/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c index 20037a7c4d80..0f2f0ebd3cb2 100644 --- a/src/lv_objx/lv_cont.c +++ b/src/lv_objx/lv_cont.c @@ -63,7 +63,6 @@ static lv_signal_cb_t ancestor_signal; lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) { - LV_LOG_TRACE("container create started"); /*Create a basic object*/ @@ -78,11 +77,11 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; lv_mem_assert(ext); - ext->fit_left = LV_FIT_NONE; - ext->fit_right = LV_FIT_NONE; - ext->fit_top = LV_FIT_NONE; + ext->fit_left = LV_FIT_NONE; + ext->fit_right = LV_FIT_NONE; + ext->fit_top = LV_FIT_NONE; ext->fit_bottom = LV_FIT_NONE; - ext->layout = LV_LAYOUT_OFF; + ext->layout = LV_LAYOUT_OFF; lv_obj_set_signal_cb(new_cont, lv_cont_signal); @@ -99,11 +98,11 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing object*/ else { lv_cont_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->fit_left = copy_ext->fit_left; - ext->fit_right = copy_ext->fit_right; - ext->fit_top = copy_ext->fit_top; - ext->fit_bottom = copy_ext->fit_bottom; - ext->layout = copy_ext->layout; + ext->fit_left = copy_ext->fit_left; + ext->fit_right = copy_ext->fit_right; + ext->fit_top = copy_ext->fit_top; + ext->fit_bottom = copy_ext->fit_bottom; + ext->layout = copy_ext->layout; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_cont); @@ -147,17 +146,14 @@ void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t t { lv_obj_invalidate(cont); lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->fit_left == left && - ext->fit_right == right && - ext->fit_top == top && - ext->fit_bottom == bottom) - { + if(ext->fit_left == left && ext->fit_right == right && ext->fit_top == top && + ext->fit_bottom == bottom) { return; } - ext->fit_left = left; - ext->fit_right = right; - ext->fit_top = top; + ext->fit_left = left; + ext->fit_right = right; + ext->fit_top = top; ext->fit_bottom = bottom; /*Send a signal to refresh the layout*/ @@ -250,7 +246,7 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) lv_cont_refr_autofit(cont); } else if(sign == LV_SIGNAL_CORD_CHG) { if(lv_obj_get_width(cont) != lv_area_get_width(param) || - lv_obj_get_height(cont) != lv_area_get_height(param)) { + lv_obj_get_height(cont) != lv_area_get_height(param)) { lv_cont_refr_layout(cont); lv_cont_refr_autofit(cont); } @@ -261,7 +257,7 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_cont"; @@ -270,7 +266,6 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) return res; } - /** * Refresh the layout of a container * @param cont pointer to an object which layout should be refreshed @@ -292,7 +287,7 @@ static void lv_cont_refr_layout(lv_obj_t * cont) lv_cont_layout_row(cont); } else if(type == LV_LAYOUT_PRETTY) { lv_cont_layout_pretty(cont); - } else if(type == LV_LAYOUT_GRID) { + } else if(type == LV_LAYOUT_GRID) { lv_cont_layout_grid(cont); } } @@ -314,19 +309,19 @@ static void lv_cont_layout_col(lv_obj_t * cont) switch(type) { case LV_LAYOUT_COL_L: hpad_corr = style->body.padding.left; - align = LV_ALIGN_IN_TOP_LEFT; + align = LV_ALIGN_IN_TOP_LEFT; break; case LV_LAYOUT_COL_M: hpad_corr = 0; - align = LV_ALIGN_IN_TOP_MID; + align = LV_ALIGN_IN_TOP_MID; break; case LV_LAYOUT_COL_R: hpad_corr = -style->body.padding.right; - align = LV_ALIGN_IN_TOP_RIGHT; + align = LV_ALIGN_IN_TOP_RIGHT; break; default: hpad_corr = 0; - align = LV_ALIGN_IN_TOP_LEFT; + align = LV_ALIGN_IN_TOP_LEFT; break; } @@ -335,9 +330,10 @@ static void lv_cont_layout_col(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ lv_coord_t last_cord = style->body.padding.top; - LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || - lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + LV_LL_READ_BACK(cont->child_ll, child) + { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) + continue; lv_obj_align(child, cont, align, hpad_corr, last_cord); last_cord += lv_obj_get_height(child) + style->body.padding.inner; @@ -363,19 +359,19 @@ static void lv_cont_layout_row(lv_obj_t * cont) switch(type) { case LV_LAYOUT_ROW_T: vpad_corr = style->body.padding.top; - align = LV_ALIGN_IN_TOP_LEFT; + align = LV_ALIGN_IN_TOP_LEFT; break; case LV_LAYOUT_ROW_M: vpad_corr = 0; - align = LV_ALIGN_IN_LEFT_MID; + align = LV_ALIGN_IN_LEFT_MID; break; case LV_LAYOUT_ROW_B: vpad_corr = -style->body.padding.bottom; - align = LV_ALIGN_IN_BOTTOM_LEFT; + align = LV_ALIGN_IN_BOTTOM_LEFT; break; default: vpad_corr = 0; - align = LV_ALIGN_IN_TOP_LEFT; + align = LV_ALIGN_IN_TOP_LEFT; break; } @@ -385,9 +381,10 @@ static void lv_cont_layout_row(lv_obj_t * cont) /* Align the children */ lv_coord_t last_cord = style->body.padding.left; - LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || - lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + LV_LL_READ_BACK(cont->child_ll, child) + { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) + continue; lv_obj_align(child, cont, align, last_cord, vpad_corr); last_cord += lv_obj_get_width(child) + style->body.padding.inner; @@ -404,14 +401,15 @@ static void lv_cont_layout_center(lv_obj_t * cont) { lv_obj_t * child; lv_style_t * style = lv_obj_get_style(cont); - uint32_t obj_num = 0; - lv_coord_t h_tot = 0; + uint32_t obj_num = 0; + lv_coord_t h_tot = 0; - LV_LL_READ(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || - lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + LV_LL_READ(cont->child_ll, child) + { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) + continue; h_tot += lv_obj_get_height(child) + style->body.padding.inner; - obj_num ++; + obj_num++; } if(obj_num == 0) return; @@ -423,10 +421,11 @@ static void lv_cont_layout_center(lv_obj_t * cont) lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); /* Align the children */ - lv_coord_t last_cord = - (h_tot / 2); - LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || - lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + lv_coord_t last_cord = -(h_tot / 2); + LV_LL_READ_BACK(cont->child_ll, child) + { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) + continue; lv_obj_align(child, cont, LV_ALIGN_CENTER, 0, last_cord + lv_obj_get_height(child) / 2); last_cord += lv_obj_get_height(child) + style->body.padding.inner; @@ -442,53 +441,60 @@ static void lv_cont_layout_center(lv_obj_t * cont) */ static void lv_cont_layout_pretty(lv_obj_t * cont) { - lv_obj_t * child_rs; /* Row starter child */ - lv_obj_t * child_rc; /* Row closer child */ - lv_obj_t * child_tmp; /* Temporary child */ + lv_obj_t * child_rs; /* Row starter child */ + lv_obj_t * child_rc; /* Row closer child */ + lv_obj_t * child_tmp; /* Temporary child */ lv_style_t * style = lv_obj_get_style(cont); - lv_coord_t w_obj = lv_obj_get_width(cont); - lv_coord_t act_y = style->body.padding.top; + lv_coord_t w_obj = lv_obj_get_width(cont); + lv_coord_t act_y = style->body.padding.top; /* Disable child change action because the children will be moved a lot * an unnecessary child change signals could be sent*/ child_rs = lv_ll_get_tail(&cont->child_ll); /*Set the row starter child*/ - if(child_rs == NULL) return; /*Return if no child*/ + if(child_rs == NULL) return; /*Return if no child*/ lv_obj_set_protect(cont, LV_PROTECT_CHILD_CHG); child_rc = child_rs; /*Initially the the row starter and closer is the same*/ while(child_rs != NULL) { lv_coord_t h_row = 0; - lv_coord_t w_row = style->body.padding.left + style->body.padding.right; /*The width is at least the left+right hpad*/ + lv_coord_t w_row = style->body.padding.left + + style->body.padding.right; /*The width is at least the left+right hpad*/ uint32_t obj_num = 0; /*Find the row closer object and collect some data*/ do { if(lv_obj_get_hidden(child_rc) == false && - lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) { + lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) { /*If this object is already not fit then break*/ if(w_row + lv_obj_get_width(child_rc) > w_obj) { - /*Step back one child because the last already not fit, so the previous is the closer*/ - if(child_rc != NULL && obj_num != 0) { + /*Step back one child because the last already not fit, so the previous is the + * closer*/ + if(child_rc != NULL && obj_num != 0) { child_rc = lv_ll_get_next(&cont->child_ll, child_rc); } break; } - w_row += lv_obj_get_width(child_rc) + style->body.padding.inner; /*Add the object width + opad*/ - h_row = LV_MATH_MAX(h_row, lv_obj_get_height(child_rc)); /*Search the highest object*/ - obj_num ++; - if(lv_obj_is_protected(child_rc, LV_PROTECT_FOLLOW)) break; /*If can not be followed by an other object then break here*/ - + w_row += lv_obj_get_width(child_rc) + + style->body.padding.inner; /*Add the object width + opad*/ + h_row = + LV_MATH_MAX(h_row, lv_obj_get_height(child_rc)); /*Search the highest object*/ + obj_num++; + if(lv_obj_is_protected(child_rc, LV_PROTECT_FOLLOW)) + break; /*If can not be followed by an other object then break here*/ } child_rc = lv_ll_get_prev(&cont->child_ll, child_rc); /*Load the next object*/ - if(obj_num == 0) child_rs = child_rc; /*If the first object was hidden (or too long) then set the next as first */ + if(obj_num == 0) + child_rs = child_rc; /*If the first object was hidden (or too long) then set the + next as first */ } while(child_rc != NULL); /*If the object is too long then align it to the middle*/ if(obj_num == 0) { if(child_rc != NULL) { lv_obj_align(child_rc, cont, LV_ALIGN_IN_TOP_MID, 0, act_y); - h_row = lv_obj_get_height(child_rc); /*Not set previously because of the early break*/ + h_row = + lv_obj_get_height(child_rc); /*Not set previously because of the early break*/ } } /*If there is only one object in the row then align it to the middle*/ @@ -499,31 +505,33 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) else if(obj_num == 2) { lv_obj_t * obj1 = child_rs; lv_obj_t * obj2 = lv_ll_get_prev(&cont->child_ll, child_rs); - w_row = lv_obj_get_width(obj1) + lv_obj_get_width(obj2); - lv_coord_t pad = (w_obj - w_row) / 3; - lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT, pad, act_y + (h_row - lv_obj_get_height(obj1)) / 2); - lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT, -pad, act_y + (h_row - lv_obj_get_height(obj2)) / 2); + w_row = lv_obj_get_width(obj1) + lv_obj_get_width(obj2); + lv_coord_t pad = (w_obj - w_row) / 3; + lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT, pad, + act_y + (h_row - lv_obj_get_height(obj1)) / 2); + lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT, -pad, + act_y + (h_row - lv_obj_get_height(obj2)) / 2); } /* Align the children (from child_rs to child_rc)*/ else { w_row -= style->body.padding.inner * obj_num; - lv_coord_t new_opad = (w_obj - w_row) / (obj_num - 1); - lv_coord_t act_x = style->body.padding.left; /*x init*/ - child_tmp = child_rs; + lv_coord_t new_opad = (w_obj - w_row) / (obj_num - 1); + lv_coord_t act_x = style->body.padding.left; /*x init*/ + child_tmp = child_rs; while(child_tmp != NULL) { if(lv_obj_get_hidden(child_tmp) == false && - lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) { - lv_obj_align(child_tmp, cont, LV_ALIGN_IN_TOP_LEFT, act_x, act_y + (h_row - lv_obj_get_height(child_tmp)) / 2); + lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) { + lv_obj_align(child_tmp, cont, LV_ALIGN_IN_TOP_LEFT, act_x, + act_y + (h_row - lv_obj_get_height(child_tmp)) / 2); act_x += lv_obj_get_width(child_tmp) + new_opad; } if(child_tmp == child_rc) break; child_tmp = lv_ll_get_prev(&cont->child_ll, child_tmp); } - } if(child_rc == NULL) break; - act_y += style->body.padding.inner + h_row; /*y increment*/ + act_y += style->body.padding.inner + h_row; /*y increment*/ child_rs = lv_ll_get_prev(&cont->child_ll, child_rc); /*Go to the next object*/ child_rc = child_rs; } @@ -538,14 +546,16 @@ static void lv_cont_layout_grid(lv_obj_t * cont) { lv_obj_t * child; lv_style_t * style = lv_obj_get_style(cont); - lv_coord_t w_tot = lv_obj_get_width(cont); - lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); - lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); - uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / - (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ + lv_coord_t w_tot = lv_obj_get_width(cont); + lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); + lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); + uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / + (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ lv_coord_t x_ofs; if(obj_row > 1) { - x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - (obj_row * w_obj)) / (obj_row - 1); + x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - + (obj_row * w_obj)) / + (obj_row - 1); } else { x_ofs = w_tot / 2 - w_obj / 2; } @@ -559,9 +569,10 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_coord_t act_x = style->body.padding.left; lv_coord_t act_y = style->body.padding.top; uint16_t obj_cnt = 0; - LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || - lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; + LV_LL_READ_BACK(cont->child_ll, child) + { + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) + continue; if(obj_row > 1) { lv_obj_set_pos(child, act_x, act_y); @@ -569,11 +580,11 @@ static void lv_cont_layout_grid(lv_obj_t * cont) } else { lv_obj_set_pos(child, x_ofs, act_y); } - obj_cnt ++; + obj_cnt++; if(obj_cnt >= obj_row) { obj_cnt = 0; - act_x = style->body.padding.left; + act_x = style->body.padding.left; act_y += y_ofs; } } @@ -589,11 +600,8 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) { lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->fit_left == LV_FIT_NONE && - ext->fit_right == LV_FIT_NONE && - ext->fit_top == LV_FIT_NONE && - ext->fit_bottom == LV_FIT_NONE) - { + if(ext->fit_left == LV_FIT_NONE && ext->fit_right == LV_FIT_NONE && + ext->fit_top == LV_FIT_NONE && ext->fit_bottom == LV_FIT_NONE) { return; } @@ -602,7 +610,7 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) lv_style_t * style = lv_obj_get_style(cont); lv_obj_t * child_i; - lv_obj_t * par = lv_obj_get_parent(cont); + lv_obj_t * par = lv_obj_get_parent(cont); lv_style_t * par_style = lv_obj_get_style(par); lv_area_t flood_area; lv_area_copy(&flood_area, &par->coords); @@ -623,7 +631,8 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) tight_area.x2 = LV_COORD_MIN; tight_area.y2 = LV_COORD_MIN; - LV_LL_READ(cont->child_ll, child_i) { + LV_LL_READ(cont->child_ll, child_i) + { if(lv_obj_get_hidden(child_i) != false) continue; tight_area.x1 = LV_MATH_MIN(tight_area.x1, child_i->coords.x1); tight_area.y1 = LV_MATH_MIN(tight_area.y1, child_i->coords.y1); @@ -643,37 +652,42 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) switch(ext->fit_left) { case LV_FIT_TIGHT: new_area.x1 = tight_area.x1; break; case LV_FIT_FLOOD: new_area.x1 = flood_area.x1; break; - case LV_FIT_FILL: new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; break; + case LV_FIT_FILL: + new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; + break; default: break; } switch(ext->fit_right) { case LV_FIT_TIGHT: new_area.x2 = tight_area.x2; break; case LV_FIT_FLOOD: new_area.x2 = flood_area.x2; break; - case LV_FIT_FILL: new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; break; + case LV_FIT_FILL: + new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; + break; default: break; } switch(ext->fit_top) { case LV_FIT_TIGHT: new_area.y1 = tight_area.y1; break; case LV_FIT_FLOOD: new_area.y1 = flood_area.y1; break; - case LV_FIT_FILL: new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; break; + case LV_FIT_FILL: + new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; + break; default: break; } switch(ext->fit_bottom) { case LV_FIT_TIGHT: new_area.y2 = tight_area.y2; break; case LV_FIT_FLOOD: new_area.y2 = flood_area.y2; break; - case LV_FIT_FILL: new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; break; + case LV_FIT_FILL: + new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; + break; default: break; } /*Do nothing if the coordinates are not changed*/ - if(cont->coords.x1 != new_area.x1 || - cont->coords.y1 != new_area.y1 || - cont->coords.x2 != new_area.x2 || - cont->coords.y2 != new_area.y2) - { + if(cont->coords.x1 != new_area.x1 || cont->coords.y1 != new_area.y1 || + cont->coords.x2 != new_area.x2 || cont->coords.y2 != new_area.y2) { lv_obj_invalidate(cont); lv_area_copy(&cont->coords, &new_area); @@ -686,11 +700,11 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) par->signal_cb(par, LV_SIGNAL_CHILD_CHG, cont); /*Tell the children the parent's size has changed*/ - LV_LL_READ(cont->child_ll, child_i) { - child_i->signal_cb(child_i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); + LV_LL_READ(cont->child_ll, child_i) + { + child_i->signal_cb(child_i, LV_SIGNAL_PARENT_SIZE_CHG, NULL); } } - } #endif diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index 0f06e5504bfd..efe16589ac29 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -32,27 +32,26 @@ extern "C" { **********************/ /*Layout options*/ -enum -{ +enum { LV_LAYOUT_OFF = 0, LV_LAYOUT_CENTER, - LV_LAYOUT_COL_L, /*Column left align*/ - LV_LAYOUT_COL_M, /*Column middle align*/ - LV_LAYOUT_COL_R, /*Column right align*/ - LV_LAYOUT_ROW_T, /*Row top align*/ - LV_LAYOUT_ROW_M, /*Row middle align*/ - LV_LAYOUT_ROW_B, /*Row bottom align*/ - LV_LAYOUT_PRETTY, /*Put as many object as possible in row and begin a new row*/ - LV_LAYOUT_GRID, /*Align same-sized object into a grid*/ + LV_LAYOUT_COL_L, /*Column left align*/ + LV_LAYOUT_COL_M, /*Column middle align*/ + LV_LAYOUT_COL_R, /*Column right align*/ + LV_LAYOUT_ROW_T, /*Row top align*/ + LV_LAYOUT_ROW_M, /*Row middle align*/ + LV_LAYOUT_ROW_B, /*Row bottom align*/ + LV_LAYOUT_PRETTY, /*Put as many object as possible in row and begin a new row*/ + LV_LAYOUT_GRID, /*Align same-sized object into a grid*/ }; typedef uint8_t lv_layout_t; - enum { - LV_FIT_NONE, /*Do not change the size automatically*/ - LV_FIT_TIGHT, /*Involve the children*/ - LV_FIT_FLOOD, /*Align the size to the parent's edge*/ - LV_FIT_FILL, /*Align the size to the parent's edge first but if there is an object out of it then involve it*/ + LV_FIT_NONE, /*Do not change the size automatically*/ + LV_FIT_TIGHT, /*Involve the children*/ + LV_FIT_FLOOD, /*Align the size to the parent's edge*/ + LV_FIT_FILL, /*Align the size to the parent's edge first but if there is an object out of it + then involve it*/ }; typedef uint8_t lv_fit_t; @@ -60,14 +59,13 @@ typedef struct { /*Inherited from 'base_obj' so no inherited ext. */ /*Ext. of ancestor*/ /*New data for this type */ - uint8_t layout :4; /*A layout from 'lv_layout_t' enum*/ - uint8_t fit_left :2; /*A fit type from `lv_fit_t` enum */ - uint8_t fit_right :2; /*A fit type from `lv_fit_t` enum */ - uint8_t fit_top :2; /*A fit type from `lv_fit_t` enum */ - uint8_t fit_bottom :2; /*A fit type from `lv_fit_t` enum */ + uint8_t layout : 4; /*A layout from 'lv_layout_t' enum*/ + uint8_t fit_left : 2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_right : 2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_top : 2; /*A fit type from `lv_fit_t` enum */ + uint8_t fit_bottom : 2; /*A fit type from `lv_fit_t` enum */ } lv_cont_ext_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -100,7 +98,8 @@ void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout); * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom); +void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, + lv_fit_t bottom); /** * Set the fit policy horizontally and vertically separately. @@ -114,7 +113,6 @@ static inline void lv_cont_set_fit2(lv_obj_t * cont, lv_fit_t hor, lv_fit_t ver) lv_cont_set_fit4(cont, hor, hor, ver, ver); } - /** * Set the fit policyin all 4 direction at once. * It tell how to change the container's size automatically. @@ -126,13 +124,12 @@ static inline void lv_cont_set_fit(lv_obj_t * cont, lv_fit_t fit) lv_cont_set_fit4(cont, fit, fit, fit, fit); } - /** * Set the style of a container * @param cont pointer to a container object * @param style pointer to the new style */ -static inline void lv_cont_set_style(lv_obj_t *cont, lv_style_t * style) +static inline void lv_cont_set_style(lv_obj_t * cont, lv_style_t * style) { lv_obj_set_style(cont, style); } @@ -181,7 +178,7 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont); * @param cont pointer to a container object * @return pointer to the container's style */ -static inline lv_style_t * lv_cont_get_style(const lv_obj_t *cont) +static inline lv_style_t * lv_cont_get_style(const lv_obj_t * cont) { return lv_obj_get_style(cont); } @@ -190,10 +187,10 @@ static inline lv_style_t * lv_cont_get_style(const lv_obj_t *cont) * MACROS **********************/ -#endif /*LV_USE_CONT*/ +#endif /*LV_USE_CONT*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_CONT_H*/ +#endif /*LV_CONT_H*/ diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 0a6af7bc172f..d1407f95c706 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -3,7 +3,6 @@ * */ - /********************* * INCLUDES *********************/ @@ -23,12 +22,12 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -# ifndef LV_DDLIST_ANIM_TIME -# define LV_DDLIST_DEF_ANIM_TIME 200 /*ms*/ -# endif +#ifndef LV_DDLIST_ANIM_TIME +#define LV_DDLIST_DEF_ANIM_TIME 200 /*ms*/ +#endif #else -# undef LV_DDLIST_DEF_ANIM_TIME -# define LV_DDLIST_DEF_ANIM_TIME 0 /*No animation*/ +#undef LV_DDLIST_DEF_ANIM_TIME +#define LV_DDLIST_DEF_ANIM_TIME 0 /*No animation*/ #endif /********************** @@ -50,9 +49,9 @@ static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height); /********************** * STATIC VARIABLES **********************/ -static lv_signal_cb_t ancestor_signal; -static lv_signal_cb_t ancestor_scrl_signal; -static lv_design_cb_t ancestor_design; +static lv_signal_cb_t ancestor_signal; +static lv_signal_cb_t ancestor_scrl_signal; +static lv_design_cb_t ancestor_design; /********************** * MACROS @@ -65,7 +64,8 @@ static lv_design_cb_t ancestor_design; /** * Create a drop down list objects * @param par pointer to an object, it will be the parent of the new drop down list - * @param copy pointer to a drop down list object, if not NULL then the new object will be copied from it + * @param copy pointer to a drop down list object, if not NULL then the new object will be copied + * from it * @return pointer to the created drop down list */ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) @@ -78,7 +78,8 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) if(new_ddlist == NULL) return NULL; if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_ddlist); - if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ddlist)); + if(ancestor_scrl_signal == NULL) + ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ddlist)); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_ddlist); /*Allocate the drop down list type specific extended data*/ @@ -87,16 +88,16 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ - ext->label = NULL; - ext->opened = 0; - ext->fix_height = 0; - ext->sel_opt_id = 0; + ext->label = NULL; + ext->opened = 0; + ext->fix_height = 0; + ext->sel_opt_id = 0; ext->sel_opt_id_ori = 0; - ext->option_cnt = 0; - ext->anim_time = LV_DDLIST_DEF_ANIM_TIME; - ext->sel_style = &lv_style_plain_color; - ext->draw_arrow = 0; /*Do not draw arrow by default*/ - ext->stay_open = 0; + ext->option_cnt = 0; + ext->anim_time = LV_DDLIST_DEF_ANIM_TIME; + ext->sel_style = &lv_style_plain_color; + ext->draw_arrow = 0; /*Do not draw arrow by default*/ + ext->stay_open = 0; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_ddlist, lv_ddlist_signal); @@ -131,16 +132,16 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing drop down list*/ else { lv_ddlist_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->label = lv_label_create(new_ddlist, copy_ext->label); + ext->label = lv_label_create(new_ddlist, copy_ext->label); lv_label_set_text(ext->label, lv_label_get_text(copy_ext->label)); - ext->sel_opt_id = copy_ext->sel_opt_id; + ext->sel_opt_id = copy_ext->sel_opt_id; ext->sel_opt_id_ori = copy_ext->sel_opt_id; - ext->fix_height = copy_ext->fix_height; - ext->option_cnt = copy_ext->option_cnt; - ext->sel_style = copy_ext->sel_style; - ext->anim_time = copy_ext->anim_time; - ext->draw_arrow = copy_ext->draw_arrow; - ext->stay_open = copy_ext->stay_open; + ext->fix_height = copy_ext->fix_height; + ext->option_cnt = copy_ext->option_cnt; + ext->sel_style = copy_ext->sel_style; + ext->anim_time = copy_ext->anim_time; + ext->draw_arrow = copy_ext->draw_arrow; + ext->stay_open = copy_ext->stay_open; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_ddlist); @@ -148,7 +149,6 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) LV_LOG_INFO("drop down list created"); - return new_ddlist; } @@ -171,8 +171,8 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) for(i = 0; options[i] != '\0'; i++) { if(options[i] == '\n') ext->option_cnt++; } - ext->option_cnt++; /*Last option in the at row*/ - ext->sel_opt_id = 0; + ext->option_cnt++; /*Last option in the at row*/ + ext->sel_opt_id = 0; ext->sel_opt_id_ori = 0; lv_label_set_text(ext->label, options); @@ -189,7 +189,7 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); if(ext->sel_opt_id == sel_opt) return; - ext->sel_opt_id = sel_opt < ext->option_cnt ? sel_opt : ext->option_cnt - 1; + ext->sel_opt_id = sel_opt < ext->option_cnt ? sel_opt : ext->option_cnt - 1; ext->sel_opt_id_ori = ext->sel_opt_id; /*Move the list to show the current option*/ if(ext->opened == 0) { @@ -228,7 +228,6 @@ void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit) lv_page_set_scrl_fit2(ddlist, LV_FIT_FLOOD, LV_FIT_NONE); } else { lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_NONE); - } lv_ddlist_refr_size(ddlist, false); @@ -260,7 +259,6 @@ void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en) ext->stay_open = en ? 1 : 0; } - /** * Set the open/close animation time. * @param ddlist pointer to a drop down list @@ -287,31 +285,26 @@ void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, lv_style_t * lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); switch(type) { - case LV_DDLIST_STYLE_BG: - lv_page_set_style(ddlist, LV_PAGE_STYLE_BG, style); - break; - case LV_DDLIST_STYLE_SB: - lv_page_set_style(ddlist, LV_PAGE_STYLE_SB, style); - break; + case LV_DDLIST_STYLE_BG: lv_page_set_style(ddlist, LV_PAGE_STYLE_BG, style); break; + case LV_DDLIST_STYLE_SB: lv_page_set_style(ddlist, LV_PAGE_STYLE_SB, style); break; case LV_DDLIST_STYLE_SEL: - ext->sel_style = style; + ext->sel_style = style; lv_obj_t * scrl = lv_page_get_scrl(ddlist); - lv_obj_refresh_ext_size(scrl); /*Because of the wider selected rectangle*/ + lv_obj_refresh_ext_size(scrl); /*Because of the wider selected rectangle*/ break; } } -void lv_ddlist_set_align(lv_obj_t *ddlist, lv_label_align_t align) +void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_label_set_align(ext->label, align); + lv_label_set_align(ext->label, align); } /*===================== * Getter functions *====================*/ - /** * Get the options of a drop down list * @param ddlist pointer to drop down list object @@ -346,13 +339,12 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t bu lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); uint16_t i; - uint16_t line = 0; + uint16_t line = 0; const char * opt_txt = lv_label_get_text(ext->label); - uint16_t txt_len = strlen(opt_txt); - + uint16_t txt_len = strlen(opt_txt); for(i = 0; i < txt_len && line != ext->sel_opt_id; i++) { - if(opt_txt[i] == '\n') line ++; + if(opt_txt[i] == '\n') line++; } uint16_t c; @@ -422,25 +414,21 @@ lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); switch(type) { - case LV_DDLIST_STYLE_BG: - return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG); - case LV_DDLIST_STYLE_SB: - return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB); - case LV_DDLIST_STYLE_SEL: - return ext->sel_style; - default: - return NULL; + case LV_DDLIST_STYLE_BG: return lv_page_get_style(ddlist, LV_PAGE_STYLE_BG); + case LV_DDLIST_STYLE_SB: return lv_page_get_style(ddlist, LV_PAGE_STYLE_SB); + case LV_DDLIST_STYLE_SEL: return ext->sel_style; + default: return NULL; } /*To avoid warning*/ return NULL; } -lv_label_align_t lv_ddlist_get_align(const lv_obj_t *ddlist) +lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - return lv_label_get_align(ext->label); + return lv_label_get_align(ext->label); } /*===================== @@ -458,7 +446,7 @@ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - ext->opened = 1; + ext->opened = 1; lv_obj_set_drag(lv_page_get_scrl(ddlist), true); lv_ddlist_refr_size(ddlist, anim_en); } @@ -474,7 +462,7 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - ext->opened = 0; + ext->opened = 0; lv_obj_set_drag(lv_page_get_scrl(ddlist), false); lv_ddlist_refr_size(ddlist, anim_en); } @@ -488,25 +476,21 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) * @param ddlist drop down list * @return text alignment flag */ -static lv_txt_flag_t lv_ddlist_get_txt_flag(const lv_obj_t *ddlist) +static lv_txt_flag_t lv_ddlist_get_txt_flag(const lv_obj_t * ddlist) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - - /*The label might be already deleted so just return with some value*/ - if(!ext->label) return LV_TXT_FLAG_CENTER; - - lv_label_align_t align = lv_label_get_align(ext->label); - - switch(align) - { - default: - case LV_LABEL_ALIGN_LEFT: - return LV_TXT_FLAG_NONE; - case LV_LABEL_ALIGN_CENTER: - return LV_TXT_FLAG_CENTER; - case LV_LABEL_ALIGN_RIGHT: - return LV_TXT_FLAG_RIGHT; - } + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + + /*The label might be already deleted so just return with some value*/ + if(!ext->label) return LV_TXT_FLAG_CENTER; + + lv_label_align_t align = lv_label_get_align(ext->label); + + switch(align) { + default: + case LV_LABEL_ALIGN_LEFT: return LV_TXT_FLAG_NONE; + case LV_LABEL_ALIGN_CENTER: return LV_TXT_FLAG_CENTER; + case LV_LABEL_ALIGN_RIGHT: return LV_TXT_FLAG_RIGHT; + } } /** @@ -530,12 +514,12 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig ancestor_design(ddlist, mask, mode); lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); + lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); /*If the list is opened draw a rectangle under the selected item*/ if(ext->opened != 0 || ext->force_sel) { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_height(font); /*Draw the selected*/ lv_area_t rect_area; @@ -554,13 +538,13 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_POST) { /*Redraw the text on the selected area with a different color*/ lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); + lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); /*Redraw only in opened state*/ if(ext->opened || ext->force_sel) { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_height(font); lv_area_t area_sel; area_sel.y1 = ext->label->coords.y1; @@ -578,45 +562,45 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig lv_style_t new_style; lv_style_copy(&new_style, style); new_style.text.color = sel_style->text.color; - new_style.text.opa = sel_style->text.opa; - lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist); + new_style.text.opa = sel_style->text.opa; + lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist); lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, lv_label_get_text(ext->label), flag, NULL, -1, -1); } } - /*Add a down symbol in ddlist when closed*/ - else - { - /*Draw a arrow in ddlist if enabled*/ - if(ext->draw_arrow) - { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - const lv_font_t * font = style->text.font; - lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t font_h = lv_font_get_height(font); - lv_style_t new_style; - lv_style_copy(&new_style, style); - new_style.text.color = sel_style->text.color; - new_style.text.opa = sel_style->text.opa; - lv_area_t area_arrow; - area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right; - area_arrow.x1 = area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0); - - area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; - area_arrow.y2 = area_arrow.y1 + font_h; - - - lv_area_t mask_arrow; - bool area_ok; - area_ok = lv_area_intersect(&mask_arrow, mask, &area_arrow); - if (area_ok) - { - lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, - LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, NULL, -1, -1); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ - } - } - } + /*Add a down symbol in ddlist when closed*/ + else { + /*Draw a arrow in ddlist if enabled*/ + if(ext->draw_arrow) { + lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + const lv_font_t * font = style->text.font; + lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + lv_coord_t font_h = lv_font_get_height(font); + lv_style_t new_style; + lv_style_copy(&new_style, style); + new_style.text.color = sel_style->text.color; + new_style.text.opa = sel_style->text.opa; + lv_area_t area_arrow; + area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right; + area_arrow.x1 = + area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), + sel_style->text.font, 0, 0); + + area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; + area_arrow.y2 = area_arrow.y1 + font_h; + + lv_area_t mask_arrow; + bool area_ok; + area_ok = lv_area_intersect(&mask_arrow, mask, &area_arrow); + if(area_ok) { + lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, LV_SYMBOL_DOWN, + LV_TXT_FLAG_NONE, NULL, -1, + -1); /*Use a down arrow in ddlist, you can replace it with your + custom symbol*/ + } + } + } /*Draw the scrollbar in the ancestor page design function*/ ancestor_design(ddlist, mask, mode); } @@ -646,41 +630,39 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par ext->label = NULL; } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(ddlist); - bool editing = lv_group_get_editing(g); + lv_group_t * g = lv_obj_get_group(ddlist); + bool editing = lv_group_get_editing(g); lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { /*Open the list if editing*/ if(editing) { - ext->opened = true; + ext->opened = true; ext->sel_opt_id_ori = ext->sel_opt_id; lv_ddlist_refr_size(ddlist, true); } /*Close the lift if navigating*/ else { - ext->opened = false; + ext->opened = false; ext->sel_opt_id = ext->sel_opt_id_ori; lv_ddlist_refr_size(ddlist, true); - } } else { /*Open the list if closed*/ if(!ext->opened) { - ext->opened = true; - ext->sel_opt_id_ori = ext->sel_opt_id; /*Save the current value. Used to revert this state if ENER wont't be pressed*/ + ext->opened = true; + ext->sel_opt_id_ori = ext->sel_opt_id; /*Save the current value. Used to revert this + state if ENER wont't be pressed*/ lv_ddlist_refr_size(ddlist, true); } } #endif - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { release_handler(ddlist); - } - else if(sign == LV_SIGNAL_DEFOCUS) { + } else if(sign == LV_SIGNAL_DEFOCUS) { if(ext->opened) { - ext->opened = false; + ext->opened = false; ext->sel_opt_id = ext->sel_opt_id_ori; lv_ddlist_refr_size(ddlist, true); } @@ -693,7 +675,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par } if(ext->sel_opt_id + 1 < ext->option_cnt) { - ext->sel_opt_id ++; + ext->sel_opt_id++; lv_ddlist_pos_current_option(ddlist); lv_obj_invalidate(ddlist); } @@ -703,24 +685,24 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_ddlist_refr_size(ddlist, true); } if(ext->sel_opt_id > 0) { - ext->sel_opt_id --; + ext->sel_opt_id--; lv_ddlist_pos_current_option(ddlist); lv_obj_invalidate(ddlist); } } else if(c == LV_GROUP_KEY_ESC) { if(ext->opened) { - ext->opened = 0; + ext->opened = 0; ext->sel_opt_id = ext->sel_opt_id_ori; lv_ddlist_refr_size(ddlist, true); } } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; + *editable = true; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_ddlist"; @@ -751,17 +733,15 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * /* Because of the wider selected rectangle ext. size * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); + lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); if(scrl->ext_size < hpad) scrl->ext_size = hpad; - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { if(lv_indev_is_dragging(lv_indev_get_act()) == false) { release_handler(ddlist); } - } - else if(sign == LV_SIGNAL_CLEANUP) { + } else if(sign == LV_SIGNAL_CLEANUP) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - ext->label = NULL; /*The label is already deleted*/ + ext->label = NULL; /*The label is already deleted*/ } return res; @@ -792,7 +772,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist) } /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/ - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || + lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { lv_point_t p; lv_indev_get_point(indev, &p); p.y -= ext->label->coords.y1; @@ -800,15 +781,16 @@ static lv_res_t release_handler(lv_obj_t * ddlist) uint16_t letter_i; letter_i = lv_label_get_letter_on(ext->label, &p); - uint16_t new_opt = 0; - const char * txt = lv_label_get_text(ext->label); - uint32_t i = 0; + uint16_t new_opt = 0; + const char * txt = lv_label_get_text(ext->label); + uint32_t i = 0; uint32_t line_cnt = 0; uint32_t letter; for(line_cnt = 0; line_cnt < letter_i; line_cnt++) { letter = lv_txt_encoded_next(txt, &i); - /*Count he lines to reach the clicked letter. But ignore the last '\n' because it still belongs to the clicked line*/ - if(letter == '\n' && i != letter_i) new_opt ++; + /*Count he lines to reach the clicked letter. But ignore the last '\n' because it + * still belongs to the clicked line*/ + if(letter == '\n' && i != letter_i) new_opt++; } ext->sel_opt_id = new_opt; @@ -829,7 +811,6 @@ static lv_res_t release_handler(lv_obj_t * ddlist) } return LV_RES_OK; - } /** @@ -843,18 +824,20 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) anim_en = false; #endif lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_style_t * style = lv_obj_get_style(ddlist); + lv_style_t * style = lv_obj_get_style(ddlist); lv_coord_t new_height; if(ext->opened) { /*Open the list*/ - if(ext->fix_height == 0) new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + - style->body.padding.top + style->body.padding.bottom; - else new_height = ext->fix_height; + if(ext->fix_height == 0) + new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + + style->body.padding.bottom; + else + new_height = ext->fix_height; } else { /*Close the list*/ - const lv_font_t * font = style->text.font; + const lv_font_t * font = style->text.font; lv_style_t * label_style = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(font); - new_height = font_h + 2 * label_style->text.line_space; + lv_coord_t font_h = lv_font_get_height(font); + new_height = font_h + 2 * label_style->text.line_space; lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE); } @@ -864,21 +847,22 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION - lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then it will overwrite this changes*/ + lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then + it will overwrite this changes*/ } else { lv_anim_t a; - a.var = ddlist; - a.start = lv_obj_get_height(ddlist); - a.end = new_height; - a.fp = (lv_anim_fp_t)lv_ddlist_adjust_height; - a.path = lv_anim_path_linear; - a.end_cb = (lv_anim_cb_t)lv_ddlist_anim_cb; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; + a.var = ddlist; + a.start = lv_obj_get_height(ddlist); + a.end = new_height; + a.fp = (lv_anim_fp_t)lv_ddlist_adjust_height; + a.path = lv_anim_path_linear; + a.end_cb = (lv_anim_cb_t)lv_ddlist_anim_cb; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; ext->force_sel = 1; /*Keep the list item selected*/ lv_anim_create(&a); @@ -891,12 +875,13 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) * Called at end of list animation. * @param ddlist pointer to a drop down list */ -static void lv_ddlist_anim_cb(lv_obj_t * ddlist) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); +static void lv_ddlist_anim_cb(lv_obj_t * ddlist) +{ + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_ddlist_pos_current_option(ddlist); + lv_ddlist_pos_current_option(ddlist); - ext->force_sel = 0; /*Turn off drawing of selection*/ + ext->force_sel = 0; /*Turn off drawing of selection*/ if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } @@ -907,9 +892,10 @@ static void lv_ddlist_anim_cb(lv_obj_t * ddlist) { * @param ddlist Drop down list object * @param height New drop down list height */ -static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) { - lv_obj_set_height(ddlist, height); - lv_ddlist_pos_current_option(ddlist); +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) +{ + lv_obj_set_height(ddlist, height); + lv_ddlist_pos_current_option(ddlist); } /** @@ -918,18 +904,18 @@ static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) { */ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_style_t * style = lv_obj_get_style(ddlist); - const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + lv_style_t * style = lv_obj_get_style(ddlist); + const lv_font_t * font = style->text.font; + lv_coord_t font_h = lv_font_get_height(font); lv_style_t * label_style = lv_obj_get_style(ext->label); - lv_obj_t * scrl = lv_page_get_scrl(ddlist); - - lv_coord_t h = lv_obj_get_height(ddlist); - lv_coord_t line_y1 = ext->sel_opt_id * (font_h + label_style->text.line_space) + ext->label->coords.y1 - scrl->coords.y1; + lv_obj_t * scrl = lv_page_get_scrl(ddlist); - lv_obj_set_y(scrl, - line_y1 + (h - font_h) / 2); + lv_coord_t h = lv_obj_get_height(ddlist); + lv_coord_t line_y1 = ext->sel_opt_id * (font_h + label_style->text.line_space) + + ext->label->coords.y1 - scrl->coords.y1; + lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2); } #endif diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 077ba956a5fb..c9f7c6cc19c5 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -46,17 +46,17 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t *label; /*Label for the options*/ - lv_style_t * sel_style; /*Style of the selected option*/ - uint16_t option_cnt; /*Number of options*/ - uint16_t sel_opt_id; /*Index of the current option*/ - uint16_t sel_opt_id_ori; /*Store the original index on focus*/ - uint16_t anim_time; /*Open/Close animation time [ms]*/ - uint8_t opened :1; /*1: The list is opened (handled by the library)*/ - uint8_t force_sel :1; /*1: Keep the selection highlight even if the list is closed*/ - uint8_t draw_arrow :1; /*1: Draw arrow*/ - uint8_t stay_open :1; /*1: Don't close the list when a new item is selected*/ - lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ + lv_obj_t * label; /*Label for the options*/ + lv_style_t * sel_style; /*Style of the selected option*/ + uint16_t option_cnt; /*Number of options*/ + uint16_t sel_opt_id; /*Index of the current option*/ + uint16_t sel_opt_id_ori; /*Store the original index on focus*/ + uint16_t anim_time; /*Open/Close animation time [ms]*/ + uint8_t opened : 1; /*1: The list is opened (handled by the library)*/ + uint8_t force_sel : 1; /*1: Keep the selection highlight even if the list is closed*/ + uint8_t draw_arrow : 1; /*1: Draw arrow*/ + uint8_t stay_open : 1; /*1: Don't close the list when a new item is selected*/ + lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ } lv_ddlist_ext_t; enum { @@ -72,7 +72,8 @@ typedef uint8_t lv_ddlist_style_t; /** * Create a drop down list objects * @param par pointer to an object, it will be the parent of the new drop down list - * @param copy pointer to a drop down list object, if not NULL then the new object will be copied from it + * @param copy pointer to a drop down list object, if not NULL then the new object will be copied + * from it * @return pointer to the created drop down list */ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy); @@ -103,7 +104,6 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt); */ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); - /** * Enable or disable the horizontal fit to the content * @param ddlist pointer to a drop down list @@ -142,27 +142,25 @@ static inline void lv_ddlist_set_sb_mode(lv_obj_t * ddlist, lv_sb_mode_t mode) */ void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time); - /** * Set a style of a drop down list * @param ddlist pointer to a drop down list object * @param type which style should be set * @param style pointer to a style * */ -void lv_ddlist_set_style(lv_obj_t *ddlist, lv_ddlist_style_t type, lv_style_t *style); +void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, lv_style_t * style); /** * Set the alignment of the labels in a drop down list * @param ddlist pointer to a drop down list object * @param align alignment of labels */ -void lv_ddlist_set_align(lv_obj_t *ddlist, lv_label_align_t align); +void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align); /*===================== * Getter functions *====================*/ - /** * Get the options of a drop down list * @param ddlist pointer to drop down list object @@ -227,14 +225,14 @@ uint16_t lv_ddlist_get_anim_time(const lv_obj_t * ddlist); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ddlist_get_style(const lv_obj_t *ddlist, lv_ddlist_style_t type); +lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type); /** * Get the alignment of the labels in a drop down list * @param ddlist pointer to a drop down list object * @return alignment of labels */ -lv_label_align_t lv_ddlist_get_align(const lv_obj_t *ddlist); +lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist); /*===================== * Other functions @@ -258,10 +256,10 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en); * MACROS **********************/ -#endif /*LV_USE_DDLIST*/ +#endif /*LV_USE_DDLIST*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_DDLIST_H*/ +#endif /*LV_DDLIST_H*/ diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 3b443198ec14..89b771048aa1 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -3,7 +3,6 @@ * */ - /********************* * INCLUDES *********************/ @@ -21,12 +20,12 @@ /********************* * DEFINES *********************/ -#define LV_GAUGE_DEF_NEEDLE_COLOR LV_COLOR_RED -#define LV_GAUGE_DEF_LABEL_COUNT 6 -#define LV_GAUGE_DEF_LINE_COUNT 21 /*Should be: ((label_cnt - 1) * internal_lines) + 1*/ -#define LV_GAUGE_DEF_ANGLE 220 -#define LV_GAUGE_INTERPOLATE_SHIFT 5 /*Interpolate the needle drawing between to degrees*/ -#define LV_GAUGE_INTERPOLATE_MASK 0x1F +#define LV_GAUGE_DEF_NEEDLE_COLOR LV_COLOR_RED +#define LV_GAUGE_DEF_LABEL_COUNT 6 +#define LV_GAUGE_DEF_LINE_COUNT 21 /*Should be: ((label_cnt - 1) * internal_lines) + 1*/ +#define LV_GAUGE_DEF_ANGLE 220 +#define LV_GAUGE_INTERPOLATE_SHIFT 5 /*Interpolate the needle drawing between to degrees*/ +#define LV_GAUGE_INTERPOLATE_MASK 0x1F /********************** * TYPEDEFS @@ -75,10 +74,10 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ - ext->needle_count = 0; - ext->values = NULL; + ext->needle_count = 0; + ext->values = NULL; ext->needle_colors = NULL; - ext->label_count = LV_GAUGE_DEF_LABEL_COUNT; + ext->label_count = LV_GAUGE_DEF_LABEL_COUNT; if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_gauge); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_gauge); @@ -88,7 +87,8 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new gauge gauge*/ if(copy == NULL) { - lv_gauge_set_scale(new_gauge, LV_GAUGE_DEF_ANGLE, LV_GAUGE_DEF_LINE_COUNT, LV_GAUGE_DEF_LABEL_COUNT); + lv_gauge_set_scale(new_gauge, LV_GAUGE_DEF_ANGLE, LV_GAUGE_DEF_LINE_COUNT, + LV_GAUGE_DEF_LABEL_COUNT); lv_gauge_set_needle_count(new_gauge, 1, NULL); lv_gauge_set_critical_value(new_gauge, 80); lv_obj_set_size(new_gauge, 2 * LV_DPI, 2 * LV_DPI); @@ -170,26 +170,26 @@ void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle_id, int16_t value) if(needle_id >= ext->needle_count) return; if(ext->values[needle_id] == value) return; - int16_t min = lv_gauge_get_min_value(gauge); int16_t max = lv_gauge_get_max_value(gauge); - if(value > max) value = max; - else if(value < min) value = min; + if(value > max) + value = max; + else if(value < min) + value = min; ext->values[needle_id] = value; - lv_obj_invalidate(gauge); } - /** * Set the scale settings of a gauge * @param gauge pointer to a gauge object * @param angle angle of the scale (0..360) * @param line_cnt count of scale lines. - * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) + 1 + * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) + + * 1 * @param label_cnt count of scale labels. */ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt) @@ -199,7 +199,7 @@ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint lv_lmeter_set_scale(gauge, angle, line_cnt); lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - ext->label_count = label_cnt; + ext->label_count = label_cnt; lv_obj_invalidate(gauge); } @@ -213,10 +213,10 @@ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint * @param needle the id of the needle * @return the value of the needle [min,max] */ -int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle) +int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle) { lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - int16_t min = lv_gauge_get_min_value(gauge); + int16_t min = lv_gauge_get_min_value(gauge); if(needle >= ext->needle_count) return min; @@ -273,28 +273,28 @@ static bool lv_gauge_design(lv_obj_t * gauge, const lv_area_t * mask, lv_design_ * If the object is in focus 'lv_obj_get_style()' will give a pointer to tmp style * and to the real object style. It is important because of style change tricks below*/ lv_style_t * style_ori_p = gauge->style_p; - lv_style_t * style = lv_obj_get_style(gauge); - lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); + lv_style_t * style = lv_obj_get_style(gauge); + lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); lv_gauge_draw_scale(gauge, mask); /*Draw the ancestor line meter with max value to show the rainbow like line colors*/ uint16_t line_cnt_tmp = ext->lmeter.line_cnt; - ancestor_design(gauge, mask, mode); /*To draw lines*/ + ancestor_design(gauge, mask, mode); /*To draw lines*/ /*Temporally modify the line meter to draw thicker and longer lines where labels are*/ lv_style_t style_tmp; lv_style_copy(&style_tmp, style); - ext->lmeter.line_cnt = ext->label_count; /*Only to labels*/ - style_tmp.line.width = style_tmp.line.width * 2; /*Ticker lines*/ - style_tmp.body.padding.left = style_tmp.body.padding.left * 2; /*Longer lines*/ - style_tmp.body.padding.right = style_tmp.body.padding.right * 2; /*Longer lines*/ - gauge->style_p = &style_tmp; + ext->lmeter.line_cnt = ext->label_count; /*Only to labels*/ + style_tmp.line.width = style_tmp.line.width * 2; /*Ticker lines*/ + style_tmp.body.padding.left = style_tmp.body.padding.left * 2; /*Longer lines*/ + style_tmp.body.padding.right = style_tmp.body.padding.right * 2; /*Longer lines*/ + gauge->style_p = &style_tmp; - ancestor_design(gauge, mask, mode); /*To draw lines*/ + ancestor_design(gauge, mask, mode); /*To draw lines*/ - ext->lmeter.line_cnt = line_cnt_tmp; /*Restore the parameters*/ - gauge->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/ + ext->lmeter.line_cnt = line_cnt_tmp; /*Restore the parameters*/ + gauge->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/ lv_gauge_draw_needle(gauge, mask); @@ -329,7 +329,7 @@ static lv_res_t lv_gauge_signal(lv_obj_t * gauge, lv_signal_t sign, void * param } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_gauge"; @@ -348,16 +348,17 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) char scale_txt[16]; lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - lv_style_t * style = lv_obj_get_style(gauge); - lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); - lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; - lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; - lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; + lv_style_t * style = lv_obj_get_style(gauge); + lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); + lv_coord_t r = + lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; + lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; + lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; int16_t scale_angle = lv_lmeter_get_scale_angle(gauge); - uint16_t label_num = ext->label_count; - int16_t angle_ofs = 90 + (360 - scale_angle) / 2; - int16_t min = lv_gauge_get_min_value(gauge); - int16_t max = lv_gauge_get_max_value(gauge); + uint16_t label_num = ext->label_count; + int16_t angle_ofs = 90 + (360 - scale_angle) / 2; + int16_t min = lv_gauge_get_min_value(gauge); + int16_t max = lv_gauge_get_max_value(gauge); uint8_t i; for(i = 0; i < label_num; i++) { @@ -376,8 +377,8 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) lv_area_t label_cord; lv_point_t label_size; - lv_txt_get_size(&label_size, scale_txt, style->text.font, - style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); + lv_txt_get_size(&label_size, scale_txt, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); /*Draw the label*/ label_cord.x1 = x - label_size.x / 2; @@ -385,7 +386,8 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) label_cord.x2 = label_cord.x1 + label_size.x; label_cord.y2 = label_cord.y1 + label_size.y; - lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, + -1); } } /** @@ -397,16 +399,16 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) { lv_style_t style_needle; lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - lv_style_t * style = lv_gauge_get_style(gauge); - lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); + lv_style_t * style = lv_gauge_get_style(gauge); + lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); - lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left; - lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; - lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; - uint16_t angle = lv_lmeter_get_scale_angle(gauge); + lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left; + lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; + lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; + uint16_t angle = lv_lmeter_get_scale_angle(gauge); int16_t angle_ofs = 90 + (360 - angle) / 2; - int16_t min = lv_gauge_get_min_value(gauge); - int16_t max = lv_gauge_get_max_value(gauge); + int16_t min = lv_gauge_get_min_value(gauge); + int16_t max = lv_gauge_get_max_value(gauge); lv_point_t p_mid; lv_point_t p_end; lv_point_t p_end_low; @@ -419,13 +421,12 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) p_mid.y = y_ofs; for(i = 0; i < ext->needle_count; i++) { /*Calculate the end point of a needle*/ - int16_t needle_angle = (ext->values[i] - min) * angle * (1 << LV_GAUGE_INTERPOLATE_SHIFT) / (max - min); //+ angle_ofs; + int16_t needle_angle = (ext->values[i] - min) * angle * (1 << LV_GAUGE_INTERPOLATE_SHIFT) / + (max - min); //+ angle_ofs; - - int16_t needle_angle_low = (needle_angle >> LV_GAUGE_INTERPOLATE_SHIFT) + angle_ofs; + int16_t needle_angle_low = (needle_angle >> LV_GAUGE_INTERPOLATE_SHIFT) + angle_ofs; int16_t needle_angle_high = needle_angle_low + 1; - p_end_low.y = (lv_trigo_sin(needle_angle_low) * r) / LV_TRIGO_SIN_MAX + y_ofs; p_end_low.x = (lv_trigo_sin(needle_angle_low + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs; @@ -433,8 +434,10 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) p_end_high.x = (lv_trigo_sin(needle_angle_high + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs; uint16_t rem = needle_angle & ((1 << LV_GAUGE_INTERPOLATE_SHIFT) - 1); - int16_t x_mod = ((LV_MATH_ABS(p_end_high.x - p_end_low.x)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; - int16_t y_mod = ((LV_MATH_ABS(p_end_high.y - p_end_low.y)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; + int16_t x_mod = + ((LV_MATH_ABS(p_end_high.x - p_end_low.x)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; + int16_t y_mod = + ((LV_MATH_ABS(p_end_high.y - p_end_low.y)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; if(p_end_high.x < p_end_low.x) x_mod = -x_mod; if(p_end_high.y < p_end_low.y) y_mod = -y_mod; @@ -443,8 +446,10 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) p_end.y = p_end_low.y + y_mod; /*Draw the needle with the corresponding color*/ - if(ext->needle_colors == NULL) style_needle.line.color = LV_GAUGE_DEF_NEEDLE_COLOR; - else style_needle.line.color = ext->needle_colors[i]; + if(ext->needle_colors == NULL) + style_needle.line.color = LV_GAUGE_DEF_NEEDLE_COLOR; + else + style_needle.line.color = ext->needle_colors[i]; lv_draw_line(&p_mid, &p_end, mask, &style_needle, opa_scale); } @@ -454,7 +459,7 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) lv_style_copy(&style_neddle_mid, &lv_style_plain); style_neddle_mid.body.main_color = style->body.border.color; style_neddle_mid.body.grad_color = style->body.border.color; - style_neddle_mid.body.radius = LV_RADIUS_CIRCLE; + style_neddle_mid.body.radius = LV_RADIUS_CIRCLE; lv_area_t nm_cord; nm_cord.x1 = x_ofs - style->body.padding.top; diff --git a/src/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h index 409c79e0ffaf..83977f1ec489 100644 --- a/src/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -42,10 +42,10 @@ extern "C" { /*Data of gauge*/ typedef struct { - lv_lmeter_ext_t lmeter; /*Ext. of ancestor*/ + lv_lmeter_ext_t lmeter; /*Ext. of ancestor*/ /*New data for this type */ - int16_t * values; /*Array of the set values (for needles) */ - const lv_color_t * needle_colors; /*Color of the needles (lv_color_t my_colors[needle_num])*/ + int16_t * values; /*Array of the set values (for needles) */ + const lv_color_t * needle_colors; /*Color of the needles (lv_color_t my_colors[needle_num])*/ uint8_t needle_count; /*Number of needles*/ uint8_t label_count; /*Number of labels on the scale*/ } lv_gauge_ext_t; @@ -88,7 +88,7 @@ void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle_id, int16_t value); * @param min minimum value * @param max maximum value */ -static inline void lv_gauge_set_range(lv_obj_t *gauge, int16_t min, int16_t max) +static inline void lv_gauge_set_range(lv_obj_t * gauge, int16_t min, int16_t max) { lv_lmeter_set_range(gauge, min, max); } @@ -108,7 +108,8 @@ static inline void lv_gauge_set_critical_value(lv_obj_t * gauge, int16_t value) * @param gauge pointer to a gauge object * @param angle angle of the scale (0..360) * @param line_cnt count of scale lines. - * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) + 1 + * The get a given "subdivision" lines between label, `line_cnt` = (sub_div + 1) * (label_cnt - 1) + + * 1 * @param label_cnt count of scale labels. */ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt); @@ -118,7 +119,7 @@ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint * @param gauge pointer to a gauge object * @param bg set the style of the gauge * */ -static inline void lv_gauge_set_style(lv_obj_t *gauge, lv_style_t *bg) +static inline void lv_gauge_set_style(lv_obj_t * gauge, lv_style_t * bg) { lv_obj_set_style(gauge, bg); } @@ -133,7 +134,7 @@ static inline void lv_gauge_set_style(lv_obj_t *gauge, lv_style_t *bg) * @param needle the id of the needle * @return the value of the needle [min,max] */ -int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle); +int16_t lv_gauge_get_value(const lv_obj_t * gauge, uint8_t needle); /** * Get the count of needles on a gauge @@ -204,7 +205,7 @@ static inline uint16_t lv_gauge_get_scale_angle(const lv_obj_t * gauge) * @param gauge pointer to a gauge object * @return pointer to the gauge's style */ -static inline lv_style_t * lv_gauge_get_style(const lv_obj_t *gauge) +static inline lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge) { return lv_obj_get_style(gauge); } @@ -213,10 +214,10 @@ static inline lv_style_t * lv_gauge_get_style(const lv_obj_t *gauge) * MACROS **********************/ -#endif /*LV_USE_GAUGE*/ +#endif /*LV_USE_GAUGE*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_GAUGE_H*/ +#endif /*LV_GAUGE_H*/ diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 214ac89cce4f..28afa7022189 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -70,15 +70,14 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->src = NULL; - ext->src_type = LV_IMG_SRC_UNKNOWN; - ext->cf = LV_IMG_CF_UNKNOWN; - ext->w = lv_obj_get_width(new_img); - ext->h = lv_obj_get_height(new_img); + ext->src = NULL; + ext->src_type = LV_IMG_SRC_UNKNOWN; + ext->cf = LV_IMG_CF_UNKNOWN; + ext->w = lv_obj_get_width(new_img); + ext->h = lv_obj_get_height(new_img); ext->auto_size = 1; - ext->offset.x = 0; - ext->offset.y = 0; - + ext->offset.x = 0; + ext->offset.y = 0; /*Init the new object*/ lv_obj_set_signal_cb(new_img, lv_img_signal); @@ -91,32 +90,29 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) * and must be screen sized*/ if(par != NULL) { ext->auto_size = 1; - lv_obj_set_style(new_img, NULL); /*Inherit the style by default*/ + lv_obj_set_style(new_img, NULL); /*Inherit the style by default*/ } else { ext->auto_size = 0; - lv_obj_set_style(new_img, &lv_style_plain); /*Set a style for screens*/ + lv_obj_set_style(new_img, &lv_style_plain); /*Set a style for screens*/ } } else { lv_img_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->auto_size = copy_ext->auto_size; + ext->auto_size = copy_ext->auto_size; lv_img_set_src(new_img, copy_ext->src); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_img); } - LV_LOG_INFO("image created"); return new_img; } - /*===================== * Setter functions *====================*/ - /** * Set the pixel map to display by the image * @param img pointer to an image object @@ -125,21 +121,18 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) void lv_img_set_src(lv_obj_t * img, const void * src_img) { lv_img_src_t src_type = lv_img_src_get_type(src_img); - lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); #if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { - case LV_IMG_SRC_FILE: - LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); - break; + case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); break; case LV_IMG_SRC_VARIABLE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found"); break; case LV_IMG_SRC_SYMBOL: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_SYMBOL` type found"); break; - default: - LV_LOG_WARN("lv_img_set_src: unknown type"); + default: LV_LOG_WARN("lv_img_set_src: unknown type"); } #endif @@ -149,7 +142,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) if(ext->src_type == LV_IMG_SRC_SYMBOL || ext->src_type == LV_IMG_SRC_FILE) { lv_mem_free(ext->src); } - ext->src = NULL; + ext->src = NULL; ext->src_type = LV_IMG_SRC_UNKNOWN; return; } @@ -157,8 +150,6 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) lv_img_header_t header; lv_img_dsc_get_info(src_img, &header); - - /*Save the source*/ if(src_type == LV_IMG_SRC_VARIABLE) { LV_LOG_INFO("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found"); @@ -171,11 +162,11 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) } else if(src_type == LV_IMG_SRC_FILE || src_type == LV_IMG_SRC_SYMBOL) { /* If the new and the old src are the same then it was only a refresh.*/ if(ext->src != src_img) { - /*If memory was allocated because of the previous `src_type` then free it*/ + /*If memory was allocated because of the previous `src_type` then free it*/ if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) { lv_mem_free(ext->src); } - char * new_str = lv_mem_alloc(strlen(src_img) + 1); + char * new_str = lv_mem_alloc(strlen(src_img) + 1); lv_mem_assert(new_str); if(new_str == NULL) return; strcpy(new_str, src_img); @@ -187,15 +178,16 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) /*`lv_img_dsc_get_info` couldn't set the with and height of a font so set it here*/ lv_style_t * style = lv_img_get_style(img); lv_point_t size; - lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); + lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); header.w = size.x; header.h = size.y; } ext->src_type = src_type; - ext->w = header.w; - ext->h = header.h; - ext->cf = header.cf; + ext->w = header.w; + ext->h = header.h; + ext->cf = header.cf; if(lv_img_get_auto_size(img) != false) { lv_obj_set_size(img, ext->w, ext->h); @@ -224,7 +216,7 @@ void lv_img_set_auto_size(lv_obj_t * img, bool en) * @param x: the new offset along x axis. * @param y: the new offset along y axis. */ -void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y) +void lv_img_set_offset(lv_obj_t * img, lv_coord_t x, lv_coord_t y) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); @@ -241,7 +233,7 @@ void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y) * @param img pointer to an image * @param x: the new offset along x axis. */ -void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x) +void lv_img_set_offset_x(lv_obj_t * img, lv_coord_t x) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); @@ -249,7 +241,6 @@ void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x) ext->offset.x = x; lv_obj_invalidate(img); } - } /** @@ -258,7 +249,7 @@ void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x) * @param img pointer to an image * @param y: the new offset along y axis. */ -void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y) +void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); @@ -272,7 +263,6 @@ void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y) * Getter functions *====================*/ - /** * Get the source of the image * @param img pointer to an image object @@ -294,8 +284,10 @@ const char * lv_img_get_file_name(const lv_obj_t * img) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); - if(ext->src_type == LV_IMG_SRC_FILE) return ext->src; - else return ""; + if(ext->src_type == LV_IMG_SRC_FILE) + return ext->src; + else + return ""; } /** @@ -315,7 +307,7 @@ bool lv_img_get_auto_size(const lv_obj_t * img) * @param img pointer to an image * @return offset.x value. */ -lv_coord_t lv_img_get_offset_x(lv_obj_t *img) +lv_coord_t lv_img_get_offset_x(lv_obj_t * img) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); @@ -327,7 +319,7 @@ lv_coord_t lv_img_get_offset_x(lv_obj_t *img) * @param img pointer to an image * @return offset.y value. */ -lv_coord_t lv_img_get_offset_y(lv_obj_t *img) +lv_coord_t lv_img_get_offset_y(lv_obj_t * img) { lv_img_ext_t * ext = lv_obj_get_ext_attr(img); @@ -357,7 +349,8 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode bool cover = false; if(ext->src_type == LV_IMG_SRC_UNKNOWN || ext->src_type == LV_IMG_SRC_SYMBOL) return false; - if(ext->cf == LV_IMG_CF_TRUE_COLOR || ext->cf == LV_IMG_CF_RAW) cover = lv_area_is_in(mask, &img->coords); + if(ext->cf == LV_IMG_CF_TRUE_COLOR || ext->cf == LV_IMG_CF_RAW) + cover = lv_area_is_in(mask, &img->coords); return cover; } else if(mode == LV_DESIGN_DRAW_MAIN) { @@ -370,7 +363,7 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_VARIABLE) { coords.x1 -= ext->offset.x; coords.y1 -= ext->offset.y; - + LV_LOG_TRACE("lv_img_design: start to draw image"); lv_area_t cords_tmp; cords_tmp.y1 = coords.y1; @@ -388,7 +381,8 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode lv_style_t style_mod; lv_style_copy(&style_mod, style); style_mod.text.color = style->image.color; - lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, + -1, -1); } else { /*Trigger the error handler of image drawer*/ LV_LOG_WARN("lv_img_design: image source type is unknown"); @@ -399,7 +393,6 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode return true; } - /** * Signal function of the image * @param img pointer to an image object @@ -419,19 +412,18 @@ static lv_res_t lv_img_signal(lv_obj_t * img, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CLEANUP) { if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) { lv_mem_free(ext->src); - ext->src = NULL; + ext->src = NULL; ext->src_type = LV_IMG_SRC_UNKNOWN; } } else if(sign == LV_SIGNAL_STYLE_CHG) { /*Refresh the file name to refresh the symbol text size*/ if(ext->src_type == LV_IMG_SRC_SYMBOL) { lv_img_set_src(img, ext->src); - } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_img"; diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index 8681009b83a1..a1666d378f5f 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -39,13 +39,13 @@ typedef struct { /*No inherited ext. because inherited from the base object*/ /*Ext. of ancestor*/ /*New data for this type */ - const void * src; /*Image source: Pointer to an array or a file or a symbol*/ + const void * src; /*Image source: Pointer to an array or a file or a symbol*/ lv_point_t offset; - lv_coord_t w; /*Width of the image (Handled by the library)*/ - lv_coord_t h; /*Height of the image (Handled by the library)*/ - uint8_t src_type :2; /*See: lv_img_src_t*/ - uint8_t auto_size :1; /*1: automatically set the object size to the image size*/ - uint8_t cf :5; /*Color format from `lv_img_color_format_t`*/ + lv_coord_t w; /*Width of the image (Handled by the library)*/ + lv_coord_t h; /*Height of the image (Handled by the library)*/ + uint8_t src_type : 2; /*See: lv_img_src_t*/ + uint8_t auto_size : 1; /*1: automatically set the object size to the image size*/ + uint8_t cf : 5; /*Color format from `lv_img_color_format_t`*/ } lv_img_ext_t; /********************** @@ -79,8 +79,8 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img); */ static inline void lv_img_set_file(lv_obj_t * img, const char * fn) { - (void) img; - (void) fn; + (void)img; + (void)fn; } /** @@ -98,7 +98,7 @@ void lv_img_set_auto_size(lv_obj_t * img, bool autosize_en); * @param x: the new offset along x axis. * @param y: the new offset along y axis. */ -void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y); +void lv_img_set_offset(lv_obj_t * img, lv_coord_t x, lv_coord_t y); /** * Set an offset for the source of an image. @@ -106,7 +106,7 @@ void lv_img_set_offset(lv_obj_t *img, lv_coord_t x, lv_coord_t y); * @param img pointer to an image * @param x: the new offset along x axis. */ -void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x); +void lv_img_set_offset_x(lv_obj_t * img, lv_coord_t x); /** * Set an offset for the source of an image. @@ -114,14 +114,14 @@ void lv_img_set_offset_x(lv_obj_t *img, lv_coord_t x); * @param img pointer to an image * @param y: the new offset along y axis. */ -void lv_img_set_offset_y(lv_obj_t *img, lv_coord_t y); - +void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y); + /** * Set the style of an image * @param img pointer to an image object * @param style pointer to a style */ -static inline void lv_img_set_style(lv_obj_t *img, lv_style_t *style) +static inline void lv_img_set_style(lv_obj_t * img, lv_style_t * style) { lv_obj_set_style(img, style); } @@ -133,8 +133,8 @@ static inline void lv_img_set_style(lv_obj_t *img, lv_style_t *style) */ static inline void lv_img_set_upscale(lv_obj_t * img, bool upcale) { - (void) img; - (void) upcale; + (void)img; + (void)upcale; } /*===================== @@ -167,21 +167,21 @@ bool lv_img_get_auto_size(const lv_obj_t * img); * @param img pointer to an image * @return offset.x value. */ -lv_coord_t lv_img_get_offset_x(lv_obj_t *img); +lv_coord_t lv_img_get_offset_x(lv_obj_t * img); /** * Get the offset.y attribute of the img object. * @param img pointer to an image * @return offset.y value. */ -lv_coord_t lv_img_get_offset_y(lv_obj_t *img); - +lv_coord_t lv_img_get_offset_y(lv_obj_t * img); + /** * Get the style of an image object * @param img pointer to an image object * @return pointer to the image's style */ -static inline lv_style_t* lv_img_get_style(const lv_obj_t *img) +static inline lv_style_t * lv_img_get_style(const lv_obj_t * img) { return lv_obj_get_style(img); } @@ -204,10 +204,10 @@ static inline bool lv_img_get_upscale(const lv_obj_t * img) /*Use this macro to declare an image in a c file*/ #define LV_IMG_DECLARE(var_name) extern const lv_img_dsc_t var_name; -#endif /*LV_USE_IMG*/ +#endif /*LV_USE_IMG*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_IMG_H*/ +#endif /*LV_IMG_H*/ diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index ed59c4f8f0e8..2b454d9b1ef4 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -41,7 +41,8 @@ static lv_design_cb_t ancestor_design; /** * Create a image button object * @param par pointer to an object, it will be the parent of the new image button - * @param copy pointer to a image button object, if not NULL then the new object will be copied from it + * @param copy pointer to a image button object, if not NULL then the new object will be copied from + * it * @return pointer to the created image button */ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) @@ -60,7 +61,7 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_imgbtn); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_imgbtn); - /*Initialize the allocated 'ext' */ + /*Initialize the allocated 'ext' */ #if LV_IMGBTN_TILED == 0 memset(ext->img_src, 0, sizeof(ext->img_src)); #else @@ -123,11 +124,15 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src * Set images for a state of the image button * @param imgbtn pointer to an image button object * @param state for which state set the new image (from `lv_btn_state_t`) ` - * @param src_left pointer to an image source for the left side of the button (a C array or path to a file) - * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C array or path to a file) - * @param src_right pointer to an image source for the right side of the button (a C array or path to a file) + * @param src_left pointer to an image source for the left side of the button (a C array or path to + * a file) + * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C + * array or path to a file) + * @param src_right pointer to an image source for the right side of the button (a C array or path + * to a file) */ -void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid, const void * src_right) +void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, + const void * src_mid, const void * src_right) { lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); @@ -249,7 +254,7 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig /*Return false if the object is not covers the mask_p area*/ if(mode == LV_DESIGN_COVER_CHK) { lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); - bool cover = false; + bool cover = false; if(ext->act_cf == LV_IMG_CF_TRUE_COLOR || ext->act_cf == LV_IMG_CF_RAW) { cover = lv_area_is_in(mask, &imgbtn->coords); } @@ -260,9 +265,9 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_MAIN) { /*Just draw an image*/ lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); - lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); - lv_style_t * style = lv_imgbtn_get_style(imgbtn, state); - lv_opa_t opa_scale = lv_obj_get_opa_scale(imgbtn); + lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); + lv_style_t * style = lv_imgbtn_get_style(imgbtn, state); + lv_opa_t opa_scale = lv_obj_get_opa_scale(imgbtn); #if LV_IMGBTN_TILED == 0 const void * src = ext->img_src[state]; @@ -302,7 +307,7 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig lv_coord_t i; lv_img_dsc_get_info(src, &header); - coords.x1 = imgbtn->coords.x1 + left_w ; + coords.x1 = imgbtn->coords.x1 + left_w; coords.y1 = imgbtn->coords.y1; coords.x2 = coords.x1 + header.w - 1; coords.y2 = imgbtn->coords.y1 + header.h - 1; @@ -314,13 +319,11 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig } } - #endif } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -342,15 +345,15 @@ static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * par if(res != LV_RES_OK) return res; if(sign == LV_SIGNAL_STYLE_CHG) { - /* If the style changed then the button was clicked, released etc. so probably the state was changed as well - * Set the new image for the new state.*/ + /* If the style changed then the button was clicked, released etc. so probably the state was + * changed as well Set the new image for the new state.*/ refr_img(imgbtn); } else if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_imgbtn"; @@ -359,11 +362,10 @@ static lv_res_t lv_imgbtn_signal(lv_obj_t * imgbtn, lv_signal_t sign, void * par return res; } - static void refr_img(lv_obj_t * imgbtn) { lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); - lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); + lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); lv_img_header_t header; #if LV_IMGBTN_TILED == 0 diff --git a/src/lv_objx/lv_imgbtn.h b/src/lv_objx/lv_imgbtn.h index de551d67ded4..50fee0e17fa8 100644 --- a/src/lv_objx/lv_imgbtn.h +++ b/src/lv_objx/lv_imgbtn.h @@ -38,20 +38,20 @@ extern "C" { * TYPEDEFS **********************/ /*Data of image button*/ -typedef struct { +typedef struct +{ lv_btn_ext_t btn; /*Ext. of ancestor*/ /*New data for this type */ #if LV_IMGBTN_TILED == 0 - const void * img_src[LV_BTN_STATE_NUM]; /*Store images to each state*/ + const void * img_src[LV_BTN_STATE_NUM]; /*Store images to each state*/ #else - const void * img_src_left[LV_BTN_STATE_NUM]; /*Store left side images to each state*/ - const void * img_src_mid[LV_BTN_STATE_NUM]; /*Store center images to each state*/ - const void * img_src_right[LV_BTN_STATE_NUM]; /*Store right side images to each state*/ + const void * img_src_left[LV_BTN_STATE_NUM]; /*Store left side images to each state*/ + const void * img_src_mid[LV_BTN_STATE_NUM]; /*Store center images to each state*/ + const void * img_src_right[LV_BTN_STATE_NUM]; /*Store right side images to each state*/ #endif - lv_img_cf_t act_cf; /*Color format of the currently active image*/ + lv_img_cf_t act_cf; /*Color format of the currently active image*/ } lv_imgbtn_ext_t; - /*Styles*/ enum { LV_IMGBTN_STYLE_REL, @@ -62,7 +62,6 @@ enum { }; typedef uint8_t lv_imgbtn_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -70,7 +69,8 @@ typedef uint8_t lv_imgbtn_style_t; /** * Create a image button objects * @param par pointer to an object, it will be the parent of the new image button - * @param copy pointer to a image button object, if not NULL then the new object will be copied from it + * @param copy pointer to a image button object, if not NULL then the new object will be copied from + * it * @return pointer to the created image button */ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy); @@ -79,7 +79,6 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy); * Add/remove functions *=====================*/ - /*===================== * Setter functions *====================*/ @@ -97,11 +96,15 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src * Set images for a state of the image button * @param imgbtn pointer to an image button object * @param state for which state set the new image (from `lv_btn_state_t`) ` - * @param src_left pointer to an image source for the left side of the button (a C array or path to a file) - * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C array or path to a file) - * @param src_right pointer to an image source for the right side of the button (a C array or path to a file) + * @param src_left pointer to an image source for the left side of the button (a C array or path to + * a file) + * @param src_mid pointer to an image source for the middle of the button (ideally 1px wide) (a C + * array or path to a file) + * @param src_right pointer to an image source for the right side of the button (a C array or path + * to a file) */ -void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid, const void * src_right); +void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, + const void * src_mid, const void * src_right); #endif @@ -140,13 +143,12 @@ static inline void lv_imgbtn_toggle(lv_obj_t * imgbtn) * @param type which style should be set * @param style pointer to a style */ -void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t *style); +void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t * style); /*===================== * Getter functions *====================*/ - #if LV_IMGBTN_TILED == 0 /** * Get the images in a given state @@ -219,10 +221,10 @@ lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type * MACROS **********************/ -#endif /*LV_USE_IMGBTN*/ +#endif /*LV_USE_IMGBTN*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_IMGBTN_H*/ +#endif /*LV_IMGBTN_H*/ diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 74234a1ea75a..32b52a33ffda 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -31,61 +31,182 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param); **********************/ static lv_signal_cb_t ancestor_signal; -static const char * kb_map_lc[] = { - "1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "Bksp", "\n", - "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", "Enter", "\n", - "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" -}; +static const char * kb_map_lc[] = {"1#", + "q", + "w", + "e", + "r", + "t", + "y", + "u", + "i", + "o", + "p", + "Bksp", + "\n", + "ABC", + "a", + "s", + "d", + "f", + "g", + "h", + "j", + "k", + "l", + "Enter", + "\n", + "_", + "-", + "z", + "x", + "c", + "v", + "b", + "n", + "m", + ".", + ",", + ":", + "\n", + LV_SYMBOL_CLOSE, + LV_SYMBOL_LEFT, + " ", + LV_SYMBOL_RIGHT, + LV_SYMBOL_OK, + ""}; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_CTRL_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 6, 2, 2 -}; - -static const char * kb_map_uc[] = { - "1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", - "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", - "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" -}; + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), + 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, + 2}; + +static const char * kb_map_uc[] = {"1#", + "Q", + "W", + "E", + "R", + "T", + "Y", + "U", + "I", + "O", + "P", + "Bksp", + "\n", + "abc", + "A", + "S", + "D", + "F", + "G", + "H", + "J", + "K", + "L", + "Enter", + "\n", + "_", + "-", + "Z", + "X", + "C", + "V", + "B", + "N", + "M", + ".", + ",", + ":", + "\n", + LV_SYMBOL_CLOSE, + LV_SYMBOL_LEFT, + " ", + LV_SYMBOL_RIGHT, + LV_SYMBOL_OK, + ""}; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - (6 | LV_BTNM_CTRL_NO_REPEAT), 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 6, 2, 2 -}; - -static const char * kb_map_spec[] = { - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "Bksp", "\n", - "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", - "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", - LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, "" -}; + 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), + 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, + 2}; + +static const char * kb_map_spec[] = {"0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "Bksp", + "\n", + "abc", + "+", + "-", + "/", + "*", + "=", + "%", + "!", + "?", + "#", + "<", + ">", + "\n", + "\\", + "@", + "$", + "(", + ")", + "{", + "}", + "[", + "]", + ";", + "\"", + "'", + "\n", + LV_SYMBOL_CLOSE, + LV_SYMBOL_LEFT, + " ", + LV_SYMBOL_RIGHT, + LV_SYMBOL_OK, + ""}; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - (2 | LV_BTNM_CTRL_NO_REPEAT), 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 6, 2, 2 -}; - -static const char * kb_map_num[] = { - "1", "2", "3", "\202"LV_SYMBOL_CLOSE, "\n", - "4", "5", "6", "\202"LV_SYMBOL_OK, "\n", - "7", "8", "9", "\202Bksp", "\n", - "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, "" -}; - -static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { - 1, 1, 1, 2, - 1, 1, 1, 2, - 1, 1, 1, 2, - 1, 1, 1, 1, 1 -}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, (2 | LV_BTNM_CTRL_NO_REPEAT), + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 6, 2, 2}; + +static const char * kb_map_num[] = {"1", + "2", + "3", + "\202" LV_SYMBOL_CLOSE, + "\n", + "4", + "5", + "6", + "\202" LV_SYMBOL_OK, + "\n", + "7", + "8", + "9", + "\202Bksp", + "\n", + "+/-", + "0", + ".", + LV_SYMBOL_LEFT, + LV_SYMBOL_RIGHT, + ""}; + +static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1}; /********************** * MACROS **********************/ @@ -118,8 +239,8 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ - ext->ta = NULL; - ext->mode = LV_KB_MODE_TEXT; + ext->ta = NULL; + ext->mode = LV_KB_MODE_TEXT; ext->cursor_mng = 0; /*The signal and design functions are not copied so set them here*/ @@ -149,19 +270,17 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing keyboard*/ else { lv_kb_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->ta = NULL; - ext->ta = copy_ext->ta; - ext->mode = copy_ext->mode; - ext->cursor_mng = copy_ext->cursor_mng; + ext->ta = NULL; + ext->ta = copy_ext->ta; + ext->mode = copy_ext->mode; + ext->cursor_mng = copy_ext->cursor_mng; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_kb); } - LV_LOG_INFO("keyboard created"); - return new_kb; } @@ -182,7 +301,7 @@ void lv_kb_set_ta(lv_obj_t * kb, lv_obj_t * ta) /*Hide the cursor of the old Text area if cursor management is enabled*/ if(ext->ta && ext->cursor_mng) { cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); + lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); } ext->ta = ta; @@ -190,7 +309,7 @@ void lv_kb_set_ta(lv_obj_t * kb, lv_obj_t * ta) /*Show the cursor of the new Text area if cursor management is enabled*/ if(ext->ta && ext->cursor_mng) { cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); + lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); } } @@ -208,14 +327,12 @@ void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode) if(mode == LV_KB_MODE_TEXT) { lv_btnm_set_map(kb, kb_map_lc); lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); - } - else if(mode == LV_KB_MODE_NUM) { + } else if(mode == LV_KB_MODE_NUM) { lv_btnm_set_map(kb, kb_map_num); lv_btnm_set_ctrl_map(kb, kb_ctrl_num_map); } } - /** * Automatically hide or show the cursor of Text Area * @param kb pointer to a Keyboard object @@ -233,9 +350,9 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en) cur_type = lv_ta_get_cursor_type(ext->ta); if(ext->cursor_mng) { - lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); + lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); } else { - lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); + lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); } } } @@ -249,24 +366,14 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en) void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, lv_style_t * style) { switch(type) { - case LV_KB_STYLE_BG: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BG, style); - break; - case LV_KB_STYLE_BTN_REL: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_REL, style); - break; - case LV_KB_STYLE_BTN_PR: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_PR, style); - break; + case LV_KB_STYLE_BG: lv_btnm_set_style(kb, LV_BTNM_STYLE_BG, style); break; + case LV_KB_STYLE_BTN_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_REL, style); break; + case LV_KB_STYLE_BTN_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_PR, style); break; case LV_KB_STYLE_BTN_TGL_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_REL, style); break; - case LV_KB_STYLE_BTN_TGL_PR: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_PR, style); - break; - case LV_KB_STYLE_BTN_INA: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_INA, style); - break; + case LV_KB_STYLE_BTN_TGL_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_PR, style); break; + case LV_KB_STYLE_BTN_INA: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_INA, style); break; } } @@ -296,7 +403,6 @@ lv_kb_mode_t lv_kb_get_mode(const lv_obj_t * kb) return ext->mode; } - /** * Get the current cursor manage mode. * @param kb pointer to a Keyboard object @@ -319,27 +425,15 @@ lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) lv_style_t * style = NULL; switch(type) { - case LV_KB_STYLE_BG: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BG); - break; - case LV_KB_STYLE_BTN_REL: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_REL); - break; - case LV_KB_STYLE_BTN_PR: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_PR); - break; + case LV_KB_STYLE_BG: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BG); break; + case LV_KB_STYLE_BTN_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_REL); break; + case LV_KB_STYLE_BTN_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_PR); break; case LV_KB_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_REL); break; - case LV_KB_STYLE_BTN_TGL_PR: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_PR); - break; - case LV_KB_STYLE_BTN_INA: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_INA); - break; - default: - style = NULL; - break; + case LV_KB_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_PR); break; + case LV_KB_STYLE_BTN_INA: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_INA); break; + default: style = NULL; break; } return style; @@ -351,7 +445,8 @@ lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) /** * Default keyboard event to add characters to the Text area and change the map. - * If a custom `event_cb` is added to the keyboard this function be called from it to handle the button clicks + * If a custom `event_cb` is added to the keyboard this function be called from it to handle the + * button clicks * @param kb pointer to a keyboard * @param event the triggering event */ @@ -360,10 +455,12 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) if(event != LV_EVENT_PRESSED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - uint16_t btn_id = lv_btnm_get_active_btn(kb); + uint16_t btn_id = lv_btnm_get_active_btn(kb); if(btn_id == LV_BTNM_BTN_NONE) return; if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return; - if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && event == LV_EVENT_LONG_PRESSED_REPEAT) return; + if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && + event == LV_EVENT_LONG_PRESSED_REPEAT) + return; const char * txt = lv_btnm_get_active_btn_text(kb); if(txt == NULL) return; @@ -384,27 +481,32 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) { lv_event_send(kb, LV_EVENT_CANCEL, NULL); - } - else { - lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ + } else { + lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb) lv_event_send(kb, LV_EVENT_APPLY, NULL); - else lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ + if(kb->event_cb) + lv_event_send(kb, LV_EVENT_APPLY, NULL); + else + lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ return; } /*Add the characters to the text area if set*/ if(ext->ta == NULL) return; - if(strcmp(txt, "Enter") == 0)lv_ta_add_char(ext->ta, '\n'); - else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) lv_ta_cursor_left(ext->ta); - else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) lv_ta_cursor_right(ext->ta); - else if(strcmp(txt, "Bksp") == 0) lv_ta_del_char(ext->ta); + if(strcmp(txt, "Enter") == 0) + lv_ta_add_char(ext->ta, '\n'); + else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) + lv_ta_cursor_left(ext->ta); + else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) + lv_ta_cursor_right(ext->ta); + else if(strcmp(txt, "Bksp") == 0) + lv_ta_del_char(ext->ta); else if(strcmp(txt, "+/-") == 0) { - uint16_t cur = lv_ta_get_cursor_pos(ext->ta); + uint16_t cur = lv_ta_get_cursor_pos(ext->ta); const char * ta_txt = lv_ta_get_text(ext->ta); if(ta_txt[0] == '-') { lv_ta_set_cursor_pos(ext->ta, 1); @@ -447,27 +549,24 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } - else if(sign == LV_SIGNAL_FOCUS) { + } else if(sign == LV_SIGNAL_FOCUS) { lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); /*Show the cursor of the new Text area if cursor management is enabled*/ if(ext->ta && ext->cursor_mng) { lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); + lv_ta_set_cursor_type(ext->ta, cur_type & (~LV_CURSOR_HIDDEN)); } - } - else if(sign == LV_SIGNAL_DEFOCUS) { - lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); - /*Show the cursor of the new Text area if cursor management is enabled*/ - if(ext->ta && ext->cursor_mng) { - lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); - lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); - } - } - else if(sign == LV_SIGNAL_GET_TYPE) { + } else if(sign == LV_SIGNAL_DEFOCUS) { + lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); + /*Show the cursor of the new Text area if cursor management is enabled*/ + if(ext->ta && ext->cursor_mng) { + lv_cursor_type_t cur_type = lv_ta_get_cursor_type(ext->ta); + lv_ta_set_cursor_type(ext->ta, cur_type | LV_CURSOR_HIDDEN); + } + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_kb"; diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 1d4c93f7971f..9bf94e65d165 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -48,12 +48,14 @@ enum { typedef uint8_t lv_kb_mode_t; /*Data of keyboard*/ -typedef struct { - lv_btnm_ext_t btnm; /*Ext. of ancestor*/ +typedef struct +{ + lv_btnm_ext_t btnm; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t *ta; /*Pointer to the assigned text area*/ - lv_kb_mode_t mode; /*Key map type*/ - uint8_t cursor_mng :1; /*1: automatically show/hide cursor when a text area is assigned or left*/ + lv_obj_t * ta; /*Pointer to the assigned text area*/ + lv_kb_mode_t mode; /*Key map type*/ + uint8_t + cursor_mng : 1; /*1: automatically show/hide cursor when a text area is assigned or left*/ } lv_kb_ext_t; enum { @@ -66,7 +68,6 @@ enum { }; typedef uint8_t lv_kb_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -110,7 +111,7 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); * @param map pointer to a string array to describe the map. * See 'lv_btnm_set_map()' for more info. */ -static inline void lv_kb_set_map(lv_obj_t *kb, const char * map[]) +static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[]) { lv_btnm_set_map(kb, map); } @@ -123,7 +124,7 @@ static inline void lv_kb_set_map(lv_obj_t *kb, const char * map[]) * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. * See: `lv_btnm_set_ctrl_map` for more details. */ -static inline void lv_kb_set_ctrl_map(lv_obj_t *kb, const lv_btnm_ctrl_t * ctrl_map) +static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t * ctrl_map) { lv_btnm_set_ctrl_map(kb, ctrl_map); } @@ -134,7 +135,7 @@ static inline void lv_kb_set_ctrl_map(lv_obj_t *kb, const lv_btnm_ctrl_t * ctrl_ * @param type which style should be set * @param style pointer to a style */ -void lv_kb_set_style(lv_obj_t *kb, lv_kb_style_t type, lv_style_t *style); +void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -167,7 +168,7 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_kb_get_style(const lv_obj_t *kb, lv_kb_style_t type); +lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type); /*===================== * Other functions @@ -175,7 +176,8 @@ lv_style_t * lv_kb_get_style(const lv_obj_t *kb, lv_kb_style_t type); /** * Default keyboard event to add characters to the Text area and change the map. - * If a custom `event_cb` is added to the keyboard this function be called from it to handle the button clicks + * If a custom `event_cb` is added to the keyboard this function be called from it to handle the + * button clicks * @param kb pointer to a keyboard * @param event the triggering event */ @@ -185,10 +187,10 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event); * MACROS **********************/ -#endif /*LV_USE_KB*/ +#endif /*LV_USE_KB*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_KB_H*/ +#endif /*LV_KB_H*/ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index fb5b274e56bc..61f4b12f298b 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -20,7 +20,8 @@ *********************/ /*Test configurations*/ #ifndef LV_LABEL_SCROLL_SPEED -#define LV_LABEL_DEF_SCROLL_SPEED (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ +#define LV_LABEL_DEF_SCROLL_SPEED \ + (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ #endif #define ANIM_WAIT_CHAR_COUNT 3 @@ -80,18 +81,18 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->text = NULL; - ext->static_txt = 0; - ext->recolor = 0; - ext->body_draw = 0; - ext->align = LV_LABEL_ALIGN_LEFT; - ext->dot_end = LV_LABEL_DOT_END_INV; - ext->long_mode = LV_LABEL_LONG_EXPAND; - ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; - ext->offset.x = 0; - ext->offset.y = 0; + ext->text = NULL; + ext->static_txt = 0; + ext->recolor = 0; + ext->body_draw = 0; + ext->align = LV_LABEL_ALIGN_LEFT; + ext->dot_end = LV_LABEL_DOT_END_INV; + ext->long_mode = LV_LABEL_LONG_EXPAND; + ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; + ext->offset.x = 0; + ext->offset.y = 0; ext->selection_start = -1; - ext->selection_end = -1; + ext->selection_end = -1; lv_obj_set_design_cb(new_label, lv_label_design); lv_obj_set_signal_cb(new_label, lv_label_signal); @@ -101,7 +102,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_click(new_label, false); lv_label_set_long_mode(new_label, LV_LABEL_LONG_EXPAND); lv_label_set_text(new_label, "Text"); - lv_label_set_style(new_label, NULL); /*Inherit parent's style*/ + lv_label_set_style(new_label, NULL); /*Inherit parent's style*/ } /*Copy 'copy' if not NULL*/ else { @@ -110,8 +111,10 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_label_set_recolor(new_label, lv_label_get_recolor(copy)); lv_label_set_body_draw(new_label, lv_label_get_body_draw(copy)); lv_label_set_align(new_label, lv_label_get_align(copy)); - if(copy_ext->static_txt == 0) lv_label_set_text(new_label, lv_label_get_text(copy)); - else lv_label_set_static_text(new_label, lv_label_get_text(copy)); + if(copy_ext->static_txt == 0) + lv_label_set_text(new_label, lv_label_get_text(copy)); + else + lv_label_set_static_text(new_label, lv_label_get_text(copy)); /*In DOT mode save the text byte-to-byte because a '\0' can be in the middle*/ if(copy_ext->long_mode == LV_LABEL_LONG_DOT) { @@ -128,7 +131,6 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_label); } - LV_LOG_INFO("label created"); return new_label; @@ -173,7 +175,7 @@ void lv_label_set_text(lv_obj_t * label, const char * text) if(ext->text == NULL) return; strcpy(ext->text, text); - ext->static_txt = 0; /*Now the text is dynamically allocated*/ + ext->static_txt = 0; /*Now the text is dynamically allocated*/ } lv_label_refr_text(label); @@ -209,7 +211,7 @@ void lv_label_set_array_text(lv_obj_t * label, const char * array, uint16_t size memcpy(ext->text, array, size); ext->text[size] = '\0'; - ext->static_txt = 0; /*Now the text is dynamically allocated*/ + ext->static_txt = 0; /*Now the text is dynamically allocated*/ lv_label_refr_text(label); } @@ -230,7 +232,7 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text) if(text != NULL) { ext->static_txt = 1; - ext->text = (char *) text; + ext->text = (char *)text; } lv_label_refr_text(label); @@ -240,7 +242,8 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text) * Set the behavior of the label with longer text then the object size * @param label pointer to a label object * @param long_mode the new mode from 'lv_label_long_mode' enum. - * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this function + * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this + * function */ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) { @@ -248,16 +251,19 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) #if LV_USE_ANIMATION /*Delete the old animation (if exists)*/ - lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_x); - lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_y); - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_x); - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_fp_t)lv_obj_set_x); + lv_anim_del(label, (lv_anim_fp_t)lv_obj_set_y); + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); #endif ext->offset.x = 0; ext->offset.y = 0; - if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_ROLL_CIRC || long_mode == LV_LABEL_LONG_CROP) ext->expand = 1; - else ext->expand = 0; + if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_ROLL_CIRC || + long_mode == LV_LABEL_LONG_CROP) + ext->expand = 1; + else + ext->expand = 0; /*Restore the character under the dots*/ if(ext->long_mode == LV_LABEL_LONG_DOT && ext->dot_end != LV_LABEL_DOT_END_INV) { @@ -280,7 +286,8 @@ void lv_label_set_align(lv_obj_t * label, lv_label_align_t align) ext->align = align; - lv_obj_invalidate(label); /*Enough to invalidate because alignment is only drawing related (lv_refr_label_text() not required)*/ + lv_obj_invalidate(label); /*Enough to invalidate because alignment is only drawing related + (lv_refr_label_text() not required)*/ } /** @@ -295,7 +302,8 @@ void lv_label_set_recolor(lv_obj_t * label, bool en) ext->recolor = en == false ? 0 : 1; - lv_label_refr_text(label); /*Refresh the text because the potential colo codes in text needs to be hided or revealed*/ + lv_label_refr_text(label); /*Refresh the text because the potential colo codes in text needs to + be hided or revealed*/ } /** @@ -406,21 +414,22 @@ uint16_t lv_label_get_anim_speed(const lv_obj_t * label) /** * Get the relative x and y coordinates of a letter * @param label pointer to a label object - * @param index index of the letter [0 ... text length]. Expressed in character index, not byte index (different in UTF-8) + * @param index index of the letter [0 ... text length]. Expressed in character index, not byte + * index (different in UTF-8) * @param pos store the result here (E.g. index = 0 gives 0;0 coordinates) */ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + lv_coord_t max_w = lv_obj_get_width(label); + lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; @@ -435,8 +444,10 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t /*Search the line of the index letter */; while(txt[new_line_start] != '\0') { - new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); - if(index < new_line_start || txt[new_line_start] == '\0') break; /*The line of 'index' letter begins at 'line_start'*/ + new_line_start += + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + if(index < new_line_start || txt[new_line_start] == '\0') + break; /*The line of 'index' letter begins at 'line_start'*/ y += letter_height + style->text.line_space; line_start = new_line_start; @@ -451,21 +462,21 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t } /*Calculate the x coordinate*/ - lv_coord_t x = lv_txt_get_width(&txt[line_start], index - line_start, - font, style->text.letter_space, flag); + lv_coord_t x = lv_txt_get_width(&txt[line_start], index - line_start, font, + style->text.letter_space, flag); if(index != line_start) x += style->text.letter_space; if(ext->align == LV_LABEL_ALIGN_CENTER) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, - font, style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, + style->text.letter_space, flag); x += lv_obj_get_width(label) / 2 - line_w / 2; } else if(ext->align == LV_LABEL_ALIGN_RIGHT) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, - font, style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, + style->text.letter_space, flag); x += lv_obj_get_width(label) - line_w; } @@ -482,16 +493,16 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t */ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + lv_coord_t max_w = lv_obj_get_width(label); + lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; @@ -504,7 +515,8 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) /*Search the line of the index letter */; while(txt[line_start] != '\0') { - new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + new_line_start += + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ y += letter_height + style->text.line_space; @@ -516,17 +528,18 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) lv_coord_t x = 0; if(ext->align == LV_LABEL_ALIGN_CENTER) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, - font, style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, + style->text.letter_space, flag); x += lv_obj_get_width(label) / 2 - line_w / 2; } lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t i = line_start; - uint32_t i_current = i; + uint32_t i = line_start; + uint32_t i_current = i; uint32_t letter; while(i <= new_line_start - 1) { - letter = lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ + letter = + lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { @@ -552,73 +565,75 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) * @param pos Point to check for characte under * @return whether a character is drawn under the point */ -bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; - uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; - - if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; - if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; - if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; - - /*If the width will be expanded set the max length to very big */ - if(ext->long_mode == LV_LABEL_LONG_EXPAND) { - max_w = LV_COORD_MAX; - } - - /*Search the line of the index letter */; - while(txt[line_start] != '\0') { - new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); - - if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ - y += letter_height + style->text.line_space; - - line_start = new_line_start; - } - - /*Calculate the x coordinate*/ - lv_coord_t x = 0; - lv_coord_t last_x = 0; - if(ext->align == LV_LABEL_ALIGN_CENTER) { - lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, - font, style->text.letter_space, flag); - x += lv_obj_get_width(label) / 2 - line_w / 2; - } - - lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t i = line_start; - uint32_t i_current = i; - uint32_t letter = 0; - while(i <= new_line_start - 1) { - letter = lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ - /*Handle the recolor command*/ - if((flag & LV_TXT_FLAG_RECOLOR) != 0) { - if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { - continue; /*Skip the letter is it is part of a command*/ - } - } - last_x = x; - x += lv_font_get_width(font, letter); - if(pos->x < x) { - i = i_current; - break; - } - x += style->text.letter_space; - i_current = i; - } - - int max_diff = lv_font_get_width(font, letter) + style->text.letter_space + 1; - return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff)); -} +bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) +{ + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; + uint32_t new_line_start = 0; + lv_coord_t max_w = lv_obj_get_width(label); + lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + + if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; + if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; + if(ext->align == LV_LABEL_ALIGN_CENTER) flag |= LV_TXT_FLAG_CENTER; + + /*If the width will be expanded set the max length to very big */ + if(ext->long_mode == LV_LABEL_LONG_EXPAND) { + max_w = LV_COORD_MAX; + } + + /*Search the line of the index letter */; + while(txt[line_start] != '\0') { + new_line_start += + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + + if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ + y += letter_height + style->text.line_space; + + line_start = new_line_start; + } + + /*Calculate the x coordinate*/ + lv_coord_t x = 0; + lv_coord_t last_x = 0; + if(ext->align == LV_LABEL_ALIGN_CENTER) { + lv_coord_t line_w; + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, + style->text.letter_space, flag); + x += lv_obj_get_width(label) / 2 - line_w / 2; + } + + lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t i = line_start; + uint32_t i_current = i; + uint32_t letter = 0; + while(i <= new_line_start - 1) { + letter = + lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ + /*Handle the recolor command*/ + if((flag & LV_TXT_FLAG_RECOLOR) != 0) { + if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { + continue; /*Skip the letter is it is part of a command*/ + } + } + last_x = x; + x += lv_font_get_width(font, letter); + if(pos->x < x) { + i = i_current; + break; + } + x += style->text.letter_space; + i_current = i; + } + int max_diff = lv_font_get_width(font, letter) + style->text.letter_space + 1; + return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff)); +} /*===================== * Other functions @@ -627,12 +642,11 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { /** * Insert a text to the label. The label text can not be static. * @param label pointer to a label object - * @param pos character index to insert. Expressed in character index and not byte index (Different in UTF-8) - * 0: before first char. - * LV_LABEL_POS_LAST: after last char. + * @param pos character index to insert. Expressed in character index and not byte index (Different + * in UTF-8) 0: before first char. LV_LABEL_POS_LAST: after last char. * @param txt pointer to the text to insert */ -void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) +void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); @@ -645,7 +659,7 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) uint32_t old_len = strlen(ext->text); uint32_t ins_len = strlen(txt); uint32_t new_len = ins_len + old_len; - ext->text = lv_mem_realloc(ext->text, new_len + 1); + ext->text = lv_mem_realloc(ext->text, new_len + 1); lv_mem_assert(ext->text); if(ext->text == NULL) return; @@ -661,11 +675,11 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) /** * Delete characters from a label. The label text can not be static. * @param label pointer to a label object - * @param pos character index to insert. Expressed in character index and not byte index (Different in UTF-8) - * 0: before first char. + * @param pos character index to insert. Expressed in character index and not byte index (Different + * in UTF-8) 0: before first char. * @param cnt number of characters to cut */ -void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt) +void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); @@ -699,7 +713,8 @@ void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt) static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_mode_t mode) { /* A label never covers an area */ - if(mode == LV_DESIGN_COVER_CHK) return false; + if(mode == LV_DESIGN_COVER_CHK) + return false; else if(mode == LV_DESIGN_DRAW_MAIN) { lv_area_t coords; lv_style_t * style = lv_obj_get_style(label); @@ -727,7 +742,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } /*TEST: draw a background for the label*/ - //lv_draw_rect(&label->coords, mask, &lv_style_plain_color, LV_OPA_COVER); + // lv_draw_rect(&label->coords, mask, &lv_style_plain_color, LV_OPA_COVER); lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; @@ -738,42 +753,46 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ /* In ROLL mode the CENTER and RIGHT are pointless so remove them. * (In addition they will result mis-alignment is this case)*/ if((ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) && - (ext->align == LV_LABEL_ALIGN_CENTER || ext->align == LV_LABEL_ALIGN_RIGHT)) { + (ext->align == LV_LABEL_ALIGN_CENTER || ext->align == LV_LABEL_ALIGN_RIGHT)) { lv_point_t size; - lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag); + lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, flag); if(size.x > lv_obj_get_width(label)) { flag &= ~LV_TXT_FLAG_RIGHT; flag &= ~LV_TXT_FLAG_CENTER; } } - lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, ext->selection_start, ext->selection_end); + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, + ext->selection_start, ext->selection_end); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; - lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag); + lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, + style->text.line_space, LV_COORD_MAX, flag); lv_point_t ofs; /*Draw the text again next to the original to make an circular effect */ if(size.x > lv_obj_get_width(label)) { - ofs.x = ext->offset.x + size.x + lv_font_get_width(style->text.font, ' ') * ANIM_WAIT_CHAR_COUNT; + ofs.x = ext->offset.x + size.x + + lv_font_get_width(style->text.font, ' ') * ANIM_WAIT_CHAR_COUNT; ofs.y = ext->offset.y; - lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, ext->selection_start, ext->selection_end); + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, + ext->selection_start, ext->selection_end); } /*Draw the text again below the original to make an circular effect */ if(size.y > lv_obj_get_height(label)) { ofs.x = ext->offset.x; ofs.y = ext->offset.y + size.y + lv_font_get_height(style->text.font); - lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, ext->selection_start, ext->selection_end); + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, + ext->selection_start, ext->selection_end); } } } return true; } - - /** * Signal function of the label * @param label pointer to a label object @@ -790,7 +809,7 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param if(res != LV_RES_OK) return res; lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if(sign == LV_SIGNAL_CLEANUP) { + if(sign == LV_SIGNAL_CLEANUP) { if(ext->static_txt == 0) { lv_mem_free(ext->text); ext->text = NULL; @@ -802,22 +821,22 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param lv_label_refr_text(label); } else if(sign == LV_SIGNAL_CORD_CHG) { if(lv_area_get_width(&label->coords) != lv_area_get_width(param) || - lv_area_get_height(&label->coords) != lv_area_get_height(param)) { + lv_area_get_height(&label->coords) != lv_area_get_height(param)) { lv_label_revert_dots(label); lv_label_refr_text(label); } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { if(ext->body_draw) { lv_style_t * style = lv_label_get_style(label); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_label"; @@ -836,8 +855,8 @@ static void lv_label_refr_text(lv_obj_t * label) if(ext->text == NULL) return; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); + lv_coord_t max_w = lv_obj_get_width(label); + lv_style_t * style = lv_obj_get_style(label); const lv_font_t * font = style->text.font; /*If the width will be expanded set the max length to very big */ @@ -850,7 +869,8 @@ static void lv_label_refr_text(lv_obj_t * label) lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; - lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, flag); + lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, + flag); /*Set the full size in expand mode*/ if(ext->long_mode == LV_LABEL_LONG_EXPAND) { @@ -860,105 +880,112 @@ static void lv_label_refr_text(lv_obj_t * label) else if(ext->long_mode == LV_LABEL_LONG_ROLL) { #if LV_USE_ANIMATION lv_anim_t anim; - anim.var = label; - anim.repeat = 1; + anim.var = label; + anim.repeat = 1; anim.playback = 1; - anim.start = 0; + anim.start = 0; anim.act_time = 0; - anim.end_cb = NULL; - anim.path = lv_anim_path_linear; - anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * ANIM_WAIT_CHAR_COUNT;; - anim.repeat_pause = anim.playback_pause; + anim.end_cb = NULL; + anim.path = lv_anim_path_linear; + anim.playback_pause = + (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / + ext->anim_speed) * + ANIM_WAIT_CHAR_COUNT; + ; + anim.repeat_pause = anim.playback_pause; bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = lv_obj_get_width(label) - size.x; - anim.fp = (lv_anim_fp_t) lv_label_set_offset_x; + anim.end = lv_obj_get_width(label) - size.x; + anim.fp = (lv_anim_fp_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); ext->offset.x = 0; } if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_height(font)); - anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; + anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_height(font)); + anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); ext->offset.y = 0; } #endif } /*In roll inf. mode keep the size but start offset animations*/ else if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { - #if LV_USE_ANIMATION - lv_anim_t anim; - anim.var = label; - anim.repeat = 1; - anim.playback = 0; - anim.start = 0; - anim.act_time = 0; - anim.end_cb = NULL; - anim.path = lv_anim_path_linear; - anim.playback_pause = 0; - anim.repeat_pause = 0; - - bool hor_anim = false; - if(size.x > lv_obj_get_width(label)) { - anim.end = - size.x - lv_font_get_width(font, ' ') * ANIM_WAIT_CHAR_COUNT; - anim.fp = (lv_anim_fp_t) lv_label_set_offset_x; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); - lv_anim_create(&anim); - hor_anim = true; - } else { - /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_x); - ext->offset.x = 0; - } +#if LV_USE_ANIMATION + lv_anim_t anim; + anim.var = label; + anim.repeat = 1; + anim.playback = 0; + anim.start = 0; + anim.act_time = 0; + anim.end_cb = NULL; + anim.path = lv_anim_path_linear; + anim.playback_pause = 0; + anim.repeat_pause = 0; - if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = - size.y - (lv_font_get_height(font)); - anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); - lv_anim_create(&anim); - } else { - /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t) lv_label_set_offset_y); - ext->offset.y = 0; - } - #endif + bool hor_anim = false; + if(size.x > lv_obj_get_width(label)) { + anim.end = -size.x - lv_font_get_width(font, ' ') * ANIM_WAIT_CHAR_COUNT; + anim.fp = (lv_anim_fp_t)lv_label_set_offset_x; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + lv_anim_create(&anim); + hor_anim = true; + } else { + /*Delete the offset animation if not required*/ + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); + ext->offset.x = 0; + } + + if(size.y > lv_obj_get_height(label) && hor_anim == false) { + anim.end = -size.y - (lv_font_get_height(font)); + anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + lv_anim_create(&anim); + } else { + /*Delete the offset animation if not required*/ + lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); + ext->offset.y = 0; + } +#endif } else if(ext->long_mode == LV_LABEL_LONG_DOT) { - if(size.y <= lv_obj_get_height(label)) { /*No dots are required, the text is short enough*/ + if(size.y <= lv_obj_get_height(label)) { /*No dots are required, the text is short enough*/ ext->dot_end = LV_LABEL_DOT_END_INV; - } else if(lv_txt_get_encoded_length(ext->text) <= LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/ + } else if(lv_txt_get_encoded_length(ext->text) <= + LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/ ext->dot_end = LV_LABEL_DOT_END_INV; } else { lv_point_t p; - p.x = lv_obj_get_width(label) - (lv_font_get_width(style->text.font, '.') + style->text.letter_space) * LV_LABEL_DOT_NUM; /*Shrink with dots*/ + p.x = lv_obj_get_width(label) - + (lv_font_get_width(style->text.font, '.') + style->text.letter_space) * + LV_LABEL_DOT_NUM; /*Shrink with dots*/ p.y = lv_obj_get_height(label); - p.y -= p.y % (lv_font_get_height(style->text.font) + style->text.line_space); /*Round down to the last line*/ - p.y -= style->text.line_space; /*Trim the last line space*/ + p.y -= p.y % (lv_font_get_height(style->text.font) + + style->text.line_space); /*Round down to the last line*/ + p.y -= style->text.line_space; /*Trim the last line space*/ uint32_t letter_id = lv_label_get_letter_on(label, &p); - /*Save letters under the dots and replace them with dots*/ uint32_t i; - uint32_t byte_id = lv_txt_encoded_get_byte_id(ext->text, letter_id); + uint32_t byte_id = lv_txt_encoded_get_byte_id(ext->text, letter_id); uint32_t byte_id_ori = byte_id; - uint8_t len = 0; - for(i = 0; i <= LV_LABEL_DOT_NUM; i++) { + uint8_t len = 0; + for(i = 0; i <= LV_LABEL_DOT_NUM; i++) { len += lv_txt_encoded_size(&ext->text[byte_id]); lv_txt_encoded_next(ext->text, &byte_id); } memcpy(ext->dot_tmp, &ext->text[byte_id_ori], len); - ext->dot_tmp[len] = '\0'; /*Close with a zero*/ + ext->dot_tmp[len] = '\0'; /*Close with a zero*/ for(i = 0; i < LV_LABEL_DOT_NUM; i++) { ext->text[byte_id_ori + i] = '.'; @@ -977,7 +1004,6 @@ static void lv_label_refr_text(lv_obj_t * label) /*Do nothing*/ } - lv_obj_invalidate(label); } @@ -987,7 +1013,7 @@ static void lv_label_revert_dots(lv_obj_t * label) if(ext->long_mode != LV_LABEL_LONG_DOT) return; if(ext->dot_end == LV_LABEL_DOT_END_INV) return; uint32_t letter_i = ext->dot_end - LV_LABEL_DOT_NUM; - uint32_t byte_i = lv_txt_encoded_get_byte_id(ext->text, letter_i); + uint32_t byte_i = lv_txt_encoded_get_byte_id(ext->text, letter_i); /*Restore the characters*/ uint8_t i = 0; @@ -1003,14 +1029,14 @@ static void lv_label_revert_dots(lv_obj_t * label) static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - ext->offset.x = x; + ext->offset.x = x; lv_obj_invalidate(label); } static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y) { lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - ext->offset.y = y; + ext->offset.y = y; lv_obj_invalidate(label); } #endif diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 63a4c78d6d3d..ad95f2ca2502 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -29,22 +29,22 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_LABEL_DOT_NUM 3 -#define LV_LABEL_POS_LAST 0xFFFF +#define LV_LABEL_DOT_NUM 3 +#define LV_LABEL_POS_LAST 0xFFFF /********************** * TYPEDEFS **********************/ /*Long mode behaviors. Used in 'lv_label_ext_t' */ -enum -{ - LV_LABEL_LONG_EXPAND, /*Expand the object size to the text size*/ - LV_LABEL_LONG_BREAK, /*Keep the object width, break the too long lines and expand the object height*/ - LV_LABEL_LONG_DOT, /*Keep the size and write dots at the end if the text is too long*/ - LV_LABEL_LONG_ROLL, /*Keep the size and roll the text back and forth*/ - LV_LABEL_LONG_ROLL_CIRC,/*Keep the size and roll the text circularly*/ - LV_LABEL_LONG_CROP, /*Keep the size and crop the text out of it*/ +enum { + LV_LABEL_LONG_EXPAND, /*Expand the object size to the text size*/ + LV_LABEL_LONG_BREAK, /*Keep the object width, break the too long lines and expand the object + height*/ + LV_LABEL_LONG_DOT, /*Keep the size and write dots at the end if the text is too long*/ + LV_LABEL_LONG_ROLL, /*Keep the size and roll the text back and forth*/ + LV_LABEL_LONG_ROLL_CIRC, /*Keep the size and roll the text circularly*/ + LV_LABEL_LONG_CROP, /*Keep the size and crop the text out of it*/ }; typedef uint8_t lv_label_long_mode_t; @@ -59,29 +59,29 @@ typedef uint8_t lv_label_align_t; /*Data of label*/ typedef struct { - /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ + /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ - char * text; /*Text of the label*/ - lv_label_long_mode_t long_mode; /*Determinate what to do with the long texts*/ - char dot_tmp[LV_LABEL_DOT_NUM * 4 + 1]; /*Store the character which are replaced by dots (Handled by the library)*/ - - uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ - uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ - lv_point_t offset; /*Text draw position offset*/ - uint8_t static_txt :1; /*Flag to indicate the text is static*/ - uint8_t align :2; /*Align type from 'lv_label_align_t'*/ - uint8_t recolor :1; /*Enable in-line letter re-coloring*/ - uint8_t expand :1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ - uint8_t body_draw :1; /*Draw background body*/ - int selection_start; /*Left-most selection character*/ - int selection_end; /*Right-most selection character*/ + char * text; /*Text of the label*/ + lv_label_long_mode_t long_mode; /*Determinate what to do with the long texts*/ + char dot_tmp[LV_LABEL_DOT_NUM * 4 + + 1]; /*Store the character which are replaced by dots (Handled by the library)*/ + + uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ + uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ + lv_point_t offset; /*Text draw position offset*/ + uint8_t static_txt : 1; /*Flag to indicate the text is static*/ + uint8_t align : 2; /*Align type from 'lv_label_align_t'*/ + uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ + uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ + uint8_t body_draw : 1; /*Draw background body*/ + int selection_start; /*Left-most selection character*/ + int selection_end; /*Right-most selection character*/ } lv_label_ext_t; /********************** * GLOBAL PROTOTYPES **********************/ - /** * Create a label objects * @param par pointer to an object, it will be the parent of the new label @@ -122,7 +122,8 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text); * Set the behavior of the label with longer text then the object size * @param label pointer to a label object * @param long_mode the new mode from 'lv_label_long_mode' enum. - * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this function + * In LV_LONG_BREAK/LONG/ROLL the size of the label should be set AFTER this + * function */ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode); @@ -131,7 +132,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode); * @param label pointer to a label object * @param align 'LV_LABEL_ALIGN_LEFT' or 'LV_LABEL_ALIGN_LEFT' */ -void lv_label_set_align(lv_obj_t *label, lv_label_align_t align); +void lv_label_set_align(lv_obj_t * label, lv_label_align_t align); /** * Enable the recoloring by in-line commands @@ -145,21 +146,21 @@ void lv_label_set_recolor(lv_obj_t * label, bool en); * @param label pointer to a label object * @param en true: draw body; false: don't draw body */ -void lv_label_set_body_draw(lv_obj_t *label, bool en); +void lv_label_set_body_draw(lv_obj_t * label, bool en); /** * Set the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes * @param label pointer to a label object * @param anim_speed speed of animation in px/sec unit */ -void lv_label_set_anim_speed(lv_obj_t *label, uint16_t anim_speed); +void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); /** * Set the style of an label * @param label pointer to an label object * @param style pointer to a style */ -static inline void lv_label_set_style(lv_obj_t *label, lv_style_t *style) +static inline void lv_label_set_style(lv_obj_t * label, lv_style_t * style) { lv_obj_set_style(label, style); } @@ -200,19 +201,20 @@ bool lv_label_get_recolor(const lv_obj_t * label); * @param label pointer to a label object * @return true: draw body; false: don't draw body */ -bool lv_label_get_body_draw(const lv_obj_t *label); +bool lv_label_get_body_draw(const lv_obj_t * label); /** * Get the label's animation speed in LV_LABEL_LONG_ROLL and SCROLL modes * @param label pointer to a label object * @return speed of animation in px/sec unit */ -uint16_t lv_label_get_anim_speed(const lv_obj_t *label); +uint16_t lv_label_get_anim_speed(const lv_obj_t * label); /** * Get the relative x and y coordinates of a letter * @param label pointer to a label object - * @param index index of the letter [0 ... text length]. Expressed in character index, not byte index (different in UTF-8) + * @param index index of the letter [0 ... text length]. Expressed in character index, not byte + * index (different in UTF-8) * @param pos store the result here (E.g. index = 0 gives 0;0 coordinates) */ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos); @@ -239,7 +241,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); * @param label pointer to an label object * @return pointer to the label's style */ -static inline lv_style_t* lv_label_get_style(const lv_obj_t *label) +static inline lv_style_t * lv_label_get_style(const lv_obj_t * label) { return lv_obj_get_style(label); } @@ -251,30 +253,29 @@ static inline lv_style_t* lv_label_get_style(const lv_obj_t *label) /** * Insert a text to the label. The label text can not be static. * @param label pointer to a label object - * @param pos character index to insert. Expressed in character index and not byte index (Different in UTF-8) - * 0: before first char. - * LV_LABEL_POS_LAST: after last char. + * @param pos character index to insert. Expressed in character index and not byte index (Different + * in UTF-8) 0: before first char. LV_LABEL_POS_LAST: after last char. * @param txt pointer to the text to insert */ -void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt); +void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt); /** * Delete characters from a label. The label text can not be static. * @param label pointer to a label object - * @param pos character index to insert. Expressed in character index and not byte index (Different in UTF-8) - * 0: before first char. + * @param pos character index to insert. Expressed in character index and not byte index (Different + * in UTF-8) 0: before first char. * @param cnt number of characters to cut */ -void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); +void lv_label_cut_text(lv_obj_t * label, uint32_t pos, uint32_t cnt); /********************** * MACROS **********************/ -#endif /*LV_USE_LABEL*/ +#endif /*LV_USE_LABEL*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_LABEL_H*/ +#endif /*LV_LABEL_H*/ diff --git a/src/lv_objx/lv_led.c b/src/lv_objx/lv_led.c index 9edefe0c6ba3..dd4fd4228397 100644 --- a/src/lv_objx/lv_led.c +++ b/src/lv_objx/lv_led.c @@ -15,10 +15,10 @@ /********************* * DEFINES *********************/ -#define LV_LED_WIDTH_DEF (LV_DPI / 3) -#define LV_LED_HEIGHT_DEF (LV_DPI / 3) -#define LV_LED_BRIGHT_OFF 100 -#define LV_LED_BRIGHT_ON 255 +#define LV_LED_WIDTH_DEF (LV_DPI / 3) +#define LV_LED_HEIGHT_DEF (LV_DPI / 3) +#define LV_LED_BRIGHT_OFF 100 +#define LV_LED_BRIGHT_ON 255 /********************** * TYPEDEFS @@ -87,13 +87,12 @@ lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing object*/ else { lv_led_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->bright = copy_ext->bright; + ext->bright = copy_ext->bright; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_led); } - LV_LOG_INFO("led created"); return new_led; @@ -138,7 +137,6 @@ void lv_led_off(lv_obj_t * led) lv_led_set_bright(led, LV_LED_BRIGHT_OFF); } - /** * Toggle the state of a LED * @param led pointer to a LED object @@ -146,8 +144,10 @@ void lv_led_off(lv_obj_t * led) void lv_led_toggle(lv_obj_t * led) { uint8_t bright = lv_led_get_bright(led); - if(bright > (LV_LED_BRIGHT_OFF + LV_LED_BRIGHT_ON) >> 1) lv_led_off(led); - else lv_led_on(led); + if(bright > (LV_LED_BRIGHT_OFF + LV_LED_BRIGHT_ON) >> 1) + lv_led_off(led); + else + lv_led_on(led); } /*===================== @@ -199,17 +199,22 @@ static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode memcpy(&leds_tmp, style, sizeof(leds_tmp)); /*Mix. the color with black proportionally with brightness*/ - leds_tmp.body.main_color = lv_color_mix(leds_tmp.body.main_color, LV_COLOR_BLACK, ext->bright); - leds_tmp.body.grad_color = lv_color_mix(leds_tmp.body.grad_color, LV_COLOR_BLACK, ext->bright); - leds_tmp.body.border.color = lv_color_mix(leds_tmp.body.border.color, LV_COLOR_BLACK, ext->bright); - - /*Set the current swidth according to brightness proportionally between LV_LED_BRIGHT_OFF and LV_LED_BRIGHT_ON*/ - uint16_t bright_tmp = ext->bright; - leds_tmp.body.shadow.width = ((bright_tmp - LV_LED_BRIGHT_OFF) * style->body.shadow.width) / (LV_LED_BRIGHT_ON - LV_LED_BRIGHT_OFF); + leds_tmp.body.main_color = + lv_color_mix(leds_tmp.body.main_color, LV_COLOR_BLACK, ext->bright); + leds_tmp.body.grad_color = + lv_color_mix(leds_tmp.body.grad_color, LV_COLOR_BLACK, ext->bright); + leds_tmp.body.border.color = + lv_color_mix(leds_tmp.body.border.color, LV_COLOR_BLACK, ext->bright); + + /*Set the current swidth according to brightness proportionally between LV_LED_BRIGHT_OFF + * and LV_LED_BRIGHT_ON*/ + uint16_t bright_tmp = ext->bright; + leds_tmp.body.shadow.width = ((bright_tmp - LV_LED_BRIGHT_OFF) * style->body.shadow.width) / + (LV_LED_BRIGHT_ON - LV_LED_BRIGHT_OFF); led->style_p = &leds_tmp; ancestor_design_f(led, mask, mode); - led->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/ + led->style_p = style_ori_p; /*Restore the ORIGINAL style pointer*/ } return true; } @@ -229,11 +234,10 @@ static lv_res_t lv_led_signal(lv_obj_t * led, lv_signal_t sign, void * param) res = ancestor_signal(led, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_led"; diff --git a/src/lv_objx/lv_led.h b/src/lv_objx/lv_led.h index 22e6614845b1..63f76917b5a7 100644 --- a/src/lv_objx/lv_led.h +++ b/src/lv_objx/lv_led.h @@ -36,7 +36,7 @@ typedef struct { /*No inherited ext.*/ /*New data for this type */ - uint8_t bright; /*Current brightness of the LED (0..255)*/ + uint8_t bright; /*Current brightness of the LED (0..255)*/ } lv_led_ext_t; /********************** @@ -81,7 +81,7 @@ void lv_led_toggle(lv_obj_t * led); * @param led pointer to a led object * @param style pointer to a style */ -static inline void lv_led_set_style(lv_obj_t *led, lv_style_t *style) +static inline void lv_led_set_style(lv_obj_t * led, lv_style_t * style) { lv_obj_set_style(led, style); } @@ -98,7 +98,7 @@ uint8_t lv_led_get_bright(const lv_obj_t * led); * @param led pointer to an led object * @return pointer to the led's style */ -static inline lv_style_t* lv_led_get_style(const lv_obj_t *led) +static inline lv_style_t * lv_led_get_style(const lv_obj_t * led) { return lv_obj_get_style(led); } @@ -107,10 +107,10 @@ static inline lv_style_t* lv_led_get_style(const lv_obj_t *led) * MACROS **********************/ -#endif /*LV_USE_LED*/ +#endif /*LV_USE_LED*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_LED_H*/ +#endif /*LV_LED_H*/ diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 702eda68b7f8..3a5e051dd0c4 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -15,7 +15,6 @@ #include #include - /********************* * DEFINES *********************/ @@ -64,18 +63,20 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->point_num = 0; + ext->point_num = 0; ext->point_array = NULL; - ext->auto_size = 1; - ext->y_inv = 0; + ext->auto_size = 1; + ext->y_inv = 0; lv_obj_set_design_cb(new_line, lv_line_design); lv_obj_set_signal_cb(new_line, lv_line_signal); /*Init the new line*/ if(copy == NULL) { - lv_obj_set_size(new_line, LV_DPI, LV_DPI); /*Auto size is enables, but set default size until no points are added*/ - lv_obj_set_style(new_line, NULL); /*Inherit parent's style*/ + lv_obj_set_size( + new_line, LV_DPI, + LV_DPI); /*Auto size is enables, but set default size until no points are added*/ + lv_obj_set_style(new_line, NULL); /*Inherit parent's style*/ lv_obj_set_click(new_line, false); } /*Copy an existing object*/ @@ -89,7 +90,6 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_line); } - LV_LOG_INFO("line created"); return new_line; @@ -109,8 +109,8 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) void lv_line_set_points(lv_obj_t * line, const lv_point_t * point_a, uint16_t point_num) { lv_line_ext_t * ext = lv_obj_get_ext_attr(line); - ext->point_array = point_a; - ext->point_num = point_num; + ext->point_array = point_a; + ext->point_num = point_num; if(point_num > 0 && ext->auto_size != 0) { uint16_t i; @@ -207,7 +207,8 @@ bool lv_line_get_y_invert(const lv_obj_t * line) static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mode_t mode) { /*A line never covers an area*/ - if(mode == LV_DESIGN_COVER_CHK) return false; + if(mode == LV_DESIGN_COVER_CHK) + return false; else if(mode == LV_DESIGN_DRAW_MAIN) { lv_line_ext_t * ext = lv_obj_get_ext_attr(line); @@ -224,12 +225,12 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo lv_coord_t h = lv_obj_get_height(line); uint16_t i; - lv_style_t circle_style; /*If rounded...*/ + lv_style_t circle_style; /*If rounded...*/ lv_style_copy(&circle_style, style); - circle_style.body.radius = LV_RADIUS_CIRCLE; + circle_style.body.radius = LV_RADIUS_CIRCLE; circle_style.body.main_color = style->line.color; circle_style.body.grad_color = style->line.color; - circle_style.body.opa = style->line.opa; + circle_style.body.opa = style->line.opa; lv_area_t circle_area; /*Read all points and draw the lines*/ @@ -242,15 +243,17 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo p1.y = ext->point_array[i].y + y_ofs; p2.y = ext->point_array[i + 1].y + y_ofs; } else { - p1.y = h - ext->point_array[i].y + y_ofs; + p1.y = h - ext->point_array[i].y + y_ofs; p2.y = h - ext->point_array[i + 1].y + y_ofs; } lv_draw_line(&p1, &p2, mask, style, opa_scale); /*Draw circle on the joints if enabled*/ if(style->line.rounded) { - circle_area.x1 = p1.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); - circle_area.y1 = p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.x1 = + p1.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.y1 = + p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p1.x + ((style->line.width - 1) >> 1); circle_area.y2 = p1.y + ((style->line.width - 1) >> 1); lv_draw_rect(&circle_area, mask, &circle_style, opa_scale); @@ -259,8 +262,10 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo /*Draw circle on the last point too if enabled*/ if(style->line.rounded) { - circle_area.x1 = p2.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); - circle_area.y1 = p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.x1 = + p2.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.y1 = + p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p2.x + ((style->line.width - 1) >> 1); circle_area.y2 = p2.y + ((style->line.width - 1) >> 1); lv_draw_rect(&circle_area, mask, &circle_style, opa_scale); @@ -283,11 +288,10 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param) res = ancestor_signal(line, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_line"; @@ -296,7 +300,6 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param) if(line->ext_size < style->line.width) line->ext_size = style->line.width; } - return res; } #endif diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index b1c9a43a8f9d..ea1ae8b02533 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -34,18 +34,17 @@ extern "C" { /*Data of line*/ typedef struct { - /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ - const lv_point_t * point_array; /*Pointer to an array with the points of the line*/ - uint16_t point_num; /*Number of points in 'point_array' */ - uint8_t auto_size :1; /*1: set obj. width to x max and obj. height to y max */ - uint8_t y_inv :1; /*1: y == 0 will be on the bottom*/ + /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ + const lv_point_t * point_array; /*Pointer to an array with the points of the line*/ + uint16_t point_num; /*Number of points in 'point_array' */ + uint8_t auto_size : 1; /*1: set obj. width to x max and obj. height to y max */ + uint8_t y_inv : 1; /*1: y == 0 will be on the bottom*/ } lv_line_ext_t; /********************** * GLOBAL PROTOTYPES **********************/ - /** * Create a line objects * @param par pointer to an object, it will be the parent of the new line @@ -83,14 +82,16 @@ void lv_line_set_auto_size(lv_obj_t * line, bool en); */ void lv_line_set_y_invert(lv_obj_t * line, bool en); -#define lv_line_set_y_inv lv_line_set_y_invert /*The name was inconsistent. In v.6.0 only `lv_line_set_y_invert`will work */ +#define lv_line_set_y_inv \ + lv_line_set_y_invert /*The name was inconsistent. In v.6.0 only `lv_line_set_y_invert`will \ + work */ /** * Set the style of a line * @param line pointer to a line object * @param style pointer to a style */ -static inline void lv_line_set_style(lv_obj_t *line, lv_style_t *style) +static inline void lv_line_set_style(lv_obj_t * line, lv_style_t * style) { lv_obj_set_style(line, style); } @@ -102,8 +103,8 @@ static inline void lv_line_set_style(lv_obj_t *line, lv_style_t *style) */ static inline void lv_line_set_upscale(lv_obj_t * line, bool upcale) { - (void) line; - (void) upcale; + (void)line; + (void)upcale; } /*===================== * Getter functions @@ -128,7 +129,7 @@ bool lv_line_get_y_invert(const lv_obj_t * line); * @param line pointer to an line object * @return pointer to the line's style */ -static inline lv_style_t* lv_line_get_style(const lv_obj_t *line) +static inline lv_style_t * lv_line_get_style(const lv_obj_t * line) { return lv_obj_get_style(line); } @@ -140,11 +141,10 @@ static inline lv_style_t* lv_line_get_style(const lv_obj_t *line) */ static inline bool lv_line_get_upscale(const lv_obj_t * line) { - (void) line; + (void)line; return false; } - /********************** * MACROS **********************/ @@ -155,4 +155,4 @@ static inline bool lv_line_get_upscale(const lv_obj_t * line) } /* extern "C" */ #endif -#endif /*LV_LINE_H*/ +#endif /*LV_LINE_H*/ diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index b459c2f3ce21..43ca7d8c3008 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -17,15 +17,16 @@ /********************* * DEFINES *********************/ -#define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M +#define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M #if LV_USE_ANIMATION -# ifndef LV_LIST_FOCUS_TIME -# define LV_LIST_DEF_ANIM_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ -# endif +#ifndef LV_LIST_FOCUS_TIME +#define LV_LIST_DEF_ANIM_TIME \ + 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +#endif #else -# undef LV_LIST_DEF_ANIM_TIME -# define LV_LIST_DEF_ANIM_TIME 0 /*No animations*/ +#undef LV_LIST_DEF_ANIM_TIME +#define LV_LIST_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -37,7 +38,7 @@ **********************/ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param); static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); -static void lv_list_btn_single_selected(lv_obj_t *btn); +static void lv_list_btn_single_selected(lv_obj_t * btn); /********************** * STATIC VARIABLES @@ -49,7 +50,8 @@ static lv_signal_cb_t label_signal; static lv_signal_cb_t ancestor_page_signal; static lv_signal_cb_t ancestor_btn_signal; #if LV_USE_GROUP -/*Used to make the last clicked button pressed (selected) when the list become focused and `click_focus == 1`*/ +/*Used to make the last clicked button pressed (selected) when the list become focused and + * `click_focus == 1`*/ static lv_obj_t * last_clicked_btn; #endif @@ -82,18 +84,18 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->style_img = NULL; - ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; - ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; + ext->style_img = NULL; + ext->styles_btn[LV_BTN_STATE_REL] = &lv_style_btn_rel; + ext->styles_btn[LV_BTN_STATE_PR] = &lv_style_btn_pr; ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; - ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; - ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; - ext->anim_time = LV_LIST_DEF_ANIM_TIME; - ext->single_mode = false; - ext->size = 0; + ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; + ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; + ext->anim_time = LV_LIST_DEF_ANIM_TIME; + ext->single_mode = false; + ext->size = 0; #if LV_USE_GROUP - ext->last_sel = NULL; + ext->last_sel = NULL; ext->selected_btn = NULL; #endif @@ -137,18 +139,18 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, copy_ext->styles_btn[LV_BTN_STATE_REL]); lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, copy_ext->styles_btn[LV_BTN_STATE_PR]); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, + copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, + copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, copy_ext->styles_btn[LV_BTN_STATE_INA]); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_list); } - LV_LOG_INFO("list created"); - return new_list; } @@ -161,7 +163,7 @@ void lv_list_clean(lv_obj_t * obj) lv_obj_t * scrl = lv_page_get_scrl(obj); lv_obj_clean(scrl); lv_list_ext_t * ext = lv_obj_get_ext_attr(obj); - ext->size = 0; + ext->size = 0; } /*====================== @@ -176,10 +178,11 @@ void lv_list_clean(lv_obj_t * obj) * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb) +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, + lv_event_cb_t event_cb) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - ext->size ++; + ext->size++; /*Create a list element with the image an the text*/ lv_obj_t * liste; liste = lv_btn_create(list, NULL); @@ -213,7 +216,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, #endif if(txt != NULL) { lv_coord_t btn_hor_pad = ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.left - - ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.right; + ext->styles_btn[LV_BTN_STYLE_REL]->body.padding.right; lv_obj_t * label = lv_label_create(liste, NULL); lv_label_set_text(label, txt); lv_obj_set_click(label, false); @@ -225,7 +228,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, /* If this is the first item to be added to the list and the list is * focused, select it */ { - lv_group_t *g = lv_obj_get_group(list); + lv_group_t * g = lv_obj_get_group(list); if(ext->size == 1 && lv_group_get_focused(g) == list) { lv_list_set_btn_selected(list, liste); } @@ -238,7 +241,8 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, /** * Remove the index of the button in the list * @param list pointer to a list object - * @param index pointer to a the button's index in the list, index must be 0 <= index < lv_list_ext_t.size + * @param index pointer to a the button's index in the list, index must be 0 <= index < + * lv_list_ext_t.size * @return true: successfully deleted */ bool lv_list_remove(const lv_obj_t * list, uint32_t index) @@ -246,15 +250,15 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index) lv_list_ext_t * ext = lv_obj_get_ext_attr(list); if(index >= ext->size) return false; uint32_t count = 0; - lv_obj_t * e = lv_list_get_next_btn(list, NULL); + lv_obj_t * e = lv_list_get_next_btn(list, NULL); while(e != NULL) { if(count == index) { lv_obj_del(e); - ext->size --; + ext->size--; return true; } e = lv_list_get_next_btn(list, e); - count ++; + count++; } return false; } @@ -268,7 +272,7 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index) * @param list pointer to the currently pressed list object * @param mode, enable(true)/disable(false) single selected mode. */ -void lv_list_set_single_mode(lv_obj_t *list, bool mode) +void lv_list_set_single_mode(lv_obj_t * list, bool mode) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -288,19 +292,23 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) if(ext->selected_btn) { lv_btn_state_t s = lv_btn_get_state(ext->selected_btn); - if(s == LV_BTN_STATE_PR) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_REL); - else if(s == LV_BTN_STATE_TGL_PR) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_REL); + if(s == LV_BTN_STATE_PR) + lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_REL); + else if(s == LV_BTN_STATE_TGL_PR) + lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_REL); } ext->selected_btn = btn; - if( btn != NULL ) { + if(btn != NULL) { ext->last_sel = btn; } if(ext->selected_btn) { lv_btn_state_t s = lv_btn_get_state(ext->selected_btn); - if(s == LV_BTN_STATE_REL) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_PR); - else if(s == LV_BTN_STATE_TGL_REL) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR); + if(s == LV_BTN_STATE_REL) + lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_PR); + else if(s == LV_BTN_STATE_TGL_REL) + lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR); lv_page_focus(list, ext->selected_btn, ext->anim_time); } @@ -332,51 +340,46 @@ void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) */ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style) { - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + lv_list_ext_t * ext = lv_obj_get_ext_attr(list); lv_btn_style_t btn_style_refr = LV_BTN_STYLE_REL; lv_obj_t * btn; switch(type) { - case LV_LIST_STYLE_BG: - lv_page_set_style(list, LV_PAGE_STYLE_BG, style); - /*style change signal will call 'refr_btn_width' */ - break; - case LV_LIST_STYLE_SCRL: - lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); - break; - case LV_LIST_STYLE_SB: - lv_page_set_style(list, LV_PAGE_STYLE_SB, style); - break; - case LV_LIST_STYLE_EDGE_FLASH: - lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); - break; - case LV_LIST_STYLE_BTN_REL: - ext->styles_btn[LV_BTN_STATE_REL] = style; - btn_style_refr = LV_BTN_STYLE_REL; - break; - case LV_LIST_STYLE_BTN_PR: - ext->styles_btn[LV_BTN_STATE_PR] = style; - btn_style_refr = LV_BTN_STYLE_PR; - break; - case LV_LIST_STYLE_BTN_TGL_REL: - ext->styles_btn[LV_BTN_STATE_TGL_REL] = style; - btn_style_refr = LV_BTN_STYLE_TGL_REL; - break; - case LV_LIST_STYLE_BTN_TGL_PR: - ext->styles_btn[LV_BTN_STATE_TGL_PR] = style; - btn_style_refr = LV_BTN_STYLE_TGL_PR; - break; - case LV_LIST_STYLE_BTN_INA: - ext->styles_btn[LV_BTN_STATE_INA] = style; - btn_style_refr = LV_BTN_STYLE_INA; - break; + case LV_LIST_STYLE_BG: + lv_page_set_style(list, LV_PAGE_STYLE_BG, style); + /*style change signal will call 'refr_btn_width' */ + break; + case LV_LIST_STYLE_SCRL: lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); break; + case LV_LIST_STYLE_SB: lv_page_set_style(list, LV_PAGE_STYLE_SB, style); break; + case LV_LIST_STYLE_EDGE_FLASH: + lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); + break; + case LV_LIST_STYLE_BTN_REL: + ext->styles_btn[LV_BTN_STATE_REL] = style; + btn_style_refr = LV_BTN_STYLE_REL; + break; + case LV_LIST_STYLE_BTN_PR: + ext->styles_btn[LV_BTN_STATE_PR] = style; + btn_style_refr = LV_BTN_STYLE_PR; + break; + case LV_LIST_STYLE_BTN_TGL_REL: + ext->styles_btn[LV_BTN_STATE_TGL_REL] = style; + btn_style_refr = LV_BTN_STYLE_TGL_REL; + break; + case LV_LIST_STYLE_BTN_TGL_PR: + ext->styles_btn[LV_BTN_STATE_TGL_PR] = style; + btn_style_refr = LV_BTN_STYLE_TGL_PR; + break; + case LV_LIST_STYLE_BTN_INA: + ext->styles_btn[LV_BTN_STATE_INA] = style; + btn_style_refr = LV_BTN_STYLE_INA; + break; } - /*Refresh existing buttons' style*/ if(type == LV_LIST_STYLE_BTN_PR || type == LV_LIST_STYLE_BTN_REL || - type == LV_LIST_STYLE_BTN_TGL_REL || type == LV_LIST_STYLE_BTN_TGL_PR || - type == LV_LIST_STYLE_BTN_INA) { + type == LV_LIST_STYLE_BTN_TGL_REL || type == LV_LIST_STYLE_BTN_TGL_PR || + type == LV_LIST_STYLE_BTN_INA) { btn = lv_list_get_prev_btn(list, NULL); while(btn != NULL) { lv_btn_set_style(btn, btn_style_refr, ext->styles_btn[btn_style_refr]); @@ -393,7 +396,7 @@ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style * Get single button selected mode. * @param list pointer to the currently pressed list object. */ -bool lv_list_get_single_mode(lv_obj_t *list) +bool lv_list_get_single_mode(lv_obj_t * list) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -463,7 +466,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) /* Not a good practice but user can add/create objects to the lists manually. * When getting the next button try to be sure that it is at least a button */ - lv_obj_t * btn ; + lv_obj_t * btn; lv_obj_t * scrl = lv_page_get_scrl(list); btn = lv_obj_get_child(scrl, prev_btn); @@ -477,8 +480,6 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) return btn; } - - /** * Get the next button from list. (Starts from the bottom button) * @param list pointer to a list object @@ -490,7 +491,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) /* Not a good practice but user can add/create objects to the lists manually. * When getting the next button try to be sure that it is at least a button */ - lv_obj_t * btn ; + lv_obj_t * btn; lv_obj_t * scrl = lv_page_get_scrl(list); btn = lv_obj_get_child_back(scrl, prev_btn); @@ -513,7 +514,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn) { int index = 0; - if( list == NULL ){ + if(list == NULL) { /* no list provided, assuming btn is part of a list */ list = lv_obj_get_parent(lv_obj_get_parent(btn)); } @@ -522,7 +523,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn) if(e == btn) { return index; } - index ++; + index++; e = lv_list_get_next_btn(list, e); } return -1; @@ -572,40 +573,22 @@ uint16_t lv_list_get_anim_time(const lv_obj_t * list) * */ lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_list_ext_t * ext = lv_obj_get_ext_attr(list); switch(type) { - case LV_LIST_STYLE_BG: - style = lv_page_get_style(list, LV_PAGE_STYLE_BG); - break; - case LV_LIST_STYLE_SCRL: - style = lv_page_get_style(list, LV_PAGE_STYLE_SB); - break; - case LV_LIST_STYLE_SB: - style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); - break; - case LV_LIST_STYLE_EDGE_FLASH: - style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); - break; - case LV_LIST_STYLE_BTN_REL: - style = ext->styles_btn[LV_BTN_STATE_REL]; - break; - case LV_LIST_STYLE_BTN_PR: - style = ext->styles_btn[LV_BTN_STATE_PR]; - break; - case LV_LIST_STYLE_BTN_TGL_REL: - style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; - break; - case LV_LIST_STYLE_BTN_TGL_PR: - style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; - break; - case LV_LIST_STYLE_BTN_INA: - style = ext->styles_btn[LV_BTN_STATE_INA]; - break; - default: - style = NULL; - break; + case LV_LIST_STYLE_BG: style = lv_page_get_style(list, LV_PAGE_STYLE_BG); break; + case LV_LIST_STYLE_SCRL: style = lv_page_get_style(list, LV_PAGE_STYLE_SB); break; + case LV_LIST_STYLE_SB: style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); break; + case LV_LIST_STYLE_EDGE_FLASH: + style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); + break; + case LV_LIST_STYLE_BTN_REL: style = ext->styles_btn[LV_BTN_STATE_REL]; break; + case LV_LIST_STYLE_BTN_PR: style = ext->styles_btn[LV_BTN_STATE_PR]; break; + case LV_LIST_STYLE_BTN_TGL_REL: style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; break; + case LV_LIST_STYLE_BTN_TGL_PR: style = ext->styles_btn[LV_BTN_STATE_TGL_PR]; break; + case LV_LIST_STYLE_BTN_INA: style = ext->styles_btn[LV_BTN_STATE_INA]; break; + default: style = NULL; break; } return style; @@ -625,29 +608,30 @@ void lv_list_up(const lv_obj_t * list) lv_obj_t * scrl = lv_page_get_scrl(list); lv_obj_t * e; lv_obj_t * e_prev = NULL; - e = lv_list_get_prev_btn(list, NULL); + e = lv_list_get_prev_btn(list, NULL); while(e != NULL) { if(e->coords.y2 <= list->coords.y2) { if(e_prev != NULL) { - lv_coord_t new_y = lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev)); + lv_coord_t new_y = + lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev)); lv_list_ext_t * ext = lv_obj_get_ext_attr(list); if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = scrl; - a.start = lv_obj_get_y(scrl); - a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = LV_LIST_DEF_ANIM_TIME; - a.playback = 0; + a.var = scrl; + a.start = lv_obj_get_y(scrl); + a.end = new_y; + a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = LV_LIST_DEF_ANIM_TIME; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif } @@ -655,7 +639,7 @@ void lv_list_up(const lv_obj_t * list) break; } e_prev = e; - e = lv_list_get_prev_btn(list, e); + e = lv_list_get_prev_btn(list, e); } } @@ -672,25 +656,25 @@ void lv_list_down(const lv_obj_t * list) e = lv_list_get_prev_btn(list, NULL); while(e != NULL) { if(e->coords.y1 < list->coords.y1) { - lv_coord_t new_y = -lv_obj_get_y(e); + lv_coord_t new_y = -lv_obj_get_y(e); lv_list_ext_t * ext = lv_obj_get_ext_attr(list); if(ext->anim_time == 0) { lv_obj_set_y(scrl, new_y); } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = scrl; - a.start = lv_obj_get_y(scrl); - a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = LV_LIST_DEF_ANIM_TIME; - a.playback = 0; + a.var = scrl; + a.start = lv_obj_get_y(scrl); + a.end = new_y; + a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = LV_LIST_DEF_ANIM_TIME; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif @@ -737,21 +721,16 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) res = ancestor_page_signal(list, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_RELEASED || - sign == LV_SIGNAL_PRESSED || - sign == LV_SIGNAL_PRESSING || - sign == LV_SIGNAL_LONG_PRESS || - sign == LV_SIGNAL_LONG_PRESS_REP) - { + if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || + sign == LV_SIGNAL_LONG_PRESS || sign == LV_SIGNAL_LONG_PRESS_REP) { /*If pressed/released etc by a KEYPAD or ENCODER delegate signal to the button*/ - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_KEYPAD || - (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(list)))) - { + (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(list)))) { /*Get the 'pressed' button*/ lv_obj_t * btn = NULL; - btn = lv_list_get_prev_btn(list, btn); + btn = lv_list_get_prev_btn(list, btn); while(btn != NULL) { if(lv_btn_get_state(btn) == LV_BTN_STATE_PR) break; btn = lv_list_get_prev_btn(list, btn); @@ -762,26 +741,23 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) bool drag = lv_indev_is_dragging(lv_indev_get_act()); if(sign == LV_SIGNAL_PRESSED) { lv_event_send(btn, LV_EVENT_PRESSED, NULL); - } - else if(sign == LV_SIGNAL_PRESSING) { + } else if(sign == LV_SIGNAL_PRESSING) { lv_event_send(btn, LV_EVENT_PRESSING, NULL); - } - else if(sign == LV_SIGNAL_LONG_PRESS && !drag) { + } else if(sign == LV_SIGNAL_LONG_PRESS && !drag) { lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); - } - else if(sign == LV_SIGNAL_LONG_PRESS_REP && !drag) { + } else if(sign == LV_SIGNAL_LONG_PRESS_REP && !drag) { lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - } - else if(sign == LV_SIGNAL_RELEASED && !drag) { + } else if(sign == LV_SIGNAL_RELEASED && !drag) { ext->last_sel = btn; - if(indev->proc.long_pr_sent == 0) lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); - if(lv_indev_is_dragging(indev) == false) lv_event_send(btn, LV_EVENT_CLICKED, NULL); + if(indev->proc.long_pr_sent == 0) + lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); + if(lv_indev_is_dragging(indev) == false) + lv_event_send(btn, LV_EVENT_CLICKED, NULL); lv_event_send(btn, LV_EVENT_RELEASED, NULL); } } } - } - else if(sign == LV_SIGNAL_FOCUS) { + } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); @@ -793,8 +769,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(ext->last_sel) { /* Select the last used button */ lv_list_set_btn_selected(list, ext->last_sel); - } - else { + } else { /*Get the first button and mark it as selected*/ lv_list_set_btn_selected(list, lv_list_get_next_btn(list, NULL)); } @@ -812,8 +787,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) if(ext->last_sel) { /* Select the last used button */ lv_list_set_btn_selected(list, ext->last_sel); - } - else { + } else { /*Get the first button and mark it as selected*/ lv_list_set_btn_selected(list, lv_list_get_next_btn(list, NULL)); } @@ -825,13 +799,13 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) #if LV_USE_GROUP /*De-select the selected btn*/ lv_list_set_btn_selected(list, NULL); - last_clicked_btn = NULL; /*button click will be set if click happens before focus*/ + last_clicked_btn = NULL; /*button click will be set if click happens before focus*/ lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - ext->selected_btn = NULL; + ext->selected_btn = NULL; #endif } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; + *editable = true; } else if(sign == LV_SIGNAL_CONTROL) { #if LV_USE_GROUP @@ -846,7 +820,10 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) /*If there is no selected button the make the first selected*/ else { lv_obj_t * btn = lv_list_get_next_btn(list, NULL); - if(btn) lv_list_set_btn_selected(list, btn); /*If there are no buttons on the list then there is no first button*/ + if(btn) + lv_list_set_btn_selected( + list, + btn); /*If there are no buttons on the list then there is no first button*/ } } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -865,7 +842,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_list"; @@ -873,7 +850,6 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) return res; } - /** * Signal function of the list buttons * @param btn pointer to a button on the list @@ -890,8 +866,8 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para if(res != LV_RES_OK) return res; if(sign == LV_SIGNAL_RELEASED) { - lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); + lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->page.scroll_prop_ip = 0; #if LV_USE_GROUP @@ -902,8 +878,10 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para lv_obj_t * btn_i = lv_list_get_prev_btn(list, NULL); while(btn_i) { lv_btn_state_t s = lv_btn_get_state(btn_i); - if(s == LV_BTN_STATE_PR) lv_btn_set_state(btn_i, LV_BTN_STATE_REL); - else if(s == LV_BTN_STATE_TGL_PR) lv_btn_set_state(btn_i, LV_BTN_STATE_TGL_REL); + if(s == LV_BTN_STATE_PR) + lv_btn_set_state(btn_i, LV_BTN_STATE_REL); + else if(s == LV_BTN_STATE_TGL_PR) + lv_btn_set_state(btn_i, LV_BTN_STATE_TGL_REL); btn_i = lv_list_get_prev_btn(list, btn_i); } @@ -915,50 +893,43 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para * to mark it as selected (pressed state)*/ last_clicked_btn = btn; #endif - if(lv_indev_is_dragging(lv_indev_get_act()) == false && ext->single_mode) - { + if(lv_indev_is_dragging(lv_indev_get_act()) == false && ext->single_mode) { lv_list_btn_single_selected(btn); } - } - else if(sign == LV_SIGNAL_PRESS_LOST) { - lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + } else if(sign == LV_SIGNAL_PRESS_LOST) { + lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); + lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->page.scroll_prop_ip = 0; - } - else if(sign == LV_SIGNAL_CLEANUP) { + } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_GROUP lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); - lv_obj_t * sel = lv_list_get_btn_selected(list); + lv_obj_t * sel = lv_list_get_btn_selected(list); if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn)); #endif } - return res; } /** - * Make a single button selected in the list, deselect others, should be called in list btns call back. + * Make a single button selected in the list, deselect others, should be called in list btns call + * back. * @param btn pointer to the currently pressed list btn object */ -static void lv_list_btn_single_selected(lv_obj_t *btn) +static void lv_list_btn_single_selected(lv_obj_t * btn) { - lv_obj_t *list = lv_obj_get_parent(lv_obj_get_parent(btn)); + lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); lv_obj_t * e = lv_list_get_next_btn(list, NULL); - do - { - if(e == btn) - { + do { + if(e == btn) { lv_btn_set_state(e, LV_BTN_STATE_TGL_REL); - } - else - { + } else { lv_btn_set_state(e, LV_BTN_STATE_REL); } e = lv_list_get_next_btn(list, e); - } while (e != NULL); + } while(e != NULL); } #endif diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index a634a9f1225d..811f4696262e 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -34,7 +34,6 @@ extern "C" { #error "lv_list: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif - #include "../lv_core/lv_obj.h" #include "lv_page.h" #include "lv_btn.h" @@ -53,14 +52,15 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - uint16_t anim_time; /*Scroll animation time*/ - lv_style_t *styles_btn[LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/ - lv_style_t *style_img; /*Style of the list element images on buttons*/ - uint32_t size; /*the number of items(buttons) in the list*/ - bool single_mode; /* whether single selected mode is enabled */ + uint16_t anim_time; /*Scroll animation time*/ + lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/ + lv_style_t * style_img; /*Style of the list element images on buttons*/ + uint32_t size; /*the number of items(buttons) in the list*/ + bool single_mode; /* whether single selected mode is enabled */ #if LV_USE_GROUP - lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ - lv_obj_t * selected_btn; /* The button is currently being selected*/ + lv_obj_t * + last_sel; /* The last selected button. It will be reverted when the list is focused again */ + lv_obj_t * selected_btn; /* The button is currently being selected*/ #endif } lv_list_ext_t; @@ -77,7 +77,6 @@ enum { }; typedef uint8_t lv_list_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -94,7 +93,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy); * Delete all children of the scrl object, without deleting scrl child. * @param obj pointer to an object */ -void lv_list_clean(lv_obj_t *obj); +void lv_list_clean(lv_obj_t * obj); /*====================== * Add/remove functions @@ -108,12 +107,14 @@ void lv_list_clean(lv_obj_t *obj); * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb); +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, + lv_event_cb_t event_cb); /** * Remove the index of the button in the list * @param list pointer to a list object - * @param index pointer to a the button's index in the list, index must be 0 <= index < lv_list_ext_t.size + * @param index pointer to a the button's index in the list, index must be 0 <= index < + * lv_list_ext_t.size * @return true: successfully deleted */ bool lv_list_remove(const lv_obj_t * list, uint32_t index); @@ -121,14 +122,14 @@ bool lv_list_remove(const lv_obj_t * list, uint32_t index); /*===================== * Setter functions *====================*/ - + /** * Set single button selected mode, only one button will be selected if enabled. * @param list pointer to the currently pressed list object * @param mode, enable(true)/disable(false) single selected mode. */ -void lv_list_set_single_mode(lv_obj_t *list, bool mode); - +void lv_list_set_single_mode(lv_obj_t * list, bool mode); + #if LV_USE_GROUP /** @@ -144,7 +145,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn); * @param list pointer to a list object * @param anim_time duration of animation [ms] */ -void lv_list_set_anim_time(lv_obj_t *list, uint16_t anim_time); +void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time); /** * Set the scroll bar mode of a list @@ -157,7 +158,8 @@ static inline void lv_list_set_sb_mode(lv_obj_t * list, lv_sb_mode_t mode) } /** - * Enable the scroll propagation feature. If enabled then the List will move its parent if there is no more space to scroll. + * Enable the scroll propagation feature. If enabled then the List will move its parent if there is + * no more space to scroll. * @param list pointer to a List * @param en true or false to enable/disable scroll propagation */ @@ -182,7 +184,7 @@ static inline void lv_list_set_edge_flash(lv_obj_t * list, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_list_set_style(lv_obj_t *list, lv_list_style_t type, lv_style_t *style); +void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -192,8 +194,8 @@ void lv_list_set_style(lv_obj_t *list, lv_list_style_t type, lv_style_t *style); * Get single button selected mode. * @param list pointer to the currently pressed list object. */ -bool lv_list_get_single_mode(lv_obj_t *list); - +bool lv_list_get_single_mode(lv_obj_t * list); + /** * Get the text of a list element * @param btn pointer to list element @@ -254,14 +256,12 @@ uint32_t lv_list_get_size(const lv_obj_t * list); lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list); #endif - /** * Get scroll animation duration * @param list pointer to a list object * @return duration of animation [ms] */ -uint16_t lv_list_get_anim_time(const lv_obj_t *list); - +uint16_t lv_list_get_anim_time(const lv_obj_t * list); /** * Get the scroll bar mode of a list @@ -299,7 +299,7 @@ static inline bool lv_list_get_edge_flash(lv_obj_t * list) * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_list_get_style(const lv_obj_t *list, lv_list_style_t type); +lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type); /*===================== * Other functions @@ -321,16 +321,16 @@ void lv_list_down(const lv_obj_t * list); * @param btn pointer to a list button to focus * @param anim_en true: scroll with animation, false: without animation */ -void lv_list_focus(const lv_obj_t *btn, bool anim_en); +void lv_list_focus(const lv_obj_t * btn, bool anim_en); /********************** * MACROS **********************/ -#endif /*LV_USE_LIST*/ +#endif /*LV_USE_LIST*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_LIST_H*/ +#endif /*LV_LIST_H*/ diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index 11479d8dc618..4723c7d9e2ab 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -17,8 +17,8 @@ /********************* * DEFINES *********************/ -#define LV_LMETER_LINE_UPSCALE 5 /*2^x upscale of line to make rounding*/ -#define LV_LMETER_LINE_UPSCALE_MASK ((1 << LV_LMETER_LINE_UPSCALE) - 1) +#define LV_LMETER_LINE_UPSCALE 5 /*2^x upscale of line to make rounding*/ +#define LV_LMETER_LINE_UPSCALE_MASK ((1 << LV_LMETER_LINE_UPSCALE) - 1) /********************** * TYPEDEFS @@ -47,7 +47,8 @@ static lv_signal_cb_t ancestor_signal; /** * Create a line meter objects * @param par pointer to an object, it will be the parent of the new line meter - * @param copy pointer to a line meter object, if not NULL then the new object will be copied from it + * @param copy pointer to a line meter object, if not NULL then the new object will be copied from + * it * @return pointer to the created line meter */ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) @@ -67,10 +68,10 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ - ext->min_value = 0; - ext->max_value = 100; - ext->cur_value = 0; - ext->line_cnt = 21; /*Odd scale number looks better*/ + ext->min_value = 0; + ext->max_value = 100; + ext->cur_value = 0; + ext->line_cnt = 21; /*Odd scale number looks better*/ ext->scale_angle = 240; /*(scale_num - 1) * N looks better */ /*The signal and design functions are not copied so set them here*/ @@ -92,11 +93,11 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing line meter*/ else { lv_lmeter_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->scale_angle = copy_ext->scale_angle; - ext->line_cnt = copy_ext->line_cnt; - ext->min_value = copy_ext->min_value; - ext->max_value = copy_ext->max_value; - ext->cur_value = copy_ext->cur_value; + ext->scale_angle = copy_ext->scale_angle; + ext->line_cnt = copy_ext->line_cnt; + ext->min_value = copy_ext->min_value; + ext->max_value = copy_ext->max_value; + ext->cur_value = copy_ext->cur_value; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_lmeter); @@ -162,12 +163,11 @@ void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint8_t line_cnt) if(ext->scale_angle == angle && ext->line_cnt == line_cnt) return; ext->scale_angle = angle; - ext->line_cnt = line_cnt; + ext->line_cnt = line_cnt; lv_obj_invalidate(lmeter); } - /*===================== * Getter functions *====================*/ @@ -213,7 +213,7 @@ int16_t lv_lmeter_get_max_value(const lv_obj_t * lmeter) uint8_t lv_lmeter_get_line_count(const lv_obj_t * lmeter) { lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter); - return ext->line_cnt ; + return ext->line_cnt; } /** @@ -231,7 +231,6 @@ uint16_t lv_lmeter_get_scale_angle(const lv_obj_t * lmeter) * STATIC FUNCTIONS **********************/ - /** * Handle the drawing related tasks of the line meters * @param lmeter pointer to an object @@ -251,12 +250,11 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter); - lv_style_t * style = lv_obj_get_style(lmeter); - lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); + lv_style_t * style = lv_obj_get_style(lmeter); + lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); lv_style_t style_tmp; memcpy(&style_tmp, style, sizeof(lv_style_t)); - #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(lmeter); if(lv_group_get_focused(g) == lmeter) { @@ -265,27 +263,29 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig #endif lv_coord_t r_out = lv_obj_get_width(lmeter) / 2; - lv_coord_t r_in = r_out - style->body.padding.left; + lv_coord_t r_in = r_out - style->body.padding.left; if(r_in < 1) r_in = 1; - lv_coord_t x_ofs = lv_obj_get_width(lmeter) / 2 + lmeter->coords.x1; - lv_coord_t y_ofs = lv_obj_get_height(lmeter) / 2 + lmeter->coords.y1; + lv_coord_t x_ofs = lv_obj_get_width(lmeter) / 2 + lmeter->coords.x1; + lv_coord_t y_ofs = lv_obj_get_height(lmeter) / 2 + lmeter->coords.y1; int16_t angle_ofs = 90 + (360 - ext->scale_angle) / 2; - int16_t level = (int32_t)((int32_t)(ext->cur_value - ext->min_value) * ext->line_cnt) / (ext->max_value - ext->min_value); + int16_t level = (int32_t)((int32_t)(ext->cur_value - ext->min_value) * ext->line_cnt) / + (ext->max_value - ext->min_value); uint8_t i; style_tmp.line.color = style->body.main_color; /*Calculate every coordinate in a bigger size to make rounding later*/ r_out = r_out << LV_LMETER_LINE_UPSCALE; - r_in = r_in << LV_LMETER_LINE_UPSCALE; + r_in = r_in << LV_LMETER_LINE_UPSCALE; for(i = 0; i < ext->line_cnt; i++) { /*Calculate the position a scale label*/ int16_t angle = (i * ext->scale_angle) / (ext->line_cnt - 1) + angle_ofs; lv_coord_t y_out = (int32_t)((int32_t)lv_trigo_sin(angle) * r_out) >> LV_TRIGO_SHIFT; - lv_coord_t x_out = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_out) >> LV_TRIGO_SHIFT; + lv_coord_t x_out = + (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_out) >> LV_TRIGO_SHIFT; lv_coord_t y_in = (int32_t)((int32_t)lv_trigo_sin(angle) * r_in) >> LV_TRIGO_SHIFT; lv_coord_t x_in = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_in) >> LV_TRIGO_SHIFT; @@ -299,14 +299,16 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig lv_point_t p2; p2.x = x_in + x_ofs; - p2.y = y_in + y_ofs; + p2.y = y_in + y_ofs; p1.x = x_out + x_ofs; p1.y = y_out + y_ofs; - if(i >= level) style_tmp.line.color = style->line.color; + if(i >= level) + style_tmp.line.color = style->line.color; else { - style_tmp.line.color = lv_color_mix(style->body.grad_color, style->body.main_color, (255 * i) / ext->line_cnt); + style_tmp.line.color = lv_color_mix(style->body.grad_color, style->body.main_color, + (255 * i) / ext->line_cnt); } lv_draw_line(&p1, &p2, mask, &style_tmp, opa_scale); @@ -315,7 +317,6 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -342,11 +343,11 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par lv_obj_refresh_ext_size(lmeter); } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { lv_style_t * style = lv_lmeter_get_style(lmeter); - lmeter->ext_size = LV_MATH_MAX(lmeter->ext_size, style->line.width); + lmeter->ext_size = LV_MATH_MAX(lmeter->ext_size, style->line.width); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_lmeter"; @@ -366,10 +367,11 @@ static lv_coord_t lv_lmeter_coord_round(int32_t x) bool was_negative = false; if(x < 0) { was_negative = true; - x = -x; + x = -x; } - x = (x >> LV_LMETER_LINE_UPSCALE) + ((x & LV_LMETER_LINE_UPSCALE_MASK) >> (LV_LMETER_LINE_UPSCALE - 1)); + x = (x >> LV_LMETER_LINE_UPSCALE) + + ((x & LV_LMETER_LINE_UPSCALE_MASK) >> (LV_LMETER_LINE_UPSCALE - 1)); if(was_negative) x = -x; diff --git a/src/lv_objx/lv_lmeter.h b/src/lv_objx/lv_lmeter.h index dfabe4cb1e90..ab31d3dc35ce 100644 --- a/src/lv_objx/lv_lmeter.h +++ b/src/lv_objx/lv_lmeter.h @@ -33,10 +33,10 @@ extern "C" { /*Data of line meter*/ typedef struct { - /*No inherited ext.*/ /*Ext. of ancestor*/ + /*No inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ - uint16_t scale_angle; /*Angle of the scale in deg. (0..360)*/ - uint8_t line_cnt; /*Count of lines */ + uint16_t scale_angle; /*Angle of the scale in deg. (0..360)*/ + uint8_t line_cnt; /*Count of lines */ int16_t cur_value; int16_t min_value; int16_t max_value; @@ -49,7 +49,8 @@ typedef struct /** * Create a line meter objects * @param par pointer to an object, it will be the parent of the new line meter - * @param copy pointer to a line meter object, if not NULL then the new object will be copied from it + * @param copy pointer to a line meter object, if not NULL then the new object will be copied from + * it * @return pointer to the created line meter */ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy); @@ -63,7 +64,7 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy); * @param lmeter pointer to a line meter object * @param value new value */ -void lv_lmeter_set_value(lv_obj_t *lmeter, int16_t value); +void lv_lmeter_set_value(lv_obj_t * lmeter, int16_t value); /** * Set minimum and the maximum values of a line meter @@ -71,7 +72,7 @@ void lv_lmeter_set_value(lv_obj_t *lmeter, int16_t value); * @param min minimum value * @param max maximum value */ -void lv_lmeter_set_range(lv_obj_t *lmeter, int16_t min, int16_t max); +void lv_lmeter_set_range(lv_obj_t * lmeter, int16_t min, int16_t max); /** * Set the scale settings of a line meter @@ -86,7 +87,7 @@ void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint8_t line_cnt); * @param lmeter pointer to a line meter object * @param bg set the style of the line meter */ -static inline void lv_lmeter_set_style(lv_obj_t *lmeter, lv_style_t *bg) +static inline void lv_lmeter_set_style(lv_obj_t * lmeter, lv_style_t * bg) { lv_obj_set_style(lmeter, bg); } @@ -100,7 +101,7 @@ static inline void lv_lmeter_set_style(lv_obj_t *lmeter, lv_style_t *bg) * @param lmeter pointer to a line meter object * @return the value of the line meter */ -int16_t lv_lmeter_get_value(const lv_obj_t *lmeter); +int16_t lv_lmeter_get_value(const lv_obj_t * lmeter); /** * Get the minimum value of a line meter @@ -144,10 +145,10 @@ static inline lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) * MACROS **********************/ -#endif /*LV_USE_LMETER*/ +#endif /*LV_USE_LMETER*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_LMETER_H*/ +#endif /*LV_LMETER_H*/ diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 72f3916af7c8..8a5a348713db 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -3,7 +3,6 @@ * */ - /********************* * INCLUDES *********************/ @@ -20,12 +19,12 @@ *********************/ #if LV_USE_ANIMATION -# ifndef LV_MBOX_CLOSE_ANIM_TIME -# define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */ -# endif +#ifndef LV_MBOX_CLOSE_ANIM_TIME +#define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */ +#endif #else -# undef LV_MBOX_CLOSE_ANIM_TIME -# define LV_MBOX_CLOSE_ANIM_TIME 0 /*No animations*/ +#undef LV_MBOX_CLOSE_ANIM_TIME +#define LV_MBOX_CLOSE_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -56,7 +55,8 @@ static lv_signal_cb_t ancestor_signal; /** * Create a message box objects * @param par pointer to an object, it will be the parent of the new message box - * @param copy pointer to a message box object, if not NULL then the new object will be copied from it + * @param copy pointer to a message box object, if not NULL then the new object will be copied from + * it * @return pointer to the created message box */ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) @@ -75,8 +75,8 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->text = NULL; - ext->btnm = NULL; + ext->text = NULL; + ext->btnm = NULL; ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME; /*The signal and design functions are not copied so set them here*/ @@ -117,7 +117,6 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_refresh_style(new_mbox); } - LV_LOG_INFO("mesasge box created"); return new_mbox; @@ -204,7 +203,8 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) if(ext->anim_time != 0) { /*Add shrinking animations*/ lv_obj_animate(mbox, LV_ANIM_GROW_H | LV_ANIM_OUT, ext->anim_time, delay, NULL); - lv_obj_animate(mbox, LV_ANIM_GROW_V | LV_ANIM_OUT, ext->anim_time, delay, lv_mbox_close_end_cb); + lv_obj_animate(mbox, LV_ANIM_GROW_V | LV_ANIM_OUT, ext->anim_time, delay, + lv_mbox_close_end_cb); /*Disable fit to let shrinking work*/ lv_cont_set_fit(mbox, LV_FIT_NONE); @@ -241,18 +241,12 @@ void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); switch(type) { - case LV_MBOX_STYLE_BG: - lv_obj_set_style(mbox, style); - break; - case LV_MBOX_STYLE_BTN_BG: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, style); - break; + case LV_MBOX_STYLE_BG: lv_obj_set_style(mbox, style); break; + case LV_MBOX_STYLE_BTN_BG: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, style); break; case LV_MBOX_STYLE_BTN_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_REL, style); break; - case LV_MBOX_STYLE_BTN_PR: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_PR, style); - break; + case LV_MBOX_STYLE_BTN_PR: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_PR, style); break; case LV_MBOX_STYLE_BTN_TGL_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL, style); break; @@ -265,7 +259,6 @@ void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style } mbox_realign(mbox); - } /** @@ -275,10 +268,9 @@ void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style */ void lv_mbox_set_recolor(lv_obj_t * mbox, bool en) { - lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - if(ext->btnm) - lv_btnm_set_recolor(ext->btnm, en); + if(ext->btnm) lv_btnm_set_recolor(ext->btnm, en); } /*===================== @@ -306,8 +298,10 @@ const char * lv_mbox_get_text(const lv_obj_t * mbox) uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - if(ext->btnm) return lv_btnm_get_active_btn(ext->btnm); - else return LV_BTNM_BTN_NONE; + if(ext->btnm) + return lv_btnm_get_active_btn(ext->btnm); + else + return LV_BTNM_BTN_NONE; } /** @@ -319,8 +313,10 @@ uint16_t lv_mbox_get_active_btn(lv_obj_t * mbox) const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - if(ext->btnm) return lv_btnm_get_active_btn_text(ext->btnm); - else return NULL; + if(ext->btnm) + return lv_btnm_get_active_btn_text(ext->btnm); + else + return NULL; } /** @@ -342,16 +338,12 @@ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox) */ lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); switch(type) { - case LV_MBOX_STYLE_BG: - style = lv_obj_get_style(mbox); - break; - case LV_MBOX_STYLE_BTN_BG: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BG); - break; + case LV_MBOX_STYLE_BG: style = lv_obj_get_style(mbox); break; + case LV_MBOX_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BG); break; case LV_MBOX_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_REL); break; @@ -367,9 +359,7 @@ lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) case LV_MBOX_STYLE_BTN_INA: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_INA); break; - default: - style = NULL; - break; + default: style = NULL; break; } return style; @@ -384,8 +374,7 @@ bool lv_mbox_get_recolor(const lv_obj_t * mbox) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - if(!ext->btnm) - return false; + if(!ext->btnm) return false; return lv_btnm_get_recolor(ext->btnm); } @@ -436,39 +425,38 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) if(lv_obj_get_width(mbox) != lv_area_get_width(param)) { mbox_realign(mbox); } - } - else if(sign == LV_SIGNAL_STYLE_CHG) { + } else if(sign == LV_SIGNAL_STYLE_CHG) { mbox_realign(mbox); - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id); - } - else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || - sign == LV_SIGNAL_CONTROL || sign == LV_SIGNAL_GET_EDITABLE) { + } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL || + sign == LV_SIGNAL_GET_EDITABLE) { if(ext->btnm) { ext->btnm->signal_cb(ext->btnm, sign, param); } - /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't (Only the message box's container) - * So so some actions here instead*/ + /* The button matrix with ENCODER input supposes it's in a group but in this case it isn't + * (Only the message box's container) So so some actions here instead*/ if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_ENCODER) { /*In navigation mode don't select any button but in edit mode select the fist*/ lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btnm); - if(lv_group_get_editing(lv_obj_get_group(mbox))) btnm_ext->btn_id_pr = 0; - else btnm_ext->btn_id_pr = LV_BTNM_BTN_NONE; + if(lv_group_get_editing(lv_obj_get_group(mbox))) + btnm_ext->btn_id_pr = 0; + else + btnm_ext->btn_id_pr = LV_BTNM_BTN_NONE; } #endif } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_mbox"; @@ -493,11 +481,13 @@ static void mbox_realign(lv_obj_t * mbox) } if(ext->btnm) { - lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); + lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); - lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); - lv_obj_set_size(ext->btnm, w, font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom + - btn_bg_style->body.padding.top + btn_bg_style->body.padding.bottom); + lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); + lv_obj_set_size(ext->btnm, w, + font_h + btn_rel_style->body.padding.top + + btn_rel_style->body.padding.bottom + btn_bg_style->body.padding.top + + btn_bg_style->body.padding.bottom); } } @@ -506,7 +496,6 @@ static void lv_mbox_close_end_cb(lv_obj_t * mbox) lv_obj_del(mbox); } - static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) { if(event != LV_EVENT_CLICKED) return; @@ -515,7 +504,6 @@ static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) if(btn_id == LV_BTNM_BTN_NONE) return; lv_mbox_start_auto_close(mbox, 0); - } #endif diff --git a/src/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h index 953f12c55c44..de62398e28cf 100644 --- a/src/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -34,7 +34,6 @@ extern "C" { #error "lv_mbox: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) " #endif - #include "../lv_core/lv_obj.h" #include "lv_cont.h" #include "lv_btnm.h" @@ -53,9 +52,9 @@ typedef struct { lv_cont_ext_t bg; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t *text; /*Text of the message box*/ - lv_obj_t *btnm; /*Button matrix for the buttons*/ - uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/ + lv_obj_t * text; /*Text of the message box*/ + lv_obj_t * btnm; /*Button matrix for the buttons*/ + uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/ } lv_mbox_ext_t; enum { @@ -76,7 +75,8 @@ typedef uint8_t lv_mbox_style_t; /** * Create a message box objects * @param par pointer to an object, it will be the parent of the new message box - * @param copy pointer to a message box object, if not NULL then the new object will be copied from it + * @param copy pointer to a message box object, if not NULL then the new object will be copied from + * it * @return pointer to the created message box */ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy); @@ -91,7 +91,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy); * @param btn_map button descriptor (button matrix map). * E.g. a const char *txt[] = {"ok", "close", ""} (Can not be local variable) */ -void lv_mbox_add_btns(lv_obj_t * mbox, const char **btn_mapaction); +void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_mapaction); /*===================== * Setter functions @@ -130,7 +130,7 @@ void lv_mbox_stop_auto_close(lv_obj_t * mbox); * @param type which style should be set * @param style pointer to a style */ -void lv_mbox_set_style(lv_obj_t *mbox, lv_mbox_style_t type, lv_style_t *style); +void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style); /** * Set whether recoloring is enabled. Must be called after `lv_mbox_add_btns`. @@ -173,14 +173,13 @@ const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox); */ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox); - /** * Get a style of a message box * @param mbox pointer to a message box object * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_mbox_get_style(const lv_obj_t *mbox, lv_mbox_style_t type); +lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type); /** * Get whether recoloring is enabled @@ -201,11 +200,10 @@ lv_obj_t * lv_mbox_get_btnm(lv_obj_t * mbox); * MACROS **********************/ - -#endif /*LV_USE_MBOX*/ +#endif /*LV_USE_MBOX*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_MBOX_H*/ +#endif /*LV_MBOX_H*/ diff --git a/src/lv_objx/lv_objx_templ.c b/src/lv_objx/lv_objx_templ.c index 18864a1d4a8c..fd6f882c5174 100644 --- a/src/lv_objx/lv_objx_templ.c +++ b/src/lv_objx/lv_objx_templ.c @@ -8,8 +8,8 @@ * templ -> object short name with lower case(e.g. btn, label etc) * TEMPL -> object short name with upper case (e.g. BTN, LABEL etc.) * - * You can remove the defined() clause from the #if statement below. This exists because LV_USE_TEMPL - * is not in lv_conf.h or lv_conf_templ.h by default. + * You can remove the defined() clause from the #if statement below. This exists because + * LV_USE_TEMPL is not in lv_conf.h or lv_conf_templ.h by default. */ /********************* @@ -102,7 +102,6 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy) * New object specific "add" or "remove" functions come here */ - /*===================== * Setter functions *====================*/ @@ -111,7 +110,6 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy) * New object specific "set" functions come here */ - /** * Set a style of a template. * @param templ pointer to template object @@ -123,10 +121,8 @@ void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * st lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ); switch(type) { - case LV_TEMPL_STYLE_X: - break; - case LV_TEMPL_STYLE_Y: - break; + case LV_TEMPL_STYLE_X: break; + case LV_TEMPL_STYLE_Y: break; } } @@ -147,15 +143,12 @@ void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * st lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type) { lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ); - lv_style_t * style = NULL; + lv_style_t * style = NULL; switch(type) { - case LV_TEMPL_STYLE_X: - style = NULL; /*Replace NULL with a pointer to the style*/ - case LV_TEMPL_STYLE_Y: - style = NULL; /*Replace NULL with a pointer to the style*/ - default: - style = NULL; + case LV_TEMPL_STYLE_X: style = NULL; /*Replace NULL with a pointer to the style*/ + case LV_TEMPL_STYLE_Y: style = NULL; /*Replace NULL with a pointer to the style*/ + default: style = NULL; } return style; @@ -195,7 +188,6 @@ static bool lv_templ_design(lv_obj_t * templ, const lv_area_t * mask, lv_design_ } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -216,13 +208,12 @@ static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param res = ancestor_signal(templ, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_templ"; diff --git a/src/lv_objx/lv_objx_templ.h b/src/lv_objx/lv_objx_templ.h index 3fdac8eb6770..a54e800b6f0d 100644 --- a/src/lv_objx/lv_objx_templ.h +++ b/src/lv_objx/lv_objx_templ.h @@ -3,7 +3,6 @@ * */ - /* TODO Remove these instructions * Search an replace: template -> object normal name with lower case (e.g. button, label etc.) * templ -> object short name with lower case(e.g. btn, label etc) @@ -39,12 +38,12 @@ extern "C" { * TYPEDEFS **********************/ /*Data of template*/ -typedef struct { +typedef struct +{ lv_ANCESTOR_ext_t ANCESTOR; /*Ext. of ancestor*/ /*New data for this type */ } lv_templ_ext_t; - /*Styles*/ enum { LV_TEMPL_STYLE_X, @@ -52,7 +51,6 @@ enum { }; typedef uint8_t lv_templ_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -69,7 +67,6 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy); * Add/remove functions *=====================*/ - /*===================== * Setter functions *====================*/ @@ -80,7 +77,7 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy); * @param type which style should be set * @param style pointer to a style */ -void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t *style); +void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -102,10 +99,10 @@ lv_style_t * lv_templ_get_style(const lv_obj_t * templ, lv_templ_style_t type); * MACROS **********************/ -#endif /*LV_USE_TEMPL*/ +#endif /*LV_USE_TEMPL*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_TEMPL_H*/ +#endif /*LV_TEMPL_H*/ diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 4e7feaf80d9f..996cb2726de8 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -19,11 +19,12 @@ /********************* * DEFINES *********************/ -#define LV_PAGE_SB_MIN_SIZE (LV_DPI / 8) -#define LV_PAGE_SCROLL_ANIM_TIME 200 /*[ms] Scroll anim time on `lv_page_scroll_up/down/left/rigth`*/ -#define LV_PAGE_END_FLASH_SIZE (LV_DPI / 4) -#define LV_PAGE_END_ANIM_TIME 300 -#define LV_PAGE_END_ANIM_WAIT_TIME 300 +#define LV_PAGE_SB_MIN_SIZE (LV_DPI / 8) +#define LV_PAGE_SCROLL_ANIM_TIME \ + 200 /*[ms] Scroll anim time on `lv_page_scroll_up/down/left/rigth`*/ +#define LV_PAGE_END_FLASH_SIZE (LV_DPI / 4) +#define LV_PAGE_END_ANIM_TIME 300 +#define LV_PAGE_END_ANIM_WAIT_TIME 300 /********************** * TYPEDEFS @@ -78,21 +79,21 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->scrl = NULL; - ext->sb.hor_draw = 0; - ext->sb.ver_draw = 0; - ext->sb.style = &lv_style_pretty; - ext->sb.mode = LV_SB_MODE_AUTO; - ext->edge_flash.enabled = 0; + ext->scrl = NULL; + ext->sb.hor_draw = 0; + ext->sb.ver_draw = 0; + ext->sb.style = &lv_style_pretty; + ext->sb.mode = LV_SB_MODE_AUTO; + ext->edge_flash.enabled = 0; ext->edge_flash.bottom_ip = 0; - ext->edge_flash.top_ip = 0; - ext->edge_flash.left_ip = 0; - ext->edge_flash.right_ip = 0; - ext->edge_flash.state = 0; - ext->edge_flash.style = &lv_style_plain_color; - ext->arrow_scroll = 0; - ext->scroll_prop = 0; - ext->scroll_prop_ip = 0; + ext->edge_flash.top_ip = 0; + ext->edge_flash.left_ip = 0; + ext->edge_flash.right_ip = 0; + ext->edge_flash.state = 0; + ext->edge_flash.style = &lv_style_plain_color; + ext->arrow_scroll = 0; + ext->scroll_prop = 0; + ext->scroll_prop_ip = 0; /*Init the new page object*/ if(copy == NULL) { @@ -103,7 +104,8 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_drag_throw(ext->scrl, true); lv_obj_set_protect(ext->scrl, LV_PROTECT_PARENT | LV_PROTECT_PRESS_LOST); lv_cont_set_fit4(ext->scrl, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL, LV_FIT_FILL); - lv_obj_set_event_cb(ext->scrl, scrl_def_event_cb); /*Propagate some event to the background object by default for convenience */ + lv_obj_set_event_cb(ext->scrl, scrl_def_event_cb); /*Propagate some event to the background + object by default for convenience */ /* Add the signal function only if 'scrolling' is created * because everything has to be ready before any signal is received*/ @@ -121,7 +123,6 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) } else { lv_page_set_style(new_page, LV_PAGE_STYLE_BG, th->style.page.bg); lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, th->style.page.scrl); - } lv_page_set_style(new_page, LV_PAGE_STYLE_SB, th->style.page.sb); } else { @@ -132,15 +133,15 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) } else { lv_page_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->scrl = lv_cont_create(new_page, copy_ext->scrl); + ext->scrl = lv_cont_create(new_page, copy_ext->scrl); lv_obj_set_signal_cb(ext->scrl, lv_page_scrollable_signal); lv_page_set_sb_mode(new_page, copy_ext->sb.mode); lv_page_set_arrow_scroll(new_page, copy_ext->arrow_scroll); - lv_page_set_style(new_page, LV_PAGE_STYLE_BG, lv_page_get_style(copy, LV_PAGE_STYLE_BG)); - lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy, LV_PAGE_STYLE_SCRL)); + lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, + lv_page_get_style(copy, LV_PAGE_STYLE_SCRL)); lv_page_set_style(new_page, LV_PAGE_STYLE_SB, lv_page_get_style(copy, LV_PAGE_STYLE_SB)); /* Add the signal function only if 'scrolling' is created @@ -183,8 +184,10 @@ void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode) lv_page_ext_t * ext = lv_obj_get_ext_attr(page); if(ext->sb.mode == sb_mode) return; - if(sb_mode == LV_SB_MODE_HIDE) ext->sb.mode |= LV_SB_MODE_HIDE; /*Set the hidden flag*/ - else if(sb_mode == LV_SB_MODE_UNHIDE) ext->sb.mode &= (~LV_SB_MODE_HIDE); /*Clear the hidden flag*/ + if(sb_mode == LV_SB_MODE_HIDE) + ext->sb.mode |= LV_SB_MODE_HIDE; /*Set the hidden flag*/ + else if(sb_mode == LV_SB_MODE_UNHIDE) + ext->sb.mode &= (~LV_SB_MODE_HIDE); /*Clear the hidden flag*/ else { if(ext->sb.mode & LV_SB_MODE_HIDE) sb_mode |= LV_SB_MODE_HIDE; ext->sb.mode = sb_mode; @@ -198,25 +201,27 @@ void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode) } /** - * Enable/Disable scrolling with arrows if the page is in group (arrows: LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) + * Enable/Disable scrolling with arrows if the page is in group (arrows: + * LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) * @param page pointer to a page object * @param en true: enable scrolling with arrows */ void lv_page_set_arrow_scroll(lv_obj_t * page, bool en) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - ext->arrow_scroll = en ? 1 : 0; + ext->arrow_scroll = en ? 1 : 0; } /** - * Enable the scroll propagation feature. If enabled then the page will move its parent if there is no more space to scroll. + * Enable the scroll propagation feature. If enabled then the page will move its parent if there is + * no more space to scroll. * @param page pointer to a Page * @param en true or false to enable/disable scroll propagation */ void lv_page_set_scroll_propagation(lv_obj_t * page, bool en) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - ext->scroll_prop = en ? 1 : 0; + ext->scroll_prop = en ? 1 : 0; } /** @@ -226,7 +231,7 @@ void lv_page_set_scroll_propagation(lv_obj_t * page, bool en) */ void lv_page_set_edge_flash(lv_obj_t * page, bool en) { - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.enabled = en ? 1 : 0; } @@ -241,12 +246,8 @@ void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style lv_page_ext_t * ext = lv_obj_get_ext_attr(page); switch(type) { - case LV_PAGE_STYLE_BG: - lv_obj_set_style(page, style); - break; - case LV_PAGE_STYLE_SCRL: - lv_obj_set_style(ext->scrl, style); - break; + case LV_PAGE_STYLE_BG: lv_obj_set_style(page, style); break; + case LV_PAGE_STYLE_SCRL: lv_obj_set_style(ext->scrl, style); break; case LV_PAGE_STYLE_SB: ext->sb.style = style; lv_area_set_height(&ext->sb.hor_area, ext->sb.style->body.padding.inner); @@ -255,9 +256,7 @@ void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style lv_obj_refresh_ext_size(page); lv_obj_invalidate(page); break; - case LV_PAGE_STYLE_EDGE_FLASH: - ext->edge_flash.style = style; - break; + case LV_PAGE_STYLE_EDGE_FLASH: ext->edge_flash.style = style; break; } } @@ -328,12 +327,11 @@ bool lv_page_get_edge_flash(lv_obj_t * page) */ lv_coord_t lv_page_get_fit_width(lv_obj_t * page) { - lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - return lv_obj_get_width(page) - - bg_style->body.padding.left - bg_style->body.padding.right - - scrl_style->body.padding.left - scrl_style->body.padding.right; + return lv_obj_get_width(page) - bg_style->body.padding.left - bg_style->body.padding.right - + scrl_style->body.padding.left - scrl_style->body.padding.right; } /** @@ -343,12 +341,11 @@ lv_coord_t lv_page_get_fit_width(lv_obj_t * page) */ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) { - lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - return lv_obj_get_height(page) - - bg_style->body.padding.top - bg_style->body.padding.bottom - - scrl_style->body.padding.top - scrl_style->body.padding.bottom; + return lv_obj_get_height(page) - bg_style->body.padding.top - bg_style->body.padding.bottom - + scrl_style->body.padding.top - scrl_style->body.padding.bottom; } /** @@ -359,25 +356,15 @@ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) * */ lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); switch(type) { - case LV_PAGE_STYLE_BG: - style = lv_obj_get_style(page); - break; - case LV_PAGE_STYLE_SCRL: - style = lv_obj_get_style(ext->scrl); - break; - case LV_PAGE_STYLE_SB: - style = ext->sb.style; - break; - case LV_PAGE_STYLE_EDGE_FLASH: - style = ext->edge_flash.style; - break; - default: - style = NULL; - break; + case LV_PAGE_STYLE_BG: style = lv_obj_get_style(page); break; + case LV_PAGE_STYLE_SCRL: style = lv_obj_get_style(ext->scrl); break; + case LV_PAGE_STYLE_SB: style = ext->sb.style; break; + case LV_PAGE_STYLE_EDGE_FLASH: style = ext->edge_flash.style; break; + default: style = NULL; break; } return style; @@ -393,25 +380,29 @@ lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) * @param edge Edge to check * @return true if the page is on the specified edge */ -bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge) { - lv_style_t * page_style = lv_obj_get_style(page); - lv_obj_t * scrl = lv_page_get_scrl(page); - lv_area_t page_coords; - lv_area_t scrl_coords; - - lv_obj_get_coords(scrl, &scrl_coords); - lv_obj_get_coords(page, &page_coords); - - if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) - return true; - else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) - return true; - else if(edge == LV_PAGE_EDGE_LEFT && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) - return true; - else if(edge == LV_PAGE_EDGE_RIGHT && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) - return true; - - return false; +bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge) +{ + lv_style_t * page_style = lv_obj_get_style(page); + lv_obj_t * scrl = lv_page_get_scrl(page); + lv_area_t page_coords; + lv_area_t scrl_coords; + + lv_obj_get_coords(scrl, &scrl_coords); + lv_obj_get_coords(page, &page_coords); + + if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) + return true; + else if(edge == LV_PAGE_EDGE_BOTTOM && + scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) + return true; + else if(edge == LV_PAGE_EDGE_LEFT && + scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) + return true; + else if(edge == LV_PAGE_EDGE_RIGHT && + scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) + return true; + + return false; } /** @@ -448,53 +439,49 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos); #endif - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); /*If obj is higher then the page focus where the "error" is smaller*/ - lv_coord_t obj_y = obj->coords.y1 - ext->scrl->coords.y1; - lv_coord_t obj_h = lv_obj_get_height(obj); + lv_coord_t obj_y = obj->coords.y1 - ext->scrl->coords.y1; + lv_coord_t obj_h = lv_obj_get_height(obj); lv_coord_t scrlable_y = lv_obj_get_y(ext->scrl); - lv_coord_t page_h = lv_obj_get_height(page); + lv_coord_t page_h = lv_obj_get_height(page); lv_coord_t top_err = -(scrlable_y + obj_y); lv_coord_t bot_err = scrlable_y + obj_y + obj_h - page_h; /*Out of the page on the top*/ - if((obj_h <= page_h && top_err > 0) || - (obj_h > page_h && top_err < bot_err)) { + if((obj_h <= page_h && top_err > 0) || (obj_h > page_h && top_err < bot_err)) { /*Calculate a new position and let some space above*/ scrlable_y = -(obj_y - style_scrl->body.padding.top - style->body.padding.top); scrlable_y += style_scrl->body.padding.top; } /*Out of the page on the bottom*/ - else if((obj_h <= page_h && bot_err > 0) || - (obj_h > page_h && top_err >= bot_err)) { + else if((obj_h <= page_h && bot_err > 0) || (obj_h > page_h && top_err >= bot_err)) { /*Calculate a new position and let some space below*/ - scrlable_y = -(obj_y + style_scrl->body.padding.bottom+ style->body.padding.bottom); + scrlable_y = -(obj_y + style_scrl->body.padding.bottom + style->body.padding.bottom); scrlable_y -= style_scrl->body.padding.bottom; scrlable_y += page_h - obj_h; } /*If obj is wider then the page focus where the "error" is smaller*/ - lv_coord_t obj_x = obj->coords.x1 - ext->scrl->coords.x1; - lv_coord_t obj_w = lv_obj_get_width(obj); + lv_coord_t obj_x = obj->coords.x1 - ext->scrl->coords.x1; + lv_coord_t obj_w = lv_obj_get_width(obj); lv_coord_t scrlable_x = lv_obj_get_x(ext->scrl); - lv_coord_t page_w = lv_obj_get_width(page); + lv_coord_t page_w = lv_obj_get_width(page); - lv_coord_t left_err = -(scrlable_x + obj_x); + lv_coord_t left_err = -(scrlable_x + obj_x); lv_coord_t right_err = scrlable_x + obj_x + obj_w - page_w; /*Out of the page on the left*/ - if((obj_w <= page_w && left_err > 0) || - (obj_w > page_w && left_err < right_err)) { + if((obj_w <= page_w && left_err > 0) || (obj_w > page_w && left_err < right_err)) { /*Calculate a new position and let some space above*/ - scrlable_x = -(obj_x - style_scrl->body.padding.left- style->body.padding.left); + scrlable_x = -(obj_x - style_scrl->body.padding.left - style->body.padding.left); scrlable_x += style_scrl->body.padding.left; } /*Out of the page on the rigth*/ - else if((obj_w <= page_w && right_err > 0) || - (obj_w > page_w && left_err >= right_err)) { + else if((obj_w <= page_w && right_err > 0) || (obj_w > page_w && left_err >= right_err)) { /*Calculate a new position and let some space below*/ scrlable_x = -(obj_x + style_scrl->body.padding.right + style->body.padding.right); scrlable_x -= style_scrl->body.padding.right; @@ -508,20 +495,20 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) } else { lv_anim_t a; a.act_time = 0; - a.start = lv_obj_get_y(ext->scrl); - a.end = scrlable_y; - a.time = anim_time; - a.end_cb = NULL; + a.start = lv_obj_get_y(ext->scrl); + a.end = scrlable_y; + a.time = anim_time; + a.end_cb = NULL; a.playback = 0; - a.repeat = 0; - a.var = ext->scrl; - a.path = lv_anim_path_linear; - a.fp = (lv_anim_fp_t) lv_obj_set_y; + a.repeat = 0; + a.var = ext->scrl; + a.path = lv_anim_path_linear; + a.fp = (lv_anim_fp_t)lv_obj_set_y; lv_anim_create(&a); a.start = lv_obj_get_x(ext->scrl); - a.end = scrlable_x; - a.fp = (lv_anim_fp_t) lv_obj_set_x; + a.end = scrlable_x; + a.fp = (lv_anim_fp_t)lv_obj_set_x; lv_anim_create(&a); #endif } @@ -538,18 +525,18 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) #if LV_USE_ANIMATION lv_anim_t a; - a.var = scrl; - a.start = lv_obj_get_x(scrl); - a.end = a.start + dist; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = LV_PAGE_SCROLL_ANIM_TIME; - a.playback = 0; + a.var = scrl; + a.start = lv_obj_get_x(scrl); + a.end = a.start + dist; + a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = LV_PAGE_SCROLL_ANIM_TIME; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #else lv_obj_set_x(scrl, lv_obj_get_x(scrl) + dist); @@ -567,18 +554,18 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) #if LV_USE_ANIMATION lv_anim_t a; - a.var = scrl; - a.start = lv_obj_get_y(scrl); - a.end = a.start + dist; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = LV_PAGE_SCROLL_ANIM_TIME; - a.playback = 0; + a.var = scrl; + a.start = lv_obj_get_y(scrl); + a.end = a.start + dist; + a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = LV_PAGE_SCROLL_ANIM_TIME; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #else lv_obj_set_y(scrl, lv_obj_get_y(scrl) + dist); @@ -596,24 +583,23 @@ void lv_page_start_edge_flash(lv_obj_t * page) lv_page_ext_t * ext = lv_obj_get_ext_attr(page); if(ext->edge_flash.enabled) { lv_anim_t a; - a.var = page; - a.start = 0; - a.end = LV_PAGE_END_FLASH_SIZE; - a.fp = (lv_anim_fp_t)edge_flash_anim; - a.path = lv_anim_path_linear; - a.end_cb = edge_flash_anim_end; - a.act_time = 0; - a.time = LV_PAGE_END_ANIM_TIME; - a.playback = 1; + a.var = page; + a.start = 0; + a.end = LV_PAGE_END_FLASH_SIZE; + a.fp = (lv_anim_fp_t)edge_flash_anim; + a.path = lv_anim_path_linear; + a.end_cb = edge_flash_anim_end; + a.act_time = 0; + a.time = LV_PAGE_END_ANIM_TIME; + a.playback = 1; a.playback_pause = LV_PAGE_END_ANIM_WAIT_TIME; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); } #endif } - /********************** * STATIC FUNCTIONS **********************/ @@ -634,23 +620,23 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo return ancestor_design(page, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { /*Draw without border*/ - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_coord_t border_width_tmp = style->body.border.width; - style->body.border.width = 0; + lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_coord_t border_width_tmp = style->body.border.width; + style->body.border.width = 0; lv_draw_rect(&page->coords, mask, style, lv_obj_get_opa_scale(page)); style->body.border.width = border_width_tmp; } else if(mode == LV_DESIGN_DRAW_POST) { /*Draw the scroll bars finally*/ /*Draw only a border*/ - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_coord_t shadow_width_tmp = style->body.shadow.width; - lv_opa_t opa_tmp = style->body.opa; - style->body.shadow.width = 0; - style->body.opa = LV_OPA_TRANSP; + lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_coord_t shadow_width_tmp = style->body.shadow.width; + lv_opa_t opa_tmp = style->body.opa; + style->body.shadow.width = 0; + style->body.opa = LV_OPA_TRANSP; lv_draw_rect(&page->coords, mask, style, lv_obj_get_opa_scale(page)); style->body.shadow.width = shadow_width_tmp; - style->body.opa = opa_tmp; + style->body.opa = opa_tmp; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); @@ -676,7 +662,6 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page)); } - lv_coord_t page_w = lv_obj_get_width(page); lv_coord_t page_h = lv_obj_get_height(page); lv_area_t flash_area; @@ -686,27 +671,25 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo flash_area.x2 = page->coords.x2 + page_w; flash_area.y1 = page->coords.y1 - 3 * page_w + ext->edge_flash.state; flash_area.y2 = page->coords.y1 + ext->edge_flash.state; - } - else if(ext->edge_flash.bottom_ip) { + } else if(ext->edge_flash.bottom_ip) { flash_area.x1 = page->coords.x1 - page_w; flash_area.x2 = page->coords.x2 + page_w; flash_area.y1 = page->coords.y2 - ext->edge_flash.state; flash_area.y2 = page->coords.y2 + 3 * page_w - ext->edge_flash.state; - } - else if(ext->edge_flash.right_ip) { + } else if(ext->edge_flash.right_ip) { flash_area.x1 = page->coords.x2 - ext->edge_flash.state; flash_area.x2 = page->coords.x2 + 3 * page_h - ext->edge_flash.state; flash_area.y1 = page->coords.y1 - page_h; flash_area.y2 = page->coords.y2 + page_h; - } - else if(ext->edge_flash.left_ip) { + } else if(ext->edge_flash.left_ip) { flash_area.x1 = page->coords.x1 - 3 * page_h + ext->edge_flash.state; flash_area.x2 = page->coords.x1 + ext->edge_flash.state; flash_area.y1 = page->coords.y1 - page_h; flash_area.y2 = page->coords.y2 + page_h; } - if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip || ext->edge_flash.bottom_ip) { + if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip || + ext->edge_flash.bottom_ip) { lv_style_t flash_style; lv_style_copy(&flash_style, ext->edge_flash.style); flash_style.body.radius = LV_RADIUS_CIRCLE; @@ -714,7 +697,6 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo flash_style.body.opa = opa; lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page)); } - } return true; @@ -740,29 +722,29 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo * the background object is not visible (transparent) * then "activate" the style of the scrollable*/ lv_style_t * style_scrl_ori = lv_obj_get_style(scrl); - lv_obj_t * page = lv_obj_get_parent(scrl); - lv_style_t * style_page = lv_obj_get_style(page); - lv_group_t * g = lv_obj_get_group(page); - if((style_page->body.opa == LV_OPA_TRANSP) && style_page->body.border.width == 0) { /*Is the background visible?*/ + lv_obj_t * page = lv_obj_get_parent(scrl); + lv_style_t * style_page = lv_obj_get_style(page); + lv_group_t * g = lv_obj_get_group(page); + if((style_page->body.opa == LV_OPA_TRANSP) && + style_page->body.border.width == 0) { /*Is the background visible?*/ if(lv_group_get_focused(g) == page) { lv_style_t * style_mod; style_mod = lv_group_mod_style(g, style_scrl_ori); /*If still not visible modify the style a littel bit*/ if((style_mod->body.opa == LV_OPA_TRANSP) && style_mod->body.border.width == 0) { - style_mod->body.opa = LV_OPA_50; + style_mod->body.opa = LV_OPA_50; style_mod->body.border.width = 1; - style_mod = lv_group_mod_style(g, style_mod); + style_mod = lv_group_mod_style(g, style_mod); } - - scrl->style_p = style_mod; /*Temporally change the style to the activated */ + scrl->style_p = style_mod; /*Temporally change the style to the activated */ } } #endif ancestor_design(scrl, mask, mode); #if LV_USE_GROUP - scrl->style_p = style_scrl_ori; /*Revert the style*/ + scrl->style_p = style_scrl_ori; /*Revert the style*/ #endif } else if(mode == LV_DESIGN_DRAW_POST) { ancestor_design(scrl, mask, mode); @@ -827,31 +809,39 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { /*Ensure ext. size for the scrollbars if they are out of the page*/ - if(page->ext_size < (-ext->sb.style->body.padding.right)) page->ext_size = -ext->sb.style->body.padding.right; - if(page->ext_size < (-ext->sb.style->body.padding.bottom)) page->ext_size = -ext->sb.style->body.padding.bottom; + if(page->ext_size < (-ext->sb.style->body.padding.right)) + page->ext_size = -ext->sb.style->body.padding.right; + if(page->ext_size < (-ext->sb.style->body.padding.bottom)) + page->ext_size = -ext->sb.style->body.padding.bottom; } else if(sign == LV_SIGNAL_CONTROL) { - uint32_t c = *((uint32_t *) param); + uint32_t c = *((uint32_t *)param); if((c == LV_GROUP_KEY_DOWN) && ext->arrow_scroll) { - lv_page_scroll_ver(page, - lv_obj_get_height(page) / 4); + lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4); } else if((c == LV_GROUP_KEY_UP) && ext->arrow_scroll) { lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); } else if((c == LV_GROUP_KEY_RIGHT) && ext->arrow_scroll) { - /*If the page can't be scrolled horizontally because it's not wide enough then scroll it vertically*/ - if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) lv_page_scroll_ver(page, - lv_obj_get_height(page) / 4); - else lv_page_scroll_hor(page, - lv_obj_get_width(page) / 4); + /*If the page can't be scrolled horizontally because it's not wide enough then scroll it + * vertically*/ + if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) + lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4); + else + lv_page_scroll_hor(page, -lv_obj_get_width(page) / 4); } else if((c == LV_GROUP_KEY_LEFT) && ext->arrow_scroll) { - /*If the page can't be scrolled horizontally because it's not wide enough then scroll it vertically*/ - if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); - else lv_page_scroll_hor(page, lv_obj_get_width(page) / 4); + /*If the page can't be scrolled horizontally because it's not wide enough then scroll it + * vertically*/ + if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) + lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); + else + lv_page_scroll_hor(page, lv_obj_get_width(page) / 4); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = lv_page_get_arrow_scroll(page); + *editable = lv_page_get_arrow_scroll(page); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_page"; @@ -875,8 +865,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi res = ancestor_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * page = lv_obj_get_parent(scrl); - lv_style_t * page_style = lv_obj_get_style(page); + lv_obj_t * page = lv_obj_get_parent(scrl); + lv_style_t * page_style = lv_obj_get_style(page); lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page); if(sign == LV_SIGNAL_CORD_CHG) { @@ -884,35 +874,40 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi * (Do not let its edge inner then its parent respective edge)*/ lv_coord_t new_x = lv_obj_get_x(scrl); lv_coord_t new_y = lv_obj_get_y(scrl); - bool refr_x = false; - bool refr_y = false; + bool refr_x = false; + bool refr_y = false; lv_area_t page_coords; lv_area_t scrl_coords; lv_obj_get_coords(scrl, &scrl_coords); lv_obj_get_coords(page, &page_coords); - lv_area_t * ori_coords = (lv_area_t *) param; - lv_coord_t diff_x = scrl->coords.x1 - ori_coords->x1; - lv_coord_t diff_y = scrl->coords.y1 - ori_coords->y1; - lv_coord_t hpad = page_style->body.padding.left + page_style->body.padding.right; - lv_coord_t vpad = page_style->body.padding.top + page_style->body.padding.bottom; + lv_area_t * ori_coords = (lv_area_t *)param; + lv_coord_t diff_x = scrl->coords.x1 - ori_coords->x1; + lv_coord_t diff_y = scrl->coords.y1 - ori_coords->y1; + lv_coord_t hpad = page_style->body.padding.left + page_style->body.padding.right; + lv_coord_t vpad = page_style->body.padding.top + page_style->body.padding.bottom; lv_obj_t * page_parent = lv_obj_get_parent(page); lv_indev_t * indev = lv_indev_get_act(); lv_point_t drag_vect; lv_indev_get_vect(indev, &drag_vect); - - /* Start the scroll propagation if there is drag vector on the indev, but the drag is not started yet - * and the scrollable is in a corner. It will enable the scroll propagation only when a new scroll begins and not - * when the scrollable is already being scrolled.*/ - if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && lv_indev_is_dragging(indev) == false) { - if(((drag_vect.y > 0 && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) || - (drag_vect.y < 0 && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) && - ((drag_vect.x > 0 && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) || - (drag_vect.x < 0 && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) { - - if(lv_obj_get_parent(page_parent) != NULL) { /*Do not propagate the scroll to a screen*/ + /* Start the scroll propagation if there is drag vector on the indev, but the drag is not + * started yet and the scrollable is in a corner. It will enable the scroll propagation only + * when a new scroll begins and not when the scrollable is already being scrolled.*/ + if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && + lv_indev_is_dragging(indev) == false) { + if(((drag_vect.y > 0 && + scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) || + (drag_vect.y < 0 && + scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) && + ((drag_vect.x > 0 && + scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) || + (drag_vect.x < 0 && + scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) { + + if(lv_obj_get_parent(page_parent) != + NULL) { /*Do not propagate the scroll to a screen*/ page_ext->scroll_prop_ip = 1; } } @@ -921,34 +916,36 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi /*scrollable width smaller then page width? -> align to left*/ if(lv_area_get_width(&scrl_coords) + hpad <= lv_area_get_width(&page_coords)) { if(scrl_coords.x1 != page_coords.x1 + page_style->body.padding.left) { - new_x = page_style->body.padding.left; + new_x = page_style->body.padding.left; refr_x = true; } } else { - /*If the scroll propagation is in progress revert the original coordinates (don't let the page scroll)*/ + /*If the scroll propagation is in progress revert the original coordinates (don't let + * the page scroll)*/ if(page_ext->scroll_prop_ip) { - if(drag_vect.x == diff_x) { /*`scrl` is bouncing: drag pos. it somewhere and here it is reverted. Handle only the pos. because of drag*/ - new_x = ori_coords->x1 - page_coords.x1; + if(drag_vect.x == diff_x) { /*`scrl` is bouncing: drag pos. it somewhere and here it + is reverted. Handle only the pos. because of drag*/ + new_x = ori_coords->x1 - page_coords.x1; refr_x = true; } } /*The edges of the scrollable can not be in the page (minus hpad) */ - else if(scrl_coords.x2 < page_coords.x2 - page_style->body.padding.right) { - new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) - page_style->body.padding.right; /* Right align */ + else if(scrl_coords.x2 < page_coords.x2 - page_style->body.padding.right) { + new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) - + page_style->body.padding.right; /* Right align */ refr_x = true; - if(page_ext->edge_flash.enabled && - page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && - page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { + if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && + page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && + page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.right_ip = 1; } - } - else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) { - new_x = page_style->body.padding.left; /*Left align*/ + } else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) { + new_x = page_style->body.padding.left; /*Left align*/ refr_x = true; - if(page_ext->edge_flash.enabled && - page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && - page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { + if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && + page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && + page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.left_ip = 1; } @@ -958,34 +955,36 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi /*scrollable height smaller then page height? -> align to top*/ if(lv_area_get_height(&scrl_coords) + vpad <= lv_area_get_height(&page_coords)) { if(scrl_coords.y1 != page_coords.y1 + page_style->body.padding.top) { - new_y = page_style->body.padding.top; + new_y = page_style->body.padding.top; refr_y = true; } } else { - /*If the scroll propagation is in progress revert the original coordinates (don't let the page scroll)*/ + /*If the scroll propagation is in progress revert the original coordinates (don't let + * the page scroll)*/ if(page_ext->scroll_prop_ip) { - if(drag_vect.y == diff_y) { /*`scrl` is bouncing: drag pos. it somewhere and here it is reverted. Handle only the pos. because of drag*/ - new_y = ori_coords->y1 - page_coords.y1; + if(drag_vect.y == diff_y) { /*`scrl` is bouncing: drag pos. it somewhere and here it + is reverted. Handle only the pos. because of drag*/ + new_y = ori_coords->y1 - page_coords.y1; refr_y = true; } } /*The edges of the scrollable can not be in the page (minus vpad) */ else if(scrl_coords.y2 < page_coords.y2 - page_style->body.padding.bottom) { - new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) - page_style->body.padding.bottom; /* Bottom align */ + new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) - + page_style->body.padding.bottom; /* Bottom align */ refr_y = true; - if(page_ext->edge_flash.enabled && - page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && - page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { + if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && + page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && + page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.bottom_ip = 1; } - } - else if(scrl_coords.y1 > page_coords.y1 + page_style->body.padding.top) { - new_y = page_style->body.padding.top; /*Top align*/ + } else if(scrl_coords.y1 > page_coords.y1 + page_style->body.padding.top) { + new_y = page_style->body.padding.top; /*Top align*/ refr_y = true; - if(page_ext->edge_flash.enabled && - page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && - page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { + if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && + page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && + page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.top_ip = 1; } @@ -1002,15 +1001,14 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi } lv_page_sb_refresh(page); - } - else if(sign == LV_SIGNAL_DRAG_END) { + } else if(sign == LV_SIGNAL_DRAG_END) { /*Scroll propagation is finished on drag end*/ page_ext->scroll_prop_ip = 0; /*Hide scrollbars if required*/ if(page_ext->sb.mode == LV_SB_MODE_DRAG) { - lv_disp_t * disp = lv_obj_get_disp(page); + lv_disp_t * disp = lv_obj_get_disp(page); lv_area_t sb_area_tmp; if(page_ext->sb.hor_draw) { lv_area_copy(&sb_area_tmp, &page_ext->sb.hor_area); @@ -1021,7 +1019,7 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi lv_inv_area(disp, &sb_area_tmp); page_ext->sb.hor_draw = 0; } - if(page_ext->sb.ver_draw) { + if(page_ext->sb.ver_draw) { lv_area_copy(&sb_area_tmp, &page_ext->sb.ver_area); sb_area_tmp.x1 += page->coords.x1; sb_area_tmp.y1 += page->coords.y1; @@ -1036,7 +1034,6 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi return res; } - /** * Propagate the input device related event of the scrollable to the parent page background * It is used by default if the scrollable's event is not specified @@ -1048,18 +1045,11 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) { lv_obj_t * page = lv_obj_get_parent(scrl); - if(event == LV_EVENT_PRESSED || - event == LV_EVENT_PRESSING || - event == LV_EVENT_PRESS_LOST || - event == LV_EVENT_RELEASED || - event == LV_EVENT_SHORT_CLICKED || - event == LV_EVENT_LONG_PRESSED || - event == LV_EVENT_LONG_PRESSED_REPEAT || - event == LV_EVENT_LONG_HOVER_IN || - event == LV_EVENT_LONG_HOVER_OUT || - event == LV_EVENT_FOCUSED || - event == LV_EVENT_DEFOCUSED) - { + if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST || + event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || + event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || + event == LV_EVENT_LONG_HOVER_IN || event == LV_EVENT_LONG_HOVER_OUT || + event == LV_EVENT_FOCUSED || event == LV_EVENT_DEFOCUSED) { lv_event_send(page, event, lv_event_get_data()); } } @@ -1071,20 +1061,22 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) static void lv_page_sb_refresh(lv_obj_t * page) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - lv_style_t * style = lv_obj_get_style(page); - lv_obj_t * scrl = ext->scrl; + lv_style_t * style = lv_obj_get_style(page); + lv_obj_t * scrl = ext->scrl; lv_coord_t size_tmp; lv_coord_t scrl_w = lv_obj_get_width(scrl); - lv_coord_t scrl_h = lv_obj_get_height(scrl); - lv_coord_t obj_w = lv_obj_get_width(page); - lv_coord_t obj_h = lv_obj_get_height(page); + lv_coord_t scrl_h = lv_obj_get_height(scrl); + lv_coord_t obj_w = lv_obj_get_width(page); + lv_coord_t obj_h = lv_obj_get_height(page); /*Always let 'scrollbar width' padding above, under, left and right to the scrollbars * else: * - horizontal and vertical scrollbars can overlap on the corners * - if the page has radius the scrollbar can be out of the radius */ - lv_coord_t sb_hor_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right); - lv_coord_t sb_ver_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom); + lv_coord_t sb_hor_pad = + LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right); + lv_coord_t sb_ver_pad = + LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_OFF) return; @@ -1094,7 +1086,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) } /*Invalidate the current (old) scrollbar areas*/ - lv_disp_t * disp = lv_obj_get_disp(page); + lv_disp_t * disp = lv_obj_get_disp(page); lv_area_t sb_area_tmp; if(ext->sb.hor_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.hor_area); @@ -1104,7 +1096,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y2 += page->coords.y1; lv_inv_area(disp, &sb_area_tmp); } - if(ext->sb.ver_draw != 0) { + if(ext->sb.ver_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.ver_area); sb_area_tmp.x1 += page->coords.x1; sb_area_tmp.y1 += page->coords.y1; @@ -1113,48 +1105,61 @@ static void lv_page_sb_refresh(lv_obj_t * page) lv_inv_area(disp, &sb_area_tmp); } - if(ext->sb.mode == LV_SB_MODE_DRAG && lv_indev_is_dragging(lv_indev_get_act()) == false) { ext->sb.hor_draw = 0; ext->sb.ver_draw = 0; return; - } /*Horizontal scrollbar*/ - if(scrl_w <= obj_w - style->body.padding.left - style->body.padding.right) { /*Full sized scroll bar*/ + if(scrl_w <= + obj_w - style->body.padding.left - style->body.padding.right) { /*Full sized scroll bar*/ lv_area_set_width(&ext->sb.hor_area, obj_w - 2 * sb_hor_pad); - lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); - if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0; + lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, + obj_h - ext->sb.style->body.padding.inner - + ext->sb.style->body.padding.bottom); + if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0; } else { - size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + style->body.padding.left + style->body.padding.right); + size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / + (scrl_w + style->body.padding.left + style->body.padding.right); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; - lv_area_set_width(&ext->sb.hor_area, size_tmp); + lv_area_set_width(&ext->sb.hor_area, size_tmp); - lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad + - (-(lv_obj_get_x(scrl) - style->body.padding.left) * (obj_w - size_tmp - 2 * sb_hor_pad)) / - (scrl_w + style->body.padding.left + style->body.padding.right - obj_w), - obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); + lv_area_set_pos( + &ext->sb.hor_area, + sb_hor_pad + + (-(lv_obj_get_x(scrl) - style->body.padding.left) * + (obj_w - size_tmp - 2 * sb_hor_pad)) / + (scrl_w + style->body.padding.left + style->body.padding.right - obj_w), + obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); - if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; + if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; } /*Vertical scrollbar*/ - if(scrl_h <= obj_h - style->body.padding.top - style->body.padding.bottom) { /*Full sized scroll bar*/ - lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad); - lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad); - if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; + if(scrl_h <= + obj_h - style->body.padding.top - style->body.padding.bottom) { /*Full sized scroll bar*/ + lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad); + lv_area_set_pos(&ext->sb.ver_area, + obj_w - ext->sb.style->body.padding.inner - + ext->sb.style->body.padding.right, + sb_ver_pad); + if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; } else { - size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + style->body.padding.top + style->body.padding.bottom); + size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / + (scrl_h + style->body.padding.top + style->body.padding.bottom); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; - lv_area_set_height(&ext->sb.ver_area, size_tmp); + lv_area_set_height(&ext->sb.ver_area, size_tmp); - lv_area_set_pos(&ext->sb.ver_area, obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom, - sb_ver_pad + - (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * (obj_h - size_tmp - 2 * sb_ver_pad)) / - (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h)); + lv_area_set_pos( + &ext->sb.ver_area, + obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom, + sb_ver_pad + + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * + (obj_h - size_tmp - 2 * sb_ver_pad)) / + (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h)); - if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1; + if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1; } /*Invalidate the new scrollbar areas*/ @@ -1166,7 +1171,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) sb_area_tmp.y2 += page->coords.y1; lv_inv_area(disp, &sb_area_tmp); } - if(ext->sb.ver_draw != 0) { + if(ext->sb.ver_draw != 0) { lv_area_copy(&sb_area_tmp, &ext->sb.ver_area); sb_area_tmp.x1 += page->coords.x1; sb_area_tmp.y1 += page->coords.y1; @@ -1178,18 +1183,18 @@ static void lv_page_sb_refresh(lv_obj_t * page) static void edge_flash_anim(void * page, int32_t v) { - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.state = v; lv_obj_invalidate(page); } static void edge_flash_anim_end(void * page) { - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - ext->edge_flash.top_ip = 0; + lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + ext->edge_flash.top_ip = 0; ext->edge_flash.bottom_ip = 0; - ext->edge_flash.left_ip = 0; - ext->edge_flash.right_ip = 0; + ext->edge_flash.left_ip = 0; + ext->edge_flash.right_ip = 0; lv_obj_invalidate(page); } diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index ddf68998f18b..17c7e8ab2c52 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -38,25 +38,24 @@ extern "C" { **********************/ /*Scrollbar modes: shows when should the scrollbars be visible*/ -enum -{ - LV_SB_MODE_OFF = 0x0, /*Never show scrollbars*/ - LV_SB_MODE_ON = 0x1, /*Always show scrollbars*/ - LV_SB_MODE_DRAG = 0x2, /*Show scrollbars when page is being dragged*/ - LV_SB_MODE_AUTO = 0x3, /*Show scrollbars when the scrollable container is large enough to be scrolled*/ - LV_SB_MODE_HIDE = 0x4, /*Hide the scroll bar temporally*/ - LV_SB_MODE_UNHIDE = 0x5, /*Unhide the previously hidden scrollbar. Recover it's type too*/ +enum { + LV_SB_MODE_OFF = 0x0, /*Never show scrollbars*/ + LV_SB_MODE_ON = 0x1, /*Always show scrollbars*/ + LV_SB_MODE_DRAG = 0x2, /*Show scrollbars when page is being dragged*/ + LV_SB_MODE_AUTO = + 0x3, /*Show scrollbars when the scrollable container is large enough to be scrolled*/ + LV_SB_MODE_HIDE = 0x4, /*Hide the scroll bar temporally*/ + LV_SB_MODE_UNHIDE = 0x5, /*Unhide the previously hidden scrollbar. Recover it's type too*/ }; typedef uint8_t lv_sb_mode_t; /*Edges: describes the four edges of the page*/ -enum -{ - LV_PAGE_EDGE_LEFT = 0x0, - LV_PAGE_EDGE_TOP = 0x1, - LV_PAGE_EDGE_RIGHT = 0x2, - LV_PAGE_EDGE_BOTTOM = 0x3 +enum { + LV_PAGE_EDGE_LEFT = 0x0, + LV_PAGE_EDGE_TOP = 0x1, + LV_PAGE_EDGE_RIGHT = 0x2, + LV_PAGE_EDGE_BOTTOM = 0x3 }; typedef uint8_t lv_page_edge_t; @@ -65,28 +64,36 @@ typedef struct { lv_cont_ext_t bg; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * scrl; /*The scrollable object on the background*/ - struct { - lv_style_t *style; /*Style of scrollbars*/ - lv_area_t hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ - lv_area_t ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/ - uint8_t hor_draw :1; /*1: horizontal scrollbar is visible now (Handled by the library)*/ - uint8_t ver_draw :1; /*1: vertical scrollbar is visible now (Handled by the library)*/ - lv_sb_mode_t mode:3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/ + lv_obj_t * scrl; /*The scrollable object on the background*/ + struct + { + lv_style_t * style; /*Style of scrollbars*/ + lv_area_t + hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ + lv_area_t + ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/ + uint8_t hor_draw : 1; /*1: horizontal scrollbar is visible now (Handled by the library)*/ + uint8_t ver_draw : 1; /*1: vertical scrollbar is visible now (Handled by the library)*/ + lv_sb_mode_t mode : 3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/ } sb; - struct { - uint16_t state; /*Store the current size of the edge flash effect*/ - lv_style_t *style; /*Style of edge flash effect (usually homogeneous circle)*/ - uint8_t enabled :1; /*1: Show a flash animation on the edge*/ - uint8_t top_ip :1; /*Used internally to show that top most position is reached (flash is In Progress)*/ - uint8_t bottom_ip :1; /*Used internally to show that bottom most position is reached (flash is In Progress)*/ - uint8_t right_ip :1; /*Used internally to show that right most position is reached (flash is In Progress)*/ - uint8_t left_ip :1; /*Used internally to show that left most position is reached (flash is In Progress)*/ - }edge_flash; - - uint8_t arrow_scroll :1; /*1: Enable scrolling with LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN*/ - uint8_t scroll_prop :1; /*1: Propagate the scrolling the the parent if the edge is reached*/ - uint8_t scroll_prop_ip :1; /*1: Scroll propagation is in progress (used by the library)*/ + struct + { + uint16_t state; /*Store the current size of the edge flash effect*/ + lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ + uint8_t enabled : 1; /*1: Show a flash animation on the edge*/ + uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In + Progress)*/ + uint8_t bottom_ip : 1; /*Used internally to show that bottom most position is reached (flash + is In Progress)*/ + uint8_t right_ip : 1; /*Used internally to show that right most position is reached (flash + is In Progress)*/ + uint8_t left_ip : 1; /*Used internally to show that left most position is reached (flash is + In Progress)*/ + } edge_flash; + + uint8_t arrow_scroll : 1; /*1: Enable scrolling with LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN*/ + uint8_t scroll_prop : 1; /*1: Propagate the scrolling the the parent if the edge is reached*/ + uint8_t scroll_prop_ip : 1; /*1: Scroll propagation is in progress (used by the library)*/ } lv_page_ext_t; enum { @@ -113,7 +120,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy); * Delete all children of the scrl object, without deleting scrl child. * @param obj pointer to an object */ -void lv_page_clean(lv_obj_t *obj); +void lv_page_clean(lv_obj_t * obj); /** * Get the scrollable object of a page @@ -134,14 +141,16 @@ lv_obj_t * lv_page_get_scrl(const lv_obj_t * page); void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode); /** - * Enable/Disable scrolling with arrows if the page is in group (arrows: LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) + * Enable/Disable scrolling with arrows if the page is in group (arrows: + * LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) * @param page pointer to a page object * @param en true: enable scrolling with arrows */ void lv_page_set_arrow_scroll(lv_obj_t * page, bool en); /** - * Enable the scroll propagation feature. If enabled then the page will move its parent if there is no more space to scroll. + * Enable the scroll propagation feature. If enabled then the page will move its parent if there is + * no more space to scroll. * @param page pointer to a Page * @param en true or false to enable/disable scroll propagation */ @@ -154,7 +163,6 @@ void lv_page_set_scroll_propagation(lv_obj_t * page, bool en); */ void lv_page_set_edge_flash(lv_obj_t * page, bool en); - /** * Set the fit policy in all 4 directions separately. * It tell how to change the page size automatically. @@ -164,7 +172,8 @@ void lv_page_set_edge_flash(lv_obj_t * page, bool en); * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) +static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, + lv_fit_t top, lv_fit_t bottom) { lv_cont_set_fit4(lv_page_get_scrl(page), left, right, top, bottom); } @@ -197,7 +206,7 @@ static inline void lv_page_set_scrl_fit(lv_obj_t * page, lv_fit_t fit) * @param page pointer to a page object * @param w the new width of the scrollable (it ha no effect is horizontal fit is enabled) */ -static inline void lv_page_set_scrl_width(lv_obj_t *page, lv_coord_t w) +static inline void lv_page_set_scrl_width(lv_obj_t * page, lv_coord_t w) { lv_obj_set_width(lv_page_get_scrl(page), w); } @@ -207,17 +216,16 @@ static inline void lv_page_set_scrl_width(lv_obj_t *page, lv_coord_t w) * @param page pointer to a page object * @param h the new height of the scrollable (it ha no effect is vertical fit is enabled) */ -static inline void lv_page_set_scrl_height(lv_obj_t *page, lv_coord_t h) +static inline void lv_page_set_scrl_height(lv_obj_t * page, lv_coord_t h) { lv_obj_set_height(lv_page_get_scrl(page), h); - } /** -* Set the layout of the scrollable part of the page -* @param page pointer to a page object -* @param layout a layout from 'lv_cont_layout_t' -*/ + * Set the layout of the scrollable part of the page + * @param page pointer to a page object + * @param layout a layout from 'lv_cont_layout_t' + */ static inline void lv_page_set_scrl_layout(lv_obj_t * page, lv_layout_t layout) { lv_cont_set_layout(lv_page_get_scrl(page), layout); @@ -229,7 +237,7 @@ static inline void lv_page_set_scrl_layout(lv_obj_t * page, lv_layout_t layout) * @param type which style should be set * @param style pointer to a style */ -void lv_page_set_style(lv_obj_t *page, lv_page_style_t type, lv_style_t *style); +void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -242,7 +250,6 @@ void lv_page_set_style(lv_obj_t *page, lv_page_style_t type, lv_style_t *style); */ lv_sb_mode_t lv_page_get_sb_mode(const lv_obj_t * page); - /** * Get the the scrolling with arrows (LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) is enabled or not * @param page pointer to a page object @@ -283,7 +290,7 @@ lv_coord_t lv_page_get_fit_height(lv_obj_t * page); * @param page pointer to a page object * @return the width of the scrollable */ -static inline lv_coord_t lv_page_get_scrl_width(const lv_obj_t *page) +static inline lv_coord_t lv_page_get_scrl_width(const lv_obj_t * page) { return lv_obj_get_width(lv_page_get_scrl(page)); } @@ -293,16 +300,16 @@ static inline lv_coord_t lv_page_get_scrl_width(const lv_obj_t *page) * @param page pointer to a page object * @return the height of the scrollable */ -static inline lv_coord_t lv_page_get_scrl_height(const lv_obj_t *page) +static inline lv_coord_t lv_page_get_scrl_height(const lv_obj_t * page) { return lv_obj_get_height(lv_page_get_scrl(page)); } /** -* Get the layout of the scrollable part of a page -* @param page pointer to page object -* @return the layout from 'lv_cont_layout_t' -*/ + * Get the layout of the scrollable part of a page + * @param page pointer to page object + * @return the layout from 'lv_cont_layout_t' + */ static inline lv_layout_t lv_page_get_scrl_layout(const lv_obj_t * page) { return lv_cont_get_layout(lv_page_get_scrl(page)); @@ -354,20 +361,19 @@ static inline lv_fit_t lv_page_get_scrl_fit_bottom(const lv_obj_t * page) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_page_get_style(const lv_obj_t *page, lv_page_style_t type); +lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type); /*===================== * Other functions *====================*/ - /** * Find whether the page has been scrolled to a certain edge. * @param page Page object * @param edge Edge to check * @return true if the page is on the specified edge */ -bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge); +bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge); /** * Glue the object to the page. After it the page can be moved (dragged) with this object too. @@ -408,10 +414,10 @@ void lv_page_start_edge_flash(lv_obj_t * page); * MACROS **********************/ -#endif /*LV_USE_PAGE*/ +#endif /*LV_USE_PAGE*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_PAGE_H*/ +#endif /*LV_PAGE_H*/ diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index e70628250248..cd365e27cba9 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -18,18 +18,17 @@ * DEFINES *********************/ #ifndef LV_PRELOAD_DEF_ARC_LENGTH -# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ +#define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ #endif #ifndef LV_PRELOAD_DEF_SPIN_TIME -# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ +#define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/ #endif #ifndef LV_PRELOAD_DEF_ANIM -# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC /*animation type*/ +#define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC /*animation type*/ #endif - /********************** * TYPEDEFS **********************/ @@ -57,7 +56,8 @@ static lv_design_cb_t ancestor_design; /** * Create a pre loader object * @param par pointer to an object, it will be the parent of the new pre loader - * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from it + * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from + * it * @return pointer to the created pre loader */ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) @@ -79,13 +79,12 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH; - ext->anim_type = LV_PRELOAD_DEF_ANIM; + ext->anim_type = LV_PRELOAD_DEF_ANIM; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_preload, lv_preload_signal); lv_obj_set_design_cb(new_preload, lv_preload_design); - /*Init the new pre loader pre loader*/ if(copy == NULL) { lv_obj_set_size(new_preload, LV_DPI / 2, LV_DPI / 2); @@ -104,15 +103,14 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing pre loader*/ else { lv_preload_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->arc_length = copy_ext->arc_length; - ext->time = copy_ext->time; + ext->arc_length = copy_ext->arc_length; + ext->time = copy_ext->time; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_preload); } lv_preload_set_animation_type(new_preload, ext->anim_type); - LV_LOG_INFO("preload created"); return new_preload; @@ -159,9 +157,7 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time) void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_t * style) { switch(type) { - case LV_PRELOAD_STYLE_MAIN: - lv_arc_set_style(preload, LV_ARC_STYLE_MAIN, style); - break; + case LV_PRELOAD_STYLE_MAIN: lv_arc_set_style(preload, LV_ARC_STYLE_MAIN, style); break; } } @@ -176,66 +172,63 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); /*delete previous animation*/ - //lv_anim_del(preload, NULL); - switch(type) - { - case LV_PRELOAD_TYPE_FILLSPIN_ARC: - { - ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; - lv_anim_t a; - a.var = preload; - a.start = 0; - a.end = 360; - a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; - a.path = lv_anim_path_ease_in_out; - a.end_cb = NULL; - a.act_time = 0; - a.time = ext->time; - a.playback = 0; - a.playback_pause = 0; - a.repeat = 1; - a.repeat_pause = 0; - lv_anim_create(&a); - - lv_anim_t b; - b.var = preload; - b.start = ext->arc_length; - b.end = 360 - ext->arc_length; - b.fp = (lv_anim_fp_t)lv_preload_set_arc_length; - b.path = lv_anim_path_ease_in_out; - b.end_cb = NULL; - b.act_time = 0; - b.time = ext->time; - b.playback = 1; - b.playback_pause = 0; - b.repeat = 1; - b.repeat_pause = 0; - lv_anim_create(&b); - break; - } - case LV_PRELOAD_TYPE_SPINNING_ARC: - default: - { - ext->anim_type = LV_PRELOAD_TYPE_SPINNING_ARC; - lv_anim_t a; - a.var = preload; - a.start = 0; - a.end = 360; - a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; - a.path = lv_anim_path_ease_in_out; - a.end_cb = NULL; - a.act_time = 0; - a.time = ext->time; - a.playback = 0; - a.playback_pause = 0; - a.repeat = 1; - a.repeat_pause = 0; - lv_anim_create(&a); - break; - } + // lv_anim_del(preload, NULL); + switch(type) { + case LV_PRELOAD_TYPE_FILLSPIN_ARC: { + ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; + lv_anim_t a; + a.var = preload; + a.start = 0; + a.end = 360; + a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; + a.path = lv_anim_path_ease_in_out; + a.end_cb = NULL; + a.act_time = 0; + a.time = ext->time; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 1; + a.repeat_pause = 0; + lv_anim_create(&a); + + lv_anim_t b; + b.var = preload; + b.start = ext->arc_length; + b.end = 360 - ext->arc_length; + b.fp = (lv_anim_fp_t)lv_preload_set_arc_length; + b.path = lv_anim_path_ease_in_out; + b.end_cb = NULL; + b.act_time = 0; + b.time = ext->time; + b.playback = 1; + b.playback_pause = 0; + b.repeat = 1; + b.repeat_pause = 0; + lv_anim_create(&b); + break; + } + case LV_PRELOAD_TYPE_SPINNING_ARC: + default: { + ext->anim_type = LV_PRELOAD_TYPE_SPINNING_ARC; + lv_anim_t a; + a.var = preload; + a.start = 0; + a.end = 360; + a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; + a.path = lv_anim_path_ease_in_out; + a.end_cb = NULL; + a.act_time = 0; + a.time = ext->time; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 1; + a.repeat_pause = 0; + lv_anim_create(&a); + break; + } } -#endif //LV_USE_ANIMATION +#endif // LV_USE_ANIMATION } /*===================== @@ -250,7 +243,6 @@ uint16_t lv_preload_get_arc_length(const lv_obj_t * preload) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); return ext->arc_length; - } /** @@ -274,12 +266,8 @@ lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t t lv_style_t * style = NULL; switch(type) { - case LV_PRELOAD_STYLE_MAIN: - style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); - break; - default: - style = NULL; - break; + case LV_PRELOAD_STYLE_MAIN: style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); break; + default: style = NULL; break; } return style; @@ -307,19 +295,17 @@ lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload) */ void lv_preload_spinner_animation(void * ptr, int32_t val) { - lv_obj_t * preload = ptr; + lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); - int16_t angle_start = val - ext->arc_length / 2 + 180; - int16_t angle_end = angle_start + ext->arc_length; + int16_t angle_start = val - ext->arc_length / 2 + 180; + int16_t angle_end = angle_start + ext->arc_length; angle_start = angle_start % 360; - angle_end = angle_end % 360; + angle_end = angle_end % 360; lv_arc_set_angles(preload, angle_start, angle_end); - } - /********************** * STATIC FUNCTIONS **********************/ @@ -354,8 +340,8 @@ static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_des lv_style_t bg_style; lv_style_copy(&bg_style, &lv_style_plain); - bg_style.body.opa = LV_OPA_TRANSP; - bg_style.body.radius = LV_RADIUS_CIRCLE; + bg_style.body.opa = LV_OPA_TRANSP; + bg_style.body.radius = LV_RADIUS_CIRCLE; bg_style.body.border.color = style->body.border.color; bg_style.body.border.width = style->body.border.width; @@ -372,7 +358,6 @@ static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_des } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -393,13 +378,12 @@ static lv_res_t lv_preload_signal(lv_obj_t * preload, lv_signal_t sign, void * p res = ancestor_signal(preload, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_preload"; diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index b69f45094946..696dc875545e 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -48,15 +48,15 @@ enum { typedef uint8_t lv_preload_type_t; /*Data of pre loader*/ -typedef struct { +typedef struct +{ lv_arc_ext_t arc; /*Ext. of ancestor*/ /*New data for this type */ - uint16_t arc_length; /*Length of the spinning indicator in degree*/ - uint16_t time; /*Time of one round*/ - lv_preload_type_t anim_type; /*Type of the arc animation*/ + uint16_t arc_length; /*Length of the spinning indicator in degree*/ + uint16_t time; /*Time of one round*/ + lv_preload_type_t anim_type; /*Type of the arc animation*/ } lv_preload_ext_t; - /*Styles*/ enum { LV_PRELOAD_STYLE_MAIN, @@ -70,7 +70,8 @@ typedef uint8_t lv_preload_style_t; /** * Create a pre loader objects * @param par pointer to an object, it will be the parent of the new pre loader - * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from it + * @param copy pointer to a pre loader object, if not NULL then the new object will be copied from + * it * @return pointer to the created pre loader */ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy); @@ -103,7 +104,7 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time); * @param type which style should be set * @param style pointer to a style * */ -void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_t *style); +void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_t * style); /** * Set the animation type of a preloadeer. @@ -159,10 +160,10 @@ void lv_preload_spinner_animation(void * ptr, int32_t val); * MACROS **********************/ -#endif /*LV_USE_PRELOAD*/ +#endif /*LV_USE_PRELOAD*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_PRELOAD_H*/ +#endif /*LV_PRELOAD_H*/ diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index d9910e4839b1..5cb3ab7acdee 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -17,15 +17,14 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -# ifndef LV_ROLLER_ANIM_TIME -# define LV_ROLLER_DEF_ANIM_TIME 200 /*ms*/ -# endif +#ifndef LV_ROLLER_ANIM_TIME +#define LV_ROLLER_DEF_ANIM_TIME 200 /*ms*/ +#endif #else -# undef LV_ROLLER_DEF_ANIM_TIME -# define LV_ROLLER_DEF_ANIM_TIME 0 /*No animation*/ +#undef LV_ROLLER_DEF_ANIM_TIME +#define LV_ROLLER_DEF_ANIM_TIME 0 /*No animation*/ #endif - /********************** * TYPEDEFS **********************/ @@ -69,14 +68,15 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_roller); if(new_roller == NULL) return NULL; - if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_roller)); + if(ancestor_scrl_signal == NULL) + ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_roller)); if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_roller); /*Allocate the roller type specific extended data*/ lv_roller_ext_t * ext = lv_obj_allocate_ext_attr(new_roller, sizeof(lv_roller_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/ + ext->ddlist.draw_arrow = 0; /*Do not draw arrow by default*/ /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_roller, lv_roller_signal); @@ -85,8 +85,9 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new roller roller*/ if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_roller); - lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ - lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ + lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ + lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, + LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_DEF_ANIM_TIME); lv_ddlist_set_stay_open(new_roller, true); @@ -102,26 +103,24 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_roller_set_style(new_roller, LV_ROLLER_STYLE_SEL, th->style.roller.sel); } else { /*Refresh the roller's style*/ - lv_obj_refresh_style(new_roller); /*To set scrollable size automatically*/ + lv_obj_refresh_style(new_roller); /*To set scrollable size automatically*/ } } /*Copy an existing roller*/ else { lv_roller_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->inf = copy_ext->inf; + ext->inf = copy_ext->inf; lv_obj_t * scrl = lv_page_get_scrl(new_roller); lv_ddlist_open(new_roller, false); lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal); /*Refresh the roller's style*/ - lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/ + lv_obj_refresh_style(new_roller); /*Refresh the style with new signal function*/ } - LV_LOG_INFO("roller created"); - return new_roller; } @@ -138,7 +137,7 @@ void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf) { lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - if(inf== false) { + if(inf == false) { ext->inf = 0; lv_ddlist_set_options(roller, options); } else { @@ -156,10 +155,9 @@ void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf) lv_mem_free(opt_extra); uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; - ext->ddlist.sel_opt_id = ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt; /*Select the middle page*/ - + ext->ddlist.sel_opt_id = + ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt; /*Select the middle page*/ } - } /** @@ -171,7 +169,8 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align) { lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_mem_assert(ext); - if(ext->ddlist.label == NULL) return; /*Probably the roller is being deleted if the label is NULL.*/ + if(ext->ddlist.label == NULL) + return; /*Probably the roller is being deleted if the label is NULL.*/ lv_label_set_align(ext->ddlist.label, align); } @@ -200,10 +199,11 @@ void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en) */ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt) { - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1; - lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + style_label->text.line_space * n_line_space); + uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1; + lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + + style_label->text.line_space * n_line_space); } /** @@ -215,12 +215,8 @@ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt) void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * style) { switch(type) { - case LV_ROLLER_STYLE_BG: - lv_obj_set_style(roller, style); - break; - case LV_ROLLER_STYLE_SEL: - lv_ddlist_set_style(roller, LV_DDLIST_STYLE_SEL, style); - break; + case LV_ROLLER_STYLE_BG: lv_obj_set_style(roller, style); break; + case LV_ROLLER_STYLE_SEL: lv_ddlist_set_style(roller, LV_DDLIST_STYLE_SEL, style); break; } } @@ -233,7 +229,7 @@ void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * * @param roller pointer to a roller object * @return id of the selected option (0 ... number of option - 1); */ -uint16_t lv_roller_get_selected(const lv_obj_t *roller) +uint16_t lv_roller_get_selected(const lv_obj_t * roller) { lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); if(ext->inf) { @@ -276,12 +272,9 @@ bool lv_roller_get_hor_fit(const lv_obj_t * roller) lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type) { switch(type) { - case LV_ROLLER_STYLE_BG: - return lv_obj_get_style(roller); - case LV_ROLLER_STYLE_SEL: - return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL); - default: - return NULL; + case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller); + case LV_ROLLER_STYLE_SEL: return lv_ddlist_get_style(roller, LV_DDLIST_STYLE_SEL); + default: return NULL; } /*To avoid warning*/ @@ -312,14 +305,16 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_MAIN) { draw_bg(roller, mask); - lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); - lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); + lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); + lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); const lv_font_t * font = style->text.font; - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_coord_t font_h = lv_font_get_height(font); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_coord_t font_h = lv_font_get_height(font); lv_area_t rect_area; - rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; - if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1 --; /*Compensate the two rounding error*/ + rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - + style->text.line_space / 2; + if((font_h & 0x1) && (style->text.line_space & 0x1)) + rect_area.y1--; /*Compensate the two rounding error*/ rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; rect_area.x1 = roller->coords.x1; rect_area.x2 = roller->coords.x2; @@ -328,16 +323,18 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); + lv_coord_t font_h = lv_font_get_height(font); + lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); /*Redraw the text on the selected area with a different color*/ lv_area_t rect_area; - rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; - if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1 --; /*Compensate the two rounding error*/ + rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - + style->text.line_space / 2; + if((font_h & 0x1) && (style->text.line_space & 0x1)) + rect_area.y1--; /*Compensate the two rounding error*/ rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; rect_area.x1 = roller->coords.x1; rect_area.x2 = roller->coords.x2; @@ -361,7 +358,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig lv_style_copy(&new_style, style); new_style.text.color = sel_style->text.color; - new_style.text.opa = sel_style->text.opa; + new_style.text.opa = sel_style->text.opa; lv_draw_label(&ext->ddlist.label->coords, &mask_sel, &new_style, opa_scale, lv_label_get_text(ext->ddlist.label), txt_align, NULL, -1, -1); } @@ -379,7 +376,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig */ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param) { - lv_res_t res = LV_RES_OK; + lv_res_t res = LV_RES_OK; /*Don't let the drop down list to handle the control signals. It works differently*/ if(sign != LV_SIGNAL_CONTROL && sign != LV_SIGNAL_FOCUS && sign != LV_SIGNAL_DEFOCUS) { @@ -389,11 +386,13 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_align_t obj_align = LV_ALIGN_IN_LEFT_MID; + lv_align_t obj_align = LV_ALIGN_IN_LEFT_MID; if(ext->ddlist.label) { lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label); - if(LV_LABEL_ALIGN_CENTER == label_align) obj_align = LV_ALIGN_CENTER; - else if(LV_LABEL_ALIGN_RIGHT == label_align) obj_align = LV_ALIGN_IN_RIGHT_MID; + if(LV_LABEL_ALIGN_CENTER == label_align) + obj_align = LV_ALIGN_CENTER; + else if(LV_LABEL_ALIGN_RIGHT == label_align) + obj_align = LV_ALIGN_IN_RIGHT_MID; } if(sign == LV_SIGNAL_STYLE_CHG) { @@ -407,7 +406,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_CORD_CHG) { if(lv_obj_get_width(roller) != lv_area_get_width(param) || - lv_obj_get_height(roller) != lv_area_get_height(param)) { + lv_obj_get_height(roller) != lv_area_get_height(param)) { lv_ddlist_set_fix_height(roller, lv_obj_get_height(roller)); lv_obj_set_height(lv_page_get_scrl(roller), @@ -420,8 +419,8 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(roller); - bool editing = lv_group_get_editing(g); + lv_group_t * g = lv_obj_get_group(roller); + bool editing = lv_group_get_editing(g); lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ @@ -438,7 +437,9 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; } } else { - ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if ENER wont't be pressed*/ + ext->ddlist.sel_opt_id_ori = + ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if ENER + wont't be pressed*/ } #endif } else if(sign == LV_SIGNAL_DEFOCUS) { @@ -453,13 +454,15 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par char c = *((char *)param); if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { - uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ + uint16_t ori_id = + ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id + 1, true); ext->ddlist.sel_opt_id_ori = ori_id; } } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { if(ext->ddlist.sel_opt_id > 0) { - uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ + uint16_t ori_id = + ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true); ext->ddlist.sel_opt_id_ori = ori_id; } @@ -467,7 +470,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_roller"; @@ -491,40 +494,43 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, res = ancestor_scrl_signal(roller_scrl, sign, param); if(res != LV_RES_OK) return res; - lv_indev_t * indev = lv_indev_get_act(); - int32_t id = -1; - lv_obj_t * roller = lv_obj_get_parent(roller_scrl); + lv_indev_t * indev = lv_indev_get_act(); + int32_t id = -1; + lv_obj_t * roller = lv_obj_get_parent(roller_scrl); lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - if(ext->ddlist.label == NULL) return LV_RES_INV; /*On delete the ddlist signal deletes the label so nothing left to do here*/ + if(ext->ddlist.label == NULL) + return LV_RES_INV; /*On delete the ddlist signal deletes the label so nothing left to do + here*/ lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); if(sign == LV_SIGNAL_DRAG_END) { /*If dragged then align the list to there be an element in the middle*/ - lv_coord_t label_y1 = ext->ddlist.label->coords.y1 - roller->coords.y1; + lv_coord_t label_y1 = ext->ddlist.label->coords.y1 - roller->coords.y1; lv_coord_t label_unit = font_h + style_label->text.line_space; - lv_coord_t mid = (roller->coords.y2 - roller->coords.y1) / 2; - id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit; + lv_coord_t mid = (roller->coords.y2 - roller->coords.y1) / 2; + id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit; if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; - ext->ddlist.sel_opt_id = id; + ext->ddlist.sel_opt_id = id; ext->ddlist.sel_opt_id_ori = id; - res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, &id); + res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return res; - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { /*If picked an option by clicking then set it*/ if(!lv_indev_is_dragging(indev)) { id = ext->ddlist.sel_opt_id; #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(roller); - bool editing = lv_group_get_editing(g); - if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/ + bool editing = lv_group_get_editing(g); + if(editing) + lv_group_set_editing( + g, false); /*In edit mode go to navigate mode if an option is selected*/ #endif } } @@ -571,7 +577,8 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) half_roller.x2 += roller->ext_size; half_roller.y2 = roller->coords.y2 + roller->ext_size; half_roller.y1 = roller->coords.y1 + h / 2; - if((h & 0x1) == 0) half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/ + if((h & 0x1) == 0) + half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/ union_ok = lv_area_intersect(&half_mask, &half_roller, mask); @@ -602,12 +609,12 @@ static void refr_position(lv_obj_t * roller, bool anim_en) #if LV_USE_ANIMATION == 0 anim_en = false; #endif - lv_obj_t * roller_scrl = lv_page_get_scrl(roller); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_obj_t * roller_scrl = lv_page_get_scrl(roller); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_coord_t h = lv_obj_get_height(roller); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t h = lv_obj_get_height(roller); /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. * But without animations do it manually*/ @@ -615,27 +622,28 @@ static void refr_position(lv_obj_t * roller, bool anim_en) inf_normalize(roller_scrl); } - int32_t id = ext->ddlist.sel_opt_id; - lv_coord_t line_y1 = id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; - lv_coord_t new_y = - line_y1 + (h - font_h) / 2; + int32_t id = ext->ddlist.sel_opt_id; + lv_coord_t line_y1 = id * (font_h + style_label->text.line_space) + + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; + lv_coord_t new_y = -line_y1 + (h - font_h) / 2; if(ext->ddlist.anim_time == 0 || anim_en == false) { lv_obj_set_y(roller_scrl, new_y); } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = roller_scrl; - a.start = lv_obj_get_y(roller_scrl); - a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = inf_normalize; - a.act_time = 0; - a.time = ext->ddlist.anim_time; - a.playback = 0; + a.var = roller_scrl; + a.start = lv_obj_get_y(roller_scrl); + a.end = new_y; + a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.path = lv_anim_path_linear; + a.end_cb = inf_normalize; + a.act_time = 0; + a.time = ext->ddlist.anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif } @@ -647,7 +655,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) */ static void inf_normalize(void * roller_scrl) { - lv_obj_t * roller = lv_obj_get_parent(roller_scrl); + lv_obj_t * roller = lv_obj_get_parent(roller_scrl); lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); if(ext->inf) { @@ -655,18 +663,20 @@ static void inf_normalize(void * roller_scrl) ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id % real_id_cnt; - ext->ddlist.sel_opt_id += (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ + ext->ddlist.sel_opt_id += + (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ /*Move to the new id*/ - lv_obj_t * roller_scrl = lv_page_get_scrl(roller); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_obj_t * roller_scrl = lv_page_get_scrl(roller); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_coord_t h = lv_obj_get_height(roller); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t h = lv_obj_get_height(roller); - lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; - lv_coord_t new_y = - line_y1 + (h - font_h) / 2; + lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) + + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; + lv_coord_t new_y = -line_y1 + (h - font_h) / 2; lv_obj_set_y(roller_scrl, new_y); } } diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index d6d751a0128d..ee4a79f2b9c2 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -38,10 +38,11 @@ extern "C" { * TYPEDEFS **********************/ /*Data of roller*/ -typedef struct { +typedef struct +{ lv_ddlist_ext_t ddlist; /*Ext. of ancestor*/ /*New data for this type */ - uint8_t inf :1; /*Infinite*/ + uint8_t inf : 1; /*Infinite*/ } lv_roller_ext_t; enum { @@ -87,14 +88,14 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align); * @param sel_opt id of the selected option (0 ... number of option - 1); * @param anim_en true: set with animation; false set immediately */ -void lv_roller_set_selected(lv_obj_t *roller, uint16_t sel_opt, bool anim_en); +void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en); /** * Set the height to show the given number of rows (options) * @param roller pointer to a roller object * @param row_cnt number of desired visible rows */ -void lv_roller_set_visible_row_count(lv_obj_t *roller, uint8_t row_cnt); +void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt); /** * Enable or disable the horizontal fit to the content @@ -111,7 +112,7 @@ static inline void lv_roller_set_hor_fit(lv_obj_t * roller, lv_fit_t fit) * @param roller pointer to a roller object * @param anim_time: open/close animation time [ms] */ -static inline void lv_roller_set_anim_time(lv_obj_t *roller, uint16_t anim_time) +static inline void lv_roller_set_anim_time(lv_obj_t * roller, uint16_t anim_time) { lv_ddlist_set_anim_time(roller, anim_time); } @@ -122,7 +123,7 @@ static inline void lv_roller_set_anim_time(lv_obj_t *roller, uint16_t anim_time) * @param type which style should be set * @param style pointer to a style */ -void lv_roller_set_style(lv_obj_t *roller, lv_roller_style_t type, lv_style_t *style); +void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -132,7 +133,7 @@ void lv_roller_set_style(lv_obj_t *roller, lv_roller_style_t type, lv_style_t *s * @param roller pointer to a roller object * @return id of the selected option (0 ... number of option - 1); */ -uint16_t lv_roller_get_selected(const lv_obj_t *roller); +uint16_t lv_roller_get_selected(const lv_obj_t * roller); /** * Get the current selected option as a string @@ -140,7 +141,8 @@ uint16_t lv_roller_get_selected(const lv_obj_t *roller); * @param buf pointer to an array to store the string * @param buf_size size of `buf` in bytes. 0: to ignore it. */ -static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, uint16_t buf_size) +static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, + uint16_t buf_size) { lv_ddlist_get_selected_str(roller, buf, buf_size); } @@ -157,7 +159,7 @@ lv_label_align_t lv_roller_get_align(const lv_obj_t * roller); * @param roller pointer to roller object * @return the options separated by '\n'-s (E.g. "Option1\nOption2\nOption3") */ -static inline const char * lv_roller_get_options(const lv_obj_t *roller) +static inline const char * lv_roller_get_options(const lv_obj_t * roller) { return lv_ddlist_get_options(roller); } @@ -177,7 +179,7 @@ static inline uint16_t lv_roller_get_anim_time(const lv_obj_t * roller) * @param roller pointer to a roller object * @return true: auto size enabled; false: manual width settings enabled */ -bool lv_roller_get_hor_fit(const lv_obj_t *roller); +bool lv_roller_get_hor_fit(const lv_obj_t * roller); /** * Get a style of a roller @@ -185,16 +187,16 @@ bool lv_roller_get_hor_fit(const lv_obj_t *roller); * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_roller_get_style(const lv_obj_t *roller, lv_roller_style_t type); +lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type); /********************** * MACROS **********************/ -#endif /*LV_USE_ROLLER*/ +#endif /*LV_USE_ROLLER*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_ROLLER_H*/ +#endif /*LV_ROLLER_H*/ diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index da5fd1557af1..231e6f862646 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -18,8 +18,9 @@ /********************* * DEFINES *********************/ -#define LV_SLIDER_SIZE_MIN 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/ -#define LV_SLIDER_NOT_PRESSED INT16_MIN +#define LV_SLIDER_SIZE_MIN \ + 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/ +#define LV_SLIDER_NOT_PRESSED INT16_MIN /********************** * TYPEDEFS @@ -71,7 +72,7 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->drag_value = LV_SLIDER_NOT_PRESSED; ext->style_knob = &lv_style_pretty; - ext->knob_in = 0; + ext->knob_in = 0; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_slider, lv_slider_signal); @@ -95,16 +96,14 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing slider*/ else { lv_slider_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->style_knob = copy_ext->style_knob; - ext->knob_in = copy_ext->knob_in; + ext->style_knob = copy_ext->style_knob; + ext->knob_in = copy_ext->knob_in; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_slider); } - LV_LOG_INFO("slider created"); - return new_slider; } @@ -138,12 +137,8 @@ void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, lv_style_t * lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); switch(type) { - case LV_SLIDER_STYLE_BG: - lv_bar_set_style(slider, LV_BAR_STYLE_BG, style); - break; - case LV_SLIDER_STYLE_INDIC: - lv_bar_set_style(slider, LV_BAR_STYLE_INDIC, style); - break; + case LV_SLIDER_STYLE_BG: lv_bar_set_style(slider, LV_BAR_STYLE_BG, style); break; + case LV_SLIDER_STYLE_INDIC: lv_bar_set_style(slider, LV_BAR_STYLE_INDIC, style); break; case LV_SLIDER_STYLE_KNOB: ext->style_knob = style; lv_obj_refresh_ext_size(slider); @@ -164,8 +159,10 @@ int16_t lv_slider_get_value(const lv_obj_t * slider) { lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); - if(ext->drag_value != LV_SLIDER_NOT_PRESSED) return ext->drag_value; - else return lv_bar_get_value(slider); + if(ext->drag_value != LV_SLIDER_NOT_PRESSED) + return ext->drag_value; + else + return lv_bar_get_value(slider); } /** @@ -199,22 +196,14 @@ bool lv_slider_get_knob_in(const lv_obj_t * slider) */ lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); switch(type) { - case LV_SLIDER_STYLE_BG: - style = lv_bar_get_style(slider, LV_BAR_STYLE_BG); - break; - case LV_SLIDER_STYLE_INDIC: - style = lv_bar_get_style(slider, LV_BAR_STYLE_INDIC); - break; - case LV_SLIDER_STYLE_KNOB: - style = ext->style_knob; - break; - default: - style = NULL; - break; + case LV_SLIDER_STYLE_BG: style = lv_bar_get_style(slider, LV_BAR_STYLE_BG); break; + case LV_SLIDER_STYLE_INDIC: style = lv_bar_get_style(slider, LV_BAR_STYLE_INDIC); break; + case LV_SLIDER_STYLE_KNOB: style = ext->style_knob; break; + default: style = NULL; break; } return style; @@ -224,7 +213,6 @@ lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type * STATIC FUNCTIONS **********************/ - /** * Handle the drawing related tasks of the sliders * @param slider pointer to an object @@ -245,8 +233,8 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_MAIN) { lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); - lv_style_t * style_bg = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); - lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); + lv_style_t * style_bg = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); + lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); lv_style_t * style_indic = lv_slider_get_style(slider, LV_SLIDER_STYLE_INDIC); lv_opa_t opa_scale = lv_obj_get_opa_scale(slider); @@ -259,36 +247,38 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig lv_area_copy(&area_bg, &slider->coords); /*Be sure at least LV_SLIDER_SIZE_MIN size will remain*/ - lv_coord_t pad_top_bg = style_bg->body.padding.top; + lv_coord_t pad_top_bg = style_bg->body.padding.top; lv_coord_t pad_bottom_bg = style_bg->body.padding.bottom; - lv_coord_t pad_left_bg = style_bg->body.padding.left; - lv_coord_t pad_right_bg = style_bg->body.padding.right; + lv_coord_t pad_left_bg = style_bg->body.padding.left; + lv_coord_t pad_right_bg = style_bg->body.padding.right; if(pad_top_bg + pad_bottom_bg + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { - pad_top_bg = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_top_bg = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; pad_bottom_bg = pad_top_bg; } if(pad_left_bg + pad_right_bg + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { - pad_left_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_left_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; pad_right_bg = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; } - if(ext->knob_in) { /*Enable extra size if the knob is inside */ + if(ext->knob_in) { /*Enable extra size if the knob is inside */ area_bg.x1 += pad_left_bg; area_bg.x2 -= pad_right_bg; area_bg.y1 += pad_top_bg; area_bg.y2 -= pad_bottom_bg; - } else { /*Let space only in the perpendicular directions*/ - area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/ - area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/ + } else { /*Let space only in the perpendicular directions*/ + area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/ + area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/ area_bg.y1 += slider_w > slider_h ? pad_top_bg : 0; /*Pad only for horizontal slider*/ - area_bg.y2 -= slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/ + area_bg.y2 -= + slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/ } #if LV_USE_GROUP == 0 lv_draw_rect(&area_bg, mask, style_bg, lv_obj_get_opa_scale(slider)); #else /* Draw the borders later if the slider is focused. - * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ + * At value = 100% the indicator can cover to whole background and the focused style won't + * be visible*/ if(lv_obj_is_focused(slider)) { lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); @@ -304,16 +294,16 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig lv_area_copy(&area_indic, &area_bg); /*Be sure at least ver pad/hor pad width indicator will remain*/ - lv_coord_t pad_top_indic = style_indic->body.padding.top; + lv_coord_t pad_top_indic = style_indic->body.padding.top; lv_coord_t pad_bottom_indic = style_indic->body.padding.bottom; - lv_coord_t pad_left_indic = style_indic->body.padding.left; - lv_coord_t pad_right_indic = style_indic->body.padding.right; + lv_coord_t pad_left_indic = style_indic->body.padding.left; + lv_coord_t pad_right_indic = style_indic->body.padding.right; if(pad_top_indic + pad_bottom_indic + LV_SLIDER_SIZE_MIN > lv_area_get_height(&area_bg)) { - pad_top_indic = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + pad_top_indic = (lv_area_get_height(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; pad_bottom_indic = pad_top_indic; } - if(pad_left_indic + pad_right_indic + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { - pad_left_indic = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; + if(pad_left_indic + pad_right_indic + LV_SLIDER_SIZE_MIN > lv_area_get_width(&area_bg)) { + pad_left_indic = (lv_area_get_width(&area_bg) - LV_SLIDER_SIZE_MIN) >> 1; pad_right_indic = pad_left_indic; } @@ -333,45 +323,64 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig lv_coord_t indic_w = lv_area_get_width(&area_indic); if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ - lv_coord_t anim_start_x = (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / (max_value - min_value); - lv_coord_t anim_end_x = (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / (max_value - min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - area_indic.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + lv_coord_t anim_start_x = + (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / + (max_value - min_value); + lv_coord_t anim_end_x = + (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / + (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + area_indic.x2 = + anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); } else { - area_indic.x2 = (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); + area_indic.x2 = + (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); } area_indic.x2 = area_indic.x1 + area_indic.x2 - 1; - /*Draw the indicator but don't draw an ugly 1px wide rectangle on the left on min. value*/ - if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + /*Draw the indicator but don't draw an ugly 1px wide rectangle on the left on min. + * value*/ + if(area_indic.x1 != area_indic.x2) + lv_draw_rect(&area_indic, mask, style_indic, opa_scale); } else { lv_coord_t indic_h = lv_area_get_height(&area_indic); if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ - lv_coord_t anim_start_y = (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / (max_value - min_value); - lv_coord_t anim_end_y = (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / (max_value - min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - area_indic.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); + lv_coord_t anim_start_y = + (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / + (max_value - min_value); + lv_coord_t anim_end_y = + (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / + (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + area_indic.y1 = + anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); } else { - area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); + area_indic.y1 = + (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); } area_indic.y1 = area_indic.y2 - area_indic.y1 + 1; - /*Draw the indicator but don't draw an ugly 1px height rectangle on the bottom on min. value*/ - if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + /*Draw the indicator but don't draw an ugly 1px height rectangle on the bottom on min. + * value*/ + if(area_indic.x1 != area_indic.x2) + lv_draw_rect(&area_indic, mask, style_indic, opa_scale); } /*Before the knob add the border if required*/ #if LV_USE_GROUP /* Draw the borders later if the bar is focused. - * At value = 100% the indicator can cover to whole background and the focused style won't be visible*/ + * At value = 100% the indicator can cover to whole background and the focused style won't + * be visible*/ if(lv_obj_is_focused(slider)) { lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); - style_tmp.body.opa = LV_OPA_TRANSP; + style_tmp.body.opa = LV_OPA_TRANSP; style_tmp.body.shadow.width = 0; lv_draw_rect(&area_bg, mask, &style_tmp, opa_scale); } @@ -388,13 +397,21 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } else { if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t w = slider_w - slider_h - 1; - lv_coord_t anim_start_x = (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / (max_value - min_value); - lv_coord_t anim_end_x = (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / (max_value - min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - knob_area.x1 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + lv_coord_t anim_start_x = + (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / + (max_value - min_value); + lv_coord_t anim_end_x = + (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / + (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + knob_area.x1 = + anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); } else { - knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / (max_value - min_value); + knob_area.x1 = + (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / + (max_value - min_value); } knob_area.x1 += slider->coords.x1; @@ -410,13 +427,21 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } else { if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t h = slider_h - slider_w - 1; - lv_coord_t anim_start_x = (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / (max_value - min_value); - lv_coord_t anim_end_x = (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / (max_value - min_value); - - /*Calculate the real position based on `anim_state` (between `anim_start` and `anim_end`)*/ - knob_area.y2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + lv_coord_t anim_start_x = + (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / + (max_value - min_value); + lv_coord_t anim_end_x = + (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / + (max_value - min_value); + + /*Calculate the real position based on `anim_state` (between `anim_start` and + * `anim_end`)*/ + knob_area.y2 = + anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); } else { - knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / (max_value - min_value); + knob_area.y2 = + (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / + (max_value - min_value); } knob_area.y2 = slider->coords.y2 - knob_area.y2; @@ -424,13 +449,11 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } knob_area.x1 = slider->coords.x1; knob_area.x2 = slider->coords.x2; - } lv_draw_rect(&knob_area, mask, style_knob, opa_scale); } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -463,18 +486,26 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par int16_t tmp = 0; if(w > h) { lv_coord_t knob_w = h; - p.x -= slider->coords.x1 + h / 2; /*Modify the point to shift with half knob (important on the start and end)*/ - tmp = (int32_t)((int32_t) p.x * (ext->bar.max_value - ext->bar.min_value + 1)) / (w - knob_w); + p.x -= + slider->coords.x1 + + h / 2; /*Modify the point to shift with half knob (important on the start and end)*/ + tmp = (int32_t)((int32_t)p.x * (ext->bar.max_value - ext->bar.min_value + 1)) / + (w - knob_w); tmp += ext->bar.min_value; } else { lv_coord_t knob_h = w; - p.y -= slider->coords.y1 + w / 2; /*Modify the point to shift with half knob (important on the start and end)*/ - tmp = (int32_t)((int32_t) p.y * (ext->bar.max_value - ext->bar.min_value + 1)) / (h - knob_h); - tmp = ext->bar.max_value - tmp; /*Invert the value: smaller value means higher y*/ + p.y -= + slider->coords.y1 + + w / 2; /*Modify the point to shift with half knob (important on the start and end)*/ + tmp = (int32_t)((int32_t)p.y * (ext->bar.max_value - ext->bar.min_value + 1)) / + (h - knob_h); + tmp = ext->bar.max_value - tmp; /*Invert the value: smaller value means higher y*/ } - if(tmp < ext->bar.min_value) tmp = ext->bar.min_value; - else if(tmp > ext->bar.max_value) tmp = ext->bar.max_value; + if(tmp < ext->bar.min_value) + tmp = ext->bar.min_value; + else if(tmp > ext->bar.max_value) + tmp = ext->bar.max_value; if(tmp != ext->drag_value) { ext->drag_value = tmp; @@ -483,13 +514,14 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { - if(ext->drag_value != LV_SLIDER_NOT_PRESSED) lv_slider_set_value(slider, ext->drag_value, false); + if(ext->drag_value != LV_SLIDER_NOT_PRESSED) + lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; #if LV_USE_GROUP /*Leave edit mode if released. (No need to wait for LONG_PRESS) */ - lv_group_t * g = lv_obj_get_group(slider); - bool editing = lv_group_get_editing(g); + lv_group_t * g = lv_obj_get_group(slider); + bool editing = lv_group_get_editing(g); lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); if(indev_type == LV_INDEV_TYPE_ENCODER) { if(editing) lv_group_set_editing(g, false); @@ -500,23 +532,23 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par /* The knob size depends on slider size. * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/ if(lv_obj_get_width(slider) != lv_area_get_width(param) || - lv_obj_get_height(slider) != lv_area_get_height(param)) { + lv_obj_get_height(slider) != lv_area_get_height(param)) { slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_SIZE, NULL); } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); + lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); - lv_coord_t shadow_w = knob_style->body.shadow.width; + lv_coord_t shadow_w = knob_style->body.shadow.width; if(ext->knob_in == 0) { /* The smaller size is the knob diameter*/ lv_coord_t x = LV_MATH_MIN(w / 2 + 1 + shadow_w, h / 2 + 1 + shadow_w); if(slider->ext_size < x) slider->ext_size = x; } else { lv_coord_t pad = 0; - pad = LV_MATH_MIN(pad, style->body.padding.top); - pad = LV_MATH_MIN(pad, style->body.padding.bottom); - pad = LV_MATH_MIN(pad, style->body.padding.left); - pad = LV_MATH_MIN(pad, style->body.padding.right); + pad = LV_MATH_MIN(pad, style->body.padding.top); + pad = LV_MATH_MIN(pad, style->body.padding.bottom); + pad = LV_MATH_MIN(pad, style->body.padding.left); + pad = LV_MATH_MIN(pad, style->body.padding.right); if(pad < 0) pad = -pad; if(slider->ext_size < pad) slider->ext_size = pad; @@ -538,11 +570,11 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; + *editable = true; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_slider"; diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 7339aba6d52a..07770b36dff3 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -39,16 +39,16 @@ extern "C" { /*Data of slider*/ typedef struct { - lv_bar_ext_t bar; /*Ext. of ancestor*/ + lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t *style_knob; /*Style of the knob*/ - int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ - uint8_t knob_in :1; /*1: Draw the knob inside the bar*/ + lv_style_t * style_knob; /*Style of the knob*/ + int16_t + drag_value; /*Store a temporal value during press until release (Handled by the library)*/ + uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/ } lv_slider_ext_t; /*Built-in styles of slider*/ -enum -{ +enum { LV_SLIDER_STYLE_BG, LV_SLIDER_STYLE_INDIC, LV_SLIDER_STYLE_KNOB, @@ -88,7 +88,7 @@ static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value, bool an * @param min minimum value * @param max maximum value */ -static inline void lv_slider_set_range(lv_obj_t *slider, int16_t min, int16_t max) +static inline void lv_slider_set_range(lv_obj_t * slider, int16_t min, int16_t max) { lv_bar_set_range(slider, min, max); } @@ -107,7 +107,7 @@ void lv_slider_set_knob_in(lv_obj_t * slider, bool in); * @param type which style should be set * @param style pointer to a style */ -void lv_slider_set_style(lv_obj_t *slider, lv_slider_style_t type, lv_style_t *style); +void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -155,23 +155,22 @@ bool lv_slider_is_dragged(const lv_obj_t * slider); */ bool lv_slider_get_knob_in(const lv_obj_t * slider); - /** * Get a style of a slider * @param slider pointer to a slider object * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_slider_get_style(const lv_obj_t *slider, lv_slider_style_t type); +lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type); /********************** * MACROS **********************/ -#endif /*LV_USE_SLIDER*/ +#endif /*LV_USE_SLIDER*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_SLIDER_H*/ +#endif /*LV_SLIDER_H*/ diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 3fe2f44ded24..8efbab771f64 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -64,20 +64,20 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_spinbox); /*Initialize the allocated 'ext'*/ - ext->value = 0; - ext->dec_point_pos = 0; - ext->digit_count = 5; + ext->value = 0; + ext->dec_point_pos = 0; + ext->digit_count = 5; ext->digit_padding_left = 0; - ext->step = 1; - ext->range_max = 99999; - ext->range_min = -99999; + ext->step = 1; + ext->range_max = 99999; + ext->range_min = -99999; lv_ta_set_cursor_type(new_spinbox, LV_CURSOR_BLOCK | LV_CURSOR_HIDDEN); /*hidden by default*/ lv_ta_set_one_line(new_spinbox, true); /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_spinbox, lv_spinbox_signal); - lv_obj_set_design_cb(new_spinbox, ancestor_design); /*Leave the Text area's design function*/ + lv_obj_set_design_cb(new_spinbox, ancestor_design); /*Leave the Text area's design function*/ /*Init the new spinbox spinbox*/ if(copy == NULL) { @@ -109,7 +109,6 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) return new_spinbox; } - /*===================== * Setter functions *====================*/ @@ -122,13 +121,10 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i) { lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); - if(ext == NULL) - return; + if(ext == NULL) return; - if(i > ext->range_max) - i = ext->range_max; - if(i < ext->range_min) - i = ext->range_min; + if(i > ext->range_max) i = ext->range_max; + if(i < ext->range_min) i = ext->range_min; ext->value = i; @@ -139,21 +135,21 @@ void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i) * Set spinbox digit format (digit count and decimal format) * @param spinbox pointer to spinbox * @param digit_count number of digit excluding the decimal separator and the sign - * @param separator_position number of digit before the decimal point. If 0, decimal point is not shown + * @param separator_position number of digit before the decimal point. If 0, decimal point is not + * shown */ -void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position) +void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, + uint8_t separator_position) { lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); - if(ext == NULL) - return; + if(ext == NULL) return; - if(digit_count > LV_SPINBOX_MAX_DIGIT_COUNT) - digit_count = LV_SPINBOX_MAX_DIGIT_COUNT; + if(digit_count > LV_SPINBOX_MAX_DIGIT_COUNT) digit_count = LV_SPINBOX_MAX_DIGIT_COUNT; if(separator_position > LV_SPINBOX_MAX_DIGIT_COUNT) separator_position = LV_SPINBOX_MAX_DIGIT_COUNT; - ext->digit_count = digit_count; + ext->digit_count = digit_count; ext->dec_point_pos = separator_position; lv_spinbox_updatevalue(spinbox); @@ -186,11 +182,11 @@ void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_m ext->range_max = range_max; ext->range_min = range_min; - if(ext->value > ext->range_max) { + if(ext->value > ext->range_max) { ext->value = ext->range_max; lv_obj_invalidate(spinbox); } - if(ext->value < ext->range_min) { + if(ext->value < ext->range_min) { ext->value = ext->range_min; lv_obj_invalidate(spinbox); } @@ -203,7 +199,7 @@ void lv_spinbox_set_range(lv_obj_t * spinbox, int32_t range_min, int32_t range_m */ void lv_spinbox_set_padding_left(lv_obj_t * spinbox, uint8_t padding) { - lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); + lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); ext->digit_padding_left = padding; lv_spinbox_updatevalue(spinbox); } @@ -237,8 +233,10 @@ void lv_spinbox_step_next(lv_obj_t * spinbox) lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); int32_t new_step = ext->step / 10; - if((new_step) > 0) ext->step = new_step; - else ext->step = 1; + if((new_step) > 0) + ext->step = new_step; + else + ext->step = 1; lv_spinbox_updatevalue(spinbox); } @@ -251,7 +249,8 @@ void lv_spinbox_step_previous(lv_obj_t * spinbox) { lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); int32_t step_limit; - step_limit = LV_MATH_MAX(ext->range_max, (ext->range_min < 0 ? (-ext->range_min) : ext->range_min)); + step_limit = + LV_MATH_MAX(ext->range_max, (ext->range_min < 0 ? (-ext->range_min) : ext->range_min)); int32_t new_step = ext->step * 10; if(new_step <= step_limit) ext->step = new_step; @@ -297,8 +296,6 @@ void lv_spinbox_decrement(lv_obj_t * spinbox) lv_spinbox_updatevalue(spinbox); } - - /********************** * STATIC FUNCTIONS **********************/ @@ -318,25 +315,21 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p lv_res_t res = LV_RES_OK; /* Include the ancient signal function */ - if(sign != LV_SIGNAL_CONTROL) - { + if(sign != LV_SIGNAL_CONTROL) { res = ancestor_signal(spinbox, sign, param); if(res != LV_RES_OK) return res; } if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } else if(sign == LV_SIGNAL_GET_TYPE) - { + } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) - { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_spinbox"; - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { /*If released with an ENCODER then move to the nexxt digit*/ lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { @@ -356,26 +349,25 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p } } } - } - else if(sign == LV_SIGNAL_CONTROL) { + } else if(sign == LV_SIGNAL_CONTROL) { lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); - uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ + uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ if(c == LV_GROUP_KEY_RIGHT) { - if(indev_type == LV_INDEV_TYPE_ENCODER) lv_spinbox_increment(spinbox); - else lv_spinbox_step_next(spinbox); - } - else if(c == LV_GROUP_KEY_LEFT) { - if(indev_type == LV_INDEV_TYPE_ENCODER) lv_spinbox_decrement(spinbox); - else lv_spinbox_step_previous(spinbox); - } - else if(c == LV_GROUP_KEY_UP) { + if(indev_type == LV_INDEV_TYPE_ENCODER) + lv_spinbox_increment(spinbox); + else + lv_spinbox_step_next(spinbox); + } else if(c == LV_GROUP_KEY_LEFT) { + if(indev_type == LV_INDEV_TYPE_ENCODER) + lv_spinbox_decrement(spinbox); + else + lv_spinbox_step_previous(spinbox); + } else if(c == LV_GROUP_KEY_UP) { lv_spinbox_increment(spinbox); - } - else if(c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_GROUP_KEY_DOWN) { lv_spinbox_decrement(spinbox); - } - else { + } else { lv_ta_add_char(spinbox, c); } } @@ -431,25 +423,24 @@ static void lv_spinbox_updatevalue(lv_obj_t * spinbox) (*buf_p) = '.'; buf_p++; - for(/*Leave i*/ ;i < ext->digit_count && digits[i] != '\0'; i++) { + for(/*Leave i*/; i < ext->digit_count && digits[i] != '\0'; i++) { (*buf_p) = digits[i]; buf_p++; } } /*Refresh the text*/ - lv_ta_set_text(spinbox, (char*)buf); + lv_ta_set_text(spinbox, (char *)buf); /*Set the cursor position*/ - int32_t step = ext->step; + int32_t step = ext->step; uint8_t cur_pos = ext->digit_count; - while(step >= 10) - { + while(step >= 10) { step /= 10; cur_pos--; } - if(cur_pos > intDigits ) cur_pos ++; /*Skip teh decimal point*/ + if(cur_pos > intDigits) cur_pos++; /*Skip teh decimal point*/ cur_pos += ext->digit_padding_left; diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index 2203ae2e4840..e8c1df7072b3 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -3,7 +3,6 @@ * */ - #ifndef LV_SPINBOX_H #define LV_SPINBOX_H @@ -33,7 +32,7 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_SPINBOX_MAX_DIGIT_COUNT 16 +#define LV_SPINBOX_MAX_DIGIT_COUNT 16 /********************** * TYPEDEFS @@ -43,19 +42,19 @@ extern "C" { typedef void (*lv_spinbox_value_changed_cb_t)(lv_obj_t * spinbox, int32_t new_value); /*Data of spinbox*/ -typedef struct { +typedef struct +{ lv_ta_ext_t ta; /*Ext. of ancestor*/ /*New data for this type */ int32_t value; int32_t range_max; int32_t range_min; int32_t step; - uint16_t digit_count:4; - uint16_t dec_point_pos:4; /*if 0, there is no separator and the number is an integer*/ - uint16_t digit_padding_left:4; + uint16_t digit_count : 4; + uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/ + uint16_t digit_padding_left : 4; } lv_spinbox_ext_t; - /*Styles*/ enum { LV_SPINBOX_STYLE_BG, @@ -64,7 +63,6 @@ enum { }; typedef uint8_t lv_spinbox_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -87,7 +85,8 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy); * @param type which style should be set * @param style pointer to a style */ -static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_t *style) +static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, + lv_style_t * style) { lv_ta_set_style(spinbox, type, style); } @@ -103,9 +102,11 @@ void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i); * Set spinbox digit format (digit count and decimal format) * @param spinbox pointer to spinbox * @param digit_count number of digit excluding the decimal separator and the sign - * @param separator_position number of digit before the decimal point. If 0, decimal point is not shown + * @param separator_position number of digit before the decimal point. If 0, decimal point is not + * shown */ -void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position); +void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, + uint8_t separator_position); /** * Set spinbox step @@ -179,15 +180,14 @@ void lv_spinbox_increment(lv_obj_t * spinbox); */ void lv_spinbox_decrement(lv_obj_t * spinbox); - /********************** * MACROS **********************/ -#endif /*LV_USE_SPINBOX*/ +#endif /*LV_USE_SPINBOX*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_SPINBOX_H*/ +#endif /*LV_SPINBOX_H*/ diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 902aa09a8397..82ab4bef4ee7 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -72,14 +72,14 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_time = 0; #endif ext->style_knob_off = ext->slider.style_knob; - ext->style_knob_on = ext->slider.style_knob; + ext->style_knob_on = ext->slider.style_knob; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_sw, lv_sw_signal); /*Init the new switch switch*/ if(copy == NULL) { - lv_obj_set_size(new_sw, 2 * LV_DPI / 3, LV_DPI / 3); + lv_obj_set_size(new_sw, 2 * LV_DPI / 3, LV_DPI / 3); lv_slider_set_knob_in(new_sw, true); lv_slider_set_range(new_sw, 0, LV_SW_MAX_VALUE); @@ -98,15 +98,16 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing switch*/ else { lv_sw_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->style_knob_off = copy_ext->style_knob_off; - ext->style_knob_on = copy_ext->style_knob_on; + ext->style_knob_off = copy_ext->style_knob_off; + ext->style_knob_on = copy_ext->style_knob_on; #if LV_USE_ANIMATION ext->anim_time = copy_ext->anim_time; #endif - if(lv_sw_get_state(new_sw)) lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); - else lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); - + if(lv_sw_get_state(new_sw)) + lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); + else + lv_slider_set_style(new_sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_sw); @@ -157,15 +158,17 @@ void lv_sw_off(lv_obj_t * sw, bool anim) * @param anim true: set the value with an animation; false: change the value immediatelly * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t *sw, bool anim) +bool lv_sw_toggle(lv_obj_t * sw, bool anim) { #if LV_USE_ANIMATION == 0 anim = false; #endif bool state = lv_sw_get_state(sw); - if(state) lv_sw_off(sw, anim); - else lv_sw_on(sw, anim); + if(state) + lv_sw_off(sw, anim); + else + lv_sw_on(sw, anim); return !state; } @@ -181,12 +184,8 @@ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style) lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); switch(type) { - case LV_SLIDER_STYLE_BG: - lv_slider_set_style(sw, LV_SLIDER_STYLE_BG, style); - break; - case LV_SLIDER_STYLE_INDIC: - lv_bar_set_style(sw, LV_SLIDER_STYLE_INDIC, style); - break; + case LV_SLIDER_STYLE_BG: lv_slider_set_style(sw, LV_SLIDER_STYLE_BG, style); break; + case LV_SLIDER_STYLE_INDIC: lv_bar_set_style(sw, LV_SLIDER_STYLE_INDIC, style); break; case LV_SW_STYLE_KNOB_OFF: ext->style_knob_off = style; if(lv_sw_get_state(sw) == 0) lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, style); @@ -198,15 +197,14 @@ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style) } } -void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time) +void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time) { #if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - ext->anim_time = anim_time; + ext->anim_time = anim_time; #endif } - /*===================== * Getter functions *====================*/ @@ -220,37 +218,27 @@ void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time) lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) { lv_style_t * style = NULL; - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); + lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); switch(type) { - case LV_SW_STYLE_BG: - style = lv_slider_get_style(sw, LV_SLIDER_STYLE_BG); - break; - case LV_SW_STYLE_INDIC: - style = lv_slider_get_style(sw, LV_SLIDER_STYLE_INDIC); - break; - case LV_SW_STYLE_KNOB_OFF: - style = ext->style_knob_off; - break; - case LV_SW_STYLE_KNOB_ON: - style = ext->style_knob_on; - break; - default: - style = NULL; - break; + case LV_SW_STYLE_BG: style = lv_slider_get_style(sw, LV_SLIDER_STYLE_BG); break; + case LV_SW_STYLE_INDIC: style = lv_slider_get_style(sw, LV_SLIDER_STYLE_INDIC); break; + case LV_SW_STYLE_KNOB_OFF: style = ext->style_knob_off; break; + case LV_SW_STYLE_KNOB_ON: style = ext->style_knob_on; break; + default: style = NULL; break; } return style; } -uint16_t lv_sw_get_anim_time(const lv_obj_t *sw) +uint16_t lv_sw_get_anim_time(const lv_obj_t * sw) { #if LV_USE_ANIMATION - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - return ext->anim_time; + lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); + return ext->anim_time; #else - return 0; + return 0; #endif } @@ -269,14 +257,17 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) { lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); - /*Save the current (old) value before slider signal modifies it. It will be required in the later colcualtions*/ + /*Save the current (old) value before slider signal modifies it. It will be required in the + * later colcualtions*/ int16_t old_val; - if(sign == LV_SIGNAL_PRESSING) old_val = ext->slider.drag_value; - else old_val = lv_slider_get_value(sw); + if(sign == LV_SIGNAL_PRESSING) + old_val = ext->slider.drag_value; + else + old_val = lv_slider_get_value(sw); /*Don't let the slider to call the action. Switch handles it differently*/ lv_event_cb_t event_cb = sw->event_cb; - sw->event_cb = NULL; + sw->event_cb = NULL; lv_res_t res; /* Include the ancient signal function */ @@ -288,61 +279,60 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ - } - else if(sign == LV_SIGNAL_PRESSED) { + } else if(sign == LV_SIGNAL_PRESSED) { /*Save the x coordinate of the pressed point to see if the switch was slid*/ lv_indev_t * indev = lv_indev_get_act(); if(indev) { lv_point_t p; - lv_indev_get_point(indev, &p); + lv_indev_get_point(indev, &p); ext->start_x = p.x; } - ext->slided = 0; + ext->slided = 0; ext->changed = 0; - } - else if(sign == LV_SIGNAL_PRESSING) { + } else if(sign == LV_SIGNAL_PRESSING) { /*See if the switch was slid (moved at least a little)*/ lv_indev_t * indev = lv_indev_get_act(); if(indev) { - lv_point_t p = {0,0}; - lv_indev_get_point(indev, &p); + lv_point_t p = {0, 0}; + lv_indev_get_point(indev, &p); if(LV_MATH_ABS(p.x - ext->start_x) > LV_INDEV_DEF_DRAG_LIMIT) ext->slided = 1; } - /*If didn't slide then revert the min/max value. So click without slide won't move the switch as a slider*/ + /*If didn't slide then revert the min/max value. So click without slide won't move the + * switch as a slider*/ if(ext->slided == 0) { - if(lv_sw_get_state(sw)) ext->slider.drag_value = LV_SW_MAX_VALUE; - else ext->slider.drag_value = 0; + if(lv_sw_get_state(sw)) + ext->slider.drag_value = LV_SW_MAX_VALUE; + else + ext->slider.drag_value = 0; } /*If explicitly changed (by slide) don't need to be toggled on release*/ - int16_t threshold = LV_SW_MAX_VALUE / 2; + int16_t threshold = LV_SW_MAX_VALUE / 2; if((old_val < threshold && ext->slider.drag_value > threshold) || - (old_val > threshold && ext->slider.drag_value < threshold)) - { + (old_val > threshold && ext->slider.drag_value < threshold)) { ext->changed = 1; } - } - else if(sign == LV_SIGNAL_PRESS_LOST) { + } else if(sign == LV_SIGNAL_PRESS_LOST) { if(lv_sw_get_state(sw)) { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_on); lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; - } - else { + } else { lv_slider_set_style(sw, LV_SLIDER_STYLE_KNOB, ext->style_knob_off); lv_slider_set_value(sw, 0, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; } - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { /*If not dragged then toggle the switch*/ if(ext->changed == 0) { - if(lv_sw_get_state(sw)) lv_sw_off(sw, true); - else lv_sw_on(sw, true); + if(lv_sw_get_state(sw)) + lv_sw_off(sw, true); + else + lv_sw_on(sw, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; @@ -350,8 +340,10 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) /*If the switch was dragged then calculate the new state based on the current position*/ else { int16_t v = lv_slider_get_value(sw); - if(v > LV_SW_MAX_VALUE / 2) lv_sw_on(sw, true); - else lv_sw_off(sw, true); + if(v > LV_SW_MAX_VALUE / 2) + lv_sw_on(sw, true); + else + lv_sw_off(sw, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; @@ -369,11 +361,11 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = false; /*The ancestor slider is editable the switch is not*/ + *editable = false; /*The ancestor slider is editable the switch is not*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_sw"; diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index 3937cd978b0a..8d4853e337fe 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -40,15 +40,16 @@ extern "C" { /*Data of switch*/ typedef struct { - lv_slider_ext_t slider; /*Ext. of ancestor*/ + lv_slider_ext_t slider; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t *style_knob_off; /*Style of the knob when the switch is OFF*/ - lv_style_t *style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/ + lv_style_t * style_knob_off; /*Style of the knob when the switch is OFF*/ + lv_style_t * + style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/ lv_coord_t start_x; - uint8_t changed :1; /*Indicates the switch state explicitly changed by drag*/ - uint8_t slided :1; + uint8_t changed : 1; /*Indicates the switch state explicitly changed by drag*/ + uint8_t slided : 1; #if LV_USE_ANIMATION - uint16_t anim_time; /*switch animation time */ + uint16_t anim_time; /*switch animation time */ #endif } lv_sw_ext_t; @@ -81,14 +82,14 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy); * @param sw pointer to a switch object * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_on(lv_obj_t *sw, bool anim); +void lv_sw_on(lv_obj_t * sw, bool anim); /** * Turn OFF the switch * @param sw pointer to a switch object * @param anim true: set the value with an animation; false: change the value immediatelly */ -void lv_sw_off(lv_obj_t *sw, bool anim); +void lv_sw_off(lv_obj_t * sw, bool anim); /** * Toggle the position of the switch @@ -96,7 +97,7 @@ void lv_sw_off(lv_obj_t *sw, bool anim); * @param anim true: set the value with an animation; false: change the value immediatelly * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t *sw, bool anim); +bool lv_sw_toggle(lv_obj_t * sw, bool anim); /** * Set a style of a switch @@ -104,7 +105,7 @@ bool lv_sw_toggle(lv_obj_t *sw, bool anim); * @param type which style should be set * @param style pointer to a style */ -void lv_sw_set_style(lv_obj_t *sw, lv_sw_style_t type, lv_style_t *style); +void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style); #if LV_USE_ANIMATION /** @@ -113,7 +114,7 @@ void lv_sw_set_style(lv_obj_t *sw, lv_sw_style_t type, lv_style_t *style); * @param anim_time animation time * @return style pointer to a style */ -void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time); +void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time); #endif /*===================== @@ -125,7 +126,7 @@ void lv_sw_set_anim_time(lv_obj_t *sw, uint16_t anim_time); * @param sw pointer to a switch object * @return false: OFF; true: ON */ -static inline bool lv_sw_get_state(const lv_obj_t *sw) +static inline bool lv_sw_get_state(const lv_obj_t * sw) { return lv_bar_get_value(sw) < LV_SW_MAX_VALUE / 2 ? false : true; } @@ -136,23 +137,23 @@ static inline bool lv_sw_get_state(const lv_obj_t *sw) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_sw_get_style(const lv_obj_t *sw, lv_sw_style_t type); +lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type); /** * Get the animation time of the switch * @param sw pointer to a switch object * @return style pointer to a style */ -uint16_t lv_sw_get_anim_time(const lv_obj_t *sw); +uint16_t lv_sw_get_anim_time(const lv_obj_t * sw); /********************** * MACROS **********************/ -#endif /*LV_USE_SW*/ +#endif /*LV_USE_SW*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_SW_H*/ +#endif /*LV_SW_H*/ diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 6ec07a1b8e25..6c68192685e6 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -3,7 +3,6 @@ * */ - /********************* * INCLUDES *********************/ @@ -24,15 +23,15 @@ /*Test configuration*/ #ifndef LV_TA_CURSOR_BLINK_TIME -#define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +#define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ #endif #ifndef LV_TA_PWD_SHOW_TIME -#define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ +#define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif -#define LV_TA_DEF_WIDTH (2 * LV_DPI) -#define LV_TA_DEF_HEIGHT (1 * LV_DPI) +#define LV_TA_DEF_WIDTH (2 * LV_DPI) +#define LV_TA_DEF_HEIGHT (1 * LV_DPI) /********************** * TYPEDEFS @@ -54,7 +53,8 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); static void placeholder_update(lv_obj_t * ta); -static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source); +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, + lv_indev_t * click_source); /********************** * STATIC VARIABLES @@ -98,18 +98,18 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->cursor.state = 1; - ext->pwd_mode = 0; - ext->pwd_tmp = NULL; + ext->cursor.state = 1; + ext->pwd_mode = 0; + ext->pwd_tmp = NULL; ext->accapted_chars = NULL; - ext->max_length = 0; - ext->cursor.style = NULL; - ext->cursor.pos = 0; - ext->cursor.type = LV_CURSOR_LINE; + ext->max_length = 0; + ext->cursor.style = NULL; + ext->cursor.pos = 0; + ext->cursor.type = LV_CURSOR_LINE; ext->cursor.valid_x = 0; - ext->one_line = 0; - ext->label = NULL; - ext->placeholder = NULL; + ext->one_line = 0; + ext->label = NULL; + ext->placeholder = NULL; lv_obj_set_signal_cb(new_ta, lv_ta_signal); lv_obj_set_signal_cb(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal); @@ -143,14 +143,14 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_obj_set_design_cb(ext->page.scrl, lv_ta_scrollable_design); lv_ta_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->label = lv_label_create(new_ta, copy_ext->label); - ext->pwd_mode = copy_ext->pwd_mode; - ext->accapted_chars = copy_ext->accapted_chars; - ext->max_length = copy_ext->max_length; - ext->cursor.style = copy_ext->cursor.style; - ext->cursor.pos = copy_ext->cursor.pos; - ext->cursor.valid_x = copy_ext->cursor.valid_x; - ext->cursor.type = copy_ext->cursor.type; + ext->label = lv_label_create(new_ta, copy_ext->label); + ext->pwd_mode = copy_ext->pwd_mode; + ext->accapted_chars = copy_ext->accapted_chars; + ext->max_length = copy_ext->max_length; + ext->cursor.style = copy_ext->cursor.style; + ext->cursor.pos = copy_ext->cursor.pos; + ext->cursor.valid_x = copy_ext->cursor.valid_x; + ext->cursor.type = copy_ext->cursor.type; if(copy_ext->one_line) lv_ta_set_one_line(new_ta, true); lv_ta_set_style(new_ta, LV_TA_STYLE_CURSOR, lv_ta_get_style(copy, LV_TA_STYLE_CURSOR)); @@ -162,18 +162,18 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) #if LV_USE_ANIMATION /*Create a cursor blinker animation*/ lv_anim_t a; - a.var = new_ta; - a.fp = (lv_anim_fp_t)cursor_blink_anim; - a.time = LV_TA_CURSOR_BLINK_TIME; - a.act_time = 0; - a.end_cb = NULL; - a.start = 1; - a.end = 0; - a.repeat = 1; - a.repeat_pause = 0; - a.playback = 1; + a.var = new_ta; + a.fp = (lv_anim_fp_t)cursor_blink_anim; + a.time = LV_TA_CURSOR_BLINK_TIME; + a.act_time = 0; + a.end_cb = NULL; + a.start = 1; + a.end = 0; + a.repeat = 1; + a.repeat_pause = 0; + a.playback = 1; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path = lv_anim_path_step; lv_anim_create(&a); #endif @@ -203,10 +203,10 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) ta_insert_replace = NULL; lv_event_send(ta, LV_EVENT_INSERT, letter_buf); if(ta_insert_replace) { - if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ /*Add the replaced text directly it's different from the original*/ - if(strcmp(ta_insert_replace, (char*)letter_buf)) { + if(strcmp(ta_insert_replace, (char *)letter_buf)) { lv_ta_add_text(ta, ta_insert_replace); return; } @@ -220,7 +220,8 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) uint32_t c_uni = lv_txt_encoded_next((const char *)&c, NULL); if(char_is_accepted(ta, c_uni) == false) { - LV_LOG_INFO("Character is no accepted by the text area (too long text or not in the accepted list)"); + LV_LOG_INFO("Character is no accepted by the text area (too long text or not in the " + "accepted list)"); return; } @@ -228,14 +229,16 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) bool edge_flash_en = lv_ta_get_edge_flash(ta); lv_ta_set_edge_flash(ta, false); - if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ + if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ - lv_label_ins_text(ext->label, ext->cursor.pos, (const char *)letter_buf); /*Insert the character*/ - lv_ta_clear_selection(ta); /*Clear selection*/ + lv_label_ins_text(ext->label, ext->cursor.pos, + (const char *)letter_buf); /*Insert the character*/ + lv_ta_clear_selection(ta); /*Clear selection*/ if(ext->pwd_mode != 0) { - ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */ + ext->pwd_tmp = + lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */ lv_mem_assert(ext->pwd_tmp); if(ext->pwd_tmp == NULL) return; @@ -244,18 +247,18 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) #if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; - a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; - a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; + a.var = ta; + a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.time = LV_TA_PWD_SHOW_TIME; + a.act_time = 0; + a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -285,7 +288,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) ta_insert_replace = NULL; lv_event_send(ta, LV_EVENT_INSERT, txt); if(ta_insert_replace) { - if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ /*Add the replaced text directly it's different from the original*/ if(strcmp(ta_insert_replace, txt)) { @@ -294,7 +297,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) } } - if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ + if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ /*Add the character one-by-one if not all characters are accepted or there is character limit.*/ if(lv_ta_get_accepted_chars(ta) || lv_ta_get_max_length(ta)) { @@ -324,18 +327,18 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) #if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; - a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; - a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; + a.var = ta; + a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.time = LV_TA_PWD_SHOW_TIME; + a.act_time = 0; + a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -360,15 +363,15 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) void lv_ta_del_char(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - uint16_t cur_pos = ext->cursor.pos; + uint16_t cur_pos = ext->cursor.pos; if(cur_pos == 0) return; ta_insert_replace = NULL; - char del_buf[2] = {LV_GROUP_KEY_DEL, '\0'}; + char del_buf[2] = {LV_GROUP_KEY_DEL, '\0'}; lv_event_send(ta, LV_EVENT_INSERT, del_buf); if(ta_insert_replace) { - if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ + if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ /*Add the replaced text directly it's different from the original*/ if(strcmp(ta_insert_replace, del_buf)) { @@ -413,12 +416,11 @@ void lv_ta_del_char(lv_obj_t * ta) */ void lv_ta_del_char_forward(lv_obj_t * ta) { - uint16_t cp = lv_ta_get_cursor_pos(ta); - lv_ta_set_cursor_pos(ta, cp + 1); - if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta); + uint16_t cp = lv_ta_get_cursor_pos(ta); + lv_ta_set_cursor_pos(ta, cp + 1); + if(cp != lv_ta_get_cursor_pos(ta)) lv_ta_del_char(ta); } - /*===================== * Setter functions *====================*/ @@ -465,18 +467,18 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) #if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 /*Auto hide characters*/ lv_anim_t a; - a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; - a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; + a.var = ta; + a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.time = LV_TA_PWD_SHOW_TIME; + a.act_time = 0; + a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -489,10 +491,10 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) } /** -* Set the placeholder text of a text area -* @param ta pointer to a text area -* @param txt pointer to the text -*/ + * Set the placeholder text of a text area + * @param ta pointer to a text area + * @param txt pointer to the text + */ void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); @@ -536,7 +538,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Position the label to make the cursor visible*/ lv_obj_t * label_par = lv_obj_get_parent(ext->label); lv_point_t cur_pos; - lv_style_t * style = lv_obj_get_style(ta); + lv_style_t * style = lv_obj_get_style(ta); const lv_font_t * font_p = style->text.font; lv_area_t label_cords; lv_area_t ta_cords; @@ -547,23 +549,23 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Check the top*/ lv_coord_t font_h = lv_font_get_height(font_p); if(lv_obj_get_y(label_par) + cur_pos.y < 0) { - lv_obj_set_y(label_par, - cur_pos.y + style->body.padding.top); + lv_obj_set_y(label_par, -cur_pos.y + style->body.padding.top); } /*Check the bottom*/ if(label_cords.y1 + cur_pos.y + font_h + style->body.padding.bottom > ta_cords.y2) { - lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + - font_h + style->body.padding.top + style->body.padding.bottom)); + lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + font_h + + style->body.padding.top + style->body.padding.bottom)); } /*Check the left (use the font_h as general unit)*/ if(lv_obj_get_x(label_par) + cur_pos.x < font_h) { - lv_obj_set_x(label_par, - cur_pos.x + font_h); + lv_obj_set_x(label_par, -cur_pos.x + font_h); } /*Check the right (use the font_h as general unit)*/ if(label_cords.x1 + cur_pos.x + font_h + style->body.padding.right > ta_cords.x2) { - lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + - font_h + style->body.padding.left + style->body.padding.right)); + lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + font_h + + style->body.padding.left + style->body.padding.right)); } ext->cursor.valid_x = cur_pos.x; @@ -571,18 +573,18 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) #if LV_USE_ANIMATION /*Reset cursor blink animation*/ lv_anim_t a; - a.var = ta; - a.fp = (lv_anim_fp_t)cursor_blink_anim; - a.time = LV_TA_CURSOR_BLINK_TIME; - a.act_time = 0; - a.end_cb = NULL; - a.start = 1; - a.end = 0; - a.repeat = 1; - a.repeat_pause = 0; - a.playback = 1; + a.var = ta; + a.fp = (lv_anim_fp_t)cursor_blink_anim; + a.time = LV_TA_CURSOR_BLINK_TIME; + a.act_time = 0; + a.end_cb = NULL; + a.start = 1; + a.end = 0; + a.repeat = 1; + a.repeat_pause = 0; + a.playback = 1; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path = lv_anim_path_step; lv_anim_create(&a); #endif @@ -616,7 +618,7 @@ void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en) /*Pwd mode is now enabled*/ if(ext->pwd_mode == 0 && en != false) { - char * txt = lv_label_get_text(ext->label); + char * txt = lv_label_get_text(ext->label); uint16_t len = strlen(txt); ext->pwd_tmp = lv_mem_alloc(len + 1); lv_mem_assert(ext->pwd_tmp); @@ -626,7 +628,7 @@ void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en) uint16_t i; for(i = 0; i < len; i++) { - txt[i] = '*'; /*All char to '*'*/ + txt[i] = '*'; /*All char to '*'*/ } txt[i] = '\0'; @@ -636,7 +638,7 @@ void lv_ta_set_pwd_mode(lv_obj_t * ta, bool en) } /*Pwd mode is now disabled*/ else if(ext->pwd_mode == 1 && en == false) { - lv_ta_clear_selection(ta); + lv_ta_clear_selection(ta); lv_label_set_text(ext->label, ext->pwd_tmp); lv_mem_free(ext->pwd_tmp); ext->pwd_tmp = NULL; @@ -658,18 +660,19 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) if(ext->one_line == en) return; if(en) { - lv_style_t * style_ta = lv_obj_get_style(ta); - lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta)); + lv_style_t * style_ta = lv_obj_get_style(ta); + lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta)); lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); ext->one_line = 1; lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + - style_scrl->body.padding.top + style_scrl->body.padding.bottom); + style_scrl->body.padding.top + style_scrl->body.padding.bottom); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND); if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, + style_ta->body.padding.top); } else { lv_style_t * style_ta = lv_obj_get_style(ta); @@ -679,7 +682,8 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK); lv_obj_set_height(ta, LV_TA_DEF_HEIGHT); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, + style_ta->body.padding.top); } placeholder_update(ta); @@ -696,7 +700,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) void lv_ta_set_text_align(lv_obj_t * ta, lv_label_align_t align) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_obj_t * label = lv_ta_get_label(ta); + lv_obj_t * label = lv_ta_get_label(ta); if(!ext->one_line) { lv_label_set_align(label, align); } else { @@ -749,11 +753,12 @@ void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num) * It can be used to add automatic formatting to the text area. * @param ta pointer to a text area. * @param txt pointer to a new string to insert. If `""` no text will be added. - * The variable must be live after the `event_cb` exists. (Should be `global` or `static`) + * The variable must be live after the `event_cb` exists. (Should be `global` or + * `static`) */ void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt) { - (void)ta; /*Unused*/ + (void)ta; /*Unused*/ ta_insert_replace = txt; } @@ -768,18 +773,13 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); switch(type) { - case LV_TA_STYLE_BG: - lv_page_set_style(ta, LV_PAGE_STYLE_BG, style); - break; - case LV_TA_STYLE_SB: - lv_page_set_style(ta, LV_PAGE_STYLE_SB, style); - break; - case LV_TA_STYLE_EDGE_FLASH: - lv_page_set_style(ta, LV_PAGE_STYLE_EDGE_FLASH, style); - break; + case LV_TA_STYLE_BG: lv_page_set_style(ta, LV_PAGE_STYLE_BG, style); break; + case LV_TA_STYLE_SB: lv_page_set_style(ta, LV_PAGE_STYLE_SB, style); break; + case LV_TA_STYLE_EDGE_FLASH: lv_page_set_style(ta, LV_PAGE_STYLE_EDGE_FLASH, style); break; case LV_TA_STYLE_CURSOR: ext->cursor.style = style; - lv_obj_refresh_ext_size(lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ + lv_obj_refresh_ext_size( + lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ refr_cursor_area(ta); break; case LV_TA_STYLE_PLACEHOLDER: @@ -793,11 +793,11 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) * @param ta pointer to a text area object * @param en true or false to enable/disable selection mode */ -void lv_ta_set_sel_mode(lv_obj_t *ta, bool en) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - ext->sel_mode = en; - if(!en) - lv_ta_clear_selection(ta); +void lv_ta_set_sel_mode(lv_obj_t * ta, bool en) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->sel_mode = en; + if(!en) lv_ta_clear_selection(ta); } /*===================== @@ -824,10 +824,10 @@ const char * lv_ta_get_text(const lv_obj_t * ta) } /** -* Get the placeholder text of a text area -* @param ta pointer to a text area object -* @return pointer to the text -*/ + * Get the placeholder text of a text area + * @param ta pointer to a text area object + * @return pointer to the text + */ const char * lv_ta_get_placeholder_text(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); @@ -850,7 +850,6 @@ lv_obj_t * lv_ta_get_label(const lv_obj_t * ta) return ext->label; } - /** * Get the current cursor position in character index * @param ta pointer to a text area object @@ -927,27 +926,17 @@ uint16_t lv_ta_get_max_length(lv_obj_t * ta) lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) { lv_style_t * style = NULL; - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); switch(type) { - case LV_TA_STYLE_BG: - style = lv_page_get_style(ta, LV_PAGE_STYLE_BG); - break; - case LV_TA_STYLE_SB: - style = lv_page_get_style(ta, LV_PAGE_STYLE_SB); - break; - case LV_TA_STYLE_EDGE_FLASH: - style = lv_page_get_style(ta, LV_PAGE_STYLE_EDGE_FLASH); - break; - case LV_TA_STYLE_CURSOR: - style = ext->cursor.style; - break; + case LV_TA_STYLE_BG: style = lv_page_get_style(ta, LV_PAGE_STYLE_BG); break; + case LV_TA_STYLE_SB: style = lv_page_get_style(ta, LV_PAGE_STYLE_SB); break; + case LV_TA_STYLE_EDGE_FLASH: style = lv_page_get_style(ta, LV_PAGE_STYLE_EDGE_FLASH); break; + case LV_TA_STYLE_CURSOR: style = ext->cursor.style; break; case LV_TA_STYLE_PLACEHOLDER: if(ext->placeholder) style = lv_label_get_style(ext->placeholder); break; - default: - style = NULL; - break; + default: style = NULL; break; } return style; @@ -963,19 +952,20 @@ lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) * @param sel_end pointer to int used to hold last selected character */ -void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); +void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - /*Force both values to -1 if there is no selection*/ - if(ext_label->selection_start == -1 || ext_label->selection_end == -1) { - *sel_start = -1; - *sel_end = -1; - return; - } + /*Force both values to -1 if there is no selection*/ + if(ext_label->selection_start == -1 || ext_label->selection_end == -1) { + *sel_start = -1; + *sel_end = -1; + return; + } - *sel_start = ext_label->selection_start; - *sel_end = ext_label->selection_end; + *sel_start = ext_label->selection_start; + *sel_end = ext_label->selection_end; } /** @@ -983,11 +973,12 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { * @param ta Text area object * @return whether text is selected or not */ -bool lv_ta_text_is_selected(const lv_obj_t *ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); +bool lv_ta_text_is_selected(const lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - return (ext_label->selection_start == -1 || ext_label->selection_end == -1); + return (ext_label->selection_start == -1 || ext_label->selection_end == -1); } /** @@ -995,10 +986,11 @@ bool lv_ta_text_is_selected(const lv_obj_t *ta) { * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_sel_mode(lv_obj_t *ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); +bool lv_ta_get_sel_mode(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - return ext->sel_mode; + return ext->sel_mode; } /*===================== @@ -1009,15 +1001,16 @@ bool lv_ta_get_sel_mode(lv_obj_t *ta) { * Clear the selection on the text area. * @param ta Text area object */ -void lv_ta_clear_selection(lv_obj_t * ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - - if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { - ext_label->selection_start = -1; - ext_label->selection_end = -1; - lv_obj_invalidate(ta); - } +void lv_ta_clear_selection(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + + if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { + ext_label->selection_start = -1; + ext_label->selection_end = -1; + lv_obj_invalidate(ta); + } } /** @@ -1038,7 +1031,7 @@ void lv_ta_cursor_right(lv_obj_t * ta) void lv_ta_cursor_left(lv_obj_t * ta) { uint16_t cp = lv_ta_get_cursor_pos(ta); - if(cp > 0) { + if(cp > 0) { cp--; lv_ta_set_cursor_pos(ta, cp); } @@ -1059,7 +1052,7 @@ void lv_ta_cursor_down(lv_obj_t * ta) /*Increment the y with one line and keep the valid x*/ lv_style_t * label_style = lv_obj_get_style(ext->label); const lv_font_t * font_p = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font_p); + lv_coord_t font_h = lv_font_get_height(font_p); pos.y += font_h + label_style->text.line_space + 1; pos.x = ext->cursor.valid_x; @@ -1068,7 +1061,8 @@ void lv_ta_cursor_down(lv_obj_t * ta) /*Get the letter index on the new cursor position and set it*/ uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos); - lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ + lv_coord_t cur_valid_x_tmp = + ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ lv_ta_set_cursor_pos(ta, new_cur_pos); ext->cursor.valid_x = cur_valid_x_tmp; } @@ -1088,15 +1082,15 @@ void lv_ta_cursor_up(lv_obj_t * ta) /*Decrement the y with one line and keep the valid x*/ lv_style_t * label_style = lv_obj_get_style(ext->label); - const lv_font_t * font = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_font_t * font = label_style->text.font; + lv_coord_t font_h = lv_font_get_height(font); pos.y -= font_h + label_style->text.line_space - 1; pos.x = ext->cursor.valid_x; - /*Get the letter index on the new cursor position and set it*/ uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos); - lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ + lv_coord_t cur_valid_x_tmp = + ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ lv_ta_set_cursor_pos(ta, new_cur_pos); ext->cursor.valid_x = cur_valid_x_tmp; } @@ -1130,7 +1124,6 @@ static bool lv_ta_design(lv_obj_t * ta, const lv_area_t * mask, lv_design_mode_t return true; } - /** * An extended scrollable design of the page. Calls the normal design function and draws a cursor. * @param scrl pointer to the scrollable part of the Text area @@ -1153,13 +1146,12 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ scrl_design(scrl, mask, mode); /*Draw the cursor*/ - lv_obj_t * ta = lv_obj_get_parent(scrl); + lv_obj_t * ta = lv_obj_get_parent(scrl); lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - if(ext->cursor.type == LV_CURSOR_NONE || - (ext->cursor.type & LV_CURSOR_HIDDEN) || - ext->cursor.state == 0) { - return true; /*The cursor is not visible now*/ + if(ext->cursor.type == LV_CURSOR_NONE || (ext->cursor.type & LV_CURSOR_HIDDEN) || + ext->cursor.state == 0) { + return true; /*The cursor is not visible now*/ } lv_style_t cur_style; @@ -1171,12 +1163,12 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ lv_area_t cur_area; lv_area_copy(&cur_area, &ext->cursor.area); - cur_area.x1 += ext->label->coords.x1; - cur_area.y1 += ext->label->coords.y1; - cur_area.x2 += ext->label->coords.x1; - cur_area.y2 += ext->label->coords.y1; + cur_area.x1 += ext->label->coords.x1; + cur_area.y1 += ext->label->coords.y1; + cur_area.x2 += ext->label->coords.x1; + cur_area.y2 += ext->label->coords.y1; - lv_opa_t opa_scale = lv_obj_get_opa_scale(ta); + lv_opa_t opa_scale = lv_obj_get_opa_scale(ta); if(ext->cursor.type == LV_CURSOR_LINE) { lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); @@ -1184,15 +1176,18 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); char letter_buf[8] = {0}; - memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); + memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], + lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); cur_area.x1 += cur_style.body.padding.left; cur_area.y1 += cur_style.body.padding.top; - lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0, -1, -1); + lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0, + -1, -1); } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { cur_style.body.opa = LV_OPA_TRANSP; - if(cur_style.body.border.width == 0) cur_style.body.border.width = 1; /*Be sure the border will be drawn*/ + if(cur_style.body.border.width == 0) + cur_style.body.border.width = 1; /*Be sure the border will be drawn*/ lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) { lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); @@ -1224,39 +1219,43 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /* (The created label will be deleted automatically) */ } else if(sign == LV_SIGNAL_STYLE_CHG) { if(ext->label) { - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_ta = lv_obj_get_style(ta); + lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_style_t * style_ta = lv_obj_get_style(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); if(ext->one_line) { /*In one line mode refresh the Text Area height because 'vpad' can modify it*/ lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); - lv_obj_set_height(ta, font_h + - style_ta->body.padding.top + style_ta->body.padding.bottom + - style_scrl->body.padding.top + style_scrl->body.padding.bottom); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_obj_set_height( + ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + + style_scrl->body.padding.top + style_scrl->body.padding.bottom); } else { /*In not one line mode refresh the Label width because 'hpad' can modify it*/ lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.right); /*Be sure the Label is in the correct position*/ + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, + style_scrl->body.padding + .right); /*Be sure the Label is in the correct position*/ if(ext->placeholder) { lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); /*Be sure the placeholder is in the correct position*/ + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, + style_scrl->body.padding + .top); /*Be sure the placeholder is in the correct position*/ } } lv_label_set_text(ext->label, NULL); - } } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_obj_get_height(ta) != lv_area_get_height(param)) { + lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); - lv_label_set_text(ext->label, NULL); /*Refresh the label*/ + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, + style_scrl->body.padding.top); + lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); } @@ -1264,36 +1263,45 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /*Set the placeholder width according to the text area width*/ if(ext->placeholder) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_obj_get_height(ta) != lv_area_get_height(param)) { + lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); - lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/ + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, + style_scrl->body.padding.top); + lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/ refr_cursor_area(ta); } } } else if(sign == LV_SIGNAL_CONTROL) { - uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ - if(c == LV_GROUP_KEY_RIGHT) lv_ta_cursor_right(ta); - else if(c == LV_GROUP_KEY_LEFT) lv_ta_cursor_left(ta); - else if(c == LV_GROUP_KEY_UP) lv_ta_cursor_up(ta); - else if(c == LV_GROUP_KEY_DOWN) lv_ta_cursor_down(ta); - else if(c == LV_GROUP_KEY_BACKSPACE) lv_ta_del_char(ta); - else if(c == LV_GROUP_KEY_DEL) lv_ta_del_char_forward(ta); - else if(c == LV_GROUP_KEY_HOME) lv_ta_set_cursor_pos(ta, 0); - else if(c == LV_GROUP_KEY_END) lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST); + uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ + if(c == LV_GROUP_KEY_RIGHT) + lv_ta_cursor_right(ta); + else if(c == LV_GROUP_KEY_LEFT) + lv_ta_cursor_left(ta); + else if(c == LV_GROUP_KEY_UP) + lv_ta_cursor_up(ta); + else if(c == LV_GROUP_KEY_DOWN) + lv_ta_cursor_down(ta); + else if(c == LV_GROUP_KEY_BACKSPACE) + lv_ta_del_char(ta); + else if(c == LV_GROUP_KEY_DEL) + lv_ta_del_char_forward(ta); + else if(c == LV_GROUP_KEY_HOME) + lv_ta_set_cursor_pos(ta, 0); + else if(c == LV_GROUP_KEY_END) + lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST); else { lv_ta_add_char(ta, c); } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; + *editable = true; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_ta"; @@ -1304,24 +1312,24 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_FOCUS) { #if LV_USE_GROUP lv_cursor_type_t cur_type; - cur_type = lv_ta_get_cursor_type(ta); - lv_group_t * g = lv_obj_get_group(ta); - bool editing = lv_group_get_editing(g); + cur_type = lv_ta_get_cursor_type(ta); + lv_group_t * g = lv_obj_get_group(ta); + bool editing = lv_group_get_editing(g); lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); /*Encoders need special handling*/ if(indev_type == LV_INDEV_TYPE_ENCODER) { - if(editing) lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); - else lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN); - } - else { + if(editing) + lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); + else + lv_ta_set_cursor_type(ta, cur_type | LV_CURSOR_HIDDEN); + } else { lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); } #endif - } - else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING - || sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { - update_cursor_position_on_click(ta, sign, (lv_indev_t *) param); + } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || + sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + update_cursor_position_on_click(ta, sign, (lv_indev_t *)param); } return res; } @@ -1341,32 +1349,31 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void res = scrl_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * ta = lv_obj_get_parent(scrl); + lv_obj_t * ta = lv_obj_get_parent(scrl); lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if(sign == LV_SIGNAL_REFR_EXT_SIZE) { /*Set ext. size because the cursor might be out of this object*/ lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); - } - else if(sign == LV_SIGNAL_CORD_CHG) { + } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { + lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); - lv_label_set_text(ext->label, NULL); /*Refresh the label*/ + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, + style_scrl->body.padding.top); + lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); } } - } - else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST || - sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || + sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { update_cursor_position_on_click(ta, sign, (lv_indev_t *)param); } @@ -1385,10 +1392,8 @@ static void cursor_blink_anim(lv_obj_t * ta, uint8_t show) lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if(show != ext->cursor.state) { ext->cursor.state = show == 0 ? 0 : 1; - if(ext->cursor.type != LV_CURSOR_NONE && - (ext->cursor.type & LV_CURSOR_HIDDEN) == 0) - { - lv_disp_t * disp = lv_obj_get_disp(ta); + if(ext->cursor.type != LV_CURSOR_NONE && (ext->cursor.type & LV_CURSOR_HIDDEN) == 0) { + lv_disp_t * disp = lv_obj_get_disp(ta); lv_area_t area_tmp; lv_area_copy(&area_tmp, &ext->cursor.area); area_tmp.x1 += ext->label->coords.x1; @@ -1400,7 +1405,6 @@ static void cursor_blink_anim(lv_obj_t * ta, uint8_t show) } } - /** * Dummy function to animate char hiding in pwd mode. * Does nothing, but a function is required in car hiding anim. @@ -1424,13 +1428,13 @@ static void pwd_char_hider(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if(ext->pwd_mode != 0) { - char * txt = lv_label_get_text(ext->label); + char * txt = lv_label_get_text(ext->label); int16_t len = lv_txt_get_encoded_length(txt); - bool refr = false; + bool refr = false; uint16_t i; for(i = 0; i < len; i++) { txt[i] = '*'; - refr = true; + refr = true; } txt[i] = '\0'; @@ -1453,8 +1457,7 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c) if(ext->accapted_chars == NULL && ext->max_length == 0) return true; /*Too many characters?*/ - if(ext->max_length > 0 && - lv_txt_get_encoded_length(lv_ta_get_text(ta)) >= ext->max_length) { + if(ext->max_length > 0 && lv_txt_get_encoded_length(lv_ta_get_text(ta)) >= ext->max_length) { return false; } @@ -1467,16 +1470,15 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c) if(a == c) return true; /*Accepted*/ } - return false; /*The character wasn't in the list*/ + return false; /*The character wasn't in the list*/ } else { - return true; /*If the accepted char list in not specified the accept the character*/ + return true; /*If the accepted char list in not specified the accept the character*/ } - } static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_style_t * label_style = lv_obj_get_style(ext->label); if(ext->cursor.style) { @@ -1484,29 +1486,30 @@ static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) } else { /*If cursor style is not specified then use the modified label style */ lv_style_copy(style_res, label_style); - lv_color_t clv_color_tmp = style_res->text.color; /*Make letter color to cursor color*/ - style_res->text.color = style_res->body.main_color; /*In block mode the letter color will be current background color*/ - style_res->body.main_color = clv_color_tmp; - style_res->body.grad_color = clv_color_tmp; - style_res->body.border.color = clv_color_tmp; - style_res->body.border.opa = LV_OPA_COVER; - style_res->body.border.width = 1; - style_res->body.shadow.width = 0; - style_res->body.radius = 0; - style_res->body.opa = LV_OPA_COVER; - style_res->body.padding.left = 0; - style_res->body.padding.right = 0; - style_res->body.padding.top = 0; + lv_color_t clv_color_tmp = style_res->text.color; /*Make letter color to cursor color*/ + style_res->text.color = + style_res->body + .main_color; /*In block mode the letter color will be current background color*/ + style_res->body.main_color = clv_color_tmp; + style_res->body.grad_color = clv_color_tmp; + style_res->body.border.color = clv_color_tmp; + style_res->body.border.opa = LV_OPA_COVER; + style_res->body.border.width = 1; + style_res->body.shadow.width = 0; + style_res->body.radius = 0; + style_res->body.opa = LV_OPA_COVER; + style_res->body.padding.left = 0; + style_res->body.padding.right = 0; + style_res->body.padding.top = 0; style_res->body.padding.bottom = 0; - style_res->line.width = 1; - style_res->body.opa = LV_OPA_COVER; + style_res->line.width = 1; + style_res->body.opa = LV_OPA_COVER; } - } static void refr_cursor_area(lv_obj_t * ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_style_t * label_style = lv_obj_get_style(ext->label); lv_style_t cur_style; @@ -1533,7 +1536,8 @@ static void refr_cursor_area(lv_obj_t * ta) lv_label_get_letter_pos(ext->label, cur_pos, &letter_pos); /*If the cursor is out of the text (most right) draw it to the next line*/ - if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && ext->one_line == 0 && lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) { + if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && + ext->one_line == 0 && lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) { letter_pos.x = 0; letter_pos.y += letter_h + label_style->text.line_space; @@ -1556,7 +1560,8 @@ static void refr_cursor_area(lv_obj_t * ta) lv_area_t cur_area; if(ext->cursor.type == LV_CURSOR_LINE) { - cur_area.x1 = letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - (cur_style.line.width & 0x1); + cur_area.x1 = letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - + (cur_style.line.width & 0x1); cur_area.y1 = letter_pos.y + cur_style.body.padding.top; cur_area.x2 = letter_pos.x + cur_style.body.padding.right + (cur_style.line.width >> 1); cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; @@ -1573,13 +1578,15 @@ static void refr_cursor_area(lv_obj_t * ta) cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) { cur_area.x1 = letter_pos.x + cur_style.body.padding.left; - cur_area.y1 = letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1); + cur_area.y1 = + letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1); cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w; - cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + (cur_style.line.width >> 1) + (cur_style.line.width & 0x1); + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + + (cur_style.line.width >> 1) + (cur_style.line.width & 0x1); } /*Save the new area*/ - lv_disp_t * disp = lv_obj_get_disp(ta); + lv_disp_t * disp = lv_obj_get_disp(ta); lv_area_t area_tmp; lv_area_copy(&area_tmp, &ext->cursor.area); area_tmp.x1 += ext->label->coords.x1; @@ -1609,31 +1616,30 @@ static void placeholder_update(lv_obj_t * ta) if(ta_text[0] == '\0') { /*Be sure the main label and the placeholder has the same coordinates*/ - lv_obj_t * scrl = lv_page_get_scrl(ta); + lv_obj_t * scrl = lv_page_get_scrl(ta); lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, + style_scrl->body.padding.top); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); lv_obj_set_hidden(ext->placeholder, false); - } - else { + } else { lv_obj_set_hidden(ext->placeholder, true); } } -static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source) +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, + lv_indev_t * click_source) { if(click_source == NULL) return; if(lv_indev_get_type(click_source) == LV_INDEV_TYPE_KEYPAD || - lv_indev_get_type(click_source) == LV_INDEV_TYPE_ENCODER) - { + lv_indev_get_type(click_source) == LV_INDEV_TYPE_ENCODER) { return; } - - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); lv_area_t label_coords; @@ -1655,71 +1661,66 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_ lv_coord_t label_width = lv_obj_get_width(ext->label); - - /*Check if the click happened on the left side of the area outside the label*/ - if (relative_position.x < 0) { + if(relative_position.x < 0) { index_of_char_at_position = 0; - click_outside_label = true; + click_outside_label = true; } /*Check if the click happened on the right side of the area outside the label*/ - else if (relative_position.x >= label_width) { + else if(relative_position.x >= label_width) { index_of_char_at_position = LV_TA_CURSOR_LAST; - click_outside_label = true; - } - else { + click_outside_label = true; + } else { index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); - click_outside_label = !lv_label_is_char_under_pos(ext->label, &relative_position); + click_outside_label = !lv_label_is_char_under_pos(ext->label, &relative_position); } if(ext->sel_mode && !ext->selecting && !click_outside_label && sign == LV_SIGNAL_PRESSED) { - /*Input device just went down. Store the selection start position*/ - ext->tmp_sel_start = index_of_char_at_position; - ext->tmp_sel_end = -1; - ext->selecting = 1; - lv_obj_set_drag(lv_page_get_scrl(ta), false); + /*Input device just went down. Store the selection start position*/ + ext->tmp_sel_start = index_of_char_at_position; + ext->tmp_sel_end = -1; + ext->selecting = 1; + lv_obj_set_drag(lv_page_get_scrl(ta), false); } else if(ext->selecting && sign == LV_SIGNAL_PRESSING) { - /*Input device may be moving. Store the end position */ - ext->tmp_sel_end = index_of_char_at_position; + /*Input device may be moving. Store the end position */ + ext->tmp_sel_end = index_of_char_at_position; } else if(ext->selecting && (sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED)) { - /*Input device is released. Check if anything was selected.*/ - lv_obj_set_drag(lv_page_get_scrl(ta), true); + /*Input device is released. Check if anything was selected.*/ + lv_obj_set_drag(lv_page_get_scrl(ta), true); } if(ext->selecting || sign == LV_SIGNAL_PRESSED) - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + lv_ta_set_cursor_pos(ta, index_of_char_at_position); if(ext->selecting) { - /*If the selected area has changed then update the real values and*/ - /*invalidate the text area.*/ - if(ext->tmp_sel_start > ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_end || - ext_label->selection_end != ext->tmp_sel_start) { - ext_label->selection_start = ext->tmp_sel_end; - ext_label->selection_end = ext->tmp_sel_start; - lv_obj_invalidate(ta); - } - } else if(ext->tmp_sel_start < ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_start || - ext_label->selection_end != ext->tmp_sel_end) { - ext_label->selection_start = ext->tmp_sel_start; - ext_label->selection_end = ext->tmp_sel_end; - lv_obj_invalidate(ta); - } - } else { - if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { - ext_label->selection_start = -1; - ext_label->selection_end = -1; - lv_obj_invalidate(ta); - } - } - /*Finish selection if necessary */ - if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { - ext->selecting = 0; - } + /*If the selected area has changed then update the real values and*/ + /*invalidate the text area.*/ + if(ext->tmp_sel_start > ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_end || + ext_label->selection_end != ext->tmp_sel_start) { + ext_label->selection_start = ext->tmp_sel_end; + ext_label->selection_end = ext->tmp_sel_start; + lv_obj_invalidate(ta); + } + } else if(ext->tmp_sel_start < ext->tmp_sel_end) { + if(ext_label->selection_start != ext->tmp_sel_start || + ext_label->selection_end != ext->tmp_sel_end) { + ext_label->selection_start = ext->tmp_sel_start; + ext_label->selection_end = ext->tmp_sel_end; + lv_obj_invalidate(ta); + } + } else { + if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { + ext_label->selection_start = -1; + ext_label->selection_end = -1; + lv_obj_invalidate(ta); + } + } + /*Finish selection if necessary */ + if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + ext->selecting = 0; + } } - - } #endif diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 53c8716b939a..7a9befbf0ac0 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -49,7 +49,7 @@ enum { LV_CURSOR_BLOCK, LV_CURSOR_OUTLINE, LV_CURSOR_UNDERLINE, - LV_CURSOR_HIDDEN = 0x08, /*Or it to any value to hide the cursor temporally*/ + LV_CURSOR_HIDDEN = 0x08, /*Or it to any value to hide the cursor temporally*/ }; typedef uint8_t lv_cursor_type_t; @@ -58,26 +58,31 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * label; /*Label of the text area*/ - lv_obj_t * placeholder; /*Place holder label of the text area, only visible if text is an empty string*/ - char * pwd_tmp; /*Used to store the original text in password mode*/ - const char * accapted_chars;/*Only these characters will be accepted. NULL: accept all*/ - uint16_t max_length; /*The max. number of characters. 0: no limit*/ - uint8_t pwd_mode :1; /*Replace characters with '*' */ - uint8_t one_line :1; /*One line mode (ignore line breaks)*/ - struct { - lv_style_t *style; /*Style of the cursor (NULL to use label's style)*/ - lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter line. (Handled by the library)*/ - uint16_t pos; /*The current cursor position (0: before 1. letter; 1: before 2. letter etc.)*/ - lv_area_t area; /*Cursor area relative to the Text Area*/ - uint16_t txt_byte_pos; /*Byte index of the letter after (on) the cursor*/ - lv_cursor_type_t type:4; /*Shape of the cursor*/ - uint8_t state :1; /*Indicates that the cursor is visible now or not (Handled by the library)*/ + lv_obj_t * label; /*Label of the text area*/ + lv_obj_t * placeholder; /*Place holder label of the text area, only visible if text is an empty + string*/ + char * pwd_tmp; /*Used to store the original text in password mode*/ + const char * accapted_chars; /*Only these characters will be accepted. NULL: accept all*/ + uint16_t max_length; /*The max. number of characters. 0: no limit*/ + uint8_t pwd_mode : 1; /*Replace characters with '*' */ + uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ + struct + { + lv_style_t * style; /*Style of the cursor (NULL to use label's style)*/ + lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter + line. (Handled by the library)*/ + uint16_t + pos; /*The current cursor position (0: before 1. letter; 1: before 2. letter etc.)*/ + lv_area_t area; /*Cursor area relative to the Text Area*/ + uint16_t txt_byte_pos; /*Byte index of the letter after (on) the cursor*/ + lv_cursor_type_t type : 4; /*Shape of the cursor*/ + uint8_t + state : 1; /*Indicates that the cursor is visible now or not (Handled by the library)*/ } cursor; - int tmp_sel_start; /*Temporary value*/ - int tmp_sel_end; /*Temporary value*/ - uint8_t selecting :1; /*User is in process of selecting */ - uint8_t sel_mode :1; /*Text can be selected on this text area*/ + int tmp_sel_start; /*Temporary value*/ + int tmp_sel_end; /*Temporary value*/ + uint8_t selecting : 1; /*User is in process of selecting */ + uint8_t sel_mode : 1; /*Text can be selected on this text area*/ } lv_ta_ext_t; enum { @@ -93,7 +98,6 @@ typedef uint8_t lv_ta_style_t; * GLOBAL PROTOTYPES **********************/ - /** * Create a text area objects * @param par pointer to an object, it will be the parent of the new text area @@ -102,7 +106,6 @@ typedef uint8_t lv_ta_style_t; */ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy); - /*====================== * Add/remove functions *=====================*/ @@ -146,10 +149,10 @@ void lv_ta_del_char_forward(lv_obj_t * ta); void lv_ta_set_text(lv_obj_t * ta, const char * txt); /** -* Set the placeholder text of a text area -* @param ta pointer to a text area -* @param txt pointer to the text -*/ + * Set the placeholder text of a text area + * @param ta pointer to a text area + * @param txt pointer to the text + */ void lv_ta_set_placeholder_text(lv_obj_t * ta, const char * txt); /** @@ -210,7 +213,8 @@ void lv_ta_set_max_length(lv_obj_t * ta, uint16_t num); * It can be used to add automatic formatting to the text area. * @param ta pointer to a text area. * @param txt pointer to a new string to insert. If `""` no text will be added. - * The variable must be live after the `event_cb` exists. (Should be `global` or `static`) + * The variable must be live after the `event_cb` exists. (Should be `global` or + * `static`) */ void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt); @@ -225,7 +229,8 @@ static inline void lv_ta_set_sb_mode(lv_obj_t * ta, lv_sb_mode_t mode) } /** - * Enable the scroll propagation feature. If enabled then the Text area will move its parent if there is no more space to scroll. + * Enable the scroll propagation feature. If enabled then the Text area will move its parent if + * there is no more space to scroll. * @param ta pointer to a Text area * @param en true or false to enable/disable scroll propagation */ @@ -250,14 +255,14 @@ static inline void lv_ta_set_edge_flash(lv_obj_t * ta, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_ta_set_style(lv_obj_t *ta, lv_ta_style_t type, lv_style_t *style); +void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style); /** * Enable/disable selection mode. * @param ta pointer to a text area object * @param en true or false to enable/disable selection mode */ -void lv_ta_set_sel_mode(lv_obj_t *ta, bool en); +void lv_ta_set_sel_mode(lv_obj_t * ta, bool en); /*===================== * Getter functions @@ -271,10 +276,10 @@ void lv_ta_set_sel_mode(lv_obj_t *ta, bool en); const char * lv_ta_get_text(const lv_obj_t * ta); /** -* Get the placeholder text of a text area -* @param ta pointer to a text area object -* @return pointer to the text -*/ + * Get the placeholder text of a text area + * @param ta pointer to a text area object + * @return pointer to the text + */ const char * lv_ta_get_placeholder_text(lv_obj_t * ta); /** @@ -296,7 +301,7 @@ uint16_t lv_ta_get_cursor_pos(const lv_obj_t * ta); * @param ta pointer to a text area object * @return true: the cursor is drawn, false: the cursor is hidden */ -//bool lv_ta_get_cursor_show(const lv_obj_t * ta); +// bool lv_ta_get_cursor_show(const lv_obj_t * ta); /** * Get the current cursor type. @@ -369,7 +374,7 @@ static inline bool lv_ta_get_edge_flash(lv_obj_t * ta) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ta_get_style(const lv_obj_t *ta, lv_ta_style_t type); +lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type); /** * Get the selection index of the text area. @@ -388,14 +393,14 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end); * @param ta Text area object * @return whether text is selected or not */ -bool lv_ta_text_is_selected(const lv_obj_t *ta); +bool lv_ta_text_is_selected(const lv_obj_t * ta); /** * Find whether selection mode is enabled. * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_sel_mode(lv_obj_t *ta); +bool lv_ta_get_sel_mode(lv_obj_t * ta); /*===================== * Other functions @@ -435,10 +440,10 @@ void lv_ta_cursor_up(lv_obj_t * ta); * MACROS **********************/ -#endif /*LV_USE_TA_H*/ +#endif /*LV_USE_TA_H*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_TA_H*/ +#endif /*LV_TA_H*/ diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index 43b9c8352b66..0ae17c75688d 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -67,13 +67,13 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_scrl_design == NULL) ancestor_scrl_design = lv_obj_get_design_func(new_table); /*Initialize the allocated 'ext' */ - ext->cell_data = NULL; + ext->cell_data = NULL; ext->cell_style[0] = &lv_style_plain; ext->cell_style[1] = &lv_style_plain; ext->cell_style[2] = &lv_style_plain; ext->cell_style[3] = &lv_style_plain; - ext->col_cnt = 0; - ext->row_cnt = 0; + ext->col_cnt = 0; + ext->row_cnt = 0; uint16_t i; for(i = 0; i < LV_TABLE_COL_MAX; i++) { @@ -101,12 +101,12 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing table*/ else { lv_table_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->cell_style[0] = copy_ext->cell_style[0]; - ext->cell_style[1] = copy_ext->cell_style[1]; - ext->cell_style[2] = copy_ext->cell_style[2]; - ext->cell_style[3] = copy_ext->cell_style[3]; - ext->col_cnt = copy_ext->col_cnt; - ext->row_cnt = copy_ext->row_cnt; + ext->cell_style[0] = copy_ext->cell_style[0]; + ext->cell_style[1] = copy_ext->cell_style[1]; + ext->cell_style[2] = copy_ext->cell_style[2]; + ext->cell_style[3] = copy_ext->cell_style[3]; + ext->col_cnt = copy_ext->col_cnt; + ext->row_cnt = copy_ext->row_cnt; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_table); @@ -126,7 +126,8 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) * @param table pointer to a Table object * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] - * @param txt text to display in the cell. It will be copied and saved so this variable is not required after this function call. + * @param txt text to display in the cell. It will be copied and saved so this variable is not + * required after this function call. */ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const char * txt) { @@ -144,15 +145,15 @@ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const } /*Initialize the format byte*/ else { - format.s.align = LV_LABEL_ALIGN_LEFT; + format.s.align = LV_LABEL_ALIGN_LEFT; format.s.right_merge = 0; - format.s.type = 0; - format.s.crop = 0; + format.s.type = 0; + format.s.crop = 0; } - - ext->cell_data[cell] = lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/ - strcpy(ext->cell_data[cell] + 1, txt); /*Leave the format byte*/ + ext->cell_data[cell] = + lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/ + strcpy(ext->cell_data[cell] + 1, txt); /*Leave the format byte*/ ext->cell_data[cell][0] = format.format_byte; refr_size(table); } @@ -166,19 +167,20 @@ void lv_table_set_row_cnt(lv_obj_t * table, uint16_t row_cnt) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); uint16_t old_row_cnt = ext->row_cnt; - ext->row_cnt = row_cnt; + ext->row_cnt = row_cnt; if(ext->row_cnt > 0 && ext->col_cnt > 0) { - ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char*)); + ext->cell_data = + lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); /*Initilize the new fields*/ if(old_row_cnt < row_cnt) { - uint16_t old_cell_cnt = old_row_cnt * ext->col_cnt; - uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; - memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); + uint16_t old_cell_cnt = old_row_cnt * ext->col_cnt; + uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; + memset(&ext->cell_data[old_cell_cnt], 0, + (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); } - } - else { + } else { lv_mem_free(ext->cell_data); ext->cell_data = NULL; } @@ -201,19 +203,20 @@ void lv_table_set_col_cnt(lv_obj_t * table, uint16_t col_cnt) lv_table_ext_t * ext = lv_obj_get_ext_attr(table); uint16_t old_col_cnt = ext->col_cnt; - ext->col_cnt = col_cnt; + ext->col_cnt = col_cnt; if(ext->row_cnt > 0 && ext->col_cnt > 0) { - ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char*)); + ext->cell_data = + lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); /*Initilize the new fields*/ if(old_col_cnt < col_cnt) { - uint16_t old_cell_cnt = old_col_cnt * ext->row_cnt; - uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; - memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); + uint16_t old_cell_cnt = old_col_cnt * ext->row_cnt; + uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; + memset(&ext->cell_data[old_cell_cnt], 0, + (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); } - } - else { + } else { lv_mem_free(ext->cell_data); ext->cell_data = NULL; } @@ -234,7 +237,7 @@ void lv_table_set_col_width(lv_obj_t * table, uint16_t col_id, lv_coord_t w) } lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - ext->col_w[col_id] = w; + ext->col_w[col_id] = w; refr_size(table); } @@ -248,22 +251,22 @@ void lv_table_set_col_width(lv_obj_t * table, uint16_t col_id, lv_coord_t w) void lv_table_set_cell_align(lv_obj_t * table, uint16_t row, uint16_t col, lv_label_align_t align) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_set_cell_align: invalid row or column"); - return; - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) { - ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ - ext->cell_data[cell][0] = 0; - ext->cell_data[cell][1] = '\0'; - } - - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - format.s.align = align; - ext->cell_data[cell][0] = format.format_byte; + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_set_cell_align: invalid row or column"); + return; + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) { + ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ + ext->cell_data[cell][0] = 0; + ext->cell_data[cell][1] = '\0'; + } + + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + format.s.align = align; + ext->cell_data[cell][0] = format.format_byte; } /** @@ -276,25 +279,25 @@ void lv_table_set_cell_align(lv_obj_t * table, uint16_t row, uint16_t col, lv_la void lv_table_set_cell_type(lv_obj_t * table, uint16_t row, uint16_t col, uint8_t type) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_set_cell_type: invalid row or column"); - return; - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) { - ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ - ext->cell_data[cell][0] = 0; - ext->cell_data[cell][1] = '\0'; - } - - if(type > 0) type--; /*User gives 1,2,3,4 but easier to handle 0, 1, 2, 3*/ - if(type >= LV_TABLE_CELL_STYLE_CNT) type = LV_TABLE_CELL_STYLE_CNT - 1; - - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - format.s.type = type; - ext->cell_data[cell][0] = format.format_byte; + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_set_cell_type: invalid row or column"); + return; + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) { + ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ + ext->cell_data[cell][0] = 0; + ext->cell_data[cell][1] = '\0'; + } + + if(type > 0) type--; /*User gives 1,2,3,4 but easier to handle 0, 1, 2, 3*/ + if(type >= LV_TABLE_CELL_STYLE_CNT) type = LV_TABLE_CELL_STYLE_CNT - 1; + + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + format.s.type = type; + ext->cell_data[cell][0] = format.format_byte; } /** @@ -307,24 +310,23 @@ void lv_table_set_cell_type(lv_obj_t * table, uint16_t row, uint16_t col, uint8_ void lv_table_set_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col, bool crop) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_set_cell_crop: invalid row or column"); - return; - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) { - ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ - ext->cell_data[cell][0] = 0; - ext->cell_data[cell][1] = '\0'; - } - - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - format.s.crop = crop; - ext->cell_data[cell][0] = format.format_byte; -} + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_set_cell_crop: invalid row or column"); + return; + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) { + ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ + ext->cell_data[cell][0] = 0; + ext->cell_data[cell][1] = '\0'; + } + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + format.s.crop = crop; + ext->cell_data[cell][0] = format.format_byte; +} /** * Merge a cell with the right neighbor. The value of the cell to the right won't be displayed. @@ -344,14 +346,14 @@ void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, uint32_t cell = row * ext->col_cnt + col; if(ext->cell_data[cell] == NULL) { - ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ + ext->cell_data[cell] = lv_mem_alloc(2); /*+1: trailing '\0; +1: format byte*/ ext->cell_data[cell][0] = 0; ext->cell_data[cell][1] = '\0'; } lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - format.s.right_merge = en ? 1 : 0; + format.format_byte = ext->cell_data[cell][0]; + format.s.right_merge = en ? 1 : 0; ext->cell_data[cell][0] = format.format_byte; refr_size(table); } @@ -412,7 +414,7 @@ const char * lv_table_get_cell_value(lv_obj_t * table, uint16_t row, uint16_t co if(ext->cell_data[cell] == NULL) return ""; - return &ext->cell_data[cell][1]; /*Skip the format byte*/ + return &ext->cell_data[cell][1]; /*Skip the format byte*/ } /** @@ -459,23 +461,25 @@ lv_coord_t lv_table_get_col_width(lv_obj_t * table, uint16_t col_id) * @param table pointer to a Table object * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] - * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or LV_LABEL_ALIGN_RIGHT + * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or + * LV_LABEL_ALIGN_RIGHT */ lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_t col) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_set_cell_align: invalid row or column"); - return LV_LABEL_ALIGN_LEFT; /*Just return with something*/ - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) return LV_LABEL_ALIGN_LEFT; /*Just return with something*/ - else { - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - return format.s.align; - } + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_set_cell_align: invalid row or column"); + return LV_LABEL_ALIGN_LEFT; /*Just return with something*/ + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) + return LV_LABEL_ALIGN_LEFT; /*Just return with something*/ + else { + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + return format.s.align; + } } /** @@ -488,18 +492,19 @@ lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_ lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t col) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_get_cell_type: invalid row or column"); - return 1; /*Just return with something*/ - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) return 1; /*Just return with something*/ - else { - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - return format.s.type + 1; /*0,1,2,3 is stored but user sees 1,2,3,4*/ - } + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_get_cell_type: invalid row or column"); + return 1; /*Just return with something*/ + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) + return 1; /*Just return with something*/ + else { + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + return format.s.type + 1; /*0,1,2,3 is stored but user sees 1,2,3,4*/ + } } /** @@ -512,18 +517,19 @@ lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t lv_label_align_t lv_table_get_cell_crop(lv_obj_t * table, uint16_t row, uint16_t col) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - if(row >= ext->row_cnt || col >= ext->col_cnt) { - LV_LOG_WARN("lv_table_get_cell_crop: invalid row or column"); - return false; /*Just return with something*/ - } - uint32_t cell = row * ext->col_cnt + col; - - if(ext->cell_data[cell] == NULL) return false; /*Just return with something*/ - else { - lv_table_cell_format_t format; - format.format_byte = ext->cell_data[cell][0]; - return format.s.crop; - } + if(row >= ext->row_cnt || col >= ext->col_cnt) { + LV_LOG_WARN("lv_table_get_cell_crop: invalid row or column"); + return false; /*Just return with something*/ + } + uint32_t cell = row * ext->col_cnt + col; + + if(ext->cell_data[cell] == NULL) + return false; /*Just return with something*/ + else { + lv_table_cell_format_t format; + format.format_byte = ext->cell_data[cell][0]; + return format.s.crop; + } } /** @@ -543,7 +549,8 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) uint32_t cell = row * ext->col_cnt + col; - if(ext->cell_data[cell] == NULL) return false; + if(ext->cell_data[cell] == NULL) + return false; else { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; @@ -560,26 +567,15 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - lv_style_t * style = NULL; + lv_style_t * style = NULL; switch(type) { - case LV_TABLE_STYLE_BG: - style = lv_obj_get_style(table); - break; - case LV_TABLE_STYLE_CELL1: - style = ext->cell_style[0]; - break; - case LV_TABLE_STYLE_CELL2: - style = ext->cell_style[1]; - break; - case LV_TABLE_STYLE_CELL3: - style = ext->cell_style[2]; - break; - case LV_TABLE_STYLE_CELL4: - style = ext->cell_style[3]; - break; - default: - return NULL; + case LV_TABLE_STYLE_BG: style = lv_obj_get_style(table); break; + case LV_TABLE_STYLE_CELL1: style = ext->cell_style[0]; break; + case LV_TABLE_STYLE_CELL2: style = ext->cell_style[1]; break; + case LV_TABLE_STYLE_CELL3: style = ext->cell_style[2]; break; + case LV_TABLE_STYLE_CELL4: style = ext->cell_style[3]; break; + default: return NULL; } return style; @@ -609,7 +605,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ else if(mode == LV_DESIGN_DRAW_MAIN) { ancestor_scrl_design(table, mask, mode); - lv_table_ext_t * ext = lv_obj_get_ext_attr(table); + lv_table_ext_t * ext = lv_obj_get_ext_attr(table); lv_style_t * bg_style = lv_obj_get_style(table); lv_style_t * cell_style; lv_coord_t h_row; @@ -639,22 +635,24 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ format.format_byte = ext->cell_data[cell][0]; } else { format.s.right_merge = 0; - format.s.align = LV_LABEL_ALIGN_LEFT; - format.s.type = 0; - format.s.crop = 1; + format.s.align = LV_LABEL_ALIGN_LEFT; + format.s.type = 0; + format.s.crop = 1; } - cell_style = ext->cell_style[format.s.type]; + cell_style = ext->cell_style[format.s.type]; cell_area.x1 = cell_area.x2; cell_area.x2 = cell_area.x1 + ext->col_w[col]; uint16_t col_merge = 0; - for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge ++) { + for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) { if(ext->cell_data[cell + col_merge] != NULL) { format.format_byte = ext->cell_data[cell + col_merge][0]; - if(format.s.right_merge) cell_area.x2 += ext->col_w[col + col_merge + 1]; - else break; + if(format.s.right_merge) + cell_area.x2 += ext->col_w[col + col_merge + 1]; + else + break; } else { break; } @@ -676,7 +674,8 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ } lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, - cell_style->text.letter_space, cell_style->text.line_space, lv_area_get_width(&txt_area), txt_flags); + cell_style->text.letter_space, cell_style->text.line_space, + lv_area_get_width(&txt_area), txt_flags); /*Align the content to the middle if not cropped*/ if(format.s.crop == 0) { @@ -685,23 +684,18 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ } switch(format.s.align) { - default: - case LV_LABEL_ALIGN_LEFT: - txt_flags |= LV_TXT_FLAG_NONE; - break; - case LV_LABEL_ALIGN_RIGHT: - txt_flags |= LV_TXT_FLAG_RIGHT; - break; - case LV_LABEL_ALIGN_CENTER: - txt_flags |= LV_TXT_FLAG_CENTER; - break; + default: + case LV_LABEL_ALIGN_LEFT: txt_flags |= LV_TXT_FLAG_NONE; break; + case LV_LABEL_ALIGN_RIGHT: txt_flags |= LV_TXT_FLAG_RIGHT; break; + case LV_LABEL_ALIGN_CENTER: txt_flags |= LV_TXT_FLAG_CENTER; break; } lv_area_t label_mask; bool label_mask_ok; label_mask_ok = lv_area_intersect(&label_mask, mask, &cell_area); if(label_mask_ok) { - lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, ext->cell_data[cell] + 1, txt_flags, NULL, -1, -1); + lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, + ext->cell_data[cell] + 1, txt_flags, NULL, -1, -1); } /*Draw lines after '\n's*/ lv_point_t p1; @@ -712,8 +706,10 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ for(i = 1; ext->cell_data[cell][i] != '\0'; i++) { if(ext->cell_data[cell][i] == '\n') { ext->cell_data[cell][i] = '\0'; - lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, - cell_style->text.letter_space, cell_style->text.line_space, lv_area_get_width(&txt_area), txt_flags); + lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, + cell_style->text.font, cell_style->text.letter_space, + cell_style->text.line_space, + lv_area_get_width(&txt_area), txt_flags); p1.y = txt_area.y1 + txt_size.y + cell_style->text.line_space / 2; p2.y = txt_area.y1 + txt_size.y + cell_style->text.line_space / 2; @@ -731,7 +727,6 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - } return true; @@ -752,7 +747,6 @@ static lv_res_t lv_table_signal(lv_obj_t * table, lv_signal_t sign, void * param res = ancestor_signal(table, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Free the cell texts*/ lv_table_ext_t * ext = lv_obj_get_ext_attr(table); @@ -766,7 +760,7 @@ static lv_res_t lv_table_signal(lv_obj_t * table, lv_signal_t sign, void * param } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_table"; @@ -783,10 +777,10 @@ static void refr_size(lv_obj_t * table) lv_table_ext_t * ext = lv_obj_get_ext_attr(table); uint16_t i; - for(i= 0; i < ext->col_cnt; i++) { + for(i = 0; i < ext->col_cnt; i++) { w += ext->col_w[i]; } - for(i= 0; i < ext->row_cnt; i++) { + for(i = 0; i < ext->row_cnt; i++) { h += get_row_height(table, i); } @@ -810,20 +804,23 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) uint16_t cell; uint16_t col; lv_coord_t h_max = lv_font_get_height(ext->cell_style[0]->text.font) + - ext->cell_style[0]->body.padding.top + ext->cell_style[0]->body.padding.bottom; + ext->cell_style[0]->body.padding.top + + ext->cell_style[0]->body.padding.bottom; - for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col ++) { + for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col++) { if(ext->cell_data[cell] != NULL) { - txt_w = ext->col_w[col]; + txt_w = ext->col_w[col]; uint16_t col_merge = 0; - for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge ++) { + for(col_merge = 0; col_merge + col < ext->col_cnt - 1; col_merge++) { if(ext->cell_data[cell + col_merge] != NULL) { lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell + col_merge][0]; - if(format.s.right_merge) txt_w += ext->col_w[col + col_merge + 1]; - else break; + if(format.s.right_merge) + txt_w += ext->col_w[col + col_merge + 1]; + else + break; } else { break; } @@ -831,24 +828,26 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) lv_table_cell_format_t format; format.format_byte = ext->cell_data[cell][0]; - cell_style = ext->cell_style[format.s.type]; + cell_style = ext->cell_style[format.s.type]; /*With text crop assume 1 line*/ if(format.s.crop) { - h_max = LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + - cell_style->body.padding.top + cell_style->body.padding.bottom, - h_max); + h_max = + LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + + cell_style->body.padding.top + cell_style->body.padding.bottom, + h_max); } /*Without text crop calculate the height of the text in the cell*/ else { txt_w -= cell_style->body.padding.left + cell_style->body.padding.right; lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, - cell_style->text.letter_space, cell_style->text.line_space, txt_w, LV_TXT_FLAG_NONE); + cell_style->text.letter_space, cell_style->text.line_space, txt_w, + LV_TXT_FLAG_NONE); - h_max = LV_MATH_MAX(txt_size.y + - cell_style->body.padding.top + cell_style->body.padding.bottom, - h_max); + h_max = LV_MATH_MAX(txt_size.y + cell_style->body.padding.top + + cell_style->body.padding.bottom, + h_max); cell += col_merge; col += col_merge; } diff --git a/src/lv_objx/lv_table.h b/src/lv_objx/lv_table.h index c11dff3362b5..862a76d7af00 100644 --- a/src/lv_objx/lv_table.h +++ b/src/lv_objx/lv_table.h @@ -33,7 +33,7 @@ extern "C" { * DEFINES *********************/ #ifndef LV_TABLE_COL_MAX -#define LV_TABLE_COL_MAX 12 +#define LV_TABLE_COL_MAX 12 #endif #define LV_TABLE_CELL_STYLE_CNT 4 @@ -41,18 +41,21 @@ extern "C" { * TYPEDEFS **********************/ -typedef union { - struct { - uint8_t align:2; - uint8_t right_merge:1; - uint8_t type:2; - uint8_t crop:1; +typedef union +{ + struct + { + uint8_t align : 2; + uint8_t right_merge : 1; + uint8_t type : 2; + uint8_t crop : 1; } s; uint8_t format_byte; -}lv_table_cell_format_t; +} lv_table_cell_format_t; /*Data of table*/ -typedef struct { +typedef struct +{ /*New data for this type */ uint16_t col_cnt; uint16_t row_cnt; @@ -61,7 +64,6 @@ typedef struct { lv_coord_t col_w[LV_TABLE_COL_MAX]; } lv_table_ext_t; - /*Styles*/ enum { LV_TABLE_STYLE_BG, @@ -72,7 +74,6 @@ enum { }; typedef uint8_t lv_table_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -94,7 +95,8 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy); * @param table pointer to a Table object * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] - * @param txt text to display in the cell. It will be copied and saved so this variable is not required after this function call. + * @param txt text to display in the cell. It will be copied and saved so this variable is not + * required after this function call. */ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const char * txt); @@ -204,7 +206,8 @@ lv_coord_t lv_table_get_col_width(lv_obj_t * table, uint16_t col_id); * @param table pointer to a Table object * @param row id of the row [0 .. row_cnt -1] * @param col id of the column [0 .. col_cnt -1] - * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or LV_LABEL_ALIGN_RIGHT + * @return LV_LABEL_ALIGN_LEFT (default in case of error) or LV_LABEL_ALIGN_CENTER or + * LV_LABEL_ALIGN_RIGHT */ lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_t col); @@ -217,7 +220,6 @@ lv_label_align_t lv_table_get_cell_align(lv_obj_t * table, uint16_t row, uint16_ */ lv_label_align_t lv_table_get_cell_type(lv_obj_t * table, uint16_t row, uint16_t col); - /** * Get the crop property of a cell * @param table pointer to a Table object @@ -252,10 +254,10 @@ lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type); * MACROS **********************/ -#endif /*LV_USE_TABLE*/ +#endif /*LV_USE_TABLE*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_TABLE_H*/ +#endif /*LV_TABLE_H*/ diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 9ac94c2b01f3..56c9911db98e 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -17,12 +17,13 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -# ifndef LV_TABVIEW_ANIM_TIME -# define LV_TABVIEW_DEF_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ -# endif +#ifndef LV_TABVIEW_ANIM_TIME +#define LV_TABVIEW_DEF_ANIM_TIME \ + 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +#endif #else -# undef LV_TABVIEW_DEF_ANIM_TIME -# define LV_TABVIEW_DEF_ANIM_TIME 0 /*No animations*/ +#undef LV_TABVIEW_DEF_ANIM_TIME +#define LV_TABVIEW_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -80,20 +81,19 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) if(ext == NULL) return NULL; /*Initialize the allocated 'ext' */ - ext->drag_hor = 0; - ext->draging = 0; - ext->scroll_ver = 0; + ext->drag_hor = 0; + ext->draging = 0; + ext->scroll_ver = 0; ext->slide_enable = 1; - ext->tab_cur = 0; + ext->tab_cur = 0; ext->point_last.x = 0; ext->point_last.y = 0; - ext->content = NULL; - ext->indic = NULL; - ext->btns = NULL; - ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; - ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; - ext->btns_hide = 0; - + ext->content = NULL; + ext->indic = NULL; + ext->btns = NULL; + ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; + ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; + ext->btns_hide = 0; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_tabview, lv_tabview_signal); @@ -104,7 +104,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; ext->tab_name_ptr[0] = ""; - ext->tab_cnt = 0; + ext->tab_cnt = 0; lv_obj_set_size(new_tabview, LV_DPI * 3, LV_DPI * 2); @@ -122,7 +122,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); lv_cont_set_style(ext->content, &lv_style_transp_tight); - lv_obj_set_height(ext->content, lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); + lv_obj_set_height(ext->content, + lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); /*Set the default styles*/ @@ -133,8 +134,10 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, th->style.tabview.btn.bg); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_REL, th->style.tabview.btn.rel); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_PR, th->style.tabview.btn.pr); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, th->style.tabview.btn.tgl_rel); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, th->style.tabview.btn.tgl_pr); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, + th->style.tabview.btn.tgl_rel); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, + th->style.tabview.btn.tgl_pr); } else { lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, &lv_style_plain); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, &lv_style_transp); @@ -144,12 +147,12 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing tab view*/ else { lv_tabview_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->point_last.x = 0; - ext->point_last.y = 0; - ext->btns = lv_btnm_create(new_tabview, copy_ext->btns); - ext->indic = lv_obj_create(ext->btns, copy_ext->indic); - ext->content = lv_cont_create(new_tabview, copy_ext->content); - ext->anim_time = copy_ext->anim_time; + ext->point_last.x = 0; + ext->point_last.y = 0; + ext->btns = lv_btnm_create(new_tabview, copy_ext->btns); + ext->indic = lv_obj_create(ext->btns, copy_ext->indic); + ext->content = lv_cont_create(new_tabview, copy_ext->content); + ext->anim_time = copy_ext->anim_time; ext->tab_name_ptr = lv_mem_alloc(sizeof(char *)); lv_mem_assert(ext->tab_name_ptr); @@ -161,18 +164,20 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_t * new_tab; lv_obj_t * copy_tab; for(i = 0; i < copy_ext->tab_cnt; i++) { - new_tab = lv_tabview_add_tab(new_tabview, copy_ext->tab_name_ptr[i]); + new_tab = lv_tabview_add_tab(new_tabview, copy_ext->tab_name_ptr[i]); copy_tab = lv_tabview_get_tab(copy, i); - lv_page_set_style(new_tab, LV_PAGE_STYLE_BG, lv_page_get_style(copy_tab, LV_PAGE_STYLE_BG)); - lv_page_set_style(new_tab, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SCRL)); - lv_page_set_style(new_tab, LV_PAGE_STYLE_SB, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SB)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_BG, + lv_page_get_style(copy_tab, LV_PAGE_STYLE_BG)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_SCRL, + lv_page_get_style(copy_tab, LV_PAGE_STYLE_SCRL)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_SB, + lv_page_get_style(copy_tab, LV_PAGE_STYLE_SB)); } /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_tabview); } - LV_LOG_INFO("tab view created"); return new_tabview; @@ -200,7 +205,7 @@ void lv_tabview_clean(lv_obj_t * obj) */ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); /*Create the container page*/ lv_obj_t * h = lv_page_create(ext->content, NULL); @@ -227,27 +232,31 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) if(ext->tab_name_ptr == NULL) return NULL; ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm; - ext->tab_name_ptr[ext->tab_cnt] = ""; + ext->tab_name_ptr[ext->tab_cnt] = ""; - /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by `lv_mem_realloc`. - * So make its current map invalid*/ + /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by + * `lv_mem_realloc`. So make its current map invalid*/ lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); - btnm_ext->map_p = NULL; + btnm_ext->map_p = NULL; lv_btnm_set_map(ext->btns, ext->tab_name_ptr); lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); /*Modify the indicator size*/ lv_style_t * style_tabs = lv_obj_get_style(ext->btns); - lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - - style_tabs->body.padding.left - style_tabs->body.padding.right) / ext->tab_cnt; + lv_coord_t indic_width = + (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - + style_tabs->body.padding.left - style_tabs->body.padding.right) / + ext->tab_cnt; lv_obj_set_width(ext->indic, indic_width); - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + style_tabs->body.padding.inner * ext->tab_cur + style_tabs->body.padding.left); + lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + + style_tabs->body.padding.inner * ext->tab_cur + + style_tabs->body.padding.left); /*Set the first btn as active*/ if(ext->tab_cnt == 1) { ext->tab_cur = 0; - tabview_realign(tabview); /*To set the proper btns height*/ + tabview_realign(tabview); /*To set the proper btns height*/ } lv_tabview_set_tab_act(tabview, ext->tab_cur, false); @@ -280,55 +289,56 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_SELECTED, &id); if(res != LV_RES_OK) return; - lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, false); ext->tab_cur = id; - lv_coord_t cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + style->body.padding.left); + lv_coord_t cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + + style->body.padding.left); if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->content, cont_x); } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = ext->content; - a.start = lv_obj_get_x(ext->content); - a.end = cont_x; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; + a.var = ext->content; + a.start = lv_obj_get_x(ext->content); + a.end = cont_x; + a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif } /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); + lv_coord_t indic_width = lv_obj_get_width(ext->indic); lv_style_t * tabs_style = lv_obj_get_style(ext->btns); - lv_coord_t indic_x = indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; + lv_coord_t indic_x = + indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->indic, indic_x); } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = ext->indic; - a.start = lv_obj_get_x(ext->indic); - a.end = indic_x; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; + a.var = ext->indic; + a.start = lv_obj_get_x(ext->indic); + a.end = indic_x; + a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); #endif } @@ -343,8 +353,8 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) */ void lv_tabview_set_sliding(lv_obj_t * tabview, bool en) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - ext->slide_enable = en == false ? 0 : 1; + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + ext->slide_enable = en == false ? 0 : 1; } /** @@ -354,7 +364,7 @@ void lv_tabview_set_sliding(lv_obj_t * tabview, bool en) */ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); #if LV_USE_ANIMATION == 0 anim_time = 0; #endif @@ -372,9 +382,7 @@ void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, lv_style_ lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); switch(type) { - case LV_TABVIEW_STYLE_BG: - lv_obj_set_style(tabview, style); - break; + case LV_TABVIEW_STYLE_BG: lv_obj_set_style(tabview, style); break; case LV_TABVIEW_STYLE_BTN_BG: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BG, style); tabview_realign(tabview); @@ -418,12 +426,12 @@ void lv_tabview_set_btns_pos(lv_obj_t * tabview, lv_tabview_btns_pos_t btns_pos) * @param tabview pointer to a tab view object * @param en whether tab buttons are hidden */ -void lv_tabview_set_btns_hidden(lv_obj_t *tabview, bool en) +void lv_tabview_set_btns_hidden(lv_obj_t * tabview, bool en) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - ext->btns_hide = en; - tabview_realign(tabview); + ext->btns_hide = en; + tabview_realign(tabview); } /*===================== @@ -437,7 +445,7 @@ void lv_tabview_set_btns_hidden(lv_obj_t *tabview, bool en) */ uint16_t lv_tabview_get_tab_act(const lv_obj_t * tabview) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); return ext->tab_cur; } @@ -448,7 +456,7 @@ uint16_t lv_tabview_get_tab_act(const lv_obj_t * tabview) */ uint16_t lv_tabview_get_tab_count(const lv_obj_t * tabview) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); return ext->tab_cnt; } @@ -461,8 +469,8 @@ uint16_t lv_tabview_get_tab_count(const lv_obj_t * tabview) lv_obj_t * lv_tabview_get_tab(const lv_obj_t * tabview, uint16_t id) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - uint16_t i = 0; - lv_obj_t * page = lv_obj_get_child_back(ext->content, NULL); + uint16_t i = 0; + lv_obj_t * page = lv_obj_get_child_back(ext->content, NULL); while(page != NULL && i != id) { i++; @@ -492,7 +500,7 @@ bool lv_tabview_get_sliding(const lv_obj_t * tabview) */ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); return ext->anim_time; } @@ -504,16 +512,12 @@ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview) */ lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type) { - lv_style_t * style = NULL; + lv_style_t * style = NULL; lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); switch(type) { - case LV_TABVIEW_STYLE_BG: - style = lv_obj_get_style(tabview); - break; - case LV_TABVIEW_STYLE_BTN_BG: - style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BG); - break; + case LV_TABVIEW_STYLE_BG: style = lv_obj_get_style(tabview); break; + case LV_TABVIEW_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BG); break; case LV_TABVIEW_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_REL); break; @@ -526,9 +530,7 @@ lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t t case LV_TABVIEW_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR); break; - default: - style = NULL; - break; + default: style = NULL; break; } return style; @@ -549,11 +551,11 @@ lv_tabview_btns_pos_t lv_tabview_get_btns_pos(const lv_obj_t * tabview) * @param tabview pointer to a tab view object * @return whether tab buttons are hidden */ -bool lv_tabview_get_btns_hidden(const lv_obj_t *tabview) +bool lv_tabview_get_btns_hidden(const lv_obj_t * tabview) { - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - return ext->btns_hide; + return ext->btns_hide; } /********************** @@ -582,30 +584,26 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_mem_free(ext->tab_name_ptr); ext->tab_name_ptr = NULL; - ext->btns = NULL; /*These objects were children so they are already invalid*/ - ext->content = NULL; - } - else if(sign == LV_SIGNAL_CORD_CHG) { - if(ext->content != NULL && - (lv_obj_get_width(tabview) != lv_area_get_width(param) || - lv_obj_get_height(tabview) != lv_area_get_height(param))) { + ext->btns = NULL; /*These objects were children so they are already invalid*/ + ext->content = NULL; + } else if(sign == LV_SIGNAL_CORD_CHG) { + if(ext->content != NULL && (lv_obj_get_width(tabview) != lv_area_get_width(param) || + lv_obj_get_height(tabview) != lv_area_get_height(param))) { tabview_realign(tabview); } - } - else if(sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_RELEASED) { /*If released by a KEYPAD or ENCODER then really the tab buttons should be released. * So simulate a CLICK on the tab buttons*/ - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_KEYPAD || - (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) - { + (indev_type == LV_INDEV_TYPE_ENCODER && + lv_group_get_editing(lv_obj_get_group(tabview)))) { lv_event_send(ext->btns, LV_EVENT_CLICKED, lv_event_get_data()); } - } - else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL) { - /* The button matrix is not in a group (the tab view is in it) but it should handle the group signals. - * So propagate the related signals to the button matrix manually*/ + } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL) { + /* The button matrix is not in a group (the tab view is in it) but it should handle the + * group signals. So propagate the related signals to the button matrix manually*/ if(ext->btns) { ext->btns->signal_cb(ext->btns, sign, param); } @@ -618,23 +616,23 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_group_t * g = lv_obj_get_group(tabview); if(lv_group_get_editing(g)) { lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); - btnm_ext->btn_id_pr = 0; + btnm_ext->btn_id_pr = 0; lv_obj_invalidate(ext->btns); } #endif } else { lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); - btnm_ext->btn_id_pr = 0; + btnm_ext->btn_id_pr = 0; lv_obj_invalidate(ext->btns); } } } else if(sign == LV_SIGNAL_GET_EDITABLE) { bool * editable = (bool *)param; - *editable = true; + *editable = true; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_tabview"; @@ -643,7 +641,6 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p return res; } - /** * Signal function of a tab's page * @param tab pointer to a tab page object @@ -659,7 +656,7 @@ static lv_res_t tabpage_signal(lv_obj_t * tab_page, lv_signal_t sign, void * par res = page_signal(tab_page, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * cont = lv_obj_get_parent(tab_page); + lv_obj_t * cont = lv_obj_get_parent(tab_page); lv_obj_t * tabview = lv_obj_get_parent(cont); if(lv_tabview_get_sliding(tabview) == false) return res; @@ -690,8 +687,8 @@ static lv_res_t tabpage_scrl_signal(lv_obj_t * tab_scrl, lv_signal_t sign, void if(res != LV_RES_OK) return res; lv_obj_t * tab_page = lv_obj_get_parent(tab_scrl); - lv_obj_t * cont = lv_obj_get_parent(tab_page); - lv_obj_t * tabview = lv_obj_get_parent(cont); + lv_obj_t * cont = lv_obj_get_parent(tab_page); + lv_obj_t * tabview = lv_obj_get_parent(cont); if(lv_tabview_get_sliding(tabview) == false) return res; @@ -716,7 +713,7 @@ static void tabpage_pressed_handler(lv_obj_t * tabview, lv_obj_t * tabpage) (void)tabpage; lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_indev_get_point(indev, &ext->point_last); } @@ -728,34 +725,34 @@ static void tabpage_pressed_handler(lv_obj_t * tabview, lv_obj_t * tabpage) static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_point_t point_act; lv_indev_get_point(indev, &point_act); lv_coord_t x_diff = point_act.x - ext->point_last.x; lv_coord_t y_diff = point_act.y - ext->point_last.y; + if(!ext->scroll_ver && + (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) { + ext->draging = 1; + /*Check if the page is on the edge */ + if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || + (lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT) && x_diff < 0)) { + if(ext->drag_hor == 0) { + ext->point_last.x = point_act.x; + ext->point_last.y = point_act.y; + } + ext->drag_hor = 1; + lv_obj_set_drag(lv_page_get_scrl(tabpage), false); - if(!ext->scroll_ver && (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) { - ext->draging = 1; - /*Check if the page is on the edge */ - if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || - (lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT) && x_diff < 0)) { - if(ext->drag_hor == 0) { - ext->point_last.x = point_act.x; - ext->point_last.y = point_act.y; - } - ext->drag_hor = 1; - lv_obj_set_drag(lv_page_get_scrl(tabpage), false); - - } else if(ext->drag_hor == 0) { - ext->drag_hor = 0; - } - } else if(y_diff >= LV_INDEV_DEF_DRAG_LIMIT || y_diff <= -LV_INDEV_DEF_DRAG_LIMIT) { - ext->drag_hor = 0; - ext->draging = 1; - ext->scroll_ver = 1; - } else - ext->draging = 0; + } else if(ext->drag_hor == 0) { + ext->drag_hor = 0; + } + } else if(y_diff >= LV_INDEV_DEF_DRAG_LIMIT || y_diff <= -LV_INDEV_DEF_DRAG_LIMIT) { + ext->drag_hor = 0; + ext->draging = 1; + ext->scroll_ver = 1; + } else + ext->draging = 0; if(ext->drag_hor) { lv_obj_set_x(ext->content, lv_obj_get_x(ext->content) + point_act.x - ext->point_last.x); @@ -763,12 +760,16 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); - lv_style_t * tabs_style = lv_obj_get_style(ext->btns); + lv_coord_t indic_width = lv_obj_get_width(ext->indic); + lv_style_t * tabs_style = lv_obj_get_style(ext->btns); lv_style_t * indic_style = lv_obj_get_style(ext->indic); - lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * (indic_width + tabs_style->body.padding.inner)) / lv_obj_get_width(tabview); + lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * + (indic_width + tabs_style->body.padding.inner)) / + lv_obj_get_width(tabview); - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + tabs_style->body.padding.inner * ext->tab_cur + indic_style->body.padding.left - p); + lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + + tabs_style->body.padding.inner * ext->tab_cur + + indic_style->body.padding.left - p); } } @@ -780,9 +781,9 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - ext->drag_hor = 0; - ext->draging = 0; - ext->scroll_ver = 0; + ext->drag_hor = 0; + ext->draging = 0; + ext->scroll_ver = 0; lv_obj_set_drag(lv_page_get_scrl(tabpage), true); @@ -793,13 +794,13 @@ static void tabpage_press_lost_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_indev_get_vect(indev, &vect); lv_coord_t x_predict = 0; - while(vect.x != 0) { + while(vect.x != 0) { x_predict += vect.x; vect.x = vect.x * (100 - LV_INDEV_DEF_DRAG_THROW) / 100; } - lv_coord_t page_x1 = tabpage->coords.x1 - tabview->coords.x1 + x_predict; - lv_coord_t page_x2 = page_x1 + lv_obj_get_width(tabpage); + lv_coord_t page_x1 = tabpage->coords.x1 - tabview->coords.x1 + x_predict; + lv_coord_t page_x2 = page_x1 + lv_obj_get_width(tabpage); lv_coord_t treshold = lv_obj_get_width(tabview) / 2; uint16_t tab_cur = ext->tab_cur; @@ -842,53 +843,56 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_set_width(ext->btns, lv_obj_get_width(tabview)); if(ext->btns_hide) { - lv_obj_set_hidden(ext->btns, true); - lv_obj_set_hidden(ext->indic, true); - lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); - lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); - } - else if(ext->tab_cnt != 0) { - lv_obj_set_hidden(ext->btns, false); - lv_obj_set_hidden(ext->indic, false); - - lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG); + lv_obj_set_hidden(ext->btns, true); + lv_obj_set_hidden(ext->indic, true); + lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); + lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + } else if(ext->tab_cnt != 0) { + lv_obj_set_hidden(ext->btns, false); + lv_obj_set_hidden(ext->indic, false); + + lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG); lv_style_t * style_btn_rel = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_REL); /*Set the indicator widths*/ - lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - - style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / ext->tab_cnt; + lv_coord_t indic_width = + (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - + style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / + ext->tab_cnt; lv_obj_set_width(ext->indic, indic_width); /*Set the tabs height*/ lv_coord_t btns_height = lv_font_get_height(style_btn_rel->text.font) + - style_btn_rel->body.padding.top + style_btn_rel->body.padding.bottom + + style_btn_rel->body.padding.top + + style_btn_rel->body.padding.bottom + style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; lv_obj_set_height(ext->btns, btns_height); lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); switch(ext->btns_pos) { - case LV_TABVIEW_BTNS_POS_TOP: - lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); - lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); - break; - case LV_TABVIEW_BTNS_POS_BOTTOM: - lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); - lv_obj_align(ext->btns, ext->content, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); - break; - } + case LV_TABVIEW_BTNS_POS_TOP: + lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); + break; + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->btns, ext->content, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); + break; + } } lv_obj_t * pages = lv_obj_get_child(ext->content, NULL); while(pages != NULL) { - if(lv_obj_get_signal_func(pages) == tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ + if(lv_obj_get_signal_func(pages) == + tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ lv_obj_set_size(pages, lv_obj_get_width(tabview), lv_obj_get_height(ext->content)); } pages = lv_obj_get_child(ext->content, pages); } if(!ext->btns_hide) { - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); } lv_tabview_set_tab_act(tabview, ext->tab_cur, false); diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index 5d0cd8291fdd..de70ba003398 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -55,18 +55,18 @@ typedef struct /*New data for this type */ lv_obj_t * btns; lv_obj_t * indic; - lv_obj_t * content; /*A rectangle to show the current tab*/ + lv_obj_t * content; /*A rectangle to show the current tab*/ const char ** tab_name_ptr; lv_point_t point_last; uint16_t tab_cur; uint16_t tab_cnt; uint16_t anim_time; - uint8_t slide_enable :1; /*1: enable horizontal sliding by touch pad*/ - uint8_t draging :1; - uint8_t drag_hor :1; - uint8_t scroll_ver :1; - uint8_t btns_hide :1; - lv_tabview_btns_pos_t btns_pos :1; + uint8_t slide_enable : 1; /*1: enable horizontal sliding by touch pad*/ + uint8_t draging : 1; + uint8_t drag_hor : 1; + uint8_t scroll_ver : 1; + uint8_t btns_hide : 1; + lv_tabview_btns_pos_t btns_pos : 1; } lv_tabview_ext_t; enum { @@ -84,7 +84,6 @@ typedef uint8_t lv_tabview_style_t; * GLOBAL PROTOTYPES **********************/ - /** * Create a Tab view object * @param par pointer to an object, it will be the parent of the new tab @@ -97,7 +96,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy); * Delete all children of the scrl object, without deleting scrl child. * @param obj pointer to an object */ -void lv_tabview_clean(lv_obj_t *obj); +void lv_tabview_clean(lv_obj_t * obj); /*====================== * Add/remove functions @@ -143,21 +142,21 @@ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time); * @param type which style should be set * @param style pointer to the new style */ -void lv_tabview_set_style(lv_obj_t *tabview, lv_tabview_style_t type, lv_style_t *style); +void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, lv_style_t * style); /** * Set the position of tab select buttons * @param tabview pointer to a tab view object * @param btns_pos which button position */ -void lv_tabview_set_btns_pos(lv_obj_t *tabview, lv_tabview_btns_pos_t btns_pos); +void lv_tabview_set_btns_pos(lv_obj_t * tabview, lv_tabview_btns_pos_t btns_pos); /** * Set whether tab buttons are hidden * @param tabview pointer to a tab view object * @param en whether tab buttons are hidden */ -void lv_tabview_set_btns_hidden(lv_obj_t *tabview, bool en); +void lv_tabview_set_btns_hidden(lv_obj_t * tabview, bool en); /*===================== * Getter functions @@ -204,29 +203,29 @@ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_tabview_get_style(const lv_obj_t *tabview, lv_tabview_style_t type); +lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type); /** * Get position of tab select buttons * @param tabview pointer to a ab view object */ -lv_tabview_btns_pos_t lv_tabview_get_btns_pos(const lv_obj_t *tabview); +lv_tabview_btns_pos_t lv_tabview_get_btns_pos(const lv_obj_t * tabview); /** * Get whether tab buttons are hidden * @param tabview pointer to a tab view object * @return whether tab buttons are hidden */ -bool lv_tabview_get_btns_hidden(const lv_obj_t *tabview); +bool lv_tabview_get_btns_hidden(const lv_obj_t * tabview); /********************** * MACROS **********************/ -#endif /*LV_USE_TABVIEW*/ +#endif /*LV_USE_TABVIEW*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_TABVIEW_H*/ +#endif /*LV_TABVIEW_H*/ diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index 81211f858c36..0e1f5282af7b 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -17,12 +17,12 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -# ifndef LV_TILEVIEW_ANIM_TIME -# define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ -# endif +#ifndef LV_TILEVIEW_ANIM_TIME +#define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ +#endif #else -# undef LV_TILEVIEW_DEF_ANIM_TIME -# define LV_TILEVIEW_DEF_ANIM_TIME 0 /*No animations*/ +#undef LV_TILEVIEW_DEF_ANIM_TIME +#define LV_TILEVIEW_DEF_ANIM_TIME 0 /*No animations*/ #endif /********************** @@ -73,13 +73,14 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_tileview); - if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_tileview)); + if(ancestor_scrl_signal == NULL) + ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_tileview)); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_tileview); /*Initialize the allocated 'ext' */ ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME; - ext->act_id.x = 0; - ext->act_id.y = 0; + ext->act_id.x = 0; + ext->act_id.y = 0; ext->valid_pos = NULL; /*The signal and design functions are not copied so set them here*/ @@ -106,10 +107,9 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing tileview*/ else { lv_tileview_ext_t * copy_ext = lv_obj_get_ext_attr(copy); - ext->act_id.x = copy_ext->act_id.x; - ext->act_id.y = copy_ext->act_id.y; - ext->anim_time = copy_ext->anim_time; - + ext->act_id.x = copy_ext->act_id.x; + ext->act_id.y = copy_ext->act_id.y; + ext->anim_time = copy_ext->anim_time; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_tileview); @@ -141,10 +141,8 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element) * So be sure the current tile is correctly shown*/ lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); lv_tileview_set_tile_act(tileview, ext->act_id.x, ext->act_id.y, false); - } - /*===================== * Setter functions *====================*/ @@ -152,14 +150,14 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element) /** * Set the valid position's indices. The scrolling will be possible only to these positions. * @param tileview pointer to a Tileview object - * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}, {LV_COORD_MIN, LV_COORD_MIN}};` - * Must be closed with `{LV_COORD_MIN, LV_COORD_MIN}`. Only the pointer is saved so can't be a local variable. + * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}, + * {LV_COORD_MIN, LV_COORD_MIN}};` Must be closed with `{LV_COORD_MIN, LV_COORD_MIN}`. Only the + * pointer is saved so can't be a local variable. */ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos) { lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - ext->valid_pos = valid_pos; - + ext->valid_pos = valid_pos; /*If valid pos. is selected do nothing*/ uint16_t i; @@ -190,7 +188,6 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - uint16_t i; bool valid = false; for(i = 0; ext->valid_pos[i].x != LV_COORD_MIN; i++) { @@ -199,41 +196,41 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b } } - if(valid == false) return; /*Don't load not valid tiles*/ + if(valid == false) return; /*Don't load not valid tiles*/ ext->act_id.x = x; ext->act_id.y = y; lv_coord_t x_coord = -x * lv_obj_get_width(tileview); lv_coord_t y_coord = -y * lv_obj_get_height(tileview); - lv_obj_t * scrl = lv_page_get_scrl(tileview); + lv_obj_t * scrl = lv_page_get_scrl(tileview); if(anim_en) { #if LV_USE_ANIMATION lv_coord_t x_act = lv_obj_get_x(scrl); lv_coord_t y_act = lv_obj_get_y(scrl); lv_anim_t a; - a.var = scrl; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; + a.var = scrl; + a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.path = lv_anim_path_linear; + a.end_cb = NULL; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; if(x_coord != x_act) { a.start = x_act; - a.end = x_coord; + a.end = x_coord; lv_anim_create(&a); } if(y_coord != y_act) { a.start = y_act; - a.end = y_coord; - a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.end = y_coord; + a.fp = (lv_anim_fp_t)lv_obj_set_y; lv_anim_create(&a); } #endif @@ -241,10 +238,9 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_obj_set_pos(scrl, x_coord, y_coord); } - lv_res_t res = LV_RES_OK; - res = lv_event_send(tileview, LV_EVENT_VALUE_CHANGED, NULL); - if(res != LV_RES_OK) return; /*Prevent the tile loading*/ + res = lv_event_send(tileview, LV_EVENT_VALUE_CHANGED, NULL); + if(res != LV_RES_OK) return; /*Prevent the tile loading*/ } /** @@ -257,9 +253,7 @@ void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_sty { switch(type) { - case LV_TILEVIEW_STYLE_BG: - lv_obj_set_style(tileview, style); - break; + case LV_TILEVIEW_STYLE_BG: lv_obj_set_style(tileview, style); break; } } @@ -281,11 +275,8 @@ lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_ { lv_style_t * style = NULL; switch(type) { - case LV_TILEVIEW_STYLE_BG: - style = lv_obj_get_style(tileview); - break; - default: - style = NULL; + case LV_TILEVIEW_STYLE_BG: style = lv_obj_get_style(tileview); break; + default: style = NULL; } return style; @@ -318,13 +309,12 @@ static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * res = ancestor_signal(tileview, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_tileview"; @@ -349,37 +339,41 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void res = ancestor_scrl_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * tileview = lv_obj_get_parent(scrl); + lv_obj_t * tileview = lv_obj_get_parent(scrl); lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_BG); - /*Apply constraint on moving of the tileview*/ if(sign == LV_SIGNAL_CORD_CHG) { lv_indev_t * indev = lv_indev_get_act(); if(indev) { lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - /*Set horizontal drag constraint if no vertical constraint an dragged to valid x direction */ - if(ext->drag_ver == 0 && - ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DEF_DRAG_LIMIT) || - (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DEF_DRAG_LIMIT))) { + /*Set horizontal drag constraint if no vertical constraint an dragged to valid x + * direction */ + if(ext->drag_ver == 0 && ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= + -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= + LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_hor = 1; } - /*Set vertical drag constraint if no horizontal constraint an dragged to valid y direction */ + /*Set vertical drag constraint if no horizontal constraint an dragged to valid y + * direction */ if(ext->drag_hor == 0 && - ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) || - (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) { + ((ext->drag_bottom_en && + indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_top_en && + indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_ver = 1; } if(ext->drag_hor) { - ext->page.edge_flash.top_ip = 0; + ext->page.edge_flash.top_ip = 0; ext->page.edge_flash.bottom_ip = 0; } if(ext->drag_ver) { ext->page.edge_flash.right_ip = 0; - ext->page.edge_flash.left_ip = 0; + ext->page.edge_flash.left_ip = 0; } lv_coord_t x = lv_obj_get_x(scrl); @@ -387,10 +381,11 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_coord_t h = lv_obj_get_height(tileview); lv_coord_t w = lv_obj_get_width(tileview); if(ext->drag_top_en == 0) { - if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) { - if(ext->page.edge_flash.enabled && - ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && - ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { + if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && + ext->drag_hor == 0) { + if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && + ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && + ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.top_ip = 1; lv_page_start_edge_flash(tileview); } @@ -398,11 +393,12 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } } - if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) { + if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && + ext->drag_hor == 0) { if(y < -(ext->act_id.y * h)) { - if(ext->page.edge_flash.enabled && - ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && - ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { + if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && + ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && + ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.bottom_ip = 1; lv_page_start_edge_flash(tileview); } @@ -411,10 +407,11 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } if(ext->drag_left_en == 0) { - if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) { - if(ext->page.edge_flash.enabled && - ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && - ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { + if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && + ext->drag_ver == 0) { + if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && + ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && + ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.left_ip = 1; lv_page_start_edge_flash(tileview); } @@ -422,11 +419,12 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left); } } - if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) { + if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && + ext->drag_ver == 0) { if(x < -(ext->act_id.x * w)) { - if(ext->page.edge_flash.enabled && - ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && - ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { + if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && + ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && + ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.right_ip = 1; lv_page_start_edge_flash(tileview); } @@ -436,14 +434,17 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void } /*Apply the drag constraints*/ - if(ext->drag_ver == 0) lv_obj_set_y(scrl, - ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top); - if(ext->drag_hor == 0) lv_obj_set_x(scrl, - ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left); + if(ext->drag_ver == 0) + lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + + style_bg->body.padding.top); + if(ext->drag_hor == 0) + lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + + style_bg->body.padding.left); } } return res; } - static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event) { lv_obj_t * tileview = lv_obj_get_parent(scrl); @@ -451,21 +452,21 @@ static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event) /*Initialize some variables on PRESS*/ if(event == LV_EVENT_PRESSED) { lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - ext->drag_hor = 0; - ext->drag_ver = 0; + ext->drag_hor = 0; + ext->drag_ver = 0; set_valid_drag_dirs(tileview); } /*Animate the tabview to the correct location on RELEASE*/ else if(event == LV_EVENT_PRESS_LOST || event == LV_EVENT_RELEASED) { /* If the element was dragged and it moved the tileview finish the drag manually to * let the tileview to finish the move.*/ - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); if(lv_indev_is_dragging(indev) && (ext->drag_hor || ext->drag_ver)) { indev->proc.types.pointer.drag_in_prog = 0; } - drag_end_handler(tileview); + drag_end_handler(tileview); } } @@ -476,14 +477,14 @@ static void tileview_scrl_event_cb(lv_obj_t * scrl, lv_event_t event) static void drag_end_handler(lv_obj_t * tileview) { lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); - lv_indev_t * indev = lv_indev_get_act(); + lv_indev_t * indev = lv_indev_get_act(); lv_point_t point_act; lv_indev_get_point(indev, &point_act); lv_obj_t * scrl = lv_page_get_scrl(tileview); lv_point_t p; - p.x = - (scrl->coords.x1 - lv_obj_get_width(tileview) / 2); - p.y = - (scrl->coords.y1 - lv_obj_get_height(tileview) / 2); + p.x = -(scrl->coords.x1 - lv_obj_get_width(tileview) / 2); + p.y = -(scrl->coords.y1 - lv_obj_get_height(tileview) / 2); /*From the drag vector (drag throw) predict the end position*/ if(ext->drag_hor) { @@ -497,8 +498,7 @@ static void drag_end_handler(lv_obj_t * tileview) } p.x -= predict; - } - else if(ext->drag_ver) { + } else if(ext->drag_ver) { lv_point_t vect; lv_indev_get_vect(indev, &vect); lv_coord_t predict = 0; @@ -519,12 +519,12 @@ static void drag_end_handler(lv_obj_t * tileview) lv_coord_t x_move = p.x - ext->act_id.x; lv_coord_t y_move = p.y - ext->act_id.y; if(x_move < -1) x_move = -1; - if(x_move > 1) x_move = 1; + if(x_move > 1) x_move = 1; if(y_move < -1) y_move = -1; if(y_move > 1) y_move = 1; /*Set the new tile*/ - lv_tileview_set_tile_act(tileview, ext->act_id.x + x_move, ext->act_id.y + y_move,true); + lv_tileview_set_tile_act(tileview, ext->act_id.x + x_move, ext->act_id.y + y_move, true); } static bool set_valid_drag_dirs(lv_obj_t * tileview) @@ -534,20 +534,23 @@ static bool set_valid_drag_dirs(lv_obj_t * tileview) if(ext->valid_pos == NULL) return false; ext->drag_bottom_en = 0; - ext->drag_top_en = 0; - ext->drag_left_en = 0; - ext->drag_right_en = 0; + ext->drag_top_en = 0; + ext->drag_left_en = 0; + ext->drag_right_en = 0; uint16_t i; for(i = 0; ext->valid_pos[i].x != LV_COORD_MIN; i++) { - if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) ext->drag_top_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) ext->drag_bottom_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_left_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x + 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_right_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) + ext->drag_top_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) + ext->drag_bottom_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) + ext->drag_left_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x + 1 && ext->valid_pos[i].y == ext->act_id.y) + ext->drag_right_en = 1; } return true; } - #endif diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index 56748747d2be..247134b2d4f6 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -3,7 +3,6 @@ * */ - #ifndef LV_TILEVIEW_H #define LV_TILEVIEW_H @@ -32,35 +31,32 @@ extern "C" { * TYPEDEFS **********************/ - - /* parametes: pointer to a tileview object, x, y (tile coordinates to load) * return: LV_RES_INV: to prevent the loading of the tab; LV_RES_OK: if everything is fine*/ typedef lv_res_t (*lv_tileview_action_t)(lv_obj_t *, lv_coord_t, lv_coord_t); /*Data of tileview*/ -typedef struct { +typedef struct +{ lv_page_ext_t page; /*New data for this type */ const lv_point_t * valid_pos; uint16_t anim_time; lv_point_t act_id; - uint8_t drag_top_en :1; - uint8_t drag_bottom_en :1; - uint8_t drag_left_en :1; - uint8_t drag_right_en :1; - uint8_t drag_hor :1; - uint8_t drag_ver :1; + uint8_t drag_top_en : 1; + uint8_t drag_bottom_en : 1; + uint8_t drag_left_en : 1; + uint8_t drag_right_en : 1; + uint8_t drag_hor : 1; + uint8_t drag_ver : 1; } lv_tileview_ext_t; - /*Styles*/ enum { LV_TILEVIEW_STYLE_BG, }; typedef uint8_t lv_tileview_style_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -88,12 +84,12 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element); * Setter functions *====================*/ - /** * Set the valid position's indices. The scrolling will be possible only to these positions. * @param tileview pointer to a Tileview object - * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}, {LV_COORD_MIN, LV_COORD_MIN}};` - * Must be closed with `{LV_COORD_MIN, LV_COORD_MIN}`. Only the pointer is saved so can't be a local variable. + * @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}, + * {LV_COORD_MIN, LV_COORD_MIN}};` Must be closed with `{LV_COORD_MIN, LV_COORD_MIN}`. Only the + * pointer is saved so can't be a local variable. */ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos); @@ -122,7 +118,7 @@ static inline void lv_tileview_set_edge_flash(lv_obj_t * tileview, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_style_t *style); +void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_style_t * style); /*===================== * Getter functions @@ -154,10 +150,10 @@ lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_ * MACROS **********************/ -#endif /*LV_USE_TILEVIEW*/ +#endif /*LV_USE_TILEVIEW*/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_TILEVIEW_H*/ +#endif /*LV_TILEVIEW_H*/ diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 7e8753b7d872..2ae2b855eff7 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -61,19 +61,19 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->page = NULL; - ext->header = NULL; - ext->title = NULL; - ext->style_header = &lv_style_plain_color; + ext->page = NULL; + ext->header = NULL; + ext->title = NULL; + ext->style_header = &lv_style_plain_color; ext->style_btn_rel = &lv_style_btn_rel; - ext->style_btn_pr = &lv_style_btn_pr; - ext->btn_size = (LV_DPI) / 2; + ext->style_btn_pr = &lv_style_btn_pr; + ext->btn_size = (LV_DPI) / 2; /*Init the new window object*/ if(copy == NULL) { lv_disp_t * disp = lv_obj_get_disp(new_win); - lv_coord_t hres = lv_disp_get_hor_res(disp); - lv_coord_t vres = lv_disp_get_ver_res(disp); + lv_coord_t hres = lv_disp_get_hor_res(disp); + lv_coord_t vres = lv_disp_get_ver_res(disp); lv_obj_set_size(new_win, hres, vres); lv_obj_set_pos(new_win, 0, 0); lv_obj_set_style(new_win, &lv_style_pretty); @@ -116,9 +116,9 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_win_ext_t * copy_ext = lv_obj_get_ext_attr(copy); /*Create the objects*/ - ext->header = lv_obj_create(new_win, copy_ext->header); - ext->title = lv_label_create(ext->header, copy_ext->title); - ext->page = lv_page_create(new_win, copy_ext->page); + ext->header = lv_obj_create(new_win, copy_ext->header); + ext->title = lv_label_create(ext->header, copy_ext->title); + ext->page = lv_page_create(new_win, copy_ext->page); ext->btn_size = copy_ext->btn_size; /*Copy the control buttons*/ @@ -268,35 +268,29 @@ void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, lv_style_t * style) lv_obj_set_style(win, style); lv_win_realign(win); break; - case LV_WIN_STYLE_CONTENT_BG: - lv_page_set_style(ext->page, LV_PAGE_STYLE_BG, style); - break; + case LV_WIN_STYLE_CONTENT_BG: lv_page_set_style(ext->page, LV_PAGE_STYLE_BG, style); break; case LV_WIN_STYLE_CONTENT_SCRL: lv_page_set_style(ext->page, LV_PAGE_STYLE_SCRL, style); break; - case LV_WIN_STYLE_SB: - lv_page_set_style(ext->page, LV_PAGE_STYLE_SB, style); - break; + case LV_WIN_STYLE_SB: lv_page_set_style(ext->page, LV_PAGE_STYLE_SB, style); break; case LV_WIN_STYLE_HEADER: lv_obj_set_style(ext->header, style); lv_win_realign(win); break; - case LV_WIN_STYLE_BTN_REL: - ext->style_btn_rel = style; - break; - case LV_WIN_STYLE_BTN_PR: - ext->style_btn_pr = style; - break; + case LV_WIN_STYLE_BTN_REL: ext->style_btn_rel = style; break; + case LV_WIN_STYLE_BTN_PR: ext->style_btn_pr = style; break; } /*Refresh the existing buttons*/ if(type == LV_WIN_STYLE_BTN_REL || type == LV_WIN_STYLE_BTN_PR) { lv_obj_t * btn; btn = lv_obj_get_child_back(ext->header, NULL); - btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/ + btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/ while(btn != NULL) { - if(type == LV_WIN_STYLE_BTN_REL) lv_btn_set_style(btn, LV_BTN_STYLE_REL, style); - else lv_btn_set_style(btn, LV_BTN_STYLE_PR, style); + if(type == LV_WIN_STYLE_BTN_REL) + lv_btn_set_style(btn, LV_BTN_STYLE_REL, style); + else + lv_btn_set_style(btn, LV_BTN_STYLE_PR, style); btn = lv_obj_get_child_back(ext->header, btn); } } @@ -307,9 +301,9 @@ void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, lv_style_t * style) * @param win pointer to a window object * @param en whether dragging is enabled */ -void lv_win_set_drag(lv_obj_t *win, bool en) +void lv_win_set_drag(lv_obj_t * win, bool en) { - lv_win_ext_t * ext = lv_obj_get_ext_attr(win); + lv_win_ext_t * ext = lv_obj_get_ext_attr(win); lv_obj_t * win_header = ext->header; lv_obj_set_drag_parent(win_header, en); lv_obj_set_drag(win, en); @@ -331,10 +325,10 @@ const char * lv_win_get_title(const lv_obj_t * win) } /** -* Get the content holder object of window (`lv_page`) to allow additional customization -* @param win pointer to a window object -* @return the Page object where the window's content is -*/ + * Get the content holder object of window (`lv_page`) to allow additional customization + * @param win pointer to a window object + * @return the Page object where the window's content is + */ lv_obj_t * lv_win_get_content(const lv_obj_t * win) { lv_win_ext_t * ext = lv_obj_get_ext_attr(win); @@ -361,7 +355,7 @@ lv_coord_t lv_win_get_btn_size(const lv_obj_t * win) lv_obj_t * lv_win_get_from_btn(const lv_obj_t * ctrl_btn) { lv_obj_t * header = lv_obj_get_parent(ctrl_btn); - lv_obj_t * win = lv_obj_get_parent(header); + lv_obj_t * win = lv_obj_get_parent(header); return win; } @@ -395,8 +389,8 @@ lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t * win) */ lv_coord_t lv_win_get_width(lv_obj_t * win) { - lv_win_ext_t * ext = lv_obj_get_ext_attr(win); - lv_obj_t * scrl = lv_page_get_scrl(ext->page); + lv_win_ext_t * ext = lv_obj_get_ext_attr(win); + lv_obj_t * scrl = lv_page_get_scrl(ext->page); lv_style_t * style_scrl = lv_obj_get_style(scrl); return lv_obj_get_width(scrl) - style_scrl->body.padding.left - style_scrl->body.padding.right; @@ -414,30 +408,16 @@ lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type) lv_win_ext_t * ext = lv_obj_get_ext_attr(win); switch(type) { - case LV_WIN_STYLE_BG: - style = lv_obj_get_style(win); - break; - case LV_WIN_STYLE_CONTENT_BG: - style = lv_page_get_style(ext->page, LV_PAGE_STYLE_BG); - break; + case LV_WIN_STYLE_BG: style = lv_obj_get_style(win); break; + case LV_WIN_STYLE_CONTENT_BG: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_BG); break; case LV_WIN_STYLE_CONTENT_SCRL: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SCRL); break; - case LV_WIN_STYLE_SB: - style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SB); - break; - case LV_WIN_STYLE_HEADER: - style = lv_obj_get_style(ext->header); - break; - case LV_WIN_STYLE_BTN_REL: - style = ext->style_btn_rel; - break; - case LV_WIN_STYLE_BTN_PR: - style = ext->style_btn_pr; - break; - default: - style = NULL; - break; + case LV_WIN_STYLE_SB: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SB); break; + case LV_WIN_STYLE_HEADER: style = lv_obj_get_style(ext->header); break; + case LV_WIN_STYLE_BTN_REL: style = ext->style_btn_rel; break; + case LV_WIN_STYLE_BTN_PR: style = ext->style_btn_pr; break; + default: style = NULL; break; } return style; @@ -499,26 +479,25 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CORD_CHG) { /*If the size is changed refresh the window*/ if(lv_area_get_width(param) != lv_obj_get_width(win) || - lv_area_get_height(param) != lv_obj_get_height(win)) { + lv_area_get_height(param) != lv_obj_get_height(win)) { lv_win_realign(win); } } else if(sign == LV_SIGNAL_CLEANUP) { - ext->header = NULL; /*These objects were children so they are already invalid*/ - ext->page = NULL; - ext->title = NULL; + ext->header = NULL; /*These objects were children so they are already invalid*/ + ext->page = NULL; + ext->title = NULL; } else if(sign == LV_SIGNAL_CONTROL) { /*Forward all the control signals to the page*/ ext->page->signal_cb(ext->page, sign, param); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; - for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ + for(i = 0; i < LV_MAX_ANCESTOR_NUM - 1; i++) { /*Find the last set data*/ if(buf->type[i] == NULL) break; } buf->type[i] = "lv_win"; } - return res; } @@ -533,35 +512,37 @@ static void lv_win_realign(lv_obj_t * win) if(ext->page == NULL || ext->header == NULL || ext->title == NULL) return; lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER); - lv_obj_set_size(ext->header, lv_obj_get_width(win), ext->btn_size + - header_style->body.padding.top + header_style->body.padding.bottom); + lv_obj_set_size(ext->header, lv_obj_get_width(win), + ext->btn_size + header_style->body.padding.top + + header_style->body.padding.bottom); bool first_btn = true; lv_obj_t * btn; lv_obj_t * btn_prev = NULL; /*Refresh the size of all control buttons*/ btn = lv_obj_get_child_back(ext->header, NULL); - btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/ + btn = lv_obj_get_child_back(ext->header, btn); /*Skip the title*/ while(btn != NULL) { lv_obj_set_size(btn, ext->btn_size, ext->btn_size); if(first_btn) { - lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, - header_style->body.padding.right, 0); + lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, -header_style->body.padding.right, + 0); first_btn = false; } else { - lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, - header_style->body.padding.inner, 0); + lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, -header_style->body.padding.inner, + 0); } btn_prev = btn; - btn = lv_obj_get_child_back(ext->header, btn); + btn = lv_obj_get_child_back(ext->header, btn); } - lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.left, 0); lv_obj_set_pos(ext->header, 0, 0); - lv_obj_set_size(ext->page, lv_obj_get_width(win), lv_obj_get_height(win) - lv_obj_get_height(ext->header)); + lv_obj_set_size(ext->page, lv_obj_get_width(win), + lv_obj_get_height(win) - lv_obj_get_height(ext->header)); lv_obj_align(ext->page, ext->header, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); } #endif - diff --git a/src/lv_objx/lv_win.h b/src/lv_objx/lv_win.h index 9a153a2e52f6..ce7b7c9105f2 100644 --- a/src/lv_objx/lv_win.h +++ b/src/lv_objx/lv_win.h @@ -34,7 +34,6 @@ extern "C" { #error "lv_win: lv_img is required. Enable it in lv_conf.h (LV_USE_IMG 1) " #endif - #if LV_USE_PAGE == 0 #error "lv_win: lv_page is required. Enable it in lv_conf.h (LV_USE_PAGE 1) " #endif @@ -59,13 +58,13 @@ typedef struct { /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * page; /*Pointer to a page which holds the content*/ - lv_obj_t * header; /*Pointer to the header container of the window*/ - lv_obj_t * title; /*Pointer to the title label of the window*/ - lv_style_t * style_header; /*Style of the header container*/ - lv_style_t * style_btn_rel; /*Control button releases style*/ - lv_style_t * style_btn_pr; /*Control button pressed style*/ - lv_coord_t btn_size; /*Size of the control buttons (square)*/ + lv_obj_t * page; /*Pointer to a page which holds the content*/ + lv_obj_t * header; /*Pointer to the header container of the window*/ + lv_obj_t * title; /*Pointer to the title label of the window*/ + lv_style_t * style_header; /*Style of the header container*/ + lv_style_t * style_btn_rel; /*Control button releases style*/ + lv_style_t * style_btn_pr; /*Control button pressed style*/ + lv_coord_t btn_size; /*Size of the control buttons (square)*/ } lv_win_ext_t; enum { @@ -95,7 +94,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy); * Delete all children of the scrl object, without deleting scrl child. * @param obj pointer to an object */ -void lv_win_clean(lv_obj_t *obj); +void lv_win_clean(lv_obj_t * obj); /*====================== * Add/remove functions @@ -140,14 +139,14 @@ void lv_win_set_btn_size(lv_obj_t * win, lv_coord_t size); * @param win pointer to a window object * @param layout the layout from 'lv_layout_t' */ -void lv_win_set_layout(lv_obj_t *win, lv_layout_t layout); +void lv_win_set_layout(lv_obj_t * win, lv_layout_t layout); /** * Set the scroll bar mode of a window * @param win pointer to a window object * @param sb_mode the new scroll bar mode from 'lv_sb_mode_t' */ -void lv_win_set_sb_mode(lv_obj_t *win, lv_sb_mode_t sb_mode); +void lv_win_set_sb_mode(lv_obj_t * win, lv_sb_mode_t sb_mode); /** * Set a style of a window @@ -155,14 +154,14 @@ void lv_win_set_sb_mode(lv_obj_t *win, lv_sb_mode_t sb_mode); * @param type which style should be set * @param style pointer to a style */ -void lv_win_set_style(lv_obj_t *win, lv_win_style_t type, lv_style_t *style); +void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, lv_style_t * style); /** * Set drag status of a window. If set to 'true' window can be dragged like on a PC. * @param win pointer to a window object * @param en whether dragging is enabled */ -void lv_win_set_drag(lv_obj_t *win, bool en); +void lv_win_set_drag(lv_obj_t * win, bool en); /*===================== * Getter functions @@ -176,10 +175,10 @@ void lv_win_set_drag(lv_obj_t *win, bool en); const char * lv_win_get_title(const lv_obj_t * win); /** -* Get the content holder object of window (`lv_page`) to allow additional customization -* @param win pointer to a window object -* @return the Page object where the window's content is -*/ + * Get the content holder object of window (`lv_page`) to allow additional customization + * @param win pointer to a window object + * @return the Page object where the window's content is + */ lv_obj_t * lv_win_get_content(const lv_obj_t * win); /** @@ -202,14 +201,14 @@ lv_obj_t * lv_win_get_from_btn(const lv_obj_t * ctrl_btn); * @param win pointer to a window object * @return the layout of the window (from 'lv_layout_t') */ -lv_layout_t lv_win_get_layout(lv_obj_t *win); +lv_layout_t lv_win_get_layout(lv_obj_t * win); /** * Get the scroll bar mode of a window * @param win pointer to a window object * @return the scroll bar mode of the window (from 'lv_sb_mode_t') */ -lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t *win); +lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t * win); /** * Get width of the content area (page scrollable) of the window @@ -224,14 +223,14 @@ lv_coord_t lv_win_get_width(lv_obj_t * win); * @param type which style window be get * @return style pointer to a style */ -lv_style_t * lv_win_get_style(const lv_obj_t *win, lv_win_style_t type); +lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type); /** * Get drag status of a window. If set to 'true' window can be dragged like on a PC. * @param win pointer to a window object * @return whether window is draggable */ -static inline bool lv_win_get_drag(const lv_obj_t *win) +static inline bool lv_win_get_drag(const lv_obj_t * win) { return lv_obj_get_drag(win); } diff --git a/src/lv_themes/lv_theme.c b/src/lv_themes/lv_theme.c index 35811155f9b5..4f6c54e288a7 100644 --- a/src/lv_themes/lv_theme.c +++ b/src/lv_themes/lv_theme.c @@ -28,10 +28,10 @@ #if LV_THEME_LIVE_UPDATE == 0 static lv_theme_t * current_theme; #else -/* If live update is used then a big `lv_style_t` array is used to store the real styles of the theme not only pointers. - * On `lv_theme_set_current` the styles of the theme are copied to this array. - * The pointers in `current_theme` are initialized to point to the styles in the array. - * This way the theme styles will always point to the same memory address even after theme is change. +/* If live update is used then a big `lv_style_t` array is used to store the real styles of the + * theme not only pointers. On `lv_theme_set_current` the styles of the theme are copied to this + * array. The pointers in `current_theme` are initialized to point to the styles in the array. This + * way the theme styles will always point to the same memory address even after theme is change. * (The pointers in the theme points to the styles declared by the theme itself) */ /* Store the styles in this array. */ @@ -58,12 +58,12 @@ void lv_theme_set_current(lv_theme_t * th) #if LV_THEME_LIVE_UPDATE == 0 current_theme = th; #else - uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/ + uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/ if(!inited) { /*Initialize the style pointers `current_theme` to point to the `th_styles` style array */ uint16_t i; - lv_style_t ** cur_th_style_p = (lv_style_t **) ¤t_theme.style; + lv_style_t ** cur_th_style_p = (lv_style_t **)¤t_theme.style; for(i = 0; i < style_num; i++) { uintptr_t adr = (uintptr_t)&th_styles[i]; memcpy(&cur_th_style_p[i], &adr, sizeof(lv_style_t *)); @@ -71,10 +71,9 @@ void lv_theme_set_current(lv_theme_t * th) inited = true; } - /*Copy the styles pointed by the new theme to the `th_styles` style array*/ uint16_t i; - lv_style_t ** th_style = (lv_style_t **) &th->style; + lv_style_t ** th_style = (lv_style_t **)&th->style; for(i = 0; i < style_num; i++) { uintptr_t s = (uintptr_t)th_style[i]; if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t)); @@ -104,8 +103,10 @@ lv_theme_t * lv_theme_get_current(void) #if LV_THEME_LIVE_UPDATE == 0 return current_theme; #else - if(!inited) return NULL; - else return ¤t_theme; + if(!inited) + return NULL; + else + return ¤t_theme; #endif } diff --git a/src/lv_themes/lv_theme.h b/src/lv_themes/lv_theme.h index 96df2a649085..4671d83142d2 100644 --- a/src/lv_themes/lv_theme.h +++ b/src/lv_themes/lv_theme.h @@ -30,264 +30,296 @@ extern "C" { * TYPEDEFS **********************/ -typedef struct { - struct { - lv_style_t *bg; - lv_style_t *panel; +typedef struct +{ + struct + { + lv_style_t * bg; + lv_style_t * panel; #if LV_USE_CONT != 0 - lv_style_t *cont; + lv_style_t * cont; #endif #if LV_USE_BTN != 0 - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } btn; #endif - #if LV_USE_IMGBTN != 0 - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } imgbtn; #endif #if LV_USE_LABEL != 0 - struct { - lv_style_t *prim; - lv_style_t *sec; - lv_style_t *hint; + struct + { + lv_style_t * prim; + lv_style_t * sec; + lv_style_t * hint; } label; #endif #if LV_USE_IMG != 0 - struct { - lv_style_t *light; - lv_style_t *dark; + struct + { + lv_style_t * light; + lv_style_t * dark; } img; #endif #if LV_USE_LINE != 0 - struct { - lv_style_t *decor; + struct + { + lv_style_t * decor; } line; #endif #if LV_USE_LED != 0 - lv_style_t *led; + lv_style_t * led; #endif #if LV_USE_BAR != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; + struct + { + lv_style_t * bg; + lv_style_t * indic; } bar; #endif #if LV_USE_SLIDER != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - lv_style_t *knob; + struct + { + lv_style_t * bg; + lv_style_t * indic; + lv_style_t * knob; } slider; #endif #if LV_USE_LMETER != 0 - lv_style_t *lmeter; + lv_style_t * lmeter; #endif #if LV_USE_GAUGE != 0 - lv_style_t *gauge; + lv_style_t * gauge; #endif #if LV_USE_ARC != 0 - lv_style_t *arc; + lv_style_t * arc; #endif #if LV_USE_PRELOAD != 0 - lv_style_t *preload; + lv_style_t * preload; #endif #if LV_USE_SW != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - lv_style_t *knob_off; - lv_style_t *knob_on; + struct + { + lv_style_t * bg; + lv_style_t * indic; + lv_style_t * knob_off; + lv_style_t * knob_on; } sw; #endif #if LV_USE_CHART != 0 - lv_style_t *chart; + lv_style_t * chart; #endif #if LV_USE_CALENDAR != 0 - struct { - lv_style_t *bg; - lv_style_t *header; - lv_style_t *header_pr; - lv_style_t *day_names; - lv_style_t *highlighted_days; - lv_style_t *inactive_days; - lv_style_t *week_box; - lv_style_t *today_box; + struct + { + lv_style_t * bg; + lv_style_t * header; + lv_style_t * header_pr; + lv_style_t * day_names; + lv_style_t * highlighted_days; + lv_style_t * inactive_days; + lv_style_t * week_box; + lv_style_t * today_box; } calendar; #endif #if LV_USE_CB != 0 - struct { - lv_style_t *bg; - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * bg; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } box; } cb; #endif #if LV_USE_BTNM != 0 - struct { - lv_style_t *bg; - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * bg; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } btn; } btnm; #endif #if LV_USE_KB != 0 - struct { - lv_style_t *bg; - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * bg; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } btn; } kb; #endif #if LV_USE_MBOX != 0 - struct { - lv_style_t *bg; - struct { - lv_style_t *bg; - lv_style_t *rel; - lv_style_t *pr; + struct + { + lv_style_t * bg; + struct + { + lv_style_t * bg; + lv_style_t * rel; + lv_style_t * pr; } btn; } mbox; #endif #if LV_USE_PAGE != 0 - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; + struct + { + lv_style_t * bg; + lv_style_t * scrl; + lv_style_t * sb; } page; #endif #if LV_USE_TA != 0 - struct { - lv_style_t *area; - lv_style_t *oneline; - lv_style_t *cursor; - lv_style_t *sb; + struct + { + lv_style_t * area; + lv_style_t * oneline; + lv_style_t * cursor; + lv_style_t * sb; } ta; #endif #if LV_USE_SPINBOX != 0 - struct { - lv_style_t *bg; - lv_style_t *cursor; - lv_style_t *sb; + struct + { + lv_style_t * bg; + lv_style_t * cursor; + lv_style_t * sb; } spinbox; #endif #if LV_USE_LIST - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; - struct { - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; - lv_style_t *ina; + struct + { + lv_style_t * bg; + lv_style_t * scrl; + lv_style_t * sb; + struct + { + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; + lv_style_t * ina; } btn; } list; #endif #if LV_USE_DDLIST != 0 - struct { - lv_style_t *bg; - lv_style_t *sel; - lv_style_t *sb; + struct + { + lv_style_t * bg; + lv_style_t * sel; + lv_style_t * sb; } ddlist; #endif #if LV_USE_ROLLER != 0 - struct { - lv_style_t *bg; - lv_style_t *sel; + struct + { + lv_style_t * bg; + lv_style_t * sel; } roller; #endif #if LV_USE_TABVIEW != 0 - struct { - lv_style_t *bg; - lv_style_t *indic; - struct { - lv_style_t *bg; - lv_style_t *rel; - lv_style_t *pr; - lv_style_t *tgl_rel; - lv_style_t *tgl_pr; + struct + { + lv_style_t * bg; + lv_style_t * indic; + struct + { + lv_style_t * bg; + lv_style_t * rel; + lv_style_t * pr; + lv_style_t * tgl_rel; + lv_style_t * tgl_pr; } btn; } tabview; #endif #if LV_USE_TILEVIEW != 0 - struct { - lv_style_t *bg; - lv_style_t *scrl; - lv_style_t *sb; + struct + { + lv_style_t * bg; + lv_style_t * scrl; + lv_style_t * sb; } tileview; #endif #if LV_USE_TABLE != 0 - struct { - lv_style_t *bg; - lv_style_t *cell; + struct + { + lv_style_t * bg; + lv_style_t * cell; } table; #endif #if LV_USE_WIN != 0 - struct { - lv_style_t *bg; - lv_style_t *sb; - lv_style_t *header; - struct { - lv_style_t *bg; - lv_style_t *scrl; + struct + { + lv_style_t * bg; + lv_style_t * sb; + lv_style_t * header; + struct + { + lv_style_t * bg; + lv_style_t * scrl; } content; - struct { - lv_style_t *rel; - lv_style_t *pr; + struct + { + lv_style_t * rel; + lv_style_t * pr; } btn; } win; #endif @@ -311,7 +343,7 @@ typedef struct { * From now, all the created objects will use styles from this theme by default * @param th pointer to theme (return value of: 'lv_theme_init_xxx()') */ -void lv_theme_set_current(lv_theme_t *th); +void lv_theme_set_current(lv_theme_t * th); /** * Get the current system theme. @@ -324,7 +356,7 @@ lv_theme_t * lv_theme_get_current(void); **********************/ /* Returns number of styles within the `lv_theme_t` structure. */ -#define LV_THEME_STYLE_COUNT (sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *)) +#define LV_THEME_STYLE_COUNT (sizeof(((lv_theme_t *)0)->style) / sizeof(lv_style_t *)) /********************** * POST INCLUDE @@ -338,7 +370,6 @@ lv_theme_t * lv_theme_get_current(void); #include "lv_theme_nemo.h" #include "lv_theme_material.h" - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_themes/lv_theme_alien.c b/src/lv_themes/lv_theme_alien.c index dfd200ea6538..5150fc265c9d 100644 --- a/src/lv_themes/lv_theme_alien.c +++ b/src/lv_themes/lv_theme_alien.c @@ -32,7 +32,7 @@ static lv_font_t * _font; static lv_theme_t theme; static lv_style_t def; static lv_style_t bg; -static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/ +static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/ static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; @@ -56,7 +56,6 @@ static lv_style_t ddlist_bg, ddlist_sel; static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif - /********************** * MACROS **********************/ @@ -70,29 +69,29 @@ static void basic_init(void) /*Default*/ lv_style_copy(&def, &lv_style_plain); def.body.opa = LV_OPA_COVER; - def.glass = 0; - - def.body.main_color = lv_color_hex3(0x222); - def.body.grad_color = lv_color_hex3(0x222); - def.body.radius = 0; - def.body.padding.left = LV_DPI / 8; - def.body.padding.right = LV_DPI / 8; - def.body.padding.top = LV_DPI / 8; + def.glass = 0; + + def.body.main_color = lv_color_hex3(0x222); + def.body.grad_color = lv_color_hex3(0x222); + def.body.radius = 0; + def.body.padding.left = LV_DPI / 8; + def.body.padding.right = LV_DPI / 8; + def.body.padding.top = LV_DPI / 8; def.body.padding.bottom = LV_DPI / 8; - def.body.padding.inner = LV_DPI / 8; - def.body.border.color = LV_COLOR_SILVER; - def.body.border.width = 1; - def.body.border.opa = LV_OPA_COVER; - def.body.shadow.color = LV_COLOR_SILVER; - def.body.shadow.width = 0; - def.body.shadow.type = LV_SHADOW_FULL; - - def.text.color = lv_color_hex3(0xDDD); - def.text.font = _font; + def.body.padding.inner = LV_DPI / 8; + def.body.border.color = LV_COLOR_SILVER; + def.body.border.width = 1; + def.body.border.opa = LV_OPA_COVER; + def.body.shadow.color = LV_COLOR_SILVER; + def.body.shadow.width = 0; + def.body.shadow.type = LV_SHADOW_FULL; + + def.text.color = lv_color_hex3(0xDDD); + def.text.font = _font; def.text.letter_space = 1; - def.text.line_space = 2; + def.text.line_space = 2; - def.image.color = lv_color_hex3(0xDDD); + def.image.color = lv_color_hex3(0xDDD); def.image.intense = LV_OPA_TRANSP; def.line.color = lv_color_hex3(0xDDD); @@ -100,42 +99,41 @@ static void basic_init(void) /*Background*/ lv_style_copy(&bg, &def); - bg.body.main_color = lv_color_hex3(0x333); - bg.body.grad_color = lv_color_hex3(0x333); + bg.body.main_color = lv_color_hex3(0x333); + bg.body.grad_color = lv_color_hex3(0x333); bg.body.border.width = 2; - bg.body.border.color = lv_color_hex3(0x666); + bg.body.border.color = lv_color_hex3(0x666); bg.body.shadow.color = LV_COLOR_SILVER; /*Panel*/ lv_style_copy(&panel, &def); - panel.body.radius = LV_DPI / 10; - panel.body.main_color = lv_color_hex3(0x666); - panel.body.grad_color = lv_color_hex3(0x666); + panel.body.radius = LV_DPI / 10; + panel.body.main_color = lv_color_hex3(0x666); + panel.body.grad_color = lv_color_hex3(0x666); panel.body.border.color = lv_color_hex3(0xccc); panel.body.border.width = 2; - panel.body.border.opa = LV_OPA_60; - panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); - panel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96); - panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70); + panel.body.border.opa = LV_OPA_60; + panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); + panel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96); + panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70); /*Scrollbar*/ lv_style_copy(&sb, &def); - sb.body.opa = LV_OPA_50; - sb.body.radius = LV_RADIUS_CIRCLE; - sb.body.border.color = LV_COLOR_SILVER; - sb.body.border.opa = LV_OPA_40; - sb.body.border.width = 1; - sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.padding.left = 1; - sb.body.padding.right = 1; - sb.body.padding.top = 1; + sb.body.opa = LV_OPA_50; + sb.body.radius = LV_RADIUS_CIRCLE; + sb.body.border.color = LV_COLOR_SILVER; + sb.body.border.opa = LV_OPA_40; + sb.body.border.width = 1; + sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); + sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); + sb.body.padding.left = 1; + sb.body.padding.right = 1; + sb.body.padding.top = 1; sb.body.padding.bottom = 1; - sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ + sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ - theme.style.bg = &bg; + theme.style.bg = &bg; theme.style.panel = &panel; - } static void cont_init(void) @@ -149,72 +147,71 @@ static void btn_init(void) { #if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); - btn_rel.glass = 0; - btn_rel.body.opa = LV_OPA_TRANSP; - btn_rel.body.radius = LV_RADIUS_CIRCLE; - btn_rel.body.border.width = 2; - btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); - btn_rel.body.border.opa = LV_OPA_80; - btn_rel.body.padding.left = LV_DPI / 4; - btn_rel.body.padding.right = LV_DPI / 4; - btn_rel.body.padding.top = LV_DPI / 6; + btn_rel.glass = 0; + btn_rel.body.opa = LV_OPA_TRANSP; + btn_rel.body.radius = LV_RADIUS_CIRCLE; + btn_rel.body.border.width = 2; + btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); + btn_rel.body.border.opa = LV_OPA_80; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 6; btn_rel.body.padding.bottom = LV_DPI / 6; - btn_rel.body.padding.inner = LV_DPI / 10; - btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); - btn_rel.text.font = _font; - btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96); + btn_rel.body.padding.inner = LV_DPI / 10; + btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); + btn_rel.text.font = _font; + btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 8, 96); lv_style_copy(&btn_pr, &btn_rel); - btn_pr.body.opa = LV_OPA_COVER; + btn_pr.body.opa = LV_OPA_COVER; btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); btn_pr.body.border.opa = LV_OPA_60; - btn_pr.text.font = _font; - btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100); - btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 10, 100); + btn_pr.text.font = _font; + btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100); + btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 10, 100); lv_style_copy(&btn_trel, &btn_pr); - btn_trel.body.opa = LV_OPA_COVER; - btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60); - btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60); - btn_trel.body.border.opa = LV_OPA_60; + btn_trel.body.opa = LV_OPA_COVER; + btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60); + btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60); + btn_trel.body.border.opa = LV_OPA_60; btn_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 90); - btn_trel.text.font = _font; - btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100); - btn_trel.image.color = lv_color_hsv_to_rgb(_hue, 0, 100); + btn_trel.text.font = _font; + btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100); + btn_trel.image.color = lv_color_hsv_to_rgb(_hue, 0, 100); lv_style_copy(&btn_tpr, &btn_trel); - btn_tpr.body.opa = LV_OPA_COVER; - btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); - btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); - btn_tpr.body.border.opa = LV_OPA_60; + btn_tpr.body.opa = LV_OPA_COVER; + btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); + btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); + btn_tpr.body.border.opa = LV_OPA_60; btn_tpr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); - btn_tpr.text.font = _font; - btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - btn_tpr.image.color = lv_color_hsv_to_rgb(_hue, 10, 90); + btn_tpr.text.font = _font; + btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + btn_tpr.image.color = lv_color_hsv_to_rgb(_hue, 10, 90); lv_style_copy(&btn_ina, &btn_rel); - btn_ina.body.border.opa = LV_OPA_60; + btn_ina.body.border.opa = LV_OPA_60; btn_ina.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50); - btn_ina.text.font = _font; - btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + btn_ina.text.font = _font; + btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - theme.style.btn.rel = &btn_rel; - theme.style.btn.pr = &btn_pr; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; theme.style.btn.tgl_rel = &btn_trel; - theme.style.btn.tgl_pr = &btn_tpr; - theme.style.btn.ina = &btn_ina; + theme.style.btn.tgl_pr = &btn_tpr; + theme.style.btn.ina = &btn_ina; #endif } - static void label_init(void) { #if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); - label_prim.text.font = _font; + label_prim.text.font = _font; label_prim.text.color = lv_color_hsv_to_rgb(_hue, 80, 96); lv_style_copy(&label_sec, &label_prim); @@ -224,44 +221,43 @@ static void label_init(void) label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); theme.style.label.prim = &label_prim; - theme.style.label.sec = &label_sec; + theme.style.label.sec = &label_sec; theme.style.label.hint = &label_hint; #endif } - static void bar_init(void) { #if LV_USE_BAR lv_style_copy(&bar_bg, &def); - bar_bg.body.opa = LV_OPA_30; - bar_bg.body.radius = LV_RADIUS_CIRCLE; - bar_bg.body.main_color = LV_COLOR_WHITE; - bar_bg.body.grad_color = LV_COLOR_SILVER; - bar_bg.body.border.width = 2; - bar_bg.body.border.color = LV_COLOR_SILVER; - bar_bg.body.border.opa = LV_OPA_20; - bar_bg.body.padding.left = 0; - bar_bg.body.padding.right = 0; - bar_bg.body.padding.top = LV_DPI / 10; + bar_bg.body.opa = LV_OPA_30; + bar_bg.body.radius = LV_RADIUS_CIRCLE; + bar_bg.body.main_color = LV_COLOR_WHITE; + bar_bg.body.grad_color = LV_COLOR_SILVER; + bar_bg.body.border.width = 2; + bar_bg.body.border.color = LV_COLOR_SILVER; + bar_bg.body.border.opa = LV_OPA_20; + bar_bg.body.padding.left = 0; + bar_bg.body.padding.right = 0; + bar_bg.body.padding.top = LV_DPI / 10; bar_bg.body.padding.bottom = LV_DPI / 10; - bar_bg.body.padding.inner = 0; + bar_bg.body.padding.inner = 0; lv_style_copy(&bar_indic, &def); - bar_indic.body.radius = LV_RADIUS_CIRCLE; - bar_indic.body.border.width = 2; - bar_indic.body.border.color = LV_COLOR_SILVER; - bar_indic.body.border.opa = LV_OPA_70; - bar_indic.body.padding.left = 0; - bar_indic.body.padding.right = 0; - bar_indic.body.padding.top = 0; + bar_indic.body.radius = LV_RADIUS_CIRCLE; + bar_indic.body.border.width = 2; + bar_indic.body.border.color = LV_COLOR_SILVER; + bar_indic.body.border.opa = LV_OPA_70; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; bar_indic.body.padding.bottom = 0; - bar_indic.body.shadow.width = LV_DPI / 20; - bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); - bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); - bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); + bar_indic.body.shadow.width = LV_DPI / 20; + bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); + bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); - theme.style.bar.bg = &bar_bg; + theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; #endif } @@ -271,15 +267,15 @@ static void img_init(void) #if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); img_light.image.intense = LV_OPA_80; lv_style_copy(&img_dark, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); img_light.image.intense = LV_OPA_80; theme.style.img.light = &img_light; - theme.style.img.dark = &img_dark; + theme.style.img.dark = &img_dark; #endif } @@ -301,11 +297,11 @@ static void led_init(void) static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; - led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); - led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); + led.body.border.opa = LV_OPA_30; + led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); + led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); @@ -317,17 +313,17 @@ static void slider_init(void) { #if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); - slider_knob.body.opa = LV_OPA_60; - slider_knob.body.radius = LV_RADIUS_CIRCLE; - slider_knob.body.main_color = LV_COLOR_WHITE; - slider_knob.body.grad_color = LV_COLOR_SILVER; + slider_knob.body.opa = LV_OPA_60; + slider_knob.body.radius = LV_RADIUS_CIRCLE; + slider_knob.body.main_color = LV_COLOR_WHITE; + slider_knob.body.grad_color = LV_COLOR_SILVER; slider_knob.body.border.width = 1; slider_knob.body.border.color = LV_COLOR_GRAY; - slider_knob.body.border.opa = LV_OPA_50; + slider_knob.body.border.opa = LV_OPA_50; - theme.style.slider.bg = &bar_bg; + theme.style.slider.bg = &bar_bg; theme.style.slider.indic = &bar_indic; - theme.style.slider.knob = &slider_knob; + theme.style.slider.knob = &slider_knob; #endif } @@ -336,44 +332,43 @@ static void sw_init(void) #if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); - sw_bg.body.opa = LV_OPA_COVER; - sw_bg.body.padding.left = -2 ; - sw_bg.body.padding.right = -2 ; - sw_bg.body.padding.top = -2 ; - sw_bg.body.padding.bottom = -2 ; - sw_bg.body.main_color = lv_color_hex3(0x666); - sw_bg.body.grad_color = lv_color_hex3(0x999); - sw_bg.body.border.width = 2; - sw_bg.body.border.opa = LV_OPA_50; + sw_bg.body.opa = LV_OPA_COVER; + sw_bg.body.padding.left = -2; + sw_bg.body.padding.right = -2; + sw_bg.body.padding.top = -2; + sw_bg.body.padding.bottom = -2; + sw_bg.body.main_color = lv_color_hex3(0x666); + sw_bg.body.grad_color = lv_color_hex3(0x999); + sw_bg.body.border.width = 2; + sw_bg.body.border.opa = LV_OPA_50; lv_style_copy(&sw_indic, &bar_indic); - sw_indic.body.shadow .width = LV_DPI / 20; - sw_indic.body.padding.left= 0; - sw_indic.body.padding.right = 0; - sw_indic.body.padding.top = 0; + sw_indic.body.shadow.width = LV_DPI / 20; + sw_indic.body.padding.left = 0; + sw_indic.body.padding.right = 0; + sw_indic.body.padding.top = 0; sw_indic.body.padding.bottom = 0; lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; - theme.style.sw.bg = &sw_bg; - theme.style.sw.indic = &sw_indic; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; theme.style.sw.knob_off = &sw_knob; - theme.style.sw.knob_on = &sw_knob; + theme.style.sw.knob_on = &sw_knob; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); - lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); - lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); - lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ - lmeter_bg.body.padding.right = LV_DPI / 8; /*Scale line length*/ - lmeter_bg.line.color = lv_color_hex3(0x222); - lmeter_bg.line.width = 2; + lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); + lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); + lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.body.padding.right = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.line.color = lv_color_hex3(0x222); + lmeter_bg.line.width = 2; theme.style.lmeter = &lmeter_bg; @@ -385,18 +380,18 @@ static void gauge_init(void) #if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); - gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); - gauge_bg.body.grad_color = gauge_bg.body.main_color; - gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.top = LV_DPI / 10; /*Needle center size*/ - gauge_bg.body.padding.bottom = LV_DPI / 10; /*Needle center size*/ - gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ - gauge_bg.body.border.color = lv_color_hex3(0x777); - gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); - gauge_bg.line.width = 2; - gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - gauge_bg.text.font = _font; + gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); + gauge_bg.body.grad_color = gauge_bg.body.main_color; + gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.top = LV_DPI / 10; /*Needle center size*/ + gauge_bg.body.padding.bottom = LV_DPI / 10; /*Needle center size*/ + gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ + gauge_bg.body.border.color = lv_color_hex3(0x777); + gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); + gauge_bg.line.width = 2; + gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + gauge_bg.text.font = _font; theme.style.gauge = &gauge_bg; #endif @@ -408,16 +403,16 @@ static void arc_init(void) static lv_style_t arc; lv_style_copy(&arc, &def); - arc.line.width = 8; - arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90); + arc.line.width = 8; + arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90); arc.line.rounded = 1; /*For preloader*/ - arc.body.border.width = 2; - arc.body.border.color = lv_color_hex3(0x555); - arc.body.padding.left = 3; - arc.body.padding.right = 3; - arc.body.padding.top = 3; + arc.body.border.width = 2; + arc.body.border.color = lv_color_hex3(0x555); + arc.body.padding.left = 3; + arc.body.padding.right = 3; + arc.body.padding.top = 3; arc.body.padding.bottom = 3; theme.style.arc = &arc; @@ -448,22 +443,22 @@ static void calendar_init(void) static lv_style_t today_box; lv_style_copy(&header, &def); - header.body.radius = 0; - header.body.padding.left = LV_DPI / 12; - header.body.padding.right = LV_DPI / 12; - header.body.padding.top = LV_DPI / 14; + header.body.radius = 0; + header.body.padding.left = LV_DPI / 12; + header.body.padding.right = LV_DPI / 12; + header.body.padding.top = LV_DPI / 14; header.body.padding.bottom = LV_DPI / 14; - header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); - header.body.grad_color = header.body.main_color; - header.body.border.opa = panel.body.border.opa; - header.body.border.width = panel.body.border.width; - header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); - header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); + header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); + header.body.grad_color = header.body.main_color; + header.body.border.opa = panel.body.border.opa; + header.body.border.width = panel.body.border.width; + header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); + header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); lv_style_copy(&today_box, &header); today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70); today_box.body.grad_color = today_box.body.main_color; - today_box.body.opa = LV_OPA_TRANSP; + today_box.body.opa = LV_OPA_TRANSP; lv_style_copy(&color_text, &def); color_text.text.color = lv_color_hsv_to_rgb(_hue, 30, 80); @@ -471,36 +466,36 @@ static void calendar_init(void) lv_style_copy(&gray_text, &def); gray_text.text.color = lv_color_hsv_to_rgb(_hue, 10, 65); - theme.style.calendar.bg = &panel; - theme.style.calendar.header = &header; - theme.style.calendar.week_box = &header; - theme.style.calendar.today_box = &today_box; - theme.style.calendar.day_names = &color_text; + theme.style.calendar.bg = &panel; + theme.style.calendar.header = &header; + theme.style.calendar.week_box = &header; + theme.style.calendar.today_box = &today_box; + theme.style.calendar.day_names = &color_text; theme.style.calendar.highlighted_days = &color_text; - theme.style.calendar.inactive_days = &gray_text; + theme.style.calendar.inactive_days = &gray_text; #endif } static void cb_init(void) { #if LV_USE_CB != 0 - static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; + static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); - cb_rel.body.radius = LV_DPI / 20; + cb_rel.body.radius = LV_DPI / 20; cb_rel.body.border.width = 1; cb_rel.body.border.color = LV_COLOR_GRAY; - cb_rel.body.main_color = LV_COLOR_WHITE; - cb_rel.body.grad_color = LV_COLOR_SILVER; + cb_rel.body.main_color = LV_COLOR_WHITE; + cb_rel.body.grad_color = LV_COLOR_SILVER; lv_style_copy(&cb_bg, &bg); - cb_bg.body.opa = LV_OPA_TRANSP; - cb_bg.body.border.width = 0; - cb_bg.body.padding.inner = LV_DPI / 8; - cb_bg.body.padding.left = 0; - cb_bg.body.padding.right = 0; - cb_bg.body.padding.top = 0; - cb_bg.body.padding.bottom = 0; - cb_bg.text.font = _font; + cb_bg.body.opa = LV_OPA_TRANSP; + cb_bg.body.border.width = 0; + cb_bg.body.padding.inner = LV_DPI / 8; + cb_bg.body.padding.left = 0; + cb_bg.body.padding.right = 0; + cb_bg.body.padding.top = 0; + cb_bg.body.padding.bottom = 0; + cb_bg.text.font = _font; lv_style_copy(&cb_pr, &cb_rel); cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 90); @@ -509,53 +504,52 @@ static void cb_init(void) lv_style_copy(&cb_trel, &cb_rel); cb_trel.body.border.width = 4; cb_trel.body.border.color = LV_COLOR_WHITE; - cb_trel.body.border.opa = LV_OPA_60; - cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82); - cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62); + cb_trel.body.border.opa = LV_OPA_60; + cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82); + cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62); lv_style_copy(&cb_tpr, &cb_trel); cb_tpr.body.border.color = LV_COLOR_SILVER; - cb_tpr.body.border.opa = LV_OPA_70; - cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72); - cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52); + cb_tpr.body.border.opa = LV_OPA_70; + cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72); + cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52); lv_style_copy(&cb_ina, &cb_trel); cb_ina.body.border.width = 1; cb_ina.body.border.color = LV_COLOR_GRAY; - cb_ina.body.main_color = LV_COLOR_SILVER; - cb_ina.body.grad_color = LV_COLOR_SILVER; + cb_ina.body.main_color = LV_COLOR_SILVER; + cb_ina.body.grad_color = LV_COLOR_SILVER; - theme.style.cb.bg = &cb_bg; - theme.style.cb.box.rel = &cb_rel; - theme.style.cb.box.pr = &cb_pr; + theme.style.cb.bg = &cb_bg; + theme.style.cb.box.rel = &cb_rel; + theme.style.cb.box.pr = &cb_pr; theme.style.cb.box.tgl_rel = &cb_trel; - theme.style.cb.box.tgl_pr = &cb_tpr; - theme.style.cb.box.ina = &cb_ina; + theme.style.cb.box.tgl_pr = &cb_tpr; + theme.style.cb.box.ina = &cb_ina; #endif } - static void btnm_init(void) { #if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); - btnm_bg.body.border.opa = LV_OPA_COVER; - btnm_bg.body.radius = LV_DPI / 8; + btnm_bg.body.border.opa = LV_OPA_COVER; + btnm_bg.body.radius = LV_DPI / 8; lv_style_copy(&btnm_rel, &lv_style_plain); - btnm_rel.body.opa = LV_OPA_TRANSP; + btnm_rel.body.opa = LV_OPA_TRANSP; btnm_rel.body.radius = LV_DPI / 8; - btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80); - btnm_rel.text.font = _font; + btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80); + btnm_rel.text.font = _font; lv_style_copy(&btnm_pr, &lv_style_plain); btnm_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70); btnm_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 70); - btnm_pr.body.radius = LV_DPI / 8; - btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); - btnm_pr.text.font = _font; + btnm_pr.body.radius = LV_DPI / 8; + btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); + btnm_pr.text.font = _font; lv_style_copy(&btnm_trel, &btnm_rel); btnm_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -564,26 +558,25 @@ static void btnm_init(void) lv_style_copy(&btnm_ina, &btnm_rel); btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60); - theme.style.btnm.bg = &btnm_bg; - theme.style.btnm.btn.rel = &btnm_rel; - theme.style.btnm.btn.pr = &btnm_pr; + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &btnm_rel; + theme.style.btnm.btn.pr = &btnm_pr; theme.style.btnm.btn.tgl_rel = &btnm_trel; - theme.style.btnm.btn.tgl_pr = &btnm_pr; - theme.style.btnm.btn.ina = &btnm_ina; + theme.style.btnm.btn.tgl_pr = &btnm_pr; + theme.style.btnm.btn.ina = &btnm_ina; #endif } static void kb_init(void) { #if LV_USE_KB - theme.style.kb.bg = &btnm_bg; - theme.style.kb.btn.rel = &btnm_rel; - theme.style.kb.btn.pr = &btnm_pr; + theme.style.kb.bg = &btnm_bg; + theme.style.kb.btn.rel = &btnm_rel; + theme.style.kb.btn.pr = &btnm_pr; theme.style.kb.btn.tgl_rel = &btnm_trel; - theme.style.kb.btn.tgl_pr = &btnm_pr; - theme.style.kb.btn.ina = &btnm_ina; + theme.style.kb.btn.tgl_pr = &btnm_pr; + theme.style.kb.btn.ina = &btnm_ina; #endif - } static void mbox_init(void) @@ -593,38 +586,38 @@ static void mbox_init(void) lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; - theme.style.mbox.bg = &mbox_bg; - theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; theme.style.mbox.btn.rel = &btn_trel; - theme.style.mbox.btn.pr = &btn_tpr; + theme.style.mbox.btn.pr = &btn_tpr; #endif } static void page_init(void) { #if LV_USE_PAGE - theme.style.page.bg = &panel; + theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if LV_USE_TA - theme.style.ta.area = &panel; + theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; - theme.style.ta.cursor = NULL; - theme.style.ta.sb = &sb; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if LV_USE_SPINBOX - theme.style.spinbox.bg= &panel; + theme.style.spinbox.bg = &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; - theme.style.spinbox.sb = theme.style.ta.sb; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -633,39 +626,39 @@ static void list_init(void) #if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); - list_rel.body.opa = LV_OPA_TRANSP; + list_rel.body.opa = LV_OPA_TRANSP; list_rel.body.border.width = 1; list_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 50, 85); - list_rel.body.border.opa = LV_OPA_COVER; - list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - list_rel.text.font = _font; - list_rel.image.color = lv_color_hsv_to_rgb(_hue, 10, 94); + list_rel.body.border.opa = LV_OPA_COVER; + list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + list_rel.text.font = _font; + list_rel.image.color = lv_color_hsv_to_rgb(_hue, 10, 94); lv_style_copy(&list_pr, &list_rel); - list_pr.body.opa = LV_OPA_COVER; + list_pr.body.opa = LV_OPA_COVER; list_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 34, 41); list_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 34, 41); - list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96); - list_pr.image.color = lv_color_hsv_to_rgb(_hue, 7, 96); + list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96); + list_pr.image.color = lv_color_hsv_to_rgb(_hue, 7, 96); lv_style_copy(&list_trel, &list_rel); lv_style_copy(&list_tpr, &list_pr); lv_style_copy(&list_ina, &def); lv_style_copy(&list_bg, &list_rel); - list_bg.body.padding.left = 0; - list_bg.body.padding.right = 0; - list_bg.body.padding.top = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; list_bg.body.padding.bottom = 0; - theme.style.list.sb = &sb; - theme.style.list.bg = &list_bg; - theme.style.list.scrl = &lv_style_transp_tight; - theme.style.list.btn.rel = &list_rel; - theme.style.list.btn.pr = &list_pr; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_rel; + theme.style.list.btn.pr = &list_pr; theme.style.list.btn.tgl_rel = &list_trel; - theme.style.list.btn.tgl_pr = &list_tpr; - theme.style.list.btn.ina = &list_ina; + theme.style.list.btn.tgl_pr = &list_tpr; + theme.style.list.btn.ina = &list_ina; #endif } @@ -673,21 +666,21 @@ static void ddlist_init(void) { #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); - ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.left = LV_DPI / 6; - ddlist_bg.body.padding.right = LV_DPI / 6; - ddlist_bg.body.padding.top = LV_DPI / 6; + ddlist_bg.text.line_space = LV_DPI / 8; + ddlist_bg.body.padding.left = LV_DPI / 6; + ddlist_bg.body.padding.right = LV_DPI / 6; + ddlist_bg.body.padding.top = LV_DPI / 6; ddlist_bg.body.padding.bottom = LV_DPI / 6; lv_style_copy(&ddlist_sel, &panel); ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70); ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 45, 70); - ddlist_sel.body.opa = LV_OPA_COVER; - ddlist_sel.body.radius = 0; + ddlist_sel.body.opa = LV_OPA_COVER; + ddlist_sel.body.radius = 0; - theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.bg = &ddlist_bg; theme.style.ddlist.sel = &ddlist_sel; - theme.style.ddlist.sb = &sb; + theme.style.ddlist.sb = &sb; #endif } @@ -696,22 +689,22 @@ static void roller_init(void) #if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); - roller_bg.text.line_space = LV_DPI / 6; - roller_bg.body.radius = LV_DPI / 20; - roller_bg.body.main_color = lv_color_hex3(0x222); - roller_bg.body.grad_color = lv_color_hex3(0x666); - roller_bg.body.border.opa = LV_OPA_30; - roller_bg.text.opa = LV_OPA_70; - roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); + roller_bg.text.line_space = LV_DPI / 6; + roller_bg.body.radius = LV_DPI / 20; + roller_bg.body.main_color = lv_color_hex3(0x222); + roller_bg.body.grad_color = lv_color_hex3(0x666); + roller_bg.body.border.opa = LV_OPA_30; + roller_bg.text.opa = LV_OPA_70; + roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); roller_bg.body.shadow.width = 0; lv_style_copy(&roller_sel, &panel); - roller_sel.body.opa = LV_OPA_TRANSP; + roller_sel.body.opa = LV_OPA_TRANSP; roller_sel.body.radius = 0; - roller_sel.text.opa = LV_OPA_COVER; - roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); + roller_sel.text.opa = LV_OPA_COVER; + roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); - theme.style.roller.bg = &roller_bg; + theme.style.roller.bg = &roller_bg; theme.style.roller.sel = &roller_sel; #endif } @@ -721,72 +714,72 @@ static void tabview_init(void) #if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); - tab_rel.body.main_color = lv_color_hex3(0x666); - tab_rel.body.grad_color = lv_color_hex3(0x666); - tab_rel.body.padding.left = 0; - tab_rel.body.padding.right = 0; - tab_rel.body.padding.top = LV_DPI / 6; + tab_rel.body.main_color = lv_color_hex3(0x666); + tab_rel.body.grad_color = lv_color_hex3(0x666); + tab_rel.body.padding.left = 0; + tab_rel.body.padding.right = 0; + tab_rel.body.padding.top = LV_DPI / 6; tab_rel.body.padding.bottom = LV_DPI / 6; - tab_rel.body.padding.inner = 0; - tab_rel.body.border.width = 1; - tab_rel.body.border.color = LV_COLOR_SILVER; - tab_rel.body.border.opa = LV_OPA_40; - tab_rel.text.color = lv_color_hex3(0xDDD); - tab_rel.text.font = _font; + tab_rel.body.padding.inner = 0; + tab_rel.body.border.width = 1; + tab_rel.body.border.color = LV_COLOR_SILVER; + tab_rel.body.border.opa = LV_OPA_40; + tab_rel.text.color = lv_color_hex3(0xDDD); + tab_rel.text.font = _font; lv_style_copy(&tab_pr, &tab_rel); tab_pr.body.main_color = lv_color_hex3(0x444); tab_pr.body.grad_color = lv_color_hex3(0x444); lv_style_copy(&tab_trel, &def); - tab_trel.body.opa = LV_OPA_TRANSP; - tab_trel.body.padding.left = 0; - tab_trel.body.padding.right = 0; - tab_trel.body.padding.top = LV_DPI / 6; + tab_trel.body.opa = LV_OPA_TRANSP; + tab_trel.body.padding.left = 0; + tab_trel.body.padding.right = 0; + tab_trel.body.padding.top = LV_DPI / 6; tab_trel.body.padding.bottom = LV_DPI / 6; - tab_trel.body.padding.inner = 0; - tab_trel.body.border.width = 1; - tab_trel.body.border.color = LV_COLOR_SILVER; - tab_trel.body.border.opa = LV_OPA_40; - tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - tab_trel.text.font = _font; + tab_trel.body.padding.inner = 0; + tab_trel.body.border.width = 1; + tab_trel.body.border.color = LV_COLOR_SILVER; + tab_trel.body.border.opa = LV_OPA_40; + tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + tab_trel.text.font = _font; lv_style_copy(&tab_tpr, &def); - tab_tpr.body.main_color = LV_COLOR_GRAY; - tab_tpr.body.grad_color = LV_COLOR_GRAY; - tab_tpr.body.padding.left = 0; - tab_tpr.body.padding.right = 0; - tab_tpr.body.padding.top = LV_DPI / 6; + tab_tpr.body.main_color = LV_COLOR_GRAY; + tab_tpr.body.grad_color = LV_COLOR_GRAY; + tab_tpr.body.padding.left = 0; + tab_tpr.body.padding.right = 0; + tab_tpr.body.padding.top = LV_DPI / 6; tab_tpr.body.padding.bottom = LV_DPI / 6; - tab_tpr.body.padding.inner = 0; - tab_tpr.body.border.width = 1; - tab_tpr.body.border.color = LV_COLOR_SILVER; - tab_tpr.body.border.opa = LV_OPA_40; - tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - tab_tpr.text.font = _font; + tab_tpr.body.padding.inner = 0; + tab_tpr.body.border.width = 1; + tab_tpr.body.border.color = LV_COLOR_SILVER; + tab_tpr.body.border.opa = LV_OPA_40; + tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + tab_tpr.text.font = _font; lv_style_copy(&tab_indic, &def); - tab_indic.body.border.width = 0; - tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87); - tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); + tab_indic.body.border.width = 0; + tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87); + tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/ - theme.style.tabview.bg = &bg; - theme.style.tabview.indic = &tab_indic; - theme.style.tabview.btn.bg = &lv_style_transp_tight; - theme.style.tabview.btn.rel = &tab_rel; - theme.style.tabview.btn.pr = &tab_pr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &tab_indic; + theme.style.tabview.btn.bg = &lv_style_transp_tight; + theme.style.tabview.btn.rel = &tab_rel; + theme.style.tabview.btn.pr = &tab_pr; theme.style.tabview.btn.tgl_rel = &tab_trel; - theme.style.tabview.btn.tgl_pr = &tab_tpr; + theme.style.tabview.btn.tgl_pr = &tab_tpr; #endif } static void tileview_init(void) { #if LV_USE_TILEVIEW != 0 - theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; - theme.style.tileview.sb = theme.style.page.sb; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -795,15 +788,14 @@ static void table_init(void) #if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); - cell.body.radius = 0; - cell.body.border.width = 1; - cell.body.padding.left = LV_DPI / 12; - cell.body.padding.right = LV_DPI / 12; - cell.body.padding.top = LV_DPI / 12; + cell.body.radius = 0; + cell.body.border.width = 1; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; cell.body.padding.bottom = LV_DPI / 12; - - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; #endif } @@ -814,27 +806,27 @@ static void win_init(void) static lv_style_t header; lv_style_copy(&header, &def); - header.body.radius = 0; - header.body.padding.left = LV_DPI / 12; - header.body.padding.right = LV_DPI / 12; - header.body.padding.top = LV_DPI / 20; + header.body.radius = 0; + header.body.padding.left = LV_DPI / 12; + header.body.padding.right = LV_DPI / 12; + header.body.padding.top = LV_DPI / 20; header.body.padding.bottom = LV_DPI / 20; - header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); - header.body.grad_color = header.body.main_color; - header.body.border.opa = panel.body.border.opa; - header.body.border.width = panel.body.border.width; - header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); - header.body.border.part = LV_BORDER_BOTTOM; - header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); - header.image.color = lv_color_hsv_to_rgb(_hue, 5, 100); - - theme.style.win.bg = &bg; - theme.style.win.sb = &sb; - theme.style.win.header = &header; - theme.style.win.content.bg = &lv_style_transp; + header.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); + header.body.grad_color = header.body.main_color; + header.body.border.opa = panel.body.border.opa; + header.body.border.width = panel.body.border.width; + header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); + header.body.border.part = LV_BORDER_BOTTOM; + header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); + header.image.color = lv_color_hsv_to_rgb(_hue, 5, 100); + + theme.style.win.bg = &bg; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &btn_rel; - theme.style.win.btn.pr = &btn_pr; + theme.style.win.btn.rel = &btn_rel; + theme.style.win.btn.pr = &btn_pr; #endif } @@ -842,13 +834,13 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -856,22 +848,23 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -893,12 +886,12 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -936,7 +929,7 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -957,4 +950,3 @@ lv_theme_t * lv_theme_get_alien(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_alien.h b/src/lv_themes/lv_theme_alien.h index e25383d0c317..a3d5851fb824 100644 --- a/src/lv_themes/lv_theme_alien.h +++ b/src/lv_themes/lv_theme_alien.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme * @return pointer to the theme diff --git a/src/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c index 8f5da23cad7b..b0e63706d8a5 100644 --- a/src/lv_themes/lv_theme_default.c +++ b/src/lv_themes/lv_theme_default.c @@ -52,30 +52,29 @@ static lv_font_t * _font; static void basic_init(void) { - lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ + lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ lv_style_copy(&sb, &lv_style_pretty_color); - sb.body.grad_color = sb.body.main_color; - sb.body.padding.right = sb.body.padding.right/ 2; /*Make closer to the edges*/ + sb.body.grad_color = sb.body.main_color; + sb.body.padding.right = sb.body.padding.right / 2; /*Make closer to the edges*/ sb.body.padding.bottom = sb.body.padding.bottom / 2; lv_style_copy(&plain_bordered, &lv_style_plain); plain_bordered.body.border.width = 2; plain_bordered.body.border.color = lv_color_hex3(0xbbb); - theme.style.bg = &lv_style_plain; + theme.style.bg = &lv_style_plain; theme.style.panel = &lv_style_pretty; - } static void btn_init(void) { #if LV_USE_BTN != 0 - theme.style.btn.rel = &lv_style_btn_rel; - theme.style.btn.pr = &lv_style_btn_pr; + theme.style.btn.rel = &lv_style_btn_rel; + theme.style.btn.pr = &lv_style_btn_pr; theme.style.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.style.btn.ina = &lv_style_btn_ina; + theme.style.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.btn.ina = &lv_style_btn_ina; #endif } @@ -88,24 +87,21 @@ static void label_init(void) lv_style_copy(&label_hint, &lv_style_plain); label_prim.text.color = lv_color_hex3(0x111); - label_sec.text.color = lv_color_hex3(0x888); + label_sec.text.color = lv_color_hex3(0x888); label_hint.text.color = lv_color_hex3(0xaaa); - theme.style.label.prim = &label_prim; - theme.style.label.sec = &label_sec; + theme.style.label.sec = &label_sec; theme.style.label.hint = &label_hint; #endif } - static void img_init(void) { #if LV_USE_IMG != 0 - theme.style.img.light = &def; - theme.style.img.dark = &def; + theme.style.img.dark = &def; #endif } @@ -124,12 +120,11 @@ static void led_init(void) lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; + led.body.border.opa = LV_OPA_30; led.body.shadow.color = led.body.main_color; - theme.style.led = &led; #endif } @@ -138,7 +133,7 @@ static void bar_init(void) { #if LV_USE_BAR - theme.style.bar.bg = &lv_style_pretty; + theme.style.bar.bg = &lv_style_pretty; theme.style.bar.indic = &lv_style_pretty_color; #endif } @@ -147,14 +142,14 @@ static void slider_init(void) { #if LV_USE_SLIDER != 0 lv_style_copy(&slider_bg, &lv_style_pretty); - slider_bg.body.padding.left = LV_DPI / 20; - slider_bg.body.padding.right = LV_DPI / 20; - slider_bg.body.padding.top = LV_DPI / 20; + slider_bg.body.padding.left = LV_DPI / 20; + slider_bg.body.padding.right = LV_DPI / 20; + slider_bg.body.padding.top = LV_DPI / 20; slider_bg.body.padding.bottom = LV_DPI / 20; - theme.style.slider.bg = &slider_bg; + theme.style.slider.bg = &slider_bg; theme.style.slider.indic = &lv_style_pretty_color; - theme.style.slider.knob = &lv_style_pretty; + theme.style.slider.knob = &lv_style_pretty; #endif } @@ -162,26 +157,25 @@ static void sw_init(void) { #if LV_USE_SW != 0 lv_style_copy(&sw_bg, &lv_style_pretty); - sw_bg.body.padding.left = 3; - sw_bg.body.padding.right = 3; - sw_bg.body.padding.top = 3; + sw_bg.body.padding.left = 3; + sw_bg.body.padding.right = 3; + sw_bg.body.padding.top = 3; sw_bg.body.padding.bottom = 3; - theme.style.sw.bg = &sw_bg; - theme.style.sw.indic = &lv_style_pretty_color; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &lv_style_pretty_color; theme.style.sw.knob_off = &lv_style_pretty; - theme.style.sw.knob_on = &lv_style_pretty; + theme.style.sw.knob_on = &lv_style_pretty; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 lv_style_copy(&lmeter, &lv_style_pretty_color); - lmeter.line.color = lv_color_hex3(0xddd); - lmeter.line.width = 2; + lmeter.line.color = lv_color_hex3(0xddd); + lmeter.line.width = 2; lmeter.body.main_color = lv_color_mix(lmeter.body.main_color, LV_COLOR_WHITE, LV_OPA_50); lmeter.body.grad_color = lv_color_mix(lmeter.body.grad_color, LV_COLOR_BLACK, LV_OPA_50); @@ -194,11 +188,11 @@ static void gauge_init(void) #if LV_USE_GAUGE != 0 static lv_style_t gauge; lv_style_copy(&gauge, &lmeter); - gauge.line.color = lmeter.body.grad_color; - gauge.line.width = 2; + gauge.line.color = lmeter.body.grad_color; + gauge.line.width = 2; gauge.body.main_color = lv_color_hex3(0x888); gauge.body.grad_color = lmeter.body.main_color; - gauge.text.color = lv_color_hex3(0x888); + gauge.text.color = lv_color_hex3(0x888); theme.style.gauge = &gauge; #endif @@ -208,7 +202,6 @@ static void chart_init(void) { #if LV_USE_CHART - theme.style.chart = &lv_style_pretty; #endif } @@ -217,28 +210,25 @@ static void cb_init(void) { #if LV_USE_CB != 0 - - theme.style.cb.bg = &lv_style_transp; - theme.style.cb.box.rel = &lv_style_pretty; - theme.style.cb.box.pr = &lv_style_btn_pr; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &lv_style_pretty; + theme.style.cb.box.pr = &lv_style_btn_pr; theme.style.cb.box.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.cb.box.tgl_pr = &lv_style_btn_tgl_pr; - theme.style.cb.box.ina = &lv_style_btn_ina; + theme.style.cb.box.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.cb.box.ina = &lv_style_btn_ina; #endif } - static void btnm_init(void) { #if LV_USE_BTNM - - theme.style.btnm.bg = &lv_style_pretty; - theme.style.btnm.btn.rel = &lv_style_btn_rel; - theme.style.btnm.btn.pr = &lv_style_btn_pr; + theme.style.btnm.bg = &lv_style_pretty; + theme.style.btnm.btn.rel = &lv_style_btn_rel; + theme.style.btnm.btn.pr = &lv_style_btn_pr; theme.style.btnm.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.btnm.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.style.btnm.btn.ina = &lv_style_btn_ina; + theme.style.btnm.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.btnm.btn.ina = &lv_style_btn_ina; #endif } @@ -246,26 +236,23 @@ static void kb_init(void) { #if LV_USE_KB - - theme.style.kb.bg = &lv_style_pretty; - theme.style.kb.btn.rel = &lv_style_btn_rel; - theme.style.kb.btn.pr = &lv_style_btn_pr; + theme.style.kb.bg = &lv_style_pretty; + theme.style.kb.btn.rel = &lv_style_btn_rel; + theme.style.kb.btn.pr = &lv_style_btn_pr; theme.style.kb.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.kb.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.style.kb.btn.ina = &lv_style_btn_ina; + theme.style.kb.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.kb.btn.ina = &lv_style_btn_ina; #endif - } static void mbox_init(void) { #if LV_USE_MBOX - - theme.style.mbox.bg = &lv_style_pretty; - theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.bg = &lv_style_pretty; + theme.style.mbox.btn.bg = &lv_style_transp; theme.style.mbox.btn.rel = &lv_style_btn_rel; - theme.style.mbox.btn.pr = &lv_style_btn_tgl_pr; + theme.style.mbox.btn.pr = &lv_style_btn_tgl_pr; #endif } @@ -273,10 +260,9 @@ static void page_init(void) { #if LV_USE_PAGE - - theme.style.page.bg = &lv_style_pretty; + theme.style.page.bg = &lv_style_pretty; theme.style.page.scrl = &lv_style_transp_tight; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } @@ -284,11 +270,10 @@ static void ta_init(void) { #if LV_USE_TA - - theme.style.ta.area = &lv_style_pretty; + theme.style.ta.area = &lv_style_pretty; theme.style.ta.oneline = &lv_style_pretty; - theme.style.ta.cursor = NULL; - theme.style.ta.sb = &sb; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } @@ -296,14 +281,14 @@ static void list_init(void) { #if LV_USE_LIST != 0 - theme.style.list.bg = &lv_style_pretty; - theme.style.list.scrl = &lv_style_transp_fit; - theme.style.list.sb = &sb; - theme.style.list.btn.rel = &lv_style_btn_rel; - theme.style.list.btn.pr = &lv_style_btn_pr; + theme.style.list.bg = &lv_style_pretty; + theme.style.list.scrl = &lv_style_transp_fit; + theme.style.list.sb = &sb; + theme.style.list.btn.rel = &lv_style_btn_rel; + theme.style.list.btn.pr = &lv_style_btn_pr; theme.style.list.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.list.btn.tgl_pr = &lv_style_btn_tgl_pr; - theme.style.list.btn.ina = &lv_style_btn_ina; + theme.style.list.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.list.btn.ina = &lv_style_btn_ina; #endif } @@ -311,10 +296,9 @@ static void ddlist_init(void) { #if LV_USE_DDLIST != 0 - - theme.style.ddlist.bg = &lv_style_pretty; + theme.style.ddlist.bg = &lv_style_pretty; theme.style.ddlist.sel = &lv_style_plain_color; - theme.style.ddlist.sb = &sb; + theme.style.ddlist.sb = &sb; #endif } @@ -322,8 +306,7 @@ static void roller_init(void) { #if LV_USE_ROLLER != 0 - - theme.style.roller.bg = &lv_style_pretty; + theme.style.roller.bg = &lv_style_pretty; theme.style.roller.sel = &lv_style_plain_color; #endif } @@ -332,21 +315,20 @@ static void tabview_init(void) { #if LV_USE_TABVIEW != 0 - - theme.style.tabview.bg = &plain_bordered; - theme.style.tabview.indic = &lv_style_plain_color; - theme.style.tabview.btn.bg = &lv_style_transp; - theme.style.tabview.btn.rel = &lv_style_btn_rel; - theme.style.tabview.btn.pr = &lv_style_btn_pr; + theme.style.tabview.bg = &plain_bordered; + theme.style.tabview.indic = &lv_style_plain_color; + theme.style.tabview.btn.bg = &lv_style_transp; + theme.style.tabview.btn.rel = &lv_style_btn_rel; + theme.style.tabview.btn.pr = &lv_style_btn_pr; theme.style.tabview.btn.tgl_rel = &lv_style_btn_tgl_rel; - theme.style.tabview.btn.tgl_pr = &lv_style_btn_tgl_pr; + theme.style.tabview.btn.tgl_pr = &lv_style_btn_tgl_pr; #endif } static void table_init(void) { #if LV_USE_TABLE != 0 - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &lv_style_plain; #endif } @@ -355,14 +337,13 @@ static void win_init(void) { #if LV_USE_WIN != 0 - - theme.style.win.bg = &plain_bordered; - theme.style.win.sb = &sb; - theme.style.win.header = &lv_style_plain_color; - theme.style.win.content.bg = &lv_style_transp; + theme.style.win.bg = &plain_bordered; + theme.style.win.sb = &sb; + theme.style.win.header = &lv_style_plain_color; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &lv_style_btn_rel; - theme.style.win.btn.pr = &lv_style_btn_pr; + theme.style.win.btn.rel = &lv_style_btn_rel; + theme.style.win.btn.pr = &lv_style_btn_pr; #endif } @@ -370,22 +351,23 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -393,22 +375,23 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -420,8 +403,6 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the default theme * @param hue [0..360] hue value from HSV color space to define the theme's base color @@ -432,12 +413,12 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -469,7 +450,7 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -490,4 +471,3 @@ lv_theme_t * lv_theme_get_default(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_default.h b/src/lv_themes/lv_theme_default.h index 285c6044523f..4a2ecc0802ec 100644 --- a/src/lv_themes/lv_theme_default.h +++ b/src/lv_themes/lv_theme_default.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index fc1f45e3f199..301c4502e304 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -13,8 +13,8 @@ /********************* * DEFINES *********************/ -#define DEF_RADIUS 4 -#define DEF_SHADOW_COLOR lv_color_hex3(0xaaa) +#define DEF_RADIUS 4 +#define DEF_SHADOW_COLOR lv_color_hex3(0xaaa) /********************** * TYPEDEFS @@ -49,50 +49,48 @@ static void basic_init(void) { static lv_style_t bg, panel; - lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ - def.text.font = _font; + lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ + def.text.font = _font; def.body.radius = DEF_RADIUS; lv_style_copy(&bg, &def); bg.body.main_color = lv_color_hex(0xf0f0f0); bg.body.grad_color = bg.body.main_color; - bg.body.radius = 0; + bg.body.radius = 0; lv_style_copy(&panel, &def); - panel.body.radius = DEF_RADIUS; - panel.body.main_color = LV_COLOR_WHITE; - panel.body.grad_color = LV_COLOR_WHITE; - panel.body.border.width = 1; - panel.body.border.color = lv_color_hex3(0xbbb); - panel.body.border.opa = LV_OPA_COVER; - panel.body.shadow.color = DEF_SHADOW_COLOR; - panel.body.shadow.type = LV_SHADOW_BOTTOM; - panel.body.shadow.width = 4; - panel.body.padding.left = LV_DPI / 8; - panel.body.padding.right = LV_DPI / 8; - panel.body.padding.top = LV_DPI / 8; + panel.body.radius = DEF_RADIUS; + panel.body.main_color = LV_COLOR_WHITE; + panel.body.grad_color = LV_COLOR_WHITE; + panel.body.border.width = 1; + panel.body.border.color = lv_color_hex3(0xbbb); + panel.body.border.opa = LV_OPA_COVER; + panel.body.shadow.color = DEF_SHADOW_COLOR; + panel.body.shadow.type = LV_SHADOW_BOTTOM; + panel.body.shadow.width = 4; + panel.body.padding.left = LV_DPI / 8; + panel.body.padding.right = LV_DPI / 8; + panel.body.padding.top = LV_DPI / 8; panel.body.padding.bottom = LV_DPI / 8; - panel.body.padding.inner = LV_DPI / 12; - panel.text.color = lv_color_hex3(0x333); - panel.image.color = lv_color_hex3(0x333); + panel.body.padding.inner = LV_DPI / 12; + panel.text.color = lv_color_hex3(0x333); + panel.image.color = lv_color_hex3(0x333); lv_style_copy(&sb, &def); - sb.body.main_color = LV_COLOR_BLACK; - sb.body.grad_color = LV_COLOR_BLACK; - sb.body.opa = LV_OPA_40; - sb.body.padding.right = LV_DPI / 25; + sb.body.main_color = LV_COLOR_BLACK; + sb.body.grad_color = LV_COLOR_BLACK; + sb.body.opa = LV_OPA_40; + sb.body.padding.right = LV_DPI / 25; sb.body.padding.bottom = LV_DPI / 25; - theme.style.bg = &bg; + theme.style.bg = &bg; theme.style.panel = &panel; - } static void cont_init(void) { #if LV_USE_CONT != 0 - theme.style.cont = theme.style.panel; #endif } @@ -103,59 +101,57 @@ static void btn_init(void) static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); - rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); - rel.body.grad_color = rel.body.main_color; - rel.body.radius = DEF_RADIUS; - rel.body.padding.left = LV_DPI / 6; - rel.body.padding.right = LV_DPI / 6; - rel.body.padding.top = LV_DPI / 8; + rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); + rel.body.grad_color = rel.body.main_color; + rel.body.radius = DEF_RADIUS; + rel.body.padding.left = LV_DPI / 6; + rel.body.padding.right = LV_DPI / 6; + rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.body.padding.inner = LV_DPI / 10; - rel.body.shadow.color = DEF_SHADOW_COLOR; - rel.body.shadow.type = LV_SHADOW_BOTTOM; - rel.body.shadow.width = 6; - rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 95); - + rel.body.padding.inner = LV_DPI / 10; + rel.body.shadow.color = DEF_SHADOW_COLOR; + rel.body.shadow.type = LV_SHADOW_BOTTOM; + rel.body.shadow.width = 6; + rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); + rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 95); lv_style_copy(&pr, &rel); - pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60); - pr.body.grad_color = pr.body.main_color; + pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60); + pr.body.grad_color = pr.body.main_color; pr.body.shadow.width = 4; lv_style_copy(&tgl_rel, &rel); - tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 50); - tgl_rel.body.grad_color = tgl_rel.body.main_color; + tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 50); + tgl_rel.body.grad_color = tgl_rel.body.main_color; tgl_rel.body.shadow.width = 4; lv_style_copy(&tgl_pr, &tgl_rel); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 40); - tgl_pr.body.grad_color = tgl_pr.body.main_color; + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 40); + tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.shadow.width = 2; lv_style_copy(&ina, &rel); - ina.body.main_color = lv_color_hex3(0xccc); - ina.body.grad_color = ina.body.main_color; + ina.body.main_color = lv_color_hex3(0xccc); + ina.body.grad_color = ina.body.main_color; ina.body.shadow.width = 0; - ina.text.color = lv_color_hsv_to_rgb(_hue, 95, 5); - ina.image.color = lv_color_hsv_to_rgb(_hue, 95, 5); + ina.text.color = lv_color_hsv_to_rgb(_hue, 95, 5); + ina.image.color = lv_color_hsv_to_rgb(_hue, 95, 5); - theme.style.btn.rel = &rel; - theme.style.btn.pr = ≺ + theme.style.btn.rel = &rel; + theme.style.btn.pr = ≺ theme.style.btn.tgl_rel = &tgl_rel; - theme.style.btn.tgl_pr = &tgl_pr; - theme.style.btn.ina = &ina; + theme.style.btn.tgl_pr = &tgl_pr; + theme.style.btn.ina = &ina; #endif } - static void label_init(void) { #if LV_USE_LABEL != 0 static lv_style_t prim, sec, hint; lv_style_copy(&prim, &def); - prim.text.font = _font; + prim.text.font = _font; prim.text.color = lv_color_hsv_to_rgb(_hue, 80, 10); lv_style_copy(&sec, &prim); @@ -165,7 +161,7 @@ static void label_init(void) hint.text.color = lv_color_hsv_to_rgb(_hue, 40, 90); theme.style.label.prim = &prim; - theme.style.label.sec = &sec; + theme.style.label.sec = &sec; theme.style.label.hint = &hint; #endif } @@ -175,16 +171,15 @@ static void img_init(void) #if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); img_light.image.intense = LV_OPA_80; lv_style_copy(&img_dark, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); img_light.image.intense = LV_OPA_80; - theme.style.img.light = &def; - theme.style.img.dark = &def; + theme.style.img.dark = &def; #endif } @@ -192,7 +187,6 @@ static void line_init(void) { #if LV_USE_LINE != 0 - theme.style.line.decor = &def; #endif } @@ -203,15 +197,14 @@ static void led_init(void) static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; - led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); - led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 100); + led.body.border.opa = LV_OPA_30; + led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); + led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 100); led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); - theme.style.led = &led; #endif } @@ -222,24 +215,24 @@ static void bar_init(void) static lv_style_t bar_bg, bar_indic; lv_style_copy(&bar_bg, &def); - bar_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); - bar_bg.body.grad_color = bar_bg.body.main_color; - bar_bg.body.radius = 3; - bar_bg.body.border.width = 0; - bar_bg.body.padding.left = LV_DPI / 12; - bar_bg.body.padding.right = LV_DPI / 12; - bar_bg.body.padding.top = LV_DPI / 12; + bar_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); + bar_bg.body.grad_color = bar_bg.body.main_color; + bar_bg.body.radius = 3; + bar_bg.body.border.width = 0; + bar_bg.body.padding.left = LV_DPI / 12; + bar_bg.body.padding.right = LV_DPI / 12; + bar_bg.body.padding.top = LV_DPI / 12; bar_bg.body.padding.bottom = LV_DPI / 12; lv_style_copy(&bar_indic, &bar_bg); - bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 85, 70); - bar_indic.body.grad_color = bar_indic.body.main_color; - bar_indic.body.padding.left = 0; - bar_indic.body.padding.right = 0; - bar_indic.body.padding.top = 0; + bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 85, 70); + bar_indic.body.grad_color = bar_indic.body.main_color; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; bar_indic.body.padding.bottom = 0; - theme.style.bar.bg = &bar_bg; + theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; #endif } @@ -250,14 +243,14 @@ static void slider_init(void) static lv_style_t knob; lv_style_copy(&knob, &def); - knob.body.radius = LV_RADIUS_CIRCLE; + knob.body.radius = LV_RADIUS_CIRCLE; knob.body.border.width = 0; - knob.body.main_color = theme.style.bar.indic->body.main_color; - knob.body.grad_color = knob.body.main_color; + knob.body.main_color = theme.style.bar.indic->body.main_color; + knob.body.grad_color = knob.body.main_color; - theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.bg = theme.style.bar.bg; theme.style.slider.indic = theme.style.bar.indic; - theme.style.slider.knob = &knob; + theme.style.slider.knob = &knob; #endif } @@ -273,35 +266,33 @@ static void sw_init(void) lv_style_copy(&sw_knob_on, theme.style.slider.knob); sw_knob_on.body.shadow.width = 3; - sw_knob_on.body.shadow.type = LV_SHADOW_BOTTOM; + sw_knob_on.body.shadow.type = LV_SHADOW_BOTTOM; sw_knob_on.body.shadow.color = DEF_SHADOW_COLOR; - lv_style_copy(&sw_knob_off, &sw_knob_on); - sw_knob_off.body.main_color = lv_color_hex(0xfafafa); - sw_knob_off.body.grad_color = sw_knob_off.body.main_color; + sw_knob_off.body.main_color = lv_color_hex(0xfafafa); + sw_knob_off.body.grad_color = sw_knob_off.body.main_color; sw_knob_off.body.border.width = 1; sw_knob_off.body.border.color = lv_color_hex3(0x999); - sw_knob_off.body.border.opa = LV_OPA_COVER; + sw_knob_off.body.border.opa = LV_OPA_COVER; - theme.style.sw.bg = &sw_bg; - theme.style.sw.indic = &sw_indic; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; theme.style.sw.knob_off = &sw_knob_off; - theme.style.sw.knob_on = &sw_knob_on; + theme.style.sw.knob_on = &sw_knob_on; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); - lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); - lmeter.body.grad_color = lmeter.body.main_color; - lmeter.body.padding.left = LV_DPI / 10; /*Scale line length*/ - lmeter.line.color = lv_color_hex3(0x999); - lmeter.line.width = 2; + lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 90); + lmeter.body.grad_color = lmeter.body.main_color; + lmeter.body.padding.left = LV_DPI / 10; /*Scale line length*/ + lmeter.line.color = lv_color_hex3(0x999); + lmeter.line.width = 2; theme.style.lmeter = &lmeter; #endif @@ -313,14 +304,14 @@ static void gauge_init(void) static lv_style_t gauge; lv_style_copy(&gauge, &def); - gauge.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 60); - gauge.body.grad_color = gauge.body.main_color; - gauge.body.padding.left = LV_DPI / 16; /*Scale line length*/ + gauge.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 60); + gauge.body.grad_color = gauge.body.main_color; + gauge.body.padding.left = LV_DPI / 16; /*Scale line length*/ gauge.body.padding.inner = LV_DPI / 8; - gauge.body.border.color = lv_color_hex3(0x999); - gauge.text.color = lv_color_hex3(0x333); - gauge.line.width = 3; - gauge.line.color = lv_color_hsv_to_rgb(_hue, 95, 70); + gauge.body.border.color = lv_color_hex3(0x999); + gauge.text.color = lv_color_hex3(0x333); + gauge.line.width = 3; + gauge.line.color = lv_color_hsv_to_rgb(_hue, 95, 70); theme.style.gauge = &gauge; #endif @@ -336,11 +327,11 @@ static void arc_init(void) arc.line.color = lv_color_hsv_to_rgb(_hue, 90, 90); /*For prelaoder*/ - arc.body.border.width = 10; - arc.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); - arc.body.padding.left = 0; - arc.body.padding.right = 0; - arc.body.padding.top = 0; + arc.body.border.width = 10; + arc.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); + arc.body.padding.left = 0; + arc.body.padding.right = 0; + arc.body.padding.top = 0; arc.body.padding.bottom = 0; theme.style.arc = &arc; @@ -375,31 +366,31 @@ static void calendar_init(void) static lv_style_t week_box; lv_style_copy(&week_box, &def); - week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 100); - week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 100); - week_box.body.padding.top = LV_DPI / 20; + week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 100); + week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 100); + week_box.body.padding.top = LV_DPI / 20; week_box.body.padding.bottom = LV_DPI / 20; - week_box.body.padding.left = theme.style.panel->body.padding.left; - week_box.body.padding.right = theme.style.panel->body.padding.right; - week_box.body.border.color = theme.style.panel->body.border.color; - week_box.body.border.width = theme.style.panel->body.border.width; - week_box.body.border.part = LV_BORDER_LEFT | LV_BORDER_RIGHT; - week_box.body.radius = 0; + week_box.body.padding.left = theme.style.panel->body.padding.left; + week_box.body.padding.right = theme.style.panel->body.padding.right; + week_box.body.border.color = theme.style.panel->body.border.color; + week_box.body.border.width = theme.style.panel->body.border.width; + week_box.body.border.part = LV_BORDER_LEFT | LV_BORDER_RIGHT; + week_box.body.radius = 0; static lv_style_t today_box; lv_style_copy(&today_box, &def); - today_box.body.main_color = LV_COLOR_WHITE; - today_box.body.grad_color = LV_COLOR_WHITE; - today_box.body.padding.top = LV_DPI / 20; + today_box.body.main_color = LV_COLOR_WHITE; + today_box.body.grad_color = LV_COLOR_WHITE; + today_box.body.padding.top = LV_DPI / 20; today_box.body.padding.bottom = LV_DPI / 20; - today_box.body.radius = 0; + today_box.body.radius = 0; - theme.style.calendar.bg = theme.style.panel; - theme.style.calendar.header = &lv_style_transp; - theme.style.calendar.inactive_days = &ina_days; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &lv_style_transp; + theme.style.calendar.inactive_days = &ina_days; theme.style.calendar.highlighted_days = &high_days; - theme.style.calendar.week_box = &week_box; - theme.style.calendar.today_box = &today_box; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &today_box; #endif } @@ -408,85 +399,83 @@ static void cb_init(void) #if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, theme.style.panel); - rel.body.shadow.type = LV_SHADOW_BOTTOM; + rel.body.shadow.type = LV_SHADOW_BOTTOM; rel.body.shadow.width = 3; lv_style_copy(&pr, &rel); - pr.body.main_color = lv_color_hex3(0xccc); - pr.body.grad_color = pr.body.main_color; + pr.body.main_color = lv_color_hex3(0xccc); + pr.body.grad_color = pr.body.main_color; pr.body.shadow.width = 0; lv_style_copy(&tgl_rel, &rel); - tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 85); - tgl_rel.body.grad_color = tgl_rel.body.main_color; - tgl_rel.body.shadow.type = LV_SHADOW_FULL; + tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 85); + tgl_rel.body.grad_color = tgl_rel.body.main_color; + tgl_rel.body.shadow.type = LV_SHADOW_FULL; tgl_rel.body.shadow.width = 0; lv_style_copy(&tgl_pr, &tgl_rel); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 65); - tgl_pr.body.grad_color = tgl_pr.body.main_color; + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 75, 65); + tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.shadow.width = 0; lv_style_copy(&ina, theme.style.btn.ina); - theme.style.cb.bg = &lv_style_transp; - theme.style.cb.box.rel = &rel; - theme.style.cb.box.pr = ≺ + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ theme.style.cb.box.tgl_rel = &tgl_rel; - theme.style.cb.box.tgl_pr = &tgl_pr; - theme.style.cb.box.ina = &ina; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &ina; #endif } - static void btnm_init(void) { #if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.left = 0; - bg.body.padding.right = 0; - bg.body.padding.top = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; bg.body.padding.bottom = 0; - bg.body.padding.inner = 0; - bg.text.color = lv_color_hex3(0x555); + bg.body.padding.inner = 0; + bg.text.color = lv_color_hex3(0x555); lv_style_copy(&rel, theme.style.panel); - rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; + rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; rel.body.border.width = 1; rel.body.border.color = lv_color_hex3(0xbbb); - rel.body.opa = LV_OPA_TRANSP; + rel.body.opa = LV_OPA_TRANSP; rel.body.shadow.width = 0; lv_style_copy(&pr, &rel); - pr.glass = 0; - pr.body.main_color = lv_color_hex3(0xddd); - pr.body.grad_color = pr.body.main_color; + pr.glass = 0; + pr.body.main_color = lv_color_hex3(0xddd); + pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; - pr.body.opa = LV_OPA_COVER; + pr.body.opa = LV_OPA_COVER; lv_style_copy(&tgl_rel, &pr); tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); tgl_rel.body.grad_color = tgl_rel.body.main_color; - tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - + tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); lv_style_copy(&tgl_pr, &tgl_rel); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 65); - tgl_pr.body.grad_color = tgl_pr.body.main_color; + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 95, 65); + tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.border.width = 0; lv_style_copy(&ina, &pr); ina.body.main_color = lv_color_hex3(0xccc); ina.body.grad_color = ina.body.main_color; - theme.style.btnm.bg = &bg; - theme.style.btnm.btn.rel = &rel; - theme.style.btnm.btn.pr = ≺ + theme.style.btnm.bg = &bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ theme.style.btnm.btn.tgl_rel = &tgl_rel; - theme.style.btnm.btn.tgl_pr = &tgl_pr; - theme.style.btnm.btn.ina = &def; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &def; #endif } @@ -498,14 +487,13 @@ static void kb_init(void) lv_style_copy(&rel, &lv_style_transp); rel.text.font = _font; - theme.style.kb.bg = theme.style.btnm.bg; - theme.style.kb.btn.rel = &rel; - theme.style.kb.btn.pr = theme.style.btnm.btn.pr; + theme.style.kb.bg = theme.style.btnm.bg; + theme.style.kb.btn.rel = &rel; + theme.style.kb.btn.pr = theme.style.btnm.btn.pr; theme.style.kb.btn.tgl_rel = theme.style.btnm.btn.tgl_rel; - theme.style.kb.btn.tgl_pr = theme.style.btnm.btn.tgl_pr; - theme.style.kb.btn.ina = theme.style.btnm.btn.ina; + theme.style.kb.btn.tgl_pr = theme.style.btnm.btn.tgl_pr; + theme.style.kb.btn.ina = theme.style.btnm.btn.ina; #endif - } static void mbox_init(void) @@ -514,17 +502,17 @@ static void mbox_init(void) static lv_style_t pr, rel; lv_style_copy(&rel, &lv_style_transp); - rel.glass = 0; - rel.text.font = _font; + rel.glass = 0; + rel.text.font = _font; rel.text.color = lv_color_hsv_to_rgb(_hue, 85, 75); lv_style_copy(&pr, theme.style.btnm.btn.pr); pr.text.color = lv_color_hsv_to_rgb(_hue, 85, 60); - theme.style.mbox.bg = theme.style.panel; - theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.bg = theme.style.panel; + theme.style.mbox.btn.bg = &lv_style_transp; theme.style.mbox.btn.rel = &rel; - theme.style.mbox.btn.pr = ≺ + theme.style.mbox.btn.pr = ≺ #endif } @@ -532,10 +520,9 @@ static void page_init(void) { #if LV_USE_PAGE - - theme.style.page.bg = theme.style.panel; + theme.style.page.bg = theme.style.panel; theme.style.page.scrl = &lv_style_transp; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } @@ -545,27 +532,27 @@ static void ta_init(void) static lv_style_t oneline; lv_style_copy(&oneline, &def); - oneline.body.opa = LV_OPA_TRANSP; - oneline.body.radius = 0; - oneline.body.border.part = LV_BORDER_BOTTOM; + oneline.body.opa = LV_OPA_TRANSP; + oneline.body.radius = 0; + oneline.body.border.part = LV_BORDER_BOTTOM; oneline.body.border.width = 3; oneline.body.border.color = lv_color_hex3(0x333); - oneline.body.border.opa = LV_OPA_COVER; - oneline.text.color = lv_color_hex3(0x333); + oneline.body.border.opa = LV_OPA_COVER; + oneline.text.color = lv_color_hex3(0x333); - theme.style.ta.area = theme.style.panel; + theme.style.ta.area = theme.style.panel; theme.style.ta.oneline = &oneline; - theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.style.ta.sb = &sb; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if LV_USE_SPINBOX - theme.style.spinbox.bg= theme.style.panel; + theme.style.spinbox.bg = theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; - theme.style.spinbox.sb = theme.style.ta.sb; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -576,55 +563,53 @@ static void list_init(void) static lv_style_t list_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&list_bg, theme.style.panel); - list_bg.body.padding.left = 0; - list_bg.body.padding.right = 0; - list_bg.body.padding.top = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; list_bg.body.padding.bottom = 0; - list_bg.body.padding.inner = 0; + list_bg.body.padding.inner = 0; lv_style_copy(&rel, &lv_style_transp); - rel.body.padding.left = LV_DPI / 8; - rel.body.padding.right = LV_DPI / 8; - rel.body.padding.top = LV_DPI / 6; + rel.body.padding.left = LV_DPI / 8; + rel.body.padding.right = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 6; rel.body.padding.bottom = LV_DPI / 6; - rel.body.radius = 10; - rel.body.border.color = lv_color_hex3(0xbbb); - rel.body.border.width = 1; - rel.body.border.part = LV_BORDER_BOTTOM; + rel.body.radius = 10; + rel.body.border.color = lv_color_hex3(0xbbb); + rel.body.border.width = 1; + rel.body.border.part = LV_BORDER_BOTTOM; lv_style_copy(&pr, &rel); - pr.glass = 0; - pr.body.main_color = lv_color_hex3(0xddd); - pr.body.grad_color = pr.body.main_color; + pr.glass = 0; + pr.body.main_color = lv_color_hex3(0xddd); + pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; - pr.body.opa = LV_OPA_COVER; - pr.body.radius = DEF_RADIUS; - pr.text.font = _font; + pr.body.opa = LV_OPA_COVER; + pr.body.radius = DEF_RADIUS; + pr.text.font = _font; lv_style_copy(&tgl_rel, &pr); tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); tgl_rel.body.grad_color = tgl_rel.body.main_color; - tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - + tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); lv_style_copy(&tgl_pr, &tgl_rel); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60); - tgl_pr.body.grad_color = tgl_pr.body.main_color; + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 60); + tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.border.width = 0; lv_style_copy(&ina, &pr); ina.body.main_color = lv_color_hex3(0xccc); ina.body.grad_color = ina.body.main_color; - - theme.style.list.sb = &sb; - theme.style.list.bg = &list_bg; - theme.style.list.scrl = &lv_style_transp_tight; - theme.style.list.btn.rel = &rel; - theme.style.list.btn.pr = ≺ + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &rel; + theme.style.list.btn.pr = ≺ theme.style.list.btn.tgl_rel = &tgl_rel; - theme.style.list.btn.tgl_pr = &tgl_pr; - theme.style.list.btn.ina = &ina; + theme.style.list.btn.tgl_pr = &tgl_pr; + theme.style.list.btn.ina = &ina; #endif } @@ -633,23 +618,22 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.left = LV_DPI / 6; - bg.body.padding.right = LV_DPI / 6; - bg.body.padding.top = LV_DPI / 6; + bg.body.padding.left = LV_DPI / 6; + bg.body.padding.right = LV_DPI / 6; + bg.body.padding.top = LV_DPI / 6; bg.body.padding.bottom = LV_DPI / 6; - bg.text.line_space = LV_DPI / 8; + bg.text.line_space = LV_DPI / 8; lv_style_copy(&sel, &bg); - sel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); - sel.body.grad_color = sel.body.main_color; + sel.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); + sel.body.grad_color = sel.body.main_color; sel.body.border.width = 0; sel.body.shadow.width = 0; - sel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); + sel.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - - theme.style.ddlist.bg = &bg; + theme.style.ddlist.bg = &bg; theme.style.ddlist.sel = &sel; - theme.style.ddlist.sb = &sb; + theme.style.ddlist.sb = &sb; #endif } @@ -659,19 +643,18 @@ static void roller_init(void) static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &lv_style_transp); - roller_bg.body.padding.left = LV_DPI / 6; - roller_bg.body.padding.right = LV_DPI / 6; - roller_bg.body.padding.top = LV_DPI / 6; + roller_bg.body.padding.left = LV_DPI / 6; + roller_bg.body.padding.right = LV_DPI / 6; + roller_bg.body.padding.top = LV_DPI / 6; roller_bg.body.padding.bottom = LV_DPI / 6; - roller_bg.text.line_space = LV_DPI / 8; - roller_bg.text.font = _font; - roller_bg.glass = 0; + roller_bg.text.line_space = LV_DPI / 8; + roller_bg.text.font = _font; + roller_bg.glass = 0; lv_style_copy(&roller_sel, &roller_bg); roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 90, 70); - - theme.style.roller.bg = &roller_bg; + theme.style.roller.bg = &roller_bg; theme.style.roller.sel = &roller_sel; #endif } @@ -682,77 +665,76 @@ static void tabview_init(void) static lv_style_t indic, btn_bg, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&indic, &def); - indic.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); - indic.body.grad_color = indic.body.main_color; - indic.body.radius = 0; - indic.body.border.width = 0; + indic.body.main_color = lv_color_hsv_to_rgb(_hue, 90, 70); + indic.body.grad_color = indic.body.main_color; + indic.body.radius = 0; + indic.body.border.width = 0; indic.body.padding.inner = LV_DPI / 20; lv_style_copy(&btn_bg, &def); - btn_bg.body.main_color = lv_color_hex3(0xccc); - btn_bg.body.grad_color = btn_bg.body.main_color; - btn_bg.body.radius = 0; - btn_bg.body.border.width = 1; - btn_bg.body.border.color = lv_color_hex3(0x888); - btn_bg.body.border.part = LV_BORDER_BOTTOM; - btn_bg.body.border.opa = LV_OPA_COVER; - btn_bg.body.shadow.width = 5; - btn_bg.body.shadow.color = DEF_SHADOW_COLOR; - btn_bg.body.shadow.type = LV_SHADOW_BOTTOM; - btn_bg.body.padding.inner = 0; - btn_bg.body.padding.left = 0; - btn_bg.body.padding.right = 0; - btn_bg.body.padding.top = 0; + btn_bg.body.main_color = lv_color_hex3(0xccc); + btn_bg.body.grad_color = btn_bg.body.main_color; + btn_bg.body.radius = 0; + btn_bg.body.border.width = 1; + btn_bg.body.border.color = lv_color_hex3(0x888); + btn_bg.body.border.part = LV_BORDER_BOTTOM; + btn_bg.body.border.opa = LV_OPA_COVER; + btn_bg.body.shadow.width = 5; + btn_bg.body.shadow.color = DEF_SHADOW_COLOR; + btn_bg.body.shadow.type = LV_SHADOW_BOTTOM; + btn_bg.body.padding.inner = 0; + btn_bg.body.padding.left = 0; + btn_bg.body.padding.right = 0; + btn_bg.body.padding.top = 0; btn_bg.body.padding.bottom = 0; - btn_bg.text.color = lv_color_hex3(0x333); - + btn_bg.text.color = lv_color_hex3(0x333); lv_style_copy(&rel, &lv_style_transp); - rel.body.padding.top = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.text.font = _font; + rel.text.font = _font; lv_style_copy(&pr, &def); - pr.body.main_color = lv_color_hex3(0xbbb); - pr.body.grad_color = pr.body.main_color; + pr.body.main_color = lv_color_hex3(0xbbb); + pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; - pr.body.opa = LV_OPA_COVER; - pr.body.radius = 0; + pr.body.opa = LV_OPA_COVER; + pr.body.radius = 0; pr.body.border.width = 1; pr.body.border.color = lv_color_hex3(0x888); - pr.body.border.part = LV_BORDER_BOTTOM; - pr.body.border.opa = LV_OPA_COVER; - pr.text.color = lv_color_hex3(0x111); + pr.body.border.part = LV_BORDER_BOTTOM; + pr.body.border.opa = LV_OPA_COVER; + pr.text.color = lv_color_hex3(0x111); lv_style_copy(&tgl_rel, &lv_style_transp); - tgl_rel.glass = 0; - tgl_rel.text.font = _font; + tgl_rel.glass = 0; + tgl_rel.text.font = _font; tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 90, 70); lv_style_copy(&tgl_pr, &def); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 85); - tgl_pr.body.grad_color = tgl_pr.body.main_color; + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 85); + tgl_pr.body.grad_color = tgl_pr.body.main_color; tgl_pr.body.border.width = 0; - tgl_pr.body.opa = LV_OPA_COVER; - tgl_pr.body.radius = 0; - tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 90, 60); - - theme.style.tabview.bg = theme.style.bg; - theme.style.tabview.indic = &indic; - theme.style.tabview.btn.bg = &btn_bg; - theme.style.tabview.btn.rel = &rel; - theme.style.tabview.btn.pr = ≺ + tgl_pr.body.opa = LV_OPA_COVER; + tgl_pr.body.radius = 0; + tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 90, 60); + + theme.style.tabview.bg = theme.style.bg; + theme.style.tabview.indic = &indic; + theme.style.tabview.btn.bg = &btn_bg; + theme.style.tabview.btn.rel = &rel; + theme.style.tabview.btn.pr = ≺ theme.style.tabview.btn.tgl_rel = &tgl_rel; - theme.style.tabview.btn.tgl_pr = &tgl_pr; + theme.style.tabview.btn.tgl_pr = &tgl_pr; #endif } static void tileview_init(void) { #if LV_USE_TILEVIEW != 0 - theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; - theme.style.tileview.sb = theme.style.page.sb; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -761,15 +743,14 @@ static void table_init(void) #if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); - cell.body.radius = 0; - cell.body.border.width = 1; - cell.body.padding.left = LV_DPI / 12; - cell.body.padding.right = LV_DPI / 12; - cell.body.padding.top = LV_DPI / 12; + cell.body.radius = 0; + cell.body.border.width = 1; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; cell.body.padding.bottom = LV_DPI / 12; - - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; #endif } @@ -780,38 +761,37 @@ static void win_init(void) static lv_style_t header, pr; lv_style_copy(&header, &def); - header.body.main_color = lv_color_hex3(0xccc); - header.body.grad_color = header.body.main_color; - header.body.radius = 0; - header.body.border.width = 1; - header.body.border.color = lv_color_hex3(0xbbb); - header.body.border.part = LV_BORDER_BOTTOM; - header.body.border.opa = LV_OPA_COVER; - header.body.padding.inner = 0; - header.body.padding.left = 0; - header.body.padding.right = 0; - header.body.padding.top = 0; + header.body.main_color = lv_color_hex3(0xccc); + header.body.grad_color = header.body.main_color; + header.body.radius = 0; + header.body.border.width = 1; + header.body.border.color = lv_color_hex3(0xbbb); + header.body.border.part = LV_BORDER_BOTTOM; + header.body.border.opa = LV_OPA_COVER; + header.body.padding.inner = 0; + header.body.padding.left = 0; + header.body.padding.right = 0; + header.body.padding.top = 0; header.body.padding.bottom = 0; - header.text.color = lv_color_hex3(0x333); - header.image.color = lv_color_hex3(0x333); + header.text.color = lv_color_hex3(0x333); + header.image.color = lv_color_hex3(0x333); lv_style_copy(&pr, &def); - pr.body.main_color = lv_color_hex3(0xbbb); - pr.body.grad_color = pr.body.main_color; + pr.body.main_color = lv_color_hex3(0xbbb); + pr.body.grad_color = pr.body.main_color; pr.body.border.width = 0; - pr.body.opa = LV_OPA_COVER; - pr.body.radius = 0; - pr.text.color = lv_color_hex3(0x111); - pr.image.color = lv_color_hex3(0x111); - - - theme.style.win.bg = theme.style.panel; - theme.style.win.sb = &sb; - theme.style.win.header = &header; - theme.style.win.content.bg = &lv_style_transp; + pr.body.opa = LV_OPA_COVER; + pr.body.radius = 0; + pr.text.color = lv_color_hex3(0x111); + pr.image.color = lv_color_hex3(0x111); + + theme.style.win.bg = theme.style.panel; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &lv_style_transp; - theme.style.win.btn.pr = ≺ + theme.style.win.btn.rel = &lv_style_transp; + theme.style.win.btn.pr = ≺ #endif } @@ -819,22 +799,27 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = lv_color_hsv_to_rgb(_hue, 90, 70); /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - - style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); - style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); - - style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; + + style->body.main_color = + lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.grad_color = + lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.shadow.color = + lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); + + style->text.color = + lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -842,22 +827,23 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -869,8 +855,6 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the material theme * @param hue [0..360] hue value from HSV color space to define the theme's base color @@ -881,12 +865,12 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -924,7 +908,7 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -945,4 +929,3 @@ lv_theme_t * lv_theme_get_material(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_material.h b/src/lv_themes/lv_theme_material.h index 61fc323a6e24..1f2e1b7e1730 100644 --- a/src/lv_themes/lv_theme_material.h +++ b/src/lv_themes/lv_theme_material.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index a4bcaa443537..a28cb2d5c219 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -8,7 +8,6 @@ *********************/ #include "lv_theme.h" - #if LV_USE_THEME_MONO /********************* @@ -38,7 +37,6 @@ static lv_style_t dark_frame; /*Saved input parameters*/ static lv_font_t * _font; - /********************** * MACROS **********************/ @@ -49,33 +47,33 @@ static lv_font_t * _font; static void basic_init(void) { - lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ - def.body.main_color = LV_COLOR_WHITE; - def.body.grad_color = LV_COLOR_WHITE; - def.body.radius = 0; - def.body.opa = LV_OPA_COVER; - def.body.padding.left = LV_DPI / 10; - def.body.padding.right = LV_DPI / 10; - def.body.padding.top = LV_DPI / 10; + lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ + def.body.main_color = LV_COLOR_WHITE; + def.body.grad_color = LV_COLOR_WHITE; + def.body.radius = 0; + def.body.opa = LV_OPA_COVER; + def.body.padding.left = LV_DPI / 10; + def.body.padding.right = LV_DPI / 10; + def.body.padding.top = LV_DPI / 10; def.body.padding.bottom = LV_DPI / 10; - def.body.padding.inner = LV_DPI / 10; - def.body.border.color = LV_COLOR_BLACK; - def.body.border.width = 1; - def.body.border.opa = LV_OPA_COVER; - def.body.border.part = LV_BORDER_FULL; - - def.text.font = _font; - def.text.color = LV_COLOR_BLACK; + def.body.padding.inner = LV_DPI / 10; + def.body.border.color = LV_COLOR_BLACK; + def.body.border.width = 1; + def.body.border.opa = LV_OPA_COVER; + def.body.border.part = LV_BORDER_FULL; + + def.text.font = _font; + def.text.color = LV_COLOR_BLACK; def.text.letter_space = 1; - def.text.line_space = 1; + def.text.line_space = 1; def.line.color = LV_COLOR_BLACK; - def.line.opa = LV_OPA_COVER; + def.line.opa = LV_OPA_COVER; def.line.width = 1; - def.image.color = LV_COLOR_BLACK; + def.image.color = LV_COLOR_BLACK; def.image.intense = LV_OPA_TRANSP; - def.image.opa = LV_OPA_COVER; + def.image.opa = LV_OPA_COVER; lv_style_copy(&light_plain, &def); @@ -83,26 +81,24 @@ static void basic_init(void) light_frame.body.radius = LV_DPI / 20; lv_style_copy(&dark_plain, &light_plain); - dark_plain.body.main_color = LV_COLOR_BLACK; - dark_plain.body.grad_color = LV_COLOR_BLACK; + dark_plain.body.main_color = LV_COLOR_BLACK; + dark_plain.body.grad_color = LV_COLOR_BLACK; dark_plain.body.border.color = LV_COLOR_WHITE; - dark_plain.text.color = LV_COLOR_WHITE; - dark_plain.line.color = LV_COLOR_WHITE; - dark_plain.image.color = LV_COLOR_WHITE; + dark_plain.text.color = LV_COLOR_WHITE; + dark_plain.line.color = LV_COLOR_WHITE; + dark_plain.image.color = LV_COLOR_WHITE; lv_style_copy(&dark_frame, &dark_plain); dark_frame.body.radius = LV_DPI / 20; - theme.style.bg = &def; + theme.style.bg = &def; theme.style.panel = &light_frame; - } static void cont_init(void) { #if LV_USE_CONT != 0 - theme.style.cont = &def; #endif } @@ -111,23 +107,20 @@ static void btn_init(void) { #if LV_USE_BTN != 0 - - theme.style.btn.rel = &light_frame; - theme.style.btn.pr = &dark_frame; + theme.style.btn.rel = &light_frame; + theme.style.btn.pr = &dark_frame; theme.style.btn.tgl_rel = &dark_frame; - theme.style.btn.tgl_pr = &light_frame; - theme.style.btn.ina = &light_frame; + theme.style.btn.tgl_pr = &light_frame; + theme.style.btn.ina = &light_frame; #endif } - static void label_init(void) { #if LV_USE_LABEL != 0 - theme.style.label.prim = NULL; - theme.style.label.sec = NULL; + theme.style.label.sec = NULL; theme.style.label.hint = NULL; #endif } @@ -136,9 +129,8 @@ static void img_init(void) { #if LV_USE_IMG != 0 - theme.style.img.light = &def; - theme.style.img.dark = &def; + theme.style.img.dark = &def; #endif } @@ -154,10 +146,10 @@ static void led_init(void) #if LV_USE_LED != 0 static lv_style_t led; lv_style_copy(&led, &light_frame); - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.shadow.width = LV_DPI / 8; led.body.shadow.color = LV_COLOR_BLACK; - led.body.shadow.type = LV_SHADOW_FULL; + led.body.shadow.type = LV_SHADOW_FULL; theme.style.led = &led; #endif @@ -170,20 +162,20 @@ static void bar_init(void) static lv_style_t bar_indic; lv_style_copy(&bar_bg, &light_frame); - bar_bg.body.padding.left = LV_DPI / 15; - bar_bg.body.padding.right = LV_DPI / 15; - bar_bg.body.padding.top = LV_DPI / 15; + bar_bg.body.padding.left = LV_DPI / 15; + bar_bg.body.padding.right = LV_DPI / 15; + bar_bg.body.padding.top = LV_DPI / 15; bar_bg.body.padding.bottom = LV_DPI / 15; - bar_bg.body.radius = LV_RADIUS_CIRCLE; + bar_bg.body.radius = LV_RADIUS_CIRCLE; lv_style_copy(&bar_indic, &dark_frame); - bar_indic.body.padding.left = LV_DPI / 30; - bar_indic.body.padding.right = LV_DPI / 30; - bar_indic.body.padding.top = LV_DPI / 30; + bar_indic.body.padding.left = LV_DPI / 30; + bar_indic.body.padding.right = LV_DPI / 30; + bar_indic.body.padding.top = LV_DPI / 30; bar_indic.body.padding.bottom = LV_DPI / 30; - bar_indic.body.radius = LV_RADIUS_CIRCLE; + bar_indic.body.radius = LV_RADIUS_CIRCLE; - theme.style.bar.bg = &bar_bg; + theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; #endif } @@ -193,15 +185,15 @@ static void slider_init(void) #if LV_USE_SLIDER != 0 static lv_style_t slider_knob; lv_style_copy(&slider_knob, &light_frame); - slider_knob.body.radius = LV_RADIUS_CIRCLE; - slider_knob.body.padding.left = LV_DPI / 30; - slider_knob.body.padding.right = LV_DPI / 30; - slider_knob.body.padding.top = LV_DPI / 30; + slider_knob.body.radius = LV_RADIUS_CIRCLE; + slider_knob.body.padding.left = LV_DPI / 30; + slider_knob.body.padding.right = LV_DPI / 30; + slider_knob.body.padding.top = LV_DPI / 30; slider_knob.body.padding.bottom = LV_DPI / 30; - theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.bg = theme.style.bar.bg; theme.style.slider.indic = theme.style.bar.indic; - theme.style.slider.knob = &slider_knob; + theme.style.slider.knob = &slider_knob; #endif } @@ -209,27 +201,25 @@ static void sw_init(void) { #if LV_USE_SW != 0 - - theme.style.sw.bg = theme.style.slider.bg; - theme.style.sw.indic = theme.style.slider.indic; + theme.style.sw.bg = theme.style.slider.bg; + theme.style.sw.indic = theme.style.slider.indic; theme.style.sw.knob_off = theme.style.slider.knob; - theme.style.sw.knob_on = theme.style.slider.knob; + theme.style.sw.knob_on = theme.style.slider.knob; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 static lv_style_t lmeter_bg; lv_style_copy(&lmeter_bg, &light_frame); - lmeter_bg.body.opa = LV_OPA_TRANSP; - lmeter_bg.body.main_color = LV_COLOR_BLACK; - lmeter_bg.body.grad_color = LV_COLOR_BLACK; - lmeter_bg.body.padding.left = LV_DPI / 20; + lmeter_bg.body.opa = LV_OPA_TRANSP; + lmeter_bg.body.main_color = LV_COLOR_BLACK; + lmeter_bg.body.grad_color = LV_COLOR_BLACK; + lmeter_bg.body.padding.left = LV_DPI / 20; lmeter_bg.body.padding.inner = LV_DPI / 8; - lmeter_bg.line.color = LV_COLOR_WHITE; - lmeter_bg.line.width = 1; + lmeter_bg.line.color = LV_COLOR_WHITE; + lmeter_bg.line.width = 1; theme.style.lmeter = &lmeter_bg; #endif @@ -243,7 +233,6 @@ static void gauge_init(void) gauge_bg.line.color = LV_COLOR_BLACK; gauge_bg.line.width = 1; - theme.style.gauge = &gauge_bg; #endif } @@ -260,11 +249,11 @@ static void calendar_init(void) #if LV_USE_CALENDAR static lv_style_t box; lv_style_copy(&box, &light_plain); - box.body.padding.top = LV_DPI / 20; + box.body.padding.top = LV_DPI / 20; box.body.padding.bottom = LV_DPI / 20; /*Can't handle highlighted dates in this theme*/ - theme.style.calendar.week_box = &box; + theme.style.calendar.week_box = &box; theme.style.calendar.today_box = &box; #endif } @@ -273,53 +262,48 @@ static void cb_init(void) { #if LV_USE_CB != 0 - - theme.style.cb.bg = &lv_style_transp; - theme.style.cb.box.rel = &light_frame; - theme.style.cb.box.pr = &dark_frame; + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &light_frame; + theme.style.cb.box.pr = &dark_frame; theme.style.cb.box.tgl_rel = &dark_frame; - theme.style.cb.box.tgl_pr = &light_frame; - theme.style.cb.box.ina = &light_frame; + theme.style.cb.box.tgl_pr = &light_frame; + theme.style.cb.box.ina = &light_frame; #endif } - static void btnm_init(void) { #if LV_USE_BTNM - - theme.style.btnm.bg = &light_frame; - theme.style.btnm.btn.rel = &light_frame; - theme.style.btnm.btn.pr = &dark_frame; + theme.style.btnm.bg = &light_frame; + theme.style.btnm.btn.rel = &light_frame; + theme.style.btnm.btn.pr = &dark_frame; theme.style.btnm.btn.tgl_rel = &dark_frame; - theme.style.btnm.btn.tgl_pr = &light_frame; - theme.style.btnm.btn.ina = &light_frame; + theme.style.btnm.btn.tgl_pr = &light_frame; + theme.style.btnm.btn.ina = &light_frame; #endif } static void kb_init(void) { #if LV_USE_KB - theme.style.kb.bg = &lv_style_transp_fit; - theme.style.kb.btn.rel = &light_frame; - theme.style.kb.btn.pr = &light_frame; + theme.style.kb.bg = &lv_style_transp_fit; + theme.style.kb.btn.rel = &light_frame; + theme.style.kb.btn.pr = &light_frame; theme.style.kb.btn.tgl_rel = &dark_frame; - theme.style.kb.btn.tgl_pr = &dark_frame; - theme.style.kb.btn.ina = &light_frame; + theme.style.kb.btn.tgl_pr = &dark_frame; + theme.style.kb.btn.ina = &light_frame; #endif - } static void mbox_init(void) { #if LV_USE_MBOX - - theme.style.mbox.bg = &dark_frame; - theme.style.mbox.btn.bg = &lv_style_transp_fit; + theme.style.mbox.bg = &dark_frame; + theme.style.mbox.btn.bg = &lv_style_transp_fit; theme.style.mbox.btn.rel = &light_frame; - theme.style.mbox.btn.pr = &dark_frame; + theme.style.mbox.btn.pr = &dark_frame; #endif } @@ -327,10 +311,9 @@ static void page_init(void) { #if LV_USE_PAGE - - theme.style.page.bg = &light_frame; + theme.style.page.bg = &light_frame; theme.style.page.scrl = &light_frame; - theme.style.page.sb = &dark_frame; + theme.style.page.sb = &dark_frame; #endif } @@ -338,11 +321,10 @@ static void ta_init(void) { #if LV_USE_TA - - theme.style.ta.area = &light_frame; + theme.style.ta.area = &light_frame; theme.style.ta.oneline = &light_frame; - theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.style.ta.sb = &dark_frame; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &dark_frame; #endif } @@ -350,15 +332,14 @@ static void list_init(void) { #if LV_USE_LIST != 0 - - theme.style.list.sb = &dark_frame; - theme.style.list.bg = &light_frame; - theme.style.list.scrl = &lv_style_transp_fit; - theme.style.list.btn.rel = &light_plain; - theme.style.list.btn.pr = &dark_plain; + theme.style.list.sb = &dark_frame; + theme.style.list.bg = &light_frame; + theme.style.list.scrl = &lv_style_transp_fit; + theme.style.list.btn.rel = &light_plain; + theme.style.list.btn.pr = &dark_plain; theme.style.list.btn.tgl_rel = &dark_plain; - theme.style.list.btn.tgl_pr = &light_plain; - theme.style.list.btn.ina = &light_plain; + theme.style.list.btn.tgl_pr = &light_plain; + theme.style.list.btn.ina = &light_plain; #endif } @@ -369,9 +350,9 @@ static void ddlist_init(void) lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; - theme.style.ddlist.bg = &bg; + theme.style.ddlist.bg = &bg; theme.style.ddlist.sel = &dark_plain; - theme.style.ddlist.sb = &dark_frame; + theme.style.ddlist.sb = &dark_frame; #endif } @@ -382,7 +363,7 @@ static void roller_init(void) lv_style_copy(&bg, &light_frame); bg.text.line_space = LV_DPI / 12; - theme.style.roller.bg = &bg; + theme.style.roller.bg = &bg; theme.style.roller.sel = &dark_frame; #endif } @@ -391,35 +372,33 @@ static void tabview_init(void) { #if LV_USE_TABVIEW != 0 - - theme.style.tabview.bg = &light_frame; - theme.style.tabview.indic = &light_plain; - theme.style.tabview.btn.bg = &lv_style_transp_fit; - theme.style.tabview.btn.rel = &light_frame; - theme.style.tabview.btn.pr = &dark_frame; + theme.style.tabview.bg = &light_frame; + theme.style.tabview.indic = &light_plain; + theme.style.tabview.btn.bg = &lv_style_transp_fit; + theme.style.tabview.btn.rel = &light_frame; + theme.style.tabview.btn.pr = &dark_frame; theme.style.tabview.btn.tgl_rel = &dark_frame; - theme.style.tabview.btn.tgl_pr = &light_frame; + theme.style.tabview.btn.tgl_pr = &light_frame; #endif } - static void win_init(void) { #if LV_USE_WIN != 0 static lv_style_t win_header; lv_style_copy(&win_header, &dark_plain); - win_header.body.padding.left = LV_DPI / 30; - win_header.body.padding.right = LV_DPI / 30; - win_header.body.padding.top = LV_DPI / 30; + win_header.body.padding.left = LV_DPI / 30; + win_header.body.padding.right = LV_DPI / 30; + win_header.body.padding.top = LV_DPI / 30; win_header.body.padding.bottom = LV_DPI / 30; - theme.style.win.bg = &light_frame; - theme.style.win.sb = &dark_frame; - theme.style.win.header = &win_header; - theme.style.win.content.bg = &lv_style_transp; + theme.style.win.bg = &light_frame; + theme.style.win.sb = &dark_frame; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &light_frame; - theme.style.win.btn.pr = &dark_frame; + theme.style.win.btn.rel = &light_frame; + theme.style.win.btn.pr = &dark_frame; #endif } @@ -427,16 +406,17 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -444,16 +424,17 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -465,18 +446,17 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the mono theme - * @param hue [0..360] hue value from HSV color space to define the theme's base color; is not used in lv_theme_mono + * @param hue [0..360] hue value from HSV color space to define the theme's base color; is not used + * in lv_theme_mono * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) { - (void)hue; /*Unused*/ + (void)hue; /*Unused*/ if(font == NULL) font = LV_FONT_DEFAULT; @@ -484,7 +464,7 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -517,7 +497,7 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -538,4 +518,3 @@ lv_theme_t * lv_theme_get_mono(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_mono.h b/src/lv_themes/lv_theme_mono.h index 52665af1feda..6730d1e9b251 100644 --- a/src/lv_themes/lv_theme_mono.h +++ b/src/lv_themes/lv_theme_mono.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_nemo.c b/src/lv_themes/lv_theme_nemo.c index 03db619053a1..214d8b0e2663 100644 --- a/src/lv_themes/lv_theme_nemo.c +++ b/src/lv_themes/lv_theme_nemo.c @@ -8,7 +8,6 @@ *********************/ #include "lv_theme.h" - #if LV_USE_THEME_NEMO /********************* @@ -35,7 +34,7 @@ static lv_font_t * _font; static lv_theme_t theme; static lv_style_t def; static lv_style_t bg; -static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/ +static lv_style_t panel; /*General fancy background (e.g. to chart or ta)*/ static lv_style_t sb; static lv_style_t btn_rel, btn_pr, btn_trel, btn_tpr, btn_ina; @@ -59,7 +58,6 @@ static lv_style_t ddlist_bg, ddlist_sel; static lv_style_t btnm_bg, btnm_rel, btnm_pr, btnm_trel, btnm_ina; #endif - /********************** * MACROS **********************/ @@ -73,29 +71,29 @@ static void basic_init(void) /*Default*/ lv_style_copy(&def, &lv_style_plain); def.body.opa = LV_OPA_COVER; - def.glass = 0; - - def.body.main_color = lv_color_hex3(0x222); - def.body.grad_color = lv_color_hex3(0x222); - def.body.radius = 0; - def.body.padding.left = LV_DPI / 8; - def.body.padding.right = LV_DPI / 8; - def.body.padding.top = LV_DPI / 8; + def.glass = 0; + + def.body.main_color = lv_color_hex3(0x222); + def.body.grad_color = lv_color_hex3(0x222); + def.body.radius = 0; + def.body.padding.left = LV_DPI / 8; + def.body.padding.right = LV_DPI / 8; + def.body.padding.top = LV_DPI / 8; def.body.padding.bottom = LV_DPI / 8; - def.body.padding.inner = LV_DPI / 8; - def.body.border.color = LV_COLOR_SILVER; - def.body.border.width = 1; - def.body.border.opa = LV_OPA_COVER; - def.body.shadow.color = LV_COLOR_SILVER; - def.body.shadow.width = 0; - def.body.shadow.type = LV_SHADOW_FULL; - - def.text.color = lv_color_hex3(0xDDD); - def.text.font = _font; + def.body.padding.inner = LV_DPI / 8; + def.body.border.color = LV_COLOR_SILVER; + def.body.border.width = 1; + def.body.border.opa = LV_OPA_COVER; + def.body.shadow.color = LV_COLOR_SILVER; + def.body.shadow.width = 0; + def.body.shadow.type = LV_SHADOW_FULL; + + def.text.color = lv_color_hex3(0xDDD); + def.text.font = _font; def.text.letter_space = 1; - def.text.line_space = 2; + def.text.line_space = 2; - def.image.color = lv_color_hex3(0xDDD); + def.image.color = lv_color_hex3(0xDDD); def.image.intense = LV_OPA_TRANSP; def.line.color = lv_color_hex3(0xDDD); @@ -103,109 +101,107 @@ static void basic_init(void) /*Background*/ lv_style_copy(&bg, &def); - bg.body.main_color = lv_color_hex3(0x005); - bg.body.grad_color = lv_color_hex3(0x045); + bg.body.main_color = lv_color_hex3(0x005); + bg.body.grad_color = lv_color_hex3(0x045); bg.body.border.width = 2; - bg.body.border.color = lv_color_hex3(0x666); + bg.body.border.color = lv_color_hex3(0x666); bg.body.shadow.color = LV_COLOR_SILVER; /*Panel*/ lv_style_copy(&panel, &def); - panel.body.radius = LV_DPI / 10; - panel.body.main_color = lv_color_hex3(0x500); - panel.body.grad_color = lv_color_hex3(0x505); + panel.body.radius = LV_DPI / 10; + panel.body.main_color = lv_color_hex3(0x500); + panel.body.grad_color = lv_color_hex3(0x505); panel.body.border.color = lv_color_hex3(0xccc); panel.body.border.width = 2; - panel.body.border.opa = LV_OPA_60; - panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); - panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70); + panel.body.border.opa = LV_OPA_60; + panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); + panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70); /*Scrollbar*/ lv_style_copy(&sb, &def); - sb.body.opa = LV_OPA_50; - sb.body.radius = LV_RADIUS_CIRCLE; - sb.body.border.color = LV_COLOR_SILVER; - sb.body.border.opa = LV_OPA_40; - sb.body.border.width = 1; - sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); - sb.body.padding.left = 1; - sb.body.padding.right = 1; - sb.body.padding.top = 1; + sb.body.opa = LV_OPA_50; + sb.body.radius = LV_RADIUS_CIRCLE; + sb.body.border.color = LV_COLOR_SILVER; + sb.body.border.opa = LV_OPA_40; + sb.body.border.width = 1; + sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92); + sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92); + sb.body.padding.left = 1; + sb.body.padding.right = 1; + sb.body.padding.top = 1; sb.body.padding.bottom = 1; - sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ + sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/ - theme.style.bg = &bg; + theme.style.bg = &bg; theme.style.panel = &panel; - } static void btn_init(void) { #if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); - btn_rel.glass = 0; - btn_rel.body.opa = LV_OPA_TRANSP; - btn_rel.body.radius = LV_RADIUS_CIRCLE; - btn_rel.body.border.width = 2; - btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); - btn_rel.body.border.opa = LV_OPA_80; - btn_rel.body.padding.left = LV_DPI / 4; - btn_rel.body.padding.right = LV_DPI / 4; - btn_rel.body.padding.top = LV_DPI / 6; + btn_rel.glass = 0; + btn_rel.body.opa = LV_OPA_TRANSP; + btn_rel.body.radius = LV_RADIUS_CIRCLE; + btn_rel.body.border.width = 2; + btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90); + btn_rel.body.border.opa = LV_OPA_80; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 6; btn_rel.body.padding.bottom = LV_DPI / 6; - btn_rel.body.padding.inner = LV_DPI / 10; - btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); - btn_rel.text.font = _font; + btn_rel.body.padding.inner = LV_DPI / 10; + btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96); + btn_rel.text.font = _font; lv_style_copy(&btn_pr, &btn_rel); - btn_pr.body.opa = LV_OPA_COVER; + btn_pr.body.opa = LV_OPA_COVER; btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); btn_pr.body.border.opa = LV_OPA_60; - btn_pr.text.font = _font; - btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100); + btn_pr.text.font = _font; + btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 10, 100); lv_style_copy(&btn_trel, &btn_pr); - btn_trel.body.opa = LV_OPA_COVER; - btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60); - btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60); - btn_trel.body.border.opa = LV_OPA_60; + btn_trel.body.opa = LV_OPA_COVER; + btn_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 60); + btn_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 60); + btn_trel.body.border.opa = LV_OPA_60; btn_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 90); - btn_trel.text.font = _font; - btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100); + btn_trel.text.font = _font; + btn_trel.text.color = lv_color_hsv_to_rgb(_hue, 0, 100); lv_style_copy(&btn_tpr, &btn_trel); - btn_tpr.body.opa = LV_OPA_COVER; - btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); - btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); - btn_tpr.body.border.opa = LV_OPA_60; + btn_tpr.body.opa = LV_OPA_COVER; + btn_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 50); + btn_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 50); + btn_tpr.body.border.opa = LV_OPA_60; btn_tpr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); - btn_tpr.text.font = _font; - btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + btn_tpr.text.font = _font; + btn_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); lv_style_copy(&btn_ina, &btn_rel); - btn_ina.body.border.opa = LV_OPA_60; + btn_ina.body.border.opa = LV_OPA_60; btn_ina.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50); - btn_ina.text.font = _font; - btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + btn_ina.text.font = _font; + btn_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - theme.style.btn.rel = &btn_rel; - theme.style.btn.pr = &btn_pr; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; theme.style.btn.tgl_rel = &btn_trel; - theme.style.btn.tgl_pr = &btn_tpr; - theme.style.btn.ina = &btn_ina; + theme.style.btn.tgl_pr = &btn_tpr; + theme.style.btn.ina = &btn_ina; #endif } - static void label_init(void) { #if LV_USE_LABEL != 0 static lv_style_t label_prim, label_sec, label_hint; lv_style_copy(&label_prim, &def); - label_prim.text.font = _font; + label_prim.text.font = _font; label_prim.text.color = lv_color_hsv_to_rgb(_hue, 5, 96); lv_style_copy(&label_sec, &label_prim); @@ -215,44 +211,43 @@ static void label_init(void) label_hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); theme.style.label.prim = &label_prim; - theme.style.label.sec = &label_sec; + theme.style.label.sec = &label_sec; theme.style.label.hint = &label_hint; #endif } - static void bar_init(void) { #if LV_USE_BAR lv_style_copy(&bar_bg, &def); - bar_bg.body.opa = LV_OPA_30; - bar_bg.body.radius = LV_RADIUS_CIRCLE; - bar_bg.body.main_color = LV_COLOR_WHITE; - bar_bg.body.grad_color = LV_COLOR_SILVER; - bar_bg.body.border.width = 2; - bar_bg.body.border.color = LV_COLOR_SILVER; - bar_bg.body.border.opa = LV_OPA_20; - bar_bg.body.padding.left = 0; - bar_bg.body.padding.right = 0; - bar_bg.body.padding.top = LV_DPI / 10; + bar_bg.body.opa = LV_OPA_30; + bar_bg.body.radius = LV_RADIUS_CIRCLE; + bar_bg.body.main_color = LV_COLOR_WHITE; + bar_bg.body.grad_color = LV_COLOR_SILVER; + bar_bg.body.border.width = 2; + bar_bg.body.border.color = LV_COLOR_SILVER; + bar_bg.body.border.opa = LV_OPA_20; + bar_bg.body.padding.left = 0; + bar_bg.body.padding.right = 0; + bar_bg.body.padding.top = LV_DPI / 10; bar_bg.body.padding.bottom = LV_DPI / 10; - bar_bg.body.padding.inner = 0; + bar_bg.body.padding.inner = 0; lv_style_copy(&bar_indic, &def); - bar_indic.body.radius = LV_RADIUS_CIRCLE; - bar_indic.body.border.width = 2; - bar_indic.body.border.color = LV_COLOR_SILVER; - bar_indic.body.border.opa = LV_OPA_70; - bar_indic.body.padding.left = 0; - bar_indic.body.padding.right = 0; - bar_indic.body.padding.top = 0; + bar_indic.body.radius = LV_RADIUS_CIRCLE; + bar_indic.body.border.width = 2; + bar_indic.body.border.color = LV_COLOR_SILVER; + bar_indic.body.border.opa = LV_OPA_70; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; bar_indic.body.padding.bottom = 0; - bar_indic.body.shadow.width = LV_DPI / 20; - bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); - bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); - bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); + bar_indic.body.shadow.width = LV_DPI / 20; + bar_indic.body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); + bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); - theme.style.bar.bg = &bar_bg; + theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; #endif } @@ -262,15 +257,15 @@ static void img_init(void) #if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); img_light.image.intense = LV_OPA_80; lv_style_copy(&img_dark, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 65); img_light.image.intense = LV_OPA_80; theme.style.img.light = &img_light; - theme.style.img.dark = &img_dark; + theme.style.img.dark = &img_dark; #endif } @@ -292,11 +287,11 @@ static void led_init(void) static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; - led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); - led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); + led.body.border.opa = LV_OPA_30; + led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); + led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); @@ -308,17 +303,17 @@ static void slider_init(void) { #if LV_USE_SLIDER != 0 lv_style_copy(&slider_knob, &def); - slider_knob.body.opa = LV_OPA_60; - slider_knob.body.radius = LV_RADIUS_CIRCLE; - slider_knob.body.main_color = LV_COLOR_PURPLE; - slider_knob.body.grad_color = LV_COLOR_SILVER; + slider_knob.body.opa = LV_OPA_60; + slider_knob.body.radius = LV_RADIUS_CIRCLE; + slider_knob.body.main_color = LV_COLOR_PURPLE; + slider_knob.body.grad_color = LV_COLOR_SILVER; slider_knob.body.border.width = 2; slider_knob.body.border.color = LV_COLOR_ORANGE; - slider_knob.body.border.opa = LV_OPA_50; + slider_knob.body.border.opa = LV_OPA_50; - theme.style.slider.bg = &bar_bg; + theme.style.slider.bg = &bar_bg; theme.style.slider.indic = &bar_indic; - theme.style.slider.knob = &slider_knob; + theme.style.slider.knob = &slider_knob; #endif } @@ -327,43 +322,42 @@ static void sw_init(void) #if LV_USE_SW != 0 static lv_style_t sw_bg, sw_indic, sw_knob; lv_style_copy(&sw_bg, &bar_bg); - sw_bg.body.opa = LV_OPA_COVER; - sw_bg.body.padding.left = -2 ; - sw_bg.body.padding.right = -2 ; - sw_bg.body.padding.top = -2 ; - sw_bg.body.padding.bottom = -2 ; - sw_bg.body.main_color = lv_color_hex3(0x666); - sw_bg.body.grad_color = lv_color_hex3(0x999); - sw_bg.body.border.width = 2; - sw_bg.body.border.opa = LV_OPA_50; + sw_bg.body.opa = LV_OPA_COVER; + sw_bg.body.padding.left = -2; + sw_bg.body.padding.right = -2; + sw_bg.body.padding.top = -2; + sw_bg.body.padding.bottom = -2; + sw_bg.body.main_color = lv_color_hex3(0x666); + sw_bg.body.grad_color = lv_color_hex3(0x999); + sw_bg.body.border.width = 2; + sw_bg.body.border.opa = LV_OPA_50; lv_style_copy(&sw_indic, &bar_indic); - sw_indic.body.shadow .width = LV_DPI / 20; - sw_indic.body.padding.left = 0; - sw_indic.body.padding.right = 0; - sw_indic.body.padding.top = 0; + sw_indic.body.shadow.width = LV_DPI / 20; + sw_indic.body.padding.left = 0; + sw_indic.body.padding.right = 0; + sw_indic.body.padding.top = 0; sw_indic.body.padding.bottom = 0; lv_style_copy(&sw_knob, &slider_knob); sw_knob.body.opa = LV_OPA_80; - theme.style.sw.bg = &sw_bg; - theme.style.sw.indic = &sw_indic; + theme.style.sw.bg = &sw_bg; + theme.style.sw.indic = &sw_indic; theme.style.sw.knob_off = &sw_knob; - theme.style.sw.knob_on = &sw_knob; + theme.style.sw.knob_on = &sw_knob; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); - lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); - lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); - lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ - lmeter_bg.line.color = lv_color_hex3(0x500); - lmeter_bg.line.width = 2; + lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); + lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80); + lmeter_bg.body.padding.left = LV_DPI / 8; /*Scale line length*/ + lmeter_bg.line.color = lv_color_hex3(0x500); + lmeter_bg.line.width = 2; theme.style.lmeter = &lmeter_bg; @@ -375,18 +369,18 @@ static void gauge_init(void) #if LV_USE_GAUGE != 0 static lv_style_t gauge_bg; lv_style_copy(&gauge_bg, &def); - gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100); - gauge_bg.body.grad_color = gauge_bg.body.main_color; - gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ - gauge_bg.body.padding.top = LV_DPI / 20; /*Needle center size*/ - gauge_bg.body.padding.bottom = LV_DPI / 20; /*Needle center size*/ - gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ - gauge_bg.body.border.color = lv_color_hex3(0x500); - gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); - gauge_bg.line.width = 2; - gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); - gauge_bg.text.font = _font; + gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 100); + gauge_bg.body.grad_color = gauge_bg.body.main_color; + gauge_bg.body.padding.left = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.right = LV_DPI / 16; /*Scale line length*/ + gauge_bg.body.padding.top = LV_DPI / 20; /*Needle center size*/ + gauge_bg.body.padding.bottom = LV_DPI / 20; /*Needle center size*/ + gauge_bg.body.padding.inner = LV_DPI / 12; /*Label - scale distance*/ + gauge_bg.body.border.color = lv_color_hex3(0x500); + gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); + gauge_bg.line.width = 2; + gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); + gauge_bg.text.font = _font; theme.style.gauge = &gauge_bg; #endif @@ -398,8 +392,8 @@ static void arc_init(void) static lv_style_t arc; lv_style_copy(&arc, &def); - arc.line.width = 10; - arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90); + arc.line.width = 10; + arc.line.color = lv_color_hsv_to_rgb(_hue, 70, 90); arc.line.rounded = 1; /*For preloader*/ @@ -437,49 +431,49 @@ static void calendar_init(void) static lv_style_t week_box; lv_style_copy(&week_box, &def); - week_box.body.opa = LV_OPA_TRANSP; - week_box.body.border.color = theme.style.panel->body.border.color; - week_box.body.padding.top = LV_DPI / 20; + week_box.body.opa = LV_OPA_TRANSP; + week_box.body.border.color = theme.style.panel->body.border.color; + week_box.body.padding.top = LV_DPI / 20; week_box.body.padding.bottom = LV_DPI / 20; static lv_style_t today_box; lv_style_copy(&today_box, &def); - today_box.body.main_color = LV_COLOR_WHITE; - today_box.body.grad_color = LV_COLOR_WHITE; - today_box.body.padding.top = LV_DPI / 20; + today_box.body.main_color = LV_COLOR_WHITE; + today_box.body.grad_color = LV_COLOR_WHITE; + today_box.body.padding.top = LV_DPI / 20; today_box.body.padding.bottom = LV_DPI / 20; - today_box.body.radius = 0; + today_box.body.radius = 0; - theme.style.calendar.bg = theme.style.panel; - theme.style.calendar.header = theme.style.label.prim; - theme.style.calendar.inactive_days = theme.style.label.hint; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = theme.style.label.prim; + theme.style.calendar.inactive_days = theme.style.label.hint; theme.style.calendar.highlighted_days = theme.style.label.sec; - theme.style.calendar.week_box = &week_box; - theme.style.calendar.today_box = &week_box; - theme.style.calendar.header_pr = theme.style.label.prim; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &week_box; + theme.style.calendar.header_pr = theme.style.label.prim; #endif } static void cb_init(void) { #if LV_USE_CB != 0 - static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; + static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina; lv_style_copy(&cb_rel, &bg); - cb_rel.body.radius = LV_DPI / 20; + cb_rel.body.radius = LV_DPI / 20; cb_rel.body.border.width = 1; cb_rel.body.border.color = LV_COLOR_ORANGE; - cb_rel.body.main_color = LV_COLOR_PURPLE; - cb_rel.body.grad_color = LV_COLOR_SILVER; + cb_rel.body.main_color = LV_COLOR_PURPLE; + cb_rel.body.grad_color = LV_COLOR_SILVER; lv_style_copy(&cb_bg, &bg); - cb_bg.body.opa = LV_OPA_TRANSP; - cb_bg.body.border.width = 0; - cb_bg.body.padding.inner = LV_DPI / 8; - cb_bg.body.padding.left = 0; - cb_bg.body.padding.right = 0; - cb_bg.body.padding.top = 0; - cb_bg.body.padding.bottom = 0; - cb_bg.text.font = _font; + cb_bg.body.opa = LV_OPA_TRANSP; + cb_bg.body.border.width = 0; + cb_bg.body.padding.inner = LV_DPI / 8; + cb_bg.body.padding.left = 0; + cb_bg.body.padding.right = 0; + cb_bg.body.padding.top = 0; + cb_bg.body.padding.bottom = 0; + cb_bg.text.font = _font; lv_style_copy(&cb_pr, &cb_rel); cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 90); @@ -488,53 +482,52 @@ static void cb_init(void) lv_style_copy(&cb_trel, &cb_rel); cb_trel.body.border.width = 4; cb_trel.body.border.color = LV_COLOR_WHITE; - cb_trel.body.border.opa = LV_OPA_60; - cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82); - cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62); + cb_trel.body.border.opa = LV_OPA_60; + cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82); + cb_trel.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 62); lv_style_copy(&cb_tpr, &cb_trel); cb_tpr.body.border.color = LV_COLOR_SILVER; - cb_tpr.body.border.opa = LV_OPA_70; - cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72); - cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52); + cb_tpr.body.border.opa = LV_OPA_70; + cb_tpr.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 72); + cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52); lv_style_copy(&cb_ina, &cb_trel); cb_ina.body.border.width = 1; cb_ina.body.border.color = LV_COLOR_GRAY; - cb_ina.body.main_color = LV_COLOR_PURPLE; - cb_ina.body.grad_color = LV_COLOR_SILVER; + cb_ina.body.main_color = LV_COLOR_PURPLE; + cb_ina.body.grad_color = LV_COLOR_SILVER; - theme.style.cb.bg = &cb_bg; - theme.style.cb.box.rel = &cb_rel; - theme.style.cb.box.pr = &cb_pr; + theme.style.cb.bg = &cb_bg; + theme.style.cb.box.rel = &cb_rel; + theme.style.cb.box.pr = &cb_pr; theme.style.cb.box.tgl_rel = &cb_trel; - theme.style.cb.box.tgl_pr = &cb_tpr; - theme.style.cb.box.ina = &cb_ina; + theme.style.cb.box.tgl_pr = &cb_tpr; + theme.style.cb.box.ina = &cb_ina; #endif } - static void btnm_init(void) { #if LV_USE_BTNM lv_style_copy(&btnm_bg, &lv_style_transp_tight); btnm_bg.body.border.width = 1; btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80); - btnm_bg.body.border.opa = LV_OPA_COVER; - btnm_bg.body.radius = LV_DPI / 8; + btnm_bg.body.border.opa = LV_OPA_COVER; + btnm_bg.body.radius = LV_DPI / 8; lv_style_copy(&btnm_rel, &lv_style_plain); - btnm_rel.body.opa = LV_OPA_TRANSP; + btnm_rel.body.opa = LV_OPA_TRANSP; btnm_rel.body.radius = LV_DPI / 8; - btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80); - btnm_rel.text.font = _font; + btnm_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 80); + btnm_rel.text.font = _font; lv_style_copy(&btnm_pr, &lv_style_plain); btnm_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 70); btnm_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 70); - btnm_pr.body.radius = LV_DPI / 8; - btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); - btnm_pr.text.font = _font; + btnm_pr.body.radius = LV_DPI / 8; + btnm_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); + btnm_pr.text.font = _font; lv_style_copy(&btnm_trel, &btnm_rel); btnm_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 80); @@ -543,26 +536,25 @@ static void btnm_init(void) lv_style_copy(&btnm_ina, &btnm_rel); btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60); - theme.style.btnm.bg = &btnm_bg; - theme.style.btnm.btn.rel = &btnm_rel; - theme.style.btnm.btn.pr = &btnm_pr; + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &btnm_rel; + theme.style.btnm.btn.pr = &btnm_pr; theme.style.btnm.btn.tgl_rel = &btnm_trel; - theme.style.btnm.btn.tgl_pr = &btnm_pr; - theme.style.btnm.btn.ina = &btnm_ina; + theme.style.btnm.btn.tgl_pr = &btnm_pr; + theme.style.btnm.btn.ina = &btnm_ina; #endif } static void kb_init(void) { #if LV_USE_KB - theme.style.kb.bg = &btnm_bg; - theme.style.kb.btn.rel = &btnm_rel; - theme.style.kb.btn.pr = &btnm_pr; + theme.style.kb.bg = &btnm_bg; + theme.style.kb.btn.rel = &btnm_rel; + theme.style.kb.btn.pr = &btnm_pr; theme.style.kb.btn.tgl_rel = &btnm_trel; - theme.style.kb.btn.tgl_pr = &btnm_pr; - theme.style.kb.btn.ina = &btnm_ina; + theme.style.kb.btn.tgl_pr = &btnm_pr; + theme.style.kb.btn.ina = &btnm_ina; #endif - } static void mbox_init(void) @@ -572,38 +564,38 @@ static void mbox_init(void) lv_style_copy(&mbox_bg, &panel); mbox_bg.body.shadow.width = LV_DPI / 12; - theme.style.mbox.bg = &mbox_bg; - theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; theme.style.mbox.btn.rel = &btn_trel; - theme.style.mbox.btn.pr = &btn_tpr; + theme.style.mbox.btn.pr = &btn_tpr; #endif } static void page_init(void) { #if LV_USE_PAGE - theme.style.page.bg = &panel; + theme.style.page.bg = &panel; theme.style.page.scrl = &lv_style_transp_fit; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if LV_USE_TA - theme.style.ta.area = &panel; + theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; - theme.style.ta.cursor = NULL; - theme.style.ta.sb = &sb; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &sb; #endif } static void spinbox_init(void) { #if LV_USE_SPINBOX - theme.style.spinbox.bg= &panel; + theme.style.spinbox.bg = &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; - theme.style.spinbox.sb = theme.style.ta.sb; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -612,38 +604,38 @@ static void list_init(void) #if LV_USE_LIST != 0 static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina; lv_style_copy(&list_rel, &def); - list_rel.body.opa = LV_OPA_TRANSP; + list_rel.body.opa = LV_OPA_TRANSP; list_rel.body.border.width = 1; list_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 50, 85); - list_rel.body.border.opa = LV_OPA_COVER; - list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - list_rel.text.font = _font; + list_rel.body.border.opa = LV_OPA_COVER; + list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + list_rel.text.font = _font; lv_style_copy(&list_pr, &list_rel); - list_pr.body.opa = LV_OPA_TRANSP; - list_pr.body.opa = LV_OPA_COVER; + list_pr.body.opa = LV_OPA_TRANSP; + list_pr.body.opa = LV_OPA_COVER; list_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 34, 41); list_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 34, 41); - list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96); + list_pr.text.color = lv_color_hsv_to_rgb(_hue, 7, 96); lv_style_copy(&list_trel, &list_rel); lv_style_copy(&list_tpr, &list_pr); lv_style_copy(&list_ina, &def); lv_style_copy(&list_bg, &list_rel); - list_bg.body.padding.left = 0; - list_bg.body.padding.right = 0; - list_bg.body.padding.top = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.top = 0; list_bg.body.padding.bottom = 0; - theme.style.list.sb = &sb; - theme.style.list.bg = &list_bg; - theme.style.list.scrl = &lv_style_transp_tight; - theme.style.list.btn.rel = &list_rel; - theme.style.list.btn.pr = &list_pr; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_rel; + theme.style.list.btn.pr = &list_pr; theme.style.list.btn.tgl_rel = &list_trel; - theme.style.list.btn.tgl_pr = &list_tpr; - theme.style.list.btn.ina = &list_ina; + theme.style.list.btn.tgl_pr = &list_tpr; + theme.style.list.btn.ina = &list_ina; #endif } @@ -651,21 +643,21 @@ static void ddlist_init(void) { #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &panel); - ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.left = LV_DPI / 6; - ddlist_bg.body.padding.right = LV_DPI / 6; - ddlist_bg.body.padding.top = LV_DPI / 6; + ddlist_bg.text.line_space = LV_DPI / 8; + ddlist_bg.body.padding.left = LV_DPI / 6; + ddlist_bg.body.padding.right = LV_DPI / 6; + ddlist_bg.body.padding.top = LV_DPI / 6; ddlist_bg.body.padding.bottom = LV_DPI / 6; lv_style_copy(&ddlist_sel, &panel); ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 45, 70); ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 45, 70); - ddlist_sel.body.opa = LV_OPA_COVER; - ddlist_sel.body.radius = 0; + ddlist_sel.body.opa = LV_OPA_COVER; + ddlist_sel.body.radius = 0; - theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.bg = &ddlist_bg; theme.style.ddlist.sel = &ddlist_sel; - theme.style.ddlist.sb = &sb; + theme.style.ddlist.sb = &sb; #endif } @@ -674,22 +666,22 @@ static void roller_init(void) #if LV_USE_ROLLER != 0 static lv_style_t roller_bg, roller_sel; lv_style_copy(&roller_bg, &ddlist_bg); - roller_bg.text.line_space = LV_DPI / 6; - roller_bg.body.radius = LV_DPI / 20; - roller_bg.body.main_color = lv_color_hex3(0x500); - roller_bg.body.grad_color = lv_color_hex3(0x005); - roller_bg.body.border.opa = LV_OPA_30; - roller_bg.text.opa = LV_OPA_70; - roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); + roller_bg.text.line_space = LV_DPI / 6; + roller_bg.body.radius = LV_DPI / 20; + roller_bg.body.main_color = lv_color_hex3(0x500); + roller_bg.body.grad_color = lv_color_hex3(0x005); + roller_bg.body.border.opa = LV_OPA_30; + roller_bg.text.opa = LV_OPA_70; + roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 20, 70); roller_bg.body.shadow.width = 0; lv_style_copy(&roller_sel, &panel); - roller_sel.body.opa = LV_OPA_TRANSP; + roller_sel.body.opa = LV_OPA_TRANSP; roller_sel.body.radius = 0; - roller_sel.text.opa = LV_OPA_COVER; - roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); + roller_sel.text.opa = LV_OPA_COVER; + roller_sel.text.color = lv_color_hsv_to_rgb(_hue, 70, 95); - theme.style.roller.bg = &roller_bg; + theme.style.roller.bg = &roller_bg; theme.style.roller.sel = &roller_sel; #endif } @@ -699,72 +691,72 @@ static void tabview_init(void) #if LV_USE_TABVIEW != 0 static lv_style_t tab_rel, tab_pr, tab_trel, tab_tpr, tab_indic; lv_style_copy(&tab_rel, &def); - tab_rel.body.main_color = lv_color_hex3(0x500); - tab_rel.body.grad_color = lv_color_hex3(0x005); - tab_rel.body.padding.left = 0; - tab_rel.body.padding.right = 0; - tab_rel.body.padding.top = LV_DPI / 6; + tab_rel.body.main_color = lv_color_hex3(0x500); + tab_rel.body.grad_color = lv_color_hex3(0x005); + tab_rel.body.padding.left = 0; + tab_rel.body.padding.right = 0; + tab_rel.body.padding.top = LV_DPI / 6; tab_rel.body.padding.bottom = LV_DPI / 6; - tab_rel.body.padding.inner = 0; - tab_rel.body.border.width = 1; - tab_rel.body.border.color = LV_COLOR_SILVER; - tab_rel.body.border.opa = LV_OPA_40; - tab_rel.text.color = lv_color_hex3(0xDDD); - tab_rel.text.font = _font; + tab_rel.body.padding.inner = 0; + tab_rel.body.border.width = 1; + tab_rel.body.border.color = LV_COLOR_SILVER; + tab_rel.body.border.opa = LV_OPA_40; + tab_rel.text.color = lv_color_hex3(0xDDD); + tab_rel.text.font = _font; lv_style_copy(&tab_pr, &tab_rel); tab_pr.body.main_color = lv_color_hex3(0x005); tab_pr.body.grad_color = lv_color_hex3(0x500); lv_style_copy(&tab_trel, &def); - tab_trel.body.opa = LV_OPA_TRANSP; - tab_trel.body.padding.left = 0; - tab_trel.body.padding.right = 0; - tab_trel.body.padding.top = LV_DPI / 6; + tab_trel.body.opa = LV_OPA_TRANSP; + tab_trel.body.padding.left = 0; + tab_trel.body.padding.right = 0; + tab_trel.body.padding.top = LV_DPI / 6; tab_trel.body.padding.bottom = LV_DPI / 6; - tab_trel.body.padding.inner = 0; - tab_trel.body.border.width = 1; - tab_trel.body.border.color = LV_COLOR_SILVER; - tab_trel.body.border.opa = LV_OPA_40; - tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - tab_trel.text.font = _font; + tab_trel.body.padding.inner = 0; + tab_trel.body.border.width = 1; + tab_trel.body.border.color = LV_COLOR_SILVER; + tab_trel.body.border.opa = LV_OPA_40; + tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + tab_trel.text.font = _font; lv_style_copy(&tab_tpr, &def); - tab_tpr.body.main_color = LV_COLOR_GRAY; - tab_tpr.body.grad_color = LV_COLOR_GRAY; - tab_tpr.body.padding.left = 0; - tab_tpr.body.padding.right = 0; - tab_tpr.body.padding.top = LV_DPI / 6; + tab_tpr.body.main_color = LV_COLOR_GRAY; + tab_tpr.body.grad_color = LV_COLOR_GRAY; + tab_tpr.body.padding.left = 0; + tab_tpr.body.padding.right = 0; + tab_tpr.body.padding.top = LV_DPI / 6; tab_tpr.body.padding.bottom = LV_DPI / 6; - tab_tpr.body.padding.inner = 0; - tab_tpr.body.border.width = 1; - tab_tpr.body.border.color = LV_COLOR_SILVER; - tab_tpr.body.border.opa = LV_OPA_40; - tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); - tab_tpr.text.font = _font; + tab_tpr.body.padding.inner = 0; + tab_tpr.body.border.width = 1; + tab_tpr.body.border.color = LV_COLOR_SILVER; + tab_tpr.body.border.opa = LV_OPA_40; + tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94); + tab_tpr.text.font = _font; lv_style_copy(&tab_indic, &def); - tab_indic.body.border.width = 0; - tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87); - tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); + tab_indic.body.border.width = 0; + tab_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 87); + tab_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 87); tab_indic.body.padding.inner = LV_DPI / 10; /*Indicator height*/ - theme.style.tabview.bg = &bg; - theme.style.tabview.indic = &tab_indic; - theme.style.tabview.btn.bg = &lv_style_transp_tight; - theme.style.tabview.btn.rel = &tab_rel; - theme.style.tabview.btn.pr = &tab_pr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &tab_indic; + theme.style.tabview.btn.bg = &lv_style_transp_tight; + theme.style.tabview.btn.rel = &tab_rel; + theme.style.tabview.btn.pr = &tab_pr; theme.style.tabview.btn.tgl_rel = &tab_trel; - theme.style.tabview.btn.tgl_pr = &tab_tpr; + theme.style.tabview.btn.tgl_pr = &tab_tpr; #endif } static void tileview_init(void) { #if LV_USE_TILEVIEW != 0 - theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; - theme.style.tileview.sb = theme.style.page.sb; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -773,10 +765,10 @@ static void table_init(void) #if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); - cell.body.radius = 0; + cell.body.radius = 0; cell.body.border.width = 1; - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; #endif } @@ -787,23 +779,23 @@ static void win_init(void) static lv_style_t win_header; lv_style_copy(&win_header, &panel); - win_header.body.radius = 0; - win_header.body.padding.left = LV_DPI / 12; - win_header.body.padding.right = LV_DPI / 12; - win_header.body.padding.top = LV_DPI / 20; + win_header.body.radius = 0; + win_header.body.padding.left = LV_DPI / 12; + win_header.body.padding.right = LV_DPI / 12; + win_header.body.padding.top = LV_DPI / 20; win_header.body.padding.bottom = LV_DPI / 20; - win_header.body.border.opa = panel.body.border.opa; - win_header.body.border.width = panel.body.border.width; - win_header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); - win_header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); - - theme.style.win.bg = &bg; - theme.style.win.sb = &sb; - theme.style.win.header = &win_header; - theme.style.win.content.bg = &lv_style_transp; + win_header.body.border.opa = panel.body.border.opa; + win_header.body.border.width = panel.body.border.width; + win_header.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 80); + win_header.text.color = lv_color_hsv_to_rgb(_hue, 5, 100); + + theme.style.win.bg = &bg; + theme.style.win.sb = &sb; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &btn_rel; - theme.style.win.btn.pr = &btn_pr; + theme.style.win.btn.rel = &btn_rel; + theme.style.win.btn.pr = &btn_pr; #endif } @@ -811,17 +803,17 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 style->body.border.width = 2; style->body.border.color = LV_COLOR_SILVER; - style->body.border.opa = LV_OPA_70; + style->body.border.opa = LV_OPA_70; style->body.shadow.width = LV_DPI / 20; style->body.shadow.color = lv_color_hsv_to_rgb(_hue, 20, 90); - style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); - style->body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); + style->body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + style->body.grad_color = lv_color_hsv_to_rgb(_hue, 40, 80); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -829,22 +821,23 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -866,12 +859,12 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -908,7 +901,7 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -929,4 +922,3 @@ lv_theme_t * lv_theme_get_nemo(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_nemo.h b/src/lv_themes/lv_theme_nemo.h index 92aceb85f954..5464cbfd176c 100644 --- a/src/lv_themes/lv_theme_nemo.h +++ b/src/lv_themes/lv_theme_nemo.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_night.c b/src/lv_themes/lv_theme_night.c index 1ca30f706897..a3c23b9398bb 100644 --- a/src/lv_themes/lv_theme_night.c +++ b/src/lv_themes/lv_theme_night.c @@ -51,50 +51,49 @@ static lv_font_t * _font; static void basic_init(void) { - lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ + lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ def.text.font = _font; lv_style_copy(&bg, &lv_style_plain); bg.body.main_color = lv_color_hsv_to_rgb(_hue, 11, 30); bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 30); - bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); - bg.text.font = _font; - bg.image.color = lv_color_hsv_to_rgb(_hue, 5, 95); + bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 95); + bg.text.font = _font; + bg.image.color = lv_color_hsv_to_rgb(_hue, 5, 95); lv_style_copy(&sb, &def); - sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); - sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 60); - sb.body.border.width = 0; - sb.body.padding.inner = LV_DPI / 10; - sb.body.padding.left = 0; - sb.body.padding.right = 0; - sb.body.padding.top = 0; + sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 60); + sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 60); + sb.body.border.width = 0; + sb.body.padding.inner = LV_DPI / 10; + sb.body.padding.left = 0; + sb.body.padding.right = 0; + sb.body.padding.top = 0; sb.body.padding.bottom = 0; - sb.body.radius = LV_DPI / 30; - sb.body.opa = LV_OPA_COVER; + sb.body.radius = LV_DPI / 30; + sb.body.opa = LV_OPA_COVER; lv_style_copy(&panel, &bg); - panel.body.main_color = lv_color_hsv_to_rgb(_hue, 11, 18); - panel.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 18); - panel.body.radius = LV_DPI / 20; - panel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 25); - panel.body.border.width = 1; - panel.body.border.opa = LV_OPA_COVER; - panel.body.padding.left = LV_DPI / 10; - panel.body.padding.right = LV_DPI / 10; - panel.body.padding.top = LV_DPI / 10; + panel.body.main_color = lv_color_hsv_to_rgb(_hue, 11, 18); + panel.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 18); + panel.body.radius = LV_DPI / 20; + panel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 25); + panel.body.border.width = 1; + panel.body.border.opa = LV_OPA_COVER; + panel.body.padding.left = LV_DPI / 10; + panel.body.padding.right = LV_DPI / 10; + panel.body.padding.top = LV_DPI / 10; panel.body.padding.bottom = LV_DPI / 10; - panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40); - panel.line.width = 1; - theme.style.bg = &bg; - theme.style.panel = &def; + panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40); + panel.line.width = 1; + theme.style.bg = &bg; + theme.style.panel = &def; } static void cont_init(void) { #if LV_USE_CONT != 0 - theme.style.cont = &panel; #endif } @@ -103,55 +102,54 @@ static void btn_init(void) #if LV_USE_BTN != 0 lv_style_copy(&btn_rel, &def); - btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); - btn_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); - btn_rel.body.border.color = lv_color_hex3(0x111); - btn_rel.body.border.width = 1; - btn_rel.body.border.opa = LV_OPA_70; - btn_rel.body.padding.left = LV_DPI / 4; - btn_rel.body.padding.right = LV_DPI / 4; - btn_rel.body.padding.top = LV_DPI / 8; + btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); + btn_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); + btn_rel.body.border.color = lv_color_hex3(0x111); + btn_rel.body.border.width = 1; + btn_rel.body.border.opa = LV_OPA_70; + btn_rel.body.padding.left = LV_DPI / 4; + btn_rel.body.padding.right = LV_DPI / 4; + btn_rel.body.padding.top = LV_DPI / 8; btn_rel.body.padding.bottom = LV_DPI / 8; - btn_rel.body.shadow.type = LV_SHADOW_BOTTOM; - btn_rel.body.shadow.color = lv_color_hex3(0x111); - btn_rel.body.shadow.width = LV_DPI / 30; - btn_rel.text.color = lv_color_hex3(0xeee); - btn_rel.image.color = lv_color_hex3(0xeee); + btn_rel.body.shadow.type = LV_SHADOW_BOTTOM; + btn_rel.body.shadow.color = lv_color_hex3(0x111); + btn_rel.body.shadow.width = LV_DPI / 30; + btn_rel.text.color = lv_color_hex3(0xeee); + btn_rel.image.color = lv_color_hex3(0xeee); lv_style_copy(&btn_pr, &btn_rel); btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 30); btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10); lv_style_copy(&btn_tgl_rel, &btn_rel); - btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); - btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); + btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); + btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); btn_tgl_rel.body.shadow.width = LV_DPI / 40; - btn_tgl_rel.text.color = lv_color_hex3(0xddd); - btn_tgl_rel.image.color = lv_color_hex3(0xddd); + btn_tgl_rel.text.color = lv_color_hex3(0xddd); + btn_tgl_rel.image.color = lv_color_hex3(0xddd); lv_style_copy(&btn_tgl_pr, &btn_rel); - btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10); - btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 30); + btn_tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10); + btn_tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 30); btn_tgl_pr.body.shadow.width = LV_DPI / 30; - btn_tgl_pr.text.color = lv_color_hex3(0xddd); - btn_tgl_pr.image.color = lv_color_hex3(0xddd); + btn_tgl_pr.text.color = lv_color_hex3(0xddd); + btn_tgl_pr.image.color = lv_color_hex3(0xddd); lv_style_copy(&btn_ina, &btn_rel); - btn_ina.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); - btn_ina.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); + btn_ina.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); + btn_ina.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); btn_ina.body.shadow.width = 0; - btn_ina.text.color = lv_color_hex3(0xaaa); - btn_ina.image.color = lv_color_hex3(0xaaa); + btn_ina.text.color = lv_color_hex3(0xaaa); + btn_ina.image.color = lv_color_hex3(0xaaa); - theme.style.btn.rel = &btn_rel; - theme.style.btn.pr = &btn_pr; + theme.style.btn.rel = &btn_rel; + theme.style.btn.pr = &btn_pr; theme.style.btn.tgl_rel = &btn_tgl_rel; - theme.style.btn.tgl_pr = &btn_tgl_pr; - theme.style.btn.ina = &btn_ina; + theme.style.btn.tgl_pr = &btn_tgl_pr; + theme.style.btn.ina = &btn_ina; #endif } - static void label_init(void) { #if LV_USE_LABEL != 0 @@ -166,7 +164,7 @@ static void label_init(void) hint.text.color = lv_color_hsv_to_rgb(_hue, 20, 55); theme.style.label.prim = &prim; - theme.style.label.sec = &sec; + theme.style.label.sec = &sec; theme.style.label.hint = &hint; #endif } @@ -175,7 +173,6 @@ static void line_init(void) { #if LV_USE_LINE != 0 - theme.style.line.decor = &def; #endif } @@ -186,11 +183,11 @@ static void led_init(void) static lv_style_t led; lv_style_copy(&led, &def); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; - led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); - led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); + led.body.border.opa = LV_OPA_30; + led.body.main_color = lv_color_hsv_to_rgb(_hue, 100, 100); + led.body.grad_color = lv_color_hsv_to_rgb(_hue, 100, 40); led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 100, 100); @@ -202,9 +199,8 @@ static void img_init(void) { #if LV_USE_IMG != 0 - theme.style.img.light = &def; - theme.style.img.dark = &def; + theme.style.img.dark = &def; #endif } @@ -212,25 +208,25 @@ static void bar_init(void) { #if LV_USE_BAR lv_style_copy(&bar_bg, &panel); - bar_bg.body.padding.left = LV_DPI / 16; - bar_bg.body.padding.right = LV_DPI / 16; - bar_bg.body.padding.top = LV_DPI / 16; + bar_bg.body.padding.left = LV_DPI / 16; + bar_bg.body.padding.right = LV_DPI / 16; + bar_bg.body.padding.top = LV_DPI / 16; bar_bg.body.padding.bottom = LV_DPI / 16; - bar_bg.body.radius = LV_RADIUS_CIRCLE; + bar_bg.body.radius = LV_RADIUS_CIRCLE; lv_style_copy(&bar_indic, &def); - bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); - bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); - bar_indic.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 15); - bar_indic.body.border.width = 1; - bar_indic.body.border.opa = LV_OPA_COVER; - bar_indic.body.radius = LV_RADIUS_CIRCLE; - bar_indic.body.padding.left = 0; - bar_indic.body.padding.right = 0; - bar_indic.body.padding.top = 0; + bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); + bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); + bar_indic.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 15); + bar_indic.body.border.width = 1; + bar_indic.body.border.opa = LV_OPA_COVER; + bar_indic.body.radius = LV_RADIUS_CIRCLE; + bar_indic.body.padding.left = 0; + bar_indic.body.padding.right = 0; + bar_indic.body.padding.top = 0; bar_indic.body.padding.bottom = 0; - theme.style.bar.bg = &bar_bg; + theme.style.bar.bg = &bar_bg; theme.style.bar.indic = &bar_indic; #endif } @@ -242,9 +238,9 @@ static void slider_init(void) lv_style_copy(&slider_knob, &btn_rel); slider_knob.body.radius = LV_RADIUS_CIRCLE; - theme.style.slider.bg = &bar_bg; + theme.style.slider.bg = &bar_bg; theme.style.slider.indic = &bar_indic; - theme.style.slider.knob = &slider_knob; + theme.style.slider.knob = &slider_knob; #endif } @@ -252,27 +248,25 @@ static void sw_init(void) { #if LV_USE_SW != 0 - - theme.style.sw.bg = &bar_bg; - theme.style.sw.indic = &bar_indic; + theme.style.sw.bg = &bar_bg; + theme.style.sw.indic = &bar_indic; theme.style.sw.knob_off = &slider_knob; - theme.style.sw.knob_on = &slider_knob; + theme.style.sw.knob_on = &slider_knob; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 lv_style_copy(&lmeter_bg, &def); - lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); - lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); - lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/ - lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ - lmeter_bg.body.border.color = lv_color_hex3(0x333); - lmeter_bg.line.color = lv_color_hex3(0x555); - lmeter_bg.line.width = 1; - lmeter_bg.text.color = lv_color_hex3(0xddd); + lmeter_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); + lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 95, 90); + lmeter_bg.body.padding.left = LV_DPI / 10; /*Scale line length*/ + lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ + lmeter_bg.body.border.color = lv_color_hex3(0x333); + lmeter_bg.line.color = lv_color_hex3(0x555); + lmeter_bg.line.width = 1; + lmeter_bg.text.color = lv_color_hex3(0xddd); theme.style.lmeter = &lmeter_bg; #endif @@ -285,9 +279,9 @@ static void gauge_init(void) lv_style_copy(&gauge_bg, &def); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); gauge_bg.body.grad_color = gauge_bg.body.main_color; - gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); - gauge_bg.line.width = 1; - gauge_bg.text.color = lv_color_hex3(0xddd); + gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); + gauge_bg.line.width = 1; + gauge_bg.text.color = lv_color_hex3(0xddd); theme.style.gauge = &gauge_bg; #endif @@ -299,16 +293,16 @@ static void arc_init(void) static lv_style_t arc; lv_style_copy(&arc, &def); - arc.line.width = 8; - arc.line.color = lv_color_hsv_to_rgb(_hue, 80, 70); + arc.line.width = 8; + arc.line.color = lv_color_hsv_to_rgb(_hue, 80, 70); arc.line.rounded = 1; /*For preloader*/ - arc.body.border.width = 7; - arc.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 48); - arc.body.padding.left = 1; - arc.body.padding.right = 1; - arc.body.padding.top = 1; + arc.body.border.width = 7; + arc.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 48); + arc.body.padding.left = 1; + arc.body.padding.right = 1; + arc.body.padding.top = 1; arc.body.padding.bottom = 1; theme.style.arc = &arc; @@ -335,47 +329,47 @@ static void calendar_init(void) #if LV_USE_CALENDAR static lv_style_t cal_bg; lv_style_copy(&cal_bg, &bg); - cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); - cal_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); - cal_bg.body.border.color = lv_color_hex3(0x333); - cal_bg.body.border.width = 1; - cal_bg.body.radius = LV_DPI / 20; - cal_bg.body.padding.left = LV_DPI / 10; - cal_bg.body.padding.right = LV_DPI / 10; - cal_bg.body.padding.top = LV_DPI / 10; + cal_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); + cal_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); + cal_bg.body.border.color = lv_color_hex3(0x333); + cal_bg.body.border.width = 1; + cal_bg.body.radius = LV_DPI / 20; + cal_bg.body.padding.left = LV_DPI / 10; + cal_bg.body.padding.right = LV_DPI / 10; + cal_bg.body.padding.top = LV_DPI / 10; cal_bg.body.padding.bottom = LV_DPI / 10; static lv_style_t cal_header; lv_style_copy(&cal_header, &bg); - cal_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); - cal_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); - cal_header.body.radius = 0; - cal_header.body.border.width = 1; - cal_header.body.border.color = lv_color_hex3(0x333); - cal_header.body.padding.left = LV_DPI / 10; - cal_header.body.padding.right = LV_DPI / 10; - cal_header.body.padding.top = LV_DPI / 10; + cal_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); + cal_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); + cal_header.body.radius = 0; + cal_header.body.border.width = 1; + cal_header.body.border.color = lv_color_hex3(0x333); + cal_header.body.padding.left = LV_DPI / 10; + cal_header.body.padding.right = LV_DPI / 10; + cal_header.body.padding.top = LV_DPI / 10; cal_header.body.padding.bottom = LV_DPI / 10; static lv_style_t week_box; lv_style_copy(&week_box, &panel); - week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 45); - week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 45); - week_box.body.radius = LV_DPI / 20; - week_box.body.border.width = 1; - week_box.body.padding.left = LV_DPI / 20; - week_box.body.padding.right = LV_DPI / 20; - week_box.body.padding.top = LV_DPI / 25; + week_box.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 45); + week_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 45); + week_box.body.radius = LV_DPI / 20; + week_box.body.border.width = 1; + week_box.body.padding.left = LV_DPI / 20; + week_box.body.padding.right = LV_DPI / 20; + week_box.body.padding.top = LV_DPI / 25; week_box.body.padding.bottom = LV_DPI / 25; static lv_style_t today_box; lv_style_copy(&today_box, &week_box); - today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); - today_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); - today_box.body.radius = LV_DPI / 20; - today_box.body.padding.left = LV_DPI / 14; - today_box.body.padding.right = LV_DPI / 14; - today_box.body.padding.top = LV_DPI / 14; + today_box.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); + today_box.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); + today_box.body.radius = LV_DPI / 20; + today_box.body.padding.left = LV_DPI / 14; + today_box.body.padding.right = LV_DPI / 14; + today_box.body.padding.top = LV_DPI / 14; today_box.body.padding.bottom = LV_DPI / 14; static lv_style_t highlighted_days; @@ -386,13 +380,13 @@ static void calendar_init(void) lv_style_copy(&ina_days, &bg); ina_days.text.color = lv_color_hsv_to_rgb(_hue, 0, 60); - theme.style.calendar.bg = &cal_bg; - theme.style.calendar.header = &cal_header; - theme.style.calendar.week_box = &week_box; - theme.style.calendar.today_box = &today_box; + theme.style.calendar.bg = &cal_bg; + theme.style.calendar.header = &cal_header; + theme.style.calendar.week_box = &week_box; + theme.style.calendar.today_box = &today_box; theme.style.calendar.highlighted_days = &highlighted_days; - theme.style.calendar.day_names = &cal_bg; - theme.style.calendar.inactive_days = &ina_days; + theme.style.calendar.day_names = &cal_bg; + theme.style.calendar.inactive_days = &ina_days; #endif } @@ -403,102 +397,103 @@ static void cb_init(void) static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); - rel.body.radius = LV_DPI / 20; - rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); - rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 95); + rel.body.radius = LV_DPI / 20; + rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); + rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 95); rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50); - rel.body.border.width = 2;; + rel.body.border.width = 2; + ; lv_style_copy(&pr, &rel); - pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 80); - pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 80); + pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 80); + pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 80); pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 20); - pr.body.border.width = 1;; + pr.body.border.width = 1; + ; lv_style_copy(&tgl_rel, &rel); - tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 90); - tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 90); + tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 90); + tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 90); tgl_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 50); lv_style_copy(&tgl_pr, &tgl_rel); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); - tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); + tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70); tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 30); - tgl_pr.body.border.width = 1;; + tgl_pr.body.border.width = 1; + ; lv_style_copy(&ina, &rel); - ina.body.main_color = lv_color_hex3(0x777); - ina.body.grad_color = lv_color_hex3(0x777); + ina.body.main_color = lv_color_hex3(0x777); + ina.body.grad_color = lv_color_hex3(0x777); ina.body.border.width = 0; - theme.style.cb.bg = &lv_style_transp; - theme.style.cb.box.rel = &rel; - theme.style.cb.box.pr = ≺ + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ theme.style.cb.box.tgl_rel = &tgl_rel; - theme.style.cb.box.tgl_pr = &tgl_pr; - theme.style.cb.box.ina = &def; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &def; #endif } - static void btnm_init(void) { #if LV_USE_BTNM static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&btnm_bg, &btn_rel); - btnm_bg.body.padding.left = 2; - btnm_bg.body.padding.right = 2; - btnm_bg.body.padding.top = 2; + btnm_bg.body.padding.left = 2; + btnm_bg.body.padding.right = 2; + btnm_bg.body.padding.top = 2; btnm_bg.body.padding.bottom = 2; - btnm_bg.body.padding.inner = 0; - btnm_bg.body.border.width = 1; + btnm_bg.body.padding.inner = 0; + btnm_bg.body.border.width = 1; lv_style_copy(&rel, &btn_rel); - rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; + rel.body.border.part = LV_BORDER_FULL | LV_BORDER_INTERNAL; rel.body.border.width = 1; - rel.body.radius = 2; + rel.body.radius = 2; lv_style_copy(&pr, &btn_pr); - pr.body.border.part = rel.body.border.part; + pr.body.border.part = rel.body.border.part; pr.body.border.width = rel.body.border.width; - pr.body.radius = rel.body.radius; + pr.body.radius = rel.body.radius; lv_style_copy(&tgl_rel, &btn_tgl_rel); - tgl_rel.body.border.part = rel.body.border.part; + tgl_rel.body.border.part = rel.body.border.part; tgl_rel.body.border.width = rel.body.border.width; - tgl_rel.body.radius = rel.body.radius; + tgl_rel.body.radius = rel.body.radius; lv_style_copy(&tgl_pr, &btn_tgl_pr); - tgl_pr.body.border.part = rel.body.border.part; + tgl_pr.body.border.part = rel.body.border.part; tgl_pr.body.border.width = rel.body.border.width; - tgl_pr.body.radius = rel.body.radius; + tgl_pr.body.radius = rel.body.radius; lv_style_copy(&ina, &btn_ina); - ina.body.border.part = rel.body.border.part; + ina.body.border.part = rel.body.border.part; ina.body.border.width = rel.body.border.width; - ina.body.radius = rel.body.radius; + ina.body.radius = rel.body.radius; - theme.style.btnm.bg = &btnm_bg; - theme.style.btnm.btn.rel = &rel; - theme.style.btnm.btn.pr = ≺ + theme.style.btnm.bg = &btnm_bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ theme.style.btnm.btn.tgl_rel = &tgl_rel; - theme.style.btnm.btn.tgl_pr = &tgl_pr; - theme.style.btnm.btn.ina = &ina; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &ina; #endif } static void kb_init(void) { #if LV_USE_KB - theme.style.kb.bg = &bg; - theme.style.kb.btn.rel = &btn_rel; - theme.style.kb.btn.pr = &btn_pr; + theme.style.kb.bg = &bg; + theme.style.kb.btn.rel = &btn_rel; + theme.style.kb.btn.pr = &btn_pr; theme.style.kb.btn.tgl_rel = &btn_tgl_rel; - theme.style.kb.btn.tgl_pr = &btn_tgl_pr; - theme.style.kb.btn.ina = &btn_ina; + theme.style.kb.btn.tgl_pr = &btn_tgl_pr; + theme.style.kb.btn.ina = &btn_ina; #endif - } static void mbox_init(void) @@ -506,17 +501,17 @@ static void mbox_init(void) #if LV_USE_MBOX static lv_style_t mbox_bg; lv_style_copy(&mbox_bg, &bg); - mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30); - mbox_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 30); - mbox_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 20); + mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30); + mbox_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 30); + mbox_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 20); mbox_bg.body.border.width = 1; mbox_bg.body.shadow.width = LV_DPI / 10; mbox_bg.body.shadow.color = lv_color_hex3(0x222); - mbox_bg.body.radius = LV_DPI / 20; - theme.style.mbox.bg = &mbox_bg; - theme.style.mbox.btn.bg = &lv_style_transp; - theme.style.mbox.btn.rel = &btn_rel; - theme.style.mbox.btn.pr = &btn_pr; + mbox_bg.body.radius = LV_DPI / 20; + theme.style.mbox.bg = &mbox_bg; + theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.btn.rel = &btn_rel; + theme.style.mbox.btn.pr = &btn_pr; #endif } @@ -526,34 +521,34 @@ static void page_init(void) static lv_style_t page_scrl; lv_style_copy(&page_scrl, &bg); - page_scrl.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); - page_scrl.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); + page_scrl.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40); + page_scrl.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); page_scrl.body.border.color = lv_color_hex3(0x333); page_scrl.body.border.width = 1; - page_scrl.body.radius = LV_DPI / 20; + page_scrl.body.radius = LV_DPI / 20; - theme.style.page.bg = &panel; + theme.style.page.bg = &panel; theme.style.page.scrl = &page_scrl; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } static void ta_init(void) { #if LV_USE_TA - theme.style.ta.area = &panel; + theme.style.ta.area = &panel; theme.style.ta.oneline = &panel; - theme.style.ta.cursor = NULL; - theme.style.ta.sb = &def; + theme.style.ta.cursor = NULL; + theme.style.ta.sb = &def; #endif } static void spinbox_init(void) { #if LV_USE_SPINBOX - theme.style.spinbox.bg= &panel; + theme.style.spinbox.bg = &panel; theme.style.spinbox.cursor = theme.style.ta.cursor; - theme.style.spinbox.sb = theme.style.ta.sb; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -563,39 +558,39 @@ static void list_init(void) static lv_style_t list_bg, list_btn_rel, list_btn_pr, list_btn_tgl_rel, list_btn_tgl_pr; lv_style_copy(&list_bg, &panel); - list_bg.body.padding.top = 0; + list_bg.body.padding.top = 0; list_bg.body.padding.bottom = 0; - list_bg.body.padding.left = 0; - list_bg.body.padding.right = 0; - list_bg.body.padding.inner = 0; + list_bg.body.padding.left = 0; + list_bg.body.padding.right = 0; + list_bg.body.padding.inner = 0; lv_style_copy(&list_btn_rel, &bg); - list_btn_rel.body.opa = LV_OPA_TRANSP; - list_btn_rel.body.border.part = LV_BORDER_BOTTOM; - list_btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5); - list_btn_rel.body.border.width = 1; - list_btn_rel.body.radius = LV_DPI / 10; - list_btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); - list_btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); - list_btn_rel.body.padding.top = LV_DPI / 6; + list_btn_rel.body.opa = LV_OPA_TRANSP; + list_btn_rel.body.border.part = LV_BORDER_BOTTOM; + list_btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5); + list_btn_rel.body.border.width = 1; + list_btn_rel.body.radius = LV_DPI / 10; + list_btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); + list_btn_rel.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); + list_btn_rel.body.padding.top = LV_DPI / 6; list_btn_rel.body.padding.bottom = LV_DPI / 6; - list_btn_rel.body.padding.left = LV_DPI / 8; - list_btn_rel.body.padding.right = LV_DPI / 8; + list_btn_rel.body.padding.left = LV_DPI / 8; + list_btn_rel.body.padding.right = LV_DPI / 8; lv_style_copy(&list_btn_pr, &btn_pr); - list_btn_pr.body.main_color = btn_pr.body.grad_color; - list_btn_pr.body.grad_color = btn_pr.body.main_color; - list_btn_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5); - list_btn_pr.body.border.width = 0; - list_btn_pr.body.padding.top = LV_DPI / 6; + list_btn_pr.body.main_color = btn_pr.body.grad_color; + list_btn_pr.body.grad_color = btn_pr.body.main_color; + list_btn_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5); + list_btn_pr.body.border.width = 0; + list_btn_pr.body.padding.top = LV_DPI / 6; list_btn_pr.body.padding.bottom = LV_DPI / 6; - list_btn_pr.body.padding.left = LV_DPI / 8; - list_btn_pr.body.padding.right = LV_DPI / 8; - list_btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); - list_btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); + list_btn_pr.body.padding.left = LV_DPI / 8; + list_btn_pr.body.padding.right = LV_DPI / 8; + list_btn_pr.text.color = lv_color_hsv_to_rgb(_hue, 5, 80); + list_btn_pr.image.color = lv_color_hsv_to_rgb(_hue, 5, 80); lv_style_copy(&list_btn_tgl_rel, &list_btn_rel); - list_btn_tgl_rel.body.opa = LV_OPA_COVER; + list_btn_tgl_rel.body.opa = LV_OPA_COVER; list_btn_tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 8); list_btn_tgl_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 8); @@ -603,14 +598,14 @@ static void list_init(void) list_btn_tgl_pr.body.main_color = btn_tgl_pr.body.main_color; list_btn_tgl_pr.body.grad_color = btn_tgl_pr.body.grad_color; - theme.style.list.sb = &sb; - theme.style.list.bg = &list_bg; - theme.style.list.scrl = &lv_style_transp_tight; - theme.style.list.btn.rel = &list_btn_rel; - theme.style.list.btn.pr = &list_btn_pr; + theme.style.list.sb = &sb; + theme.style.list.bg = &list_bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &list_btn_rel; + theme.style.list.btn.pr = &list_btn_pr; theme.style.list.btn.tgl_rel = &list_btn_tgl_rel; - theme.style.list.btn.tgl_pr = &list_btn_tgl_pr; - theme.style.list.btn.ina = &def; + theme.style.list.btn.tgl_pr = &list_btn_tgl_pr; + theme.style.list.btn.ina = &def; #endif } @@ -618,21 +613,21 @@ static void ddlist_init(void) { #if LV_USE_DDLIST != 0 lv_style_copy(&ddlist_bg, &btn_rel); - ddlist_bg.text.line_space = LV_DPI / 8; - ddlist_bg.body.padding.top = LV_DPI / 8; + ddlist_bg.text.line_space = LV_DPI / 8; + ddlist_bg.body.padding.top = LV_DPI / 8; ddlist_bg.body.padding.bottom = LV_DPI / 8; - ddlist_bg.body.padding.left = LV_DPI / 8; - ddlist_bg.body.padding.right = LV_DPI / 8; - ddlist_bg.body.radius = LV_DPI / 30; + ddlist_bg.body.padding.left = LV_DPI / 8; + ddlist_bg.body.padding.right = LV_DPI / 8; + ddlist_bg.body.radius = LV_DPI / 30; lv_style_copy(&ddlist_sel, &btn_rel); ddlist_sel.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 50); ddlist_sel.body.grad_color = lv_color_hsv_to_rgb(_hue, 20, 50); - ddlist_sel.body.radius = 0; + ddlist_sel.body.radius = 0; - theme.style.ddlist.bg = &ddlist_bg; + theme.style.ddlist.bg = &ddlist_bg; theme.style.ddlist.sel = &ddlist_sel; - theme.style.ddlist.sb = &def; + theme.style.ddlist.sb = &def; #endif } @@ -644,10 +639,10 @@ static void roller_init(void) lv_style_copy(&roller_bg, &ddlist_bg); roller_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); roller_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40); - roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 70); - roller_bg.text.opa = LV_OPA_60; + roller_bg.text.color = lv_color_hsv_to_rgb(_hue, 5, 70); + roller_bg.text.opa = LV_OPA_60; - theme.style.roller.bg = &roller_bg; + theme.style.roller.bg = &roller_bg; theme.style.roller.sel = &ddlist_sel; #endif } @@ -655,22 +650,22 @@ static void roller_init(void) static void tabview_init(void) { #if LV_USE_TABVIEW != 0 - theme.style.tabview.bg = &bg; - theme.style.tabview.indic = &lv_style_transp; - theme.style.tabview.btn.bg = &lv_style_transp; - theme.style.tabview.btn.rel = &btn_rel; - theme.style.tabview.btn.pr = &btn_pr; + theme.style.tabview.bg = &bg; + theme.style.tabview.indic = &lv_style_transp; + theme.style.tabview.btn.bg = &lv_style_transp; + theme.style.tabview.btn.rel = &btn_rel; + theme.style.tabview.btn.pr = &btn_pr; theme.style.tabview.btn.tgl_rel = &btn_tgl_rel; - theme.style.tabview.btn.tgl_pr = &btn_tgl_pr; + theme.style.tabview.btn.tgl_pr = &btn_tgl_pr; #endif } static void tileview_init(void) { #if LV_USE_TILEVIEW != 0 - theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; - theme.style.tileview.sb = theme.style.page.sb; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -679,15 +674,14 @@ static void table_init(void) #if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, &panel); - cell.body.radius = 0; - cell.body.border.width = 1; - cell.body.padding.left = LV_DPI / 12; - cell.body.padding.right = LV_DPI / 12; - cell.body.padding.top = LV_DPI / 12; + cell.body.radius = 0; + cell.body.border.width = 1; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; cell.body.padding.bottom = LV_DPI / 12; - - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; #endif } @@ -702,28 +696,28 @@ static void win_init(void) static lv_style_t win_header; lv_style_copy(&win_header, &win_bg); - win_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); - win_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); - win_header.body.radius = 0; - win_header.body.padding.left = 0; - win_header.body.padding.right = 0; - win_header.body.padding.top = 0; + win_header.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 20); + win_header.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20); + win_header.body.radius = 0; + win_header.body.padding.left = 0; + win_header.body.padding.right = 0; + win_header.body.padding.top = 0; win_header.body.padding.bottom = 0; static lv_style_t win_btn_pr; lv_style_copy(&win_btn_pr, &def); win_btn_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 10); win_btn_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 10); - win_btn_pr.text.color = lv_color_hex3(0xaaa); - win_btn_pr.image.color = lv_color_hex3(0xaaa); + win_btn_pr.text.color = lv_color_hex3(0xaaa); + win_btn_pr.image.color = lv_color_hex3(0xaaa); - theme.style.win.bg = &win_bg; - theme.style.win.sb = &sb; - theme.style.win.header = &win_header; - theme.style.win.content.bg = &lv_style_transp; + theme.style.win.bg = &win_bg; + theme.style.win.sb = &sb; + theme.style.win.header = &win_header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &lv_style_transp; - theme.style.win.btn.pr = &win_btn_pr; + theme.style.win.btn.rel = &lv_style_transp; + theme.style.win.btn.pr = &win_btn_pr; #endif } @@ -731,16 +725,17 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -748,16 +743,17 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void)group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -769,8 +765,6 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the night theme * @param hue [0..360] hue value from HSV color space to define the theme's base color @@ -781,12 +775,12 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -824,7 +818,7 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -845,4 +839,3 @@ lv_theme_t * lv_theme_get_night(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_night.h b/src/lv_themes/lv_theme_night.h index 3ea15c370a07..a009bed0000f 100644 --- a/src/lv_themes/lv_theme_night.h +++ b/src/lv_themes/lv_theme_night.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_templ.c b/src/lv_themes/lv_theme_templ.c index b28209ca5192..2f0871905fd4 100644 --- a/src/lv_themes/lv_theme_templ.c +++ b/src/lv_themes/lv_theme_templ.c @@ -8,7 +8,6 @@ *********************/ #include "lv_theme.h" - #if LV_USE_THEME_TEMPL /********************* @@ -44,19 +43,17 @@ static lv_font_t * _font; static void basic_init(void) { - lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ + lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ def.text.font = _font; - theme.style.bg = &def; + theme.style.bg = &def; theme.style.panel = &def; - } static void cont_init(void) { #if LV_USE_CONT != 0 - theme.style.cont = &def; #endif } @@ -65,23 +62,22 @@ static void btn_init(void) { #if LV_USE_BTN != 0 - - theme.style.btn.rel = &def; - theme.style.btn.pr = &def; + theme.style.btn.rel = &def; + theme.style.btn.pr = &def; theme.style.btn.tgl_rel = &def; - theme.style.btn.tgl_pr = &def; - theme.style.btn.ina = &def; + theme.style.btn.tgl_pr = &def; + theme.style.btn.ina = &def; #endif } static void imgbtn_init(void) { #if LV_USE_IMGBTN != 0 - theme.style.imgbtn.rel = &def; - theme.style.imgbtn.pr = &def; + theme.style.imgbtn.rel = &def; + theme.style.imgbtn.pr = &def; theme.style.imgbtn.tgl_rel = &def; - theme.style.imgbtn.tgl_pr = &def; - theme.style.imgbtn.ina = &def; + theme.style.imgbtn.tgl_pr = &def; + theme.style.imgbtn.ina = &def; #endif } @@ -89,9 +85,8 @@ static void label_init(void) { #if LV_USE_LABEL != 0 - theme.style.label.prim = &def; - theme.style.label.sec = &def; + theme.style.label.sec = &def; theme.style.label.hint = &def; #endif } @@ -100,9 +95,8 @@ static void img_init(void) { #if LV_USE_IMG != 0 - theme.style.img.light = &def; - theme.style.img.dark = &def; + theme.style.img.dark = &def; #endif } @@ -110,7 +104,6 @@ static void line_init(void) { #if LV_USE_LINE != 0 - theme.style.line.decor = &def; #endif } @@ -119,7 +112,6 @@ static void led_init(void) { #if LV_USE_LED != 0 - theme.style.led = &def; #endif } @@ -128,8 +120,7 @@ static void bar_init(void) { #if LV_USE_BAR - - theme.style.bar.bg = &def; + theme.style.bar.bg = &def; theme.style.bar.indic = &def; #endif } @@ -138,10 +129,9 @@ static void slider_init(void) { #if LV_USE_SLIDER != 0 - - theme.style.slider.bg = &def; + theme.style.slider.bg = &def; theme.style.slider.indic = &def; - theme.style.slider.knob = &def; + theme.style.slider.knob = &def; #endif } @@ -149,20 +139,17 @@ static void sw_init(void) { #if LV_USE_SW != 0 - - theme.style.sw.bg = &def; - theme.style.sw.indic = &def; + theme.style.sw.bg = &def; + theme.style.sw.indic = &def; theme.style.sw.knob_off = &def; - theme.style.sw.knob_on = &def; + theme.style.sw.knob_on = &def; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 - theme.style.lmeter = &def; #endif } @@ -171,7 +158,6 @@ static void gauge_init(void) { #if LV_USE_GAUGE != 0 - theme.style.gauge = &def; #endif } @@ -180,7 +166,6 @@ static void arc_init(void) { #if LV_USE_ARC != 0 - theme.style.arc = &def; #endif } @@ -189,7 +174,6 @@ static void preload_init(void) { #if LV_USE_PRELOAD != 0 - theme.style.preload = &def; #endif } @@ -206,14 +190,14 @@ static void calendar_init(void) { #if LV_USE_CALENDAR - theme.style.calendar.bg = theme.style.panel; - theme.style.calendar.header = &def; - theme.style.calendar.inactive_days = &def; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &def; + theme.style.calendar.inactive_days = &def; theme.style.calendar.highlighted_days = &def; - theme.style.calendar.week_box = &def; - theme.style.calendar.today_box = &def; - theme.style.calendar.header_pr = &def; - theme.style.calendar.day_names = &def; + theme.style.calendar.week_box = &def; + theme.style.calendar.today_box = &def; + theme.style.calendar.header_pr = &def; + theme.style.calendar.day_names = &def; #endif } @@ -221,28 +205,25 @@ static void cb_init(void) { #if LV_USE_CB != 0 - - theme.style.cb.bg = &def; - theme.style.cb.box.rel = &def; - theme.style.cb.box.pr = &def; + theme.style.cb.bg = &def; + theme.style.cb.box.rel = &def; + theme.style.cb.box.pr = &def; theme.style.cb.box.tgl_rel = &def; - theme.style.cb.box.tgl_pr = &def; - theme.style.cb.box.ina = &def; + theme.style.cb.box.tgl_pr = &def; + theme.style.cb.box.ina = &def; #endif } - static void btnm_init(void) { #if LV_USE_BTNM - - theme.style.btnm.bg = &def; - theme.style.btnm.btn.rel = &def; - theme.style.btnm.btn.pr = &def; + theme.style.btnm.bg = &def; + theme.style.btnm.btn.rel = &def; + theme.style.btnm.btn.pr = &def; theme.style.btnm.btn.tgl_rel = &def; - theme.style.btnm.btn.tgl_pr = &def; - theme.style.btnm.btn.ina = &def; + theme.style.btnm.btn.tgl_pr = &def; + theme.style.btnm.btn.ina = &def; #endif } @@ -250,26 +231,23 @@ static void kb_init(void) { #if LV_USE_KB - - theme.style.kb.bg = &def; - theme.style.kb.btn.rel = &def; - theme.style.kb.btn.pr = &def; + theme.style.kb.bg = &def; + theme.style.kb.btn.rel = &def; + theme.style.kb.btn.pr = &def; theme.style.kb.btn.tgl_rel = &def; - theme.style.kb.btn.tgl_pr = &def; - theme.style.kb.btn.ina = &def; + theme.style.kb.btn.tgl_pr = &def; + theme.style.kb.btn.ina = &def; #endif - } static void mbox_init(void) { #if LV_USE_MBOX - - theme.style.mbox.bg = &def; - theme.style.mbox.btn.bg = &def; + theme.style.mbox.bg = &def; + theme.style.mbox.btn.bg = &def; theme.style.mbox.btn.rel = &def; - theme.style.mbox.btn.pr = &def; + theme.style.mbox.btn.pr = &def; #endif } @@ -277,10 +255,9 @@ static void page_init(void) { #if LV_USE_PAGE - - theme.style.page.bg = &def; + theme.style.page.bg = &def; theme.style.page.scrl = &def; - theme.style.page.sb = &def; + theme.style.page.sb = &def; #endif } @@ -288,11 +265,10 @@ static void ta_init(void) { #if LV_USE_TA - - theme.style.ta.area = &def; + theme.style.ta.area = &def; theme.style.ta.oneline = &def; - theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.style.ta.sb = &def; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &def; #endif } @@ -300,15 +276,14 @@ static void list_init(void) { #if LV_USE_LIST != 0 - - theme.style.list.sb = &def; - theme.style.list.bg = &def; - theme.style.list.scrl = &def; - theme.style.list.btn.rel = &def; - theme.style.list.btn.pr = &def; + theme.style.list.sb = &def; + theme.style.list.bg = &def; + theme.style.list.scrl = &def; + theme.style.list.btn.rel = &def; + theme.style.list.btn.pr = &def; theme.style.list.btn.tgl_rel = &def; - theme.style.list.btn.tgl_pr = &def; - theme.style.list.btn.ina = &def; + theme.style.list.btn.tgl_pr = &def; + theme.style.list.btn.ina = &def; #endif } @@ -316,10 +291,9 @@ static void ddlist_init(void) { #if LV_USE_DDLIST != 0 - - theme.style.ddlist.bg = &def; + theme.style.ddlist.bg = &def; theme.style.ddlist.sel = &def; - theme.style.ddlist.sb = &def; + theme.style.ddlist.sb = &def; #endif } @@ -327,8 +301,7 @@ static void roller_init(void) { #if LV_USE_ROLLER != 0 - - theme.style.roller.bg = &def; + theme.style.roller.bg = &def; theme.style.roller.sel = &def; #endif } @@ -337,21 +310,20 @@ static void tabview_init(void) { #if LV_USE_TABVIEW != 0 - - theme.style.tabview.bg = &def; - theme.style.tabview.indic = &def; - theme.style.tabview.btn.bg = &def; - theme.style.tabview.btn.rel = &def; - theme.style.tabview.btn.pr = &def; + theme.style.tabview.bg = &def; + theme.style.tabview.indic = &def; + theme.style.tabview.btn.bg = &def; + theme.style.tabview.btn.rel = &def; + theme.style.tabview.btn.pr = &def; theme.style.tabview.btn.tgl_rel = &def; - theme.style.tabview.btn.tgl_pr = &def; + theme.style.tabview.btn.tgl_pr = &def; #endif } static void table_init(void) { #if LV_USE_TABLE != 0 - theme.style.table.bg = &def; + theme.style.table.bg = &def; theme.style.table.cell = &def; #endif } @@ -360,14 +332,13 @@ static void win_init(void) { #if LV_USE_WIN != 0 - - theme.style.win.bg = &def; - theme.style.win.sb = &def; - theme.style.win.header = &def; - theme.style.win.content.bg = &def; + theme.style.win.bg = &def; + theme.style.win.sb = &def; + theme.style.win.header = &def; + theme.style.win.content.bg = &def; theme.style.win.content.scrl = &def; - theme.style.win.btn.rel = &def; - theme.style.win.btn.pr = &def; + theme.style.win.btn.rel = &def; + theme.style.win.btn.pr = &def; #endif } @@ -375,23 +346,23 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if (style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -399,23 +370,23 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.border.width != 0) style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -427,8 +398,6 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the templ theme * @param hue [0..360] hue value from HSV color space to define the theme's base color @@ -439,12 +408,12 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -481,7 +450,7 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -502,4 +471,3 @@ lv_theme_t * lv_theme_get_templ(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_templ.h b/src/lv_themes/lv_theme_templ.h index 02a8a862b897..7d1e3ec691a8 100644 --- a/src/lv_themes/lv_theme_templ.h +++ b/src/lv_themes/lv_theme_templ.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme diff --git a/src/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c index 1997e8977621..9367f4fd526c 100644 --- a/src/lv_themes/lv_theme_zen.c +++ b/src/lv_themes/lv_theme_zen.c @@ -8,7 +8,6 @@ *********************/ #include "lv_theme.h" - #if LV_USE_THEME_ZEN /********************* @@ -48,40 +47,40 @@ static void basic_init(void) static lv_style_t bg; static lv_style_t panel; - lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ + lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ def.body.border.opa = LV_OPA_COVER; - def.text.font = _font; - def.text.color = lv_color_hex3(0x444); - def.image.color = lv_color_hex3(0x444); + def.text.font = _font; + def.text.color = lv_color_hex3(0x444); + def.image.color = lv_color_hex3(0x444); lv_style_copy(&bg, &def); - bg.body.main_color = LV_COLOR_WHITE; - bg.body.grad_color = LV_COLOR_WHITE; - bg.body.radius = 0; + bg.body.main_color = LV_COLOR_WHITE; + bg.body.grad_color = LV_COLOR_WHITE; + bg.body.radius = 0; bg.body.border.width = 0; bg.body.shadow.width = 0; lv_style_copy(&panel, &bg); - panel.body.radius = LV_DPI / 10; - panel.body.border.width = 2; - panel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); - panel.body.border.opa = LV_OPA_COVER; - panel.body.shadow.width = 4; - panel.body.shadow.color = lv_color_hex3(0xddd); - panel.body.padding.left = LV_DPI / 6; - panel.body.padding.right = LV_DPI / 6; - panel.body.padding.top = LV_DPI / 8; + panel.body.radius = LV_DPI / 10; + panel.body.border.width = 2; + panel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); + panel.body.border.opa = LV_OPA_COVER; + panel.body.shadow.width = 4; + panel.body.shadow.color = lv_color_hex3(0xddd); + panel.body.padding.left = LV_DPI / 6; + panel.body.padding.right = LV_DPI / 6; + panel.body.padding.top = LV_DPI / 8; panel.body.padding.bottom = LV_DPI / 8; - panel.body.padding.inner = LV_DPI / 10; + panel.body.padding.inner = LV_DPI / 10; lv_style_copy(&sb, &def); - sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 90); - sb.body.grad_color = sb.body.main_color; - sb.body.border.width = 0; - sb.body.radius = LV_RADIUS_CIRCLE; + sb.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 90); + sb.body.grad_color = sb.body.main_color; + sb.body.border.width = 0; + sb.body.radius = LV_RADIUS_CIRCLE; sb.body.padding.inner = LV_DPI / 10; - theme.style.bg = &bg; + theme.style.bg = &bg; theme.style.panel = &panel; } @@ -89,7 +88,6 @@ static void cont_init(void) { #if LV_USE_CONT != 0 - theme.style.cont = theme.style.panel; #endif } @@ -99,41 +97,41 @@ static void btn_init(void) #if LV_USE_BTN != 0 static lv_style_t rel, pr, tgl_pr, ina; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_TRANSP; - rel.body.radius = LV_RADIUS_CIRCLE; - rel.body.border.width = 2; - rel.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90); - rel.body.border.opa = LV_OPA_COVER; - rel.body.shadow.width = 4; - rel.body.shadow.color = lv_color_hex3(0xddd); - rel.body.padding.left = LV_DPI / 4; - rel.body.padding.right = LV_DPI / 4; - rel.body.padding.top = LV_DPI / 8; + rel.body.opa = LV_OPA_TRANSP; + rel.body.radius = LV_RADIUS_CIRCLE; + rel.body.border.width = 2; + rel.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90); + rel.body.border.opa = LV_OPA_COVER; + rel.body.shadow.width = 4; + rel.body.shadow.color = lv_color_hex3(0xddd); + rel.body.padding.left = LV_DPI / 4; + rel.body.padding.right = LV_DPI / 4; + rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.text.color = lv_color_hsv_to_rgb(_hue, 40, 90); - rel.image.color = lv_color_hsv_to_rgb(_hue, 40, 90); + rel.text.color = lv_color_hsv_to_rgb(_hue, 40, 90); + rel.image.color = lv_color_hsv_to_rgb(_hue, 40, 90); lv_style_copy(&pr, &rel); pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 60); pr.body.shadow.width = 0; - pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60); - pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 60); + pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60); + pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 60); lv_style_copy(&tgl_pr, &pr); tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50); - tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 50); - tgl_pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 50); + tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 50); + tgl_pr.image.color = lv_color_hsv_to_rgb(_hue, 40, 50); lv_style_copy(&ina, &tgl_pr); ina.body.border.color = lv_color_hex3(0xbbb); - ina.text.color = lv_color_hex3(0xbbb); - ina.image.color = lv_color_hex3(0xbbb); + ina.text.color = lv_color_hex3(0xbbb); + ina.image.color = lv_color_hex3(0xbbb); - theme.style.btn.rel = &rel; - theme.style.btn.pr = ≺ + theme.style.btn.rel = &rel; + theme.style.btn.pr = ≺ theme.style.btn.tgl_rel = ≺ - theme.style.btn.tgl_pr = &tgl_pr; - theme.style.btn.ina = &ina; + theme.style.btn.tgl_pr = &tgl_pr; + theme.style.btn.ina = &ina; #endif } @@ -146,11 +144,11 @@ static void label_init(void) lv_style_copy(&hint, &def); prim.text.color = lv_color_hex3(0x555); - sec.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); + sec.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); hint.text.color = lv_color_hsv_to_rgb(_hue, 25, 85); theme.style.label.prim = &prim; - theme.style.label.sec = &sec; + theme.style.label.sec = &sec; theme.style.label.hint = &hint; #endif } @@ -160,15 +158,15 @@ static void img_init(void) #if LV_USE_IMG != 0 static lv_style_t img_light, img_dark; lv_style_copy(&img_light, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 15, 85); img_light.image.intense = LV_OPA_80; lv_style_copy(&img_dark, &def); - img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 55); + img_light.image.color = lv_color_hsv_to_rgb(_hue, 85, 55); img_light.image.intense = LV_OPA_80; theme.style.img.light = &img_light; - theme.style.img.dark = &img_dark; + theme.style.img.dark = &img_dark; #endif } @@ -176,7 +174,6 @@ static void line_init(void) { #if LV_USE_LINE != 0 - theme.style.line.decor = &def; #endif } @@ -188,11 +185,11 @@ static void led_init(void) static lv_style_t led; lv_style_copy(&led, &lv_style_pretty_color); led.body.shadow.width = LV_DPI / 10; - led.body.radius = LV_RADIUS_CIRCLE; + led.body.radius = LV_RADIUS_CIRCLE; led.body.border.width = LV_DPI / 30; - led.body.border.opa = LV_OPA_30; - led.body.main_color = lv_color_hsv_to_rgb(_hue, 60, 100); - led.body.grad_color = lv_color_hsv_to_rgb(_hue, 60, 40); + led.body.border.opa = LV_OPA_30; + led.body.main_color = lv_color_hsv_to_rgb(_hue, 60, 100); + led.body.grad_color = lv_color_hsv_to_rgb(_hue, 60, 40); led.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 60); led.body.shadow.color = lv_color_hsv_to_rgb(_hue, 80, 100); @@ -206,24 +203,23 @@ static void bar_init(void) static lv_style_t bg, indic; lv_style_copy(&bg, &def); - bg.body.opa = LV_OPA_TRANSP; - bg.body.radius = LV_RADIUS_CIRCLE; + bg.body.opa = LV_OPA_TRANSP; + bg.body.radius = LV_RADIUS_CIRCLE; bg.body.border.width = 2; - bg.body.border.opa = LV_OPA_COVER; + bg.body.border.opa = LV_OPA_COVER; bg.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 90); lv_style_copy(&indic, &def); - indic.body.radius = LV_RADIUS_CIRCLE; - indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90); - indic.body.grad_color = indic.body.main_color; - indic.body.border.width = 0; - indic.body.padding.left = LV_DPI / 20; - indic.body.padding.right = LV_DPI / 20; - indic.body.padding.top = LV_DPI / 20; + indic.body.radius = LV_RADIUS_CIRCLE; + indic.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90); + indic.body.grad_color = indic.body.main_color; + indic.body.border.width = 0; + indic.body.padding.left = LV_DPI / 20; + indic.body.padding.right = LV_DPI / 20; + indic.body.padding.top = LV_DPI / 20; indic.body.padding.bottom = LV_DPI / 20; - - theme.style.bar.bg = &bg; + theme.style.bar.bg = &bg; theme.style.bar.indic = &indic; #endif } @@ -234,14 +230,14 @@ static void slider_init(void) static lv_style_t knob; lv_style_copy(&knob, &def); - knob.body.main_color = theme.style.bar.indic->body.main_color; - knob.body.grad_color = knob.body.main_color; - knob.body.radius = LV_RADIUS_CIRCLE; + knob.body.main_color = theme.style.bar.indic->body.main_color; + knob.body.grad_color = knob.body.main_color; + knob.body.radius = LV_RADIUS_CIRCLE; knob.body.border.width = 0; - theme.style.slider.bg = theme.style.bar.bg; + theme.style.slider.bg = theme.style.bar.bg; theme.style.slider.indic = theme.style.bar.indic; - theme.style.slider.knob = &knob; + theme.style.slider.knob = &knob; #endif } @@ -251,36 +247,35 @@ static void sw_init(void) static lv_style_t indic; lv_style_copy(&indic, theme.style.slider.indic); - indic.body.radius = LV_RADIUS_CIRCLE; - indic.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); - indic.body.grad_color = indic.body.main_color; - indic.body.border.width = theme.style.slider.bg->body.border.width; - indic.body.border.color = theme.style.slider.bg->body.border.color; - indic.body.border.opa = theme.style.slider.bg->body.border.opa; - indic.body.padding.left = 0; - indic.body.padding.right = 0; - indic.body.padding.top = 0; + indic.body.radius = LV_RADIUS_CIRCLE; + indic.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); + indic.body.grad_color = indic.body.main_color; + indic.body.border.width = theme.style.slider.bg->body.border.width; + indic.body.border.color = theme.style.slider.bg->body.border.color; + indic.body.border.opa = theme.style.slider.bg->body.border.opa; + indic.body.padding.left = 0; + indic.body.padding.right = 0; + indic.body.padding.top = 0; indic.body.padding.bottom = 0; - theme.style.sw.bg = theme.style.slider.bg; - theme.style.sw.indic = &indic; + theme.style.sw.bg = theme.style.slider.bg; + theme.style.sw.indic = &indic; theme.style.sw.knob_off = theme.style.slider.knob; - theme.style.sw.knob_on = theme.style.slider.knob; + theme.style.sw.knob_on = theme.style.slider.knob; #endif } - static void lmeter_init(void) { #if LV_USE_LMETER != 0 static lv_style_t lmeter; lv_style_copy(&lmeter, &def); - lmeter.line.color = lv_color_hex3(0xddd); - lmeter.line.width = 2; - lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); - lmeter.body.grad_color = lmeter.body.main_color; - lmeter.body.padding.left = LV_DPI / 8; + lmeter.line.color = lv_color_hex3(0xddd); + lmeter.line.width = 2; + lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); + lmeter.body.grad_color = lmeter.body.main_color; + lmeter.body.padding.left = LV_DPI / 8; lmeter.body.padding.right = LV_DPI / 8; theme.style.lmeter = &lmeter; @@ -293,13 +288,13 @@ static void gauge_init(void) static lv_style_t gauge; lv_style_copy(&gauge, &def); - gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70); - gauge.line.width = 1; - gauge.body.main_color = lv_color_hex3(0x999); - gauge.body.grad_color = gauge.body.main_color; - gauge.body.padding.left = LV_DPI / 16; + gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70); + gauge.line.width = 1; + gauge.body.main_color = lv_color_hex3(0x999); + gauge.body.grad_color = gauge.body.main_color; + gauge.body.padding.left = LV_DPI / 16; gauge.body.padding.right = LV_DPI / 16; - gauge.body.border.color = lv_color_hex3(0x666); /*Needle middle color*/ + gauge.body.border.color = lv_color_hex3(0x666); /*Needle middle color*/ theme.style.gauge = &gauge; #endif @@ -311,8 +306,8 @@ static void arc_init(void) static lv_style_t arc; lv_style_copy(&arc, &def); - arc.line.width = 10; - arc.line.color = lv_color_hsv_to_rgb(_hue, 40, 90); + arc.line.width = 10; + arc.line.color = lv_color_hsv_to_rgb(_hue, 40, 90); arc.line.rounded = 1; /*For preloader*/ @@ -350,18 +345,18 @@ static void calendar_init(void) static lv_style_t today_box; lv_style_copy(&today_box, &def); - today_box.body.opa = LV_OPA_TRANSP; - today_box.body.border.color = theme.style.panel->body.border.color; - today_box.body.padding.top = LV_DPI / 20; + today_box.body.opa = LV_OPA_TRANSP; + today_box.body.border.color = theme.style.panel->body.border.color; + today_box.body.padding.top = LV_DPI / 20; today_box.body.padding.bottom = LV_DPI / 20; - today_box.body.radius = LV_RADIUS_CIRCLE; + today_box.body.radius = LV_RADIUS_CIRCLE; - theme.style.calendar.bg = theme.style.panel; - theme.style.calendar.header = &lv_style_transp; - theme.style.calendar.inactive_days = &ina_days; + theme.style.calendar.bg = theme.style.panel; + theme.style.calendar.header = &lv_style_transp; + theme.style.calendar.inactive_days = &ina_days; theme.style.calendar.highlighted_days = &high_days; - theme.style.calendar.week_box = &lv_style_transp_fit; - theme.style.calendar.today_box = &today_box; + theme.style.calendar.week_box = &lv_style_transp_fit; + theme.style.calendar.today_box = &today_box; #endif } @@ -370,76 +365,71 @@ static void cb_init(void) #if LV_USE_CB != 0 static lv_style_t rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&rel, &def); - rel.body.radius = LV_DPI / 20; + rel.body.radius = LV_DPI / 20; rel.body.shadow.width = 0; rel.body.border.width = 3; - rel.body.border.opa = LV_OPA_COVER; + rel.body.border.opa = LV_OPA_COVER; rel.body.border.color = lv_color_hsv_to_rgb(_hue, 35, 80); - rel.body.main_color = lv_color_hex3(0xfff); - rel.body.grad_color = rel.body.main_color; - + rel.body.main_color = lv_color_hex3(0xfff); + rel.body.grad_color = rel.body.main_color; lv_style_copy(&pr, &rel); pr.body.border.color = lv_color_hsv_to_rgb(_hue, 35, 70); - lv_style_copy(&tgl_rel, &rel); tgl_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 45, 80); - tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90); - tgl_rel.body.grad_color = tgl_rel.body.main_color; + tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 90); + tgl_rel.body.grad_color = tgl_rel.body.main_color; lv_style_copy(&tgl_pr, &rel); tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 45, 70); - tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); - tgl_pr.body.grad_color = tgl_pr.body.main_color; - + tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 40, 80); + tgl_pr.body.grad_color = tgl_pr.body.main_color; lv_style_copy(&ina, &rel); ina.body.border.color = lv_color_hex3(0xaaa); - - theme.style.cb.bg = &lv_style_transp; - theme.style.cb.box.rel = &rel; - theme.style.cb.box.pr = ≺ + theme.style.cb.bg = &lv_style_transp; + theme.style.cb.box.rel = &rel; + theme.style.cb.box.pr = ≺ theme.style.cb.box.tgl_rel = &tgl_rel; - theme.style.cb.box.tgl_pr = &tgl_pr; - theme.style.cb.box.ina = &ina; + theme.style.cb.box.tgl_pr = &tgl_pr; + theme.style.cb.box.ina = &ina; #endif } - static void btnm_init(void) { #if LV_USE_BTNM static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &lv_style_transp); - bg.glass = 0; - bg.body.padding.left = 0; - bg.body.padding.right = 0; - bg.body.padding.top = 0; + bg.glass = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; bg.body.padding.bottom = 0; - bg.body.padding.inner = LV_DPI / 15; - bg.text.font = _font; + bg.body.padding.inner = LV_DPI / 15; + bg.text.font = _font; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_TRANSP; + rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; lv_style_copy(&pr, &def); - pr.body.opa = LV_OPA_TRANSP; - pr.body.radius = LV_DPI / 1; + pr.body.opa = LV_OPA_TRANSP; + pr.body.radius = LV_DPI / 1; pr.body.border.width = 2; pr.body.border.color = lv_color_hsv_to_rgb(_hue, 40, 60); - pr.body.border.opa = LV_OPA_COVER; - pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60); + pr.body.border.opa = LV_OPA_COVER; + pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 60); lv_style_copy(&tgl_rel, &pr); - tgl_rel.body.opa = LV_OPA_COVER; - tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); - tgl_rel.body.grad_color = tgl_rel.body.main_color; + tgl_rel.body.opa = LV_OPA_COVER; + tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 15, 95); + tgl_rel.body.grad_color = tgl_rel.body.main_color; tgl_rel.body.border.width = 0; - tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 40); + tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 60, 40); lv_style_copy(&tgl_pr, &tgl_rel); tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 70); @@ -448,14 +438,15 @@ static void btnm_init(void) lv_style_copy(&ina, &pr); ina.body.main_color = lv_color_hex3(0x888); ina.body.grad_color = tgl_pr.body.main_color; - ina.text.color = lv_color_hex3(0x888);; + ina.text.color = lv_color_hex3(0x888); + ; - theme.style.btnm.bg = &bg; - theme.style.btnm.btn.rel = &rel; - theme.style.btnm.btn.pr = ≺ + theme.style.btnm.bg = &bg; + theme.style.btnm.btn.rel = &rel; + theme.style.btnm.btn.pr = ≺ theme.style.btnm.btn.tgl_rel = &tgl_rel; - theme.style.btnm.btn.tgl_pr = &tgl_pr; - theme.style.btnm.btn.ina = &ina; + theme.style.btnm.btn.tgl_pr = &tgl_pr; + theme.style.btnm.btn.ina = &ina; #endif } @@ -464,57 +455,55 @@ static void kb_init(void) #if LV_USE_KB static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, &def); - bg.body.main_color = lv_color_hex3(0x666); - bg.body.grad_color = bg.body.main_color; - bg.body.padding.left = 0; - bg.body.padding.right = 0; - bg.body.padding.top = 0; + bg.body.main_color = lv_color_hex3(0x666); + bg.body.grad_color = bg.body.main_color; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; bg.body.padding.bottom = 0; - bg.body.padding.inner = 0; - bg.body.radius = 0; - bg.body.border.width = 0; + bg.body.padding.inner = 0; + bg.body.radius = 0; + bg.body.border.width = 0; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_COVER; - rel.body.radius = 0; + rel.body.opa = LV_OPA_COVER; + rel.body.radius = 0; rel.body.border.width = 1; rel.body.border.color = lv_color_hex3(0x888); - rel.body.border.opa = LV_OPA_COVER; - rel.text.color = LV_COLOR_WHITE; + rel.body.border.opa = LV_OPA_COVER; + rel.text.color = LV_COLOR_WHITE; lv_style_copy(&pr, &def); - pr.body.main_color = lv_color_hex3(0xeee); - pr.body.grad_color = pr.body.main_color; + pr.body.main_color = lv_color_hex3(0xeee); + pr.body.grad_color = pr.body.main_color; pr.body.border.color = lv_color_hex3(0x888); pr.body.border.width = 1; - pr.body.border.opa = LV_OPA_COVER; - pr.body.radius = 0; - pr.text.color = lv_color_hex3(0x666); + pr.body.border.opa = LV_OPA_COVER; + pr.body.radius = 0; + pr.text.color = lv_color_hex3(0x666); lv_style_copy(&tgl_rel, &pr); tgl_rel.body.main_color = lv_color_hex3(0x999); tgl_rel.body.grad_color = tgl_rel.body.main_color; - tgl_rel.text.color = LV_COLOR_WHITE; - + tgl_rel.text.color = LV_COLOR_WHITE; lv_style_copy(&tgl_pr, &pr); tgl_pr.body.main_color = lv_color_hex3(0xbbb); tgl_pr.body.grad_color = tgl_pr.body.main_color; - tgl_pr.text.color = lv_color_hex3(0xddd); + tgl_pr.text.color = lv_color_hex3(0xddd); lv_style_copy(&ina, &pr); ina.body.main_color = lv_color_hex3(0x777); ina.body.grad_color = ina.body.main_color; - ina.text.color = lv_color_hex3(0xbbb); + ina.text.color = lv_color_hex3(0xbbb); - theme.style.kb.bg = &bg; - theme.style.kb.btn.rel = &rel; - theme.style.kb.btn.pr = ≺ + theme.style.kb.bg = &bg; + theme.style.kb.btn.rel = &rel; + theme.style.kb.btn.pr = ≺ theme.style.kb.btn.tgl_rel = &tgl_rel; - theme.style.kb.btn.tgl_pr = &tgl_pr; - theme.style.kb.btn.ina = &ina; + theme.style.kb.btn.tgl_pr = &tgl_pr; + theme.style.kb.btn.ina = &ina; #endif - } static void mbox_init(void) @@ -524,31 +513,30 @@ static void mbox_init(void) lv_style_copy(&bg, theme.style.panel); bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95); bg.body.grad_color = bg.body.main_color; - bg.text.color = lv_color_hsv_to_rgb(_hue, 40, 25); + bg.text.color = lv_color_hsv_to_rgb(_hue, 40, 25); lv_style_copy(&rel, &def); - rel.body.main_color = lv_color_hsv_to_rgb(_hue, 25, 85); - rel.body.grad_color = rel.body.main_color; - rel.body.radius = LV_RADIUS_CIRCLE; - rel.body.border.width = 2; - rel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 70); - rel.body.padding.left = LV_DPI / 4; - rel.body.padding.right = LV_DPI / 4; - rel.body.padding.top = LV_DPI / 8; + rel.body.main_color = lv_color_hsv_to_rgb(_hue, 25, 85); + rel.body.grad_color = rel.body.main_color; + rel.body.radius = LV_RADIUS_CIRCLE; + rel.body.border.width = 2; + rel.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 70); + rel.body.padding.left = LV_DPI / 4; + rel.body.padding.right = LV_DPI / 4; + rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.text.color = bg.text.color; + rel.text.color = bg.text.color; lv_style_copy(&pr, &rel); pr.body.border.color = lv_color_hsv_to_rgb(_hue, 30, 90); - pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); - pr.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 85); - pr.body.grad_color = pr.body.main_color; - + pr.text.color = lv_color_hsv_to_rgb(_hue, 40, 40); + pr.body.main_color = lv_color_hsv_to_rgb(_hue, 20, 85); + pr.body.grad_color = pr.body.main_color; - theme.style.mbox.bg = &bg; - theme.style.mbox.btn.bg = &lv_style_transp; + theme.style.mbox.bg = &bg; + theme.style.mbox.btn.bg = &lv_style_transp; theme.style.mbox.btn.rel = &rel; - theme.style.mbox.btn.pr = ≺ + theme.style.mbox.btn.pr = ≺ #endif } @@ -556,10 +544,9 @@ static void page_init(void) { #if LV_USE_PAGE - - theme.style.page.bg = theme.style.panel; + theme.style.page.bg = theme.style.panel; theme.style.page.scrl = &lv_style_transp; - theme.style.page.sb = &sb; + theme.style.page.sb = &sb; #endif } @@ -568,25 +555,24 @@ static void ta_init(void) #if LV_USE_TA static lv_style_t oneline; lv_style_copy(&oneline, theme.style.panel); - oneline.body.radius = LV_RADIUS_CIRCLE; - oneline.body.padding.top = LV_DPI / 10; + oneline.body.radius = LV_RADIUS_CIRCLE; + oneline.body.padding.top = LV_DPI / 10; oneline.body.padding.bottom = LV_DPI / 10; - oneline.body.shadow.width = 0; + oneline.body.shadow.width = 0; - - theme.style.ta.area = theme.style.panel; + theme.style.ta.area = theme.style.panel; theme.style.ta.oneline = &oneline; - theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ - theme.style.ta.sb = &def; + theme.style.ta.cursor = NULL; /*Let library to calculate the cursor's style*/ + theme.style.ta.sb = &def; #endif } static void spinbox_init(void) { #if LV_USE_SPINBOX - theme.style.spinbox.bg= theme.style.panel; + theme.style.spinbox.bg = theme.style.panel; theme.style.spinbox.cursor = theme.style.ta.cursor; - theme.style.spinbox.sb = theme.style.ta.sb; + theme.style.spinbox.sb = theme.style.ta.sb; #endif } @@ -596,44 +582,44 @@ static void list_init(void) static lv_style_t bg, rel, pr, tgl_rel, tgl_pr, ina; lv_style_copy(&bg, theme.style.panel); - bg.body.padding.left = 0; - bg.body.padding.right = 0; - bg.body.padding.top = 0; + bg.body.padding.left = 0; + bg.body.padding.right = 0; + bg.body.padding.top = 0; bg.body.padding.bottom = 0; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_TRANSP; - rel.body.border.width = 0; - rel.body.padding.left = LV_DPI / 8; - rel.body.padding.right = LV_DPI / 8; - rel.body.padding.top = LV_DPI / 8; + rel.body.opa = LV_OPA_TRANSP; + rel.body.border.width = 0; + rel.body.padding.left = LV_DPI / 8; + rel.body.padding.right = LV_DPI / 8; + rel.body.padding.top = LV_DPI / 8; rel.body.padding.bottom = LV_DPI / 8; - rel.text.color = lv_color_hex3(0x666); - rel.image.color = lv_color_hex3(0x666); + rel.text.color = lv_color_hex3(0x666); + rel.image.color = lv_color_hex3(0x666); lv_style_copy(&pr, &rel); - pr.text.color = theme.style.btn.pr->text.color; + pr.text.color = theme.style.btn.pr->text.color; pr.image.color = theme.style.btn.pr->image.color; lv_style_copy(&tgl_rel, &rel); tgl_rel.text.color = lv_color_hsv_to_rgb(_hue, 50, 90); lv_style_copy(&tgl_pr, &rel); - tgl_pr.text.color = theme.style.btn.tgl_pr->text.color; + tgl_pr.text.color = theme.style.btn.tgl_pr->text.color; tgl_pr.image.color = theme.style.btn.tgl_pr->image.color; lv_style_copy(&ina, &rel); - ina.text.color = theme.style.btn.ina->text.color; + ina.text.color = theme.style.btn.ina->text.color; ina.image.color = theme.style.btn.ina->image.color; - theme.style.list.sb = &sb; - theme.style.list.bg = &bg; - theme.style.list.scrl = &lv_style_transp_tight; - theme.style.list.btn.rel = &rel; - theme.style.list.btn.pr = ≺ + theme.style.list.sb = &sb; + theme.style.list.bg = &bg; + theme.style.list.scrl = &lv_style_transp_tight; + theme.style.list.btn.rel = &rel; + theme.style.list.btn.pr = ≺ theme.style.list.btn.tgl_rel = &tgl_rel; - theme.style.list.btn.tgl_pr = &tgl_pr; - theme.style.list.btn.ina = &ina; + theme.style.list.btn.tgl_pr = &tgl_pr; + theme.style.list.btn.ina = &ina; #endif } @@ -642,21 +628,21 @@ static void ddlist_init(void) #if LV_USE_DDLIST != 0 static lv_style_t bg, sel; lv_style_copy(&bg, theme.style.panel); - bg.text.line_space = LV_DPI / 8; - bg.body.padding.left = LV_DPI / 6; - bg.body.padding.right = LV_DPI / 6; - bg.body.padding.top = LV_DPI / 8; + bg.text.line_space = LV_DPI / 8; + bg.body.padding.left = LV_DPI / 6; + bg.body.padding.right = LV_DPI / 6; + bg.body.padding.top = LV_DPI / 8; bg.body.padding.bottom = LV_DPI / 8; - bg.text.color = lv_color_hex3(0x666); + bg.text.color = lv_color_hex3(0x666); lv_style_copy(&sel, &def); - sel.body.opa = LV_OPA_TRANSP; + sel.body.opa = LV_OPA_TRANSP; sel.body.border.width = 0; - sel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); + sel.text.color = lv_color_hsv_to_rgb(_hue, 50, 80); - theme.style.ddlist.bg = &bg; + theme.style.ddlist.bg = &bg; theme.style.ddlist.sel = &sel; - theme.style.ddlist.sb = &def; + theme.style.ddlist.sb = &def; #endif } @@ -666,15 +652,15 @@ static void roller_init(void) static lv_style_t bg, sel; lv_style_copy(&bg, &def); bg.body.border.width = 0; - bg.body.opa = LV_OPA_TRANSP; - bg.text.line_space = LV_DPI / 6; - bg.text.color = lv_color_hex3(0x999); + bg.body.opa = LV_OPA_TRANSP; + bg.text.line_space = LV_DPI / 6; + bg.text.color = lv_color_hex3(0x999); lv_style_copy(&sel, theme.style.panel); sel.body.radius = LV_RADIUS_CIRCLE; - sel.body.opa = LV_OPA_TRANSP; + sel.body.opa = LV_OPA_TRANSP; - theme.style.roller.bg = &bg; + theme.style.roller.bg = &bg; theme.style.roller.sel = &sel; #endif } @@ -685,23 +671,22 @@ static void tabview_init(void) static lv_style_t btn_bg, indic, rel, pr, tgl_rel, tgl_pr; lv_style_copy(&btn_bg, &def); - btn_bg.body.opa = LV_OPA_TRANSP; + btn_bg.body.opa = LV_OPA_TRANSP; btn_bg.body.border.width = 2; - btn_bg.body.border.part = LV_BORDER_BOTTOM; + btn_bg.body.border.part = LV_BORDER_BOTTOM; btn_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90); lv_style_copy(&indic, &def); indic.body.padding.inner = LV_DPI / 16; - indic.body.border.width = 0; - indic.body.radius = LV_RADIUS_CIRCLE; - indic.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 80); - indic.body.grad_color = indic.body.main_color; + indic.body.border.width = 0; + indic.body.radius = LV_RADIUS_CIRCLE; + indic.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 80); + indic.body.grad_color = indic.body.main_color; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_TRANSP; + rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; - rel.text.color = lv_color_hex3(0x999); - + rel.text.color = lv_color_hex3(0x999); lv_style_copy(&pr, &rel); pr.text.color = lv_color_hex3(0x777); @@ -712,22 +697,22 @@ static void tabview_init(void) lv_style_copy(&tgl_pr, &rel); tgl_pr.text.color = lv_color_hsv_to_rgb(_hue, 50, 70); - theme.style.tabview.bg = theme.style.bg; - theme.style.tabview.indic = &indic; - theme.style.tabview.btn.bg = &btn_bg; - theme.style.tabview.btn.rel = &rel; - theme.style.tabview.btn.pr = ≺ + theme.style.tabview.bg = theme.style.bg; + theme.style.tabview.indic = &indic; + theme.style.tabview.btn.bg = &btn_bg; + theme.style.tabview.btn.rel = &rel; + theme.style.tabview.btn.pr = ≺ theme.style.tabview.btn.tgl_rel = &tgl_rel; - theme.style.tabview.btn.tgl_pr = &tgl_pr; + theme.style.tabview.btn.tgl_pr = &tgl_pr; #endif } static void tileview_init(void) { #if LV_USE_TILEVIEW != 0 - theme.style.tileview.bg = &lv_style_transp_tight; + theme.style.tileview.bg = &lv_style_transp_tight; theme.style.tileview.scrl = &lv_style_transp_tight; - theme.style.tileview.sb = theme.style.page.sb; + theme.style.tileview.sb = theme.style.page.sb; #endif } @@ -736,15 +721,15 @@ static void table_init(void) #if LV_USE_TABLE != 0 static lv_style_t cell; lv_style_copy(&cell, theme.style.panel); - cell.body.radius = 0; - cell.body.border.width = 1; - cell.body.shadow.width = 0; - cell.body.padding.left = LV_DPI / 12; - cell.body.padding.right = LV_DPI / 12; - cell.body.padding.top = LV_DPI / 12; + cell.body.radius = 0; + cell.body.border.width = 1; + cell.body.shadow.width = 0; + cell.body.padding.left = LV_DPI / 12; + cell.body.padding.right = LV_DPI / 12; + cell.body.padding.top = LV_DPI / 12; cell.body.padding.bottom = LV_DPI / 12; - theme.style.table.bg = &lv_style_transp_tight; + theme.style.table.bg = &lv_style_transp_tight; theme.style.table.cell = &cell; #endif } @@ -755,33 +740,33 @@ static void win_init(void) static lv_style_t header, rel, pr; lv_style_copy(&header, &def); - header.body.opa = LV_OPA_TRANSP; - header.body.border.width = 2; - header.body.border.part = LV_BORDER_BOTTOM; - header.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90); - header.text.color = lv_color_hex3(0x666); - header.image.color = lv_color_hex3(0x666); - header.body.padding.top = 0; + header.body.opa = LV_OPA_TRANSP; + header.body.border.width = 2; + header.body.border.part = LV_BORDER_BOTTOM; + header.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 90); + header.text.color = lv_color_hex3(0x666); + header.image.color = lv_color_hex3(0x666); + header.body.padding.top = 0; header.body.padding.bottom = 0; - header.body.padding.inner = 0; + header.body.padding.inner = 0; lv_style_copy(&rel, &def); - rel.body.opa = LV_OPA_TRANSP; + rel.body.opa = LV_OPA_TRANSP; rel.body.border.width = 0; - rel.text.color = lv_color_hex3(0x666); - rel.image.color = lv_color_hex3(0x666); + rel.text.color = lv_color_hex3(0x666); + rel.image.color = lv_color_hex3(0x666); lv_style_copy(&pr, &rel); - pr.text.color = lv_color_hex3(0x333); + pr.text.color = lv_color_hex3(0x333); pr.image.color = lv_color_hex3(0x333); - theme.style.win.bg = theme.style.panel; - theme.style.win.sb = &sb; - theme.style.win.header = &header; - theme.style.win.content.bg = &lv_style_transp; + theme.style.win.bg = theme.style.panel; + theme.style.win.sb = &sb; + theme.style.win.header = &header; + theme.style.win.content.bg = &lv_style_transp; theme.style.win.content.scrl = &lv_style_transp; - theme.style.win.btn.rel = &rel; - theme.style.win.btn.pr = ≺ + theme.style.win.btn.rel = &rel; + theme.style.win.btn.pr = ≺ #endif } @@ -789,16 +774,17 @@ static void win_init(void) static void style_mod(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50); /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 2; #endif @@ -806,23 +792,24 @@ static void style_mod(lv_group_t * group, lv_style_t * style) static void style_mod_edit(lv_group_t * group, lv_style_t * style) { - (void) group; /*Unused*/ + (void)group; /*Unused*/ #if LV_COLOR_DEPTH != 1 /*Make the style to be a little bit orange*/ - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if (style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) + style->body.border.width = LV_DPI / 20; - style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); - style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); #else - style->body.border.opa = LV_OPA_COVER; + style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; style->body.border.width = 3; #endif @@ -834,8 +821,6 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) * GLOBAL FUNCTIONS **********************/ - - /** * Initialize the zen theme * @param hue [0..360] hue value from HSV color space to define the theme's base color @@ -846,12 +831,12 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) { if(font == NULL) font = LV_FONT_DEFAULT; - _hue = hue; + _hue = hue; _font = font; /*For backward compatibility initialize all theme elements with a default style */ uint16_t i; - lv_style_t ** style_p = (lv_style_t **) &theme.style; + lv_style_t ** style_p = (lv_style_t **)&theme.style; for(i = 0; i < LV_THEME_STYLE_COUNT; i++) { *style_p = &def; style_p++; @@ -889,7 +874,7 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; + theme.group.style_mod = style_mod; theme.group.style_mod_edit = style_mod_edit; #endif @@ -910,4 +895,3 @@ lv_theme_t * lv_theme_get_zen(void) **********************/ #endif - diff --git a/src/lv_themes/lv_theme_zen.h b/src/lv_themes/lv_theme_zen.h index 181411fd0bb0..4a497fe3a24b 100644 --- a/src/lv_themes/lv_theme_zen.h +++ b/src/lv_themes/lv_theme_zen.h @@ -39,7 +39,7 @@ extern "C" { * @param font pointer to a font (NULL to use the default) * @return pointer to the initialized theme */ -lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t *font); +lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font); /** * Get a pointer to the theme From 66585f508f24f6c927a892dbee4c8d4a9eb6e509 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 07:16:24 +0200 Subject: [PATCH 239/590] remove astyle files becasue they are replaced with clang-format --- docs/astyle_c | 1 - docs/astyle_h | 1 - 2 files changed, 2 deletions(-) delete mode 100644 docs/astyle_c delete mode 100644 docs/astyle_h diff --git a/docs/astyle_c b/docs/astyle_c deleted file mode 100644 index 9b9d7f3c9524..000000000000 --- a/docs/astyle_c +++ /dev/null @@ -1 +0,0 @@ ---style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent= diff --git a/docs/astyle_h b/docs/astyle_h deleted file mode 100644 index d9c76337ceee..000000000000 --- a/docs/astyle_h +++ /dev/null @@ -1 +0,0 @@ ---convert-tabs --indent=spaces=4 From d4bfeb2bedcd87779b073b8bbea6cfaa68d467b4 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Wed, 3 Apr 2019 22:36:10 -0700 Subject: [PATCH 240/590] lv_indev.c have LV_GROUP_KEY_ESC send an LV_EVENT_CANCEL signal --- src/lv_core/lv_indev.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 551a79c02c0c..1bcc831e120a 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -415,13 +415,20 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Simulate a press on the object if ENTER was pressed*/ if(data->key == LV_GROUP_KEY_ENTER) { + /*Send the ENTER as a normal KEY*/ + lv_group_send_data(g, LV_GROUP_KEY_ENTER); + focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ + } + else if(data->key == LV_GROUP_KEY_ESC) { + /*Send the ESC as a normal KEY*/ + lv_group_send_data(g, LV_GROUP_KEY_ESC); - /*Send the ENTER as a normal KEY*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); + lv_event_send(focused, LV_EVENT_CANCEL, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on NEXT*/ else if(data->key == LV_GROUP_KEY_NEXT) { @@ -435,7 +442,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_focus_prev(g); if(i->proc.reset_query) return; /*The object might be deleted*/ } - /*Just send other keys to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ + /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/ else { lv_group_send_data(g, data->key); } From bc8cd2068ecf22f1ae4ae6c17c4683c19aed2217 Mon Sep 17 00:00:00 2001 From: melnse Date: Thu, 4 Apr 2019 14:14:40 +0300 Subject: [PATCH 241/590] Realized alternative version of extended clickable area: "USE_LV_EXTENDED_CLICKABLE_AREA_TINY". It doesn't store extended coordinates, but calculates them on the fly. Also ext_paddings changed from lv_area to two uint8_t in both versions. --- src/lv_core/lv_indev.c | 2 ++ src/lv_core/lv_obj.c | 61 ++++++++++++++++++++++++++---------------- src/lv_core/lv_obj.h | 25 ++++++++++++----- src/lv_misc/lv_area.c | 22 +++++++++++++++ src/lv_misc/lv_area.h | 12 +++++++++ 5 files changed, 92 insertions(+), 30 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index c45fab75cecd..627d35dece26 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -978,6 +978,8 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) /*Check its children too*/ #if USE_LV_EXTENDED_CLICK_AREA if(lv_area_is_point_on(&obj->ext_coords, &proc->act_point)) { +#elif USE_LV_EXTENDED_CLICK_AREA_TINY + if(lv_area_ext_is_point_on(&obj->ext_coords, &proc->act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { #else if(lv_area_is_point_on(&obj->coords, &proc->act_point)) { #endif diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index bbd7697005e6..012094bc3539 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -45,7 +45,7 @@ static void delete_children(lv_obj_t * obj); static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); #if USE_LV_EXTENDED_CLICK_AREA -static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, lv_area_t *paddings); +static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, uint8_t hor_pad, uint8_t ver_pad); #endif /********************** @@ -152,11 +152,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if USE_LV_EXTENDED_CLICK_AREA lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); - new_obj->ext_paddings.x1 = 0; - new_obj->ext_paddings.x2 = 0; - new_obj->ext_paddings.y1 = 0; - new_obj->ext_paddings.y2 = 0; #endif +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY + new_obj->hor_pad = 0; + new_obj->ver_pad = 0; +#endif + /*Init realign*/ #if LV_OBJ_REALIGN new_obj->realign.align = LV_ALIGN_CENTER; @@ -230,10 +231,10 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if USE_LV_EXTENDED_CLICK_AREA lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); - new_obj->ext_paddings.x1 = 0; - new_obj->ext_paddings.x2 = 0; - new_obj->ext_paddings.y1 = 0; - new_obj->ext_paddings.y2 = 0; +#endif +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY + new_obj->hor_pad = 0; + new_obj->ver_pad = 0; #endif /*Init realign*/ #if LV_OBJ_REALIGN @@ -292,7 +293,10 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if USE_LV_EXTENDED_CLICK_AREA lv_area_copy(&new_obj->ext_coords, ©->ext_coords); - lv_area_copy(&new_obj->ext_paddings, ©->ext_paddings); +#endif +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY + new_obj->hor_pad = copy->hor_pad; + new_obj->ver_pad = copy->ver_pad; #endif /*Set free data*/ @@ -582,7 +586,7 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) obj->coords.y2 += diff.y; #if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); + update_ext_coords(&(obj->coords), &(obj->ext_coords), obj->hor_pad, obj->ver_pad); #endif refresh_children_position(obj, diff.x, diff.y); @@ -647,7 +651,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) obj->coords.y2 = obj->coords.y1 + h - 1; #if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); + update_ext_coords(&(obj->coords), &(obj->ext_coords), obj->hor_pad, obj->ver_pad); #endif /*Send a signal to the object with its new coordinates*/ @@ -1619,17 +1623,28 @@ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) return lv_obj_get_width(obj) - style->body.padding.top - style->body.padding.bottom; } -#if USE_LV_EXTENDED_CLICK_AREA +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY /** - * Copy the extended clickable area size of an object to an area + * Get the horizontal padding of extended clickable area * @param obj pointer to an object - * @param cords_p pointer to an area to store the size + * @return the horizontal padding */ -void lv_obj_get_ext_paddings(const lv_obj_t * obj, lv_area_t * cords_p) +uint8_t lv_obj_get_ext_hor_padding(const lv_obj_t * obj) { - lv_area_copy(cords_p, &obj->ext_paddings); + return obj->ext_padding_hor; } +/** + * Get the vertical padding of extended clickable area + * @param obj pointer to an object + * @return the vertical padding + */ +uint8_t lv_obj_get_ext_ver_padding(const lv_obj_t * obj) +{ + return obj->ext_padding_ver; +} +#endif + /** * Get the extended size attribute of an object * @param obj pointer to an object @@ -2031,7 +2046,7 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor i->coords.y2 += y_diff; #if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(i->coords), &(i->ext_coords), &(i->ext_paddings)); + update_ext_coords(&(i->coords), &(i->ext_coords), i->hor_pad, i->ver_pad); #endif refresh_children_position(i, x_diff, y_diff); } @@ -2151,11 +2166,11 @@ static void delete_children(lv_obj_t * obj) * @param ext_coords extended coordinates, which will be updated * @param paddings paddings of extended clickable area */ -static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, lv_area_t *paddings) +static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, uint8_t hor_pad, uint8_t ver_pad) { - ext_coords->x1 = paddings->x1 > coords->x1 ? 0 : coords->x1 - paddings->x1; - ext_coords->x2 = coords->x2 + paddings->x2; - ext_coords->y1 = paddings->y1 > coords->y1 ? 0 : coords->y1 - paddings->y1; - ext_coords->y2 = coords->y2 + paddings->y2; + ext_coords->x1 = hor_pad > coords->x1 ? 0 : coords->x1 - hor_pad; + ext_coords->x2 = coords->x2 + hor_pad; + ext_coords->y1 = ver_pad > coords->y1 ? 0 : coords->y1 - ver_pad; + ext_coords->y2 = coords->y2 + ver_pad; } #endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2f96c919a842..958a58db2779 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -178,7 +178,10 @@ typedef struct _lv_obj_t lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ #if USE_LV_EXTENDED_CLICK_AREA lv_area_t ext_coords; - lv_area_t ext_paddings; +#endif +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY + uint8_t ext_padding_hor; + uint8_t ext_padding_ver; #endif lv_event_cb_t event_cb; @@ -341,14 +344,14 @@ void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y); */ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); -#if USE_LV_EXTENDED_CLICK_AREA +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY /** * Set the size of an extended clickable area * @param obj pointer to an object * @param w extended width to both sides * @param h extended height to both sides */ -void lv_obj_set_ext_paddings(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); +void lv_obj_set_ext_paddings(lv_obj_t * obj, uint8_t w, uint8_t h); #endif /** @@ -687,13 +690,21 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj); */ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); -#if USE_LV_EXTENDED_CLICK_AREA +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY +/** + * Get the horizontal padding of extended clickable area + * @param obj pointer to an object + * @return the horizontal padding + */ +uint8_t lv_obj_get_ext_hor_padding(const lv_obj_t * obj); + /** - * Copy the extended clickable area size of an object to an area + * Get the vertical padding of extended clickable area * @param obj pointer to an object - * @param cords_p pointer to an area to store the size + * @return the vertical padding */ -void lv_obj_get_ext_paddings(const lv_obj_t * obj, lv_area_t * cords_p); +uint8_t lv_obj_get_ext_ver_padding(const lv_obj_t * obj); + #endif /** diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index f340690a4701..60051669c27b 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -156,6 +156,28 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) return is_on; } +#if USE_LV_EXTENDED_CLICK_AREA_TINY +/** + * Check if a point is on an area + * @param a_p pointer to an area + * @param p_p pointer to a point + * @param ext_hor extended horizontal padding + * @param ext_ver extended horizontal padding + * @return false:the point is out of the area + */ +bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, unit8_t ext_hor, unit8_t ext_ver) +{ + bool is_on = false; + + if(( (p_p->x + ext_hor) >= a_p->x1 && p_p->x <= (a_p->x2 + ext_hor) ) && + ( (p_p->y + ext_ver) >= a_p->y1 && p_p->y <= (a_p->y2 + ext_ver)) ) { + is_on = true; + } + + return is_on; +} +#endif + /** * Check if two area has common parts * @param a1_p pointer to an area. diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index fc8b7dec849e..47674bad10a4 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -141,6 +141,18 @@ void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * */ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p); +#if USE_LV_EXTENDED_CLICK_AREA_TINY +/** + * Check if a point is on an area + * @param a_p pointer to an area + * @param p_p pointer to a point + * @param ext_hor extended horizontal padding + * @param ext_ver extended horizontal padding + * @return false:the point is out of the area + */ +bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, unit8_t ext_hor, unit8_t ext_ver); +#endif + /** * Check if two area has common parts * @param a1_p pointer to an area. From 3f2b6bb685344051563924d13264f131fb7a4e46 Mon Sep 17 00:00:00 2001 From: melnse Date: Thu, 4 Apr 2019 14:34:29 +0300 Subject: [PATCH 242/590] Added defines of extended clickable area to conf template and to conf checker. --- lv_conf_template.h | 4 ++++ src/lv_conf_checker.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/lv_conf_template.h b/lv_conf_template.h index 3227bb42c4a7..0273f4a7bf38 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -342,6 +342,10 @@ typedef void * lv_obj_user_data_t; /*Declare the type of the user data /*Switch (dependencies: lv_slider)*/ #define LV_USE_SW 1 +/* Extended clickable area */ +#define USE_LV_EXTENDED_CLICK_AREA 0 /* Enables obj extension to realize extended clickable area with additional extended coords (1: enabled) */ +#define USE_LV_EXTENDED_CLICK_AREA_TINY 0 /* Enables obj extension to realize extended clickable area with calculation of the fly (1: enabled) */ + /************************* * Non-user section *************************/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 13b9cc252b6d..6ffe0edefdd3 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -584,6 +584,15 @@ #define LV_USE_SW 1 #endif +/*Extended clickable area */ +#ifndef USE_LV_EXTENDED_CLICK_AREA +#define USE_LV_EXTENDED_CLICK_AREA 0 +#endif + +#ifndef USE_LV_EXTENDED_CLICK_AREA_TINY +#define USE_LV_EXTENDED_CLICK_AREA_TINY 0 +#endif + /************************* * Non-user section *************************/ From 1eca54616a3382e2a0d71391980f016a08c760d6 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 16:44:16 +0200 Subject: [PATCH 243/590] fixes after clang formatting --- src/lv_core/lv_indev.c | 15 ++-- src/lv_draw/lv_draw_basic.c | 5 +- src/lv_draw/lv_draw_rect.c | 17 ++--- src/lv_misc/lv_symbol_def.h | 132 +++++++++++++++++------------------- src/lv_misc/lv_txt.c | 21 +++--- src/lv_objx/lv_label.c | 5 +- src/lv_objx/lv_list.c | 18 ++--- src/lv_objx/lv_page.c | 6 +- 8 files changed, 110 insertions(+), 109 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 2da59a3d3222..5f0792c60ac6 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -148,7 +148,8 @@ void lv_indev_reset(lv_indev_t * indev) lv_indev_t * i = lv_indev_get_next(NULL); while(i) { i->proc.reset_query = 1; - i = lv_indev_get_next(i); + + i = lv_indev_get_next(i); } } } @@ -851,14 +852,16 @@ static void indev_proc_release(lv_indev_proc_t * proc) indev_act); if(proc->reset_query) return; /*The object might be deleted*/ - if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); + if(proc->types.pointer.drag_in_prog == 0) { + if(proc->long_pr_sent == 0) { + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); + if(proc->reset_query) return; /*The object might be deleted*/ + } + + lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); if(proc->reset_query) return; /*The object might be deleted*/ } diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 16f30ffdaaf4..df37b8677b09 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -26,8 +26,9 @@ /********************* * DEFINES *********************/ -#define VFILL_HW_ACC_SIZE_LIMIT \ - 50 /*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/ + +/*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/ +#define VFILL_HW_ACC_SIZE_LIMIT 50 #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATTRIBUTE_MEM_ALIGN diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index a2db9dab44dc..330bf7d98db5 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -14,14 +14,15 @@ /********************* * DEFINES *********************/ -#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD \ - 1 /*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity \ - mapping*/ - -#define SHADOW_OPA_EXTRA_PRECISION \ - 8 /*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/ -#define SHADOW_BOTTOM_AA_EXTRA_RADIUS \ - 3 /*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/ +/*Circle segment greater then this value will be anti-aliased by a non-linear (cos) opacity + * mapping*/ +#define CIRCLE_AA_NON_LINEAR_OPA_THRESHOLD 1 + +/*Calculate with 2^x bigger shadow opacity values to avoid rounding errors*/ +#define SHADOW_OPA_EXTRA_PRECISION 8 + +/*Add extra radius with LV_SHADOW_BOTTOM to cover anti-aliased corners*/ +#define SHADOW_BOTTOM_AA_EXTRA_RADIUS 3 /********************** * TYPEDEFS diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index 50149b5bab8f..8e432d9a7f4e 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -1,5 +1,6 @@ #ifndef LV_SYMBOL_DEF_H #define LV_SYMBOL_DEF_H +/* clang-format off */ #ifdef __cplusplus extern "C" { @@ -10,76 +11,65 @@ extern "C" { #include "../../../lv_conf.h" #endif -/* - * With no UTF-8 support (192- 255) (192..241 is used) - * - * With UTF-8 support (in Supplemental Private Use Area-A): 0xF800 .. 0xF831 - * - Basic symbols: 0xE000..0xE01F - * - File symbols: 0xE020..0xE03F - * - Feedback symbols: 0xE040..0xE05F - * - Reserved: 0xE060..0xE07F - */ +#define LV_SYMBOL_GLYPH_FIRST 0xF800 +#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) +#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) +#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF,A0,82) +#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF,A0,83) +#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF,A0,84) +#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF,A0,85) +#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF,A0,86) +#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF,A0,87) +#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF,A0,88) +#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF,A0,89) +#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF,A0,8A) +#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF,A0,8B) +#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF,A0,8C) +#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF,A0,8D) +#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF,A0,8E) +#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF,A0,8F) +#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF,A0,90) +#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF,A0,91) +#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF,A0,92) +#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF,A0,93) +#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF,A0,94) +#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF,A0,95) +#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF,A0,96) +#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF,A0,97) +#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF,A0,98) +#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF,A0,99) +#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF,A0,9A) +#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF,A0,9B) +#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF,A0,9C) +#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF,A0,9D) +#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF,A0,9E) +#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF,A0,9F) +#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF,A0,A0) +#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF,A0,A1) +#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF,A0,A2) +#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF,A0,A3) +#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF,A0,A4) +#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF,A0,A5) +#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF,A0,A6) +#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF,A0,A7) +#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF,A0,A8) +#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF,A0,A9) +#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF,A0,AA) +#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF,A0,AB) +#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF,A0,AC) +#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF,A0,AD) +#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF,A0,AE) +#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF,A0,AF) +#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF,A0,B0) +#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) +#define LV_SYMBOL_GLYPH_LAST 0xF831 +#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ -#define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF, A0, 80) -#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF, A0, 81) -#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF, A0, 82) -#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF, A0, 83) -#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF, A0, 84) -#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF, A0, 85) -#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF, A0, 86) -#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF, A0, 87) -#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF, A0, 88) -#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF, A0, 89) -#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF, A0, 8A) -#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF, A0, 8B) -#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF, A0, 8C) -#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF, A0, 8D) -#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF, A0, 8E) -#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF, A0, 8F) -#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF, A0, 90) -#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF, A0, 91) -#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF, A0, 92) -#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF, A0, 93) -#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF, A0, 94) -#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF, A0, 95) -#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF, A0, 96) -#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF, A0, 97) -#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF, A0, 98) -#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF, A0, 99) -#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF, A0, 9A) -#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF, A0, 9B) -#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF, A0, 9C) -#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF, A0, 9D) -#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF, A0, 9E) -#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF, A0, 9F) -#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF, A0, A0) -#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF, A0, A1) -#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF, A0, A2) -#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF, A0, A3) -#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF, A0, A4) -#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF, A0, A5) -#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF, A0, A6) -#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF, A0, A7) -#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF, A0, A8) -#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF, A0, A9) -#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF, A0, AA) -#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF, A0, AB) -#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF, A0, AC) -#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF, A0, AD) -#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF, A0, AE) -#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF, A0, AF) -#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF, A0, B0) -#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF, A0, B1) -#define LV_SYMBOL_GLYPH_LAST 0xF831 -#define LV_SYMBOL_DUMMY \ - _LV_SYMBOL_VALUE3(EF, A3, BF) /*Invalid symbol at (U+F831). If written before a string then \ - `lv_img` will show it as a label*/ +#define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) +#define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym -#define _LV_SYMBOL_VALUE3(x, y, z) (0x##z##y##x) -#define _LV_SYMBOL_NUMSTR(sym) LV_##sym##_NUMSTR = sym - -enum { +enum +{ _LV_SYMBOL_NUMSTR(LV_SYMBOL_AUDIO), _LV_SYMBOL_NUMSTR(LV_SYMBOL_VIDEO), _LV_SYMBOL_NUMSTR(LV_SYMBOL_LIST), @@ -137,13 +127,13 @@ enum { #define _LV_SYMBOL_STR_(x) #x #define _LV_SYMBOL_STR(x) _LV_SYMBOL_STR_(x) -#define _LV_SYMBOL_CHAR(c) \x##c +#define _LV_SYMBOL_CHAR(c) \x ## c #define _LV_SYMBOL_VALUE1(x) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)) -#define _LV_SYMBOL_VALUE3(x, y, z) \ - _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x) _LV_SYMBOL_CHAR(y) _LV_SYMBOL_CHAR(z)) +#define _LV_SYMBOL_VALUE3(x, y, z) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)_LV_SYMBOL_CHAR(y)_LV_SYMBOL_CHAR(z)) #ifdef __cplusplus } /* extern "C" */ #endif + #endif /*LV_LV_SYMBOL_DEF_H*/ diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index dbfc894ab1e6..00564135e035 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -14,19 +14,19 @@ *********************/ #define NO_BREAK_FOUND UINT32_MAX +/* If a character is at least this long, will break wherever "prettiest" */ #ifndef LV_TXT_LINE_BREAK_LONG_LEN -#define LV_TXT_LINE_BREAK_LONG_LEN \ - 12 /* If a character is at least this long, will break wherever "prettiest" */ +#define LV_TXT_LINE_BREAK_LONG_LEN 12 #endif +/* Minimum number of characters of a word to put on a line before a break */ #ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN \ - 3 /* Minimum number of characters of a word to put on a line before a break */ +#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 #endif +/* Minimum number of characters of a word to put on a line after a break */ #ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN \ - 1 /* Minimum number of characters of a word to put on a line after a break */ +#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 #endif /********************** @@ -343,10 +343,13 @@ bool lv_txt_is_cmd(lv_txt_cmd_state_t * state, uint32_t c) if(*state == LV_TXT_CMD_STATE_WAIT) { /*Start char*/ *state = LV_TXT_CMD_STATE_PAR; ret = true; - } else if(*state == - LV_TXT_CMD_STATE_PAR) { /*Other start char in parameter is escaped cmd. char */ + } + /*Other start char in parameter is escaped cmd. char */ + else if(*state == LV_TXT_CMD_STATE_PAR) { *state = LV_TXT_CMD_STATE_WAIT; - } else if(*state == LV_TXT_CMD_STATE_IN) { /*Command end */ + } + /*Command end */ + else if(*state == LV_TXT_CMD_STATE_IN) { *state = LV_TXT_CMD_STATE_WAIT; ret = true; } diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 61f4b12f298b..750b1d437fd7 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -19,9 +19,8 @@ * DEFINES *********************/ /*Test configurations*/ -#ifndef LV_LABEL_SCROLL_SPEED -#define LV_LABEL_DEF_SCROLL_SPEED \ - (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ +#ifndef LV_LABEL_DEF_SCROLL_SPEED +#define LV_LABEL_DEF_SCROLL_SPEED (25) #endif #define ANIM_WAIT_CHAR_COUNT 3 diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 43ca7d8c3008..c8c135fe45a7 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -20,13 +20,14 @@ #define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M #if LV_USE_ANIMATION -#ifndef LV_LIST_FOCUS_TIME -#define LV_LIST_DEF_ANIM_TIME \ - 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +/*Animation time of focusing to the a list element [ms] (0: no animation) */ +#ifndef LV_LIST_DEF_ANIM_TIME +#define LV_LIST_DEF_ANIM_TIME 100 #endif #else +/*No animations*/ #undef LV_LIST_DEF_ANIM_TIME -#define LV_LIST_DEF_ANIM_TIME 0 /*No animations*/ +#define LV_LIST_DEF_ANIM_TIME 0 #endif /********************** @@ -737,17 +738,18 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) } lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + /*The page receives the key presses so the events should be propagated to the selected + * button*/ if(btn) { - bool drag = lv_indev_is_dragging(lv_indev_get_act()); if(sign == LV_SIGNAL_PRESSED) { lv_event_send(btn, LV_EVENT_PRESSED, NULL); } else if(sign == LV_SIGNAL_PRESSING) { lv_event_send(btn, LV_EVENT_PRESSING, NULL); - } else if(sign == LV_SIGNAL_LONG_PRESS && !drag) { + } else if(sign == LV_SIGNAL_LONG_PRESS) { lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); - } else if(sign == LV_SIGNAL_LONG_PRESS_REP && !drag) { + } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - } else if(sign == LV_SIGNAL_RELEASED && !drag) { + } else if(sign == LV_SIGNAL_RELEASED) { ext->last_sel = btn; if(indev->proc.long_pr_sent == 0) lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 996cb2726de8..e5e99f5d7f2a 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -20,8 +20,10 @@ * DEFINES *********************/ #define LV_PAGE_SB_MIN_SIZE (LV_DPI / 8) -#define LV_PAGE_SCROLL_ANIM_TIME \ - 200 /*[ms] Scroll anim time on `lv_page_scroll_up/down/left/rigth`*/ + +/*[ms] Scroll anim time on `lv_page_scroll_up/down/left/rigth`*/ +#define LV_PAGE_SCROLL_ANIM_TIME 200 + #define LV_PAGE_END_FLASH_SIZE (LV_DPI / 4) #define LV_PAGE_END_ANIM_TIME 300 #define LV_PAGE_END_ANIM_WAIT_TIME 300 From d6088f2b067efe2c6b8be91a631e39dba7fb0252 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 4 Apr 2019 16:54:54 +0200 Subject: [PATCH 244/590] update lv_conf_checker.h --- lv_conf_template.h | 6 + src/lv_conf_checker.h | 589 ++++++++++++++++++++++++------------------ 2 files changed, 343 insertions(+), 252 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 23910e28fe8f..d6e450290a68 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -311,6 +311,9 @@ typedef void * lv_obj_user_data_t; /*Chart (dependencies: -)*/ #define LV_USE_CHART 1 +#if LV_USE_CHART +# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20 +#endif /*Container (dependencies: -*/ #define LV_USE_CONT 1 @@ -380,6 +383,9 @@ typedef void * lv_obj_user_data_t; #if LV_USE_ROLLER != 0 /*Focus animation time [ms] (0: no animation)*/ # define LV_ROLLER_DEF_ANIM_TIME 200 + +/*Number of extra "pages" when the roller is infinite*/ +# define LV_ROLLER_INF_PAGES 7 #endif /*Slider (dependencies: lv_bar)*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index a1c98e01b24d..fd2e5f6f247f 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -6,12 +6,13 @@ #ifndef LV_CONF_CHECKER_H #define LV_CONF_CHECKER_H +/* clang-format off */ -/*=================== +/*==================== Graphical settings - *===================*/ + *====================*/ -/* Horizontal and vertical resolution of the library.*/ +/* Maximal horizontal and vertical resolution to support by the library.*/ #ifndef LV_HOR_RES_MAX #define LV_HOR_RES_MAX (480) #endif @@ -19,57 +20,83 @@ #define LV_VER_RES_MAX (320) #endif -/*Color settings*/ +/* Color depth: + * - 1: 1 byte per pixel + * - 8: RGB233 + * - 16: RGB565 + * - 32: ARGB8888 + */ #ifndef LV_COLOR_DEPTH -#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/ +#define LV_COLOR_DEPTH 16 #endif + +/* Swap the 2 bytes of RGB565 color. + * Useful if the display has a 8 bit interface (e.g. SPI)*/ #ifndef LV_COLOR_16_SWAP -#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/ +#define LV_COLOR_16_SWAP 0 #endif + +/* 1: Enable screen transparency. + * Useful for OSD or other overlapping GUIs. + * Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/ #ifndef LV_COLOR_SCREEN_TRANSP -#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/ +#define LV_COLOR_SCREEN_TRANSP 0 #endif + +/*Images pixels with this color will not be drawn (with chroma keying)*/ #ifndef LV_COLOR_TRANSP -#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/ +#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/ #endif /* Enable anti-aliasing (lines, and radiuses will be smoothed) */ #ifndef LV_ANTIALIAS -#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/ +#define LV_ANTIALIAS 1 #endif -/*Default screen refresh period in milliseconds. LittlevGL will redraw the screen with this period*/ -#ifndef LV_REFR_PERIOD +/* Default display refresh period. + * Can be changed in the display driver (`lv_disp_drv_t`).*/ +#ifndef LV_DISP_DEF_REFR_PERIOD #define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/ #endif -/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide +/* Dot Per Inch: used to initialize default sizes. + * E.g. a button with width = LV_DPI / 2 -> half inch wide * (Not so important, you can adjust it to modify default sizes and spaces)*/ #ifndef LV_DPI #define LV_DPI 100 /*[px]*/ #endif -/*=================== - Dynamic memory - *===================*/ +/*========================= + Memory manager settings + *=========================*/ -/* Memory size which will be used by the library - * to store the graphical objects and other data */ +/* LittelvGL's internal memory manager's settings. + * The graphical objects and other related data are stored here. */ + +/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */ #ifndef LV_MEM_CUSTOM -#define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/ +#define LV_MEM_CUSTOM 0 #endif #if LV_MEM_CUSTOM == 0 +/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ #ifndef LV_MEM_SIZE -# define LV_MEM_SIZE (32U * 1024U) /*Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/ +# define LV_MEM_SIZE (32U * 1024U) #endif + +/* Complier prefix for a big array declaration */ #ifndef LV_MEM_ATTR -# define LV_MEM_ATTR /*Complier prefix for big array declaration*/ +# define LV_MEM_ATTR #endif + +/* Set an address for the memory pool instead of allocating it as an array. + * Can be in external SRAM too. */ #ifndef LV_MEM_ADR -# define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/ +# define LV_MEM_ADR 0 #endif + +/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */ #ifndef LV_MEM_AUTO_DEFRAG -# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/ +# define LV_MEM_AUTO_DEFRAG 1 #endif #else /*LV_MEM_CUSTOM*/ #ifndef LV_MEM_CUSTOM_INCLUDE @@ -84,102 +111,138 @@ #endif /*LV_MEM_CUSTOM*/ /* Garbage Collector settings - * Used if lvgl is binded to higher language and the memory is managed by that language */ + * Used if lvgl is binded to higher level language and the memory is managed by that language */ #ifndef LV_ENABLE_GC #define LV_ENABLE_GC 0 #endif #if LV_ENABLE_GC != 0 +#ifndef LV_GC_INCLUDE +# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ +#endif #ifndef LV_MEM_CUSTOM_REALLOC # define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/ #endif #ifndef LV_MEM_CUSTOM_GET_SIZE # define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/ #endif -#ifndef LV_GC_INCLUDE -# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/ -#endif #endif /* LV_ENABLE_GC */ -/*================= - Misc. setting - *=================*/ +/*======================= + Input device settings + *=======================*/ -/*Input device settings*/ -#ifndef LV_INDEV_READ_PERIOD -#define LV_INDEV_DEF_READ_PERIOD 30 /*Input device read period in milliseconds*/ -#endif -#ifndef LV_INDEV_POINT_MARKER -#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: LV_USE_REAL_DRAW = 1)*/ -#endif -#ifndef LV_INDEV_DRAG_LIMIT -#define LV_INDEV_DEF_DRAG_LIMIT 10 /*Drag threshold in pixels */ -#endif -#ifndef LV_INDEV_DRAG_THROW -#define LV_INDEV_DEF_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */ -#endif -#ifndef LV_INDEV_LONG_PRESS_TIME -#define LV_INDEV_DEF_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/ -#endif -#ifndef LV_INDEV_LONG_PRESS_REP_TIME -#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */ +/* Input device default settings. + * Can be changed in the Input device driver (`lv_indev_drv_t`)*/ + +/* Input device read period in milliseconds */ +#ifndef LV_INDEV_DEF_READ_PERIOD +#define LV_INDEV_DEF_READ_PERIOD 30 #endif -/*Text settings*/ -#ifndef LV_TXT_BREAK_CHARS -#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ +/* Drag threshold in pixels */ +#ifndef LV_INDEV_DEF_DRAG_LIMIT +#define LV_INDEV_DEF_DRAG_LIMIT 10 #endif -#ifndef LV_TXT_LINE_BREAK_LONG_LEN -#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */ + +/* Drag throw slow-down in [%]. Greater value -> faster slow-down */ +#ifndef LV_INDEV_DEF_DRAG_THROW +#define LV_INDEV_DEF_DRAG_THROW 20 #endif -#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */ + +/* Long press time in milliseconds. + * Time to send `LV_EVENT_LONG_PRESSSED`) */ +#ifndef LV_INDEV_DEF_LONG_PRESS_TIME +#define LV_INDEV_DEF_LONG_PRESS_TIME 400 #endif -#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */ + +/* Repeated trigger period in long press [ms] + * Time between `LV_EVENT_LONG_PRESSED_REPEAT */ +#ifndef LV_INDEV_DEF_LONG_PRESS_REP_TIME +#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100 #endif -/*Feature usage*/ +/*================== + * Feature usage + *==================*/ + +/*1: Enable the Animations */ #ifndef LV_USE_ANIMATION -#define LV_USE_ANIMATION 1 /*1: Enable all animations*/ +#define LV_USE_ANIMATION 1 #endif + +/* 1: Enable shadow drawing*/ #ifndef LV_USE_SHADOW -#define LV_USE_SHADOW 1 /*1: Enable shadows*/ +#define LV_USE_SHADOW 1 #endif + +/* 1: Enable object groups (for keyboard/encoder navigation) */ #ifndef LV_USE_GROUP -#define LV_USE_GROUP 1 /*1: Enable object groups (for keyboards)*/ +#define LV_USE_GROUP 1 #endif #if LV_USE_GROUP #endif /*LV_USE_GROUP*/ + +/* 1: Enable GPU interface*/ #ifndef LV_USE_GPU -#define LV_USE_GPU 1 /*1: Enable GPU interface*/ +#define LV_USE_GPU 1 #endif + +/* 1: Enable file system (might be required for images */ #ifndef LV_USE_FILESYSTEM -#define LV_USE_FILESYSTEM 1 /*1: Enable file system (might be required for images*/ +#define LV_USE_FILESYSTEM 1 +#endif + +/* 1: Enable indexed (palette) images */ +#ifndef LV_IMG_CF_INDEXED +#define LV_IMG_CF_INDEXED 1 +#endif + +/* 1: Enable alpha indexed images */ +#ifndef LV_IMG_CF_ALPHA +#define LV_IMG_CF_ALPHA 1 #endif + +/*1: Add a `user_data` to drivers and objects*/ #ifndef LV_USE_USER_DATA_SINGLE -#define LV_USE_USER_DATA_SINGLE 1 /*1: Add a `user_data` to drivers and objects*/ +#define LV_USE_USER_DATA_SINGLE 1 #endif + +/*1: Add separate `user_data` for every callback*/ #ifndef LV_USE_USER_DATA_MULTI -#define LV_USE_USER_DATA_MULTI 0 /*1: Add separate `user_data` for every callback*/ +#define LV_USE_USER_DATA_MULTI 0 #endif -/*Compiler settings*/ +/*===================== + * Compiler settings + *====================*/ +/* Define a custom attribute to `lv_tick_inc` function */ #ifndef LV_ATTRIBUTE_TICK_INC -#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */ +#define LV_ATTRIBUTE_TICK_INC #endif + +/* Define a custom attribute to `lv_task_handler` function */ #ifndef LV_ATTRIBUTE_TASK_HANDLER -#define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */ +#define LV_ATTRIBUTE_TASK_HANDLER #endif + +/* 1: Variable length array is supported*/ #ifndef LV_COMPILER_VLA_SUPPORTED -#define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/ +#define LV_COMPILER_VLA_SUPPORTED 1 #endif + +/* 1: Initialization with non constant values are supported */ #ifndef LV_COMPILER_NON_CONST_INIT_SUPPORTED -#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */ +#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 #endif -/*HAL settings*/ +/*=================== + * HAL settings + *==================*/ + +/* 1: use a custom tick source. + * It removes the need to manually update the tick with `lv_tick_inc`) */ #ifndef LV_TICK_CUSTOM -#define LV_TICK_CUSTOM 0 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */ +#define LV_TICK_CUSTOM 0 #endif #if LV_TICK_CUSTOM == 1 #ifndef LV_TICK_CUSTOM_INCLUDE @@ -191,9 +254,13 @@ #endif /*LV_TICK_CUSTOM*/ -/*Log settings*/ +/*================ + * Log settings + *===============*/ + +/*1: Enable the log module*/ #ifndef LV_USE_LOG -#define LV_USE_LOG 1 /*Enable/disable the log module*/ +#define LV_USE_LOG 1 #endif #if LV_USE_LOG /* How important log should be added: @@ -206,7 +273,8 @@ # define LV_LOG_LEVEL LV_LOG_LEVEL_WARN #endif -/* 1: Print the log with 'printf'; 0: user need to register a callback*/ +/* 1: Print the log with 'printf'; + * 0: user need to register a callback with `lv_log_register_print`*/ #ifndef LV_LOG_PRINTF # define LV_LOG_PRINTF 0 #endif @@ -216,32 +284,32 @@ * THEME USAGE *================*/ #ifndef LV_THEME_LIVE_UPDATE -#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ +#define LV_THEME_LIVE_UPDATE 0 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/ #endif #ifndef LV_USE_THEME_TEMPL -#define LV_USE_THEME_TEMPL 0 /*Just for test*/ +#define LV_USE_THEME_TEMPL 1 /*Just for test*/ #endif #ifndef LV_USE_THEME_DEFAULT -#define LV_USE_THEME_DEFAULT 0 /*Built mainly from the built-in styles. Consumes very few RAM*/ +#define LV_USE_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/ #endif #ifndef LV_USE_THEME_ALIEN -#define LV_USE_THEME_ALIEN 0 /*Dark futuristic theme*/ +#define LV_USE_THEME_ALIEN 1 /*Dark futuristic theme*/ #endif #ifndef LV_USE_THEME_NIGHT -#define LV_USE_THEME_NIGHT 0 /*Dark elegant theme*/ +#define LV_USE_THEME_NIGHT 1 /*Dark elegant theme*/ #endif #ifndef LV_USE_THEME_MONO -#define LV_USE_THEME_MONO 0 /*Mono color theme for monochrome displays*/ +#define LV_USE_THEME_MONO 1 /*Mono color theme for monochrome displays*/ #endif #ifndef LV_USE_THEME_MATERIAL -#define LV_USE_THEME_MATERIAL 0 /*Flat theme with bold colors and light shadows*/ +#define LV_USE_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/ #endif #ifndef LV_USE_THEME_ZEN -#define LV_USE_THEME_ZEN 0 /*Peaceful, mainly light theme */ +#define LV_USE_THEME_ZEN 1 /*Peaceful, mainly light theme */ #endif #ifndef LV_USE_THEME_NEMO -#define LV_USE_THEME_NEMO 0 /*Water-like theme based on the movie "Finding Nemo"*/ +#define LV_USE_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/ #endif /*================== @@ -252,16 +320,16 @@ * To enable a built-in font use 1,2,4 or 8 values * which will determine the bit-per-pixel. Higher value means smoother fonts */ #ifndef LV_USE_FONT_DEJAVU_10 -#define LV_USE_FONT_DEJAVU_10 0 +#define LV_USE_FONT_DEJAVU_10 4 #endif #ifndef LV_USE_FONT_DEJAVU_10_LATIN_SUP -#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 4 #endif #ifndef LV_USE_FONT_DEJAVU_10_CYRILLIC -#define LV_USE_FONT_DEJAVU_10_CYRILLIC 0 +#define LV_USE_FONT_DEJAVU_10_CYRILLIC 4 #endif #ifndef LV_USE_FONT_SYMBOL_10 -#define LV_USE_FONT_SYMBOL_10 0 +#define LV_USE_FONT_SYMBOL_10 4 #endif #ifndef LV_USE_FONT_DEJAVU_20 @@ -278,33 +346,33 @@ #endif #ifndef LV_USE_FONT_DEJAVU_30 -#define LV_USE_FONT_DEJAVU_30 0 +#define LV_USE_FONT_DEJAVU_30 4 #endif #ifndef LV_USE_FONT_DEJAVU_30_LATIN_SUP -#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 4 #endif #ifndef LV_USE_FONT_DEJAVU_30_CYRILLIC -#define LV_USE_FONT_DEJAVU_30_CYRILLIC 0 +#define LV_USE_FONT_DEJAVU_30_CYRILLIC 4 #endif #ifndef LV_USE_FONT_SYMBOL_30 -#define LV_USE_FONT_SYMBOL_30 0 +#define LV_USE_FONT_SYMBOL_30 4 #endif #ifndef LV_USE_FONT_DEJAVU_40 -#define LV_USE_FONT_DEJAVU_40 0 +#define LV_USE_FONT_DEJAVU_40 4 #endif #ifndef LV_USE_FONT_DEJAVU_40_LATIN_SUP -#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 0 +#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 4 #endif #ifndef LV_USE_FONT_DEJAVU_40_CYRILLIC -#define LV_USE_FONT_DEJAVU_40_CYRILLIC 0 +#define LV_USE_FONT_DEJAVU_40_CYRILLIC 4 #endif #ifndef LV_USE_FONT_SYMBOL_40 -#define LV_USE_FONT_SYMBOL_40 0 +#define LV_USE_FONT_SYMBOL_40 4 #endif #ifndef LV_USE_FONT_MONOSPACE_8 -#define LV_USE_FONT_MONOSPACE_8 0 +#define LV_USE_FONT_MONOSPACE_8 1 #endif /* Optionally declare your custom fonts here. @@ -317,16 +385,43 @@ #define LV_FONT_CUSTOM_DECLARE #endif - #ifndef LV_FONT_DEFAULT #define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/ #endif +/*================= + * Text settings + *=================*/ + + /*Can break (wrap) texts on these chars*/ +#ifndef LV_TXT_BREAK_CHARS +#define LV_TXT_BREAK_CHARS " ,.;:-_" +#endif + +/* If a character is at least this long, will break wherever "prettiest" */ +#ifndef LV_TXT_LINE_BREAK_LONG_LEN +#define LV_TXT_LINE_BREAK_LONG_LEN 12 +#endif + +/* Minimum number of characters of a word to put on a line before a break */ +#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN +#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 +#endif + +/* Minimum number of characters of a word to put on a line after a break */ +#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN +#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 +#endif + /*=================== * LV_OBJ SETTINGS *==================*/ + +/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ + +/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ #ifndef LV_OBJ_REALIGN -#define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/ +#define LV_OBJ_REALIGN 1 #endif /*================== @@ -336,94 +431,71 @@ * Documentation of the object types: https://docs.littlevgl.com/#Object-types */ -/***************** - * Simple object - *****************/ - -/*Label (dependencies: -*/ -#ifndef LV_USE_LABEL -#define LV_USE_LABEL 1 -#endif -#if LV_USE_LABEL != 0 -#ifndef LV_LABEL_SCROLL_SPEED -# define LV_LABEL_DEF_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/ -#endif +/*Arc (dependencies: -)*/ +#ifndef LV_USE_ARC +#define LV_USE_ARC 1 #endif -/*Image (dependencies: lv_label*/ -#ifndef LV_USE_IMG -#define LV_USE_IMG 1 -#endif -#if LV_USE_IMG != 0 -#ifndef LV_IMG_CF_INDEXED -# define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/ +/*Bar (dependencies: -)*/ +#ifndef LV_USE_BAR +#define LV_USE_BAR 1 #endif -#ifndef LV_IMG_CF_ALPHA -# define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/ + +/*Button (dependencies: lv_cont*/ +#ifndef LV_USE_BTN +#define LV_USE_BTN 1 #endif +#if LV_USE_BTN != 0 +/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ +#ifndef LV_BTN_INK_EFFECT +# define LV_BTN_INK_EFFECT 1 #endif - -/*Line (dependencies: -*/ -#ifndef LV_USE_LINE -#define LV_USE_LINE 1 #endif -/*Arc (dependencies: -)*/ -#ifndef LV_USE_ARC -#define LV_USE_ARC 1 +/*Button matrix (dependencies: -)*/ +#ifndef LV_USE_BTNM +#define LV_USE_BTNM 1 #endif -/******************* - * Container objects - *******************/ - -/*Container (dependencies: -*/ -#ifndef LV_USE_CONT -#define LV_USE_CONT 1 +/*Calendar (dependencies: -)*/ +#ifndef LV_USE_CALENDAR +#define LV_USE_CALENDAR 1 #endif -/*Page (dependencies: lv_cont)*/ -#ifndef LV_USE_PAGE -#define LV_USE_PAGE 1 +/*Canvas (dependencies: lv_img)*/ +#ifndef LV_USE_CANVAS +#define LV_USE_CANVAS 1 #endif -/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ -#ifndef LV_USE_WIN -#define LV_USE_WIN 1 +/*Check box (dependencies: lv_btn, lv_label)*/ +#ifndef LV_USE_CB +#define LV_USE_CB 1 #endif -/*Tab (dependencies: lv_page, lv_btnm)*/ -#ifndef LV_USE_TABVIEW -#define LV_USE_TABVIEW 1 +/*Chart (dependencies: -)*/ +#ifndef LV_USE_CHART +#define LV_USE_CHART 1 #endif -# if LV_USE_TABVIEW != 0 -#ifndef LV_TABVIEW_ANIM_TIME -# define LV_TABVIEW_DEF_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ +#if LV_USE_CHART +#ifndef LV_CHART_AXIS_TICK_LABEL_MAX_LEN +# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 20 #endif #endif -/*Tileview (dependencies: lv_page) */ -#ifndef LV_USE_TILEVIEW -#define LV_USE_TILEVIEW 1 -#endif -#if LV_USE_TILEVIEW -#ifndef LV_TILEVIEW_ANIM_TIME -# define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/ -#endif +/*Container (dependencies: -*/ +#ifndef LV_USE_CONT +#define LV_USE_CONT 1 #endif -/************************* - * Data visualizer objects - *************************/ - -/*Bar (dependencies: -)*/ -#ifndef LV_USE_BAR -#define LV_USE_BAR 1 +/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ +#ifndef LV_USE_DDLIST +#define LV_USE_DDLIST 1 +#endif +#if LV_USE_DDLIST != 0 +/*Open and close default animation time [ms] (0: no animation)*/ +#ifndef LV_DDLIST_DEF_ANIM_TIME +# define LV_DDLIST_DEF_ANIM_TIME 200 #endif - -/*Line meter (dependencies: *;)*/ -#ifndef LV_USE_LMETER -#define LV_USE_LMETER 1 #endif /*Gauge (dependencies:lv_bar, lv_lmeter)*/ @@ -431,21 +503,35 @@ #define LV_USE_GAUGE 1 #endif -/*Chart (dependencies: -)*/ -#ifndef LV_USE_CHART -#define LV_USE_CHART 1 +/*Image (dependencies: lv_label*/ +#ifndef LV_USE_IMG +#define LV_USE_IMG 1 +#endif + +/*Image Button (dependencies: lv_btn*/ +#ifndef LV_USE_IMGBTN +#define LV_USE_IMGBTN 1 +#endif +#if LV_USE_IMGBTN +/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ +#ifndef LV_IMGBTN_TILED +# define LV_IMGBTN_TILED 0 #endif -#ifndef LV_CHART_AXIS_TICK_LABEL_MAX_LEN -#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 16 #endif -/*Table (dependencies: lv_label)*/ -#ifndef LV_USE_TABLE -#define LV_USE_TABLE 1 +/*Keyboard (dependencies: lv_btnm)*/ +#ifndef LV_USE_KB +#define LV_USE_KB 1 #endif -#if LV_USE_TABLE -#ifndef LV_TABLE_COL_MAX -# define LV_TABLE_COL_MAX 12 + +/*Label (dependencies: -*/ +#ifndef LV_USE_LABEL +#define LV_USE_LABEL 1 +#endif +#if LV_USE_LABEL != 0 +/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ +#ifndef LV_LABEL_DEF_SCROLL_SPEED +# define LV_LABEL_DEF_SCROLL_SPEED 25 #endif #endif @@ -454,32 +540,35 @@ #define LV_USE_LED 1 #endif -/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ -#ifndef LV_USE_MBOX -#define LV_USE_MBOX 1 +/*Line (dependencies: -*/ +#ifndef LV_USE_LINE +#define LV_USE_LINE 1 #endif -/*Text area (dependencies: lv_label, lv_page)*/ -#ifndef LV_USE_TA -#define LV_USE_TA 1 +/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ +#ifndef LV_USE_LIST +#define LV_USE_LIST 1 #endif -#if LV_USE_TA != 0 -#ifndef LV_TA_CURSOR_BLINK_TIME -# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +#if LV_USE_LIST != 0 +/*Default animation time of focusing to a list element [ms] (0: no animation) */ +#ifndef LV_LIST_DEF_ANIM_TIME +# define LV_LIST_DEF_ANIM_TIME 100 #endif -#ifndef LV_TA_PWD_SHOW_TIME -# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif + +/*Line meter (dependencies: *;)*/ +#ifndef LV_USE_LMETER +#define LV_USE_LMETER 1 #endif -/*Spinbox (dependencies: lv_ta)*/ -#ifndef LV_USE_SPINBOX -#define LV_USE_SPINBOX 1 +/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/ +#ifndef LV_USE_MBOX +#define LV_USE_MBOX 1 #endif -/*Calendar (dependencies: -)*/ -#ifndef LV_USE_CALENDAR -#define LV_USE_CALENDAR 1 +/*Page (dependencies: lv_cont)*/ +#ifndef LV_USE_PAGE +#define LV_USE_PAGE 1 #endif /*Preload (dependencies: lv_arc)*/ @@ -498,95 +587,91 @@ #endif #endif -/*Canvas (dependencies: lv_img)*/ -#ifndef LV_USE_CANVAS -#define LV_USE_CANVAS 1 -#endif -/************************* - * User input objects - *************************/ - -/*Button (dependencies: lv_cont*/ -#ifndef LV_USE_BTN -#define LV_USE_BTN 1 -#endif -#if LV_USE_BTN != 0 -#ifndef LV_BTN_INK_EFFECT -# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/ +/*Roller (dependencies: lv_ddlist)*/ +#ifndef LV_USE_ROLLER +#define LV_USE_ROLLER 1 #endif +#if LV_USE_ROLLER != 0 +/*Focus animation time [ms] (0: no animation)*/ +#ifndef LV_ROLLER_DEF_ANIM_TIME +# define LV_ROLLER_DEF_ANIM_TIME 200 #endif -/*Image Button (dependencies: lv_btn*/ -#ifndef LV_USE_IMGBTN -#define LV_USE_IMGBTN 1 -#endif -#if LV_USE_IMGBTN -#ifndef LV_IMGBTN_TILED -# define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/ +/*Number of extra "pages" when the roller is infinite*/ +#ifndef LV_ROLLER_INF_PAGES +# define LV_ROLLER_INF_PAGES 7 #endif #endif -/*Button matrix (dependencies: -)*/ -#ifndef LV_USE_BTNM -#define LV_USE_BTNM 1 +/*Slider (dependencies: lv_bar)*/ +#ifndef LV_USE_SLIDER +#define LV_USE_SLIDER 1 #endif -/*Keyboard (dependencies: lv_btnm)*/ -#ifndef LV_USE_KB -#define LV_USE_KB 1 +/*Spinbox (dependencies: lv_ta)*/ +#ifndef LV_USE_SPINBOX +#define LV_USE_SPINBOX 1 #endif -/*Check box (dependencies: lv_btn, lv_label)*/ -#ifndef LV_USE_CB -#define LV_USE_CB 1 +/*Switch (dependencies: lv_slider)*/ +#ifndef LV_USE_SW +#define LV_USE_SW 1 #endif -/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/ -#ifndef LV_USE_LIST -#define LV_USE_LIST 1 +/*Text area (dependencies: lv_label, lv_page)*/ +#ifndef LV_USE_TA +#define LV_USE_TA 1 #endif -#if LV_USE_LIST != 0 -#ifndef LV_LIST_FOCUS_TIME -# define LV_LIST_DEF_ANIM_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */ +#if LV_USE_TA != 0 +#ifndef LV_TA_CURSOR_BLINK_TIME +# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +#endif +#ifndef LV_TA_PWD_SHOW_TIME +# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ #endif #endif -/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/ -#ifndef LV_USE_DDLIST -#define LV_USE_DDLIST 1 +/*Table (dependencies: lv_label)*/ +#ifndef LV_USE_TABLE +#define LV_USE_TABLE 1 #endif -#if LV_USE_DDLIST != 0 -#ifndef LV_DDLIST_ANIM_TIME -# define LV_DDLIST_DEF_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/ +#if LV_USE_TABLE +#ifndef LV_TABLE_COL_MAX +# define LV_TABLE_COL_MAX 12 #endif #endif -/*Roller (dependencies: lv_ddlist)*/ -#ifndef LV_USE_ROLLER -#define LV_USE_ROLLER 1 -#endif -#if LV_USE_ROLLER != 0 -#ifndef LV_ROLLER_ANIM_TIME -# define LV_ROLLER_DEF_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/ +/*Tab (dependencies: lv_page, lv_btnm)*/ +#ifndef LV_USE_TABVIEW +#define LV_USE_TABVIEW 1 #endif -#ifndef LV_ROLLER_INF_PAGES -# define LV_ROLLER_INF_PAGES 7 /*With inifinite rollers the options are added multiple times (on select positioned back to the center)*/ +# if LV_USE_TABVIEW != 0 +/*Time of slide animation [ms] (0: no animation)*/ +#ifndef LV_TABVIEW_DEF_ANIM_TIME +# define LV_TABVIEW_DEF_ANIM_TIME 300 #endif #endif -/*Slider (dependencies: lv_bar)*/ -#ifndef LV_USE_SLIDER -#define LV_USE_SLIDER 1 +/*Tileview (dependencies: lv_page) */ +#ifndef LV_USE_TILEVIEW +#define LV_USE_TILEVIEW 1 +#endif +#if LV_USE_TILEVIEW +/*Time of slide animation [ms] (0: no animation)*/ +#ifndef LV_TILEVIEW_DEF_ANIM_TIME +# define LV_TILEVIEW_DEF_ANIM_TIME 300 +#endif #endif -/*Switch (dependencies: lv_slider)*/ -#ifndef LV_USE_SW -#define LV_USE_SW 1 +/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ +#ifndef LV_USE_WIN +#define LV_USE_WIN 1 #endif -/************************* +/*================== * Non-user section - *************************/ + *==================*/ + #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ #ifndef _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS From d85c138137911b57ed5745b5752dd2937f442848 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 4 Apr 2019 21:12:38 -0400 Subject: [PATCH 245/590] Disable clickable property on tables --- src/lv_objx/lv_table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index 0ae17c75688d..c57935f246ab 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -97,6 +97,7 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) } else { lv_table_set_style(new_table, LV_TABLE_STYLE_BG, &lv_style_plain_color); } + lv_obj_set_click(new_table, false); /*Can be removed if click support is added*/ } /*Copy an existing table*/ else { From 789e7a3a12545f21190767505e4a4ea407231f5e Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 4 Apr 2019 21:51:13 -0400 Subject: [PATCH 246/590] Add lv_obj_set_drag_dir and lv_obj_get_drag_dir --- src/lv_core/lv_indev.c | 22 +++++++++++++++++----- src/lv_core/lv_obj.c | 28 ++++++++++++++++++++++++++++ src/lv_core/lv_obj.h | 22 ++++++++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 5f0792c60ac6..886aeceb5e3e 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1030,6 +1030,8 @@ static void indev_drag(lv_indev_proc_t * state) if(lv_obj_get_drag(drag_obj) == false) return; + lv_drag_direction_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); + /*Count the movement by drag*/ state->types.pointer.drag_sum.x += state->types.pointer.vect.x; state->types.pointer.drag_sum.y += state->types.pointer.vect.y; @@ -1037,8 +1039,8 @@ static void indev_drag(lv_indev_proc_t * state) /*Enough move?*/ if(state->types.pointer.drag_limit_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ - if(LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit || - LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit) { + if(((allowed_dirs & LV_DRAG_DIR_HOR) && LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit) || + ((allowed_dirs & LV_DRAG_DIR_VER) && LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) { state->types.pointer.drag_limit_out = 1; } } @@ -1059,8 +1061,11 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); - lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, - act_y + state->types.pointer.vect.y); + if(allowed_dirs & LV_DRAG_DIR_HOR) + lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); + + if(allowed_dirs & LV_DRAG_DIR_VER) + lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y); /*Set the drag in progress flag if the object is really moved*/ if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { @@ -1115,6 +1120,8 @@ static void indev_drag_throw(lv_indev_proc_t * proc) return; } + lv_drag_direction_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); + /*Reduce the vectors*/ proc->types.pointer.drag_throw_vect.x = proc->types.pointer.drag_throw_vect.x * (100 - indev_act->driver.drag_throw) / 100; @@ -1127,7 +1134,12 @@ static void indev_drag_throw(lv_indev_proc_t * proc) lv_obj_get_coords(drag_obj, &coords_ori); lv_coord_t act_x = lv_obj_get_x(drag_obj) + proc->types.pointer.drag_throw_vect.x; lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->types.pointer.drag_throw_vect.y; - lv_obj_set_pos(drag_obj, act_x, act_y); + + if(allowed_dirs & LV_DRAG_DIR_HOR) + lv_obj_set_x(drag_obj, act_x ); + + if(allowed_dirs & LV_DRAG_DIR_VER) + lv_obj_set_y(drag_obj, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ce87afa80875..52cd04e7f354 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -253,6 +253,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Set attributes*/ new_obj->click = 1; new_obj->drag = 0; + new_obj->drag_dir = 0; new_obj->drag_throw = 0; new_obj->drag_parent = 0; new_obj->hidden = 0; @@ -296,6 +297,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Copy attributes*/ new_obj->click = copy->click; new_obj->drag = copy->drag; + new_obj->drag_dir = copy->drag_dir; new_obj->drag_throw = copy->drag_throw; new_obj->drag_parent = copy->drag_parent; new_obj->hidden = copy->hidden; @@ -1094,6 +1096,22 @@ void lv_obj_set_drag(lv_obj_t * obj, bool en) { if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/ obj->drag = (en == true ? 1 : 0); + if(en && obj->drag_dir == 0) { + obj->drag_dir = LV_DRAG_DIR_HOR | LV_DRAG_DIR_VER; + } +} + +/** + * Set the directions an object can be dragged in + * @param obj pointer to an object + * @param en true: make the object dragable + */ +void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_direction_t drag_dir) +{ + obj->drag_dir = drag_dir; + + if(obj->drag_dir != 0) + lv_obj_set_drag(obj, true); /*Drag direction requires drag*/ } /** @@ -1692,6 +1710,16 @@ bool lv_obj_get_drag(const lv_obj_t * obj) return obj->drag == 0 ? false : true; } +/** + * Get the directions an object can be dragged + * @param obj pointer to an object + * @return directions an object can be dragged + */ +lv_drag_direction_t lv_obj_get_drag_dir(const lv_obj_t * obj) +{ + return obj->drag_dir; +} + /** * Get the drag throw enable attribute of an object * @param obj pointer to an object diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index b2aeba8991d3..8180c3466b32 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -169,6 +169,13 @@ typedef struct } lv_reailgn_t; #endif +enum { + LV_DRAG_DIR_HOR = 0x1, + LV_DRAG_DIR_VER = 0x2 +}; + +typedef uint8_t lv_drag_direction_t; + typedef struct _lv_obj_t { struct _lv_obj_t * par; /*Pointer to the parent object*/ @@ -189,6 +196,7 @@ typedef struct _lv_obj_t /*Attributes and states*/ uint8_t click : 1; /*1: Can be pressed by an input device*/ uint8_t drag : 1; /*1: Enable the dragging*/ + lv_drag_direction_t drag_dir; /* Which directions the object can be dragged in */ uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ uint8_t hidden : 1; /*1: Object is hidden*/ @@ -446,6 +454,13 @@ void lv_obj_set_top(lv_obj_t * obj, bool en); */ void lv_obj_set_drag(lv_obj_t * obj, bool en); +/** + * Set the directions an object can be dragged in + * @param obj pointer to an object + * @param en true: make the object dragable + */ +void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_direction_t drag_dir); + /** * Enable the throwing of an object after is is dragged * @param obj pointer to an object @@ -736,6 +751,13 @@ bool lv_obj_get_top(const lv_obj_t * obj); */ bool lv_obj_get_drag(const lv_obj_t * obj); +/** + * Get the directions an object can be dragged + * @param obj pointer to an object + * @return directions an object can be dragged + */ +lv_drag_direction_t lv_obj_get_drag_dir(const lv_obj_t * obj); + /** * Get the drag throw enable attribute of an object * @param obj pointer to an object From 248521da53de2c25320af600644906ed5cb40e7c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 5 Apr 2019 06:16:07 +0200 Subject: [PATCH 247/590] lv_symbol_defs.h: replace macros with an enum with symbol names (#1000) --- src/lv_misc/lv_symbol_def.h | 234 ++++++++++++++++++------------------ 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index 8e432d9a7f4e..4c79f8405251 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -11,129 +11,129 @@ extern "C" { #include "../../../lv_conf.h" #endif -#define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define LV_SYMBOL_AUDIO _LV_SYMBOL_VALUE3(EF,A0,80) -#define LV_SYMBOL_VIDEO _LV_SYMBOL_VALUE3(EF,A0,81) -#define LV_SYMBOL_LIST _LV_SYMBOL_VALUE3(EF,A0,82) -#define LV_SYMBOL_OK _LV_SYMBOL_VALUE3(EF,A0,83) -#define LV_SYMBOL_CLOSE _LV_SYMBOL_VALUE3(EF,A0,84) -#define LV_SYMBOL_POWER _LV_SYMBOL_VALUE3(EF,A0,85) -#define LV_SYMBOL_SETTINGS _LV_SYMBOL_VALUE3(EF,A0,86) -#define LV_SYMBOL_TRASH _LV_SYMBOL_VALUE3(EF,A0,87) -#define LV_SYMBOL_HOME _LV_SYMBOL_VALUE3(EF,A0,88) -#define LV_SYMBOL_DOWNLOAD _LV_SYMBOL_VALUE3(EF,A0,89) -#define LV_SYMBOL_DRIVE _LV_SYMBOL_VALUE3(EF,A0,8A) -#define LV_SYMBOL_REFRESH _LV_SYMBOL_VALUE3(EF,A0,8B) -#define LV_SYMBOL_MUTE _LV_SYMBOL_VALUE3(EF,A0,8C) -#define LV_SYMBOL_VOLUME_MID _LV_SYMBOL_VALUE3(EF,A0,8D) -#define LV_SYMBOL_VOLUME_MAX _LV_SYMBOL_VALUE3(EF,A0,8E) -#define LV_SYMBOL_IMAGE _LV_SYMBOL_VALUE3(EF,A0,8F) -#define LV_SYMBOL_EDIT _LV_SYMBOL_VALUE3(EF,A0,90) -#define LV_SYMBOL_PREV _LV_SYMBOL_VALUE3(EF,A0,91) -#define LV_SYMBOL_PLAY _LV_SYMBOL_VALUE3(EF,A0,92) -#define LV_SYMBOL_PAUSE _LV_SYMBOL_VALUE3(EF,A0,93) -#define LV_SYMBOL_STOP _LV_SYMBOL_VALUE3(EF,A0,94) -#define LV_SYMBOL_NEXT _LV_SYMBOL_VALUE3(EF,A0,95) -#define LV_SYMBOL_EJECT _LV_SYMBOL_VALUE3(EF,A0,96) -#define LV_SYMBOL_LEFT _LV_SYMBOL_VALUE3(EF,A0,97) -#define LV_SYMBOL_RIGHT _LV_SYMBOL_VALUE3(EF,A0,98) -#define LV_SYMBOL_PLUS _LV_SYMBOL_VALUE3(EF,A0,99) -#define LV_SYMBOL_MINUS _LV_SYMBOL_VALUE3(EF,A0,9A) -#define LV_SYMBOL_WARNING _LV_SYMBOL_VALUE3(EF,A0,9B) -#define LV_SYMBOL_SHUFFLE _LV_SYMBOL_VALUE3(EF,A0,9C) -#define LV_SYMBOL_UP _LV_SYMBOL_VALUE3(EF,A0,9D) -#define LV_SYMBOL_DOWN _LV_SYMBOL_VALUE3(EF,A0,9E) -#define LV_SYMBOL_LOOP _LV_SYMBOL_VALUE3(EF,A0,9F) -#define LV_SYMBOL_DIRECTORY _LV_SYMBOL_VALUE3(EF,A0,A0) -#define LV_SYMBOL_UPLOAD _LV_SYMBOL_VALUE3(EF,A0,A1) -#define LV_SYMBOL_CALL _LV_SYMBOL_VALUE3(EF,A0,A2) -#define LV_SYMBOL_CUT _LV_SYMBOL_VALUE3(EF,A0,A3) -#define LV_SYMBOL_COPY _LV_SYMBOL_VALUE3(EF,A0,A4) -#define LV_SYMBOL_SAVE _LV_SYMBOL_VALUE3(EF,A0,A5) -#define LV_SYMBOL_CHARGE _LV_SYMBOL_VALUE3(EF,A0,A6) -#define LV_SYMBOL_BELL _LV_SYMBOL_VALUE3(EF,A0,A7) -#define LV_SYMBOL_KEYBOARD _LV_SYMBOL_VALUE3(EF,A0,A8) -#define LV_SYMBOL_GPS _LV_SYMBOL_VALUE3(EF,A0,A9) -#define LV_SYMBOL_FILE _LV_SYMBOL_VALUE3(EF,A0,AA) -#define LV_SYMBOL_WIFI _LV_SYMBOL_VALUE3(EF,A0,AB) -#define LV_SYMBOL_BATTERY_FULL _LV_SYMBOL_VALUE3(EF,A0,AC) -#define LV_SYMBOL_BATTERY_3 _LV_SYMBOL_VALUE3(EF,A0,AD) -#define LV_SYMBOL_BATTERY_2 _LV_SYMBOL_VALUE3(EF,A0,AE) -#define LV_SYMBOL_BATTERY_1 _LV_SYMBOL_VALUE3(EF,A0,AF) -#define LV_SYMBOL_BATTERY_EMPTY _LV_SYMBOL_VALUE3(EF,A0,B0) -#define LV_SYMBOL_BLUETOOTH _LV_SYMBOL_VALUE3(EF,A0,B1) -#define LV_SYMBOL_GLYPH_LAST 0xF831 -#define LV_SYMBOL_DUMMY _LV_SYMBOL_VALUE3(EF,A3,BF) /*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ -#define _LV_SYMBOL_VALUE3(x, y, z) (0x ## z ## y ## x) -#define _LV_SYMBOL_NUMSTR(sym) LV_ ## sym ## _NUMSTR = sym +#define LV_SYMBOL_GLYPH_FIRST 0xF800 +#define LV_SYMBOL_AUDIO "\xEF\xA0\x80" +#define LV_SYMBOL_VIDEO "\xEF\xA0\x81" +#define LV_SYMBOL_LIST "\xEF\xA0\x82" +#define LV_SYMBOL_OK "\xEF\xA0\x83" +#define LV_SYMBOL_CLOSE "\xEF\xA0\x84" +#define LV_SYMBOL_POWER "\xEF\xA0\x85" +#define LV_SYMBOL_SETTINGS "\xEF\xA0\x86" +#define LV_SYMBOL_TRASH "\xEF\xA0\x87" +#define LV_SYMBOL_HOME "\xEF\xA0\x88" +#define LV_SYMBOL_DOWNLOAD "\xEF\xA0\x89" +#define LV_SYMBOL_DRIVE "\xEF\xA0\x8A" +#define LV_SYMBOL_REFRESH "\xEF\xA0\x8B" +#define LV_SYMBOL_MUTE "\xEF\xA0\x8C" +#define LV_SYMBOL_VOLUME_MID "\xEF\xA0\x8D" +#define LV_SYMBOL_VOLUME_MAX "\xEF\xA0\x8E" +#define LV_SYMBOL_IMAGE "\xEF\xA0\x8F" +#define LV_SYMBOL_EDIT "\xEF\xA0\x90" +#define LV_SYMBOL_PREV "\xEF\xA0\x91" +#define LV_SYMBOL_PLAY "\xEF\xA0\x92" +#define LV_SYMBOL_PAUSE "\xEF\xA0\x93" +#define LV_SYMBOL_STOP "\xEF\xA0\x94" +#define LV_SYMBOL_NEXT "\xEF\xA0\x95" +#define LV_SYMBOL_EJECT "\xEF\xA0\x96" +#define LV_SYMBOL_LEFT "\xEF\xA0\x97" +#define LV_SYMBOL_RIGHT "\xEF\xA0\x98" +#define LV_SYMBOL_PLUS "\xEF\xA0\x99" +#define LV_SYMBOL_MINUS "\xEF\xA0\x9A" +#define LV_SYMBOL_WARNING "\xEF\xA0\x9B" +#define LV_SYMBOL_SHUFFLE "\xEF\xA0\x9C" +#define LV_SYMBOL_UP "\xEF\xA0\x9D" +#define LV_SYMBOL_DOWN "\xEF\xA0\x9E" +#define LV_SYMBOL_LOOP "\xEF\xA0\x9F" +#define LV_SYMBOL_DIRECTORY "\xEF\xA0\xA0" +#define LV_SYMBOL_UPLOAD "\xEF\xA0\xA1" +#define LV_SYMBOL_CALL "\xEF\xA0\xA2" +#define LV_SYMBOL_CUT "\xEF\xA0\xA3" +#define LV_SYMBOL_COPY "\xEF\xA0\xA4" +#define LV_SYMBOL_SAVE "\xEF\xA0\xA5" +#define LV_SYMBOL_CHARGE "\xEF\xA0\xA6" +#define LV_SYMBOL_BELL "\xEF\xA0\xA7" +#define LV_SYMBOL_KEYBOARD "\xEF\xA0\xA8" +#define LV_SYMBOL_GPS "\xEF\xA0\xA9" +#define LV_SYMBOL_FILE "\xEF\xA0\xAA" +#define LV_SYMBOL_WIFI "\xEF\xA0\xAB" +#define LV_SYMBOL_BATTERY_FULL "\xEF\xA0\xAC" +#define LV_SYMBOL_BATTERY_3 "\xEF\xA0\xAD" +#define LV_SYMBOL_BATTERY_2 "\xEF\xA0\xAE" +#define LV_SYMBOL_BATTERY_1 "\xEF\xA0\xAF" +#define LV_SYMBOL_BATTERY_EMPTY "\xEF\xA0\xB0" +#define LV_SYMBOL_BLUETOOTH "\xEF\xA0\xB1" +#define LV_SYMBOL_GLYPH_LAST 0xF831 -enum -{ - _LV_SYMBOL_NUMSTR(LV_SYMBOL_AUDIO), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_VIDEO), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_LIST), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_OK), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_CLOSE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_POWER), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_SETTINGS), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_TRASH), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_HOME), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWNLOAD), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_DRIVE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_REFRESH), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_MUTE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MID), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_VOLUME_MAX), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_IMAGE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_EDIT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_PREV), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLAY), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_PAUSE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_STOP), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_NEXT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_EJECT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_LEFT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_RIGHT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_PLUS), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_MINUS), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_WARNING), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_SHUFFLE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_UP), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_DOWN), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_LOOP), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_DIRECTORY), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_UPLOAD), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_CALL), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_CUT), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_COPY), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_SAVE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_CHARGE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BELL), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_KEYBOARD), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_GPS), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_FILE), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_WIFI), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_FULL), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_3), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_2), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_1), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BATTERY_EMPTY), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_BLUETOOTH), - _LV_SYMBOL_NUMSTR(LV_SYMBOL_DUMMY), -}; - -#undef _LV_SYMBOL_VALUE3 +/*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_DUMMY "\xEF\xA3\xBF" -#define _LV_SYMBOL_STR_(x) #x -#define _LV_SYMBOL_STR(x) _LV_SYMBOL_STR_(x) -#define _LV_SYMBOL_CHAR(c) \x ## c -#define _LV_SYMBOL_VALUE1(x) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)) -#define _LV_SYMBOL_VALUE3(x, y, z) _LV_SYMBOL_STR(_LV_SYMBOL_CHAR(x)_LV_SYMBOL_CHAR(y)_LV_SYMBOL_CHAR(z)) +/* + * following list is generated using + * cat lv_symbol_def.h | sed -E -n 's/^#define\s+(SYMBOL_\w+).*$/ _LV_STR_\1,/p' + */ +enum { + _LV_STR_SYMBOL_AUDIO, + _LV_STR_SYMBOL_VIDEO, + _LV_STR_SYMBOL_LIST, + _LV_STR_SYMBOL_OK, + _LV_STR_SYMBOL_CLOSE, + _LV_STR_SYMBOL_POWER, + _LV_STR_SYMBOL_SETTINGS, + _LV_STR_SYMBOL_TRASH, + _LV_STR_SYMBOL_HOME, + _LV_STR_SYMBOL_DOWNLOAD, + _LV_STR_SYMBOL_DRIVE, + _LV_STR_SYMBOL_REFRESH, + _LV_STR_SYMBOL_MUTE, + _LV_STR_SYMBOL_VOLUME_MID, + _LV_STR_SYMBOL_VOLUME_MAX, + _LV_STR_SYMBOL_IMAGE, + _LV_STR_SYMBOL_EDIT, + _LV_STR_SYMBOL_PREV, + _LV_STR_SYMBOL_PLAY, + _LV_STR_SYMBOL_PAUSE, + _LV_STR_SYMBOL_STOP, + _LV_STR_SYMBOL_NEXT, + _LV_STR_SYMBOL_EJECT, + _LV_STR_SYMBOL_LEFT, + _LV_STR_SYMBOL_RIGHT, + _LV_STR_SYMBOL_PLUS, + _LV_STR_SYMBOL_MINUS, + _LV_STR_SYMBOL_WARNING, + _LV_STR_SYMBOL_SHUFFLE, + _LV_STR_SYMBOL_UP, + _LV_STR_SYMBOL_DOWN, + _LV_STR_SYMBOL_LOOP, + _LV_STR_SYMBOL_DIRECTORY, + _LV_STR_SYMBOL_UPLOAD, + _LV_STR_SYMBOL_CALL, + _LV_STR_SYMBOL_CUT, + _LV_STR_SYMBOL_COPY, + _LV_STR_SYMBOL_SAVE, + _LV_STR_SYMBOL_CHARGE, + _LV_STR_SYMBOL_BELL, + _LV_STR_SYMBOL_KEYBOARD, + _LV_STR_SYMBOL_GPS, + _LV_STR_SYMBOL_FILE, + _LV_STR_SYMBOL_WIFI, + _LV_STR_SYMBOL_BATTERY_FULL, + _LV_STR_SYMBOL_BATTERY_3, + _LV_STR_SYMBOL_BATTERY_2, + _LV_STR_SYMBOL_BATTERY_1, + _LV_STR_SYMBOL_BATTERY_EMPTY, + _LV_STR_SYMBOL_BLUETOOTH, + _LV_STR_SYMBOL_DUMMY, +}; #ifdef __cplusplus } /* extern "C" */ #endif -#endif /*LV_LV_SYMBOL_DEF_H*/ +#endif /*LV_SYMBOL_DEF_H*/ + + + + + From 6df66140165dad3398fa8a55ef9650ee025a4c9b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 5 Apr 2019 06:55:35 +0200 Subject: [PATCH 248/590] update GPU inteface with 2D fill --- src/lv_draw/lv_draw_basic.c | 16 ++++++++-------- src/lv_hal/lv_hal_disp.c | 4 ++-- src/lv_hal/lv_hal_disp.h | 16 +++++++++------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index df37b8677b09..4894dd79319b 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -157,16 +157,16 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ /*Not opaque fill*/ else if(opa == LV_OPA_COVER) { /*Use hw fill if present*/ - if(disp->driver.mem_fill) { + if(disp->driver.mem_fill_cb) { lv_coord_t row; for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_fill(&vdb_buf_tmp[vdb_rel_a.x1], w, color); + disp->driver.mem_fill_cb(vdb->buf_act, &vdb->area, &vdb_rel_a, color); vdb_buf_tmp += vdb_width; } } /*Use hw blend if present and the area is not too small*/ else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && - disp->driver.mem_blend) { + disp->driver.mem_blend_cb) { /*Fill a one line sized buffer with a color and blend this later*/ if(color_array_tmp[0].full != color.full || last_width != w) { uint16_t i; @@ -179,7 +179,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ /*Blend the filled line to every line VDB line-by-line*/ lv_coord_t row; for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_blend(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); + disp->driver.mem_blend_cb(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); vdb_buf_tmp += vdb_width; } @@ -193,7 +193,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ /*Fill with opacity*/ else { /*Use hw blend if present*/ - if(disp->driver.mem_blend) { + if(disp->driver.mem_blend_cb) { if(color_array_tmp[0].full != color.full || last_width != w) { uint16_t i; for(i = 0; i < w; i++) { @@ -204,7 +204,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ } lv_coord_t row; for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_blend(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); + disp->driver.mem_blend_cb(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); vdb_buf_tmp += vdb_width; } @@ -442,10 +442,10 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint else { for(row = masked_a.y1; row <= masked_a.y2; row++) { #if LV_USE_GPU - if(disp->driver.mem_blend == false) { + if(disp->driver.mem_blend_cb == false) { sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } else { - disp->driver.mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); + disp->driver.mem_blend_cb(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } #else sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 892bfac09573..5ec49d1a7a9c 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -67,8 +67,8 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) #endif #if LV_USE_GPU - driver->mem_blend = NULL; - driver->mem_fill = NULL; + driver->mem_blend_cb = NULL; + driver->mem_fill_cb = NULL; #endif driver->set_px_cb = NULL; diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 5a138cceb440..5ffde953c444 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -90,6 +90,15 @@ typedef struct _disp_drv_t * number of flushed pixels */ void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); + +#if LV_USE_GPU + /*OPTIONAL: Blend two memories using opacity (GPU only)*/ + void (*mem_blend_cb)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); + + /*OPTIONAL: Fill a memory with a color (GPU only)*/ + void (*mem_fill_cb)(lv_color_t * dest_buf, const lv_area_t * dest_area, const lv_area_t * fill_area, lv_color_t color); +#endif + #if LV_USE_USER_DATA_SINGLE lv_disp_drv_user_data_t user_data; #endif @@ -101,13 +110,6 @@ typedef struct _disp_drv_t lv_disp_drv_user_data_t monitor_user_data; #endif -#if LV_USE_GPU - /*OPTIONAL: Blend two memories using opacity (GPU only)*/ - void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); - - /*OPTIONAL: Fill a memory with a color (GPU only)*/ - void (*mem_fill)(lv_color_t * dest, uint32_t length, lv_color_t color); -#endif } lv_disp_drv_t; From c58fd97cf7f35b5091342f116a3c2b317eb434e0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 5 Apr 2019 06:57:51 +0200 Subject: [PATCH 249/590] gpu fill fix --- src/lv_draw/lv_draw_basic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 4894dd79319b..144fc4733446 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -158,11 +158,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ else if(opa == LV_OPA_COVER) { /*Use hw fill if present*/ if(disp->driver.mem_fill_cb) { - lv_coord_t row; - for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_fill_cb(vdb->buf_act, &vdb->area, &vdb_rel_a, color); - vdb_buf_tmp += vdb_width; - } + disp->driver.mem_fill_cb(vdb->buf_act, &vdb->area, &vdb_rel_a, color); } /*Use hw blend if present and the area is not too small*/ else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && From 912b014b0364a0591916c340a4c94f5fcd49659e Mon Sep 17 00:00:00 2001 From: manison Date: Mon, 18 Mar 2019 11:15:43 +0100 Subject: [PATCH 250/590] fix return value type --- src/lv_draw/lv_draw_img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 85e106be8736..9b1849164844 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -142,9 +142,9 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) header->cf = LV_IMG_CF_ALPHA_1BIT; } else { LV_LOG_WARN("Image get info found unknown src type"); - return false; + return LV_RES_INV; } - return true; + return LV_RES_OK; } /** From b3f4bd1c46b0f9927d4a1c09d4e595ae818e8b96 Mon Sep 17 00:00:00 2001 From: manison Date: Fri, 5 Apr 2019 14:10:38 +0200 Subject: [PATCH 251/590] only close file if it was successfully opened and return error from lv_img_dsc_get_info on file operation failure --- src/lv_draw/lv_draw_img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 9b1849164844..be9eba7dac41 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -120,6 +120,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) res = lv_fs_open(&file, src, LV_FS_MODE_RD); if(res == LV_FS_RES_OK) { res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn); + lv_fs_close(&file); } /*Create a dummy header on fs error*/ @@ -127,9 +128,8 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) header->w = LV_DPI; header->h = LV_DPI; header->cf = LV_IMG_CF_UNKNOWN; + return LV_RES_INV; } - - lv_fs_close(&file); } #endif else if(src_type == LV_IMG_SRC_SYMBOL) { From 5db6b737251f7c54862b9df55e2f74d9e9b64f4e Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 5 Apr 2019 08:48:39 -0400 Subject: [PATCH 252/590] Change lv_drag_direction_t to lv_drag_dir_t and update documentation --- src/lv_core/lv_indev.c | 4 ++-- src/lv_core/lv_obj.c | 8 ++++---- src/lv_core/lv_obj.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 886aeceb5e3e..af2062570f11 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1030,7 +1030,7 @@ static void indev_drag(lv_indev_proc_t * state) if(lv_obj_get_drag(drag_obj) == false) return; - lv_drag_direction_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); + lv_drag_dir_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); /*Count the movement by drag*/ state->types.pointer.drag_sum.x += state->types.pointer.vect.x; @@ -1120,7 +1120,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) return; } - lv_drag_direction_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); + lv_drag_dir_t allowed_dirs = lv_obj_get_drag_dir(drag_obj); /*Reduce the vectors*/ proc->types.pointer.drag_throw_vect.x = diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 52cd04e7f354..cc37886dd0d4 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1104,9 +1104,9 @@ void lv_obj_set_drag(lv_obj_t * obj, bool en) /** * Set the directions an object can be dragged in * @param obj pointer to an object - * @param en true: make the object dragable + * @param drag_dir bitwise OR of allowed directions an object can be dragged in */ -void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_direction_t drag_dir) +void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir) { obj->drag_dir = drag_dir; @@ -1713,9 +1713,9 @@ bool lv_obj_get_drag(const lv_obj_t * obj) /** * Get the directions an object can be dragged * @param obj pointer to an object - * @return directions an object can be dragged + * @return bitwise OR of allowed directions an object can be dragged in */ -lv_drag_direction_t lv_obj_get_drag_dir(const lv_obj_t * obj) +lv_drag_dir_t lv_obj_get_drag_dir(const lv_obj_t * obj) { return obj->drag_dir; } diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 8180c3466b32..6cc9a3275fe3 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -174,7 +174,7 @@ enum { LV_DRAG_DIR_VER = 0x2 }; -typedef uint8_t lv_drag_direction_t; +typedef uint8_t lv_drag_dir_t; typedef struct _lv_obj_t { @@ -196,7 +196,7 @@ typedef struct _lv_obj_t /*Attributes and states*/ uint8_t click : 1; /*1: Can be pressed by an input device*/ uint8_t drag : 1; /*1: Enable the dragging*/ - lv_drag_direction_t drag_dir; /* Which directions the object can be dragged in */ + lv_drag_dir_t drag_dir : 2; /* Which directions the object can be dragged in */ uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ uint8_t hidden : 1; /*1: Object is hidden*/ @@ -457,9 +457,9 @@ void lv_obj_set_drag(lv_obj_t * obj, bool en); /** * Set the directions an object can be dragged in * @param obj pointer to an object - * @param en true: make the object dragable + * @param drag_dir bitwise OR of allowed drag directions */ -void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_direction_t drag_dir); +void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir); /** * Enable the throwing of an object after is is dragged @@ -754,9 +754,9 @@ bool lv_obj_get_drag(const lv_obj_t * obj); /** * Get the directions an object can be dragged * @param obj pointer to an object - * @return directions an object can be dragged + * @return bitwise OR of allowed directions an object can be dragged in */ -lv_drag_direction_t lv_obj_get_drag_dir(const lv_obj_t * obj); +lv_drag_dir_t lv_obj_get_drag_dir(const lv_obj_t * obj); /** * Get the drag throw enable attribute of an object From cbd32d9f2833d2ba5259b595579e0ac231059e8b Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 5 Apr 2019 14:17:51 -0400 Subject: [PATCH 253/590] Update drag logic to consider the movement of a pointer device as drag It no longer requires the object to have been moved before drag starts. --- src/lv_core/lv_indev.c | 52 ++++++++++++------------------------------ 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index af2062570f11..63f7d05c440d 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1039,8 +1039,10 @@ static void indev_drag(lv_indev_proc_t * state) /*Enough move?*/ if(state->types.pointer.drag_limit_out == 0) { /*If a move is greater then LV_DRAG_LIMIT then begin the drag*/ - if(((allowed_dirs & LV_DRAG_DIR_HOR) && LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit) || - ((allowed_dirs & LV_DRAG_DIR_VER) && LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) { + if(((allowed_dirs & LV_DRAG_DIR_HOR) && + LV_MATH_ABS(state->types.pointer.drag_sum.x) >= indev_act->driver.drag_limit) || + ((allowed_dirs & LV_DRAG_DIR_VER) && + LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) { state->types.pointer.drag_limit_out = 1; } } @@ -1053,42 +1055,20 @@ static void indev_drag(lv_indev_proc_t * state) /*Get the coordinates of the object and modify them*/ lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); - uint16_t inv_buf_size = lv_disp_get_inv_buf_size( - indev_act->driver.disp); /*Get the number of currently invalidated areas*/ - - lv_coord_t prev_x = drag_obj->coords.x1; - lv_coord_t prev_y = drag_obj->coords.y1; - lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); - lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); if(allowed_dirs & LV_DRAG_DIR_HOR) - lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); + lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); if(allowed_dirs & LV_DRAG_DIR_VER) - lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y); - - /*Set the drag in progress flag if the object is really moved*/ - if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) { - if(state->types.pointer.drag_in_prog != - 0) { /*Send the drag begin signal on first move*/ - drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); - if(state->reset_query != 0) return; - } - state->types.pointer.drag_in_prog = 1; - } - /*If the object didn't moved then clear the invalidated areas*/ - else { - /*In a special case if the object is moved on a page and - * the scrollable has fit == true and the object is dragged of the page then - * while its coordinate is not changing only the parent's size is reduced */ - lv_coord_t act_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); - lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); - if(act_par_w == prev_par_w && act_par_h == prev_par_h) { - uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); - lv_disp_pop_from_inv_buf(indev_act->driver.disp, - new_inv_buf_size - inv_buf_size); - } + lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y); + + /*Set the drag in progress flag*/ + /*Send the drag begin signal on first move*/ + if(state->types.pointer.drag_in_prog == 0) { + drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); + if(state->reset_query != 0) return; } + state->types.pointer.drag_in_prog = 1; } } } @@ -1135,11 +1115,9 @@ static void indev_drag_throw(lv_indev_proc_t * proc) lv_coord_t act_x = lv_obj_get_x(drag_obj) + proc->types.pointer.drag_throw_vect.x; lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->types.pointer.drag_throw_vect.y; - if(allowed_dirs & LV_DRAG_DIR_HOR) - lv_obj_set_x(drag_obj, act_x ); + if(allowed_dirs & LV_DRAG_DIR_HOR) lv_obj_set_x(drag_obj, act_x); - if(allowed_dirs & LV_DRAG_DIR_VER) - lv_obj_set_y(drag_obj, act_y); + if(allowed_dirs & LV_DRAG_DIR_VER) lv_obj_set_y(drag_obj, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); From 9c8296edf998acb35e6bb0242e20e87e0ad66efc Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 5 Apr 2019 14:52:04 -0400 Subject: [PATCH 254/590] Fix off-by-one error in lv_calendar --- src/lv_objx/lv_calendar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 35585defcf30..428377e0c73f 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -706,7 +706,7 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) uint32_t i; for(i = 0; i < 7; i++) { label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; - label_area.x2 = label_area.x1 + box_w; + label_area.x2 = label_area.x1 + box_w - 1; lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, NULL, -1, -1); } @@ -805,7 +805,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + style_bg->body.padding.right; - label_area.x2 = label_area.x1 + box_w; + label_area.x2 = label_area.x1 + box_w - 1; /*Draw the "today box"*/ if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && From 65b83dd1c1ed7261c1e7ce9c203a576af944dd26 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sat, 6 Apr 2019 16:28:49 +0430 Subject: [PATCH 255/590] define lv_chart_set_update_mode function --- src/lv_objx/lv_chart.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 51759cd6ebde..af1a7c9c986b 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -400,6 +400,20 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) } } +/** + * Set update mode of the chart object. + * @param chart pointer to a chart object + * @param update mode + */ +void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode) +{ + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(ext->update_mode == update_mode) return; + + ext->update_mode = update_mode; + lv_obj_invalidate(chart); +} + /*===================== * Getter functions *====================*/ From c7d582e403f9e9c5af60eee0ded761fccf48ec68 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sat, 6 Apr 2019 16:30:01 +0430 Subject: [PATCH 256/590] declare lv_chart_set_update_mode fucntion --- src/lv_objx/lv_chart.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 14ec08af95bf..4d95df3ef873 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -192,6 +192,13 @@ void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * */ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y); +/** + * Set update mode of the chart object. + * @param chart pointer to a chart object + * @param update mode + */ +void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode); + /** * Set the style of a chart * @param chart pointer to a chart object From e47750864e513ddd81aded59220e8f6553cd7727 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 8 Apr 2019 14:36:20 +0200 Subject: [PATCH 257/590] rename LV_GROUP_KEY to LV_KEY --- porting/lv_port_indev_template.c | 10 +++++----- src/lv_core/lv_group.c | 2 +- src/lv_core/lv_group.h | 26 +++++++++++++------------- src/lv_core/lv_indev.c | 24 ++++++++++++------------ src/lv_objx/lv_btn.c | 6 +++--- src/lv_objx/lv_btnm.c | 8 ++++---- src/lv_objx/lv_calendar.c | 4 ++-- src/lv_objx/lv_cb.c | 4 ++-- src/lv_objx/lv_ddlist.c | 6 +++--- src/lv_objx/lv_list.c | 4 ++-- src/lv_objx/lv_mbox.c | 6 +++--- src/lv_objx/lv_page.c | 12 ++++++------ src/lv_objx/lv_page.h | 6 +++--- src/lv_objx/lv_roller.c | 4 ++-- src/lv_objx/lv_slider.c | 4 ++-- src/lv_objx/lv_spinbox.c | 8 ++++---- src/lv_objx/lv_sw.c | 4 ++-- src/lv_objx/lv_ta.c | 18 +++++++++--------- 18 files changed, 78 insertions(+), 78 deletions(-) diff --git a/porting/lv_port_indev_template.c b/porting/lv_port_indev_template.c index 2e243190f8ad..7666023bf4e9 100644 --- a/porting/lv_port_indev_template.c +++ b/porting/lv_port_indev_template.c @@ -296,19 +296,19 @@ static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) /*Translate the keys to LittlevGL control characters according to your key definitions*/ switch(act_key) { case 1: - act_key = LV_GROUP_KEY_NEXT; + act_key = LV_KEY_NEXT; break; case 2: - act_key = LV_GROUP_KEY_PREV; + act_key = LV_KEY_PREV; break; case 3: - act_key = LV_GROUP_KEY_LEFT; + act_key = LV_KEY_LEFT; break; case 4: - act_key = LV_GROUP_KEY_RIGHT; + act_key = LV_KEY_RIGHT; break; case 5: - act_key = LV_GROUP_KEY_ENTER; + act_key = LV_KEY_ENTER; break; } diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 66782fa4b70f..7ea018548a1d 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -276,7 +276,7 @@ void lv_group_focus_freeze(lv_group_t * group, bool en) /** * Send a control character to the focuses object of a group * @param group pointer to a group - * @param c a character (use LV_GROUP_KEY_.. to navigate) + * @param c a character (use LV_KEY_.. to navigate) * @return result of focused object in group. */ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index fa364432f97d..f33ed03a70f0 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -26,18 +26,18 @@ extern "C" { *********************/ /*Predefined keys to control the focused object via lv_group_send(group, c)*/ /*For compatibility in signal function define the keys regardless to LV_GROUP*/ -#define LV_GROUP_KEY_UP 17 /*0x11*/ -#define LV_GROUP_KEY_DOWN 18 /*0x12*/ -#define LV_GROUP_KEY_RIGHT 19 /*0x13*/ -#define LV_GROUP_KEY_LEFT 20 /*0x14*/ -#define LV_GROUP_KEY_ESC 27 /*0x1B*/ -#define LV_GROUP_KEY_DEL 127 /*0x7F*/ -#define LV_GROUP_KEY_BACKSPACE 8 /*0x08*/ -#define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/ -#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ -#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ -#define LV_GROUP_KEY_HOME 2 /*0x02, STX*/ -#define LV_GROUP_KEY_END 3 /*0x03, ETX*/ +#define LV_KEY_UP 17 /*0x11*/ +#define LV_KEY_DOWN 18 /*0x12*/ +#define LV_KEY_RIGHT 19 /*0x13*/ +#define LV_KEY_LEFT 20 /*0x14*/ +#define LV_KEY_ESC 27 /*0x1B*/ +#define LV_KEY_DEL 127 /*0x7F*/ +#define LV_KEY_BACKSPACE 8 /*0x08*/ +#define LV_KEY_ENTER 10 /*0x0A, '\n'*/ +#define LV_KEY_NEXT 9 /*0x09, '\t'*/ +#define LV_KEY_PREV 11 /*0x0B, '*/ +#define LV_KEY_HOME 2 /*0x02, STX*/ +#define LV_KEY_END 3 /*0x03, ETX*/ #if LV_USE_GROUP != 0 /********************** @@ -144,7 +144,7 @@ void lv_group_focus_freeze(lv_group_t * group, bool en); /** * Send a control character to the focuses object of a group * @param group pointer to a group - * @param c a character (use LV_GROUP_KEY_.. to navigate) + * @param c a character (use LV_KEY_.. to navigate) * @return result of focused object in group. */ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c); diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 5f0792c60ac6..d57af72e0a01 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -401,24 +401,24 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.pr_timestamp = lv_tick_get(); /*Simulate a press on the object if ENTER was pressed*/ - if(data->key == LV_GROUP_KEY_ENTER) { + if(data->key == LV_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ /*Send the ENTER as a normal KEY*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); + lv_group_send_data(g, LV_KEY_ENTER); } /*Move the focus on NEXT*/ - else if(data->key == LV_GROUP_KEY_NEXT) { + else if(data->key == LV_KEY_NEXT) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on PREV*/ - else if(data->key == LV_GROUP_KEY_PREV) { + else if(data->key == LV_KEY_PREV) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); @@ -435,7 +435,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { i->proc.long_pr_sent = 1; - if(data->key == LV_GROUP_KEY_ENTER) { + if(data->key == LV_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ @@ -450,21 +450,21 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.longpr_rep_timestamp = lv_tick_get(); /*Send LONG_PRESS_REP on ENTER*/ - if(data->key == LV_GROUP_KEY_ENTER) { + if(data->key == LV_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on NEXT again*/ - else if(data->key == LV_GROUP_KEY_NEXT) { + else if(data->key == LV_KEY_NEXT) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on PREV again*/ - else if(data->key == LV_GROUP_KEY_PREV) { + else if(data->key == LV_KEY_PREV) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); @@ -481,7 +481,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) else if(data->state == LV_INDEV_STATE_REL && prev_state == LV_INDEV_STATE_PR) { /*The user might clear the key when it was released. Always release the pressed key*/ data->key = prev_key; - if(data->key == LV_GROUP_KEY_ENTER) { + if(data->key == LV_KEY_ENTER) { focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ @@ -535,9 +535,9 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(lv_group_get_editing(g)) { int32_t s; if(data->enc_diff < 0) { - for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_GROUP_KEY_LEFT); + for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(g, LV_KEY_LEFT); } else if(data->enc_diff > 0) { - for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_GROUP_KEY_RIGHT); + for(s = 0; s < data->enc_diff; s++) lv_group_send_data(g, LV_KEY_RIGHT); } } /*In navigate mode focus on the next/prev objects*/ @@ -633,7 +633,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_event_send(focused, LV_EVENT_RELEASED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_group_send_data(g, LV_GROUP_KEY_ENTER); + lv_group_send_data(g, LV_KEY_ENTER); } } /*If the focused object is editable and now in navigate mode then on enter switch edit diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 6c64f3871ad9..1771514d510b 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -600,13 +600,13 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) #endif } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_UP) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); } - // else if(c == LV_GROUP_KEY_ENTER) { + // else if(c == LV_KEY_ENTER) { // if(lv_btn_get_toggle(btn)) { // if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) // lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); else if(state == diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 7d4e74fdd836..98ccdd925266 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -817,7 +817,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_obj_invalidate(btnm); } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT) { + if(c == LV_KEY_RIGHT) { if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; else @@ -825,12 +825,12 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1; ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_LEFT) { + } else if(c == LV_KEY_LEFT) { if(ext->btn_id_pr == LV_BTNM_BTN_NONE) ext->btn_id_pr = 0; if(ext->btn_id_pr > 0) ext->btn_id_pr--; ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_DOWN) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { @@ -852,7 +852,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); - } else if(c == LV_GROUP_KEY_UP) { + } else if(c == LV_KEY_UP) { lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 35585defcf30..311b0f1db2ad 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -528,7 +528,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * } else if(sign == LV_SIGNAL_CONTROL) { uint8_t c = *((uint8_t *)param); lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_UP) { if(ext->showed_date.month >= 12) { ext->showed_date.month = 1; ext->showed_date.year++; @@ -536,7 +536,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * ext->showed_date.month++; } lv_obj_invalidate(calendar); - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { if(ext->showed_date.month <= 1) { ext->showed_date.month = 12; ext->showed_date.year--; diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index a96e1bd9d37e..dba03b4a8883 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -322,8 +322,8 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN || c == LV_GROUP_KEY_LEFT || - c == LV_GROUP_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN || c == LV_KEY_LEFT || + c == LV_KEY_UP) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } } else if(sign == LV_SIGNAL_GET_TYPE) { diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index d1407f95c706..30ca7183c6c8 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -668,7 +668,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par } } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { + if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) { if(!ext->opened) { ext->opened = 1; lv_ddlist_refr_size(ddlist, true); @@ -679,7 +679,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_ddlist_pos_current_option(ddlist); lv_obj_invalidate(ddlist); } - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) { if(!ext->opened) { ext->opened = 1; lv_ddlist_refr_size(ddlist, true); @@ -689,7 +689,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par lv_ddlist_pos_current_option(ddlist); lv_obj_invalidate(ddlist); } - } else if(c == LV_GROUP_KEY_ESC) { + } else if(c == LV_KEY_ESC) { if(ext->opened) { ext->opened = 0; ext->sel_opt_id = ext->sel_opt_id_ori; diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index c8c135fe45a7..887edb60e8b6 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -812,7 +812,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) #if LV_USE_GROUP char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { + if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); /*If there is a valid selected button the make the previous selected*/ if(ext->selected_btn) { @@ -827,7 +827,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) list, btn); /*If there are no buttons on the list then there is no first button*/ } - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); /*If there is a valid selected button the make the next selected*/ if(ext->selected_btn != NULL) { diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 8a5a348713db..ca626f1ee4df 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -406,12 +406,12 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) { lv_res_t res; - /*Translate LV_GROUP_KEY_UP/DOWN to LV_GROUP_KEY_LEFT/RIGHT */ + /*Translate LV_KEY_UP/DOWN to LV_KEY_LEFT/RIGHT */ char c_trans = 0; if(sign == LV_SIGNAL_CONTROL) { c_trans = *((char *)param); - if(c_trans == LV_GROUP_KEY_DOWN) c_trans = LV_GROUP_KEY_LEFT; - if(c_trans == LV_GROUP_KEY_UP) c_trans = LV_GROUP_KEY_RIGHT; + if(c_trans == LV_KEY_DOWN) c_trans = LV_KEY_LEFT; + if(c_trans == LV_KEY_UP) c_trans = LV_KEY_RIGHT; param = &c_trans; } diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index e5e99f5d7f2a..d81e3ce28c06 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -204,7 +204,7 @@ void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode) /** * Enable/Disable scrolling with arrows if the page is in group (arrows: - * LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) + * LV_KEY_LEFT/RIGHT/UP/DOWN) * @param page pointer to a page object * @param en true: enable scrolling with arrows */ @@ -290,7 +290,7 @@ lv_sb_mode_t lv_page_get_sb_mode(const lv_obj_t * page) } /** - * Get the the scrolling with arrows (LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) is enabled or not + * Get the the scrolling with arrows (LV_KEY_LEFT/RIGHT/UP/DOWN) is enabled or not * @param page pointer to a page object * @return true: scrolling with arrows is enabled */ @@ -818,18 +818,18 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CONTROL) { uint32_t c = *((uint32_t *)param); - if((c == LV_GROUP_KEY_DOWN) && ext->arrow_scroll) { + if((c == LV_KEY_DOWN) && ext->arrow_scroll) { lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4); - } else if((c == LV_GROUP_KEY_UP) && ext->arrow_scroll) { + } else if((c == LV_KEY_UP) && ext->arrow_scroll) { lv_page_scroll_ver(page, lv_obj_get_height(page) / 4); - } else if((c == LV_GROUP_KEY_RIGHT) && ext->arrow_scroll) { + } else if((c == LV_KEY_RIGHT) && ext->arrow_scroll) { /*If the page can't be scrolled horizontally because it's not wide enough then scroll it * vertically*/ if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) lv_page_scroll_ver(page, -lv_obj_get_height(page) / 4); else lv_page_scroll_hor(page, -lv_obj_get_width(page) / 4); - } else if((c == LV_GROUP_KEY_LEFT) && ext->arrow_scroll) { + } else if((c == LV_KEY_LEFT) && ext->arrow_scroll) { /*If the page can't be scrolled horizontally because it's not wide enough then scroll it * vertically*/ if(lv_page_get_scrl_width(page) <= lv_obj_get_width(page)) diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 17c7e8ab2c52..0d7865ce7aee 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -91,7 +91,7 @@ typedef struct In Progress)*/ } edge_flash; - uint8_t arrow_scroll : 1; /*1: Enable scrolling with LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN*/ + uint8_t arrow_scroll : 1; /*1: Enable scrolling with LV_KEY_LEFT/RIGHT/UP/DOWN*/ uint8_t scroll_prop : 1; /*1: Propagate the scrolling the the parent if the edge is reached*/ uint8_t scroll_prop_ip : 1; /*1: Scroll propagation is in progress (used by the library)*/ } lv_page_ext_t; @@ -142,7 +142,7 @@ void lv_page_set_sb_mode(lv_obj_t * page, lv_sb_mode_t sb_mode); /** * Enable/Disable scrolling with arrows if the page is in group (arrows: - * LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) + * LV_KEY_LEFT/RIGHT/UP/DOWN) * @param page pointer to a page object * @param en true: enable scrolling with arrows */ @@ -251,7 +251,7 @@ void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style lv_sb_mode_t lv_page_get_sb_mode(const lv_obj_t * page); /** - * Get the the scrolling with arrows (LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN) is enabled or not + * Get the the scrolling with arrows (LV_KEY_LEFT/RIGHT/UP/DOWN) is enabled or not * @param page pointer to a page object * @return true: scrolling with arrows is enabled */ diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 5cb3ab7acdee..dcfc5c0706ae 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -452,14 +452,14 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par #endif } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_DOWN) { + if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) { if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id + 1, true); ext->ddlist.sel_opt_id_ori = ori_id; } - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_UP) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) { if(ext->ddlist.sel_opt_id > 0) { uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 231e6f862646..47341778a85f 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -559,11 +559,11 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par ext->drag_value = LV_SLIDER_NOT_PRESSED; - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_UP) { lv_slider_set_value(slider, lv_slider_get_value(slider) + 1, true); res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { lv_slider_set_value(slider, lv_slider_get_value(slider) - 1, true); res = lv_event_send(slider, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 8efbab771f64..8fcb7c801df5 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -353,19 +353,19 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ - if(c == LV_GROUP_KEY_RIGHT) { + if(c == LV_KEY_RIGHT) { if(indev_type == LV_INDEV_TYPE_ENCODER) lv_spinbox_increment(spinbox); else lv_spinbox_step_next(spinbox); - } else if(c == LV_GROUP_KEY_LEFT) { + } else if(c == LV_KEY_LEFT) { if(indev_type == LV_INDEV_TYPE_ENCODER) lv_spinbox_decrement(spinbox); else lv_spinbox_step_previous(spinbox); - } else if(c == LV_GROUP_KEY_UP) { + } else if(c == LV_KEY_UP) { lv_spinbox_increment(spinbox); - } else if(c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_DOWN) { lv_spinbox_decrement(spinbox); } else { lv_ta_add_char(spinbox, c); diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 82ab4bef4ee7..301fc6e1a73f 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -350,11 +350,11 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_UP) { lv_slider_set_value(sw, LV_SW_MAX_VALUE, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; - } else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) { + } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { lv_slider_set_value(sw, 0, true); res = lv_event_send(sw, LV_EVENT_VALUE_CHANGED, NULL); if(res != LV_RES_OK) return res; diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 6c68192685e6..813df66f71d7 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -368,7 +368,7 @@ void lv_ta_del_char(lv_obj_t * ta) if(cur_pos == 0) return; ta_insert_replace = NULL; - char del_buf[2] = {LV_GROUP_KEY_DEL, '\0'}; + char del_buf[2] = {LV_KEY_DEL, '\0'}; lv_event_send(ta, LV_EVENT_INSERT, del_buf); if(ta_insert_replace) { if(ta_insert_replace[0] == '\0') return; /*Drop this text*/ @@ -1276,21 +1276,21 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_CONTROL) { uint32_t c = *((uint32_t *)param); /*uint32_t because can be UTF-8*/ - if(c == LV_GROUP_KEY_RIGHT) + if(c == LV_KEY_RIGHT) lv_ta_cursor_right(ta); - else if(c == LV_GROUP_KEY_LEFT) + else if(c == LV_KEY_LEFT) lv_ta_cursor_left(ta); - else if(c == LV_GROUP_KEY_UP) + else if(c == LV_KEY_UP) lv_ta_cursor_up(ta); - else if(c == LV_GROUP_KEY_DOWN) + else if(c == LV_KEY_DOWN) lv_ta_cursor_down(ta); - else if(c == LV_GROUP_KEY_BACKSPACE) + else if(c == LV_KEY_BACKSPACE) lv_ta_del_char(ta); - else if(c == LV_GROUP_KEY_DEL) + else if(c == LV_KEY_DEL) lv_ta_del_char_forward(ta); - else if(c == LV_GROUP_KEY_HOME) + else if(c == LV_KEY_HOME) lv_ta_set_cursor_pos(ta, 0); - else if(c == LV_GROUP_KEY_END) + else if(c == LV_KEY_END) lv_ta_set_cursor_pos(ta, LV_TA_CURSOR_LAST); else { lv_ta_add_char(ta, c); From 0c3a18e1fef8861e964a205f05924b8d47f2d180 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Mon, 8 Apr 2019 08:38:25 -0400 Subject: [PATCH 258/590] Call lv_obj_set_pos if both drag directions are enabled --- src/lv_core/lv_indev.c | 16 ++++++++++------ src/lv_core/lv_obj.h | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 63f7d05c440d..c62c4cbfbfa6 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1056,10 +1056,11 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); - if(allowed_dirs & LV_DRAG_DIR_HOR) + if(allowed_dirs == LV_DRAG_DIR_ALL) + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); + else if(allowed_dirs & LV_DRAG_DIR_HOR) lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); - - if(allowed_dirs & LV_DRAG_DIR_VER) + else if(allowed_dirs & LV_DRAG_DIR_VER) lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y); /*Set the drag in progress flag*/ @@ -1115,9 +1116,12 @@ static void indev_drag_throw(lv_indev_proc_t * proc) lv_coord_t act_x = lv_obj_get_x(drag_obj) + proc->types.pointer.drag_throw_vect.x; lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->types.pointer.drag_throw_vect.y; - if(allowed_dirs & LV_DRAG_DIR_HOR) lv_obj_set_x(drag_obj, act_x); - - if(allowed_dirs & LV_DRAG_DIR_VER) lv_obj_set_y(drag_obj, act_y); + if(allowed_dirs == LV_DRAG_DIR_ALL) + lv_obj_set_pos(drag_obj, act_x, act_y); + else if(allowed_dirs & LV_DRAG_DIR_HOR) + lv_obj_set_x(drag_obj, act_x); + else if(allowed_dirs & LV_DRAG_DIR_VER) + lv_obj_set_y(drag_obj, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 6cc9a3275fe3..10925e5c3e84 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -171,7 +171,8 @@ typedef struct enum { LV_DRAG_DIR_HOR = 0x1, - LV_DRAG_DIR_VER = 0x2 + LV_DRAG_DIR_VER = 0x2, + LV_DRAG_DIR_ALL = 0x3, /* Should be the bitwise OR of the above */ }; typedef uint8_t lv_drag_dir_t; From 36d4807a69aeef3ce36094fed25b8607ce6cec8f Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Mon, 8 Apr 2019 13:50:58 -0400 Subject: [PATCH 259/590] Add back scrolling optimization --- src/lv_core/lv_indev.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index c62c4cbfbfa6..1e361c9b8dda 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1052,6 +1052,14 @@ static void indev_drag(lv_indev_proc_t * state) /*Set new position if the vector is not zero*/ if(state->types.pointer.vect.x != 0 || state->types.pointer.vect.y != 0) { + uint16_t inv_buf_size = lv_disp_get_inv_buf_size( + indev_act->driver.disp); /*Get the number of currently invalidated areas*/ + + lv_coord_t prev_x = drag_obj->coords.x1; + lv_coord_t prev_y = drag_obj->coords.y1; + lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); + lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); + /*Get the coordinates of the object and modify them*/ lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); @@ -1069,7 +1077,23 @@ static void indev_drag(lv_indev_proc_t * state) drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; } + state->types.pointer.drag_in_prog = 1; + + /*If the object didn't moved then clear the invalidated areas*/ + if(drag_obj->coords.x1 == prev_x && drag_obj->coords.y1 == prev_y) { + /*In a special case if the object is moved on a page and + * the scrollable has fit == true and the object is dragged of the page then + * while its coordinate is not changing only the parent's size is reduced */ + lv_coord_t act_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj)); + lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); + if(act_par_w == prev_par_w && act_par_h == prev_par_h) { + uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); + lv_disp_pop_from_inv_buf(indev_act->driver.disp, + new_inv_buf_size - inv_buf_size); + } + } + } } } From d691e72b4025fa480bf1660a217d1ac03d0726dd Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 8 Apr 2019 21:04:17 -0700 Subject: [PATCH 260/590] lv_indev: check object delete after sending LV_EVENT_SHORT_CLICKED on group button release --- src/lv_core/lv_indev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 45992611477e..bd8425092278 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -495,6 +495,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.long_pr_sent == 0) { lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); + if(i->proc.reset_query) return; /*The object might be deleted*/ } lv_event_send(focused, LV_EVENT_CLICKED, NULL); From 67ff40afd05a23099710b4ab2f2bcf8f379bec40 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Tue, 9 Apr 2019 09:00:41 -0400 Subject: [PATCH 261/590] Enable LV_DRAG_DIR_ALL by default in object initializer It was previously enabled by `lv_obj_set_drag`. --- src/lv_core/lv_obj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index cc37886dd0d4..6c63c80a6808 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -253,7 +253,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Set attributes*/ new_obj->click = 1; new_obj->drag = 0; - new_obj->drag_dir = 0; + new_obj->drag_dir = LV_DRAG_DIR_ALL; new_obj->drag_throw = 0; new_obj->drag_parent = 0; new_obj->hidden = 0; @@ -1096,9 +1096,6 @@ void lv_obj_set_drag(lv_obj_t * obj, bool en) { if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/ obj->drag = (en == true ? 1 : 0); - if(en && obj->drag_dir == 0) { - obj->drag_dir = LV_DRAG_DIR_HOR | LV_DRAG_DIR_VER; - } } /** From e8b081b015c48ff5ad5e3d69ba7538e959640c19 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Tue, 9 Apr 2019 09:05:25 -0400 Subject: [PATCH 262/590] Release lv_task_handler mutex if no task needs to be run --- src/lv_misc/lv_task.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index 6fabb6397313..4354f45b6044 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -73,7 +73,10 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) static uint32_t handler_start = 0; static uint32_t busy_time = 0; - if(lv_task_run == false) return; + if(lv_task_run == false) { + task_handler_mutex = false; /*Release mutex*/ + return; + } handler_start = lv_tick_get(); From ef0e0f812f80fd517358bc3ba26faa15280538fb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 9 Apr 2019 15:24:20 +0200 Subject: [PATCH 263/590] lv_win, lv_tabview: set screen size by default --- src/lv_core/lv_obj.c | 2 +- src/lv_objx/lv_tabview.c | 5 ++++- src/lv_objx/lv_win.c | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ce87afa80875..9f92f5d42908 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1573,7 +1573,7 @@ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) { lv_style_t * style = lv_obj_get_style(obj); - return lv_obj_get_width(obj) - style->body.padding.top - style->body.padding.bottom; + return lv_obj_get_height(obj) - style->body.padding.top - style->body.padding.bottom; } /** * Get the extended size attribute of an object diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 56c9911db98e..fd0a5cae7837 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -12,6 +12,7 @@ #include "lv_btnm.h" #include "../lv_themes/lv_theme.h" #include "../lv_misc/lv_anim.h" +#include "../lv_core/lv_disp.h" /********************* * DEFINES @@ -106,7 +107,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_name_ptr[0] = ""; ext->tab_cnt = 0; - lv_obj_set_size(new_tabview, LV_DPI * 3, LV_DPI * 2); + /* Set a size which fits into the parent. + * Don't use `par` directly because if the tabview is created on a page it is moved to the scrollable so the parent has changed */ + lv_obj_set_size(new_tabview, lv_obj_get_width_fit(lv_obj_get_parent(new_tabview)), lv_obj_get_height_fit(lv_obj_get_parent(new_tabview))); ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 2ae2b855eff7..a26bc3d82ddb 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -71,10 +71,10 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new window object*/ if(copy == NULL) { - lv_disp_t * disp = lv_obj_get_disp(new_win); - lv_coord_t hres = lv_disp_get_hor_res(disp); - lv_coord_t vres = lv_disp_get_ver_res(disp); - lv_obj_set_size(new_win, hres, vres); + /* Set a size which fits into the parent. + * Don't use `par` directly because if the window is created on a page it is moved to the scrollable so the parent has changed */ + lv_obj_set_size(new_win, lv_obj_get_width_fit(lv_obj_get_parent(new_win)), lv_obj_get_height_fit(lv_obj_get_parent(new_win))); + lv_obj_set_pos(new_win, 0, 0); lv_obj_set_style(new_win, &lv_style_pretty); From ea7c82f47827a297b5d4a235454c67139154c46f Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Tue, 9 Apr 2019 16:18:04 -0400 Subject: [PATCH 264/590] Fix warnings reported in #1008 --- src/lv_core/lv_obj.c | 2 -- src/lv_draw/lv_draw_line.c | 4 ++-- src/lv_objx/lv_roller.c | 7 +++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 06353ac720ff..fc7e94f46e30 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -99,10 +99,8 @@ void lv_init(void) lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t)); lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t)); -#if LV_INDEV_READ_PERIOD != 0 /*Init the input device handling*/ lv_indev_init(); -#endif lv_initialized = true; LV_LOG_INFO("lv_init ready"); diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index 470b5cea0c53..dc2da5d515f2 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -436,8 +436,8 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ #if LV_ANTIALIAS /*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/ - lv_coord_t aa_shift1; - lv_coord_t aa_shift2; + lv_coord_t aa_shift1 = 0; + lv_coord_t aa_shift2 = 0; if(aa) { if(main_line->hor == false) { if(main_line->sx < 0) { diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index dcfc5c0706ae..ebd43cab21a7 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -651,10 +651,11 @@ static void refr_position(lv_obj_t * roller, bool anim_en) /** * Set the middle page for the roller if inifinte is enabled - * @param roller_scrl pointer to the roller's scrollable + * @param scrl pointer to the roller's scrollable (lv_obj_t *) */ -static void inf_normalize(void * roller_scrl) +static void inf_normalize(void * scrl) { + lv_obj_t * roller_scrl= (lv_obj_t *)scrl; lv_obj_t * roller = lv_obj_get_parent(roller_scrl); lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); @@ -667,8 +668,6 @@ static void inf_normalize(void * roller_scrl) (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ /*Move to the new id*/ - lv_obj_t * roller_scrl = lv_page_get_scrl(roller); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); const lv_font_t * font = style_label->text.font; lv_coord_t font_h = lv_font_get_height(font); From 28d24a3d4de574b0d3b3fd232148c33686554fa2 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Tue, 9 Apr 2019 16:57:33 -0400 Subject: [PATCH 265/590] Keep relative offset between pointer and dragged object identical --- src/lv_core/lv_indev.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index a52ce1613667..f719b29c3e7f 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1028,6 +1028,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) static void indev_drag(lv_indev_proc_t * state) { lv_obj_t * drag_obj = state->types.pointer.act_obj; + bool drag_just_started = false; /*If drag parent is active check recursively the drag_parent attribute*/ while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) { @@ -1052,6 +1053,7 @@ static void indev_drag(lv_indev_proc_t * state) ((allowed_dirs & LV_DRAG_DIR_VER) && LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) { state->types.pointer.drag_limit_out = 1; + drag_just_started = true; } } @@ -1072,12 +1074,23 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t act_x = lv_obj_get_x(drag_obj); lv_coord_t act_y = lv_obj_get_y(drag_obj); - if(allowed_dirs == LV_DRAG_DIR_ALL) + if(allowed_dirs == LV_DRAG_DIR_ALL) { + if(drag_just_started) { + act_x += state->types.pointer.drag_sum.x; + act_y += state->types.pointer.drag_sum.y; + } lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); - else if(allowed_dirs & LV_DRAG_DIR_HOR) + } else if(allowed_dirs & LV_DRAG_DIR_HOR) { + if(drag_just_started) { + act_x += state->types.pointer.drag_sum.x; + } lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); - else if(allowed_dirs & LV_DRAG_DIR_VER) + } else if(allowed_dirs & LV_DRAG_DIR_VER) { + if(drag_just_started) { + act_y += state->types.pointer.drag_sum.y; + } lv_obj_set_y(drag_obj, act_y + state->types.pointer.vect.y); + } /*Set the drag in progress flag*/ /*Send the drag begin signal on first move*/ From c2653174f59e0ce33296565ae91af243419a704a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 06:20:03 +0200 Subject: [PATCH 266/590] lv_kb, lv_btnm: add _array postfix if the parameter is an array --- src/lv_objx/lv_btnm.c | 16 ++-- src/lv_objx/lv_btnm.h | 6 +- src/lv_objx/lv_kb.c | 197 ++++++--------------------------------- src/lv_objx/lv_kb.h | 18 +++- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_tabview.c | 6 +- 6 files changed, 59 insertions(+), 186 deletions(-) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 98ccdd925266..20bcf0deeed3 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -102,7 +102,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new button matrix object*/ if(copy == NULL) { lv_obj_set_size(new_btnm, LV_DPI * 3, LV_DPI * 2); - lv_btnm_set_map(new_btnm, lv_btnm_def_map); + lv_btnm_set_map_array(new_btnm, lv_btnm_def_map); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -121,7 +121,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_btnm_ext_t * copy_ext = lv_obj_get_ext_attr(copy); memcpy(ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn)); - lv_btnm_set_map(new_btnm, lv_btnm_get_map(copy)); + lv_btnm_set_map_array(new_btnm, lv_btnm_get_map_array(copy)); } LV_LOG_INFO("button matrix created"); @@ -140,7 +140,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) +void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map) { if(map == NULL) return; @@ -271,12 +271,12 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map) +void lv_btnm_set_ctrl_map_array(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btnm_ctrl_t) * ext->btn_cnt); - lv_btnm_set_map(btnm, ext->map_p); + lv_btnm_set_map_array(btnm, ext->map_p); } /** @@ -396,7 +396,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width ext->ctrl_bits[btn_id] &= (~LV_BTNM_WIDTH_MASK); ext->ctrl_bits[btn_id] |= (LV_BTNM_WIDTH_MASK & width); - lv_btnm_set_map(btnm, ext->map_p); + lv_btnm_set_map_array(btnm, ext->map_p); } /** @@ -422,7 +422,7 @@ void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle) * @param btnm pointer to a button matrix object * @return the current map */ -const char ** lv_btnm_get_map(const lv_obj_t * btnm) +const char ** lv_btnm_get_map_array(const lv_obj_t * btnm) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); return ext->map_p; @@ -701,7 +701,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_mem_free(ext->button_areas); lv_mem_free(ext->ctrl_bits); } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) { - lv_btnm_set_map(btnm, ext->map_p); + lv_btnm_set_map_array(btnm, ext->map_p); } else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index c6d75eec81ec..7d5ac62527ae 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -97,7 +97,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]); +void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map); /** * Set the button control map (hidden, disabled etc.) for a button matrix. The @@ -115,7 +115,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]); * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map); +void lv_btnm_set_ctrl_map_array(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map); /** * Set the pressed button i.e. visually highlight it. @@ -184,7 +184,7 @@ void lv_btnm_set_one_toggle(lv_obj_t * btnm, bool one_toggle); * @param btnm pointer to a button matrix object * @return the current map */ -const char ** lv_btnm_get_map(const lv_obj_t * btnm); +const char ** lv_btnm_get_map_array(const lv_obj_t * btnm); /** * Check whether the button's text can use recolor or not diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 32b52a33ffda..acf3b8236523 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -30,51 +30,11 @@ static lv_res_t lv_kb_signal(lv_obj_t * kb, lv_signal_t sign, void * param); * STATIC VARIABLES **********************/ static lv_signal_cb_t ancestor_signal; - -static const char * kb_map_lc[] = {"1#", - "q", - "w", - "e", - "r", - "t", - "y", - "u", - "i", - "o", - "p", - "Bksp", - "\n", - "ABC", - "a", - "s", - "d", - "f", - "g", - "h", - "j", - "k", - "l", - "Enter", - "\n", - "_", - "-", - "z", - "x", - "c", - "v", - "b", - "n", - "m", - ".", - ",", - ":", - "\n", - LV_SYMBOL_CLOSE, - LV_SYMBOL_LEFT, - " ", - LV_SYMBOL_RIGHT, - LV_SYMBOL_OK, - ""}; +/* clang-format off */ +static const char * kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "Bksp", "\n", + "ABC", "a", "s", "d", "f", "g", "h", "j", "k", "l", "Enter", "\n", + "_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n", + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), @@ -82,50 +42,10 @@ static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2}; -static const char * kb_map_uc[] = {"1#", - "Q", - "W", - "E", - "R", - "T", - "Y", - "U", - "I", - "O", - "P", - "Bksp", - "\n", - "abc", - "A", - "S", - "D", - "F", - "G", - "H", - "J", - "K", - "L", - "Enter", - "\n", - "_", - "-", - "Z", - "X", - "C", - "V", - "B", - "N", - "M", - ".", - ",", - ":", - "\n", - LV_SYMBOL_CLOSE, - LV_SYMBOL_LEFT, - " ", - LV_SYMBOL_RIGHT, - LV_SYMBOL_OK, - ""}; +static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", + "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", + "_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n", + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), @@ -133,50 +53,10 @@ static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2}; -static const char * kb_map_spec[] = {"0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "Bksp", - "\n", - "abc", - "+", - "-", - "/", - "*", - "=", - "%", - "!", - "?", - "#", - "<", - ">", - "\n", - "\\", - "@", - "$", - "(", - ")", - "{", - "}", - "[", - "]", - ";", - "\"", - "'", - "\n", - LV_SYMBOL_CLOSE, - LV_SYMBOL_LEFT, - " ", - LV_SYMBOL_RIGHT, - LV_SYMBOL_OK, - ""}; +static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", "Bksp", "\n", + "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", + "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", + LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, (2 | LV_BTNM_CTRL_NO_REPEAT), @@ -184,29 +64,14 @@ static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2}; -static const char * kb_map_num[] = {"1", - "2", - "3", - "\202" LV_SYMBOL_CLOSE, - "\n", - "4", - "5", - "6", - "\202" LV_SYMBOL_OK, - "\n", - "7", - "8", - "9", - "\202Bksp", - "\n", - "+/-", - "0", - ".", - LV_SYMBOL_LEFT, - LV_SYMBOL_RIGHT, - ""}; +static const char * kb_map_num[] = {"1", "2", "3", "\202" LV_SYMBOL_CLOSE, "\n", + "4", "5", "6", "\202" LV_SYMBOL_OK, "\n", + "7", "8", "9", "\202Bksp", "\n", + "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, ""}; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1}; +/* clang-format on */ + /********************** * MACROS **********************/ @@ -251,8 +116,8 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb); - lv_btnm_set_map(new_kb, kb_map_lc); - lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map); + lv_btnm_set_map_array(new_kb, kb_map_lc); + lv_btnm_set_ctrl_map_array(new_kb, kb_ctrl_lc_map); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -325,11 +190,11 @@ void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode) ext->mode = mode; if(mode == LV_KB_MODE_TEXT) { - lv_btnm_set_map(kb, kb_map_lc); - lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); + lv_btnm_set_map_array(kb, kb_map_lc); + lv_btnm_set_ctrl_map_array(kb, kb_ctrl_lc_map); } else if(mode == LV_KB_MODE_NUM) { - lv_btnm_set_map(kb, kb_map_num); - lv_btnm_set_ctrl_map(kb, kb_ctrl_num_map); + lv_btnm_set_map_array(kb, kb_map_num); + lv_btnm_set_ctrl_map_array(kb, kb_ctrl_num_map); } } @@ -467,16 +332,16 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) /*Do the corresponding action according to the text of the button*/ if(strcmp(txt, "abc") == 0) { - lv_btnm_set_map(kb, kb_map_lc); - lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); + lv_btnm_set_map_array(kb, kb_map_lc); + lv_btnm_set_ctrl_map_array(kb, kb_ctrl_lc_map); return; } else if(strcmp(txt, "ABC") == 0) { - lv_btnm_set_map(kb, kb_map_uc); - lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map); + lv_btnm_set_map_array(kb, kb_map_uc); + lv_btnm_set_ctrl_map_array(kb, kb_ctrl_uc_map); return; } else if(strcmp(txt, "1#") == 0) { - lv_btnm_set_map(kb, kb_map_spec); - lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); + lv_btnm_set_map_array(kb, kb_map_spec); + lv_btnm_set_ctrl_map_array(kb, kb_ctrl_spec_map); return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) { diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 9bf94e65d165..ac811da11ce0 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -109,11 +109,11 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); * Set a new map for the keyboard * @param kb pointer to a Keyboard object * @param map pointer to a string array to describe the map. - * See 'lv_btnm_set_map()' for more info. + * See 'lv_btnm_set_map_array()' for more info. */ -static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[]) +static inline void lv_kb_set_map_array(lv_obj_t * kb, const char ** map) { - lv_btnm_set_map(kb, map); + lv_btnm_set_map_array(kb, map); } /** @@ -124,9 +124,9 @@ static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[]) * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. * See: `lv_btnm_set_ctrl_map` for more details. */ -static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t * ctrl_map) +static inline void lv_kb_set_ctrl_map_array(lv_obj_t * kb, const lv_btnm_ctrl_t * ctrl_map) { - lv_btnm_set_ctrl_map(kb, ctrl_map); + lv_btnm_set_ctrl_map_array(kb, ctrl_map); } /** @@ -162,6 +162,14 @@ lv_kb_mode_t lv_kb_get_mode(const lv_obj_t * kb); */ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); +/** + * Get the current map of a keyboard + * @param kb pointer to a keyboard object + * @return the current map + */ +static inline const char ** lv_btnm_get_map_array(const lv_obj_t * btnm); + + /** * Get a style of a keyboard * @param kb pointer to a keyboard object diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index ca626f1ee4df..aa522130b9fa 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -151,7 +151,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map) } } - lv_btnm_set_map(ext->btnm, btn_map); + lv_btnm_set_map_array(ext->btnm, btn_map); lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT, true); lv_obj_set_parent_event(ext->btnm, true); diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index fd0a5cae7837..aafcae551c4a 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -113,7 +113,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); - lv_btnm_set_map(ext->btns, tab_def); + lv_btnm_set_map_array(ext->btns, tab_def); lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb); ext->indic = lv_obj_create(ext->btns, NULL); @@ -161,7 +161,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; ext->tab_name_ptr[0] = ""; - lv_btnm_set_map(ext->btns, ext->tab_name_ptr); + lv_btnm_set_map_array(ext->btns, ext->tab_name_ptr); uint16_t i; lv_obj_t * new_tab; @@ -242,7 +242,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); btnm_ext->map_p = NULL; - lv_btnm_set_map(ext->btns, ext->tab_name_ptr); + lv_btnm_set_map_array(ext->btns, ext->tab_name_ptr); lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); /*Modify the indicator size*/ From c4f8e5f8becbf4982f039678537fe0c4c66095a5 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 06:21:54 +0200 Subject: [PATCH 267/590] run clang format --- src/lv_core/lv_indev.c | 21 ++++++++++----------- src/lv_core/lv_obj.c | 3 +-- src/lv_core/lv_obj.h | 16 ++++++++-------- src/lv_hal/lv_hal_disp.h | 5 ++--- src/lv_objx/lv_cb.c | 3 +-- src/lv_objx/lv_kb.h | 1 - src/lv_objx/lv_tabview.c | 6 ++++-- src/lv_objx/lv_win.c | 6 ++++-- 8 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index a52ce1613667..fb08f99b935a 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -408,14 +408,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); if(i->proc.reset_query) return; /*The object might be deleted*/ lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - } - else if(data->key == LV_KEY_ESC) { + if(i->proc.reset_query) return; /*The object might be deleted*/ + } else if(data->key == LV_KEY_ESC) { /*Send the ESC as a normal KEY*/ lv_group_send_data(g, LV_KEY_ESC); lv_event_send(focused, LV_EVENT_CANCEL, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.reset_query) return; /*The object might be deleted*/ } /*Move the focus on NEXT*/ else if(data->key == LV_KEY_NEXT) { @@ -1069,11 +1068,12 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); /*Get the coordinates of the object and modify them*/ - lv_coord_t act_x = lv_obj_get_x(drag_obj); - lv_coord_t act_y = lv_obj_get_y(drag_obj); + lv_coord_t act_x = lv_obj_get_x(drag_obj); + lv_coord_t act_y = lv_obj_get_y(drag_obj); if(allowed_dirs == LV_DRAG_DIR_ALL) - lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, + act_y + state->types.pointer.vect.y); else if(allowed_dirs & LV_DRAG_DIR_HOR) lv_obj_set_x(drag_obj, act_x + state->types.pointer.vect.x); else if(allowed_dirs & LV_DRAG_DIR_VER) @@ -1101,7 +1101,6 @@ static void indev_drag(lv_indev_proc_t * state) new_inv_buf_size - inv_buf_size); } } - } } } @@ -1149,11 +1148,11 @@ static void indev_drag_throw(lv_indev_proc_t * proc) lv_coord_t act_y = lv_obj_get_y(drag_obj) + proc->types.pointer.drag_throw_vect.y; if(allowed_dirs == LV_DRAG_DIR_ALL) - lv_obj_set_pos(drag_obj, act_x, act_y); + lv_obj_set_pos(drag_obj, act_x, act_y); else if(allowed_dirs & LV_DRAG_DIR_HOR) - lv_obj_set_x(drag_obj, act_x); + lv_obj_set_x(drag_obj, act_x); else if(allowed_dirs & LV_DRAG_DIR_VER) - lv_obj_set_y(drag_obj, act_y); + lv_obj_set_y(drag_obj, act_y); lv_area_t coord_new; lv_obj_get_coords(drag_obj, &coord_new); diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 06353ac720ff..917ce95fdeb0 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1107,8 +1107,7 @@ void lv_obj_set_drag_dir(lv_obj_t * obj, lv_drag_dir_t drag_dir) { obj->drag_dir = drag_dir; - if(obj->drag_dir != 0) - lv_obj_set_drag(obj, true); /*Drag direction requires drag*/ + if(obj->drag_dir != 0) lv_obj_set_drag(obj, true); /*Drag direction requires drag*/ } /** diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 10925e5c3e84..d50393038dfe 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -170,9 +170,9 @@ typedef struct #endif enum { - LV_DRAG_DIR_HOR = 0x1, - LV_DRAG_DIR_VER = 0x2, - LV_DRAG_DIR_ALL = 0x3, /* Should be the bitwise OR of the above */ + LV_DRAG_DIR_HOR = 0x1, + LV_DRAG_DIR_VER = 0x2, + LV_DRAG_DIR_ALL = 0x3, /* Should be the bitwise OR of the above */ }; typedef uint8_t lv_drag_dir_t; @@ -195,12 +195,12 @@ typedef struct _lv_obj_t void * group_p; /*Pointer to the group of the object*/ #endif /*Attributes and states*/ - uint8_t click : 1; /*1: Can be pressed by an input device*/ - uint8_t drag : 1; /*1: Enable the dragging*/ + uint8_t click : 1; /*1: Can be pressed by an input device*/ + uint8_t drag : 1; /*1: Enable the dragging*/ lv_drag_dir_t drag_dir : 2; /* Which directions the object can be dragged in */ - uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ - uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ - uint8_t hidden : 1; /*1: Object is hidden*/ + uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ + uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ + uint8_t hidden : 1; /*1: Object is hidden*/ uint8_t top : 1; /*1: If the object or its children is clicked it goes to the foreground*/ uint8_t opa_scale_en : 1; /*1: opa_scale is set*/ uint8_t parent_event : 1; /*1: Send the object's events to the parent too. */ diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 5ffde953c444..46263aefb39b 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -90,13 +90,13 @@ typedef struct _disp_drv_t * number of flushed pixels */ void (*monitor_cb)(struct _disp_drv_t * disp_drv, uint32_t time, uint32_t px); - #if LV_USE_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ void (*mem_blend_cb)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); /*OPTIONAL: Fill a memory with a color (GPU only)*/ - void (*mem_fill_cb)(lv_color_t * dest_buf, const lv_area_t * dest_area, const lv_area_t * fill_area, lv_color_t color); + void (*mem_fill_cb)(lv_color_t * dest_buf, const lv_area_t * dest_area, + const lv_area_t * fill_area, lv_color_t color); #endif #if LV_USE_USER_DATA_SINGLE @@ -110,7 +110,6 @@ typedef struct _disp_drv_t lv_disp_drv_user_data_t monitor_user_data; #endif - } lv_disp_drv_t; struct _lv_obj_t; diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index dba03b4a8883..6b8c16fc1057 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -322,8 +322,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); - if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN || c == LV_KEY_LEFT || - c == LV_KEY_UP) { + if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN || c == LV_KEY_LEFT || c == LV_KEY_UP) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } } else if(sign == LV_SIGNAL_GET_TYPE) { diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index ac811da11ce0..af1b7649f079 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -169,7 +169,6 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); */ static inline const char ** lv_btnm_get_map_array(const lv_obj_t * btnm); - /** * Get a style of a keyboard * @param kb pointer to a keyboard object diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index aafcae551c4a..6b35807e3d7b 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -108,8 +108,10 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->tab_cnt = 0; /* Set a size which fits into the parent. - * Don't use `par` directly because if the tabview is created on a page it is moved to the scrollable so the parent has changed */ - lv_obj_set_size(new_tabview, lv_obj_get_width_fit(lv_obj_get_parent(new_tabview)), lv_obj_get_height_fit(lv_obj_get_parent(new_tabview))); + * Don't use `par` directly because if the tabview is created on a page it is moved to the + * scrollable so the parent has changed */ + lv_obj_set_size(new_tabview, lv_obj_get_width_fit(lv_obj_get_parent(new_tabview)), + lv_obj_get_height_fit(lv_obj_get_parent(new_tabview))); ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index a26bc3d82ddb..64a324435d7f 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -72,8 +72,10 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new window object*/ if(copy == NULL) { /* Set a size which fits into the parent. - * Don't use `par` directly because if the window is created on a page it is moved to the scrollable so the parent has changed */ - lv_obj_set_size(new_win, lv_obj_get_width_fit(lv_obj_get_parent(new_win)), lv_obj_get_height_fit(lv_obj_get_parent(new_win))); + * Don't use `par` directly because if the window is created on a page it is moved to the + * scrollable so the parent has changed */ + lv_obj_set_size(new_win, lv_obj_get_width_fit(lv_obj_get_parent(new_win)), + lv_obj_get_height_fit(lv_obj_get_parent(new_win))); lv_obj_set_pos(new_win, 0, 0); lv_obj_set_style(new_win, &lv_style_pretty); From b0f3949b3c031eac4f117e8e7e1d66583cffecd1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 06:22:45 +0200 Subject: [PATCH 268/590] lv_chart: add _array postfix --- src/lv_objx/lv_chart.c | 4 ++-- src/lv_objx/lv_chart.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 80a25758f3a3..38d354ff7504 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -371,12 +371,12 @@ void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t } /** - * Set the value s of points from an array + * Set the value of points from an array * @param chart pointer to chart object * @param ser pointer to a data series on 'chart' * @param y_array array of 'lv_coord_t' points (with 'points count' elements ) */ -void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array) +void lv_chart_set_points_array(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); memcpy(ser->points, y_array, ext->point_cnt * (sizeof(lv_coord_t))); diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index da7f3650d7cd..0399abc9ae7a 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -186,12 +186,12 @@ void lv_chart_set_series_darking(lv_obj_t * chart, lv_opa_t dark_eff); void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y); /** - * Set the value s of points from an array + * Set the value of points from an array * @param chart pointer to chart object * @param ser pointer to a data series on 'chart' * @param y_array array of 'lv_coord_t' points (with 'points count' elements ) */ -void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array); +void lv_chart_set_points_array(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array); /** * Shift all data right and set the most right data on a data line From d3b494b030c2dab6cc36edb5fd3d5ad134563ba1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 06:25:44 +0200 Subject: [PATCH 269/590] lv_kb: fix typo --- src/lv_objx/lv_kb.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index af1b7649f079..85090385d359 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -167,7 +167,10 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb); * @param kb pointer to a keyboard object * @return the current map */ -static inline const char ** lv_btnm_get_map_array(const lv_obj_t * btnm); +static inline const char ** lv_kb_get_map_array(const lv_obj_t * kb) +{ + return lv_btnm_get_map_array(kb); +} /** * Get a style of a keyboard From fb1ca3fb8771ddac3093976024e4f515cb96fd8e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 06:40:49 +0200 Subject: [PATCH 270/590] rename lv_obj_get_..._func to .._cb (#1011) --- src/lv_core/lv_obj.c | 16 +++++++++++++--- src/lv_core/lv_obj.h | 13 ++++++++++--- src/lv_objx/lv_arc.c | 4 ++-- src/lv_objx/lv_bar.c | 4 ++-- src/lv_objx/lv_btn.c | 4 ++-- src/lv_objx/lv_btnm.c | 4 ++-- src/lv_objx/lv_calendar.c | 4 ++-- src/lv_objx/lv_canvas.c | 4 ++-- src/lv_objx/lv_cb.c | 6 +++--- src/lv_objx/lv_chart.c | 4 ++-- src/lv_objx/lv_cont.c | 2 +- src/lv_objx/lv_ddlist.c | 6 +++--- src/lv_objx/lv_gauge.c | 4 ++-- src/lv_objx/lv_img.c | 2 +- src/lv_objx/lv_imgbtn.c | 4 ++-- src/lv_objx/lv_kb.c | 2 +- src/lv_objx/lv_label.c | 2 +- src/lv_objx/lv_led.c | 4 ++-- src/lv_objx/lv_line.c | 2 +- src/lv_objx/lv_list.c | 8 ++++---- src/lv_objx/lv_lmeter.c | 2 +- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_page.c | 4 ++-- src/lv_objx/lv_preload.c | 4 ++-- src/lv_objx/lv_roller.c | 4 ++-- src/lv_objx/lv_slider.c | 4 ++-- src/lv_objx/lv_spinbox.c | 4 ++-- src/lv_objx/lv_sw.c | 2 +- src/lv_objx/lv_ta.c | 8 ++++---- src/lv_objx/lv_table.c | 4 ++-- src/lv_objx/lv_tabview.c | 8 ++++---- src/lv_objx/lv_tileview.c | 6 +++--- src/lv_objx/lv_win.c | 2 +- 33 files changed, 85 insertions(+), 68 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index fb2b1d8ac187..1ff8c74ad1e2 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1258,7 +1258,7 @@ void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb) * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. */ -void lv_obj_send_signal(lv_obj_t * obj, lv_signal_t signal, void * param) +void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param) { if(obj->signal_cb) obj->signal_cb(obj, signal, param); } @@ -1797,7 +1797,7 @@ bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot) * @param obj pointer to an object * @return the signal function */ -lv_signal_cb_t lv_obj_get_signal_func(const lv_obj_t * obj) +lv_signal_cb_t lv_obj_get_signal_cb(const lv_obj_t * obj) { return obj->signal_cb; } @@ -1807,11 +1807,21 @@ lv_signal_cb_t lv_obj_get_signal_func(const lv_obj_t * obj) * @param obj pointer to an object * @return the design function */ -lv_design_cb_t lv_obj_get_design_func(const lv_obj_t * obj) +lv_design_cb_t lv_obj_get_design_cb(const lv_obj_t * obj) { return obj->design_cb; } +/** + * Get the event function of an object + * @param obj pointer to an object + * @return the event function + */ +lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj) +{ + return obj->event_cb; +} + /*------------------ * Other get *-----------------*/ diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index d50393038dfe..2f75df0815c0 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -548,7 +548,7 @@ void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb); * @param obj pointer to an object * @param event the type of the event from `lv_event_t`. */ -void lv_obj_send_signal(lv_obj_t * obj, lv_signal_t signal, void * param); +void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param); /** * Set a new design function for an object @@ -814,14 +814,21 @@ bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot); * @param obj pointer to an object * @return the signal function */ -lv_signal_cb_t lv_obj_get_signal_func(const lv_obj_t * obj); +lv_signal_cb_t lv_obj_get_signal_cb(const lv_obj_t * obj); /** * Get the design function of an object * @param obj pointer to an object * @return the design function */ -lv_design_cb_t lv_obj_get_design_func(const lv_obj_t * obj); +lv_design_cb_t lv_obj_get_design_cb(const lv_obj_t * obj); + +/** + * Get the event function of an object + * @param obj pointer to an object + * @return the event function + */ +lv_event_cb_t lv_obj_get_event_cb(const lv_obj_t * obj); /*------------------ * Other get diff --git a/src/lv_objx/lv_arc.c b/src/lv_objx/lv_arc.c index ec79e2f7795b..0228a696b3d4 100644 --- a/src/lv_objx/lv_arc.c +++ b/src/lv_objx/lv_arc.c @@ -62,8 +62,8 @@ lv_obj_t * lv_arc_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_arc); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_arc); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_arc); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_arc); /*Initialize the allocated 'ext' */ ext->angle_start = 45; diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 599cb6dc650f..21147f78b771 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -62,8 +62,8 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_bar); if(new_bar == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_bar); - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_bar); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_bar); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_bar); /*Allocate the object type specific extended data*/ lv_bar_ext_t * ext = lv_obj_allocate_ext_attr(new_bar, sizeof(lv_bar_ext_t)); diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 1771514d510b..8289393534ae 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -79,8 +79,8 @@ lv_obj_t * lv_btn_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_btn); if(new_btn == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_btn); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_btn); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_btn); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_btn); /*Allocate the extended data*/ lv_btn_ext_t * ext = lv_obj_allocate_ext_attr(new_btn, sizeof(lv_btn_ext_t)); diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 20bcf0deeed3..56d2ee09a270 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -73,7 +73,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_btnm); if(new_btnm == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_btnm); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_btnm); /*Allocate the object type specific extended data*/ lv_btnm_ext_t * ext = lv_obj_allocate_ext_attr(new_btnm, sizeof(lv_btnm_ext_t)); @@ -94,7 +94,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_btnm); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_btnm); lv_obj_set_signal_cb(new_btnm, lv_btnm_signal); lv_obj_set_design_cb(new_btnm, lv_btnm_design); diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 3701367bf094..4f547ae73fdd 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -85,8 +85,8 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_calendar_ext_t * ext = lv_obj_allocate_ext_attr(new_calendar, sizeof(lv_calendar_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_calendar); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_calendar); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_calendar); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_calendar); /*Initialize the allocated 'ext' */ ext->today.year = 2018; diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index d2e8baa19401..5d7e5d1df983 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -58,8 +58,8 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy) lv_canvas_ext_t * ext = lv_obj_allocate_ext_attr(new_canvas, sizeof(lv_canvas_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_canvas); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_canvas); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_canvas); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_canvas); /*Initialize the allocated 'ext' */ ext->dsc.header.always_zero = 0; diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index 6b8c16fc1057..fb9c2e730ec0 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -58,8 +58,8 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_cb); if(new_cb == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_cb); - if(ancestor_bg_design == NULL) ancestor_bg_design = lv_obj_get_design_func(new_cb); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cb); + if(ancestor_bg_design == NULL) ancestor_bg_design = lv_obj_get_design_cb(new_cb); lv_cb_ext_t * ext = lv_obj_allocate_ext_attr(new_cb, sizeof(lv_cb_ext_t)); lv_mem_assert(ext); @@ -75,7 +75,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { ext->bullet = lv_btn_create(new_cb, NULL); if(ancestor_bullet_design == NULL) - ancestor_bullet_design = lv_obj_get_design_func(ext->bullet); + ancestor_bullet_design = lv_obj_get_design_cb(ext->bullet); lv_obj_set_click(ext->bullet, false); ext->label = lv_label_create(new_cb, NULL); diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 38d354ff7504..8a16af938298 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -93,8 +93,8 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) memset(&ext->x_axis, 0, sizeof(ext->x_axis)); memset(&ext->y_axis, 0, sizeof(ext->y_axis)); - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_chart); - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_chart); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_chart); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_chart); lv_obj_set_signal_cb(new_chart, lv_chart_signal); lv_obj_set_design_cb(new_chart, lv_chart_design); diff --git a/src/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c index 0f2f0ebd3cb2..7782517e6c0f 100644 --- a/src/lv_objx/lv_cont.c +++ b/src/lv_objx/lv_cont.c @@ -70,7 +70,7 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_cont); if(new_cont == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_cont); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_cont); lv_obj_allocate_ext_attr(new_cont, sizeof(lv_cont_ext_t)); lv_cont_ext_t * ext = lv_obj_get_ext_attr(new_cont); diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 30ca7183c6c8..2beec3c76e5f 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -77,10 +77,10 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_ddlist); if(new_ddlist == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_ddlist); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_ddlist); if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ddlist)); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_ddlist); + ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ddlist)); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_ddlist); /*Allocate the drop down list type specific extended data*/ lv_ddlist_ext_t * ext = lv_obj_allocate_ext_attr(new_ddlist, sizeof(lv_ddlist_ext_t)); diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 89b771048aa1..10fc4c740cba 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -78,8 +78,8 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) ext->values = NULL; ext->needle_colors = NULL; ext->label_count = LV_GAUGE_DEF_LABEL_COUNT; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_gauge); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_gauge); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_gauge); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_gauge); /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_gauge, lv_gauge_signal); diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 28afa7022189..78f8689b63f1 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -63,7 +63,7 @@ lv_obj_t * lv_img_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_img); if(new_img == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_img); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_img); /*Extend the basic object to image object*/ lv_img_ext_t * ext = lv_obj_allocate_ext_attr(new_img, sizeof(lv_img_ext_t)); diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index 2b454d9b1ef4..4d6a16b47b4e 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -58,8 +58,8 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) lv_imgbtn_ext_t * ext = lv_obj_allocate_ext_attr(new_imgbtn, sizeof(lv_imgbtn_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_imgbtn); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_imgbtn); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_imgbtn); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_imgbtn); /*Initialize the allocated 'ext' */ #if LV_IMGBTN_TILED == 0 diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index acf3b8236523..cb8ac72452f6 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -95,7 +95,7 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_kb); if(new_kb == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_kb); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_kb); /*Allocate the keyboard type specific extended data*/ lv_kb_ext_t * ext = lv_obj_allocate_ext_attr(new_kb, sizeof(lv_kb_ext_t)); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 750b1d437fd7..b1b90ebbc868 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -71,7 +71,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_label); if(new_label == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_label); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_label); /*Extend the basic object to a label object*/ lv_obj_allocate_ext_attr(new_label, sizeof(lv_label_ext_t)); diff --git a/src/lv_objx/lv_led.c b/src/lv_objx/lv_led.c index dd4fd4228397..f390bec8e2d7 100644 --- a/src/lv_objx/lv_led.c +++ b/src/lv_objx/lv_led.c @@ -59,8 +59,8 @@ lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_led); if(new_led == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_led); - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_led); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_led); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_led); /*Allocate the object type specific extended data*/ lv_led_ext_t * ext = lv_obj_allocate_ext_attr(new_led, sizeof(lv_led_ext_t)); diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 3a5e051dd0c4..24ae3eed2ad0 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -56,7 +56,7 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_line); if(new_line == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_line); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_line); /*Extend the basic object to line object*/ lv_line_ext_t * ext = lv_obj_allocate_ext_attr(new_line, sizeof(lv_line_ext_t)); diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 887edb60e8b6..d5655fb79e30 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -79,7 +79,7 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_list); if(new_list == NULL) return NULL; - if(ancestor_page_signal == NULL) ancestor_page_signal = lv_obj_get_signal_func(new_list); + if(ancestor_page_signal == NULL) ancestor_page_signal = lv_obj_get_signal_cb(new_list); lv_list_ext_t * ext = lv_obj_allocate_ext_attr(new_list, sizeof(lv_list_ext_t)); lv_mem_assert(ext); @@ -189,7 +189,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, liste = lv_btn_create(list, NULL); /*Save the original signal function because it will be required in `lv_list_btn_signal`*/ - if(ancestor_btn_signal == NULL) ancestor_btn_signal = lv_obj_get_signal_func(liste); + if(ancestor_btn_signal == NULL) ancestor_btn_signal = lv_obj_get_signal_cb(liste); /*Set the default styles*/ lv_btn_set_style(liste, LV_BTN_STYLE_REL, ext->styles_btn[LV_BTN_STATE_REL]); @@ -212,7 +212,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_img_set_src(img, img_src); lv_obj_set_style(img, ext->style_img); lv_obj_set_click(img, false); - if(img_signal == NULL) img_signal = lv_obj_get_signal_func(img); + if(img_signal == NULL) img_signal = lv_obj_get_signal_cb(img); } #endif if(txt != NULL) { @@ -223,7 +223,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_obj_set_click(label, false); lv_label_set_long_mode(label, LV_LABEL_LONG_ROLL_CIRC); lv_obj_set_width(label, liste->coords.x2 - label->coords.x1 - btn_hor_pad); - if(label_signal == NULL) label_signal = lv_obj_get_signal_func(label); + if(label_signal == NULL) label_signal = lv_obj_get_signal_cb(label); } #if LV_USE_GROUP /* If this is the first item to be added to the list and the list is diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index 4723c7d9e2ab..f4428e503661 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -60,7 +60,7 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_lmeter); if(new_lmeter == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_lmeter); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_lmeter); /*Allocate the line meter type specific extended data*/ lv_lmeter_ext_t * ext = lv_obj_allocate_ext_attr(new_lmeter, sizeof(lv_lmeter_ext_t)); diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index aa522130b9fa..8304d124cb79 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -68,7 +68,7 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_mbox); if(new_mbox == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_mbox); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_mbox); /*Allocate the message box type specific extended data*/ lv_mbox_ext_t * ext = lv_obj_allocate_ext_attr(new_mbox, sizeof(lv_mbox_ext_t)); diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index d81e3ce28c06..e68fb3b60331 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -73,8 +73,8 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_page); if(new_page == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_page); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_page); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_page); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_page); /*Allocate the object type specific extended data*/ lv_page_ext_t * ext = lv_obj_allocate_ext_attr(new_page, sizeof(lv_page_ext_t)); diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index cd365e27cba9..76fe405eaa42 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -74,8 +74,8 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_preload); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_preload); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_preload); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_preload); /*Initialize the allocated 'ext' */ ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH; diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index ebd43cab21a7..d3cbed074ed1 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -69,8 +69,8 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) if(new_roller == NULL) return NULL; if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_roller)); - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_roller); + ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_roller)); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_roller); /*Allocate the roller type specific extended data*/ lv_roller_ext_t * ext = lv_obj_allocate_ext_attr(new_roller, sizeof(lv_roller_ext_t)); diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 47341778a85f..5f7dfaf2e0f9 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -61,8 +61,8 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_slider); if(new_slider == NULL) return NULL; - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_slider); - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_slider); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_slider); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_slider); /*Allocate the slider type specific extended data*/ lv_slider_ext_t * ext = lv_obj_allocate_ext_attr(new_slider, sizeof(lv_slider_ext_t)); diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 8fcb7c801df5..8dfd9d87215d 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -60,8 +60,8 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_spinbox_ext_t * ext = lv_obj_allocate_ext_attr(new_spinbox, sizeof(lv_spinbox_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_spinbox); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_spinbox); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_spinbox); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_spinbox); /*Initialize the allocated 'ext'*/ ext->value = 0; diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 301fc6e1a73f..16ce3f82cd7c 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -59,7 +59,7 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_sw); if(new_sw == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_sw); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_sw); /*Allocate the switch type specific extended data*/ lv_sw_ext_t * ext = lv_obj_allocate_ext_attr(new_sw, sizeof(lv_sw_ext_t)); diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 813df66f71d7..ae771b8b6a02 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -88,10 +88,10 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_ta); if(new_ta == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_ta); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_ta); - if(scrl_signal == NULL) scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_ta)); - if(scrl_design == NULL) scrl_design = lv_obj_get_design_func(lv_page_get_scrl(new_ta)); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_ta); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_ta); + if(scrl_signal == NULL) scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ta)); + if(scrl_design == NULL) scrl_design = lv_obj_get_design_cb(lv_page_get_scrl(new_ta)); /*Allocate the object type specific extended data*/ lv_ta_ext_t * ext = lv_obj_allocate_ext_attr(new_ta, sizeof(lv_ta_ext_t)); diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index c57935f246ab..67fe97f8ab71 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -63,8 +63,8 @@ lv_obj_t * lv_table_create(lv_obj_t * par, const lv_obj_t * copy) lv_table_ext_t * ext = lv_obj_allocate_ext_attr(new_table, sizeof(lv_table_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_table); - if(ancestor_scrl_design == NULL) ancestor_scrl_design = lv_obj_get_design_func(new_table); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_table); + if(ancestor_scrl_design == NULL) ancestor_scrl_design = lv_obj_get_design_cb(new_table); /*Initialize the allocated 'ext' */ ext->cell_data = NULL; diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 6b35807e3d7b..dd4181a651aa 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -74,7 +74,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_t * new_tabview = lv_obj_create(par, copy); lv_mem_assert(new_tabview); if(new_tabview == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_tabview); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_tabview); /*Allocate the tab type specific extended data*/ lv_tabview_ext_t * ext = lv_obj_allocate_ext_attr(new_tabview, sizeof(lv_tabview_ext_t)); @@ -219,8 +219,8 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) lv_page_set_style(h, LV_PAGE_STYLE_BG, &lv_style_transp); lv_page_set_style(h, LV_PAGE_STYLE_SCRL, &lv_style_transp); - if(page_signal == NULL) page_signal = lv_obj_get_signal_func(h); - if(page_scrl_signal == NULL) page_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(h)); + if(page_signal == NULL) page_signal = lv_obj_get_signal_cb(h); + if(page_scrl_signal == NULL) page_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(h)); lv_obj_set_signal_cb(h, tabpage_signal); lv_obj_set_signal_cb(lv_page_get_scrl(h), tabpage_scrl_signal); @@ -889,7 +889,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_t * pages = lv_obj_get_child(ext->content, NULL); while(pages != NULL) { - if(lv_obj_get_signal_func(pages) == + if(lv_obj_get_signal_cb(pages) == tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ lv_obj_set_size(pages, lv_obj_get_width(tabview), lv_obj_get_height(ext->content)); } diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index 0e1f5282af7b..6d8be1c756e4 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -72,10 +72,10 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_tileview_ext_t * ext = lv_obj_allocate_ext_attr(new_tileview, sizeof(lv_tileview_ext_t)); lv_mem_assert(ext); if(ext == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_tileview); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_tileview); if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_func(lv_page_get_scrl(new_tileview)); - if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_func(new_tileview); + ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_tileview)); + if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_tileview); /*Initialize the allocated 'ext' */ ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME; diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 64a324435d7f..dca8002e3e97 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -54,7 +54,7 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_win); if(new_win == NULL) return NULL; - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_win); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_win); /*Allocate the object type specific extended data*/ lv_win_ext_t * ext = lv_obj_allocate_ext_attr(new_win, sizeof(lv_win_ext_t)); From 3d4c784c3ba55ba505e417e924fc03f0e417ff6a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 10 Apr 2019 08:40:52 +0200 Subject: [PATCH 271/590] use [] in array argument of 'set' functions (#935) --- src/lv_core/lv_indev.c | 7 ++++--- src/lv_objx/lv_btnm.c | 14 +++++++------- src/lv_objx/lv_btnm.h | 4 ++-- src/lv_objx/lv_chart.c | 2 +- src/lv_objx/lv_chart.h | 2 +- src/lv_objx/lv_gauge.c | 2 +- src/lv_objx/lv_gauge.h | 2 +- src/lv_objx/lv_kb.c | 24 ++++++++++++------------ src/lv_objx/lv_kb.h | 8 ++++---- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_roller.c | 6 +++--- src/lv_objx/lv_tabview.c | 6 +++--- 12 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 16ff27502957..63254064030c 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1026,7 +1026,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) */ static void indev_drag(lv_indev_proc_t * state) { - lv_obj_t * drag_obj = state->types.pointer.act_obj; + lv_obj_t * drag_obj = state->types.pointer.act_obj; bool drag_just_started = false; /*If drag parent is active check recursively the drag_parent attribute*/ @@ -1052,7 +1052,7 @@ static void indev_drag(lv_indev_proc_t * state) ((allowed_dirs & LV_DRAG_DIR_VER) && LV_MATH_ABS(state->types.pointer.drag_sum.y) >= indev_act->driver.drag_limit)) { state->types.pointer.drag_limit_out = 1; - drag_just_started = true; + drag_just_started = true; } } @@ -1078,7 +1078,8 @@ static void indev_drag(lv_indev_proc_t * state) act_x += state->types.pointer.drag_sum.x; act_y += state->types.pointer.drag_sum.y; } - lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, + act_y + state->types.pointer.vect.y); } else if(allowed_dirs & LV_DRAG_DIR_HOR) { if(drag_just_started) { act_x += state->types.pointer.drag_sum.x; diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 56d2ee09a270..fac07cb06af9 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -102,7 +102,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new button matrix object*/ if(copy == NULL) { lv_obj_set_size(new_btnm, LV_DPI * 3, LV_DPI * 2); - lv_btnm_set_map_array(new_btnm, lv_btnm_def_map); + lv_btnm_set_map(new_btnm, lv_btnm_def_map); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -121,7 +121,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) else { lv_btnm_ext_t * copy_ext = lv_obj_get_ext_attr(copy); memcpy(ext->styles_btn, copy_ext->styles_btn, sizeof(ext->styles_btn)); - lv_btnm_set_map_array(new_btnm, lv_btnm_get_map_array(copy)); + lv_btnm_set_map(new_btnm, lv_btnm_get_map_array(copy)); } LV_LOG_INFO("button matrix created"); @@ -140,7 +140,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy) * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map) +void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) { if(map == NULL) return; @@ -271,12 +271,12 @@ void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map) * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map_array(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map) +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[]) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); memcpy(ext->ctrl_bits, ctrl_map, sizeof(lv_btnm_ctrl_t) * ext->btn_cnt); - lv_btnm_set_map_array(btnm, ext->map_p); + lv_btnm_set_map(btnm, ext->map_p); } /** @@ -396,7 +396,7 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width ext->ctrl_bits[btn_id] &= (~LV_BTNM_WIDTH_MASK); ext->ctrl_bits[btn_id] |= (LV_BTNM_WIDTH_MASK & width); - lv_btnm_set_map_array(btnm, ext->map_p); + lv_btnm_set_map(btnm, ext->map_p); } /** @@ -701,7 +701,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_mem_free(ext->button_areas); lv_mem_free(ext->ctrl_bits); } else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) { - lv_btnm_set_map_array(btnm, ext->map_p); + lv_btnm_set_map(btnm, ext->map_p); } else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 7d5ac62527ae..26c0740f92da 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -97,7 +97,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy); * @param btnm pointer to a button matrix object * @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break. */ -void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map); +void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]); /** * Set the button control map (hidden, disabled etc.) for a button matrix. The @@ -115,7 +115,7 @@ void lv_btnm_set_map_array(const lv_obj_t * btnm, const char ** map); * - bit 2..0: Relative width compared to the buttons in the * same row. [1..7] */ -void lv_btnm_set_ctrl_map_array(const lv_obj_t * btnm, const lv_btnm_ctrl_t * ctrl_map); +void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[]); /** * Set the pressed button i.e. visually highlight it. diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 8a16af938298..adad30e4f6e1 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -376,7 +376,7 @@ void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * @param ser pointer to a data series on 'chart' * @param y_array array of 'lv_coord_t' points (with 'points count' elements ) */ -void lv_chart_set_points_array(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array) +void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y_array[]) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); memcpy(ser->points, y_array, ext->point_cnt * (sizeof(lv_coord_t))); diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 0399abc9ae7a..09e201f78577 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -191,7 +191,7 @@ void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * @param ser pointer to a data series on 'chart' * @param y_array array of 'lv_coord_t' points (with 'points count' elements ) */ -void lv_chart_set_points_array(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array); +void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array); /** * Shift all data right and set the most right data on a data line diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 10fc4c740cba..4162fb115984 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -130,7 +130,7 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) * @param needle_cnt new count of needles * @param colors an array of colors for needles (with 'num' elements) */ -void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t * colors) +void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t colors[]) { lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); diff --git a/src/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h index 83977f1ec489..ebb90391e40c 100644 --- a/src/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -72,7 +72,7 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy); * @param needle_cnt new count of needles * @param colors an array of colors for needles (with 'num' elements) */ -void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t * colors); +void lv_gauge_set_needle_count(lv_obj_t * gauge, uint8_t needle_cnt, const lv_color_t colors[]); /** * Set the value of a needle diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index cb8ac72452f6..da15be7b1f07 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -116,8 +116,8 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb); - lv_btnm_set_map_array(new_kb, kb_map_lc); - lv_btnm_set_ctrl_map_array(new_kb, kb_ctrl_lc_map); + lv_btnm_set_map(new_kb, kb_map_lc); + lv_btnm_set_ctrl_map(new_kb, kb_ctrl_lc_map); /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); @@ -190,11 +190,11 @@ void lv_kb_set_mode(lv_obj_t * kb, lv_kb_mode_t mode) ext->mode = mode; if(mode == LV_KB_MODE_TEXT) { - lv_btnm_set_map_array(kb, kb_map_lc); - lv_btnm_set_ctrl_map_array(kb, kb_ctrl_lc_map); + lv_btnm_set_map(kb, kb_map_lc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); } else if(mode == LV_KB_MODE_NUM) { - lv_btnm_set_map_array(kb, kb_map_num); - lv_btnm_set_ctrl_map_array(kb, kb_ctrl_num_map); + lv_btnm_set_map(kb, kb_map_num); + lv_btnm_set_ctrl_map(kb, kb_ctrl_num_map); } } @@ -332,16 +332,16 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) /*Do the corresponding action according to the text of the button*/ if(strcmp(txt, "abc") == 0) { - lv_btnm_set_map_array(kb, kb_map_lc); - lv_btnm_set_ctrl_map_array(kb, kb_ctrl_lc_map); + lv_btnm_set_map(kb, kb_map_lc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_lc_map); return; } else if(strcmp(txt, "ABC") == 0) { - lv_btnm_set_map_array(kb, kb_map_uc); - lv_btnm_set_ctrl_map_array(kb, kb_ctrl_uc_map); + lv_btnm_set_map(kb, kb_map_uc); + lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map); return; } else if(strcmp(txt, "1#") == 0) { - lv_btnm_set_map_array(kb, kb_map_spec); - lv_btnm_set_ctrl_map_array(kb, kb_ctrl_spec_map); + lv_btnm_set_map(kb, kb_map_spec); + lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb) { diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 85090385d359..d0c52d32166e 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -111,9 +111,9 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); * @param map pointer to a string array to describe the map. * See 'lv_btnm_set_map_array()' for more info. */ -static inline void lv_kb_set_map_array(lv_obj_t * kb, const char ** map) +static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[]) { - lv_btnm_set_map_array(kb, map); + lv_btnm_set_map(kb, map); } /** @@ -124,9 +124,9 @@ static inline void lv_kb_set_map_array(lv_obj_t * kb, const char ** map) * @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes. * See: `lv_btnm_set_ctrl_map` for more details. */ -static inline void lv_kb_set_ctrl_map_array(lv_obj_t * kb, const lv_btnm_ctrl_t * ctrl_map) +static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t ctrl_map[]) { - lv_btnm_set_ctrl_map_array(kb, ctrl_map); + lv_btnm_set_ctrl_map(kb, ctrl_map); } /** diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 8304d124cb79..0a99a78536a8 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -151,7 +151,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map) } } - lv_btnm_set_map_array(ext->btnm, btn_map); + lv_btnm_set_map(ext->btnm, btn_map); lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT, true); lv_obj_set_parent_event(ext->btnm, true); diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index d3cbed074ed1..39eb1547e810 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -655,9 +655,9 @@ static void refr_position(lv_obj_t * roller, bool anim_en) */ static void inf_normalize(void * scrl) { - lv_obj_t * roller_scrl= (lv_obj_t *)scrl; - lv_obj_t * roller = lv_obj_get_parent(roller_scrl); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_obj_t * roller_scrl = (lv_obj_t *)scrl; + lv_obj_t * roller = lv_obj_get_parent(roller_scrl); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); if(ext->inf) { uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index dd4181a651aa..d687a55b76b6 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -115,7 +115,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->btns = lv_btnm_create(new_tabview, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); - lv_btnm_set_map_array(ext->btns, tab_def); + lv_btnm_set_map(ext->btns, tab_def); lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb); ext->indic = lv_obj_create(ext->btns, NULL); @@ -163,7 +163,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; ext->tab_name_ptr[0] = ""; - lv_btnm_set_map_array(ext->btns, ext->tab_name_ptr); + lv_btnm_set_map(ext->btns, ext->tab_name_ptr); uint16_t i; lv_obj_t * new_tab; @@ -244,7 +244,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) lv_btnm_ext_t * btnm_ext = lv_obj_get_ext_attr(ext->btns); btnm_ext->map_p = NULL; - lv_btnm_set_map_array(ext->btns, ext->tab_name_ptr); + lv_btnm_set_map(ext->btns, ext->tab_name_ptr); lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); /*Modify the indicator size*/ From 9af730c6cb1816a103506d085804b9b955179f8f Mon Sep 17 00:00:00 2001 From: GreyMS Date: Wed, 10 Apr 2019 15:32:36 +0300 Subject: [PATCH 272/590] Fixed usage of _lv_indev_proc_t --- src/lv_core/lv_indev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 7d2b907f6dba..30a94f5211fc 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -992,11 +992,11 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) /*If the point is on this object*/ /*Check its children too*/ #if USE_LV_EXTENDED_CLICK_AREA - if(lv_area_is_point_on(&obj->ext_coords, &proc->act_point)) { + if(lv_area_is_point_on(&obj->ext_coords, &proc->types.pointer.act_point)) { #elif USE_LV_EXTENDED_CLICK_AREA_TINY - if(lv_area_ext_is_point_on(&obj->ext_coords, &proc->act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { + if(lv_area_ext_is_point_on(&obj->ext_coords, &proc->types.pointer.act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { #else - if(lv_area_is_point_on(&obj->coords, &proc->act_point)) { + if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { #endif lv_obj_t * i; From 0bffba11d6f70e13195470da0063d24a80f66ca0 Mon Sep 17 00:00:00 2001 From: seyyah Date: Wed, 10 Apr 2019 17:44:18 +0300 Subject: [PATCH 273/590] Follow to transtion (lv_btnm_set_map_array -> lv_btnm_set_map) --- src/lv_objx/lv_kb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index d0c52d32166e..8254b59cbcc5 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -109,7 +109,7 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en); * Set a new map for the keyboard * @param kb pointer to a Keyboard object * @param map pointer to a string array to describe the map. - * See 'lv_btnm_set_map_array()' for more info. + * See 'lv_btnm_set_map()' for more info. */ static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[]) { From de12c95a80622c35ceaa764ace62ca2fce79d19b Mon Sep 17 00:00:00 2001 From: GreyMS Date: Wed, 10 Apr 2019 19:01:47 +0300 Subject: [PATCH 274/590] Fixed typos and include added. --- src/lv_core/lv_indev.c | 2 +- src/lv_core/lv_obj.c | 26 +++++++++++++------------- src/lv_misc/lv_area.c | 4 +++- src/lv_misc/lv_area.h | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 30a94f5211fc..a52322110ebd 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -994,7 +994,7 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) #if USE_LV_EXTENDED_CLICK_AREA if(lv_area_is_point_on(&obj->ext_coords, &proc->types.pointer.act_point)) { #elif USE_LV_EXTENDED_CLICK_AREA_TINY - if(lv_area_ext_is_point_on(&obj->ext_coords, &proc->types.pointer.act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { + if(lv_area_ext_is_point_on(&obj->coords, &proc->types.pointer.act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { #else if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { #endif diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 9bc4e715ee8c..38ce15d218a1 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -152,8 +152,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); #endif #if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->hor_pad = 0; - new_obj->ver_pad = 0; + new_obj->ext_padding_hor = 0; + new_obj->ext_padding_ver = 0; #endif /*Init realign*/ @@ -228,8 +228,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); #endif #if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->hor_pad = 0; - new_obj->ver_pad = 0; + new_obj->ext_padding_hor = 0; + new_obj->ext_padding_ver = 0; #endif /*Init realign*/ #if LV_OBJ_REALIGN @@ -291,8 +291,8 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_area_copy(&new_obj->ext_coords, ©->ext_coords); #endif #if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->hor_pad = copy->hor_pad; - new_obj->ver_pad = copy->ver_pad; + new_obj->ext_padding_hor = copy->ext_padding_hor; + new_obj->ext_padding_ver = copy->ext_padding_ver; #endif /*Set free data*/ @@ -670,21 +670,21 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) #endif } -#if USE_LV_EXTENDED_CLICK_AREA +#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY /** * Set the size of an extended clickable area * @param obj pointer to an object * @param w extended width to both sides * @param h extended height to both sides */ -void lv_obj_set_ext_paddings(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) +void lv_obj_set_ext_paddings(lv_obj_t * obj, uint8_t w, uint8_t h) { - obj->ext_paddings.x1 = w; - obj->ext_paddings.x2 = w; - obj->ext_paddings.y1 = h; - obj->ext_paddings.y2 = h; - + obj->ext_padding_hor = w; + obj->ext_padding_ver = h; + +#if USE_LV_EXTENDED_CLICK_AREA update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); +#endif } #endif diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index 735cc37f7e30..48047eecce1a 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -6,6 +6,7 @@ /********************* * INCLUDES *********************/ +#include "lv_conf.h" #include "lv_area.h" #include "lv_math.h" @@ -162,7 +163,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) * @param ext_ver extended horizontal padding * @return false:the point is out of the area */ -bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, unit8_t ext_hor, unit8_t ext_ver) +bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, uint8_t ext_hor, uint8_t ext_ver) { bool is_on = false; @@ -173,6 +174,7 @@ bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, unit return is_on; } + #endif /** diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index b21398435464..7082cbc2d70d 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -149,7 +149,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p); * @param ext_ver extended horizontal padding * @return false:the point is out of the area */ -bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, unit8_t ext_hor, unit8_t ext_ver); +bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, uint8_t ext_hor, uint8_t ext_ver); #endif /** From 2345e0073d2414720cd3b6aca9fbf2517a84a88f Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Wed, 10 Apr 2019 19:52:11 -0400 Subject: [PATCH 275/590] lv_list: check actual object type instead of relying on signal handler --- src/lv_objx/lv_list.c | 65 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index d5655fb79e30..3445be56980b 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -40,6 +40,9 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param); static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); static void lv_list_btn_single_selected(lv_obj_t * btn); +static bool lv_list_is_list_btn(lv_obj_t * list_btn); +static bool lv_list_is_list_img(lv_obj_t * list_btn); +static bool lv_list_is_list_label(lv_obj_t * list_btn); /********************** * STATIC VARIABLES @@ -426,7 +429,7 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn) lv_obj_t * label = lv_obj_get_child(btn, NULL); if(label == NULL) return NULL; - while(label->signal_cb != label_signal) { + while(lv_list_is_list_label(label)) { label = lv_obj_get_child(btn, label); if(label == NULL) break; } @@ -445,7 +448,7 @@ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn) lv_obj_t * img = lv_obj_get_child(btn, NULL); if(img == NULL) return NULL; - while(img->signal_cb != img_signal) { + while(lv_list_is_list_img(img)) { img = lv_obj_get_child(btn, img); if(img == NULL) break; } @@ -473,7 +476,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child(scrl, prev_btn); if(btn == NULL) return NULL; - while(btn->signal_cb != lv_list_btn_signal) { + while(lv_list_is_list_btn(btn)) { btn = lv_obj_get_child(scrl, btn); if(btn == NULL) break; } @@ -498,7 +501,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child_back(scrl, prev_btn); if(btn == NULL) return NULL; - while(btn->signal_cb != lv_list_btn_signal) { + while(lv_list_is_list_btn(btn)) { btn = lv_obj_get_child_back(scrl, btn); if(btn == NULL) break; } @@ -934,4 +937,58 @@ static void lv_list_btn_single_selected(lv_obj_t * btn) } while(e != NULL); } +/** + * Check if this is really a list button or another object. + * @param list_btn List button + */ +static bool lv_list_is_list_btn(lv_obj_t * list_btn) +{ + lv_obj_type_t type; + + lv_obj_get_type(list_btn, &type); + uint8_t cnt; + for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { + if(type.type[cnt] == NULL) break; + if(!strcmp(type.type[cnt], "lv_btn")) + return true; + } + return false; +} + +/** + * Check if this is really a list label or another object. + * @param list_label List label + */ +static bool lv_list_is_list_label(lv_obj_t * list_label) +{ + lv_obj_type_t type; + + lv_obj_get_type(list_label, &type); + uint8_t cnt; + for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { + if(type.type[cnt] == NULL) break; + if(!strcmp(type.type[cnt], "lv_label")) + return true; + } + return false; +} + +/** + * Check if this is really a list image or another object. + * @param list_image List image + */ +static bool lv_list_is_list_img(lv_obj_t * list_img) +{ + lv_obj_type_t type; + + lv_obj_get_type(list_img, &type); + uint8_t cnt; + for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { + if(type.type[cnt] == NULL) break; + if(!strcmp(type.type[cnt], "lv_img")) + return true; + } + return false; +} + #endif From 6c9ed1969f9b5e7a69c6b1bc62f36943cd8983fe Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 05:16:31 +0200 Subject: [PATCH 276/590] lv_disp_buf_init: rename size paramter --- src/lv_hal/lv_hal_disp.c | 6 +++--- src/lv_hal/lv_hal_disp.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 5ec49d1a7a9c..8e38c1a87114 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -87,16 +87,16 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) * the image to the display in the background. * It lets LittlevGL to render next frame into the other buffer while previous is being * sent. Set to `NULL` if unused. - * @param size size of the `buf1` and `buf2` in pixel count. + * @param size_in_px_cnt size of the `buf1` and `buf2` in pixel count. */ -void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size) +void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size_in_px_cnt) { memset(disp_buf, 0, sizeof(lv_disp_buf_t)); disp_buf->buf1 = buf1; disp_buf->buf2 = buf2; disp_buf->buf_act = disp_buf->buf1; - disp_buf->size = size; + disp_buf->size = size_in_px_cnt; } /** diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 46263aefb39b..ed4a2c7dab58 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -162,9 +162,9 @@ void lv_disp_drv_init(lv_disp_drv_t * driver); * the image to the display in the background. * It lets LittlevGL to render next frame into the other buffer while previous is being * sent. Set to `NULL` if unused. - * @param size size of the `buf1` and `buf2` in pixel count. + * @param size_in_px_cnt size of the `buf1` and `buf2` in pixel count. */ -void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size); +void lv_disp_buf_init(lv_disp_buf_t * disp_buf, void * buf1, void * buf2, uint32_t size_in_px_cnt); /** * Register an initialized display driver. From 3606ea2588c52aef7564d9f1575ab546e02ff3c9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 06:26:41 +0200 Subject: [PATCH 277/590] ext_click_area: run-time area test and renames --- lv_conf_template.h | 13 ++- src/lv_conf_checker.h | 4 +- src/lv_core/lv_indev.c | 23 +++-- src/lv_core/lv_obj.c | 215 +++++++++++++++++++++------------------- src/lv_core/lv_obj.h | 94 ++++++++++++------ src/lv_core/lv_refr.c | 4 +- src/lv_misc/lv_area.c | 2 +- src/lv_misc/lv_area.h | 2 +- src/lv_objx/lv_bar.c | 8 +- src/lv_objx/lv_chart.c | 6 +- src/lv_objx/lv_ddlist.c | 6 +- src/lv_objx/lv_label.c | 12 +-- src/lv_objx/lv_line.c | 4 +- src/lv_objx/lv_lmeter.c | 6 +- src/lv_objx/lv_page.c | 14 +-- src/lv_objx/lv_roller.c | 24 ++--- src/lv_objx/lv_slider.c | 12 +-- src/lv_objx/lv_ta.c | 6 +- 18 files changed, 256 insertions(+), 199 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 1d56890f832a..0b10e5f980b6 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -275,7 +275,14 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the d typedef void * lv_obj_user_data_t; /*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ -#define LV_OBJ_REALIGN 1 +#define LV_USE_OBJ_REALIGN 1 + +/* Enable to make the object clickable on a larger area. + * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature + * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) + * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) + */ +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL /*================== * LV OBJ X USAGE @@ -428,8 +435,8 @@ typedef void * lv_obj_user_data_t; #define LV_USE_WIN 1 /* Extended clickable area */ -#define USE_LV_EXTENDED_CLICK_AREA 0 /* Enables obj extension to realize extended clickable area with additional extended coords (1: enabled) */ -#define USE_LV_EXTENDED_CLICK_AREA_TINY 0 /* Enables obj extension to realize extended clickable area with calculation of the fly (1: enabled) */ +#define LV_USE_EXTENDED_CLICK_AREA 0 /* Enables obj extension to realize extended clickable area with additional extended coords (1: enabled) */ +#define LV_USE_EXTENDED_CLICK_AREA_TINY 0 /* Enables obj extension to realize extended clickable area with calculation of the fly (1: enabled) */ /*================== * Non-user section diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index fd2e5f6f247f..948e9aea061d 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -420,8 +420,8 @@ /*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/ /*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ -#ifndef LV_OBJ_REALIGN -#define LV_OBJ_REALIGN 1 +#ifndef LV_USE_OBJ_REALIGN +#define LV_USE_OBJ_REALIGN 1 #endif /*================== diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index a52322110ebd..7fcc899b0eaa 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -989,12 +989,23 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) { lv_obj_t * found_p = NULL; - /*If the point is on this object*/ - /*Check its children too*/ -#if USE_LV_EXTENDED_CLICK_AREA - if(lv_area_is_point_on(&obj->ext_coords, &proc->types.pointer.act_point)) { -#elif USE_LV_EXTENDED_CLICK_AREA_TINY - if(lv_area_ext_is_point_on(&obj->coords, &proc->types.pointer.act_point, obj->ext_padding_hor, obj->ext_padding_ver)) { + /*If the point is on this object check its children too*/ +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + lv_area_t ext_area; + ext_area.x1 = obj->coords.x1 - obj->ext_click_pad_hor; + ext_area.x2 = obj->coords.x2 + obj->ext_click_pad_hor; + ext_area.y1 = obj->coords.y1 - obj->ext_click_pad_ver; + ext_area.y2 = obj->coords.y2 + obj->ext_click_pad_ver; + + if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) { +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + lv_area_t ext_area; + ext_area.x1 = obj->coords.x1 - obj->ext_click_pad.x1; + ext_area.x2 = obj->coords.x2 + obj->ext_click_pad.x2; + ext_area.y1 = obj->coords.y1 - obj->ext_click_pad.y1; + ext_area.y2 = obj->coords.y2 + obj->ext_click_pad.y2; + + if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) { #else if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { #endif diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 38ce15d218a1..82f76548ae0b 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -44,9 +44,6 @@ static void refresh_children_style(lv_obj_t * obj); static void delete_children(lv_obj_t * obj); static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); -#if USE_LV_EXTENDED_CLICK_AREA -static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, uint8_t hor_pad, uint8_t ver_pad); -#endif /********************** * STATIC VARIABLES @@ -146,18 +143,19 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->coords.y1 = 0; new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1; new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; - new_obj->ext_size = 0; + new_obj->ext_draw_pad = 0; -#if USE_LV_EXTENDED_CLICK_AREA - lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); #endif -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->ext_padding_hor = 0; - new_obj->ext_padding_ver = 0; + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + new_obj->ext_click_pad_hor = 0; + new_obj->ext_click_pad_ver = 0; #endif /*Init realign*/ -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN new_obj->realign.align = LV_ALIGN_CENTER; new_obj->realign.xofs = 0; new_obj->realign.yofs = 0; @@ -222,17 +220,19 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->coords.y1 = parent->coords.y1; new_obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH; new_obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT; - new_obj->ext_size = 0; + new_obj->ext_draw_pad = 0; -#if USE_LV_EXTENDED_CLICK_AREA - lv_area_copy(&(new_obj->ext_coords), &(new_obj->coords)); +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); #endif -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->ext_padding_hor = 0; - new_obj->ext_padding_ver = 0; + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + new_obj->ext_click_pad_hor = 0; + new_obj->ext_click_pad_ver = 0; #endif + /*Init realign*/ -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN new_obj->realign.align = LV_ALIGN_CENTER; new_obj->realign.xofs = 0; new_obj->realign.yofs = 0; @@ -252,6 +252,16 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_obj_set_design_cb(new_obj, lv_obj_design); new_obj->event_cb = NULL; + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); +#endif + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + new_obj->ext_click_pad_hor = 0; + new_obj->ext_click_pad_ver = 0; +#endif + /*Init. user date*/ #if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); @@ -285,14 +295,15 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) /*Copy the attributes if required*/ if(copy != NULL) { lv_area_copy(&new_obj->coords, ©->coords); - new_obj->ext_size = copy->ext_size; + new_obj->ext_draw_pad = copy->ext_draw_pad; -#if USE_LV_EXTENDED_CLICK_AREA - lv_area_copy(&new_obj->ext_coords, ©->ext_coords); +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + lv_area_copy(&new_obj->ext_click_pad, ©->ext_click_pad); #endif -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - new_obj->ext_padding_hor = copy->ext_padding_hor; - new_obj->ext_padding_ver = copy->ext_padding_ver; + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + new_obj->ext_click_pad_hor = copy->ext_click_pad_hor; + new_obj->ext_click_pad_ver = copy->ext_click_pad_ver; #endif /*Set free data*/ @@ -306,7 +317,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #endif /*Copy realign*/ -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN new_obj->realign.align = copy->realign.align; new_obj->realign.xofs = copy->realign.xofs; new_obj->realign.yofs = copy->realign.yofs; @@ -474,7 +485,7 @@ void lv_obj_invalidate(const lv_obj_t * obj) lv_obj_t * par = lv_obj_get_parent(obj); bool union_ok = true; /*Start with the original coordinates*/ - lv_coord_t ext_size = obj->ext_size; + lv_coord_t ext_size = obj->ext_draw_pad; lv_area_copy(&area_trunc, &obj->coords); area_trunc.x1 -= ext_size; area_trunc.y1 -= ext_size; @@ -555,6 +566,7 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) { /*Convert x and y to absolute coordinates*/ lv_obj_t * par = obj->par; + x = x + par->coords.x1; y = y + par->coords.y1; @@ -580,10 +592,6 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) obj->coords.x2 += diff.x; obj->coords.y2 += diff.y; -#if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(obj->coords), &(obj->ext_coords), obj->hor_pad, obj->ver_pad); -#endif - refresh_children_position(obj, diff.x, diff.y); /*Inform the object about its new coordinates*/ @@ -639,14 +647,10 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) lv_area_t ori; lv_obj_get_coords(obj, &ori); - // Set the length and height + /*Set the length and height*/ obj->coords.x2 = obj->coords.x1 + w - 1; obj->coords.y2 = obj->coords.y1 + h - 1; -#if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(obj->coords), &(obj->ext_coords), obj->hor_pad, obj->ver_pad); -#endif - /*Send a signal to the object with its new coordinates*/ obj->signal_cb(obj, LV_SIGNAL_CORD_CHG, &ori); @@ -665,29 +669,11 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) lv_obj_invalidate(obj); /*Automatically realign the object if required*/ -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN if(obj->realign.auto_realign) lv_obj_realign(obj); #endif } -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY -/** - * Set the size of an extended clickable area - * @param obj pointer to an object - * @param w extended width to both sides - * @param h extended height to both sides - */ -void lv_obj_set_ext_paddings(lv_obj_t * obj, uint8_t w, uint8_t h) -{ - obj->ext_padding_hor = w; - obj->ext_padding_ver = h; - -#if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(obj->coords), &(obj->ext_coords), &(obj->ext_paddings)); -#endif -} -#endif - /** * Set the width of an object * @param obj pointer to an object @@ -844,7 +830,7 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co lv_obj_set_pos(obj, new_x, new_y); -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN /*Save the last align parameters to use them in `lv_obj_realign`*/ obj->realign.align = align; obj->realign.xofs = x_mod; @@ -993,7 +979,7 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_obj_set_pos(obj, new_x, new_y); -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN /*Save the last align parameters to use them in `lv_obj_realign`*/ obj->realign.align = align; obj->realign.xofs = x_mod; @@ -1009,7 +995,7 @@ void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, */ void lv_obj_realign(lv_obj_t * obj) { -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN if(obj->realign.origo_align) lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs); @@ -1018,7 +1004,7 @@ void lv_obj_realign(lv_obj_t * obj) obj->realign.yofs); #else (void)obj; - LV_LOG_WARN("lv_obj_realaign: no effect because LV_OBJ_REALIGN = 0"); + LV_LOG_WARN("lv_obj_realaign: no effect because LV_USE_OBJ_REALIGN = 0"); #endif } @@ -1030,14 +1016,46 @@ void lv_obj_realign(lv_obj_t * obj) */ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en) { -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN obj->realign.auto_realign = en ? 1 : 0; #else (void)obj; (void)en; - LV_LOG_WARN("lv_obj_set_auto_realign: no effect because LV_OBJ_REALIGN = 0"); + LV_LOG_WARN("lv_obj_set_auto_realign: no effect because LV_USE_OBJ_REALIGN = 0"); +#endif +} + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param w extended width to both sides + * @param h extended height to both sides + */ +void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h) +{ + obj->ext_click_pad_hor= w; + obj->ext_click_pad_ver = h; +} #endif + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param left extended clickable are on the left [px] + * @param right extended clickable are on the right [px] + * @param top extended clickable are on the top [px] + * @param bottom extended clickable are on the bottom [px] + */ +void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom) +{ + obj->ext_click_pad.x1 = left; + obj->ext_click_pad.x2 = right; + obj->ext_click_pad.y1 = top; + obj->ext_click_pad.y2 = bottom; } +#endif /*--------------------- * Appearance set @@ -1346,10 +1364,10 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size) * Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object * @param obj pointer to an object */ -void lv_obj_refresh_ext_size(lv_obj_t * obj) +void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj) { - obj->ext_size = 0; - obj->signal_cb(obj, LV_SIGNAL_REFR_EXT_SIZE, NULL); + obj->ext_draw_pad = 0; + obj->signal_cb(obj, LV_SIGNAL_REFR_EXT_DRAW_PAD, NULL); lv_obj_invalidate(obj); } @@ -1640,15 +1658,30 @@ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) return lv_obj_get_height(obj) - style->body.padding.top - style->body.padding.bottom; } -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY +/** + * Get the automatic realign property of the object. + * @param obj pointer to an object + * @return true: auto realign is enabled; false: auto realign is disabled + */ +bool lv_obj_get_auto_realign(lv_obj_t * obj) +{ +#if LV_USE_OBJ_REALIGN + return obj->realign.auto_realign ? true : false; +#else + (void)obj; + return false; +#endif +} + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY /** * Get the horizontal padding of extended clickable area * @param obj pointer to an object * @return the horizontal padding */ -uint8_t lv_obj_get_ext_hor_padding(const lv_obj_t * obj) +uint8_t lv_obj_get_ext_click_pad_hor(const lv_obj_t * obj) { - return obj->ext_padding_hor; + return obj->ext_click_pad_hor; } /** @@ -1656,35 +1689,32 @@ uint8_t lv_obj_get_ext_hor_padding(const lv_obj_t * obj) * @param obj pointer to an object * @return the vertical padding */ -uint8_t lv_obj_get_ext_ver_padding(const lv_obj_t * obj) +uint8_t lv_obj_get_ext_click_pad_ver(const lv_obj_t * obj) { - return obj->ext_padding_ver; + return obj->ext_click_pad_ver; } #endif +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** - * Get the extended size attribute of an object + * Get the horizontal padding of extended clickable area * @param obj pointer to an object - * @return the extended size attribute + * @return the horizontal padding */ -lv_coord_t lv_obj_get_ext_size(const lv_obj_t * obj) +const lv_area_t * lv_obj_get_ext_click_pad(const lv_obj_t * obj) { - return obj->ext_size; + return &obj->ext_click_pad; } +#endif /** - * Get the automatic realign property of the object. + * Get the extended size attribute of an object * @param obj pointer to an object - * @return true: auto realign is enabled; false: auto realign is disabled + * @return the extended size attribute */ -bool lv_obj_get_auto_realign(lv_obj_t * obj) +lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj) { -#if LV_OBJ_REALIGN - return obj->realign.auto_realign ? true : false; -#else - (void)obj; - return false; -#endif + return obj->ext_draw_pad; } /*----------------- @@ -2053,10 +2083,10 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_CHILD_CHG) { /*Return 'invalid' if the child change signal is not enabled*/ if(lv_obj_is_protected(obj, LV_PROTECT_CHILD_CHG) != false) res = LV_RES_INV; - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - if(style->body.shadow.width > obj->ext_size) obj->ext_size = style->body.shadow.width; + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { + if(style->body.shadow.width > obj->ext_draw_pad) obj->ext_draw_pad = style->body.shadow.width; } else if(sign == LV_SIGNAL_STYLE_CHG) { - lv_obj_refresh_ext_size(obj); + lv_obj_refresh_ext_draw_pad(obj); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; buf->type[0] = "lv_obj"; @@ -2081,9 +2111,6 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor i->coords.x2 += x_diff; i->coords.y2 += y_diff; -#if USE_LV_EXTENDED_CLICK_AREA - update_ext_coords(&(i->coords), &(i->ext_coords), i->hor_pad, i->ver_pad); -#endif refresh_children_position(i, x_diff, y_diff); } } @@ -2194,19 +2221,3 @@ static void delete_children(lv_obj_t * obj) if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); lv_mem_free(obj); /*Free the object itself*/ } - -#if USE_LV_EXTENDED_CLICK_AREA -/** - * Update coordinates of extended clickable area from object's coordinates and ext_paddings - * @param coords coordinates of an object - * @param ext_coords extended coordinates, which will be updated - * @param paddings paddings of extended clickable area - */ -static void update_ext_coords(lv_area_t *coords, lv_area_t *ext_coords, uint8_t hor_pad, uint8_t ver_pad) -{ - ext_coords->x1 = hor_pad > coords->x1 ? 0 : coords->x1 - hor_pad; - ext_coords->x2 = coords->x2 + hor_pad; - ext_coords->y1 = ver_pad > coords->y1 ? 0 : coords->y1 - ver_pad; - ext_coords->y2 = coords->y2 + ver_pad; -} -#endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 462100473839..28a20c5a9c4f 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -42,11 +42,15 @@ extern "C" { #error "LittlevGL: LV_ANTIALIAS can be only 0 or 1" #endif +#define LV_MAX_ANCESTOR_NUM 8 + #define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/ #define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/ #define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/ -#define LV_MAX_ANCESTOR_NUM 8 +#define LV_EXT_CLICK_AREA_OFF 0 +#define LV_EXT_CLICK_AREA_TINY 1 +#define LV_EXT_CLICK_AREA_FULL 2 /********************** * TYPEDEFS @@ -106,7 +110,7 @@ enum { LV_SIGNAL_CORD_CHG, LV_SIGNAL_PARENT_SIZE_CHG, LV_SIGNAL_STYLE_CHG, - LV_SIGNAL_REFR_EXT_SIZE, + LV_SIGNAL_REFR_EXT_DRAW_PAD, LV_SIGNAL_GET_TYPE, _LV_SIGNAL_FEEDBACK_SECTION_START, @@ -156,7 +160,7 @@ enum { }; typedef uint8_t lv_align_t; -#if LV_OBJ_REALIGN +#if LV_USE_OBJ_REALIGN typedef struct { const struct _lv_obj_t * base; @@ -183,13 +187,6 @@ typedef struct _lv_obj_t lv_ll_t child_ll; /*Linked list to store the children objects*/ lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/ -#if USE_LV_EXTENDED_CLICK_AREA - lv_area_t ext_coords; -#endif -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY - uint8_t ext_padding_hor; - uint8_t ext_padding_ver; -#endif lv_event_cb_t event_cb; lv_signal_cb_t signal_cb; /*Object type specific signal function*/ @@ -201,6 +198,16 @@ typedef struct _lv_obj_t #if LV_USE_GROUP != 0 void * group_p; /*Pointer to the group of the object*/ #endif + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + uint8_t ext_click_pad_hor; + uint8_t ext_click_pad_ver; +#endif + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + lv_area_t ext_click_pad; +#endif + /*Attributes and states*/ uint8_t click : 1; /*1: Can be pressed by an input device*/ uint8_t drag : 1; /*1: Enable the dragging*/ @@ -215,9 +222,8 @@ typedef struct _lv_obj_t `lv_protect_t`*/ lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ - lv_coord_t - ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/ -#if LV_OBJ_REALIGN + lv_coord_t ext_draw_pad; /*EXTtend the size in every direction for drawing. */ +#if LV_USE_OBJ_REALIGN lv_reailgn_t realign; #endif @@ -355,16 +361,6 @@ void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y); */ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h); -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY -/** - * Set the size of an extended clickable area - * @param obj pointer to an object - * @param w extended width to both sides - * @param h extended height to both sides - */ -void lv_obj_set_ext_paddings(lv_obj_t * obj, uint8_t w, uint8_t h); -#endif - /** * Set the width of an object * @param obj pointer to an object @@ -415,6 +411,28 @@ void lv_obj_realign(lv_obj_t * obj); */ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en); +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param w extended width to both sides + * @param h extended height to both sides + */ +void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h); +#endif + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL +/** + * Set the size of an extended clickable area + * @param obj pointer to an object + * @param left extended clickable are on the left [px] + * @param right extended clickable are on the right [px] + * @param top extended clickable are on the top [px] + * @param bottom extended clickable are on the bottom [px] + */ +void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom); +#endif + /*--------------------- * Appearance set *--------------------*/ @@ -590,7 +608,7 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); * Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object * @param obj pointer to an object */ -void lv_obj_refresh_ext_size(lv_obj_t * obj); +void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj); #if LV_USE_ANIMATION /** @@ -712,36 +730,46 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj); */ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); -#if USE_LV_EXTENDED_CLICK_AREA || USE_LV_EXTENDED_CLICK_AREA_TINY +/** + * Get the automatic realign property of the object. + * @param obj pointer to an object + * @return true: auto realign is enabled; false: auto realign is disabled + */ +bool lv_obj_get_auto_realign(lv_obj_t * obj); + + +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY /** * Get the horizontal padding of extended clickable area * @param obj pointer to an object * @return the horizontal padding */ -uint8_t lv_obj_get_ext_hor_padding(const lv_obj_t * obj); +uint8_t lv_obj_get_ext_click_pad_hor(const lv_obj_t * obj); /** * Get the vertical padding of extended clickable area * @param obj pointer to an object * @return the vertical padding */ -uint8_t lv_obj_get_ext_ver_padding(const lv_obj_t * obj); +uint8_t lv_obj_get_ext_click_pad_ver(const lv_obj_t * obj); #endif +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** - * Get the extended size attribute of an object + * Get the horizontal padding of extended clickable area * @param obj pointer to an object - * @return the extended size attribute + * @return the horizontal padding */ -lv_coord_t lv_obj_get_ext_size(const lv_obj_t * obj); +const lv_area_t * lv_obj_get_ext_click_pad(const lv_obj_t * obj); +#endif /** - * Get the automatic realign property of the object. + * Get the extended size attribute of an object * @param obj pointer to an object - * @return true: auto realign is enabled; false: auto realign is disabled + * @return the extended size attribute */ -bool lv_obj_get_auto_realign(lv_obj_t * obj); +lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj); /*----------------- * Appearance get diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 7c3b04a25572..52b0580b88b7 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -488,7 +488,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) lv_area_t obj_mask; lv_area_t obj_ext_mask; lv_area_t obj_area; - lv_coord_t ext_size = obj->ext_size; + lv_coord_t ext_size = obj->ext_draw_pad; lv_obj_get_coords(obj, &obj_area); obj_area.x1 -= ext_size; obj_area.y1 -= ext_size; @@ -513,7 +513,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) LV_LL_READ_BACK(obj->child_ll, child_p) { lv_obj_get_coords(child_p, &child_area); - ext_size = child_p->ext_size; + ext_size = child_p->ext_draw_pad; child_area.x1 -= ext_size; child_area.y1 -= ext_size; child_area.x2 += ext_size; diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index 48047eecce1a..7b9918c3e03b 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -154,7 +154,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) return is_on; } -#if USE_LV_EXTENDED_CLICK_AREA_TINY +#if LV_USE_EXTENDED_CLICK_AREA_TINY /** * Check if a point is on an area * @param a_p pointer to an area diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index 7082cbc2d70d..c07e2767d7bc 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -140,7 +140,7 @@ void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * */ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p); -#if USE_LV_EXTENDED_CLICK_AREA_TINY +#if LV_USE_EXTENDED_CLICK_AREA_TINY /** * Check if a point is on an area * @param a_p pointer to an area diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 21147f78b771..642a824397ee 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -223,7 +223,7 @@ void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style) case LV_BAR_STYLE_BG: lv_obj_set_style(bar, style); break; case LV_BAR_STYLE_INDIC: ext->style_indic = style; - lv_obj_refresh_ext_size(bar); + lv_obj_refresh_ext_draw_pad(bar); break; } } @@ -458,10 +458,10 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) res = ancestor_signal(bar, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); - if(style_indic->body.shadow.width > bar->ext_size) - bar->ext_size = style_indic->body.shadow.width; + if(style_indic->body.shadow.width > bar->ext_draw_pad) + bar->ext_draw_pad = style_indic->body.shadow.width; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index adad30e4f6e1..f18f8a3a823d 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -409,7 +409,7 @@ void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->margin = margin; - lv_obj_refresh_ext_size(chart); + lv_obj_refresh_ext_draw_pad(chart); } /** @@ -596,9 +596,9 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(buf->type[i] == NULL) break; } buf->type[i] = "lv_chart"; - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Provide extra px draw area around the chart*/ - chart->ext_size = ext->margin; + chart->ext_draw_pad = ext->margin; } return res; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 2beec3c76e5f..e2e9295fecca 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -290,7 +290,7 @@ void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, lv_style_t * case LV_DDLIST_STYLE_SEL: ext->sel_style = style; lv_obj_t * scrl = lv_page_get_scrl(ddlist); - lv_obj_refresh_ext_size(scrl); /*Because of the wider selected rectangle*/ + lv_obj_refresh_ext_draw_pad(scrl); /*Because of the wider selected rectangle*/ break; } } @@ -728,13 +728,13 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * lv_obj_t * ddlist = lv_obj_get_parent(scrl); - if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*TODO review this*/ /* Because of the wider selected rectangle ext. size * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); - if(scrl->ext_size < hpad) scrl->ext_size = hpad; + if(scrl->ext_draw_pad < hpad) scrl->ext_draw_pad = hpad; } else if(sign == LV_SIGNAL_RELEASED) { if(lv_indev_is_dragging(lv_indev_get_act()) == false) { release_handler(ddlist); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index b1b90ebbc868..2c6c4aefe2f9 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -317,7 +317,7 @@ void lv_label_set_body_draw(lv_obj_t * label, bool en) ext->body_draw = en == false ? 0 : 1; - lv_obj_refresh_ext_size(label); + lv_obj_refresh_ext_draw_pad(label); lv_obj_invalidate(label); } @@ -824,13 +824,13 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param lv_label_revert_dots(label); lv_label_refr_text(label); } - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { if(ext->body_draw) { lv_style_t * style = lv_label_get_style(label); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.top); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.bottom); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 24ae3eed2ad0..f68507fe0981 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -295,9 +295,9 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param) if(buf->type[i] == NULL) break; } buf->type[i] = "lv_line"; - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { lv_style_t * style = lv_line_get_style(line); - if(line->ext_size < style->line.width) line->ext_size = style->line.width; + if(line->ext_draw_pad < style->line.width) line->ext_draw_pad = style->line.width; } return res; diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index f4428e503661..5c57514fd1e7 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -340,10 +340,10 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par if(sign == LV_SIGNAL_CLEANUP) { /*Nothing to cleanup. (No dynamically allocated memory in 'ext')*/ } else if(sign == LV_SIGNAL_STYLE_CHG) { - lv_obj_refresh_ext_size(lmeter); - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + lv_obj_refresh_ext_draw_pad(lmeter); + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { lv_style_t * style = lv_lmeter_get_style(lmeter); - lmeter->ext_size = LV_MATH_MAX(lmeter->ext_size, style->line.width); + lmeter->ext_draw_pad = LV_MATH_MAX(lmeter->ext_draw_pad, style->line.width); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index e68fb3b60331..6c996ac5308b 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -255,7 +255,7 @@ void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style lv_area_set_height(&ext->sb.hor_area, ext->sb.style->body.padding.inner); lv_area_set_width(&ext->sb.ver_area, ext->sb.style->body.padding.inner); lv_page_sb_refresh(page); - lv_obj_refresh_ext_size(page); + lv_obj_refresh_ext_draw_pad(page); lv_obj_invalidate(page); break; case LV_PAGE_STYLE_EDGE_FLASH: ext->edge_flash.style = style; break; @@ -798,7 +798,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page); /*Refresh the ext. size because the scrollbars might be positioned out of the page*/ - lv_obj_refresh_ext_size(page); + lv_obj_refresh_ext_draw_pad(page); } else if(sign == LV_SIGNAL_CORD_CHG) { /*Refresh the scrollbar and notify the scrl if the size is changed*/ if(ext->scrl != NULL && (lv_obj_get_width(page) != lv_area_get_width(param) || @@ -809,12 +809,12 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) /*The scrollbars are important only if they are visible now*/ if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page); } - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Ensure ext. size for the scrollbars if they are out of the page*/ - if(page->ext_size < (-ext->sb.style->body.padding.right)) - page->ext_size = -ext->sb.style->body.padding.right; - if(page->ext_size < (-ext->sb.style->body.padding.bottom)) - page->ext_size = -ext->sb.style->body.padding.bottom; + if(page->ext_draw_pad < (-ext->sb.style->body.padding.right)) + page->ext_draw_pad = -ext->sb.style->body.padding.right; + if(page->ext_draw_pad < (-ext->sb.style->body.padding.bottom)) + page->ext_draw_pad = -ext->sb.style->body.padding.bottom; } else if(sign == LV_SIGNAL_CONTROL) { uint32_t c = *((uint32_t *)param); diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 39eb1547e810..9f1d181fa36a 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -557,34 +557,34 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) bool union_ok; lv_area_copy(&half_roller, &roller->coords); - half_roller.x1 -= roller->ext_size; /*Add ext size too (e.g. because of shadow draw) */ - half_roller.x2 += roller->ext_size; - half_roller.y1 -= roller->ext_size; + half_roller.x1 -= roller->ext_draw_pad; /*Add ext size too (e.g. because of shadow draw) */ + half_roller.x2 += roller->ext_draw_pad; + half_roller.y1 -= roller->ext_draw_pad; half_roller.y2 = roller->coords.y1 + h / 2; union_ok = lv_area_intersect(&half_mask, &half_roller, mask); - half_roller.x1 += roller->ext_size; /*Revert ext. size adding*/ - half_roller.x2 -= roller->ext_size; - half_roller.y1 += roller->ext_size; + half_roller.x1 += roller->ext_draw_pad; /*Revert ext. size adding*/ + half_roller.x2 -= roller->ext_draw_pad; + half_roller.y1 += roller->ext_draw_pad; half_roller.y2 += style->body.radius; if(union_ok) { lv_draw_rect(&half_roller, &half_mask, style, lv_obj_get_opa_scale(roller)); } - half_roller.x1 -= roller->ext_size; /*Add ext size too (e.g. because of shadow draw) */ - half_roller.x2 += roller->ext_size; - half_roller.y2 = roller->coords.y2 + roller->ext_size; + half_roller.x1 -= roller->ext_draw_pad; /*Add ext size too (e.g. because of shadow draw) */ + half_roller.x2 += roller->ext_draw_pad; + half_roller.y2 = roller->coords.y2 + roller->ext_draw_pad; half_roller.y1 = roller->coords.y1 + h / 2; if((h & 0x1) == 0) half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/ union_ok = lv_area_intersect(&half_mask, &half_roller, mask); - half_roller.x1 += roller->ext_size; /*Revert ext. size adding*/ - half_roller.x2 -= roller->ext_size; - half_roller.y2 -= roller->ext_size; + half_roller.x1 += roller->ext_draw_pad; /*Revert ext. size adding*/ + half_roller.x2 -= roller->ext_draw_pad; + half_roller.y2 -= roller->ext_draw_pad; half_roller.y1 -= style->body.radius; if(union_ok) { diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 5f7dfaf2e0f9..8542ef4405a1 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -141,7 +141,7 @@ void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, lv_style_t * case LV_SLIDER_STYLE_INDIC: lv_bar_set_style(slider, LV_BAR_STYLE_INDIC, style); break; case LV_SLIDER_STYLE_KNOB: ext->style_knob = style; - lv_obj_refresh_ext_size(slider); + lv_obj_refresh_ext_draw_pad(slider); break; } } @@ -533,16 +533,16 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par * During the drawing method the ext. size is used by the knob so refresh the ext. size.*/ if(lv_obj_get_width(slider) != lv_area_get_width(param) || lv_obj_get_height(slider) != lv_area_get_height(param)) { - slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_SIZE, NULL); + slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_DRAW_PAD, NULL); } - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); lv_coord_t shadow_w = knob_style->body.shadow.width; if(ext->knob_in == 0) { /* The smaller size is the knob diameter*/ lv_coord_t x = LV_MATH_MIN(w / 2 + 1 + shadow_w, h / 2 + 1 + shadow_w); - if(slider->ext_size < x) slider->ext_size = x; + if(slider->ext_draw_pad < x) slider->ext_draw_pad = x; } else { lv_coord_t pad = 0; pad = LV_MATH_MIN(pad, style->body.padding.top); @@ -550,9 +550,9 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par pad = LV_MATH_MIN(pad, style->body.padding.left); pad = LV_MATH_MIN(pad, style->body.padding.right); if(pad < 0) pad = -pad; - if(slider->ext_size < pad) slider->ext_size = pad; + if(slider->ext_draw_pad < pad) slider->ext_draw_pad = pad; - if(slider->ext_size < shadow_w) slider->ext_size = shadow_w; + if(slider->ext_draw_pad < shadow_w) slider->ext_draw_pad = shadow_w; } } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index ae771b8b6a02..165e20d3cb54 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -778,7 +778,7 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) case LV_TA_STYLE_EDGE_FLASH: lv_page_set_style(ta, LV_PAGE_STYLE_EDGE_FLASH, style); break; case LV_TA_STYLE_CURSOR: ext->cursor.style = style; - lv_obj_refresh_ext_size( + lv_obj_refresh_ext_draw_pad( lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ refr_cursor_area(ta); break; @@ -1352,11 +1352,11 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_t * ta = lv_obj_get_parent(scrl); lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Set ext. size because the cursor might be out of this object*/ lv_style_t * style_label = lv_obj_get_style(ext->label); lv_coord_t font_h = lv_font_get_height(style_label->text.font); - scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); + scrl->ext_draw_pad = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h); } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { From 00f2df74dcdfda26a20875f72854c09ce920a4bc Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 06:28:31 +0200 Subject: [PATCH 278/590] lv_conf_temp remove unused LV_USE_EXTENDED_CLICK_AREA... defines --- lv_conf_template.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 0b10e5f980b6..93b3b7324620 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -434,10 +434,6 @@ typedef void * lv_obj_user_data_t; /*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/ #define LV_USE_WIN 1 -/* Extended clickable area */ -#define LV_USE_EXTENDED_CLICK_AREA 0 /* Enables obj extension to realize extended clickable area with additional extended coords (1: enabled) */ -#define LV_USE_EXTENDED_CLICK_AREA_TINY 0 /* Enables obj extension to realize extended clickable area with calculation of the fly (1: enabled) */ - /*================== * Non-user section *==================*/ From 0dd723183ff83d315031c79cb2ab79da5dc3d042 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 06:31:24 +0200 Subject: [PATCH 279/590] lv_conf_templ: disable LV_USE_EXT_CLICK_AREA by default --- lv_conf_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 93b3b7324620..9976c40805e4 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -282,7 +282,7 @@ typedef void * lv_obj_user_data_t; * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) */ -#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FOFF /*================== * LV OBJ X USAGE From 2b0cdc853f16d157db8af80113663b023e5eb55b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 06:34:25 +0200 Subject: [PATCH 280/590] lv_conf_templ: fix typo --- lv_conf_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 9976c40805e4..64cb6912aa43 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -282,7 +282,7 @@ typedef void * lv_obj_user_data_t; * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) */ -#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FOFF +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF /*================== * LV OBJ X USAGE From 6a3c7d2b95ede01f646d2402eaf61a3d25337b3a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 06:57:19 +0200 Subject: [PATCH 281/590] lv_list: fix lv_list_get_btn_next/prev --- src/lv_objx/lv_list.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 3445be56980b..883fd7c14640 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -429,7 +429,7 @@ lv_obj_t * lv_list_get_btn_label(const lv_obj_t * btn) lv_obj_t * label = lv_obj_get_child(btn, NULL); if(label == NULL) return NULL; - while(lv_list_is_list_label(label)) { + while(lv_list_is_list_label(label) == false) { label = lv_obj_get_child(btn, label); if(label == NULL) break; } @@ -448,7 +448,7 @@ lv_obj_t * lv_list_get_btn_img(const lv_obj_t * btn) lv_obj_t * img = lv_obj_get_child(btn, NULL); if(img == NULL) return NULL; - while(lv_list_is_list_img(img)) { + while(lv_list_is_list_img(img) == false) { img = lv_obj_get_child(btn, img); if(img == NULL) break; } @@ -476,7 +476,7 @@ lv_obj_t * lv_list_get_prev_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child(scrl, prev_btn); if(btn == NULL) return NULL; - while(lv_list_is_list_btn(btn)) { + while(lv_list_is_list_btn(btn) == false) { btn = lv_obj_get_child(scrl, btn); if(btn == NULL) break; } @@ -501,7 +501,7 @@ lv_obj_t * lv_list_get_next_btn(const lv_obj_t * list, lv_obj_t * prev_btn) btn = lv_obj_get_child_back(scrl, prev_btn); if(btn == NULL) return NULL; - while(lv_list_is_list_btn(btn)) { + while(lv_list_is_list_btn(btn) == false) { btn = lv_obj_get_child_back(scrl, btn); if(btn == NULL) break; } From e6b7afccd2f460aa00a83fd5593e6045a5007272 Mon Sep 17 00:00:00 2001 From: canardos Date: Thu, 11 Apr 2019 19:59:55 +0800 Subject: [PATCH 282/590] Allow const lv_style_t objects --- src/lv_core/lv_obj.c | 16 ++++---- src/lv_core/lv_obj.h | 6 +-- src/lv_core/lv_refr.c | 2 +- src/lv_draw/lv_draw_img.c | 2 +- src/lv_draw/lv_draw_img.h | 2 +- src/lv_objx/lv_arc.c | 10 ++--- src/lv_objx/lv_arc.h | 4 +- src/lv_objx/lv_bar.c | 14 +++---- src/lv_objx/lv_bar.h | 8 ++-- src/lv_objx/lv_btn.c | 6 +-- src/lv_objx/lv_btn.h | 6 +-- src/lv_objx/lv_btnm.c | 16 ++++---- src/lv_objx/lv_btnm.h | 6 +-- src/lv_objx/lv_calendar.c | 18 ++++----- src/lv_objx/lv_calendar.h | 18 ++++----- src/lv_objx/lv_canvas.c | 12 +++--- src/lv_objx/lv_canvas.h | 4 +- src/lv_objx/lv_cb.c | 18 ++++----- src/lv_objx/lv_cb.h | 4 +- src/lv_objx/lv_chart.c | 6 +-- src/lv_objx/lv_chart.h | 4 +- src/lv_objx/lv_cont.c | 34 ++++++++-------- src/lv_objx/lv_cont.h | 4 +- src/lv_objx/lv_ddlist.c | 54 ++++++++++++------------- src/lv_objx/lv_ddlist.h | 6 +-- src/lv_objx/lv_gauge.c | 18 ++++----- src/lv_objx/lv_gauge.h | 2 +- src/lv_objx/lv_img.c | 4 +- src/lv_objx/lv_img.h | 4 +- src/lv_objx/lv_imgbtn.c | 12 +++--- src/lv_objx/lv_imgbtn.h | 4 +- src/lv_objx/lv_kb.c | 6 +-- src/lv_objx/lv_kb.h | 4 +- src/lv_objx/lv_label.c | 78 ++++++++++++++++++------------------- src/lv_objx/lv_label.h | 4 +- src/lv_objx/lv_led.c | 4 +- src/lv_objx/lv_led.h | 4 +- src/lv_objx/lv_line.c | 22 +++++------ src/lv_objx/lv_line.h | 4 +- src/lv_objx/lv_list.c | 6 +-- src/lv_objx/lv_list.h | 14 +++---- src/lv_objx/lv_lmeter.c | 4 +- src/lv_objx/lv_lmeter.h | 2 +- src/lv_objx/lv_mbox.c | 14 +++---- src/lv_objx/lv_mbox.h | 4 +- src/lv_objx/lv_objx_templ.c | 2 +- src/lv_objx/lv_objx_templ.h | 2 +- src/lv_objx/lv_page.c | 71 ++++++++++++++++----------------- src/lv_objx/lv_page.h | 8 ++-- src/lv_objx/lv_preload.c | 8 ++-- src/lv_objx/lv_preload.h | 4 +- src/lv_objx/lv_roller.c | 73 +++++++++++++++++----------------- src/lv_objx/lv_roller.h | 4 +- src/lv_objx/lv_slider.c | 16 ++++---- src/lv_objx/lv_slider.h | 6 +-- src/lv_objx/lv_spinbox.h | 2 +- src/lv_objx/lv_sw.c | 6 +-- src/lv_objx/lv_sw.h | 8 ++-- src/lv_objx/lv_ta.c | 70 ++++++++++++++++----------------- src/lv_objx/lv_ta.h | 10 ++--- src/lv_objx/lv_table.c | 16 ++++---- src/lv_objx/lv_table.h | 6 +-- src/lv_objx/lv_tabview.c | 28 ++++++------- src/lv_objx/lv_tabview.h | 4 +- src/lv_objx/lv_tileview.c | 10 ++--- src/lv_objx/lv_tileview.h | 4 +- src/lv_objx/lv_win.c | 16 ++++---- src/lv_objx/lv_win.h | 18 ++++----- 68 files changed, 440 insertions(+), 446 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 1ff8c74ad1e2..d7cb4ad2903a 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -996,7 +996,7 @@ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en) * @param obj pointer to an object * @param style_p pointer to the new style */ -void lv_obj_set_style(lv_obj_t * obj, lv_style_t * style) +void lv_obj_set_style(lv_obj_t * obj, const lv_style_t * style) { obj->style_p = style; @@ -1571,7 +1571,7 @@ lv_coord_t lv_obj_get_height(const lv_obj_t * obj) */ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj) { - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); return lv_obj_get_width(obj) - style->body.padding.left - style->body.padding.right; } @@ -1583,7 +1583,7 @@ lv_coord_t lv_obj_get_width_fit(lv_obj_t * obj) */ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj) { - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); return lv_obj_get_height(obj) - style->body.padding.top - style->body.padding.bottom; } @@ -1621,9 +1621,9 @@ bool lv_obj_get_auto_realign(lv_obj_t * obj) * @param obj pointer to an object * @return pointer to a style */ -lv_style_t * lv_obj_get_style(const lv_obj_t * obj) +const lv_style_t * lv_obj_get_style(const lv_obj_t * obj) { - lv_style_t * style_act = obj->style_p; + const lv_style_t * style_act = obj->style_p; if(style_act == NULL) { lv_obj_t * par = obj->par; @@ -1923,7 +1923,7 @@ static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mo if(lv_area_is_in(mask_p, &obj->coords) == false) return false; /*Can cover the area only if fully solid (no opacity)*/ - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); if(style->body.opa != LV_OPA_COVER) return false; /* Because of the radius it is not sure the area is covered @@ -1947,7 +1947,7 @@ static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mo if(lv_area_is_in(mask_p, &area_tmp) == false) return false; } else if(mode == LV_DESIGN_DRAW_MAIN) { - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); lv_draw_rect(&obj->coords, mask_p, style, lv_obj_get_opa_scale(obj)); } @@ -1967,7 +1967,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) lv_res_t res = LV_RES_OK; - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); lv_indev_t * indev_act = lv_indev_get_act(); diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2f75df0815c0..1fa0bf1dfc39 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -189,7 +189,7 @@ typedef struct _lv_obj_t lv_design_cb_t design_cb; /*Object type specific design function*/ void * ext_attr; /*Object type specific extended data*/ - lv_style_t * style_p; /*Pointer to the object's style*/ + const lv_style_t * style_p; /*Pointer to the object's style*/ #if LV_USE_GROUP != 0 void * group_p; /*Pointer to the group of the object*/ @@ -407,7 +407,7 @@ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en); * @param obj pointer to an object * @param style_p pointer to the new style */ -void lv_obj_set_style(lv_obj_t * obj, lv_style_t * style); +void lv_obj_set_style(lv_obj_t * obj, const lv_style_t * style); /** * Notify an object about its style is modified @@ -718,7 +718,7 @@ bool lv_obj_get_auto_realign(lv_obj_t * obj); * @param obj pointer to an object * @return pointer to a style */ -lv_style_t * lv_obj_get_style(const lv_obj_t * obj); +const lv_style_t * lv_obj_get_style(const lv_obj_t * obj); /*----------------- * Attribute get diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 7c3b04a25572..3d80c04e588d 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -412,7 +412,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If no better children check this object*/ if(found_p == NULL) { - lv_style_t * style = lv_obj_get_style(obj); + const lv_style_t * style = lv_obj_get_style(obj); if(style->body.opa == LV_OPA_COVER && obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && lv_obj_get_opa_scale(obj) == LV_OPA_COVER) { diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index be9eba7dac41..c09bf3279021 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -158,7 +158,7 @@ lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) * @return color of the point */ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, - lv_style_t * style) + const lv_style_t * style) { lv_color_t p_color = LV_COLOR_BLACK; if(x >= dsc->header.w) { diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 07a1be9dedea..33d332d23636 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -174,7 +174,7 @@ void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_o * @return color of the point */ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, - lv_style_t * style); + const lv_style_t * style); /** * Get the alpha value of an image's pixel * @param dsc pointer to an image descriptor diff --git a/src/lv_objx/lv_arc.c b/src/lv_objx/lv_arc.c index 0228a696b3d4..23b0a3b65817 100644 --- a/src/lv_objx/lv_arc.c +++ b/src/lv_objx/lv_arc.c @@ -136,7 +136,7 @@ void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end) * @param type which style should be set * @param style pointer to a style * */ -void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t * style) +void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, const lv_style_t * style) { switch(type) { case LV_ARC_STYLE_MAIN: lv_obj_set_style(arc, style); break; @@ -177,9 +177,9 @@ uint16_t lv_arc_get_angle_end(lv_obj_t * arc) * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type) +const lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_ARC_STYLE_MAIN: style = lv_obj_get_style(arc); break; @@ -219,8 +219,8 @@ static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode } /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { - lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc); - lv_style_t * style = lv_arc_get_style(arc, LV_ARC_STYLE_MAIN); + lv_arc_ext_t * ext = lv_obj_get_ext_attr(arc); + const lv_style_t * style = lv_arc_get_style(arc, LV_ARC_STYLE_MAIN); lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(arc), lv_obj_get_height(arc))) / 2; lv_coord_t x = arc->coords.x1 + lv_obj_get_width(arc) / 2; diff --git a/src/lv_objx/lv_arc.h b/src/lv_objx/lv_arc.h index 023ccc85d4be..8cc34d5f74e4 100644 --- a/src/lv_objx/lv_arc.h +++ b/src/lv_objx/lv_arc.h @@ -78,7 +78,7 @@ void lv_arc_set_angles(lv_obj_t * arc, uint16_t start, uint16_t end); * @param type which style should be set * @param style pointer to a style * */ -void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, lv_style_t * style); +void lv_arc_set_style(lv_obj_t * arc, lv_arc_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -104,7 +104,7 @@ uint16_t lv_arc_get_angle_end(lv_obj_t * arc); * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type); +const lv_style_t * lv_arc_get_style(const lv_obj_t * arc, lv_arc_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 21147f78b771..11520dfefc04 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -215,7 +215,7 @@ void lv_bar_set_sym(lv_obj_t * bar, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style) +void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, const lv_style_t * style) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); @@ -286,9 +286,9 @@ bool lv_bar_get_sym(lv_obj_t * bar) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type) +const lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); switch(type) { @@ -329,7 +329,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode * At value = 100% the indicator can cover to whole background and the focused style won't * be visible*/ if(lv_obj_is_focused(bar)) { - lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); + const lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); style_tmp.body.border.width = 0; @@ -342,7 +342,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(ext->cur_value != ext->min_value || ext->sym || ext->anim_start != LV_BAR_ANIM_STATE_INV) { - lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); + const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); indic_area.x1 += style_indic->body.padding.left; @@ -431,7 +431,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode /*Draw the border*/ if(lv_obj_is_focused(bar)) { lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); - lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); + const lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); style_tmp.body.opa = LV_OPA_TRANSP; @@ -459,7 +459,7 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); + const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); if(style_indic->body.shadow.width > bar->ext_size) bar->ext_size = style_indic->body.shadow.width; } else if(sign == LV_SIGNAL_GET_TYPE) { diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index 5634a5fbbe56..f2ba493a760d 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -50,8 +50,8 @@ typedef struct int16_t anim_end; int16_t anim_state; uint16_t anim_time; - uint8_t sym : 1; /*Symmetric: means the center is around zero value*/ - lv_style_t * style_indic; /*Style of the indicator*/ + uint8_t sym : 1; /*Symmetric: means the center is around zero value*/ + const lv_style_t * style_indic; /*Style of the indicator*/ } lv_bar_ext_t; enum { @@ -106,7 +106,7 @@ void lv_bar_set_sym(lv_obj_t * bar, bool en); * @param type which style should be set * @param style pointer to a style */ -void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, lv_style_t * style); +void lv_bar_set_style(lv_obj_t * bar, lv_bar_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -146,7 +146,7 @@ bool lv_bar_get_sym(lv_obj_t * bar); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type); +const lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type); /********************** * MACROS diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 8289393534ae..d08442b879e3 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -254,7 +254,7 @@ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time) * @param type which style should be set * @param style pointer to a style */ -void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, lv_style_t * style) +void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, const lv_style_t * style) { lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); @@ -350,9 +350,9 @@ uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) +const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); switch(type) { diff --git a/src/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h index 5898b7ed73eb..2e0d12101f9a 100644 --- a/src/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -54,7 +54,7 @@ typedef struct { lv_cont_ext_t cont; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ + const lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/ #if LV_BTN_INK_EFFECT uint16_t ink_in_time; /*[ms] Time of ink fill effect (0: disable ink effect)*/ @@ -185,7 +185,7 @@ void lv_btn_set_ink_out_time(lv_obj_t * btn, uint16_t time); * @param type which style should be set * @param style pointer to a style * */ -void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, lv_style_t * style); +void lv_btn_set_style(lv_obj_t * btn, lv_btn_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -282,7 +282,7 @@ uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn); * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type); +const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type); /********************** * MACROS diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index fac07cb06af9..e91d7434e0c2 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -164,7 +164,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) ext->map_p = map; /*Set size and positions of the buttons*/ - lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); + const lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); lv_coord_t max_w = lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; lv_coord_t max_h = @@ -303,7 +303,7 @@ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id) * @param type which style should be set * @param style pointer to a style */ -void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style) +void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, const lv_style_t * style) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); @@ -530,9 +530,9 @@ bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) +const lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); switch(type) { @@ -586,8 +586,8 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo ancestor_design_f(btnm, mask, mode); lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); - lv_style_t * bg_style = lv_obj_get_style(btnm); - lv_style_t * btn_style; + const lv_style_t * bg_style = lv_obj_get_style(btnm); + const lv_style_t * btn_style; lv_opa_t opa_scale = lv_obj_get_opa_scale(btnm); lv_area_t area_btnm; @@ -831,7 +831,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(c == LV_KEY_DOWN) { - lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); + const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; @@ -853,7 +853,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_act = ext->btn_id_pr; lv_obj_invalidate(btnm); } else if(c == LV_KEY_UP) { - lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); + const lv_style_t * style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); /*Find the area below the the current*/ if(ext->btn_id_pr == LV_BTNM_BTN_NONE) { ext->btn_id_pr = 0; diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 26c0740f92da..cdbcc47fad56 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -54,7 +54,7 @@ typedef struct const char ** map_p; /*Pointer to the current map*/ lv_area_t * button_areas; /*Array of areas of buttons*/ lv_btnm_ctrl_t * ctrl_bits; /*Array of control bytes*/ - lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ + const lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ uint16_t @@ -131,7 +131,7 @@ void lv_btnm_set_pressed(const lv_obj_t * btnm, uint16_t id); * @param type which style should be set * @param style pointer to a style */ -void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, lv_style_t * style); +void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, const lv_style_t * style); /** * Enable recoloring of button's texts @@ -242,7 +242,7 @@ bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type); +const lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type); /** * Find whether "one toggle" mode is enabled. diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 4f547ae73fdd..bef7f7b99688 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -279,7 +279,7 @@ void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** day_names) * @param type which style should be set * @param style pointer to a style * */ -void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_style_t * style) +void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, const lv_style_t * style) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); @@ -384,9 +384,9 @@ const char ** lv_calendar_get_month_names(const lv_obj_t * calendar) * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type) +const lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); switch(type) { @@ -569,7 +569,7 @@ static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touche { lv_area_t days_area; lv_area_copy(&days_area, &calendar->coords); - lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); + const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); days_area.x1 += style_bg->body.padding.left; days_area.x2 -= style_bg->body.padding.right; days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + @@ -670,7 +670,7 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) NULL, -1, -1); /*Add the left arrow*/ - lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; + const lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.left; lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1); @@ -719,8 +719,8 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) */ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) { - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); lv_area_t label_area; lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + @@ -739,7 +739,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) uint8_t day_cnt; uint8_t month_start_day = get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); day_draw_state_t draw_state; /*true: Not the prev. or next month is drawn*/ - lv_style_t * act_style; + const lv_style_t * act_style; /*If starting with the first day of the week then the previous month is not visible*/ if(month_start_day == 0) { @@ -821,7 +821,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) } /*Get the final style : highlighted/week box/today box/normal*/ - lv_style_t * final_style; + const lv_style_t * final_style; if(draw_state == DAY_DRAW_PREV_MONTH && is_highlighted( calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0), diff --git a/src/lv_objx/lv_calendar.h b/src/lv_objx/lv_calendar.h index bd6049726ff1..997ecd6a8d84 100644 --- a/src/lv_objx/lv_calendar.h +++ b/src/lv_objx/lv_calendar.h @@ -56,13 +56,13 @@ typedef struct month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ /*Styles*/ - lv_style_t * style_header; - lv_style_t * style_header_pr; - lv_style_t * style_day_names; - lv_style_t * style_highlighted_days; - lv_style_t * style_inactive_days; - lv_style_t * style_week_box; - lv_style_t * style_today_box; + const lv_style_t * style_header; + const lv_style_t * style_header_pr; + const lv_style_t * style_day_names; + const lv_style_t * style_highlighted_days; + const lv_style_t * style_inactive_days; + const lv_style_t * style_week_box; + const lv_style_t * style_today_box; } lv_calendar_ext_t; /*Styles*/ @@ -148,7 +148,7 @@ void lv_calendar_set_month_names(lv_obj_t * calendar, const char ** day_names); * @param type which style should be set * @param style pointer to a style * */ -void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, lv_style_t * style); +void lv_calendar_set_style(lv_obj_t * calendar, lv_calendar_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -209,7 +209,7 @@ const char ** lv_calendar_get_month_names(const lv_obj_t * calendar); * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type); +const lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 5d7e5d1df983..92f70ac4a8cf 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -141,7 +141,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t * @param type which style should be set * @param style pointer to a style */ -void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * style) +void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, const lv_style_t * style) { switch(type) { case LV_CANVAS_STYLE_MAIN: lv_img_set_style(canvas, style); break; @@ -161,8 +161,8 @@ void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * */ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) { - lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); + lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); + const lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); return lv_img_buf_get_px_color(&ext->dsc, x, y, style); } @@ -185,10 +185,10 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type) +const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type) { // lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_CANVAS_STYLE_MAIN: style = lv_img_get_style(canvas); break; @@ -323,7 +323,7 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) { lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas); - lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); + const lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); int32_t sinma = lv_trigo_sin(-angle); int32_t cosma = lv_trigo_sin(-angle + 90); /* cos */ diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index ff1cf548e5d0..959e3d8a46fa 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -92,7 +92,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t * @param type which style should be set * @param style pointer to a style */ -void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, lv_style_t * style); +void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -120,7 +120,7 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type); +const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index fb9c2e730ec0..8e3073e786d5 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -149,7 +149,7 @@ void lv_cb_set_static_text(lv_obj_t * cb, const char * txt) * @param type which style should be set * @param style pointer to a style * */ -void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, lv_style_t * style) +void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, const lv_style_t * style) { lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); @@ -194,10 +194,10 @@ const char * lv_cb_get_text(const lv_obj_t * cb) * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type) +const lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type) { - lv_style_t * style = NULL; - lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); + const lv_style_t * style = NULL; + lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); switch(type) { case LV_CB_STYLE_BOX_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_REL); break; @@ -271,10 +271,10 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig /* If the check box is the active in a group and * the background is not visible (transparent) * then activate the style of the bullet*/ - lv_style_t * style_ori = lv_obj_get_style(bullet); - lv_obj_t * bg = lv_obj_get_parent(bullet); - lv_style_t * style_page = lv_obj_get_style(bg); - lv_group_t * g = lv_obj_get_group(bg); + const lv_style_t * style_ori = lv_obj_get_style(bullet); + lv_obj_t * bg = lv_obj_get_parent(bullet); + const lv_style_t * style_page = lv_obj_get_style(bg); + lv_group_t * g = lv_obj_get_group(bg); if(style_page->body.opa == LV_OPA_TRANSP) { /*Is the Background visible?*/ if(lv_group_get_focused(g) == bg) { lv_style_t * style_mod; @@ -313,7 +313,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); if(sign == LV_SIGNAL_STYLE_CHG) { - lv_style_t * label_style = lv_label_get_style(ext->label); + const lv_style_t * label_style = lv_label_get_style(ext->label); lv_obj_set_size(ext->bullet, lv_font_get_height(label_style->text.font), lv_font_get_height(label_style->text.font)); lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); diff --git a/src/lv_objx/lv_cb.h b/src/lv_objx/lv_cb.h index cae312fa171f..35abbb3492fa 100644 --- a/src/lv_objx/lv_cb.h +++ b/src/lv_objx/lv_cb.h @@ -118,7 +118,7 @@ static inline void lv_cb_set_inactive(lv_obj_t * cb) * @param type which style should be set * @param style pointer to a style * */ -void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, lv_style_t * style); +void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -147,7 +147,7 @@ static inline bool lv_cb_is_checked(const lv_obj_t * cb) * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type); +const lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type); /********************** * MACROS diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index adad30e4f6e1..8c5f31b5555e 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -611,9 +611,9 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param */ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_style_t * style = lv_obj_get_style(chart); - lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + const lv_style_t * style = lv_obj_get_style(chart); + lv_opa_t opa_scale = lv_obj_get_opa_scale(chart); uint8_t div_i; uint8_t div_i_end; diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 09e201f78577..6c76c3c24213 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -206,7 +206,7 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y); * @param chart pointer to a chart object * @param style pointer to a style */ -static inline void lv_chart_set_style(lv_obj_t * chart, lv_style_t * style) +static inline void lv_chart_set_style(lv_obj_t * chart, const lv_style_t * style) { lv_obj_set_style(chart, style); } @@ -280,7 +280,7 @@ lv_opa_t lv_chart_get_series_darking(const lv_obj_t * chart); * @param chart pointer to an chart object * @return pointer to the chart's style */ -static inline lv_style_t * lv_chart_get_style(const lv_obj_t * chart) +static inline const lv_style_t * lv_chart_get_style(const lv_obj_t * chart) { return lv_obj_get_style(chart); } diff --git a/src/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c index 7782517e6c0f..690d09cc6f04 100644 --- a/src/lv_objx/lv_cont.c +++ b/src/lv_objx/lv_cont.c @@ -303,7 +303,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) /*Adjust margin and get the alignment type*/ lv_align_t align; - lv_style_t * style = lv_obj_get_style(cont); + const lv_style_t * style = lv_obj_get_style(cont); lv_coord_t hpad_corr; switch(type) { @@ -353,7 +353,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) /*Adjust margin and get the alignment type*/ lv_align_t align; - lv_style_t * style = lv_obj_get_style(cont); + const lv_style_t * style = lv_obj_get_style(cont); lv_coord_t vpad_corr; switch(type) { @@ -400,9 +400,9 @@ static void lv_cont_layout_row(lv_obj_t * cont) static void lv_cont_layout_center(lv_obj_t * cont) { lv_obj_t * child; - lv_style_t * style = lv_obj_get_style(cont); - uint32_t obj_num = 0; - lv_coord_t h_tot = 0; + const lv_style_t * style = lv_obj_get_style(cont); + uint32_t obj_num = 0; + lv_coord_t h_tot = 0; LV_LL_READ(cont->child_ll, child) { @@ -444,9 +444,9 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) lv_obj_t * child_rs; /* Row starter child */ lv_obj_t * child_rc; /* Row closer child */ lv_obj_t * child_tmp; /* Temporary child */ - lv_style_t * style = lv_obj_get_style(cont); - lv_coord_t w_obj = lv_obj_get_width(cont); - lv_coord_t act_y = style->body.padding.top; + const lv_style_t * style = lv_obj_get_style(cont); + lv_coord_t w_obj = lv_obj_get_width(cont); + lv_coord_t act_y = style->body.padding.top; /* Disable child change action because the children will be moved a lot * an unnecessary child change signals could be sent*/ @@ -545,12 +545,12 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) static void lv_cont_layout_grid(lv_obj_t * cont) { lv_obj_t * child; - lv_style_t * style = lv_obj_get_style(cont); - lv_coord_t w_tot = lv_obj_get_width(cont); - lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); - lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); - uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / - (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ + const lv_style_t * style = lv_obj_get_style(cont); + lv_coord_t w_tot = lv_obj_get_width(cont); + lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); + lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); + uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / + (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ lv_coord_t x_ofs; if(obj_row > 1) { x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - @@ -607,11 +607,11 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) lv_area_t tight_area; lv_area_t ori; - lv_style_t * style = lv_obj_get_style(cont); + const lv_style_t * style = lv_obj_get_style(cont); lv_obj_t * child_i; - lv_obj_t * par = lv_obj_get_parent(cont); - lv_style_t * par_style = lv_obj_get_style(par); + lv_obj_t * par = lv_obj_get_parent(cont); + const lv_style_t * par_style = lv_obj_get_style(par); lv_area_t flood_area; lv_area_copy(&flood_area, &par->coords); flood_area.x1 += par_style->body.padding.left; diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index efe16589ac29..0d44c81a90dd 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -129,7 +129,7 @@ static inline void lv_cont_set_fit(lv_obj_t * cont, lv_fit_t fit) * @param cont pointer to a container object * @param style pointer to the new style */ -static inline void lv_cont_set_style(lv_obj_t * cont, lv_style_t * style) +static inline void lv_cont_set_style(lv_obj_t * cont, const lv_style_t * style) { lv_obj_set_style(cont, style); } @@ -178,7 +178,7 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont); * @param cont pointer to a container object * @return pointer to the container's style */ -static inline lv_style_t * lv_cont_get_style(const lv_obj_t * cont) +static inline const lv_style_t * lv_cont_get_style(const lv_obj_t * cont) { return lv_obj_get_style(cont); } diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 2beec3c76e5f..8f8f7622d55d 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -280,7 +280,7 @@ void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time) * @param type which style should be set * @param style pointer to a style */ -void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, lv_style_t * style) +void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, const lv_style_t * style) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -409,7 +409,7 @@ uint16_t lv_ddlist_get_anim_time(const lv_obj_t * ddlist) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type) +const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -517,9 +517,9 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig lv_opa_t opa_scale = lv_obj_get_opa_scale(ddlist); /*If the list is opened draw a rectangle under the selected item*/ if(ext->opened != 0 || ext->force_sel) { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + const lv_font_t * font = style->text.font; + lv_coord_t font_h = lv_font_get_height(font); /*Draw the selected*/ lv_area_t rect_area; @@ -542,9 +542,9 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig /*Redraw only in opened state*/ if(ext->opened || ext->force_sel) { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + const lv_font_t * font = style->text.font; + lv_coord_t font_h = lv_font_get_height(font); lv_area_t area_sel; area_sel.y1 = ext->label->coords.y1; @@ -558,7 +558,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig bool area_ok; area_ok = lv_area_intersect(&mask_sel, mask, &area_sel); if(area_ok) { - lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_SEL); + const lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_SEL); lv_style_t new_style; lv_style_copy(&new_style, style); new_style.text.color = sel_style->text.color; @@ -573,10 +573,10 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig else { /*Draw a arrow in ddlist if enabled*/ if(ext->draw_arrow) { - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - const lv_font_t * font = style->text.font; - lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + const lv_font_t * font = style->text.font; + const lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + lv_coord_t font_h = lv_font_get_height(font); lv_style_t new_style; lv_style_copy(&new_style, style); new_style.text.color = sel_style->text.color; @@ -732,8 +732,8 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * /*TODO review this*/ /* Because of the wider selected rectangle ext. size * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ - lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); + const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); + lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); if(scrl->ext_size < hpad) scrl->ext_size = hpad; } else if(sign == LV_SIGNAL_RELEASED) { if(lv_indev_is_dragging(lv_indev_get_act()) == false) { @@ -823,8 +823,8 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) #if LV_USE_ANIMATION == 0 anim_en = false; #endif - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_style_t * style = lv_obj_get_style(ddlist); + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + const lv_style_t * style = lv_obj_get_style(ddlist); lv_coord_t new_height; if(ext->opened) { /*Open the list*/ if(ext->fix_height == 0) @@ -834,10 +834,10 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) new_height = ext->fix_height; } else { /*Close the list*/ - const lv_font_t * font = style->text.font; - lv_style_t * label_style = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(font); - new_height = font_h + 2 * label_style->text.line_space; + const lv_font_t * font = style->text.font; + const lv_style_t * label_style = lv_obj_get_style(ext->label); + lv_coord_t font_h = lv_font_get_height(font); + new_height = font_h + 2 * label_style->text.line_space; lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE); } @@ -904,12 +904,12 @@ static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) */ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) { - lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); - lv_style_t * style = lv_obj_get_style(ddlist); - const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_style_t * label_style = lv_obj_get_style(ext->label); - lv_obj_t * scrl = lv_page_get_scrl(ddlist); + lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); + const lv_style_t * style = lv_obj_get_style(ddlist); + const lv_font_t * font = style->text.font; + lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * label_style = lv_obj_get_style(ext->label); + lv_obj_t * scrl = lv_page_get_scrl(ddlist); lv_coord_t h = lv_obj_get_height(ddlist); lv_coord_t line_y1 = ext->sel_opt_id * (font_h + label_style->text.line_space) + diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index c9f7c6cc19c5..6a47880d6225 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -47,7 +47,7 @@ typedef struct lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ lv_obj_t * label; /*Label for the options*/ - lv_style_t * sel_style; /*Style of the selected option*/ + const lv_style_t * sel_style; /*Style of the selected option*/ uint16_t option_cnt; /*Number of options*/ uint16_t sel_opt_id; /*Index of the current option*/ uint16_t sel_opt_id_ori; /*Store the original index on focus*/ @@ -148,7 +148,7 @@ void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time); * @param type which style should be set * @param style pointer to a style * */ -void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, lv_style_t * style); +void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, const lv_style_t * style); /** * Set the alignment of the labels in a drop down list @@ -225,7 +225,7 @@ uint16_t lv_ddlist_get_anim_time(const lv_obj_t * ddlist); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type); +const lv_style_t * lv_ddlist_get_style(const lv_obj_t * ddlist, lv_ddlist_style_t type); /** * Get the alignment of the labels in a drop down list diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 4162fb115984..10739014734a 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -272,9 +272,9 @@ static bool lv_gauge_design(lv_obj_t * gauge, const lv_area_t * mask, lv_design_ /* Store the real pointer because of 'lv_group' * If the object is in focus 'lv_obj_get_style()' will give a pointer to tmp style * and to the real object style. It is important because of style change tricks below*/ - lv_style_t * style_ori_p = gauge->style_p; - lv_style_t * style = lv_obj_get_style(gauge); - lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); + const lv_style_t * style_ori_p = gauge->style_p; + const lv_style_t * style = lv_obj_get_style(gauge); + lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); lv_gauge_draw_scale(gauge, mask); @@ -347,9 +347,9 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) { char scale_txt[16]; - lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - lv_style_t * style = lv_obj_get_style(gauge); - lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); + lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); + const lv_style_t * style = lv_obj_get_style(gauge); + lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; @@ -398,9 +398,9 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) { lv_style_t style_needle; - lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - lv_style_t * style = lv_gauge_get_style(gauge); - lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); + lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); + const lv_style_t * style = lv_gauge_get_style(gauge); + lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left; lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; diff --git a/src/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h index ebb90391e40c..2b91545fd8c9 100644 --- a/src/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -205,7 +205,7 @@ static inline uint16_t lv_gauge_get_scale_angle(const lv_obj_t * gauge) * @param gauge pointer to a gauge object * @return pointer to the gauge's style */ -static inline lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge) +static inline const lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge) { return lv_obj_get_style(gauge); } diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 78f8689b63f1..510ad9f580a6 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -176,7 +176,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) if(src_type == LV_IMG_SRC_SYMBOL) { /*`lv_img_dsc_get_info` couldn't set the with and height of a font so set it here*/ - lv_style_t * style = lv_img_get_style(img); + const lv_style_t * style = lv_img_get_style(img); lv_point_t size; lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); @@ -342,7 +342,7 @@ lv_coord_t lv_img_get_offset_y(lv_obj_t * img) */ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode_t mode) { - lv_style_t * style = lv_obj_get_style(img); + const lv_style_t * style = lv_obj_get_style(img); lv_img_ext_t * ext = lv_obj_get_ext_attr(img); if(mode == LV_DESIGN_COVER_CHK) { diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index a1666d378f5f..59b0b001969c 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -121,7 +121,7 @@ void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y); * @param img pointer to an image object * @param style pointer to a style */ -static inline void lv_img_set_style(lv_obj_t * img, lv_style_t * style) +static inline void lv_img_set_style(lv_obj_t * img, const lv_style_t * style) { lv_obj_set_style(img, style); } @@ -181,7 +181,7 @@ lv_coord_t lv_img_get_offset_y(lv_obj_t * img); * @param img pointer to an image object * @return pointer to the image's style */ -static inline lv_style_t * lv_img_get_style(const lv_obj_t * img) +static inline const lv_style_t * lv_img_get_style(const lv_obj_t * img) { return lv_obj_get_style(img); } diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index 4d6a16b47b4e..cf98c82b1bfd 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -151,7 +151,7 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src * @param type which style should be set * @param style pointer to a style */ -void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t * style) +void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, const lv_style_t * style) { lv_btn_set_style(imgbtn, type, style); } @@ -222,7 +222,7 @@ const void * lv_imgbtn_get_src_right(lv_obj_t * imgbtn, lv_btn_state_t state) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type) +const lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type) { return lv_btn_get_style(imgbtn, type); } @@ -264,10 +264,10 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { /*Just draw an image*/ - lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); - lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); - lv_style_t * style = lv_imgbtn_get_style(imgbtn, state); - lv_opa_t opa_scale = lv_obj_get_opa_scale(imgbtn); + lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); + lv_btn_state_t state = lv_imgbtn_get_state(imgbtn); + const lv_style_t * style = lv_imgbtn_get_style(imgbtn, state); + lv_opa_t opa_scale = lv_obj_get_opa_scale(imgbtn); #if LV_IMGBTN_TILED == 0 const void * src = ext->img_src[state]; diff --git a/src/lv_objx/lv_imgbtn.h b/src/lv_objx/lv_imgbtn.h index 50fee0e17fa8..ff9d92c6b2b2 100644 --- a/src/lv_objx/lv_imgbtn.h +++ b/src/lv_objx/lv_imgbtn.h @@ -143,7 +143,7 @@ static inline void lv_imgbtn_toggle(lv_obj_t * imgbtn) * @param type which style should be set * @param style pointer to a style */ -void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, lv_style_t * style); +void lv_imgbtn_set_style(lv_obj_t * imgbtn, lv_imgbtn_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -211,7 +211,7 @@ static inline bool lv_imgbtn_get_toggle(const lv_obj_t * imgbtn) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type); +const lv_style_t * lv_imgbtn_get_style(const lv_obj_t * imgbtn, lv_imgbtn_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index da15be7b1f07..feba953467fa 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -228,7 +228,7 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, lv_style_t * style) +void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, const lv_style_t * style) { switch(type) { case LV_KB_STYLE_BG: lv_btnm_set_style(kb, LV_BTNM_STYLE_BG, style); break; @@ -285,9 +285,9 @@ bool lv_kb_get_cursor_manage(const lv_obj_t * kb) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) +const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_KB_STYLE_BG: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BG); break; diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 8254b59cbcc5..0f34b93c009e 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -135,7 +135,7 @@ static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t ctrl_m * @param type which style should be set * @param style pointer to a style */ -void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, lv_style_t * style); +void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -178,7 +178,7 @@ static inline const char ** lv_kb_get_map_array(const lv_obj_t * kb) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type); +const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index b1b90ebbc868..e3c50d16455a 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -419,16 +419,16 @@ uint16_t lv_label_get_anim_speed(const lv_obj_t * label) */ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; - uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; + uint32_t new_line_start = 0; + lv_coord_t max_w = lv_obj_get_width(label); + const lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; @@ -492,16 +492,16 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t */ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; - uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; + uint32_t new_line_start = 0; + lv_coord_t max_w = lv_obj_get_width(label); + const lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; @@ -566,16 +566,16 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) */ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) { - const char * txt = lv_label_get_text(label); - lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - uint32_t line_start = 0; - uint32_t new_line_start = 0; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); - lv_coord_t y = 0; - lv_txt_flag_t flag = LV_TXT_FLAG_NONE; + const char * txt = lv_label_get_text(label); + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + uint32_t line_start = 0; + uint32_t new_line_start = 0; + lv_coord_t max_w = lv_obj_get_width(label); + const lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; + uint8_t letter_height = lv_font_get_height(font); + lv_coord_t y = 0; + lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; @@ -716,7 +716,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ return false; else if(mode == LV_DESIGN_DRAW_MAIN) { lv_area_t coords; - lv_style_t * style = lv_obj_get_style(label); + const lv_style_t * style = lv_obj_get_style(label); lv_opa_t opa_scale = lv_obj_get_opa_scale(label); lv_obj_get_coords(label, &coords); @@ -826,11 +826,11 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { if(ext->body_draw) { - lv_style_t * style = lv_label_get_style(label); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); - label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); + const lv_style_t * style = lv_label_get_style(label); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.left); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.right); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.top); + label->ext_size = LV_MATH_MAX(label->ext_size, style->body.padding.bottom); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; @@ -854,9 +854,9 @@ static void lv_label_refr_text(lv_obj_t * label) if(ext->text == NULL) return; - lv_coord_t max_w = lv_obj_get_width(label); - lv_style_t * style = lv_obj_get_style(label); - const lv_font_t * font = style->text.font; + lv_coord_t max_w = lv_obj_get_width(label); + const lv_style_t * style = lv_obj_get_style(label); + const lv_font_t * font = style->text.font; /*If the width will be expanded set the max length to very big */ if(ext->long_mode == LV_LABEL_LONG_EXPAND) { diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index ad95f2ca2502..05f4e1ace918 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -160,7 +160,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); * @param label pointer to an label object * @param style pointer to a style */ -static inline void lv_label_set_style(lv_obj_t * label, lv_style_t * style) +static inline void lv_label_set_style(lv_obj_t * label, const lv_style_t * style) { lv_obj_set_style(label, style); } @@ -241,7 +241,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); * @param label pointer to an label object * @return pointer to the label's style */ -static inline lv_style_t * lv_label_get_style(const lv_obj_t * label) +static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) { return lv_obj_get_style(label); } diff --git a/src/lv_objx/lv_led.c b/src/lv_objx/lv_led.c index f390bec8e2d7..4f95cc3bcf3a 100644 --- a/src/lv_objx/lv_led.c +++ b/src/lv_objx/lv_led.c @@ -187,12 +187,12 @@ static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode } else if(mode == LV_DESIGN_DRAW_MAIN) { /*Make darker colors in a temporary style according to the brightness*/ lv_led_ext_t * ext = lv_obj_get_ext_attr(led); - lv_style_t * style = lv_obj_get_style(led); + const lv_style_t * style = lv_obj_get_style(led); /* Store the real pointer because of 'lv_group' * If the object is in focus 'lv_obj_get_style()' will give a pointer to tmp style * and to the real object style. It is important because of style change tricks below*/ - lv_style_t * style_ori_p = led->style_p; + const lv_style_t * style_ori_p = led->style_p; /*Create a temporal style*/ lv_style_t leds_tmp; diff --git a/src/lv_objx/lv_led.h b/src/lv_objx/lv_led.h index 63f76917b5a7..957c2ae09bea 100644 --- a/src/lv_objx/lv_led.h +++ b/src/lv_objx/lv_led.h @@ -81,7 +81,7 @@ void lv_led_toggle(lv_obj_t * led); * @param led pointer to a led object * @param style pointer to a style */ -static inline void lv_led_set_style(lv_obj_t * led, lv_style_t * style) +static inline void lv_led_set_style(lv_obj_t * led, const lv_style_t * style) { lv_obj_set_style(led, style); } @@ -98,7 +98,7 @@ uint8_t lv_led_get_bright(const lv_obj_t * led); * @param led pointer to an led object * @return pointer to the led's style */ -static inline lv_style_t * lv_led_get_style(const lv_obj_t * led) +static inline const lv_style_t * lv_led_get_style(const lv_obj_t * led) { return lv_obj_get_style(led); } diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 24ae3eed2ad0..06bf12457fef 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -121,7 +121,7 @@ void lv_line_set_points(lv_obj_t * line, const lv_point_t * point_a, uint16_t po ymax = LV_MATH_MAX(point_a[i].y, ymax); } - lv_style_t * style = lv_line_get_style(line); + const lv_style_t * style = lv_line_get_style(line); lv_obj_set_size(line, xmax + style->line.width, ymax + style->line.width); } @@ -214,7 +214,7 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo if(ext->point_num == 0 || ext->point_array == NULL) return false; - lv_style_t * style = lv_obj_get_style(line); + const lv_style_t * style = lv_obj_get_style(line); lv_opa_t opa_scale = lv_obj_get_opa_scale(line); lv_area_t area; lv_obj_get_coords(line, &area); @@ -225,12 +225,12 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo lv_coord_t h = lv_obj_get_height(line); uint16_t i; - lv_style_t circle_style; /*If rounded...*/ - lv_style_copy(&circle_style, style); - circle_style.body.radius = LV_RADIUS_CIRCLE; - circle_style.body.main_color = style->line.color; - circle_style.body.grad_color = style->line.color; - circle_style.body.opa = style->line.opa; + lv_style_t circle_style_tmp; /*If rounded...*/ + lv_style_copy(&circle_style_tmp, style); + circle_style_tmp.body.radius = LV_RADIUS_CIRCLE; + circle_style_tmp.body.main_color = style->line.color; + circle_style_tmp.body.grad_color = style->line.color; + circle_style_tmp.body.opa = style->line.opa; lv_area_t circle_area; /*Read all points and draw the lines*/ @@ -256,7 +256,7 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p1.x + ((style->line.width - 1) >> 1); circle_area.y2 = p1.y + ((style->line.width - 1) >> 1); - lv_draw_rect(&circle_area, mask, &circle_style, opa_scale); + lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale); } } @@ -268,7 +268,7 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p2.x + ((style->line.width - 1) >> 1); circle_area.y2 = p2.y + ((style->line.width - 1) >> 1); - lv_draw_rect(&circle_area, mask, &circle_style, opa_scale); + lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale); } } return true; @@ -296,7 +296,7 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param) } buf->type[i] = "lv_line"; } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - lv_style_t * style = lv_line_get_style(line); + const lv_style_t * style = lv_line_get_style(line); if(line->ext_size < style->line.width) line->ext_size = style->line.width; } diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index ea1ae8b02533..35c44acf8617 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -91,7 +91,7 @@ void lv_line_set_y_invert(lv_obj_t * line, bool en); * @param line pointer to a line object * @param style pointer to a style */ -static inline void lv_line_set_style(lv_obj_t * line, lv_style_t * style) +static inline void lv_line_set_style(lv_obj_t * line, const lv_style_t * style) { lv_obj_set_style(line, style); } @@ -129,7 +129,7 @@ bool lv_line_get_y_invert(const lv_obj_t * line); * @param line pointer to an line object * @return pointer to the line's style */ -static inline lv_style_t * lv_line_get_style(const lv_obj_t * line) +static inline const lv_style_t * lv_line_get_style(const lv_obj_t * line) { return lv_obj_get_style(line); } diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 883fd7c14640..6e691cd80827 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -342,7 +342,7 @@ void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) * @param type which style should be set * @param style pointer to a style */ -void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style) +void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); lv_btn_style_t btn_style_refr = LV_BTN_STYLE_REL; @@ -575,9 +575,9 @@ uint16_t lv_list_get_anim_time(const lv_obj_t * list) * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type) +const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_list_ext_t * ext = lv_obj_get_ext_attr(list); switch(type) { diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 811f4696262e..982d6d2a1369 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -52,11 +52,11 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - uint16_t anim_time; /*Scroll animation time*/ - lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/ - lv_style_t * style_img; /*Style of the list element images on buttons*/ - uint32_t size; /*the number of items(buttons) in the list*/ - bool single_mode; /* whether single selected mode is enabled */ + uint16_t anim_time; /*Scroll animation time*/ + const lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/ + const lv_style_t * style_img; /*Style of the list element images on buttons*/ + uint32_t size; /*the number of items(buttons) in the list*/ + bool single_mode; /* whether single selected mode is enabled */ #if LV_USE_GROUP lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ @@ -184,7 +184,7 @@ static inline void lv_list_set_edge_flash(lv_obj_t * list, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, lv_style_t * style); +void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -299,7 +299,7 @@ static inline bool lv_list_get_edge_flash(lv_obj_t * list) * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type); +const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index f4428e503661..d3cf29c348fd 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -250,7 +250,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter); - lv_style_t * style = lv_obj_get_style(lmeter); + const lv_style_t * style = lv_obj_get_style(lmeter); lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); lv_style_t style_tmp; memcpy(&style_tmp, style, sizeof(lv_style_t)); @@ -342,7 +342,7 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_STYLE_CHG) { lv_obj_refresh_ext_size(lmeter); } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - lv_style_t * style = lv_lmeter_get_style(lmeter); + const lv_style_t * style = lv_lmeter_get_style(lmeter); lmeter->ext_size = LV_MATH_MAX(lmeter->ext_size, style->line.width); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; diff --git a/src/lv_objx/lv_lmeter.h b/src/lv_objx/lv_lmeter.h index ab31d3dc35ce..9650985d0dec 100644 --- a/src/lv_objx/lv_lmeter.h +++ b/src/lv_objx/lv_lmeter.h @@ -136,7 +136,7 @@ uint16_t lv_lmeter_get_scale_angle(const lv_obj_t * lmeter); * @param lmeter pointer to a line meter object * @return pointer to the line meter's style */ -static inline lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) +static inline const lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) { return lv_obj_get_style(lmeter); } diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 0a99a78536a8..40c409099ee8 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -236,7 +236,7 @@ void lv_mbox_stop_auto_close(lv_obj_t * mbox) * @param type which style should be set * @param style pointer to a style */ -void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style) +void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, const lv_style_t * style) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); @@ -336,9 +336,9 @@ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) +const lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); switch(type) { @@ -473,7 +473,7 @@ static void mbox_realign(lv_obj_t * mbox) { lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - lv_style_t * style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BG); + const lv_style_t * style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BG); lv_coord_t w = lv_obj_get_width(mbox) - style->body.padding.left - style->body.padding.right; if(ext->text) { @@ -481,9 +481,9 @@ static void mbox_realign(lv_obj_t * mbox) } if(ext->btnm) { - lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); - lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); - lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); + const lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); + const lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); + lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); lv_obj_set_size(ext->btnm, w, font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom + btn_bg_style->body.padding.top + diff --git a/src/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h index de62398e28cf..b2c42e6e5c68 100644 --- a/src/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -130,7 +130,7 @@ void lv_mbox_stop_auto_close(lv_obj_t * mbox); * @param type which style should be set * @param style pointer to a style */ -void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, lv_style_t * style); +void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, const lv_style_t * style); /** * Set whether recoloring is enabled. Must be called after `lv_mbox_add_btns`. @@ -179,7 +179,7 @@ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type); +const lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type); /** * Get whether recoloring is enabled diff --git a/src/lv_objx/lv_objx_templ.c b/src/lv_objx/lv_objx_templ.c index fd6f882c5174..b5c1b258e2e0 100644 --- a/src/lv_objx/lv_objx_templ.c +++ b/src/lv_objx/lv_objx_templ.c @@ -116,7 +116,7 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy) * @param type which style should be set * @param style pointer to a style */ -void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * style) +void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, const lv_style_t * style) { lv_templ_ext_t * ext = lv_obj_get_ext_attr(templ); diff --git a/src/lv_objx/lv_objx_templ.h b/src/lv_objx/lv_objx_templ.h index a54e800b6f0d..82918253b386 100644 --- a/src/lv_objx/lv_objx_templ.h +++ b/src/lv_objx/lv_objx_templ.h @@ -77,7 +77,7 @@ lv_obj_t * lv_templ_create(lv_obj_t * par, const lv_obj_t * copy); * @param type which style should be set * @param style pointer to a style */ -void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, lv_style_t * style); +void lv_templ_set_style(lv_obj_t * templ, lv_templ_style_t type, const lv_style_t * style); /*===================== * Getter functions diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index e68fb3b60331..be27ae4ce30c 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -243,7 +243,7 @@ void lv_page_set_edge_flash(lv_obj_t * page, bool en) * @param type which style should be set * @param style pointer to a style * */ -void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style) +void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, const lv_style_t * style) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); @@ -329,8 +329,8 @@ bool lv_page_get_edge_flash(lv_obj_t * page) */ lv_coord_t lv_page_get_fit_width(lv_obj_t * page) { - lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + const lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + const lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); return lv_obj_get_width(page) - bg_style->body.padding.left - bg_style->body.padding.right - scrl_style->body.padding.left - scrl_style->body.padding.right; @@ -343,8 +343,8 @@ lv_coord_t lv_page_get_fit_width(lv_obj_t * page) */ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) { - lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + const lv_style_t * bg_style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + const lv_style_t * scrl_style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); return lv_obj_get_height(page) - bg_style->body.padding.top - bg_style->body.padding.bottom - scrl_style->body.padding.top - scrl_style->body.padding.bottom; @@ -356,9 +356,9 @@ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) +const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); switch(type) { @@ -384,8 +384,8 @@ lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) */ bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge) { - lv_style_t * page_style = lv_obj_get_style(page); - lv_obj_t * scrl = lv_page_get_scrl(page); + const lv_style_t * page_style = lv_obj_get_style(page); + lv_obj_t * scrl = lv_page_get_scrl(page); lv_area_t page_coords; lv_area_t scrl_coords; @@ -441,8 +441,8 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos); #endif - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + const lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); /*If obj is higher then the page focus where the "error" is smaller*/ lv_coord_t obj_y = obj->coords.y1 - ext->scrl->coords.y1; @@ -620,25 +620,22 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo { if(mode == LV_DESIGN_COVER_CHK) { return ancestor_design(page, mask, mode); - } else if(mode == LV_DESIGN_DRAW_MAIN) { + } + /*Cache page bg style for temporary modification*/ + const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); + lv_style_t style_tmp; + memcpy(&style_tmp, style, sizeof(lv_style_t)); + + if(mode == LV_DESIGN_DRAW_MAIN) { /*Draw without border*/ - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_coord_t border_width_tmp = style->body.border.width; - style->body.border.width = 0; - lv_draw_rect(&page->coords, mask, style, lv_obj_get_opa_scale(page)); - style->body.border.width = border_width_tmp; + style_tmp.body.border.width = 0; + lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page)); } else if(mode == LV_DESIGN_DRAW_POST) { /*Draw the scroll bars finally*/ - /*Draw only a border*/ - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); - lv_coord_t shadow_width_tmp = style->body.shadow.width; - lv_opa_t opa_tmp = style->body.opa; - style->body.shadow.width = 0; - style->body.opa = LV_OPA_TRANSP; - lv_draw_rect(&page->coords, mask, style, lv_obj_get_opa_scale(page)); - style->body.shadow.width = shadow_width_tmp; - style->body.opa = opa_tmp; + style_tmp.body.shadow.width = 0; + style_tmp.body.opa = LV_OPA_TRANSP; + lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page)); lv_page_ext_t * ext = lv_obj_get_ext_attr(page); @@ -723,10 +720,10 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo /* If the page is focused in a group and * the background object is not visible (transparent) * then "activate" the style of the scrollable*/ - lv_style_t * style_scrl_ori = lv_obj_get_style(scrl); - lv_obj_t * page = lv_obj_get_parent(scrl); - lv_style_t * style_page = lv_obj_get_style(page); - lv_group_t * g = lv_obj_get_group(page); + const lv_style_t * style_scrl_ori = lv_obj_get_style(scrl); + lv_obj_t * page = lv_obj_get_parent(scrl); + const lv_style_t * style_page = lv_obj_get_style(page); + lv_group_t * g = lv_obj_get_group(page); if((style_page->body.opa == LV_OPA_TRANSP) && style_page->body.border.width == 0) { /*Is the background visible?*/ if(lv_group_get_focused(g) == page) { @@ -780,7 +777,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) child = lv_obj_get_child(page, child); /*Get the next child before move this*/ /*Reposition the child to take padding into account*/ - lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); tmp->coords.x1 += style->body.padding.left; tmp->coords.x2 += style->body.padding.left; tmp->coords.y1 += style->body.padding.top; @@ -867,9 +864,9 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi res = ancestor_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * page = lv_obj_get_parent(scrl); - lv_style_t * page_style = lv_obj_get_style(page); - lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page); + lv_obj_t * page = lv_obj_get_parent(scrl); + const lv_style_t * page_style = lv_obj_get_style(page); + lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page); if(sign == LV_SIGNAL_CORD_CHG) { /*Limit the position of the scrollable object to be always visible @@ -1062,9 +1059,9 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) */ static void lv_page_sb_refresh(lv_obj_t * page) { - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - lv_style_t * style = lv_obj_get_style(page); - lv_obj_t * scrl = ext->scrl; + lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + const lv_style_t * style = lv_obj_get_style(page); + lv_obj_t * scrl = ext->scrl; lv_coord_t size_tmp; lv_coord_t scrl_w = lv_obj_get_width(scrl); lv_coord_t scrl_h = lv_obj_get_height(scrl); diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 0d7865ce7aee..7ca1c4482ce5 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -67,7 +67,7 @@ typedef struct lv_obj_t * scrl; /*The scrollable object on the background*/ struct { - lv_style_t * style; /*Style of scrollbars*/ + const lv_style_t * style; /*Style of scrollbars*/ lv_area_t hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ lv_area_t @@ -79,7 +79,7 @@ typedef struct struct { uint16_t state; /*Store the current size of the edge flash effect*/ - lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ + const lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ uint8_t enabled : 1; /*1: Show a flash animation on the edge*/ uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In Progress)*/ @@ -237,7 +237,7 @@ static inline void lv_page_set_scrl_layout(lv_obj_t * page, lv_layout_t layout) * @param type which style should be set * @param style pointer to a style */ -void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, lv_style_t * style); +void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -361,7 +361,7 @@ static inline lv_fit_t lv_page_get_scrl_fit_bottom(const lv_obj_t * page) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type); +const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 76fe405eaa42..bed1d310e5db 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -154,7 +154,7 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time) * @param type which style should be set * @param style pointer to a style * */ -void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_t * style) +void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_style_t * style) { switch(type) { case LV_PRELOAD_STYLE_MAIN: lv_arc_set_style(preload, LV_ARC_STYLE_MAIN, style); break; @@ -261,9 +261,9 @@ uint16_t lv_preload_get_spin_time(const lv_obj_t * preload) * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type) +const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_PRELOAD_STYLE_MAIN: style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); break; @@ -330,7 +330,7 @@ static bool lv_preload_design(lv_obj_t * preload, const lv_area_t * mask, lv_des else if(mode == LV_DESIGN_DRAW_MAIN) { /*Draw a circle as background*/ - lv_style_t * style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); + const lv_style_t * style = lv_arc_get_style(preload, LV_ARC_STYLE_MAIN); if(style->body.border.width > 0) { lv_coord_t r = (LV_MATH_MIN(lv_obj_get_width(preload), lv_obj_get_height(preload))) / 2; r -= LV_MATH_MIN(style->body.padding.left, style->body.padding.top); diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 696dc875545e..9715e3a3c76c 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -104,7 +104,7 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time); * @param type which style should be set * @param style pointer to a style * */ -void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, lv_style_t * style); +void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_style_t * style); /** * Set the animation type of a preloadeer. @@ -135,7 +135,7 @@ uint16_t lv_preload_get_spin_time(const lv_obj_t * preload); * @param type which style should be get * @return style pointer to the style * */ -lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type); +const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type); /** * Get the animation type of a preloadeer. diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 39eb1547e810..ffb11e72c426 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -199,9 +199,9 @@ void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en) */ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt) { - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1; + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); + uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1; lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + style_label->text.line_space * n_line_space); } @@ -212,7 +212,7 @@ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt) * @param type which style should be set * @param style pointer to a style */ -void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * style) +void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, const lv_style_t * style) { switch(type) { case LV_ROLLER_STYLE_BG: lv_obj_set_style(roller, style); break; @@ -269,7 +269,7 @@ bool lv_roller_get_hor_fit(const lv_obj_t * roller) * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type) +const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type) { switch(type) { case LV_ROLLER_STYLE_BG: return lv_obj_get_style(roller); @@ -305,11 +305,11 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_MAIN) { draw_bg(roller, mask); - lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); - lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); - const lv_font_t * font = style->text.font; - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); + lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); + const lv_font_t * font = style->text.font; + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_coord_t font_h = lv_font_get_height(font); lv_area_t rect_area; rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; @@ -323,11 +323,11 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig } /*Post draw when the children are drawn*/ else if(mode == LV_DESIGN_DRAW_POST) { - lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); + const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + const lv_font_t * font = style->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); /*Redraw the text on the selected area with a different color*/ lv_area_t rect_area; @@ -342,7 +342,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig bool area_ok; area_ok = lv_area_intersect(&mask_sel, mask, &rect_area); if(area_ok) { - lv_style_t * sel_style = lv_roller_get_style(roller, LV_ROLLER_STYLE_SEL); + const lv_style_t * sel_style = lv_roller_get_style(roller, LV_ROLLER_STYLE_SEL); lv_style_t new_style; lv_txt_flag_t txt_align = LV_TXT_FLAG_NONE; @@ -503,9 +503,9 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, return LV_RES_INV; /*On delete the ddlist signal deletes the label so nothing left to do here*/ - lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); if(sign == LV_SIGNAL_DRAG_END) { /*If dragged then align the list to there be an element in the middle*/ @@ -550,7 +550,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, */ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) { - lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); + const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); lv_area_t half_mask; lv_area_t half_roller; lv_coord_t h = lv_obj_get_height(roller); @@ -588,14 +588,11 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) half_roller.y1 -= style->body.radius; if(union_ok) { - lv_color_t main_tmp = style->body.main_color; - lv_color_t grad_tmp = style->body.grad_color; - - style->body.main_color = grad_tmp; - style->body.grad_color = main_tmp; - lv_draw_rect(&half_roller, &half_mask, style, lv_obj_get_opa_scale(roller)); - style->body.main_color = main_tmp; - style->body.grad_color = grad_tmp; + lv_style_t style_tmp; + memcpy(&style_tmp, style, sizeof(lv_style_t)); + style_tmp.body.main_color = style->body.grad_color; + style_tmp.body.grad_color = style->body.main_color; + lv_draw_rect(&half_roller, &half_mask, &style_tmp, lv_obj_get_opa_scale(roller)); } } @@ -609,12 +606,12 @@ static void refr_position(lv_obj_t * roller, bool anim_en) #if LV_USE_ANIMATION == 0 anim_en = false; #endif - lv_obj_t * roller_scrl = lv_page_get_scrl(roller); - lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_coord_t h = lv_obj_get_height(roller); + lv_obj_t * roller_scrl = lv_page_get_scrl(roller); + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t h = lv_obj_get_height(roller); /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. * But without animations do it manually*/ @@ -668,10 +665,10 @@ static void inf_normalize(void * scrl) (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ /*Move to the new id*/ - lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); - const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); - lv_coord_t h = lv_obj_get_height(roller); + const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); + const lv_font_t * font = style_label->text.font; + lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t h = lv_obj_get_height(roller); lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index ee4a79f2b9c2..25f5c7b8dd9e 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -123,7 +123,7 @@ static inline void lv_roller_set_anim_time(lv_obj_t * roller, uint16_t anim_time * @param type which style should be set * @param style pointer to a style */ -void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, lv_style_t * style); +void lv_roller_set_style(lv_obj_t * roller, lv_roller_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -187,7 +187,7 @@ bool lv_roller_get_hor_fit(const lv_obj_t * roller); * @param type which style should be get * @return style pointer to a style * */ -lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type); +const lv_style_t * lv_roller_get_style(const lv_obj_t * roller, lv_roller_style_t type); /********************** * MACROS diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index 5f7dfaf2e0f9..a205a6fcef76 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -132,7 +132,7 @@ void lv_slider_set_knob_in(lv_obj_t * slider, bool in) * @param type which style should be set * @param style pointer to a style */ -void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, lv_style_t * style) +void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, const lv_style_t * style) { lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); @@ -194,9 +194,9 @@ bool lv_slider_get_knob_in(const lv_obj_t * slider) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type) +const lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); switch(type) { @@ -233,9 +233,9 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig else if(mode == LV_DESIGN_DRAW_MAIN) { lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); - lv_style_t * style_bg = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); - lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); - lv_style_t * style_indic = lv_slider_get_style(slider, LV_SLIDER_STYLE_INDIC); + const lv_style_t * style_bg = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); + const lv_style_t * style_knob = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); + const lv_style_t * style_indic = lv_slider_get_style(slider, LV_SLIDER_STYLE_INDIC); lv_opa_t opa_scale = lv_obj_get_opa_scale(slider); @@ -536,8 +536,8 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par slider->signal_cb(slider, LV_SIGNAL_REFR_EXT_SIZE, NULL); } } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { - lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); - lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); + const lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); + const lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); lv_coord_t shadow_w = knob_style->body.shadow.width; if(ext->knob_in == 0) { /* The smaller size is the knob diameter*/ diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 07770b36dff3..7a4a1e178cb4 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -41,7 +41,7 @@ typedef struct { lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t * style_knob; /*Style of the knob*/ + const lv_style_t * style_knob; /*Style of the knob*/ int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/ @@ -107,7 +107,7 @@ void lv_slider_set_knob_in(lv_obj_t * slider, bool in); * @param type which style should be set * @param style pointer to a style */ -void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, lv_style_t * style); +void lv_slider_set_style(lv_obj_t * slider, lv_slider_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -161,7 +161,7 @@ bool lv_slider_get_knob_in(const lv_obj_t * slider); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type); +const lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type); /********************** * MACROS diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index e8c1df7072b3..969832b4ebae 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -140,7 +140,7 @@ void lv_spinbox_set_padding_left(lv_obj_t * spinbox, uint8_t padding); * @param type which style should be get * @return style pointer to the style */ -static inline lv_style_t * lv_spinbox_get_style(lv_obj_t * spinbox, lv_spinbox_style_t type) +static inline const lv_style_t * lv_spinbox_get_style(lv_obj_t * spinbox, lv_spinbox_style_t type) { return lv_ta_get_style(spinbox, type); } diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 16ce3f82cd7c..3d44fabb1cfc 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -179,7 +179,7 @@ bool lv_sw_toggle(lv_obj_t * sw, bool anim) * @param type which style should be set * @param style pointer to a style */ -void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style) +void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style) { lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); @@ -215,9 +215,9 @@ void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) +const lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); switch(type) { diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index 8d4853e337fe..44801d3cb93f 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -42,8 +42,8 @@ typedef struct { lv_slider_ext_t slider; /*Ext. of ancestor*/ /*New data for this type */ - lv_style_t * style_knob_off; /*Style of the knob when the switch is OFF*/ - lv_style_t * + const lv_style_t * style_knob_off; /*Style of the knob when the switch is OFF*/ + const lv_style_t * style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/ lv_coord_t start_x; uint8_t changed : 1; /*Indicates the switch state explicitly changed by drag*/ @@ -105,7 +105,7 @@ bool lv_sw_toggle(lv_obj_t * sw, bool anim); * @param type which style should be set * @param style pointer to a style */ -void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, lv_style_t * style); +void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style); #if LV_USE_ANIMATION /** @@ -137,7 +137,7 @@ static inline bool lv_sw_get_state(const lv_obj_t * sw) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type); +const lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type); /** * Get the animation time of the switch diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index ae771b8b6a02..7349ebd664ce 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -389,7 +389,7 @@ void lv_ta_del_char(lv_obj_t * ta) /*Don't let 'width == 0' because cursor will not be visible*/ if(lv_obj_get_width(ext->label) == 0) { - lv_style_t * style = lv_obj_get_style(ext->label); + const lv_style_t * style = lv_obj_get_style(ext->label); lv_obj_set_width(ext->label, style->line.width); } @@ -454,7 +454,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Don't let 'width == 0' because the cursor will not be visible*/ if(lv_obj_get_width(ext->label) == 0) { - lv_style_t * style = lv_obj_get_style(ext->label); + const lv_style_t * style = lv_obj_get_style(ext->label); lv_obj_set_width(ext->label, lv_font_get_width(style->text.font, ' ')); } @@ -538,7 +538,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Position the label to make the cursor visible*/ lv_obj_t * label_par = lv_obj_get_parent(ext->label); lv_point_t cur_pos; - lv_style_t * style = lv_obj_get_style(ta); + const lv_style_t * style = lv_obj_get_style(ta); const lv_font_t * font_p = style->text.font; lv_area_t label_cords; lv_area_t ta_cords; @@ -660,10 +660,10 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) if(ext->one_line == en) return; if(en) { - lv_style_t * style_ta = lv_obj_get_style(ta); - lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta)); - lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + const lv_style_t * style_ta = lv_obj_get_style(ta); + const lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta)); + const lv_style_t * style_label = lv_obj_get_style(ext->label); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); ext->one_line = 1; lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); @@ -674,7 +674,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); } else { - lv_style_t * style_ta = lv_obj_get_style(ta); + const lv_style_t * style_ta = lv_obj_get_style(ta); ext->one_line = 0; lv_page_set_scrl_fit2(ta, LV_FIT_FLOOD, LV_FIT_TIGHT); @@ -768,7 +768,7 @@ void lv_ta_set_insert_replace(lv_obj_t * ta, const char * txt) * @param type which style should be set * @param style pointer to a style */ -void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style) +void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); @@ -923,9 +923,9 @@ uint16_t lv_ta_get_max_length(lv_obj_t * ta) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) +const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); switch(type) { @@ -1050,9 +1050,9 @@ void lv_ta_cursor_down(lv_obj_t * ta) lv_label_get_letter_pos(ext->label, lv_ta_get_cursor_pos(ta), &pos); /*Increment the y with one line and keep the valid x*/ - lv_style_t * label_style = lv_obj_get_style(ext->label); - const lv_font_t * font_p = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font_p); + const lv_style_t * label_style = lv_obj_get_style(ext->label); + const lv_font_t * font_p = label_style->text.font; + lv_coord_t font_h = lv_font_get_height(font_p); pos.y += font_h + label_style->text.line_space + 1; pos.x = ext->cursor.valid_x; @@ -1081,9 +1081,9 @@ void lv_ta_cursor_up(lv_obj_t * ta) lv_label_get_letter_pos(ext->label, lv_ta_get_cursor_pos(ta), &pos); /*Decrement the y with one line and keep the valid x*/ - lv_style_t * label_style = lv_obj_get_style(ext->label); - const lv_font_t * font = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + const lv_style_t * label_style = lv_obj_get_style(ext->label); + const lv_font_t * font = label_style->text.font; + lv_coord_t font_h = lv_font_get_height(font); pos.y -= font_h + label_style->text.line_space - 1; pos.x = ext->cursor.valid_x; @@ -1219,13 +1219,13 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /* (The created label will be deleted automatically) */ } else if(sign == LV_SIGNAL_STYLE_CHG) { if(ext->label) { - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_ta = lv_obj_get_style(ta); - lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_t * scrl = lv_page_get_scrl(ta); + const lv_style_t * style_ta = lv_obj_get_style(ta); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); if(ext->one_line) { /*In one line mode refresh the Text Area height because 'vpad' can modify it*/ - lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + const lv_style_t * style_label = lv_obj_get_style(ext->label); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); lv_obj_set_height( ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + style_scrl->body.padding.top + style_scrl->body.padding.bottom); @@ -1250,8 +1250,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) if(ext->label) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_t * scrl = lv_page_get_scrl(ta); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); @@ -1264,8 +1264,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) if(ext->placeholder) { if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_t * scrl = lv_page_get_scrl(ta); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); @@ -1354,8 +1354,8 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(sign == LV_SIGNAL_REFR_EXT_SIZE) { /*Set ext. size because the cursor might be out of this object*/ - lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + const lv_style_t * style_label = lv_obj_get_style(ext->label); + lv_coord_t font_h = lv_font_get_height(style_label->text.font); scrl->ext_size = LV_MATH_MAX(scrl->ext_size, style_label->text.line_space + font_h); } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ @@ -1363,7 +1363,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { - lv_style_t * style_scrl = lv_obj_get_style(scrl); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); @@ -1478,8 +1478,8 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c) static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_style_t * label_style = lv_obj_get_style(ext->label); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + const lv_style_t * label_style = lv_obj_get_style(ext->label); if(ext->cursor.style) { lv_style_copy(style_res, ext->cursor.style); @@ -1509,8 +1509,8 @@ static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) static void refr_cursor_area(lv_obj_t * ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_style_t * label_style = lv_obj_get_style(ext->label); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + const lv_style_t * label_style = lv_obj_get_style(ext->label); lv_style_t cur_style; get_cursor_style(ta, &cur_style); @@ -1616,8 +1616,8 @@ static void placeholder_update(lv_obj_t * ta) if(ta_text[0] == '\0') { /*Be sure the main label and the placeholder has the same coordinates*/ - lv_obj_t * scrl = lv_page_get_scrl(ta); - lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_obj_t * scrl = lv_page_get_scrl(ta); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 7a9befbf0ac0..eba2d683287e 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -68,9 +68,9 @@ typedef struct uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ struct { - lv_style_t * style; /*Style of the cursor (NULL to use label's style)*/ - lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter - line. (Handled by the library)*/ + const lv_style_t * style; /*Style of the cursor (NULL to use label's style)*/ + lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter + line. (Handled by the library)*/ uint16_t pos; /*The current cursor position (0: before 1. letter; 1: before 2. letter etc.)*/ lv_area_t area; /*Cursor area relative to the Text Area*/ @@ -255,7 +255,7 @@ static inline void lv_ta_set_edge_flash(lv_obj_t * ta, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, lv_style_t * style); +void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style); /** * Enable/disable selection mode. @@ -374,7 +374,7 @@ static inline bool lv_ta_get_edge_flash(lv_obj_t * ta) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type); +const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type); /** * Get the selection index of the text area. diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index 67fe97f8ab71..c830cc58c80d 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -365,7 +365,7 @@ void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, * @param type which style should be set * @param style pointer to a style */ -void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, lv_style_t * style) +void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, const lv_style_t * style) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); @@ -565,10 +565,10 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type) +const lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type) { lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_TABLE_STYLE_BG: style = lv_obj_get_style(table); break; @@ -606,9 +606,9 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ else if(mode == LV_DESIGN_DRAW_MAIN) { ancestor_scrl_design(table, mask, mode); - lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - lv_style_t * bg_style = lv_obj_get_style(table); - lv_style_t * cell_style; + lv_table_ext_t * ext = lv_obj_get_ext_attr(table); + const lv_style_t * bg_style = lv_obj_get_style(table); + const lv_style_t * cell_style; lv_coord_t h_row; lv_point_t txt_size; lv_area_t cell_area; @@ -785,7 +785,7 @@ static void refr_size(lv_obj_t * table) h += get_row_height(table, i); } - lv_style_t * bg_style = lv_obj_get_style(table); + const lv_style_t * bg_style = lv_obj_get_style(table); w += bg_style->body.padding.left + bg_style->body.padding.right; h += bg_style->body.padding.top + bg_style->body.padding.bottom; @@ -799,7 +799,7 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) lv_table_ext_t * ext = lv_obj_get_ext_attr(table); lv_point_t txt_size; lv_coord_t txt_w; - lv_style_t * cell_style; + const lv_style_t * cell_style; uint16_t row_start = row_id * ext->col_cnt; uint16_t cell; diff --git a/src/lv_objx/lv_table.h b/src/lv_objx/lv_table.h index 862a76d7af00..0ad63ebc1869 100644 --- a/src/lv_objx/lv_table.h +++ b/src/lv_objx/lv_table.h @@ -60,7 +60,7 @@ typedef struct uint16_t col_cnt; uint16_t row_cnt; char ** cell_data; - lv_style_t * cell_style[LV_TABLE_CELL_STYLE_CNT]; + const lv_style_t * cell_style[LV_TABLE_CELL_STYLE_CNT]; lv_coord_t col_w[LV_TABLE_COL_MAX]; } lv_table_ext_t; @@ -164,7 +164,7 @@ void lv_table_set_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col, * @param type which style should be set * @param style pointer to a style */ -void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, lv_style_t * style); +void lv_table_set_style(lv_obj_t * table, lv_table_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -244,7 +244,7 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type); +const lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d687a55b76b6..2fe913f8d035 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -248,7 +248,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); /*Modify the indicator size*/ - lv_style_t * style_tabs = lv_obj_get_style(ext->btns); + const lv_style_t * style_tabs = lv_obj_get_style(ext->btns); lv_coord_t indic_width = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - style_tabs->body.padding.left - style_tabs->body.padding.right) / @@ -286,7 +286,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) #endif lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - lv_style_t * style = lv_obj_get_style(ext->content); + const lv_style_t * style = lv_obj_get_style(ext->content); lv_res_t res = LV_RES_OK; if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; @@ -322,8 +322,8 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) } /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); - lv_style_t * tabs_style = lv_obj_get_style(ext->btns); + lv_coord_t indic_width = lv_obj_get_width(ext->indic); + const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); lv_coord_t indic_x = indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; @@ -382,7 +382,7 @@ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) * @param type which style should be set * @param style pointer to the new style */ -void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, lv_style_t * style) +void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_style_t * style) { lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); @@ -515,10 +515,10 @@ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview) * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type) +const lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type) { - lv_style_t * style = NULL; - lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); + const lv_style_t * style = NULL; + lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); switch(type) { case LV_TABVIEW_STYLE_BG: style = lv_obj_get_style(tabview); break; @@ -765,10 +765,10 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); - lv_style_t * tabs_style = lv_obj_get_style(ext->btns); - lv_style_t * indic_style = lv_obj_get_style(ext->indic); - lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * + lv_coord_t indic_width = lv_obj_get_width(ext->indic); + const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); + const lv_style_t * indic_style = lv_obj_get_style(ext->indic); + lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * (indic_width + tabs_style->body.padding.inner)) / lv_obj_get_width(tabview); @@ -856,8 +856,8 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_set_hidden(ext->btns, false); lv_obj_set_hidden(ext->indic, false); - lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG); - lv_style_t * style_btn_rel = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_REL); + const lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG); + const lv_style_t * style_btn_rel = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_REL); /*Set the indicator widths*/ lv_coord_t indic_width = diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index de70ba003398..aa350be606b3 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -142,7 +142,7 @@ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time); * @param type which style should be set * @param style pointer to the new style */ -void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, lv_style_t * style); +void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_style_t * style); /** * Set the position of tab select buttons @@ -203,7 +203,7 @@ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview); * @param type which style should be get * @return style pointer to a style */ -lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type); +const lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_style_t type); /** * Get position of tab select buttons diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index 6d8be1c756e4..db62d8541970 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -249,7 +249,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b * @param type which style should be set * @param style pointer to a style */ -void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_style_t * style) +void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, const lv_style_t * style) { switch(type) { @@ -271,9 +271,9 @@ void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_sty * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type) +const lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type) { - lv_style_t * style = NULL; + const lv_style_t * style = NULL; switch(type) { case LV_TILEVIEW_STYLE_BG: style = lv_obj_get_style(tileview); break; default: style = NULL; @@ -339,8 +339,8 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void res = ancestor_scrl_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * tileview = lv_obj_get_parent(scrl); - lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_BG); + lv_obj_t * tileview = lv_obj_get_parent(scrl); + const lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_BG); /*Apply constraint on moving of the tileview*/ if(sign == LV_SIGNAL_CORD_CHG) { diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index 247134b2d4f6..d53a4716d5c6 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -118,7 +118,7 @@ static inline void lv_tileview_set_edge_flash(lv_obj_t * tileview, bool en) * @param type which style should be set * @param style pointer to a style */ -void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, lv_style_t * style); +void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, const lv_style_t * style); /*===================== * Getter functions @@ -140,7 +140,7 @@ static inline bool lv_tileview_get_edge_flash(lv_obj_t * tileview) * @param type which style should be get * @return style pointer to the style */ -lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type); +const lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type); /*===================== * Other functions diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index dca8002e3e97..0ccac7135dce 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -261,7 +261,7 @@ void lv_win_set_sb_mode(lv_obj_t * win, lv_sb_mode_t sb_mode) * @param type which style should be set * @param style pointer to a style */ -void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, lv_style_t * style) +void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * style) { lv_win_ext_t * ext = lv_obj_get_ext_attr(win); @@ -391,9 +391,9 @@ lv_sb_mode_t lv_win_get_sb_mode(lv_obj_t * win) */ lv_coord_t lv_win_get_width(lv_obj_t * win) { - lv_win_ext_t * ext = lv_obj_get_ext_attr(win); - lv_obj_t * scrl = lv_page_get_scrl(ext->page); - lv_style_t * style_scrl = lv_obj_get_style(scrl); + lv_win_ext_t * ext = lv_obj_get_ext_attr(win); + lv_obj_t * scrl = lv_page_get_scrl(ext->page); + const lv_style_t * style_scrl = lv_obj_get_style(scrl); return lv_obj_get_width(scrl) - style_scrl->body.padding.left - style_scrl->body.padding.right; } @@ -404,10 +404,10 @@ lv_coord_t lv_win_get_width(lv_obj_t * win) * @param type which style window be get * @return style pointer to a style */ -lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type) +const lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type) { - lv_style_t * style = NULL; - lv_win_ext_t * ext = lv_obj_get_ext_attr(win); + const lv_style_t * style = NULL; + lv_win_ext_t * ext = lv_obj_get_ext_attr(win); switch(type) { case LV_WIN_STYLE_BG: style = lv_obj_get_style(win); break; @@ -513,7 +513,7 @@ static void lv_win_realign(lv_obj_t * win) if(ext->page == NULL || ext->header == NULL || ext->title == NULL) return; - lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER); + const lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER); lv_obj_set_size(ext->header, lv_obj_get_width(win), ext->btn_size + header_style->body.padding.top + header_style->body.padding.bottom); diff --git a/src/lv_objx/lv_win.h b/src/lv_objx/lv_win.h index ce7b7c9105f2..100348e7500c 100644 --- a/src/lv_objx/lv_win.h +++ b/src/lv_objx/lv_win.h @@ -58,13 +58,13 @@ typedef struct { /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * page; /*Pointer to a page which holds the content*/ - lv_obj_t * header; /*Pointer to the header container of the window*/ - lv_obj_t * title; /*Pointer to the title label of the window*/ - lv_style_t * style_header; /*Style of the header container*/ - lv_style_t * style_btn_rel; /*Control button releases style*/ - lv_style_t * style_btn_pr; /*Control button pressed style*/ - lv_coord_t btn_size; /*Size of the control buttons (square)*/ + lv_obj_t * page; /*Pointer to a page which holds the content*/ + lv_obj_t * header; /*Pointer to the header container of the window*/ + lv_obj_t * title; /*Pointer to the title label of the window*/ + const lv_style_t * style_header; /*Style of the header container*/ + const lv_style_t * style_btn_rel; /*Control button releases style*/ + const lv_style_t * style_btn_pr; /*Control button pressed style*/ + lv_coord_t btn_size; /*Size of the control buttons (square)*/ } lv_win_ext_t; enum { @@ -154,7 +154,7 @@ void lv_win_set_sb_mode(lv_obj_t * win, lv_sb_mode_t sb_mode); * @param type which style should be set * @param style pointer to a style */ -void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, lv_style_t * style); +void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * style); /** * Set drag status of a window. If set to 'true' window can be dragged like on a PC. @@ -223,7 +223,7 @@ lv_coord_t lv_win_get_width(lv_obj_t * win); * @param type which style window be get * @return style pointer to a style */ -lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type); +const lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type); /** * Get drag status of a window. If set to 'true' window can be dragged like on a PC. From a4d4d593462ce59b6e649cd9ddd77aad9695f450 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 11 Apr 2019 15:41:17 +0200 Subject: [PATCH 283/590] lv_page: use lv_style_copy instead of memcpy --- src/lv_objx/lv_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index be27ae4ce30c..cdcf86694c36 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -624,7 +624,7 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo /*Cache page bg style for temporary modification*/ const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); lv_style_t style_tmp; - memcpy(&style_tmp, style, sizeof(lv_style_t)); + lv_style_copy(&style_tmp, style); if(mode == LV_DESIGN_DRAW_MAIN) { /*Draw without border*/ From 3764d7a6ba444531f220884e16f294f3f6d68b45 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Thu, 11 Apr 2019 09:26:11 -0700 Subject: [PATCH 284/590] lv_preload.c Add feature to allow setting whether the animation is played in forward/reverse. Changes the default spinner behavior from counterclockwise to clockwise. --- src/lv_objx/lv_preload.c | 48 +++++++++++++++++++++++++++++++++++----- src/lv_objx/lv_preload.h | 27 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index bed1d310e5db..24dca27877ee 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -80,6 +80,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH; ext->anim_type = LV_PRELOAD_DEF_ANIM; + ext->anim_direction = LV_PRELOAD_DIRECTION_FORWARD; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_preload, lv_preload_signal); @@ -105,6 +106,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) lv_preload_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->arc_length = copy_ext->arc_length; ext->time = copy_ext->time; + ext->anim_direction = copy_ext->anim_direction; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_preload); } @@ -178,8 +180,15 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; lv_anim_t a; a.var = preload; - a.start = 0; - a.end = 360; + if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + /* Clockwise */ + a.start = 360; + a.end = 0; + } + else { + a.start = 0; + a.end = 360; + } a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; a.path = lv_anim_path_ease_in_out; a.end_cb = NULL; @@ -193,8 +202,15 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) lv_anim_t b; b.var = preload; - b.start = ext->arc_length; - b.end = 360 - ext->arc_length; + if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + /* Clockwise */ + b.start = 360 - ext->arc_length; + b.end = ext->arc_length; + } + else { + b.start = ext->arc_length; + b.end = 360 - ext->arc_length; + } b.fp = (lv_anim_fp_t)lv_preload_set_arc_length; b.path = lv_anim_path_ease_in_out; b.end_cb = NULL; @@ -212,8 +228,15 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) ext->anim_type = LV_PRELOAD_TYPE_SPINNING_ARC; lv_anim_t a; a.var = preload; - a.start = 0; - a.end = 360; + if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + /* Clockwise */ + a.start = 360; + a.end = 0; + } + else { + a.start = 0; + a.end = 360; + } a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; a.path = lv_anim_path_ease_in_out; a.end_cb = NULL; @@ -231,6 +254,13 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) #endif // LV_USE_ANIMATION } +void lv_preload_set_animation_direction(lv_obj_t * preload, lv_preload_direction_t direction) { + lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); + + ext->anim_direction = direction; + lv_preload_set_animation_type(preload, ext->anim_type); +} + /*===================== * Getter functions *====================*/ @@ -284,6 +314,11 @@ lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload) return ext->anim_type; } +lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload) { + lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); + return ext->anim_direction; +} + /*===================== * Other functions *====================*/ @@ -297,6 +332,7 @@ void lv_preload_spinner_animation(void * ptr, int32_t val) { lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); + int16_t angle_start = val - ext->arc_length / 2 + 180; int16_t angle_end = angle_start + ext->arc_length; diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 9715e3a3c76c..d6fc4d3ea3dc 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -47,6 +47,12 @@ enum { }; typedef uint8_t lv_preload_type_t; +enum { + LV_PRELOAD_DIRECTION_FORWARD, + LV_PRELOAD_DIRECTION_BACKWARD, +}; +typedef uint8_t lv_preload_direction_t; + /*Data of pre loader*/ typedef struct { @@ -54,7 +60,8 @@ typedef struct /*New data for this type */ uint16_t arc_length; /*Length of the spinning indicator in degree*/ uint16_t time; /*Time of one round*/ - lv_preload_type_t anim_type; /*Type of the arc animation*/ + lv_preload_type_t anim_type:1; /*Type of the arc animation*/ + lv_preload_direction_t anim_direction:1; /*Animation Direction*/ } lv_preload_ext_t; /*Styles*/ @@ -107,12 +114,19 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time); void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_style_t * style); /** - * Set the animation type of a preloadeer. + * Set the animation type of a preloader. * @param preload pointer to pre loader object * @param type animation type of the preload * */ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type); +/** + * Set the animation direction of a preloader + * @param preload pointer to pre loader object + * @param direction animation direction of the preload + */ +void lv_preload_set_animation_direction(lv_obj_t * preload, lv_preload_direction_t direction); + /*===================== * Getter functions *====================*/ @@ -138,12 +152,19 @@ uint16_t lv_preload_get_spin_time(const lv_obj_t * preload); const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_style_t type); /** - * Get the animation type of a preloadeer. + * Get the animation type of a preloader. * @param preload pointer to pre loader object * @return animation type * */ lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload); +/** + * Get the animation direction of a preloader + * @param preload pointer to pre loader object + * @return animation direction + */ +lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload); + /*===================== * Other functions *====================*/ From 6284e3a21bc8bc9f6938594633c61351a8860c3a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 12 Apr 2019 07:22:37 +0200 Subject: [PATCH 285/590] lv_list: check the return value of btn events --- src/lv_core/lv_obj.c | 12 +++++++----- src/lv_misc/lv_mem.c | 4 ++-- src/lv_objx/lv_list.c | 22 +++++++++++++--------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 1ff8c74ad1e2..d3fd4de6d7fd 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -345,9 +345,10 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Delete from the group*/ #if LV_USE_GROUP bool was_focused = false; + lv_group_t * group = lv_obj_get_group(obj); - if(obj->group_p) { - if(lv_group_get_focused(obj->group_p) == obj) was_focused = true; + if(group) { + if(lv_group_get_focused(group) == obj) was_focused = true; lv_group_remove_obj(obj); } #endif @@ -390,7 +391,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } #if LV_USE_GROUP - if(was_focused) { + if(indev->group == group && was_focused) { lv_indev_reset(indev); } #endif @@ -2067,8 +2068,9 @@ static void delete_children(lv_obj_t * obj) * LV_SIGNAL_DEFOCUS call*/ #if LV_USE_GROUP bool was_focused = false; + lv_group_t * group = lv_obj_get_group(obj); - if(obj->group_p) { + if(group) { if(lv_group_get_focused(obj->group_p) == obj) was_focused = true; lv_group_remove_obj(obj); } @@ -2098,7 +2100,7 @@ static void delete_children(lv_obj_t * obj) lv_indev_reset(indev); } #if LV_USE_GROUP - if(was_focused) { + if(indev->group == group && was_focused) { lv_indev_reset(indev); } #endif diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index dd2ed2402ede..dca4a1ab63a3 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -18,8 +18,8 @@ /********************* * DEFINES *********************/ -#define LV_MEM_ADD_JUNK \ - 0 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ +/*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ +#define LV_MEM_ADD_JUNK 0 #ifdef LV_MEM_ENV64 #define MEM_UNIT uint64_t diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 883fd7c14640..3f4de2b6918e 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -745,20 +745,24 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) * button*/ if(btn) { if(sign == LV_SIGNAL_PRESSED) { - lv_event_send(btn, LV_EVENT_PRESSED, NULL); + res = lv_event_send(btn, LV_EVENT_PRESSED, NULL); } else if(sign == LV_SIGNAL_PRESSING) { - lv_event_send(btn, LV_EVENT_PRESSING, NULL); + res = lv_event_send(btn, LV_EVENT_PRESSING, NULL); } else if(sign == LV_SIGNAL_LONG_PRESS) { - lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); + res = lv_event_send(btn, LV_EVENT_LONG_PRESSED, NULL); } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { - lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + res = lv_event_send(btn, LV_EVENT_LONG_PRESSED_REPEAT, NULL); } else if(sign == LV_SIGNAL_RELEASED) { ext->last_sel = btn; - if(indev->proc.long_pr_sent == 0) - lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); - if(lv_indev_is_dragging(indev) == false) - lv_event_send(btn, LV_EVENT_CLICKED, NULL); - lv_event_send(btn, LV_EVENT_RELEASED, NULL); + if(indev->proc.long_pr_sent == 0) { + res = lv_event_send(btn, LV_EVENT_SHORT_CLICKED, NULL); + } + if(lv_indev_is_dragging(indev) == false && res == LV_RES_OK) { + res = lv_event_send(btn, LV_EVENT_CLICKED, NULL); + } + if(res == LV_RES_OK) { + res = lv_event_send(btn, LV_EVENT_RELEASED, NULL); + } } } } From 1cbbd1c59b9c8e3370740b991ab57185e8b13783 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 12 Apr 2019 07:27:53 +0200 Subject: [PATCH 286/590] change memcpy to lv_style_copy --- src/lv_core/lv_style.c | 24 ++++++++++++------------ src/lv_objx/lv_lmeter.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 6f5190f8f6f9..27200133991b 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -116,14 +116,14 @@ void lv_style_init(void) lv_style_scr.line.rounded = 0; /*Plain style (by default near the same as the screen style)*/ - memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t)); + lv_style_copy(&lv_style_plain, &lv_style_scr); lv_style_plain.body.padding.left = LV_DPI / 12; lv_style_plain.body.padding.right = LV_DPI / 12; lv_style_plain.body.padding.top = LV_DPI / 12; lv_style_plain.body.padding.bottom = LV_DPI / 12; /*Plain color style*/ - memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t)); + lv_style_copy(&lv_style_plain_color, &lv_style_plain); lv_style_plain_color.text.color = lv_color_make(0xf0, 0xf0, 0xf0); lv_style_plain_color.image.color = lv_color_make(0xf0, 0xf0, 0xf0); lv_style_plain_color.line.color = lv_color_make(0xf0, 0xf0, 0xf0); @@ -131,7 +131,7 @@ void lv_style_init(void) lv_style_plain_color.body.grad_color = lv_style_plain_color.body.main_color; /*Pretty style */ - memcpy(&lv_style_pretty, &lv_style_plain, sizeof(lv_style_t)); + lv_style_copy(&lv_style_pretty, &lv_style_plain); lv_style_pretty.text.color = lv_color_make(0x20, 0x20, 0x20); lv_style_pretty.image.color = lv_color_make(0x20, 0x20, 0x20); lv_style_pretty.line.color = lv_color_make(0x20, 0x20, 0x20); @@ -143,7 +143,7 @@ void lv_style_init(void) lv_style_pretty.body.border.opa = LV_OPA_30; /*Pretty color style*/ - memcpy(&lv_style_pretty_color, &lv_style_pretty, sizeof(lv_style_t)); + lv_style_copy(&lv_style_pretty_color, &lv_style_pretty); lv_style_pretty_color.text.color = lv_color_make(0xe0, 0xe0, 0xe0); lv_style_pretty_color.image.color = lv_color_make(0xe0, 0xe0, 0xe0); lv_style_pretty_color.line.color = lv_color_make(0xc0, 0xc0, 0xc0); @@ -152,24 +152,24 @@ void lv_style_init(void) lv_style_pretty_color.body.border.color = lv_color_make(0x15, 0x2c, 0x42); /*Transparent style*/ - memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t)); + lv_style_copy(&lv_style_transp, &lv_style_plain); lv_style_transp.glass = 1; lv_style_transp.body.border.width = 0; lv_style_transp.body.opa = LV_OPA_TRANSP; /*Transparent fitting size*/ - memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t)); + lv_style_copy(&lv_style_transp_fit, &lv_style_transp); lv_style_transp_fit.body.padding.left = 0; lv_style_transp_fit.body.padding.right = 0; lv_style_transp_fit.body.padding.top = 0; lv_style_transp_fit.body.padding.bottom = 0; /*Transparent tight style*/ - memcpy(&lv_style_transp_tight, &lv_style_transp_fit, sizeof(lv_style_t)); + lv_style_copy(&lv_style_transp_tight, &lv_style_transp_fit); lv_style_transp_tight.body.padding.inner = 0; /*Button released style*/ - memcpy(&lv_style_btn_rel, &lv_style_plain, sizeof(lv_style_t)); + lv_style_copy(&lv_style_btn_rel, &lv_style_plain); lv_style_btn_rel.body.main_color = lv_color_make(0x76, 0xa2, 0xd0); lv_style_btn_rel.body.grad_color = lv_color_make(0x19, 0x3a, 0x5d); lv_style_btn_rel.body.radius = LV_DPI / 15; @@ -187,7 +187,7 @@ void lv_style_init(void) lv_style_btn_rel.image.color = lv_color_make(0xff, 0xff, 0xff); /*Button pressed style*/ - memcpy(&lv_style_btn_pr, &lv_style_btn_rel, sizeof(lv_style_t)); + lv_style_copy(&lv_style_btn_pr, &lv_style_btn_rel); lv_style_btn_pr.body.main_color = lv_color_make(0x33, 0x62, 0x94); lv_style_btn_pr.body.grad_color = lv_color_make(0x10, 0x26, 0x3c); lv_style_btn_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); @@ -195,7 +195,7 @@ void lv_style_init(void) lv_style_btn_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button toggle released style*/ - memcpy(&lv_style_btn_tgl_rel, &lv_style_btn_rel, sizeof(lv_style_t)); + lv_style_copy(&lv_style_btn_tgl_rel, &lv_style_btn_rel); lv_style_btn_tgl_rel.body.main_color = lv_color_make(0x0a, 0x11, 0x22); lv_style_btn_tgl_rel.body.grad_color = lv_color_make(0x37, 0x62, 0x90); lv_style_btn_tgl_rel.body.border.color = lv_color_make(0x01, 0x07, 0x0d); @@ -204,7 +204,7 @@ void lv_style_init(void) lv_style_btn_tgl_rel.line.color = lv_color_make(0xc8, 0xdd, 0xf4); /*Button toggle pressed style*/ - memcpy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel, sizeof(lv_style_t)); + lv_style_copy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel); lv_style_btn_tgl_pr.body.main_color = lv_color_make(0x02, 0x14, 0x27); lv_style_btn_tgl_pr.body.grad_color = lv_color_make(0x2b, 0x4c, 0x70); lv_style_btn_tgl_pr.text.color = lv_color_make(0xa4, 0xb5, 0xc6); @@ -212,7 +212,7 @@ void lv_style_init(void) lv_style_btn_tgl_pr.line.color = lv_color_make(0xa4, 0xb5, 0xc6); /*Button inactive style*/ - memcpy(&lv_style_btn_ina, &lv_style_btn_rel, sizeof(lv_style_t)); + lv_style_copy(&lv_style_btn_ina, &lv_style_btn_rel); lv_style_btn_ina.body.main_color = lv_color_make(0xd8, 0xd8, 0xd8); lv_style_btn_ina.body.grad_color = lv_color_make(0xd8, 0xd8, 0xd8); lv_style_btn_ina.body.border.color = lv_color_make(0x90, 0x90, 0x90); diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index d3cf29c348fd..f956412dd3ab 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -253,7 +253,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig const lv_style_t * style = lv_obj_get_style(lmeter); lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); lv_style_t style_tmp; - memcpy(&style_tmp, style, sizeof(lv_style_t)); + lv_style_copy(&style_tmp, style); #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(lmeter); From 610499c278e78503cde2a210b7c7aac12a78d0d7 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Fri, 12 Apr 2019 07:48:00 -0700 Subject: [PATCH 287/590] lv_preload uncomment lv_anim_del in animation create --- src/lv_objx/lv_preload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 24dca27877ee..31664299e928 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -174,7 +174,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); /*delete previous animation*/ - // lv_anim_del(preload, NULL); + lv_anim_del(preload, NULL); switch(type) { case LV_PRELOAD_TYPE_FILLSPIN_ARC: { ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; From bbb93d315ea7b14bdc5226ca55302b2b80024288 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Fri, 12 Apr 2019 07:57:16 -0700 Subject: [PATCH 288/590] lv_preload: abbreviate "animation" and "direction" to "anim" and "dir" --- src/lv_objx/lv_preload.c | 34 +++++++++++++++++----------------- src/lv_objx/lv_preload.h | 18 +++++++++--------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 31664299e928..7bff32e65160 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -80,7 +80,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH; ext->anim_type = LV_PRELOAD_DEF_ANIM; - ext->anim_direction = LV_PRELOAD_DIRECTION_FORWARD; + ext->anim_dir = LV_PRELOAD_DIR_FORWARD; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_preload, lv_preload_signal); @@ -106,12 +106,12 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) lv_preload_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->arc_length = copy_ext->arc_length; ext->time = copy_ext->time; - ext->anim_direction = copy_ext->anim_direction; + ext->anim_dir = copy_ext->anim_dir; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_preload); } - lv_preload_set_animation_type(new_preload, ext->anim_type); + lv_preload_set_anim_type(new_preload, ext->anim_type); LV_LOG_INFO("preload created"); @@ -144,7 +144,7 @@ void lv_preload_set_spin_time(lv_obj_t * preload, uint16_t time) lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); ext->time = time; - lv_preload_set_animation_type(preload, ext->anim_type); + lv_preload_set_anim_type(preload, ext->anim_type); } /*===================== * Setter functions @@ -168,7 +168,7 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_ * @param preload pointer to pre loader object * @param type animation type of the preload * */ -void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) +void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) { #if LV_USE_ANIMATION lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); @@ -180,7 +180,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; lv_anim_t a; a.var = preload; - if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { /* Clockwise */ a.start = 360; a.end = 0; @@ -189,7 +189,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; + a.fp = (lv_anim_fp_t)lv_preload_spinner_anim; a.path = lv_anim_path_ease_in_out; a.end_cb = NULL; a.act_time = 0; @@ -202,7 +202,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) lv_anim_t b; b.var = preload; - if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { /* Clockwise */ b.start = 360 - ext->arc_length; b.end = ext->arc_length; @@ -228,7 +228,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) ext->anim_type = LV_PRELOAD_TYPE_SPINNING_ARC; lv_anim_t a; a.var = preload; - if( ext->anim_direction == LV_PRELOAD_DIRECTION_FORWARD ) { + if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { /* Clockwise */ a.start = 360; a.end = 0; @@ -237,7 +237,7 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.fp = (lv_anim_fp_t)lv_preload_spinner_animation; + a.fp = (lv_anim_fp_t)lv_preload_spinner_anim; a.path = lv_anim_path_ease_in_out; a.end_cb = NULL; a.act_time = 0; @@ -254,11 +254,11 @@ void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type) #endif // LV_USE_ANIMATION } -void lv_preload_set_animation_direction(lv_obj_t * preload, lv_preload_direction_t direction) { +void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); - ext->anim_direction = direction; - lv_preload_set_animation_type(preload, ext->anim_type); + ext->anim_dir = dir; + lv_preload_set_anim_type(preload, ext->anim_type); } /*===================== @@ -308,15 +308,15 @@ const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_sty * @param preload pointer to pre loader object * @return animation type * */ -lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload) +lv_preload_type_t lv_preload_get_anim_type(lv_obj_t * preload) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); return ext->anim_type; } -lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload) { +lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); - return ext->anim_direction; + return ext->anim_dir; } /*===================== @@ -328,7 +328,7 @@ lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload) { * @param ptr pointer to preloader * @param val the current desired value [0..360] */ -void lv_preload_spinner_animation(void * ptr, int32_t val) +void lv_preload_spinner_anim(void * ptr, int32_t val) { lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index d6fc4d3ea3dc..3590f3d1cfef 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -48,10 +48,10 @@ enum { typedef uint8_t lv_preload_type_t; enum { - LV_PRELOAD_DIRECTION_FORWARD, - LV_PRELOAD_DIRECTION_BACKWARD, + LV_PRELOAD_DIR_FORWARD, + LV_PRELOAD_DIR_BACKWARD, }; -typedef uint8_t lv_preload_direction_t; +typedef uint8_t lv_preload_dir_t; /*Data of pre loader*/ typedef struct @@ -61,7 +61,7 @@ typedef struct uint16_t arc_length; /*Length of the spinning indicator in degree*/ uint16_t time; /*Time of one round*/ lv_preload_type_t anim_type:1; /*Type of the arc animation*/ - lv_preload_direction_t anim_direction:1; /*Animation Direction*/ + lv_preload_dir_t anim_dir:1; /*Animation Direction*/ } lv_preload_ext_t; /*Styles*/ @@ -118,14 +118,14 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_ * @param preload pointer to pre loader object * @param type animation type of the preload * */ -void lv_preload_set_animation_type(lv_obj_t * preload, lv_preload_type_t type); +void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type); /** * Set the animation direction of a preloader * @param preload pointer to pre loader object * @param direction animation direction of the preload */ -void lv_preload_set_animation_direction(lv_obj_t * preload, lv_preload_direction_t direction); +void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir); /*===================== * Getter functions @@ -156,14 +156,14 @@ const lv_style_t * lv_preload_get_style(const lv_obj_t * preload, lv_preload_sty * @param preload pointer to pre loader object * @return animation type * */ -lv_preload_type_t lv_preload_get_animation_type(lv_obj_t * preload); +lv_preload_type_t lv_preload_get_anim_type(lv_obj_t * preload); /** * Get the animation direction of a preloader * @param preload pointer to pre loader object * @return animation direction */ -lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload); +lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload); /*===================== * Other functions @@ -175,7 +175,7 @@ lv_preload_direction_t lv_preload_get_animation_direction(lv_obj_t * preload); * @param type which style should be get * @return style pointer to the style * */ -void lv_preload_spinner_animation(void * ptr, int32_t val); +void lv_preload_spinner_anim(void * ptr, int32_t val); /********************** * MACROS From 29daec0cafceffa82807ac840981fdb3e59945b3 Mon Sep 17 00:00:00 2001 From: canardos Date: Sat, 13 Apr 2019 14:56:47 +0800 Subject: [PATCH 289/590] Remove legacy control codes --- src/lv_objx/lv_kb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index feba953467fa..bb0279ab9627 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -64,9 +64,9 @@ static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, 2}; -static const char * kb_map_num[] = {"1", "2", "3", "\202" LV_SYMBOL_CLOSE, "\n", - "4", "5", "6", "\202" LV_SYMBOL_OK, "\n", - "7", "8", "9", "\202Bksp", "\n", +static const char * kb_map_num[] = {"1", "2", "3", LV_SYMBOL_CLOSE, "\n", + "4", "5", "6", LV_SYMBOL_OK, "\n", + "7", "8", "9", "Bksp", "\n", "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, ""}; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1}; From 991f892a98caae5c8fd5e4c671eda4b5f9ea3d12 Mon Sep 17 00:00:00 2001 From: canardos Date: Sun, 14 Apr 2019 13:24:12 +0800 Subject: [PATCH 290/590] add lv_obj_set_user_data function --- src/lv_core/lv_obj.c | 10 ++++++++++ src/lv_core/lv_obj.h | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 09ddb1ce523e..3d75269238f2 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1875,6 +1875,16 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) { return &obj->user_data; } + +/** + * Set the objet's user data + * @param obj pointer to an object + * @param data user data + */ +void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data) +{ + obj->user_data = data; +} #endif #if LV_USE_GROUP diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 1fa0bf1dfc39..73fd2332de84 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -857,6 +857,14 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); * @return pointer to the user data */ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); + +/** + * Set the objet's user data + * @param obj pointer to an object + * @param data user data + */ +void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data); + #endif #if LV_USE_GROUP From f40ee380c898ef6ed70862ea5d770b44a711e5b2 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 14 Apr 2019 09:47:45 -0700 Subject: [PATCH 291/590] Optimized bitfields in lv_btn and lv_label. In lv_label, changed selection fields from int to uint16. Because of this change, added getters/setters. Added LV_LABEL_SELECTION_EN option in lv_conf to enable/disable the selection fields --- lv_conf_template.h | 1 + src/lv_objx/lv_btn.h | 2 +- src/lv_objx/lv_label.c | 67 ++++++++++++++++++++++++++++++++++++++---- src/lv_objx/lv_label.h | 45 ++++++++++++++++++++++++---- src/lv_objx/lv_ta.c | 47 +++++++++++++++-------------- 5 files changed, 126 insertions(+), 36 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index d6e450290a68..dc71340a26c9 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -346,6 +346,7 @@ typedef void * lv_obj_user_data_t; #if LV_USE_LABEL != 0 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ # define LV_LABEL_DEF_SCROLL_SPEED 25 +# define LV_LABEL_SELECTION_EN 1 #endif /*LED (dependencies: -)*/ diff --git a/src/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h index 2e0d12101f9a..cd23e24e359b 100644 --- a/src/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -55,12 +55,12 @@ typedef struct lv_cont_ext_t cont; /*Ext. of ancestor*/ /*New data for this type */ const lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/ - lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/ #if LV_BTN_INK_EFFECT uint16_t ink_in_time; /*[ms] Time of ink fill effect (0: disable ink effect)*/ uint16_t ink_wait_time; /*[ms] Wait before the ink disappears */ uint16_t ink_out_time; /*[ms] Time of ink disappearing*/ #endif + lv_btn_state_t state : 3; /*Current state of the button from 'lv_btn_state_t' enum*/ uint8_t toggle : 1; /*1: Toggle enabled*/ } lv_btn_ext_t; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index e3c50d16455a..f9baded8f202 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -90,8 +90,11 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; - ext->selection_start = -1; - ext->selection_end = -1; +#if LV_LABEL_SELECTION_EN + ext->selection_start = 0; + ext->selection_end = 0; + ext->selection_en = 0; +#endif lv_obj_set_design_cb(new_label, lv_label_design); lv_obj_set_signal_cb(new_label, lv_label_signal); @@ -339,6 +342,34 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) } } +void lv_label_set_selection_start( const lv_obj_t * label, int index ) { +#if LV_LABEL_SELECTION_EN + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( index > 0 ) { + ext->selection_en = 1; + ext->selection_start = index; + } + else { + ext->selection_en = 0; + ext->selection_start = 0; + } +#endif +} + +void lv_label_set_selection_end( const lv_obj_t * label, int index ) { +#if LV_LABEL_SELECTION_EN + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( index > 0 ) { + ext->selection_en = 1; + ext->selection_end = index; + } + else { + ext->selection_en = 0; + ext->selection_end = 0; + } +#endif +} + /*===================== * Getter functions *====================*/ @@ -558,6 +589,31 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) return lv_encoded_get_char_id(txt, i); } +int lv_label_get_selection_start( const lv_obj_t * label ) { +#if LV_LABEL_SELECTION_EN + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( ext->selection_en ) + return ext->selection_start; + else + return -1; +#else + return -1; +#endif +} + +int lv_label_get_selection_end( const lv_obj_t * label ) { +#if LV_LABEL_SELECTION_EN + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( ext->selection_en ) + return ext->selection_end; + else + return -1; +#else + return -1; +#endif +} + + /** * Check if a character is drawn under a point. * @param label Label object @@ -763,7 +819,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, - ext->selection_start, ext->selection_end); + lv_label_get_selection_start(label), lv_label_get_selection_end(label)); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; @@ -776,8 +832,9 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.x = ext->offset.x + size.x + lv_font_get_width(style->text.font, ' ') * ANIM_WAIT_CHAR_COUNT; ofs.y = ext->offset.y; + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - ext->selection_start, ext->selection_end); + lv_label_get_selection_start(label), lv_label_get_selection_end(label)); } /*Draw the text again below the original to make an circular effect */ @@ -785,7 +842,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.x = ext->offset.x; ofs.y = ext->offset.y + size.y + lv_font_get_height(style->text.font); lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - ext->selection_start, ext->selection_end); + lv_label_get_selection_start(label), lv_label_get_selection_end(label)); } } } diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 05f4e1ace918..87e6583733b6 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -62,20 +62,23 @@ typedef struct /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ char * text; /*Text of the label*/ - lv_label_long_mode_t long_mode; /*Determinate what to do with the long texts*/ - char dot_tmp[LV_LABEL_DOT_NUM * 4 + - 1]; /*Store the character which are replaced by dots (Handled by the library)*/ - + char dot_tmp[LV_LABEL_DOT_NUM * 4 ]; /*Store the character which are replaced by dots (Handled by the library)*/ uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ + +#if LV_LABEL_SELECTION_EN + uint16_t selection_start; /*Left-most selection character*/ + uint16_t selection_end; /*Right-most selection character*/ + uint8_t selection_en : 1; /*True if text is selection */ +#endif + + lv_label_long_mode_t long_mode : 3; /*Determinate what to do with the long texts*/ uint8_t static_txt : 1; /*Flag to indicate the text is static*/ uint8_t align : 2; /*Align type from 'lv_label_align_t'*/ uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ uint8_t body_draw : 1; /*Draw background body*/ - int selection_start; /*Left-most selection character*/ - int selection_end; /*Right-most selection character*/ } lv_label_ext_t; /********************** @@ -164,6 +167,21 @@ static inline void lv_label_set_style(lv_obj_t * label, const lv_style_t * style { lv_obj_set_style(label, style); } + +/** + * @brief Set the selection start index. + * @param label pointer to a label object. + * @param index index to set. -1 to select nothing. + */ +void lv_label_set_selection_start( const lv_obj_t * label, int index ); + +/** + * @brief Set the selection end index. + * @param label pointer to a label object. + * @param index index to set. -1 to select nothing. + */ +void lv_label_set_selection_end( const lv_obj_t * label, int index ); + /*===================== * Getter functions *====================*/ @@ -246,6 +264,21 @@ static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) return lv_obj_get_style(label); } +/** + * @brief Get the selection start index. + * @param label pointer to a label object. + * @return selection start index. -1 if nothing is selected. + */ +int lv_label_get_selection_start( const lv_obj_t * label ); + +/** + * @brief Get the selection end index. + * @param label pointer to a label object. + * @return selection end index. -1 if nothing is selected. + */ +int lv_label_get_selection_end( const lv_obj_t * label ); + + /*===================== * Other functions *====================*/ diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 7349ebd664ce..e37f6ad9f60e 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -955,17 +955,15 @@ const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + + *sel_start = lv_label_get_selection_start(ext->label) ; + *sel_end = lv_label_get_selection_end(ext->label) ; /*Force both values to -1 if there is no selection*/ - if(ext_label->selection_start == -1 || ext_label->selection_end == -1) { + if( *sel_start == -1 || *sel_end == -1) { *sel_start = -1; *sel_end = -1; - return; } - - *sel_start = ext_label->selection_start; - *sel_end = ext_label->selection_end; } /** @@ -976,9 +974,7 @@ void lv_ta_get_selection(lv_obj_t * ta, int * sel_start, int * sel_end) bool lv_ta_text_is_selected(const lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - - return (ext_label->selection_start == -1 || ext_label->selection_end == -1); + return (lv_label_get_selection_start(ext->label) == -1 || lv_label_get_selection_end(ext->label) == -1); } /** @@ -1004,11 +1000,10 @@ bool lv_ta_get_sel_mode(lv_obj_t * ta) void lv_ta_clear_selection(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); - if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { - ext_label->selection_start = -1; - ext_label->selection_end = -1; + if(lv_label_get_selection_start(ext->label) == -1 || lv_label_get_selection_end(ext->label) == -1){ + lv_label_set_selection_start(ext->label, -1); + lv_label_set_selection_end(ext->label, -1); lv_obj_invalidate(ta); } } @@ -1695,24 +1690,28 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, if(ext->selecting) { /*If the selected area has changed then update the real values and*/ /*invalidate the text area.*/ + int sel_start, sel_end; + sel_start = lv_label_get_selection_start(ext->label); + sel_end = lv_label_get_selection_end(ext->label); + if(ext->tmp_sel_start > ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_end || - ext_label->selection_end != ext->tmp_sel_start) { - ext_label->selection_start = ext->tmp_sel_end; - ext_label->selection_end = ext->tmp_sel_start; + if(sel_start != ext->tmp_sel_end || + sel_end != ext->tmp_sel_start) { + sel_start = ext->tmp_sel_end; + sel_end = ext->tmp_sel_start; lv_obj_invalidate(ta); } } else if(ext->tmp_sel_start < ext->tmp_sel_end) { - if(ext_label->selection_start != ext->tmp_sel_start || - ext_label->selection_end != ext->tmp_sel_end) { - ext_label->selection_start = ext->tmp_sel_start; - ext_label->selection_end = ext->tmp_sel_end; + if(sel_start != ext->tmp_sel_start || + sel_end != ext->tmp_sel_end) { + sel_start = ext->tmp_sel_start; + sel_end = ext->tmp_sel_end; lv_obj_invalidate(ta); } } else { - if(ext_label->selection_start != -1 || ext_label->selection_end != -1) { - ext_label->selection_start = -1; - ext_label->selection_end = -1; + if(sel_start != -1 || sel_end != -1) { + sel_start = -1; + sel_end = -1; lv_obj_invalidate(ta); } } From 50edf4e1f8ab651dfc9c16d1b216d4b767836b13 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 14 Apr 2019 09:50:02 -0700 Subject: [PATCH 292/590] Fixed lv_label selection start/end setters to allow the 0th index. --- src/lv_objx/lv_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index f9baded8f202..630b6c7c1f39 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -345,7 +345,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) void lv_label_set_selection_start( const lv_obj_t * label, int index ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( index > 0 ) { + if( index >= 0 ) { ext->selection_en = 1; ext->selection_start = index; } @@ -359,7 +359,7 @@ void lv_label_set_selection_start( const lv_obj_t * label, int index ) { void lv_label_set_selection_end( const lv_obj_t * label, int index ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( index > 0 ) { + if( index >= 0 ) { ext->selection_en = 1; ext->selection_end = index; } From 3d7713717831ff7f8c30ca24bd64b2a3203dbf0a Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 14 Apr 2019 11:18:31 -0700 Subject: [PATCH 293/590] lv_label: dynamically allocate space for dots if necessary. If the required dots storage space is 4 or less bytes, directly stores them in the extended data object --- src/lv_core/lv_obj.h | 3 +- src/lv_objx/lv_label.c | 97 +++++++++++++++++++++++++++++++++++++----- src/lv_objx/lv_label.h | 6 ++- 3 files changed, 92 insertions(+), 14 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 1fa0bf1dfc39..7845ad7d62d8 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -208,8 +208,7 @@ typedef struct _lv_obj_t `lv_protect_t`*/ lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ - lv_coord_t - ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/ + lv_coord_t ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/ #if LV_OBJ_REALIGN lv_reailgn_t realign; #endif diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 630b6c7c1f39..d4d02b5ae658 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -43,6 +43,11 @@ static void lv_label_revert_dots(lv_obj_t * label); static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x); static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y); #endif + +static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, int len); +static char * lv_label_get_dot_tmp(lv_obj_t *label); +static void lv_label_dot_tmp_free(lv_obj_t *label); + /********************** * STATIC VARIABLES **********************/ @@ -95,6 +100,8 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->selection_end = 0; ext->selection_en = 0; #endif + ext->dot_tmp_ptr = NULL; + ext->dot_tmp_alloc = 0; lv_obj_set_design_cb(new_label, lv_label_design); lv_obj_set_signal_cb(new_label, lv_label_signal); @@ -126,7 +133,13 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) memcpy(ext->text, copy_ext->text, lv_mem_get_size(copy_ext->text)); } - memcpy(ext->dot_tmp, copy_ext->dot_tmp, sizeof(ext->dot_tmp)); + if(copy_ext->dot_tmp_alloc && copy_ext->dot_tmp_ptr ){ + int len = strlen(copy_ext->dot_tmp_ptr); + lv_label_set_dot_tmp(new_label, ext->dot_tmp_ptr, len); + } + else{ + memcpy(ext->dot_tmp, copy_ext->dot_tmp, sizeof(ext->dot_tmp)); + } ext->dot_end = copy_ext->dot_end; /*Refresh the style with new signal function*/ @@ -870,6 +883,7 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param lv_mem_free(ext->text); ext->text = NULL; } + lv_label_dot_tmp_free(label); } else if(sign == LV_SIGNAL_STYLE_CHG) { /*Revert dots for proper refresh*/ lv_label_revert_dots(label); @@ -1040,15 +1054,13 @@ static void lv_label_refr_text(lv_obj_t * label) lv_txt_encoded_next(ext->text, &byte_id); } - memcpy(ext->dot_tmp, &ext->text[byte_id_ori], len); - ext->dot_tmp[len] = '\0'; /*Close with a zero*/ - - for(i = 0; i < LV_LABEL_DOT_NUM; i++) { - ext->text[byte_id_ori + i] = '.'; + if( lv_label_set_dot_tmp(label, &ext->text[byte_id_ori], len ) ){ + for(i = 0; i < LV_LABEL_DOT_NUM; i++) { + ext->text[byte_id_ori + i] = '.'; + } + ext->text[byte_id_ori + LV_LABEL_DOT_NUM] = '\0'; + ext->dot_end = letter_id + LV_LABEL_DOT_NUM; } - ext->text[byte_id_ori + LV_LABEL_DOT_NUM] = '\0'; - - ext->dot_end = letter_id + LV_LABEL_DOT_NUM; } } /*In break mode only the height can change*/ @@ -1073,10 +1085,13 @@ static void lv_label_revert_dots(lv_obj_t * label) /*Restore the characters*/ uint8_t i = 0; - while(ext->dot_tmp[i] != '\0') { - ext->text[byte_i + i] = ext->dot_tmp[i]; + char* dot_tmp = lv_label_get_dot_tmp(label); + while(ext->text[byte_i + i] != '\0') { + ext->text[byte_i + i] = dot_tmp[i]; i++; } + ext->text[byte_i + i] = dot_tmp[i]; + lv_label_dot_tmp_free(label); ext->dot_end = LV_LABEL_DOT_END_INV; } @@ -1096,4 +1111,64 @@ static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y) lv_obj_invalidate(label); } #endif + +/** + * Store `len` characters from `data`. Allocates space if necessary. + * + * @param label pointer to label object + * @param len Number of characters to store. + * @return true on success. + */ +static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, int len){ + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + lv_label_dot_tmp_free( label ); /* Deallocate any existing space */ + if( len > 4 ){ + /* Memory needs to be allocated. Allocates an additional byte + * for a NULL-terminator so it can be copied. */ + ext->dot_tmp_ptr = lv_mem_alloc(len + 1); + if( ext->dot_tmp_ptr == NULL ){ + LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr"); + return false; + } + memcpy(ext->dot_tmp_ptr, data, len); + ext->dot_tmp_ptr[len]='\0'; + ext->dot_tmp_alloc = true; + } + else { + /* Characters can be directly stored in object */ + ext->dot_tmp_alloc = false; + memcpy(ext->dot_tmp, data, len); + } + return true; +} + +/** + * Get the stored dot_tmp characters + * @param label pointer to label object + * @return char pointer to a stored characters. Is *not* necessarily NULL-terminated. + */ +static char * lv_label_get_dot_tmp(lv_obj_t *label){ + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( ext->dot_tmp_alloc ){ + return ext->dot_tmp_ptr; + } + else{ + return ext->dot_tmp; + } +} + +/** + * Free the dot_tmp_ptr field if it was previously allocated. + * Always clears the field + * @param label pointer to label object. + */ +static void lv_label_dot_tmp_free(lv_obj_t *label){ + lv_label_ext_t * ext = lv_obj_get_ext_attr(label); + if( ext->dot_tmp_alloc && ext->dot_tmp_ptr ){ + lv_mem_free(ext->dot_tmp_ptr); + } + ext->dot_tmp_alloc = false; + ext->dot_tmp_ptr = NULL; +} + #endif diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 87e6583733b6..98f7297f3e3c 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -62,7 +62,10 @@ typedef struct /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ char * text; /*Text of the label*/ - char dot_tmp[LV_LABEL_DOT_NUM * 4 ]; /*Store the character which are replaced by dots (Handled by the library)*/ + union{ + char * dot_tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ + char dot_tmp[4]; /* Directly store the characters if <=4 characters */ + }; uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ @@ -79,6 +82,7 @@ typedef struct uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ uint8_t body_draw : 1; /*Draw background body*/ + uint8_t dot_tmp_alloc : 1; /*True if dot_tmp has been allocated. False if dot_tmp directly holds up to 4 bytes of characters */ } lv_label_ext_t; /********************** From 30dcf6835150c2c526b897730cf174c0c9d2bbad Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 14 Apr 2019 13:52:54 -0700 Subject: [PATCH 294/590] lv_label: change magic number 4 to sizeof(char *) --- src/lv_objx/lv_label.c | 2 +- src/lv_objx/lv_label.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index d4d02b5ae658..42d17e18b8f0 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -1122,7 +1122,7 @@ static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y) static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, int len){ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); lv_label_dot_tmp_free( label ); /* Deallocate any existing space */ - if( len > 4 ){ + if( len > sizeof(char *) ){ /* Memory needs to be allocated. Allocates an additional byte * for a NULL-terminator so it can be copied. */ ext->dot_tmp_ptr = lv_mem_alloc(len + 1); diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 98f7297f3e3c..7a0428c5676c 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -64,7 +64,7 @@ typedef struct char * text; /*Text of the label*/ union{ char * dot_tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ - char dot_tmp[4]; /* Directly store the characters if <=4 characters */ + char dot_tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ }; uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ From b3f60153cf216eb1194e9b137b8b3d8fabd88fb8 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 14 Apr 2019 14:49:42 -0700 Subject: [PATCH 295/590] lv_label: fixed missing dot_tmp_alloc copy on create --- src/lv_objx/lv_label.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 42d17e18b8f0..a27dcd50b7e5 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -140,6 +140,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) else{ memcpy(ext->dot_tmp, copy_ext->dot_tmp, sizeof(ext->dot_tmp)); } + ext->dot_tmp_alloc = copy_ext->dot_tmp_alloc; ext->dot_end = copy_ext->dot_end; /*Refresh the style with new signal function*/ From eb70f39e429db5f2bf00d50a92f68d0f70cc3607 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 15 Apr 2019 18:08:54 -0700 Subject: [PATCH 296/590] lv_label pause at beginning of LV_LABEL_LONG_ROLL animation. Also expose the pause amount to lv_conf --- lv_conf_template.h | 1 + src/lv_objx/lv_label.c | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 64cb6912aa43..a591eb9fdc4b 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -353,6 +353,7 @@ typedef void * lv_obj_user_data_t; #if LV_USE_LABEL != 0 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ # define LV_LABEL_DEF_SCROLL_SPEED 25 +# define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ #endif /*LED (dependencies: -)*/ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 107cba10961d..2504db9c20af 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -23,8 +23,6 @@ #define LV_LABEL_DEF_SCROLL_SPEED (25) #endif -#define ANIM_WAIT_CHAR_COUNT 3 - #define LV_LABEL_DOT_END_INV 0xFFFF /********************** @@ -774,7 +772,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ /*Draw the text again next to the original to make an circular effect */ if(size.x > lv_obj_get_width(label)) { ofs.x = ext->offset.x + size.x + - lv_font_get_width(style->text.font, ' ') * ANIM_WAIT_CHAR_COUNT; + lv_font_get_width(style->text.font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, ext->selection_start, ext->selection_end); @@ -884,15 +882,15 @@ static void lv_label_refr_text(lv_obj_t * label) anim.repeat = 1; anim.playback = 1; anim.start = 0; - anim.act_time = 0; anim.end_cb = NULL; anim.path = lv_anim_path_linear; anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * - ANIM_WAIT_CHAR_COUNT; + LV_LABEL_WAIT_CHAR_COUNT; ; anim.repeat_pause = anim.playback_pause; + anim.act_time = -anim.playback_pause; bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { @@ -935,7 +933,7 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = -size.x - lv_font_get_width(font, ' ') * ANIM_WAIT_CHAR_COUNT; + anim.end = -size.x - lv_font_get_width(font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; anim.fp = (lv_anim_fp_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); From c40148150902845d2cc8177ef40f6b876d594f35 Mon Sep 17 00:00:00 2001 From: BrianPugh Date: Mon, 15 Apr 2019 21:55:22 -0700 Subject: [PATCH 297/590] lv_obj.h re-added missing #if LV_USE_OBJ_REALIGN in lv_obj_t --- src/lv_core/lv_obj.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 81768d336dec..6d43c865ccdc 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -223,7 +223,8 @@ typedef struct _lv_obj_t lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ lv_coord_t ext_draw_pad; /*EXTtend the size in every direction for drawing. */ - + +#if LV_USE_OBJ_REALIGN lv_reailgn_t realign; #endif From d7b193d3fc40531b4536e932dc289bd37a83433a Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 15 Apr 2019 22:03:12 -0700 Subject: [PATCH 298/590] lv_label: change to . Repeated header documentation in c file. --- src/lv_objx/lv_label.c | 18 ++++++++++++++---- src/lv_objx/lv_label.h | 8 ++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index f66063dc2b56..d84747397c51 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -356,7 +356,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) } } -void lv_label_set_selection_start( const lv_obj_t * label, int index ) { +void lv_label_set_selection_start( lv_obj_t * label, int32_t index ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( index >= 0 ) { @@ -370,7 +370,7 @@ void lv_label_set_selection_start( const lv_obj_t * label, int index ) { #endif } -void lv_label_set_selection_end( const lv_obj_t * label, int index ) { +void lv_label_set_selection_end( lv_obj_t * label, int32_t index ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( index >= 0 ) { @@ -603,7 +603,12 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) return lv_encoded_get_char_id(txt, i); } -int lv_label_get_selection_start( const lv_obj_t * label ) { +/** + * @brief Get the selection start index. + * @param label pointer to a label object. + * @return selection start index. -1 if nothing is selected. + */ +int32_t lv_label_get_selection_start( const lv_obj_t * label ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( ext->selection_en ) @@ -615,7 +620,12 @@ int lv_label_get_selection_start( const lv_obj_t * label ) { #endif } -int lv_label_get_selection_end( const lv_obj_t * label ) { +/** + * @brief Get the selection end index. + * @param label pointer to a label object. + * @return selection end index. -1 if nothing is selected. + */ +int32_t lv_label_get_selection_end( const lv_obj_t * label ) { #if LV_LABEL_SELECTION_EN lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( ext->selection_en ) diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 7a0428c5676c..acc9864df0a5 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -177,14 +177,14 @@ static inline void lv_label_set_style(lv_obj_t * label, const lv_style_t * style * @param label pointer to a label object. * @param index index to set. -1 to select nothing. */ -void lv_label_set_selection_start( const lv_obj_t * label, int index ); +void lv_label_set_selection_start( lv_obj_t * label, int32_t index ); /** * @brief Set the selection end index. * @param label pointer to a label object. * @param index index to set. -1 to select nothing. */ -void lv_label_set_selection_end( const lv_obj_t * label, int index ); +void lv_label_set_selection_end( lv_obj_t * label, int32_t index ); /*===================== * Getter functions @@ -273,14 +273,14 @@ static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) * @param label pointer to a label object. * @return selection start index. -1 if nothing is selected. */ -int lv_label_get_selection_start( const lv_obj_t * label ); +int32_t lv_label_get_selection_start( const lv_obj_t * label ); /** * @brief Get the selection end index. * @param label pointer to a label object. * @return selection end index. -1 if nothing is selected. */ -int lv_label_get_selection_end( const lv_obj_t * label ); +int32_t lv_label_get_selection_end( const lv_obj_t * label ); /*===================== From ff6b6725a59c3fe1eba117449a06ed70d035d3ba Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Tue, 16 Apr 2019 08:50:35 -0700 Subject: [PATCH 299/590] lv_label: Added initial delay to LV_LABEL_LONG_ROLL_CIRC --- src/lv_objx/lv_label.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 2504db9c20af..70ff1507c26d 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -886,9 +886,7 @@ static void lv_label_refr_text(lv_obj_t * label) anim.path = lv_anim_path_linear; anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / - ext->anim_speed) * - LV_LABEL_WAIT_CHAR_COUNT; - ; + ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.repeat_pause = anim.playback_pause; anim.act_time = -anim.playback_pause; @@ -925,7 +923,9 @@ static void lv_label_refr_text(lv_obj_t * label) anim.repeat = 1; anim.playback = 0; anim.start = 0; - anim.act_time = 0; + anim.act_time = + -(((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / + ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.end_cb = NULL; anim.path = lv_anim_path_linear; anim.playback_pause = 0; From 0811096f21ce5df8aa8e748e284c5e742bcee8e7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 17 Apr 2019 15:00:22 +0200 Subject: [PATCH 300/590] lv_mem: fix comment typos --- src/lv_misc/lv_mem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index dca4a1ab63a3..146eba2bef65 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -231,9 +231,7 @@ void * lv_mem_realloc(void * data_p, uint32_t new_size) if(old_size == new_size) return data_p; /*Also avoid reallocating the same memory*/ #if LV_MEM_CUSTOM == 0 - /* Only truncate the memory is possible - * If the 'old_size' was extended by a header size in 'ent_trunc' it avoids reallocating this - * same memory */ + /* Truncate the memory if the new size is smaller. */ if(new_size < old_size) { lv_mem_ent_t * e = (lv_mem_ent_t *)((uint8_t *)data_p - sizeof(lv_mem_header_t)); ent_trunc(e, new_size); From b9af3b03838eb88173af1152dfaabd3f61d9236b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 17 Apr 2019 15:14:09 +0200 Subject: [PATCH 301/590] triangle draw optimization test --- src/lv_draw/lv_draw_triangle.c | 160 +++++++++++++++++++++++++++++---- 1 file changed, 143 insertions(+), 17 deletions(-) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 52d512aef58d..4c829ae785e1 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -24,6 +24,8 @@ /********************** * STATIC VARIABLES **********************/ +void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); +void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** @@ -42,7 +44,43 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); * @param opa_scale scale down all opacities by the factor */ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) + lv_opa_t opa_scale) +{ + + /*Return is the triangle is degenerated*/ + if(points[0].x == points[1].x && points[0].y == points[1].y) return; + if(points[1].x == points[2].x && points[1].y == points[2].y) return; + if(points[0].x == points[2].x && points[0].y == points[2].y) return; + + if(points[0].x == points[1].x && points[1].x == points[2].x) return; + if(points[0].y == points[1].y && points[1].y == points[2].y) return; + + lv_opa_t opa = opa_scale == LV_OPA_COVER + ? style->body.opa + : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + + /*Is the triangle flat or tall?*/ + lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x); + lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x); + lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); + lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); + + /* If smaller in x then it's flat. + * Draw from horizontal lines*/ + if(x_max - x_min < y_max - y_min) { + tri_draw_flat(points, mask, style, opa); + } + /*Else tall so draw from vertical lines*/ + else { + tri_draw_tall(points, mask, style, opa); + } +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { lv_point_t tri[3]; @@ -53,14 +91,6 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l if(tri[2].y < tri[1].y) point_swap(&tri[2], &tri[1]); if(tri[1].y < tri[0].y) point_swap(&tri[1], &tri[0]); - /*Return is the triangle is degenerated*/ - if(tri[0].x == tri[1].x && tri[0].y == tri[1].y) return; - if(tri[1].x == tri[2].x && tri[1].y == tri[2].y) return; - if(tri[0].x == tri[2].x && tri[0].y == tri[2].y) return; - - if(tri[0].x == tri[1].x && tri[1].x == tri[2].x) return; - if(tri[0].y == tri[1].y && tri[1].y == tri[2].y) return; - /*Draw the triangle*/ lv_point_t edge1; lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x); @@ -88,10 +118,6 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l lv_area_t act_area; lv_area_t draw_area; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; - while(1) { act_area.x1 = edge1.x; act_area.x2 = edge2.x; @@ -103,7 +129,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent - triangle*/ + triangle*/ lv_draw_fill(&draw_area, mask, style->body.main_color, opa); /*Calc. the next point of edge1*/ @@ -146,9 +172,109 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l } } -/********************** - * STATIC FUNCTIONS - **********************/ + +void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) +{ + /* + * Better to draw from vertical lines + * |\ + * | | + * | | + * | \ + * | | + * |___| + */ + + lv_point_t tri[3]; + + memcpy(tri, points, sizeof(tri)); + + /*Sort the vertices according to their x coordinate (0: x max, 1: x mid, 2:x min)*/ + if(tri[1].x < tri[0].x) point_swap(&tri[1], &tri[0]); + if(tri[2].x < tri[1].x) point_swap(&tri[2], &tri[1]); + if(tri[1].x < tri[0].x) point_swap(&tri[1], &tri[0]); + + /*Draw the triangle*/ + lv_point_t edge1; + lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x); + lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1; + lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y); + lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1; + lv_coord_t err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; + lv_coord_t err_tmp1; + + lv_point_t edge2; + lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x); + lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1; + lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y); + lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1; + lv_coord_t err2 = (dx1 > dy2 ? dx2 : -dy2) / 2; + lv_coord_t err_tmp2; + + lv_coord_t x1_tmp; + lv_coord_t x2_tmp; + + edge1.x = tri[0].x; + edge1.y = tri[0].y; + edge2.x = tri[0].x; + edge2.y = tri[0].y; + lv_area_t act_area; + lv_area_t draw_area; + + while(1) { + act_area.x1 = edge1.x; + act_area.x2 = edge2.x; + act_area.y1 = edge1.y; + act_area.y2 = edge2.y; + + draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); + draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); + draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); + draw_area.y2--; /*Do not draw most right pixel because it will be drawn by the adjacent + triangle*/ + lv_draw_fill(&draw_area, mask, style->body.main_color, opa); + + /*Calc. the next point of edge1*/ + x1_tmp = edge1.x; + do { + if(edge1.y == tri[1].y && edge1.x == tri[1].x) { + + dx1 = LV_MATH_ABS(tri[1].x - tri[2].x); + sx1 = tri[1].x < tri[2].x ? 1 : -1; + dy1 = LV_MATH_ABS(tri[1].y - tri[2].y); + sy1 = tri[1].y < tri[2].y ? 1 : -1; + err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; + } else if(edge1.y == tri[2].y && edge1.x == tri[2].x) + return; + err_tmp1 = err1; + if(err_tmp1 > -dx1) { + err1 -= dy1; + edge1.x += sx1; + } + if(err_tmp1 < dy1) { + err1 += dx1; + edge1.y += sy1; + } + } while(edge1.x == x1_tmp); + + /*Calc. the next point of edge2*/ + x2_tmp = edge2.x; + do { + if(edge2.y == tri[2].y && edge2.x == tri[2].x) return; + err_tmp2 = err2; + if(err_tmp2 > -dx2) { + err2 -= dy2; + edge2.x += sx2; + } + if(err_tmp2 < dy2) { + err2 += dx2; + edge2.y += sy2; + } + } while(edge2.x == x2_tmp); + } +} + /** * Swap two points From 1ba23100f6202d3efb8f8177707dfedb1ebcf4d7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 17 Apr 2019 15:14:54 +0200 Subject: [PATCH 302/590] update lv_conf_checker.h --- src/lv_conf_checker.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 948e9aea061d..028aca2a7a8f 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -424,6 +424,15 @@ #define LV_USE_OBJ_REALIGN 1 #endif +/* Enable to make the object clickable on a larger area. + * LV_EXT_CLICK_AREA_OFF or 0: Disable this feature + * LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px) + * LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px) + */ +#ifndef LV_USE_EXT_CLICK_AREA +#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF +#endif + /*================== * LV OBJ X USAGE *================*/ @@ -533,6 +542,9 @@ #ifndef LV_LABEL_DEF_SCROLL_SPEED # define LV_LABEL_DEF_SCROLL_SPEED 25 #endif +#ifndef LV_LABEL_WAIT_CHAR_COUNT +# define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ +#endif #endif /*LED (dependencies: -)*/ From 84d79bcf56e8c92e0eeb670f7ba3950eafa74b7f Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 17 Apr 2019 16:00:31 -0700 Subject: [PATCH 303/590] lv_group: fix lv_group_del not removing group from the group linked list --- src/lv_core/lv_group.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 7ea018548a1d..15009fea0cdf 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -110,6 +110,7 @@ void lv_group_del(lv_group_t * group) } lv_ll_clear(&(group->obj_ll)); + lv_ll_rem(&LV_GC_ROOT(_lv_group_ll), group); lv_mem_free(group); } From cf211150293fde3d732805a896c3c8b4f17d4621 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 18 Apr 2019 05:58:09 +0200 Subject: [PATCH 304/590] triangle drawing optimzation --- src/lv_draw/lv_draw_triangle.c | 36 ++++++++++++++++++++++------------ src/lv_objx/lv_chart.c | 1 + 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 4c829ae785e1..043be73f8647 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -63,16 +63,26 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x); lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x); lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); - lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); + lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y); - /* If smaller in x then it's flat. + + static lv_color_t c = LV_COLOR_BLACK; + c.full += 0xAA234; + lv_style_t style_tmp; + lv_style_copy(&style_tmp, style); +// style_tmp.body.main_color = c; + + + /* If smaller in x then it's tall. * Draw from horizontal lines*/ if(x_max - x_min < y_max - y_min) { - tri_draw_flat(points, mask, style, opa); + style_tmp.body.main_color = LV_COLOR_RED; + tri_draw_tall(points, mask, &style_tmp, opa); } - /*Else tall so draw from vertical lines*/ + /*Else flat so draw from vertical lines*/ else { - tri_draw_tall(points, mask, style, opa); + style_tmp.body.main_color = LV_COLOR_BLUE; + tri_draw_flat(points, mask, &style_tmp, opa); } } @@ -124,12 +134,13 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s act_area.y1 = edge1.y; act_area.y2 = edge2.y; + /* Get the area of a line. + * Adjust it a little bit to perfectly match (no redrawn pixels) with the adjacent triangles*/ draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); - draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); - draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); - draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent - triangle*/ + draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - 1; + draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2) - 1; + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; + lv_draw_fill(&draw_area, mask, style->body.main_color, opa); /*Calc. the next point of edge1*/ @@ -230,9 +241,8 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); - draw_area.y2--; /*Do not draw most right pixel because it will be drawn by the adjacent - triangle*/ + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; + lv_draw_fill(&draw_area, mask, style->body.main_color, opa); /*Calc. the next point of edge1*/ diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 92b4a0b8ffc1..8f1f8a6481a6 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -932,6 +932,7 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) LV_LL_READ_BACK(ext->series_ll, ser) { style.body.main_color = ser->color; + style.body.opa = ext->series.opa; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; From 41fc80e96bb3f55dd8b4740a563f446db2b23689 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 18 Apr 2019 07:11:43 +0200 Subject: [PATCH 305/590] text_sel: minor fixes and renames --- lv_conf_template.h | 2 +- src/lv_objx/lv_label.c | 21 +++++++------- src/lv_objx/lv_label.h | 6 ++-- src/lv_objx/lv_ta.c | 64 ++++++++++++++++++++++++++++++++++-------- src/lv_objx/lv_ta.h | 30 ++++++++++---------- 5 files changed, 82 insertions(+), 41 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 6fb68df88a55..fe16371be358 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -354,7 +354,7 @@ typedef void * lv_obj_user_data_t; /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ # define LV_LABEL_DEF_SCROLL_SPEED 25 # define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ -# define LV_LABEL_TEXT_SELECTION 1 +# define LV_LABEL_TEXT_SEL 1 /*Enable selecting text of the label */ #endif /*LED (dependencies: -)*/ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index d65cdcd1a75a..5cdad61476e4 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -93,7 +93,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; ext->offset.x = 0; ext->offset.y = 0; -#if LV_LABEL_TEXT_SELECTION +#if LV_LABEL_TEXT_SEL ext->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; #endif @@ -354,7 +354,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) } void lv_label_set_text_sel_start( lv_obj_t * label, uint16_t index ) { -#if LV_LABEL_TEXT_SELECTION +#if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); ext->txt_sel_start = index; lv_obj_invalidate(label); @@ -363,7 +363,7 @@ void lv_label_set_text_sel_start( lv_obj_t * label, uint16_t index ) { void lv_label_set_text_sel_end( lv_obj_t * label, uint16_t index ) { -#if LV_LABEL_TEXT_SELECTION +#if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); ext->txt_sel_end = index; lv_obj_invalidate(label); @@ -594,8 +594,8 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) * @param label pointer to a label object. * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -int32_t lv_label_get_txt_sel_start( const lv_obj_t * label ) { -#if LV_LABEL_TEXT_SELECTION +uint16_t lv_label_get_text_sel_start( const lv_obj_t * label ) { +#if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); return ext->txt_sel_start; @@ -609,11 +609,12 @@ int32_t lv_label_get_txt_sel_start( const lv_obj_t * label ) { * @param label pointer to a label object. * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -int32_t lv_label_get_tsxt_sel_end( const lv_obj_t * label ) { -#if LV_LABEL_TEXT_SELECTION +uint16_t lv_label_get_text_sel_end( const lv_obj_t * label ) { +#if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); return ext->txt_sel_end; #else + (void) label; /*Unused*/ return LV_LABEL_TEXT_SEL_OFF; #endif } @@ -824,7 +825,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, - lv_label_get_txt_sel_start(label), lv_label_get_tsxt_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; @@ -839,7 +840,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_txt_sel_start(label), lv_label_get_tsxt_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); } /*Draw the text again below the original to make an circular effect */ @@ -847,7 +848,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.x = ext->offset.x; ofs.y = ext->offset.y + size.y + lv_font_get_height(style->text.font); lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_txt_sel_start(label), lv_label_get_tsxt_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); } } } diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 285df0f6ce69..cd2e25a9e36f 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -71,7 +71,7 @@ typedef struct uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ -#if LV_LABEL_TEXT_SELECTION +#if LV_LABEL_TEXT_SEL uint16_t txt_sel_start; /*Left-most selection character*/ uint16_t txt_sel_end; /*Right-most selection character*/ #endif @@ -273,14 +273,14 @@ static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) * @param label pointer to a label object. * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -int32_t lv_label_get_text_sel_start( const lv_obj_t * label ); +uint16_t lv_label_get_text_sel_start( const lv_obj_t * label ); /** * @brief Get the selection end index. * @param label pointer to a label object. * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -int32_t lv_label_get_tsxt_sel_end( const lv_obj_t * label ); +uint16_t lv_label_get_text_sel_end( const lv_obj_t * label ); /*===================== diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 7a9b762131f1..b6a912ba0622 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -795,10 +795,16 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style */ void lv_ta_set_text_sel(lv_obj_t * ta, bool en) { +#if LV_LABEL_TEXT_SEL lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->text_sel_en = en; if(!en) lv_ta_clear_selection(ta); +#else + (void) ta; /*Unused*/ + (void) en; /*Unused*/ +#endif } /*===================== @@ -950,8 +956,19 @@ const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) */ bool lv_ta_text_is_selected(const lv_obj_t * ta) { - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - return (lv_label_get_txt_sel_start(ext->label) == LV_LABEL_TEXT_SEL_OFF || lv_label_get_tsxt_sel_end(ext->label) == LV_LABEL_TEXT_SEL_OFF); +#if LV_LABEL_TEXT_SEL + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + if((lv_label_get_text_sel_start(ext->label) == LV_LABEL_TEXT_SEL_OFF || + lv_label_get_text_sel_end(ext->label) == LV_LABEL_TEXT_SEL_OFF)){ + return true; + } else { + return false; + } +#else + (void) ta; /*Unused*/ + return false; +#endif } /** @@ -959,11 +976,15 @@ bool lv_ta_text_is_selected(const lv_obj_t * ta) * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_text_sel_mode(lv_obj_t * ta) +bool lv_ta_get_text_sel_en(lv_obj_t * ta) { +#if LV_LABEL_TEXT_SEL lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - return ext->text_sel_en; +#else + (void) ta; /*Unused*/ + return false; +#endif } /*===================== @@ -976,13 +997,17 @@ bool lv_ta_get_text_sel_mode(lv_obj_t * ta) */ void lv_ta_clear_selection(lv_obj_t * ta) { +#if LV_LABEL_TEXT_SEL lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - if(lv_label_get_txt_sel_start(ext->label) != LV_LABEL_TEXT_SEL_OFF || - lv_label_get_tsxt_sel_end(ext->label) != LV_LABEL_TEXT_SEL_OFF){ + if(lv_label_get_text_sel_start(ext->label) != LV_LABEL_TEXT_SEL_OFF || + lv_label_get_text_sel_end(ext->label) != LV_LABEL_TEXT_SEL_OFF){ lv_label_set_text_sel_start(ext->label, LV_LABEL_TEXT_SEL_OFF); lv_label_set_text_sel_end(ext->label, LV_LABEL_TEXT_SEL_OFF); } +#else + (void) ta; /*Unused*/ +#endif } /** @@ -1612,18 +1637,12 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, } lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); lv_area_t label_coords; - bool click_outside_label; - uint16_t index_of_char_at_position; - lv_obj_get_coords(ext->label, &label_coords); lv_point_t point_act, vect_act; - lv_indev_get_point(click_source, &point_act); - lv_indev_get_vect(click_source, &vect_act); if(point_act.x < 0 || point_act.y < 0) return; /*Ignore event from keypad*/ @@ -1633,6 +1652,12 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_coord_t label_width = lv_obj_get_width(ext->label); + uint16_t index_of_char_at_position; + + +#if LV_LABEL_TEXT_SEL + lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); + bool click_outside_label; /*Check if the click happened on the left side of the area outside the label*/ if(relative_position.x < 0) { index_of_char_at_position = 0; @@ -1697,6 +1722,21 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, ext->text_sel_in_prog = 0; } } +#else + /*Check if the click happened on the left side of the area outside the label*/ + if(relative_position.x < 0) { + index_of_char_at_position = 0; + } + /*Check if the click happened on the right side of the area outside the label*/ + else if(relative_position.x >= label_width) { + index_of_char_at_position = LV_TA_CURSOR_LAST; + } else { + index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); + } + + if(sign == LV_SIGNAL_PRESSED) + lv_ta_set_cursor_pos(ta, index_of_char_at_position); +#endif } #endif diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 9757ea152535..41a5b45795a7 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -59,8 +59,7 @@ typedef struct lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ lv_obj_t * label; /*Label of the text area*/ - lv_obj_t * placeholder; /*Place holder label of the text area, only visible if text is an empty - string*/ + lv_obj_t * placeholder; /*Place holder label. only visible if text is an empty string*/ char * pwd_tmp; /*Used to store the original text in password mode*/ const char * accapted_chars; /*Only these characters will be accepted. NULL: accept all*/ uint16_t max_length; /*The max. number of characters. 0: no limit*/ @@ -68,21 +67,22 @@ typedef struct uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ struct { - const lv_style_t * style; /*Style of the cursor (NULL to use label's style)*/ - lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter - line. (Handled by the library)*/ - uint16_t - pos; /*The current cursor position (0: before 1. letter; 1: before 2. letter etc.)*/ - lv_area_t area; /*Cursor area relative to the Text Area*/ - uint16_t txt_byte_pos; /*Byte index of the letter after (on) the cursor*/ - lv_cursor_type_t type : 4; /*Shape of the cursor*/ - uint8_t - state : 1; /*Indicates that the cursor is visible now or not (Handled by the library)*/ + const lv_style_t * style; /* Style of the cursor (NULL to use label's style)*/ + lv_coord_t valid_x; /* Used when stepping up/down to a shorter line. + * (Used by the library)*/ + uint16_t pos; /* The current cursor position + * (0: before 1st letter; 1: before 2nd letter ...)*/ + lv_area_t area; /* Cursor area relative to the Text Area*/ + uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/ + lv_cursor_type_t type : 4; /* Shape of the cursor*/ + uint8_t state : 1; /*Cursor is visible now or not (Handled by the library)*/ } cursor; - int tmp_sel_start; /*Temporary value*/ - int tmp_sel_end; /*Temporary value*/ +#if LV_LABEL_TEXT_SEL + uint16_t tmp_sel_start; /*Temporary value*/ + uint16_t tmp_sel_end; /*Temporary value*/ uint8_t text_sel_in_prog : 1; /*User is in process of selecting */ uint8_t text_sel_en : 1; /*Text can be selected on this text area*/ +#endif } lv_ta_ext_t; enum { @@ -388,7 +388,7 @@ bool lv_ta_text_is_selected(const lv_obj_t * ta); * @param ta pointer to a text area object * @return true: selection mode is enabled, false: disabled */ -bool lv_ta_get_text_sel_mode(lv_obj_t * ta); +bool lv_ta_get_text_sel_en(lv_obj_t * ta); /*===================== * Other functions From 5a88709a5c5c7c7c1fa9cc49738dc472740bed01 Mon Sep 17 00:00:00 2001 From: canardos Date: Thu, 18 Apr 2019 14:12:30 +0800 Subject: [PATCH 306/590] Change assignment to memcpy --- src/lv_core/lv_obj.c | 4 ++-- src/lv_core/lv_obj.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 3d75269238f2..3e7790b4fd4d 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1877,13 +1877,13 @@ lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) } /** - * Set the objet's user data + * Set the object's user data. The data will be copied. * @param obj pointer to an object * @param data user data */ void lv_obj_set_user_data(lv_obj_t * obj, lv_obj_user_data_t data) { - obj->user_data = data; + memcpy(&obj->user_data, &data, sizeof(lv_obj_user_data_t)); } #endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 73fd2332de84..226ed4a4b906 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -859,7 +859,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); /** - * Set the objet's user data + * Set the object's user data. The data will be copied. * @param obj pointer to an object * @param data user data */ From 857a4e1406e0c151341998004121358401067435 Mon Sep 17 00:00:00 2001 From: seyyah Date: Thu, 18 Apr 2019 18:00:11 +0300 Subject: [PATCH 307/590] Added tab button position LEFT and RIGHT --- src/lv_objx/lv_tabview.c | 336 +++++++++++++++++++++++++++++++++------ src/lv_objx/lv_tabview.h | 4 +- 2 files changed, 290 insertions(+), 50 deletions(-) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 2fe913f8d035..bcae2c902b22 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -113,17 +113,18 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_size(new_tabview, lv_obj_get_width_fit(lv_obj_get_parent(new_tabview)), lv_obj_get_height_fit(lv_obj_get_parent(new_tabview))); + ext->content = lv_cont_create(new_tabview, NULL); ext->btns = lv_btnm_create(new_tabview, NULL); + ext->indic = lv_obj_create(ext->btns, NULL); + lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); lv_btnm_set_map(ext->btns, tab_def); lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb); - - ext->indic = lv_obj_create(ext->btns, NULL); + lv_obj_set_width(ext->indic, LV_DPI); lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_obj_set_click(ext->indic, false); - - ext->content = lv_cont_create(new_tabview, NULL); + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); lv_cont_set_style(ext->content, &lv_style_transp_tight); @@ -232,12 +233,39 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) strcpy(name_dm, name); ext->tab_cnt++; - ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1)); + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1)); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2)); + break; + } + lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; - ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm; - ext->tab_name_ptr[ext->tab_cnt] = ""; + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm; + ext->tab_name_ptr[ext->tab_cnt] = ""; + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + if(ext->tab_cnt == 1) { + ext->tab_name_ptr[0] = name_dm; + ext->tab_name_ptr[1] = ""; + } else { + ext->tab_name_ptr[ext->tab_cnt * 2 - 3] = "\n"; + ext->tab_name_ptr[ext->tab_cnt * 2 - 2] = name_dm; + ext->tab_name_ptr[ext->tab_cnt * 2 - 1] = ""; + } + break; + } /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by * `lv_mem_realloc`. So make its current map invalid*/ @@ -249,14 +277,33 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) /*Modify the indicator size*/ const lv_style_t * style_tabs = lv_obj_get_style(ext->btns); - lv_coord_t indic_width = - (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - - style_tabs->body.padding.left - style_tabs->body.padding.right) / - ext->tab_cnt; - lv_obj_set_width(ext->indic, indic_width); - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + - style_tabs->body.padding.inner * ext->tab_cur + - style_tabs->body.padding.left); + lv_coord_t indic_size; + lv_coord_t max_h, btn_h, act_y; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + indic_size = + (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - + style_tabs->body.padding.left - style_tabs->body.padding.right) / + ext->tab_cnt; + lv_obj_set_width(ext->indic, indic_size); + lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + + style_tabs->body.padding.inner * ext->tab_cur + + style_tabs->body.padding.left); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + max_h = lv_obj_get_height(ext->btns) - style_tabs->body.padding.top - style_tabs->body.padding.bottom; + btn_h = max_h - ((ext->tab_cnt - 1) * style_tabs->body.padding.inner); + btn_h = btn_h / ext->tab_cnt; + btn_h--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/ + act_y = style_tabs->body.padding.top + ext->tab_cur * (btn_h + style_tabs->body.padding.inner); + + lv_obj_set_height(ext->indic, btn_h); + lv_obj_set_y(ext->indic, act_y); + break; + } /*Set the first btn as active*/ if(ext->tab_cnt == 1) { @@ -298,8 +345,27 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) ext->tab_cur = id; - lv_coord_t cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + - style->body.padding.left); + lv_coord_t cont_x; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + + style->body.padding.left); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + + style->body.padding.inner * id + + style->body.padding.left) + + lv_obj_get_width(ext->btns); + break; + case LV_TABVIEW_BTNS_POS_RIGHT: + cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + + style->body.padding.inner * id + + style->body.padding.left); + break; + } + if(ext->anim_time == 0 || anim_en == false) { lv_obj_set_x(ext->content, cont_x); } else { @@ -322,20 +388,54 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) } /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); - lv_coord_t indic_x = - indic_width * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; + lv_coord_t indic_size; + lv_coord_t indic_pos; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + indic_size = lv_obj_get_width(ext->indic); + indic_pos = indic_size * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + indic_size = lv_obj_get_height(ext->indic); + indic_pos = tabs_style->body.padding.top + id * (indic_size + tabs_style->body.padding.inner); + break; + } if(ext->anim_time == 0 || anim_en == false) { - lv_obj_set_x(ext->indic, indic_x); + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_set_x(ext->indic, indic_pos); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_set_y(ext->indic, indic_pos); + break; + } } else { #if LV_USE_ANIMATION lv_anim_t a; a.var = ext->indic; - a.start = lv_obj_get_x(ext->indic); - a.end = indic_x; - a.fp = (lv_anim_fp_t)lv_obj_set_x; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + a.start = lv_obj_get_x(ext->indic); + a.end = indic_pos; + a.fp = (lv_anim_fp_t)lv_obj_set_x; + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + a.start = lv_obj_get_y(ext->indic); + a.end = indic_pos; + a.fp = (lv_anim_fp_t)lv_obj_set_y; + break; + } + a.path = lv_anim_path_linear; a.end_cb = NULL; a.act_time = 0; @@ -407,7 +507,18 @@ void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_ break; case LV_TABVIEW_STYLE_INDIC: lv_obj_set_style(ext->indic, style); - lv_obj_set_height(ext->indic, style->body.padding.inner); + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_set_height(ext->indic, style->body.padding.inner); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_set_width(ext->indic, style->body.padding.inner); + break; + } + tabview_realign(tabview); break; } @@ -765,16 +876,33 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; /*Move the indicator*/ - lv_coord_t indic_width = lv_obj_get_width(ext->indic); const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); - const lv_style_t * indic_style = lv_obj_get_style(ext->indic); - lv_coord_t p = ((tabpage->coords.x1 - tabview->coords.x1) * - (indic_width + tabs_style->body.padding.inner)) / - lv_obj_get_width(tabview); - - lv_obj_set_x(ext->indic, indic_width * ext->tab_cur + - tabs_style->body.padding.inner * ext->tab_cur + - indic_style->body.padding.left - p); + lv_coord_t indic_size; + lv_coord_t p; + lv_coord_t indic_y; + const lv_style_t * indic_style; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + indic_size = lv_obj_get_width(ext->indic); + indic_style = lv_obj_get_style(ext->indic); + p = ((tabpage->coords.x1 - tabview->coords.x1) * + (indic_size + tabs_style->body.padding.inner)) / + lv_obj_get_width(tabview); + + lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + + tabs_style->body.padding.inner * ext->tab_cur + + indic_style->body.padding.left - p); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + indic_size = lv_obj_get_height(ext->indic); + indic_y = tabs_style->body.padding.top + + ext->tab_cur * (indic_size + tabs_style->body.padding.inner); + lv_obj_set_y(ext->indic, indic_y); + break; + } } } @@ -859,30 +987,114 @@ static void tabview_realign(lv_obj_t * tabview) const lv_style_t * style_btn_bg = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_BG); const lv_style_t * style_btn_rel = lv_tabview_get_style(tabview, LV_TABVIEW_STYLE_BTN_REL); - /*Set the indicator widths*/ - lv_coord_t indic_width = - (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - - style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / - ext->tab_cnt; - lv_obj_set_width(ext->indic, indic_width); + /*Set the indicator width/height*/ + lv_coord_t indic_size; + lv_coord_t max_h; - /*Set the tabs height*/ - lv_coord_t btns_height = lv_font_get_height(style_btn_rel->text.font) + - style_btn_rel->body.padding.top + - style_btn_rel->body.padding.bottom + - style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; - lv_obj_set_height(ext->btns, btns_height); + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + indic_size = + (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - + style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / + ext->tab_cnt; + lv_obj_set_width(ext->indic, indic_size); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); + + max_h = lv_obj_get_height(ext->btns) - style_btn_bg->body.padding.top - style_btn_bg->body.padding.bottom; + indic_size = max_h - ((ext->tab_cnt - 1) * style_btn_bg->body.padding.inner); + indic_size = indic_size / ext->tab_cnt; + indic_size--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/ + lv_obj_set_height(ext->indic, indic_size); + break; + } + + /*Set the tabs height/width*/ + lv_coord_t btns_size; + + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + btns_size = lv_font_get_height(style_btn_rel->text.font) + + style_btn_rel->body.padding.top + + style_btn_rel->body.padding.bottom + + style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; + lv_obj_set_height(ext->btns, btns_size); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + btns_size = lv_font_get_width(style_btn_rel->text.font, 0x0041) + // 'A' + style_btn_rel->body.padding.left + + style_btn_rel->body.padding.right + + style_btn_bg->body.padding.left + style_btn_bg->body.padding.right; + lv_obj_set_width(ext->btns, btns_size); + break; + } - lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); + break; + } switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); + lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); + lv_obj_set_height(ext->content, + lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + + // lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); + + // lv_obj_set_width(ext->indic, LV_DPI); break; case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); lv_obj_align(ext->btns, ext->content, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); + lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); + lv_obj_set_height(ext->content, + lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->content, tabview, LV_ALIGN_IN_TOP_LEFT, lv_obj_get_width(ext->btns), 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); + lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); + lv_obj_set_width(ext->content, + lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); + + lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); + lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner); + break; + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + lv_obj_align(ext->content, tabview, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); + lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); + lv_obj_set_width(ext->content, + lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); + + lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); + lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner); break; } } @@ -891,13 +1103,39 @@ static void tabview_realign(lv_obj_t * tabview) while(pages != NULL) { if(lv_obj_get_signal_cb(pages) == tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ - lv_obj_set_size(pages, lv_obj_get_width(tabview), lv_obj_get_height(ext->content)); + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_set_size( + pages, + lv_obj_get_width(tabview), + lv_obj_get_height(ext->content) + ); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_set_size( + pages, + lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns), + lv_obj_get_height(ext->content) + ); + break; + } } pages = lv_obj_get_child(ext->content, pages); } if(!ext->btns_hide) { - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + switch(ext->btns_pos) { + case LV_TABVIEW_BTNS_POS_TOP: + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + break; + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + break; + } } lv_tabview_set_tab_act(tabview, ext->tab_cur, false); diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index aa350be606b3..508bc4851ba6 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -45,6 +45,8 @@ extern "C" { enum { LV_TABVIEW_BTNS_POS_TOP, LV_TABVIEW_BTNS_POS_BOTTOM, + LV_TABVIEW_BTNS_POS_LEFT, + LV_TABVIEW_BTNS_POS_RIGHT }; typedef uint8_t lv_tabview_btns_pos_t; @@ -66,7 +68,7 @@ typedef struct uint8_t drag_hor : 1; uint8_t scroll_ver : 1; uint8_t btns_hide : 1; - lv_tabview_btns_pos_t btns_pos : 1; + lv_tabview_btns_pos_t btns_pos : 2; } lv_tabview_ext_t; enum { From a9036eb6b1e1c975f7157894e1f7f22e24f60784 Mon Sep 17 00:00:00 2001 From: seyyah Date: Thu, 18 Apr 2019 18:28:15 +0300 Subject: [PATCH 308/590] Tab button position LEFT and RIGHT: indic consistency --- src/lv_objx/lv_tabview.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index bcae2c902b22..d9b89b0c83f2 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -1063,7 +1063,7 @@ static void tabview_realign(lv_obj_t * tabview) case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_align(ext->content, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); lv_obj_align(ext->btns, ext->content, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); @@ -1086,7 +1086,7 @@ static void tabview_realign(lv_obj_t * tabview) case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); lv_obj_align(ext->content, tabview, LV_ALIGN_IN_TOP_LEFT, 0, 0); - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); @@ -1128,13 +1128,17 @@ static void tabview_realign(lv_obj_t * tabview) if(!ext->btns_hide) { switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: - case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); break; + case LV_TABVIEW_BTNS_POS_BOTTOM: + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); + break; case LV_TABVIEW_BTNS_POS_LEFT: - case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); break; + case LV_TABVIEW_BTNS_POS_RIGHT: + lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); + break; } } From 6446f78aebbab63d8569785c91cb49eba8b6f166 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 18 Apr 2019 11:35:57 -0400 Subject: [PATCH 309/590] Fix uniniitalized variable during display initialization (detected by Valgrind) --- src/lv_hal/lv_hal_disp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 8e38c1a87114..25fada1d84eb 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -124,14 +124,14 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) disp_def = disp; /*Temporarily change the default screen to create the default screens on the new display*/ + disp->inv_p = 0; + disp->act_scr = lv_obj_create(NULL, NULL); /*Create a default screen on the display*/ disp->top_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ disp->sys_layer = lv_obj_create(NULL, NULL); /*Create top layer on the display*/ lv_obj_set_style(disp->top_layer, &lv_style_transp); lv_obj_set_style(disp->sys_layer, &lv_style_transp); - disp->inv_p = 0; - lv_obj_invalidate(disp->act_scr); disp_def = disp_def_tmp; /*Revert the default display*/ From d0550b7feb2881209dc179a0aa67edccbe6db979 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Thu, 18 Apr 2019 13:03:13 -0400 Subject: [PATCH 310/590] Include lv_conf.h in lv_area.h --- src/lv_misc/lv_area.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index c07e2767d7bc..bf81e17c1fb9 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -16,6 +16,11 @@ extern "C" { #include #include #include +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif /********************* * DEFINES From 2abf55f4c4f6cc0a92bde090004bec68bc3e5c13 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 18 Apr 2019 10:46:16 -0700 Subject: [PATCH 311/590] ddlist: fix animation complete not always clearing selection highlight --- src/lv_objx/lv_ddlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 811108a6cb1c..e6a3096d7912 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -916,6 +916,7 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) ext->label->coords.y1 - scrl->coords.y1; lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2); + lv_obj_invalidate(ddlist); } #endif From b477a14fdf2f78b590794cdd79f6dae111ebcad3 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 18 Apr 2019 12:26:40 -0700 Subject: [PATCH 312/590] ddlist: fix animation issues The wrong animation function was used for the delete, and so the animation was never deleted. Must force animation callback on delete, so that the correct selection highlighting is shown. --- src/lv_objx/lv_ddlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index e6a3096d7912..5b094acc2e2a 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -847,8 +847,9 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION - lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then + lv_anim_del(ddlist, (lv_anim_fp_t)lv_ddlist_adjust_height); /*If an animation is in progress then it will overwrite this changes*/ + lv_ddlist_anim_cb(ddlist); /*Force animation complete to fix highlight selection*/ } else { lv_anim_t a; a.var = ddlist; From dfb12a31f9157d2c4236b5b39dd91476620e7392 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 05:32:21 +0200 Subject: [PATCH 313/590] send DRAG_BEGINT/END events --- src/lv_core/lv_indev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 7fcc899b0eaa..f1a24bda3881 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1159,6 +1159,10 @@ static void indev_drag_throw(lv_indev_proc_t * proc) if(lv_obj_get_drag_throw(drag_obj) == false) { proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); + lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); + if(proc->reset_query) return; /*The object might be deleted*/ + + lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); return; } @@ -1197,6 +1201,8 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ + lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); + if(proc->reset_query) return; /*The object might be deleted*/ } } /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end @@ -1205,5 +1211,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); if(proc->reset_query) return; /*The object might be deleted*/ + lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); + if(proc->reset_query) return; /*The object might be deleted*/ } } From a2cb299c0c614de20ae489eef018cc6f9c6e8f86 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 05:46:02 +0200 Subject: [PATCH 314/590] add LV_EVENT_DELETE --- src/lv_core/lv_indev.c | 2 ++ src/lv_core/lv_obj.c | 8 +++++++- src/lv_core/lv_obj.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index f1a24bda3881..fa4c594b9fe1 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -1114,6 +1114,8 @@ static void indev_drag(lv_indev_proc_t * state) if(state->types.pointer.drag_in_prog == 0) { drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); if(state->reset_query != 0) return; + lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL); + if(state->reset_query) return; /*The object might be deleted*/ } state->types.pointer.drag_in_prog = 1; diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index fdcdc9f57ed7..0cd0400dcdd9 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -379,7 +379,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; - /*Delete from the group*/ + /*Delete from the group*/ #if LV_USE_GROUP bool was_focused = false; lv_group_t * group = lv_obj_get_group(obj); @@ -410,6 +410,9 @@ lv_res_t lv_obj_del(lv_obj_t * obj) i = i_next; } + /*Let the suer free the resources used in `LV_EVENT_DELETE`*/ + lv_event_send(obj, LV_EVENT_DELETE, NULL); + /*Remove the object from parent's children list*/ lv_obj_t * par = lv_obj_get_parent(obj); if(par == NULL) { /*It is a screen*/ @@ -2202,6 +2205,9 @@ static void delete_children(lv_obj_t * obj) i = i_next; } + /*Let the suer free the resources used in `LV_EVENT_DELETE`*/ + lv_event_send(obj, LV_EVENT_DELETE, NULL); + /*Remove the animations from this object*/ #if LV_USE_ANIMATION lv_anim_del(obj, NULL); diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 13ce32bc7c93..014ded5e6867 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -98,6 +98,7 @@ enum { LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ + LV_EVENT_DELETE, }; typedef uint8_t lv_event_t; From 8f7e01fc1ab90734187261486a84e6749a6887a8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 05:57:05 +0200 Subject: [PATCH 315/590] add reserved bits to lv_obj_t --- src/lv_core/lv_obj.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index d505f137f9c1..2a856ef2f4df 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -210,15 +210,16 @@ typedef struct _lv_obj_t #endif /*Attributes and states*/ - uint8_t click : 1; /*1: Can be pressed by an input device*/ - uint8_t drag : 1; /*1: Enable the dragging*/ + uint8_t click :1; /*1: Can be pressed by an input device*/ + uint8_t drag :1; /*1: Enable the dragging*/ + uint8_t drag_throw :1; /*1: Enable throwing with drag*/ + uint8_t drag_parent :1; /*1: Parent will be dragged instead*/ + uint8_t hidden :1; /*1: Object is hidden*/ + uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/ + uint8_t opa_scale_en :1; /*1: opa_scale is set*/ + uint8_t parent_event :1; /*1: Send the object's events to the parent too. */ lv_drag_dir_t drag_dir : 2; /* Which directions the object can be dragged in */ - uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ - uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ - uint8_t hidden : 1; /*1: Object is hidden*/ - uint8_t top : 1; /*1: If the object or its children is clicked it goes to the foreground*/ - uint8_t opa_scale_en : 1; /*1: opa_scale is set*/ - uint8_t parent_event : 1; /*1: Send the object's events to the parent too. */ + uint8_t reserved :6; /*Reserved for future use*/ uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from `lv_protect_t`*/ lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ From 0ad121865c8bf3c48173aceb7d20d9c50db70f80 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 06:10:01 +0200 Subject: [PATCH 316/590] lv_page: improve repostion of new children --- src/lv_objx/lv_page.c | 20 +++++++++++++------- src/lv_objx/lv_page.h | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 6b8141bb0994..ec58ab684f77 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -768,6 +768,9 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + lv_fit_t fit_left = lv_page_get_scrl_fit_left(page); + lv_fit_t fit_top = lv_page_get_scrl_fit_top(page); + const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); lv_obj_t * child; if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/ child = lv_obj_get_child(page, NULL); @@ -776,13 +779,16 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) lv_obj_t * tmp = child; child = lv_obj_get_child(page, child); /*Get the next child before move this*/ - /*Reposition the child to take padding into account*/ - const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - tmp->coords.x1 += style->body.padding.left; - tmp->coords.x2 += style->body.padding.left; - tmp->coords.y1 += style->body.padding.top; - tmp->coords.y2 += style->body.padding.top; - + /* Reposition the child to take padding into account (Only if it's on (0;0) now) + * It's required to keep new the object on the same coordinate if FIT is enabled.*/ + if((tmp->coords.x1 == page->coords.x1) && (fit_left == LV_FIT_TIGHT || fit_left == LV_FIT_FILL)) { + tmp->coords.x1 += style->body.padding.left; + tmp->coords.x2 += style->body.padding.left; + } + if((tmp->coords.y1 == page->coords.y1) && (fit_top == LV_FIT_TIGHT || fit_top == LV_FIT_FILL)) { + tmp->coords.y1 += style->body.padding.top; + tmp->coords.y2 += style->body.padding.top; + } lv_obj_set_parent(tmp, ext->scrl); } else { child = lv_obj_get_child(page, child); diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 7ca1c4482ce5..adda367bb239 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -340,7 +340,7 @@ static inline lv_fit_t lv_page_get_scrl_fit_right(const lv_obj_t * page) * @param page pointer to a page object * @return an element of `lv_fit_t` */ -static inline lv_fit_t lv_page_get_scrl_get_fit_top(const lv_obj_t * page) +static inline lv_fit_t lv_page_get_scrl_fit_top(const lv_obj_t * page) { return lv_cont_get_fit_top(lv_page_get_scrl(page)); } From a983dfa80a879a5010f1e93c005f91a3ce1050b8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 06:40:06 +0200 Subject: [PATCH 317/590] lv_tabview: realaign the tabview on every new tab --- src/lv_objx/lv_tabview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d9b89b0c83f2..9f54a6c2bc82 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -308,9 +308,10 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) /*Set the first btn as active*/ if(ext->tab_cnt == 1) { ext->tab_cur = 0; - tabview_realign(tabview); /*To set the proper btns height*/ } + tabview_realign(tabview); /*Set the size of the pages, tab buttons and indicator*/ + lv_tabview_set_tab_act(tabview, ext->tab_cur, false); return h; From 9fc1423ef7b26ad4020a3023074246ec5843d9cb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 07:15:39 +0200 Subject: [PATCH 318/590] ddlist: fix setting of width settings --- src/lv_objx/lv_ddlist.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 811108a6cb1c..887f37e4ba43 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -171,11 +171,18 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) for(i = 0; options[i] != '\0'; i++) { if(options[i] == '\n') ext->option_cnt++; } - ext->option_cnt++; /*Last option in the at row*/ + ext->option_cnt++; /*Last option has no `\n`*/ ext->sel_opt_id = 0; ext->sel_opt_id_ori = 0; lv_label_set_text(ext->label, options); + + /*Set the TIGHT fit horizontally the set the width the content*/ + lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); + + /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/ + lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, LV_FIT_TIGHT); + lv_ddlist_refr_size(ddlist, false); } From 850693a8407b67e193e976b3cec66dd1d5826761 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 07:28:48 +0200 Subject: [PATCH 319/590] ddlist label align fixes --- src/lv_objx/lv_ddlist.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 887f37e4ba43..a16e549d4d7f 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -177,11 +177,17 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) lv_label_set_text(ext->label, options); - /*Set the TIGHT fit horizontally the set the width the content*/ - lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); - - /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/ - lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, LV_FIT_TIGHT); + switch(lv_label_get_align(ext->label)) { + case LV_LABEL_ALIGN_LEFT: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + break; + case LV_LABEL_ALIGN_CENTER: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); + break; + case LV_LABEL_ALIGN_RIGHT: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + break; + } lv_ddlist_refr_size(ddlist, false); } @@ -231,12 +237,6 @@ void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit) { lv_cont_set_fit2(ddlist, fit, LV_FIT_NONE); - if(fit == LV_FIT_NONE) { - lv_page_set_scrl_fit2(ddlist, LV_FIT_FLOOD, LV_FIT_NONE); - } else { - lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_NONE); - } - lv_ddlist_refr_size(ddlist, false); } @@ -307,6 +307,18 @@ void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); lv_label_set_align(ext->label, align); + switch(align) { + case LV_LABEL_ALIGN_LEFT: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + break; + case LV_LABEL_ALIGN_CENTER: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); + break; + case LV_LABEL_ALIGN_RIGHT: + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + break; + } + } /*===================== * Getter functions From 5353dae0274b912ae2bbe7acd19e6ac16c16863a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 19 Apr 2019 07:37:54 +0200 Subject: [PATCH 320/590] lv_kb: fix sending APPLY and CANCEL events --- src/lv_objx/lv_kb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index bb0279ab9627..0e54a6baf987 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -344,7 +344,7 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) lv_btnm_set_ctrl_map(kb, kb_ctrl_spec_map); return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { - if(kb->event_cb) { + if(kb->event_cb != lv_kb_def_event_cb) { lv_event_send(kb, LV_EVENT_CANCEL, NULL); } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ @@ -352,7 +352,7 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) } return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb) + if(kb->event_cb != lv_kb_def_event_cb) lv_event_send(kb, LV_EVENT_APPLY, NULL); else lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ From 4454683ff0ccc836be1c88b9df05a3d3b6b64ef9 Mon Sep 17 00:00:00 2001 From: seyyah Date: Fri, 19 Apr 2019 11:35:02 +0300 Subject: [PATCH 321/590] FIXME note added --- src/lv_objx/lv_tabview.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 9f54a6c2bc82..5e34723456f8 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -248,6 +248,10 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; + /* FIXME: It is not possible yet to switch tab button position from/to top/bottom from/to left/right at runtime. + * Method: clean extra \n when switch from LV_TABVIEW_BTNS_POS_LEFT or LV_TABVIEW_BTNS_POS_RIGHT + * to LV_TABVIEW_BTNS_POS_TOP or LV_TABVIEW_BTNS_POS_BOTTOM. + */ switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: From 7419900508ce99cc53183b24598ec0c4aa58bac7 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 19 Apr 2019 15:20:51 -0400 Subject: [PATCH 322/590] Minor fixes for compiler warnings/-Werrors --- lv_conf_template.h | 9 ++++++--- src/lv_misc/lv_area.c | 2 +- src/lv_misc/lv_area.h | 6 +++++- src/lv_objx/lv_label.c | 30 +++++++++++++++--------------- src/lv_objx/lv_label.h | 2 +- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index fe16371be358..ee27328d3abc 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -147,7 +147,6 @@ typedef void * lv_group_user_data_t; /*1: Add separate `user_data` for every callback*/ #define LV_USE_USER_DATA_MULTI 0 - /*===================== * Compiler settings *====================*/ @@ -157,6 +156,11 @@ typedef void * lv_group_user_data_t; /* Define a custom attribute to `lv_task_handler` function */ #define LV_ATTRIBUTE_TASK_HANDLER +/* With size optimization (-Os) the compiler might not align data to + * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/ +#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4))) + + /* 1: Variable length array is supported*/ #define LV_COMPILER_VLA_SUPPORTED 1 @@ -176,7 +180,7 @@ typedef void * lv_group_user_data_t; #endif /*LV_TICK_CUSTOM*/ typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/ -typedef void * lv_indev_drv_user_data_t; /*Type of user data in the display driver*/ +typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/ /*================ * Log settings @@ -439,7 +443,6 @@ typedef void * lv_obj_user_data_t; /*================== * Non-user section *==================*/ - #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ # define _CRT_SECURE_NO_WARNINGS #endif diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index 7b9918c3e03b..c2084e4e4185 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -154,7 +154,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) return is_on; } -#if LV_USE_EXTENDED_CLICK_AREA_TINY +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY /** * Check if a point is on an area * @param a_p pointer to an area diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index bf81e17c1fb9..008356d983e5 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -28,6 +28,10 @@ extern "C" { #define LV_COORD_MAX (16383) /*To avoid overflow don't let the max [-32,32k] range */ #define LV_COORD_MIN (-16384) +#define LV_EXT_CLICK_AREA_OFF 0 +#define LV_EXT_CLICK_AREA_TINY 1 +#define LV_EXT_CLICK_AREA_FULL 2 + /********************** * TYPEDEFS **********************/ @@ -145,7 +149,7 @@ void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * */ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p); -#if LV_USE_EXTENDED_CLICK_AREA_TINY +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY /** * Check if a point is on an area * @param a_p pointer to an area diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 5cdad61476e4..5d7c610cd1f6 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -97,7 +97,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; #endif - ext->dot_tmp_ptr = NULL; + ext->dt.dot_tmp_ptr = NULL; ext->dot_tmp_alloc = 0; lv_obj_set_design_cb(new_label, lv_label_design); @@ -130,12 +130,12 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) memcpy(ext->text, copy_ext->text, lv_mem_get_size(copy_ext->text)); } - if(copy_ext->dot_tmp_alloc && copy_ext->dot_tmp_ptr ){ - int len = strlen(copy_ext->dot_tmp_ptr); - lv_label_set_dot_tmp(new_label, ext->dot_tmp_ptr, len); + if(copy_ext->dot_tmp_alloc && copy_ext->dt.dot_tmp_ptr ){ + int len = strlen(copy_ext->dt.dot_tmp_ptr); + lv_label_set_dot_tmp(new_label, ext->dt.dot_tmp_ptr, len); } else{ - memcpy(ext->dot_tmp, copy_ext->dot_tmp, sizeof(ext->dot_tmp)); + memcpy(ext->dt.dot_tmp, copy_ext->dt.dot_tmp, sizeof(ext->dt.dot_tmp)); } ext->dot_tmp_alloc = copy_ext->dot_tmp_alloc; ext->dot_end = copy_ext->dot_end; @@ -1119,19 +1119,19 @@ static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ if( len > sizeof(char *) ){ /* Memory needs to be allocated. Allocates an additional byte * for a NULL-terminator so it can be copied. */ - ext->dot_tmp_ptr = lv_mem_alloc(len + 1); - if( ext->dot_tmp_ptr == NULL ){ + ext->dt.dot_tmp_ptr = lv_mem_alloc(len + 1); + if( ext->dt.dot_tmp_ptr == NULL ){ LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr"); return false; } - memcpy(ext->dot_tmp_ptr, data, len); - ext->dot_tmp_ptr[len]='\0'; + memcpy(ext->dt.dot_tmp_ptr, data, len); + ext->dt.dot_tmp_ptr[len]='\0'; ext->dot_tmp_alloc = true; } else { /* Characters can be directly stored in object */ ext->dot_tmp_alloc = false; - memcpy(ext->dot_tmp, data, len); + memcpy(ext->dt.dot_tmp, data, len); } return true; } @@ -1144,10 +1144,10 @@ static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ static char * lv_label_get_dot_tmp(lv_obj_t *label){ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( ext->dot_tmp_alloc ){ - return ext->dot_tmp_ptr; + return ext->dt.dot_tmp_ptr; } else{ - return ext->dot_tmp; + return ext->dt.dot_tmp; } } @@ -1158,11 +1158,11 @@ static char * lv_label_get_dot_tmp(lv_obj_t *label){ */ static void lv_label_dot_tmp_free(lv_obj_t *label){ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( ext->dot_tmp_alloc && ext->dot_tmp_ptr ){ - lv_mem_free(ext->dot_tmp_ptr); + if( ext->dot_tmp_alloc && ext->dt.dot_tmp_ptr ){ + lv_mem_free(ext->dt.dot_tmp_ptr); } ext->dot_tmp_alloc = false; - ext->dot_tmp_ptr = NULL; + ext->dt.dot_tmp_ptr = NULL; } #endif diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index cd2e25a9e36f..a74fc4de1e22 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -66,7 +66,7 @@ typedef struct union{ char * dot_tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ char dot_tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ - }; + } dt; uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ From d6ef684867083aa5890ce7c096baee98711a3bc6 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 19 Apr 2019 15:23:41 -0400 Subject: [PATCH 323/590] Fix accidental removal of newlines from lv_conf_template.h --- lv_conf_template.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lv_conf_template.h b/lv_conf_template.h index ee27328d3abc..a288e3bbbb98 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -147,6 +147,7 @@ typedef void * lv_group_user_data_t; /*1: Add separate `user_data` for every callback*/ #define LV_USE_USER_DATA_MULTI 0 + /*===================== * Compiler settings *====================*/ @@ -443,6 +444,7 @@ typedef void * lv_obj_user_data_t; /*================== * Non-user section *==================*/ + #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ # define _CRT_SECURE_NO_WARNINGS #endif From cdb6f1fdd7576d8a2a343aba7f1a4d84c1b220f0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 20 Apr 2019 06:04:38 +0200 Subject: [PATCH 324/590] lv_btnm: add comments --- src/lv_objx/lv_btnm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index cdbcc47fad56..09b5bb687ff8 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -42,7 +42,7 @@ enum { LV_BTNM_CTRL_INACTIVE = 0x0020, LV_BTNM_CTRL_TGL_ENABLE = 0x0040, LV_BTNM_CTRL_TGL_STATE = 0x0080, - LV_BTNM_CTRL_CLICK_TRIG = 0x0100, + LV_BTNM_CTRL_CLICK_TRIG = 0x0100, /*1: Send LV_EVENT_SELECTED on CLICK, 0: Send LV_EVENT_SELECTED on PRESS*/ }; typedef uint16_t lv_btnm_ctrl_t; From 755f68c87ba6e945b7f7481fe4489701f49a69e0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 20 Apr 2019 06:24:00 +0200 Subject: [PATCH 325/590] remove HOVER events --- src/lv_core/lv_obj.h | 2 -- src/lv_objx/lv_page.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2a856ef2f4df..657a83583f97 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -85,8 +85,6 @@ enum { `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ LV_EVENT_CLICKED, /*Called on release if not dragged (regardless to long press)*/ LV_EVENT_RELEASED, /*Called in every cases when the object has been released*/ - LV_EVENT_LONG_HOVER_IN, /*TODO*/ - LV_EVENT_LONG_HOVER_OUT, /*TODO*/ LV_EVENT_DRAG_BEGIN, LV_EVENT_DRAG_END, LV_EVENT_DRAG_THROW_BEGIN, diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index ec58ab684f77..fc8e2ddfd38b 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -1059,8 +1059,6 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) event == LV_EVENT_CLICKED || event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || - event == LV_EVENT_LONG_HOVER_IN || - event == LV_EVENT_LONG_HOVER_OUT || event == LV_EVENT_FOCUSED || event == LV_EVENT_DEFOCUSED) { From b5898a750e2881bd5438c2297ee81eb6b9630e2c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 20 Apr 2019 06:37:06 +0200 Subject: [PATCH 326/590] ddlist: fiy scrollable width --- src/lv_objx/lv_ddlist.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index a16e549d4d7f..bf912733397c 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -43,6 +43,7 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); +static void lv_ddlist_refr_width(lv_obj_t* ddlist); static void lv_ddlist_anim_cb(lv_obj_t * ddlist); static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height); @@ -177,6 +178,8 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) lv_label_set_text(ext->label, options); + lv_ddlist_refr_width(ddlist); + switch(lv_label_get_align(ext->label)) { case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); @@ -292,7 +295,10 @@ void lv_ddlist_set_style(lv_obj_t * ddlist, lv_ddlist_style_t type, const lv_sty lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); switch(type) { - case LV_DDLIST_STYLE_BG: lv_page_set_style(ddlist, LV_PAGE_STYLE_BG, style); break; + case LV_DDLIST_STYLE_BG: + lv_page_set_style(ddlist, LV_PAGE_STYLE_BG, style); + lv_ddlist_refr_width(ddlist); + break; case LV_DDLIST_STYLE_SB: lv_page_set_style(ddlist, LV_PAGE_STYLE_SB, style); break; case LV_DDLIST_STYLE_SEL: ext->sel_style = style; @@ -937,4 +943,17 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2); } +/** + * Be sure the width of the scrollable exactly fits the ddlist + * @param ddlist pointer to a ddlist + */ +static void lv_ddlist_refr_width(lv_obj_t* ddlist) +{ + /*Set the TIGHT fit horizontally the set the width to the content*/ + lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); + + /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/ + lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, LV_FIT_TIGHT); +} + #endif From 95fc629aa515cb1e08cee836e9fdb9c92c69c492 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 20 Apr 2019 09:05:36 -0400 Subject: [PATCH 327/590] Rename "dot" union in lv_label --- src/lv_objx/lv_label.c | 30 +++++++++++++++--------------- src/lv_objx/lv_label.h | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 5d7c610cd1f6..585f69e82b39 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -97,7 +97,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; #endif - ext->dt.dot_tmp_ptr = NULL; + ext->dot.tmp_ptr = NULL; ext->dot_tmp_alloc = 0; lv_obj_set_design_cb(new_label, lv_label_design); @@ -130,12 +130,12 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) memcpy(ext->text, copy_ext->text, lv_mem_get_size(copy_ext->text)); } - if(copy_ext->dot_tmp_alloc && copy_ext->dt.dot_tmp_ptr ){ - int len = strlen(copy_ext->dt.dot_tmp_ptr); - lv_label_set_dot_tmp(new_label, ext->dt.dot_tmp_ptr, len); + if(copy_ext->dot_tmp_alloc && copy_ext->dot.tmp_ptr ){ + int len = strlen(copy_ext->dot.tmp_ptr); + lv_label_set_dot_tmp(new_label, ext->dot.tmp_ptr, len); } else{ - memcpy(ext->dt.dot_tmp, copy_ext->dt.dot_tmp, sizeof(ext->dt.dot_tmp)); + memcpy(ext->dot.tmp, copy_ext->dot.tmp, sizeof(ext->dot.tmp)); } ext->dot_tmp_alloc = copy_ext->dot_tmp_alloc; ext->dot_end = copy_ext->dot_end; @@ -1119,19 +1119,19 @@ static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ if( len > sizeof(char *) ){ /* Memory needs to be allocated. Allocates an additional byte * for a NULL-terminator so it can be copied. */ - ext->dt.dot_tmp_ptr = lv_mem_alloc(len + 1); - if( ext->dt.dot_tmp_ptr == NULL ){ + ext->dot.tmp_ptr = lv_mem_alloc(len + 1); + if( ext->dot.tmp_ptr == NULL ){ LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr"); return false; } - memcpy(ext->dt.dot_tmp_ptr, data, len); - ext->dt.dot_tmp_ptr[len]='\0'; + memcpy(ext->dot.tmp_ptr, data, len); + ext->dot.tmp_ptr[len]='\0'; ext->dot_tmp_alloc = true; } else { /* Characters can be directly stored in object */ ext->dot_tmp_alloc = false; - memcpy(ext->dt.dot_tmp, data, len); + memcpy(ext->dot.tmp, data, len); } return true; } @@ -1144,10 +1144,10 @@ static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ static char * lv_label_get_dot_tmp(lv_obj_t *label){ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if( ext->dot_tmp_alloc ){ - return ext->dt.dot_tmp_ptr; + return ext->dot.tmp_ptr; } else{ - return ext->dt.dot_tmp; + return ext->dot.tmp; } } @@ -1158,11 +1158,11 @@ static char * lv_label_get_dot_tmp(lv_obj_t *label){ */ static void lv_label_dot_tmp_free(lv_obj_t *label){ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( ext->dot_tmp_alloc && ext->dt.dot_tmp_ptr ){ - lv_mem_free(ext->dt.dot_tmp_ptr); + if( ext->dot_tmp_alloc && ext->dot.tmp_ptr ){ + lv_mem_free(ext->dot.tmp_ptr); } ext->dot_tmp_alloc = false; - ext->dt.dot_tmp_ptr = NULL; + ext->dot.tmp_ptr = NULL; } #endif diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index a74fc4de1e22..51affba352b3 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -64,9 +64,9 @@ typedef struct /*New data for this type */ char * text; /*Text of the label*/ union{ - char * dot_tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ - char dot_tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ - } dt; + char * tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ + char tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ + } dot; uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ From e9d2191463cb4425ad9f07d90f19b751190ff1d3 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 20 Apr 2019 09:07:54 -0400 Subject: [PATCH 328/590] Remove lv_area_ext_is_point_on --- src/lv_misc/lv_area.c | 23 ----------------------- src/lv_misc/lv_area.h | 16 ---------------- 2 files changed, 39 deletions(-) diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index c2084e4e4185..e890bb7b03dc 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -154,29 +154,6 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) return is_on; } -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY -/** - * Check if a point is on an area - * @param a_p pointer to an area - * @param p_p pointer to a point - * @param ext_hor extended horizontal padding - * @param ext_ver extended horizontal padding - * @return false:the point is out of the area - */ -bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, uint8_t ext_hor, uint8_t ext_ver) -{ - bool is_on = false; - - if(( (p_p->x + ext_hor) >= a_p->x1 && p_p->x <= (a_p->x2 + ext_hor) ) && - ( (p_p->y + ext_ver) >= a_p->y1 && p_p->y <= (a_p->y2 + ext_ver)) ) { - is_on = true; - } - - return is_on; -} - -#endif - /** * Check if two area has common parts * @param a1_p pointer to an area. diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index 008356d983e5..133f4bcac655 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -28,10 +28,6 @@ extern "C" { #define LV_COORD_MAX (16383) /*To avoid overflow don't let the max [-32,32k] range */ #define LV_COORD_MIN (-16384) -#define LV_EXT_CLICK_AREA_OFF 0 -#define LV_EXT_CLICK_AREA_TINY 1 -#define LV_EXT_CLICK_AREA_FULL 2 - /********************** * TYPEDEFS **********************/ @@ -149,18 +145,6 @@ void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * */ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p); -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY -/** - * Check if a point is on an area - * @param a_p pointer to an area - * @param p_p pointer to a point - * @param ext_hor extended horizontal padding - * @param ext_ver extended horizontal padding - * @return false:the point is out of the area - */ -bool lv_area_ext_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, uint8_t ext_hor, uint8_t ext_ver); -#endif - /** * Check if two area has common parts * @param a1_p pointer to an area. From e49de2294124bdd959b256f47201bcbdc10dc5c2 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sat, 20 Apr 2019 18:34:56 -0700 Subject: [PATCH 329/590] lv_draw_line: Fixed a warning by wrapping unused antialiasing variables in LV_ANTIALIAS --- src/lv_draw/lv_draw_line.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index dc2da5d515f2..5ede6ba42525 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -236,7 +236,9 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; +#if LV_ANTIALIAS bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); +#endif lv_point_t vect_main, vect_norm; vect_main.x = main_line->p2.x - main_line->p1.x; vect_main.y = main_line->p2.y - main_line->p1.y; From ac89e880a7046fffed88397f16d63dc0d394bb44 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 05:21:35 +0200 Subject: [PATCH 330/590] font: start to rework --- src/lv_draw/lv_draw_basic.c | 2 +- src/lv_fonts/lv_font_dejavu_20.c | 9124 +----------------------------- src/lv_misc/lv_font.c | 113 +- src/lv_misc/lv_font.h | 39 +- 4 files changed, 94 insertions(+), 9184 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 144fc4733446..958fcac5549f 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -273,7 +273,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv default: return; /*Invalid bpp. Can't render the letter*/ } - const uint8_t * map_p = lv_font_get_bitmap(font_p, letter); + const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter); if(map_p == NULL) return; diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index de3f09ad5aa1..597d0417d71a 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if LV_USE_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ +#if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -9,402 +9,11 @@ /*Store the image of the letters (glyph)*/ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { -#if LV_USE_FONT_DEJAVU_20 == 1 /*Unicode: U+0020 ( ) , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+0021 (!) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0022 (") , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0xcc, //@@..@@ - 0xcc, //@@..@@ - 0xcc, //@@..@@ - 0xcc, //@@..@@ - 0xcc, //@@..@@ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+0023 (#) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x04, 0x40, //.....@..+@.. - 0x04, 0x40, //....+@..+@.. - 0x0c, 0xc0, //....%@..%%.. - 0x0c, 0x80, //....@%..@+.. - 0x7f, 0xf0, //.@@@@@@@@@@@ - 0x7f, 0xf0, //.@@@@@@@@@@@ - 0x09, 0x80, //...+@..%@... - 0x19, 0x00, //...@%..@+... - 0xff, 0xe0, //@@@@@@@@@@@. - 0xff, 0xe0, //@@@@@@@@@@@. - 0x13, 0x00, //..+@..%@.... - 0x33, 0x00, //..%%..%%.... - 0x32, 0x00, //..@%..@+.... - 0x22, 0x00, //..@+..@..... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0024 ($) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x08, 0x00, //....@.... - 0x08, 0x00, //....@.... - 0x3e, 0x00, //.+%@@@%.. - 0x7f, 0x00, //+@@@@@@@. - 0xe9, 0x00, //@@%.@.+@. - 0xc8, 0x00, //@@..@.... - 0xf8, 0x00, //%@@%@.... - 0x7e, 0x00, //.@@@@@@+. - 0x0f, 0x00, //...+@@@@+ - 0x09, 0x80, //....@.+@@ - 0x09, 0x80, //....@..@@ - 0x8b, 0x80, //@+..@.%@@ - 0xff, 0x00, //@@@@@@@@+ - 0x7e, 0x00, //.%@@@@%+. - 0x08, 0x00, //....@.... - 0x08, 0x00, //....@.... - 0x08, 0x00, //....@.... - 0x00, 0x00, //......... - - - /*Unicode: U+0025 (%) , Width: 15 */ - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x78, 0x10, //.%@@%.....+@... - 0x48, 0x20, //+@++@+....@.... - 0xcc, 0x60, //@@..@@...%%.... - 0xcc, 0x40, //@@..@@...@..... - 0xcc, 0x80, //@@..@@..@+..... - 0xc8, 0x80, //+@++@+.+%...... - 0x79, 0x3c, //.%@@%..@..%@@%. - 0x02, 0x24, //......%+.+@++@+ - 0x02, 0x66, //.....+@..@@..@@ - 0x04, 0x66, //.....@...@@..@@ - 0x0c, 0x66, //....%%...@@..@@ - 0x08, 0x24, //....@....+@++@+ - 0x10, 0x3c, //...@+.....%@@%. - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - - - /*Unicode: U+0026 (&) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x0f, 0x00, //...+@@@%+... - 0x1f, 0x80, //..+@@@@@@... - 0x30, 0x80, //..@@+..+%... - 0x30, 0x00, //..@@........ - 0x38, 0x00, //..%@%....... - 0x3c, 0x00, //..%@@%...... - 0x7e, 0x60, //.%@%@@%..@@. - 0xc7, 0x60, //%@+.+@@%+@%. - 0xc3, 0xc0, //@@...+@@@@.. - 0xc1, 0x80, //@@+...+@@+.. - 0xe1, 0xc0, //%@@+..+@@%.. - 0x7f, 0xe0, //.@@@@@@@@@%. - 0x3e, 0x70, //..%@@@%.+@@% - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0027 (') , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0028 (() , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x30, //..%@ - 0x20, //..@+ - 0x60, //.%@. - 0x60, //.@%. - 0x40, //+@+. - 0xc0, //%@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //%@.. - 0x40, //+@+. - 0x60, //.@%. - 0x60, //.%@. - 0x20, //..@+ - 0x30, //..%@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+0029 ()) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xc0, //@%.. - 0x40, //+@.. - 0x60, //.@%. - 0x60, //.%@. - 0x20, //.+@+ - 0x30, //..@% - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@% - 0x20, //.+@+ - 0x60, //.%@. - 0x60, //.@%. - 0x40, //+@.. - 0xc0, //@%.. - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+002a (*) , Width: 7 */ - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x10, //...@... - 0x92, //%..@..% - 0x54, //+@+@+@+ - 0x38, //..@@@.. - 0x38, //..@@@.. - 0x54, //+@+@+@+ - 0x92, //%..@..% - 0x10, //...@... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - - - /*Unicode: U+002b (+) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0xff, 0xf0, //@@@@@@@@@@@@ - 0xff, 0xf0, //@@@@@@@@@@@@ - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+002c (,) , Width: 3 */ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x60, //.@@ - 0x60, //.@@ - 0x40, //+@. - 0x80, //@+. - 0x00, //... - 0x00, //... - - - /*Unicode: U+002d (-) , Width: 5 */ - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0xf8, //@@@@@ - 0xf8, //@@@@@ - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - 0x00, //..... - - - /*Unicode: U+002e (.) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+002f (/) , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x0c, //....@@ - 0x0c, //...+@% - 0x18, //...%@+ - 0x18, //...@@. - 0x18, //...@@. - 0x38, //..+@%. - 0x30, //..@@+. - 0x30, //..@@.. - 0x30, //.+@@.. - 0x70, //.%@%.. - 0x60, //.@@+.. - 0x60, //.@@... - 0x60, //+@%... - 0xc0, //%@+... - 0xc0, //@@.... - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+0030 (0) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x1c, 0x00, //..+@@@+.. - 0x7f, 0x00, //.%@@@@@%. - 0x63, 0x00, //+@@+.+@@+ - 0xc1, 0x80, //%@+...+@% - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //%@+...+@% - 0x63, 0x00, //+@@+.+@@+ - 0x7f, 0x00, //.%@@@@@%. - 0x3e, 0x00, //..+@@@+.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - /*Unicode: U+0031 (1) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ + + /*3 rows*/ 0x38, //.+@@@... 0xf8, //@@@@@... 0x98, //@+.@@... @@ -418,39 +27,11 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { 0x18, //...@@... 0xff, //@@@@@@@@ 0xff, //@@@@@@@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0032 (2) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x7c, 0x00, //.%@@@%... - 0xfe, 0x00, //@@@@@@@+. - 0x87, 0x00, //@+...@@@. - 0x03, 0x00, //......@@. - 0x03, 0x00, //......@@. - 0x06, 0x00, //.....%@+. - 0x06, 0x00, //....+@@.. - 0x0c, 0x00, //...+@@... - 0x18, 0x00, //..+@@+... - 0x30, 0x00, //.+@@+.... - 0x60, 0x00, //+@@+..... - 0xff, 0x00, //@@@@@@@@. - 0xff, 0x00, //@@@@@@@@. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... + /*4 rows*/ /*Unicode: U+0033 (3) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... + /*3 rows*/ 0x7e, 0x00, //.%@@@@%.. 0xff, 0x00, //@@@@@@@@+ 0x83, 0x80, //@+....%@@ @@ -464,315 +45,11 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { 0x83, 0x80, //%+...+@@% 0xff, 0x00, //@@@@@@@@. 0x7e, 0x00, //.%@@@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0034 (4) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x07, 0x00, //.....%@@.. - 0x07, 0x00, //....+@@@.. - 0x0b, 0x00, //....@+@@.. - 0x1b, 0x00, //...%@.@@.. - 0x13, 0x00, //..+@..@@.. - 0x23, 0x00, //..@+..@@.. - 0x63, 0x00, //.@@...@@.. - 0x43, 0x00, //+@....@@.. - 0xff, 0xc0, //@@@@@@@@@@ - 0xff, 0xc0, //@@@@@@@@@@ - 0x03, 0x00, //......@@.. - 0x03, 0x00, //......@@.. - 0x03, 0x00, //......@@.. - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0035 (5) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x7e, //.@@@@@@. - 0x7e, //.@@@@@@. - 0x60, //.@@..... - 0x60, //.@@..... - 0x7c, //.@@@@@.. - 0x7e, //.@@@@@@. - 0x47, //.%...@@% - 0x03, //......@@ - 0x03, //......@@ - 0x03, //......@@ - 0x87, //%...+@@% - 0xfe, //@@@@@@@. - 0x7c, //.%@@@%.. - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0036 (6) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x1e, 0x00, //...%@@@+. - 0x3f, 0x00, //.+@@@@@@. - 0x71, 0x00, //.@@%...%. - 0xe0, 0x00, //+@@...... - 0xc0, 0x00, //@@+...... - 0xde, 0x00, //@@.%@@%.. - 0xff, 0x00, //@@%@@@@@. - 0xe3, 0x80, //@@%...%@% - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //%@.....@@ - 0x63, 0x80, //+@%...%@% - 0x7f, 0x00, //.%@@@@@@. - 0x1e, 0x00, //..+@@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0037 (7) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0x06, //.....%@+ - 0x06, //.....@@. - 0x06, //....+@@. - 0x0c, //....%@+. - 0x0c, //....@@.. - 0x0c, //....@@.. - 0x1c, //...%@%.. - 0x18, //...@@... - 0x18, //...@@... - 0x38, //..%@%... - 0x30, //..@@+... - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0038 (8) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x3e, 0x00, //.+%@@@%+. - 0x7f, 0x00, //+@@@@@@@+ - 0xe3, 0x80, //@@%...%@@ - 0xc1, 0x80, //@@.....@@ - 0xe3, 0x80, //%@%...%@% - 0x3e, 0x00, //.+@@@@@+. - 0x7f, 0x00, //.%@@@@@%. - 0xe3, 0x80, //%@%...%@% - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xe3, 0x80, //@@%...%@@ - 0x7f, 0x00, //+@@@@@@@+ - 0x3e, 0x00, //..%@@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0039 (9) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x3c, 0x00, //..%@@@+.. - 0x7f, 0x00, //.@@@@@@%. - 0xe3, 0x00, //%@%...%@. - 0xc1, 0x80, //@@.....@% - 0xc1, 0x80, //@@.....@@ - 0xe3, 0x80, //%@%...%@@ - 0x7f, 0x80, //.@@@@@%@@ - 0x3d, 0x80, //..%@@%.@@ - 0x01, 0x80, //......+@@ - 0x03, 0x00, //......@@+ - 0x47, 0x00, //.%...%@@. - 0x7e, 0x00, //.@@@@@@+. - 0x3c, 0x00, //.+@@@%... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+003a (:) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+003b (;) , Width: 3 */ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x60, //.@@ - 0x60, //.@@ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x60, //.@@ - 0x60, //.@@ - 0x40, //+@. - 0x80, //@+. - 0x00, //... - 0x00, //... - - - /*Unicode: U+003c (<) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x20, //.........+@ - 0x01, 0xe0, //.......%@@@ - 0x07, 0xc0, //....+@@@@%+ - 0x3e, 0x00, //.+%@@@@+... - 0xf8, 0x00, //@@@@%+..... - 0xf8, 0x00, //@@@@%+..... - 0x3e, 0x00, //.+%@@@@+... - 0x07, 0xc0, //....+@@@@%+ - 0x01, 0xe0, //......+%@@@ - 0x00, 0x20, //.........+@ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+003d (=) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0xff, 0xe0, //@@@@@@@@@@@ - 0xff, 0xe0, //@@@@@@@@@@@ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0xff, 0xe0, //@@@@@@@@@@@ - 0xff, 0xe0, //@@@@@@@@@@@ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+003e (>) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x80, 0x00, //@+......... - 0xf0, 0x00, //@@@%....... - 0x7c, 0x00, //+%@@@@+.... - 0x0f, 0x80, //...+@@@@%+. - 0x03, 0xe0, //.....+%@@@@ - 0x03, 0xe0, //.....+%@@@@ - 0x0f, 0x80, //...+@@@@%+. - 0x7c, 0x00, //+%@@@@+.... - 0xf0, 0x00, //@@@%+...... - 0x80, 0x00, //@+......... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+003f (?) , Width: 7 */ - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x78, //.%@@@+. - 0xfc, //@@@@@@+ - 0x8e, //@+..%@@ - 0x06, //.....@@ - 0x06, //....+@% - 0x0c, //....@@. - 0x18, //...@@.. - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x00, //....... - 0x30, //..@@... - 0x30, //..@@... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - - - /*Unicode: U+0040 (@) , Width: 16 */ - 0x00, 0x00, //................ - 0x00, 0x00, //................ - 0x00, 0x00, //................ - 0x07, 0xe0, //.....%@@@@%+.... - 0x1f, 0xf8, //...%@@@@@@@@@+.. - 0x3c, 0x1c, //..%@@%....+%@@+. - 0x70, 0x06, //.%@@........+@@. - 0x60, 0x03, //.@@..........+@% - 0xe3, 0x63, //%@%...@@.@@...@@ - 0xc7, 0xe3, //@@...%@@@@@...@@ - 0xc6, 0x63, //@@...@@..@@..+@@ - 0xc6, 0x66, //@@...@@..@@.+@@+ - 0xc7, 0xfc, //@@...%@@@@@@@@+. - 0xe3, 0x70, //%@%...@@.@@%+... - 0x60, 0x00, //.@@............. - 0x70, 0x00, //.%@@............ - 0x3c, 0x30, //..@@@+....+@.... - 0x1f, 0xf0, //...%@@@@@@@@.... - 0x07, 0xc0, //....+%@@@%+..... - 0x00, 0x00, //................ + /*4 rows*/ /*Unicode: U+0041 (A) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ + /*3 rows*/ 0x06, 0x00, //.....@@..... 0x06, 0x00, //....+@@+.... 0x0f, 0x00, //....@@@@.... @@ -786,732 +63,11 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { 0x60, 0x60, //.@@......@@. 0x60, 0x60, //+@%......%@+ 0xc0, 0x30, //@@+......+@@ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0042 (B) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0xfc, 0x00, //@@@@@@+.. - 0xff, 0x00, //@@@@@@@%. - 0xc3, 0x00, //@@...+@@. - 0xc3, 0x00, //@@....@@. - 0xc3, 0x00, //@@...+@%. - 0xfe, 0x00, //@@@@@@%.. - 0xfe, 0x00, //@@@@@@@+. - 0xc3, 0x00, //@@....%@+ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc3, 0x80, //@@....%@@ - 0xff, 0x00, //@@@@@@@@+ - 0xfe, 0x00, //@@@@@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0043 (C) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x0f, 0xc0, //...+%@@@@%. - 0x3f, 0xe0, //..@@@@@@@@@ - 0x70, 0x20, //.@@@+....+@ - 0x60, 0x00, //+@@........ - 0xc0, 0x00, //%@+........ - 0xc0, 0x00, //@@......... - 0xc0, 0x00, //@@......... - 0xc0, 0x00, //@@......... - 0xc0, 0x00, //%@+........ - 0x60, 0x00, //+@@........ - 0x70, 0x20, //.@@@+....+@ - 0x3f, 0xe0, //..@@@@@@@@@ - 0x0f, 0xc0, //...+%@@@@%. - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+0044 (D) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0xfe, 0x00, //@@@@@@%+... - 0xff, 0x80, //@@@@@@@@@.. - 0xc1, 0xc0, //@@....+@@@. - 0xc0, 0xc0, //@@......@@+ - 0xc0, 0x60, //@@......+@@ - 0xc0, 0x60, //@@.......@@ - 0xc0, 0x60, //@@.......@@ - 0xc0, 0x60, //@@.......@@ - 0xc0, 0x60, //@@......+@@ - 0xc0, 0xc0, //@@......@@+ - 0xc1, 0xc0, //@@....+@@@. - 0xff, 0x80, //@@@@@@@@@.. - 0xfe, 0x00, //@@@@@@%+... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+0045 (E) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0046 (F) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xfe, //@@@@@@@. - 0xfe, //@@@@@@@. - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0047 (G) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x0f, 0xc0, //...+%@@@@%. - 0x3f, 0xe0, //..@@@@@@@@@ - 0x70, 0x20, //.@@@+....+@ - 0x60, 0x00, //+@@........ - 0xc0, 0x00, //%@+........ - 0xc3, 0xe0, //@@....@@@@@ - 0xc3, 0xe0, //@@....@@@@@ - 0xc0, 0x60, //@@.......@@ - 0xc0, 0x60, //@@+......@@ - 0x60, 0x60, //+@@......@@ - 0x70, 0x60, //.@@@+...+@@ - 0x3f, 0xc0, //..@@@@@@@@+ - 0x0f, 0x80, //...+@@@@%.. - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+0048 (H) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xff, 0xc0, //@@@@@@@@@@ - 0xff, 0xc0, //@@@@@@@@@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0049 (I) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+004a (J) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x70, //.%@% - 0xe0, //@@@. - 0xc0, //@%.. - - - /*Unicode: U+004b (K) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0xc1, 0x80, //@@.....@@+. - 0xc3, 0x00, //@@....@@+.. - 0xc6, 0x00, //@@...@@+... - 0xcc, 0x00, //@@..@@+.... - 0xd8, 0x00, //@@.@@+..... - 0xf0, 0x00, //@@@@+...... - 0xf0, 0x00, //@@@@....... - 0xd8, 0x00, //@@+@@...... - 0xcc, 0x00, //@@.+@@..... - 0xc6, 0x00, //@@..+@@.... - 0xc3, 0x00, //@@...+@@... - 0xc1, 0x80, //@@....+@@.. - 0xc0, 0xc0, //@@.....+@@+ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+004c (L) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+004d (M) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0xe0, 0x70, //@@@+....+@@@ - 0xf0, 0xf0, //@@@%....%@@@ - 0xf0, 0xf0, //@@%@....@%@@ - 0xd8, 0xb0, //@@.@+..+@.@@ - 0xd9, 0xb0, //@@.@@..@@.@@ - 0xd9, 0xb0, //@@.%@..@+.@@ - 0xcf, 0x30, //@@..@%%@..@@ - 0xcf, 0x30, //@@..@@@@..@@ - 0xc6, 0x30, //@@..+@@+..@@ - 0xc6, 0x30, //@@...@@...@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+004e (N) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0xe0, 0xc0, //@@%.....@@ - 0xe0, 0xc0, //@@@.....@@ - 0xf0, 0xc0, //@@@%....@@ - 0xf0, 0xc0, //@@%@+...@@ - 0xd8, 0xc0, //@@.@@...@@ - 0xd8, 0xc0, //@@.%@+..@@ - 0xcc, 0xc0, //@@..@@..@@ - 0xc6, 0xc0, //@@..+@%.@@ - 0xc6, 0xc0, //@@...@@.@@ - 0xc3, 0xc0, //@@...+@@@@ - 0xc3, 0xc0, //@@....%@@@ - 0xc1, 0xc0, //@@.....@@@ - 0xc1, 0xc0, //@@.....%@@ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+004f (O) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x0f, 0x80, //...+@@@@+... - 0x3f, 0xc0, //..@@@@@@@@.. - 0x70, 0xe0, //.@@@+..+@@@. - 0x60, 0x60, //+@@......@@+ - 0xc0, 0x30, //%@+......+@% - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //%@+......+@% - 0x60, 0x60, //+@@......@@+ - 0x70, 0xe0, //.@@@+..+@@@. - 0x3f, 0xc0, //..@@@@@@@@.. - 0x1f, 0x80, //...+@@@@+... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0050 (P) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xfc, //@@@@@%+. - 0xfe, //@@@@@@@+ - 0xc7, //@@...%@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc7, //@@...%@@ - 0xfe, //@@@@@@@+ - 0xfc, //@@@@@@+. - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0051 (Q) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x0f, 0x80, //...+@@@@%... - 0x3f, 0xc0, //..@@@@@@@@.. - 0x70, 0xe0, //.@@@+..+@@@. - 0x60, 0x60, //+@@......@@+ - 0xc0, 0x30, //%@+......+@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //@@........@@ - 0xc0, 0x30, //%@+......+@% - 0x60, 0x60, //+@@......@@+ - 0x70, 0xe0, //.@@@+..+@@%. - 0x3f, 0xc0, //..@@@@@@@%.. - 0x1f, 0x80, //...%@@@@%... - 0x01, 0x80, //......+@@+.. - 0x00, 0xc0, //.......+@@+. - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0052 (R) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0xfc, 0x00, //@@@@@@+... - 0xfe, 0x00, //@@@@@@@+.. - 0xc7, 0x00, //@@...%@@.. - 0xc3, 0x00, //@@....@@.. - 0xc3, 0x00, //@@....@@.. - 0xc7, 0x00, //@@...%@%.. - 0xfe, 0x00, //@@@@@@@... - 0xfc, 0x00, //@@@@@@+... - 0xc6, 0x00, //@@..+@@... - 0xc3, 0x00, //@@...+@@.. - 0xc3, 0x00, //@@....@@+. - 0xc1, 0x80, //@@....+@@. - 0xc1, 0xc0, //@@.....%@% - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0053 (S) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x3e, 0x00, //..%@@@%.. - 0x7f, 0x00, //+@@@@@@@. - 0xe1, 0x00, //@@%...+%. - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@+...... - 0x7c, 0x00, //+@@@@%+.. - 0x3f, 0x00, //..%@@@@@. - 0x03, 0x80, //.....+@@% - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x83, 0x80, //@+....%@@ - 0xff, 0x00, //@@@@@@@@+ - 0x7e, 0x00, //.%@@@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0054 (T) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0xff, 0xf0, //@@@@@@@@@@@@ - 0xff, 0xf0, //@@@@@@@@@@@@ - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0055 (U) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@+....+@@ - 0x61, 0x80, //+@@+..+@@+ - 0x7f, 0x80, //.@@@@@@@@. - 0x1e, 0x00, //..+@@@@+.. - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0056 (V) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0xc0, 0x30, //@@+......+@@ - 0x60, 0x60, //+@%......%@+ - 0x60, 0x60, //.@@......@@. - 0x60, 0x60, //.%@+....+@%. - 0x30, 0xc0, //..@@....@@.. - 0x30, 0xc0, //..@@....@@.. - 0x19, 0x80, //..+@%..%@+.. - 0x19, 0x80, //...@@..@@... - 0x19, 0x80, //...%@++@%... - 0x0f, 0x00, //....@@@@+... - 0x0f, 0x00, //....@@@@.... - 0x06, 0x00, //....+@@+.... - 0x06, 0x00, //.....@@..... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0057 (W) , Width: 17 */ - 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, //................. - 0xc1, 0xc1, 0x80, //@@.....@@@.....@@ - 0xc1, 0xc1, 0x80, //%@+...+@@@+...+@% - 0x63, 0xe3, 0x00, //+@%...%@%@%...%@+ - 0x63, 0x63, 0x00, //.@@...@@.@@...@@. - 0x63, 0x63, 0x00, //.@@...@@.@@...@@. - 0x63, 0x63, 0x00, //.%@+.+@%.%@+.+@%. - 0x36, 0x36, 0x00, //.+@%.%@+.+@%.%@+. - 0x36, 0x36, 0x00, //..@@.@@...@@.@@.. - 0x36, 0x36, 0x00, //..@@+@@...@@+@@.. - 0x3e, 0x3e, 0x00, //..%@@@%...%@@@%.. - 0x1c, 0x1c, 0x00, //..+@@@+...+@@@+.. - 0x1c, 0x1c, 0x00, //...@@@.....@@@... - 0x1c, 0x1c, 0x00, //...@@@.....@@%... - 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, //................. - - - /*Unicode: U+0058 (X) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x70, 0xe0, //.%@%....%@% - 0x30, 0xc0, //..@@+..+@@. - 0x39, 0x80, //..%@@..@@+. - 0x1b, 0x80, //...@@+%@%.. - 0x0f, 0x00, //...+@@@@... - 0x0e, 0x00, //....%@@+... - 0x0e, 0x00, //....%@@.... - 0x0f, 0x00, //...+@@@@... - 0x1b, 0x00, //...@@+@@+.. - 0x39, 0x80, //..%@%.+@@.. - 0x31, 0xc0, //.+@@...@@%. - 0x60, 0xc0, //.@@+....@@. - 0xe0, 0xe0, //%@@.....%@% - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+0059 (Y) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0xe0, 0x70, //%@@......@@% - 0x60, 0x60, //.@@+....+@@. - 0x30, 0xc0, //..@@....@@.. - 0x19, 0x80, //..+@%..%@+.. - 0x19, 0x80, //...%@++@%... - 0x0f, 0x00, //....@@@@.... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //.....@@..... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+005a (Z) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0xff, 0xe0, //@@@@@@@@@@@ - 0xff, 0xe0, //@@@@@@@@@@@ - 0x01, 0xc0, //.......%@@. - 0x03, 0x80, //......%@@.. - 0x03, 0x00, //.....+@@+.. - 0x07, 0x00, //.....@@%... - 0x0e, 0x00, //....@@%.... - 0x1c, 0x00, //...%@@..... - 0x18, 0x00, //..+@@...... - 0x30, 0x00, //.+@@+...... - 0x70, 0x00, //.@@%....... - 0xff, 0xe0, //@@@@@@@@@@@ - 0xff, 0xe0, //@@@@@@@@@@@ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+005b ([) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xf0, //@@@@ - 0xf0, //@@@@ - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xc0, //@@.. - 0xf0, //@@@@ - 0xf0, //@@@@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+005c (\) , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0xc0, //@@.... - 0xc0, //%@+... - 0x60, //+@%... - 0x60, //.@@... - 0x60, //.@@+.. - 0x70, //.%@%.. - 0x30, //.+@@.. - 0x30, //..@@.. - 0x30, //..@@+. - 0x38, //..+@%. - 0x18, //...@@. - 0x18, //...@@. - 0x18, //...%@+ - 0x0c, //...+@% - 0x0c, //....@@ - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+005d (]) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xf0, //@@@@ - 0xf0, //@@@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0xf0, //@@@@ - 0xf0, //@@@@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+005e (^) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x0e, 0x00, //....@@@.... - 0x1f, 0x00, //...%@%@%... - 0x31, 0x80, //..%@+.+@%.. - 0x60, 0xc0, //.%@+...+@%. - 0xc0, 0x60, //%@+.....+@% - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - /*Unicode: U+005f (_) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0xff, 0x80, //@@@@@@@@@ - 0xff, 0x80, //@@@@@@@@@ - - - /*Unicode: U+0060 (`) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xc0, //%@.. - 0x60, //.%@. - 0x30, //..%% - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... + /*4 rows*/ /*Unicode: U+0061 (a) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ + /*6 rows*/ 0x3c, //.+%@@@+. 0x7e, //.@@@@@@. 0x47, //.%...%@% @@ -1522,7636 +78,32 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { 0xc7, //@@+..%@@ 0xff, //%@@@@%@@ 0x7b, //.%@@%.@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0062 (b) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xde, 0x00, //@@.%@@%.. - 0xff, 0x00, //@@%@@@@@. - 0xe3, 0x80, //@@@...@@% - 0xc1, 0x80, //@@+...+@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@+...+@@ - 0xe3, 0x80, //@@@...@@% - 0xff, 0x00, //@@%@@@@@. - 0xde, 0x00, //@@.%@@%.. - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0063 (c) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x1e, //..+@@@%+ - 0x7f, //.%@@@@@@ - 0x61, //+@@+...% - 0xc0, //@@+..... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@+..... - 0x61, //+@@+...% - 0x7f, //.%@@@@@@ - 0x1e, //..+@@@%+ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0064 (d) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x3d, 0x80, //..%@@%.@@ - 0x7f, 0x80, //.@@@@@%@@ - 0xe3, 0x80, //%@@...@@@ - 0xc1, 0x80, //@@+...+@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@+...+@@ - 0xe3, 0x80, //%@@...@@@ - 0x7f, 0x80, //.@@@@@%@@ - 0x3d, 0x80, //..%@@%.@@ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+0065 (e) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x1f, 0x00, //..+%@@@%.. - 0x7f, 0x80, //.%@@@@@@@. - 0x61, 0xc0, //+@@+...@@% - 0xc0, 0xc0, //@@......@@ - 0xff, 0xc0, //@@@@@@@@@@ - 0xff, 0xc0, //@@@@@@@@@@ - 0xc0, 0x00, //@@........ - 0x60, 0x40, //+@@+....+@ - 0x7f, 0xc0, //.%@@@@@@@@ - 0x1f, 0x80, //..+%@@@@%. - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0066 (f) , Width: 7 */ - 0x00, //....... - 0x00, //....... - 0x1e, //...%@@@ - 0x3e, //..%@@@@ - 0x30, //..@@+.. - 0x30, //..@@... - 0xfe, //@@@@@@@ - 0xfe, //@@@@@@@ - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x30, //..@@... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - - - /*Unicode: U+0067 (g) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x3d, 0x80, //..%@@%.@@ - 0x7f, 0x80, //.@@@@@%@@ - 0xe3, 0x80, //%@@...@@@ - 0xc1, 0x80, //@@+...+@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@+...+@@ - 0xe3, 0x80, //%@@...@@@ - 0x7f, 0x80, //.@@@@@%@@ - 0x3d, 0x80, //..%@@%.@@ - 0x01, 0x80, //......+@% - 0x43, 0x00, //.%...+@@+ - 0x7f, 0x00, //.@@@@@@@. - 0x3e, 0x00, //.+%@@@%.. - - - /*Unicode: U+0068 (h) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xc0, //@@...... - 0xde, //@@.%@@%. - 0xfe, //@@%@@@@+ - 0xe7, //@@@..%@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0069 (i) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006a (j) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x30, //..@@ - 0x30, //..@@ - 0x00, //.... - 0x00, //.... - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //..@@ - 0x30, //.+@@ - 0xe0, //@@@+ - 0xc0, //@@+. - - - /*Unicode: U+006b (k) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc3, 0x00, //@@....@@+ - 0xc6, 0x00, //@@..+@@+. - 0xcc, 0x00, //@@.+@@+.. - 0xd8, 0x00, //@@+@@+... - 0xf0, 0x00, //@@@@..... - 0xf0, 0x00, //@@@@+.... - 0xd8, 0x00, //@@+@@+... - 0xcc, 0x00, //@@.+@@+.. - 0xc6, 0x00, //@@..+@@+. - 0xc3, 0x00, //@@...+@@+ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - - - /*Unicode: U+006c (l) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006d (m) , Width: 14 */ - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0xdc, 0x78, //@@.%@@+..%@@%. - 0xfe, 0xf8, //@@%@@@@+@@@@@+ - 0xe7, 0x9c, //@@@..%@@@..%@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0xc3, 0x0c, //@@....@@....@@ - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - 0x00, 0x00, //.............. - - - /*Unicode: U+006e (n) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xde, //@@.%@@%. - 0xfe, //@@%@@@@+ - 0xe7, //@@@..%@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+006f (o) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x1e, 0x00, //..+@@@@+.. - 0x7f, 0x80, //.%@@@@@@%. - 0x61, 0x80, //+@@+..+@@+ - 0xc0, 0xc0, //@@+....+@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@......@@ - 0xc0, 0xc0, //@@+....+@@ - 0x61, 0x80, //+@@+..+@@+ - 0x7f, 0x80, //.%@@@@@@%. - 0x1e, 0x00, //..+@@@@+.. - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0070 (p) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0xde, 0x00, //@@.%@@%.. - 0xff, 0x00, //@@%@@@@@. - 0xe3, 0x80, //@@@...@@% - 0xc1, 0x80, //@@+...+@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@+...+@@ - 0xe3, 0x80, //@@@...@@% - 0xff, 0x00, //@@%@@@@@. - 0xde, 0x00, //@@.%@@%.. - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - 0xc0, 0x00, //@@....... - - - /*Unicode: U+0071 (q) , Width: 9 */ - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x00, 0x00, //......... - 0x3d, 0x80, //..%@@%.@@ - 0x7f, 0x80, //.@@@@@%@@ - 0xe3, 0x80, //%@@...@@@ - 0xc1, 0x80, //@@+...+@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@.....@@ - 0xc1, 0x80, //@@+...+@@ - 0xe3, 0x80, //%@@...@@@ - 0x7f, 0x80, //.@@@@@%@@ - 0x3d, 0x80, //..%@@%.@@ - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - - - /*Unicode: U+0072 (r) , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0xdc, //@@.%@@ - 0xfc, //@@%@@@ - 0xe0, //@@@+.. - 0xc0, //@@+... - 0xc0, //@@.... - 0xc0, //@@.... - 0xc0, //@@.... - 0xc0, //@@.... - 0xc0, //@@.... - 0xc0, //@@.... - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+0073 (s) , Width: 7 */ - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x7c, //.+@@@%+ - 0xfe, //%@@@@@@ - 0xc2, //@@+...% - 0xe0, //@@%+... - 0x7c, //+@@@@@. - 0x1e, //..+%@@% - 0x06, //.....@@ - 0x86, //%+..+@@ - 0xfe, //@@@@@@% - 0x78, //.%@@@+. - 0x00, //....... - 0x00, //....... - 0x00, //....... - 0x00, //....... - - - /*Unicode: U+0074 (t) , Width: 6 */ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x60, //.@@... - 0x60, //.@@... - 0x60, //.@@... - 0xfc, //@@@@@@ - 0xfc, //@@@@@@ - 0x60, //.@@... - 0x60, //.@@... - 0x60, //.@@... - 0x60, //.@@... - 0x60, //.@@... - 0x60, //.@@+.. - 0x7c, //.%@@@@ - 0x3c, //..%@@@ - 0x00, //...... - 0x00, //...... - 0x00, //...... - 0x00, //...... - - - /*Unicode: U+0075 (u) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xc3, //@@....@@ - 0xe7, //@@%..@@@ - 0x7f, //+@@@@%@@ - 0x7b, //.%@@%.@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+0076 (v) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x60, 0x60, //.@@......@@. - 0x60, 0x60, //.%@+....+@%. - 0x30, 0xc0, //..@@....@@.. - 0x30, 0xc0, //..@@....@@.. - 0x19, 0x80, //..+@%..%@+.. - 0x19, 0x80, //...@@..@@... - 0x19, 0x80, //...%@.+@%... - 0x0f, 0x00, //...+@%@@.... - 0x0f, 0x00, //....@@@@.... - 0x06, 0x00, //....+@@+.... - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - - - /*Unicode: U+0077 (w) , Width: 15 */ - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x63, 0x8c, //.@@...@@@...@@. - 0x63, 0x8c, //.@@...@@@...@@. - 0x63, 0x8c, //.%@+.+@@@+.+@%. - 0x36, 0xd8, //.+@%.%@+@%.%@+. - 0x36, 0xd8, //..@@.@@.@@.@@.. - 0x36, 0xd8, //..@@.@%.%@.@@.. - 0x3c, 0x78, //..%@%@+.+@%@%.. - 0x1c, 0x70, //..+@@@...@@@+.. - 0x1c, 0x70, //...@@@...@@@... - 0x1c, 0x70, //...@@%...%@@... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - 0x00, 0x00, //............... - - - /*Unicode: U+0078 (x) , Width: 10 */ - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0xe1, 0xc0, //%@@....@@% - 0x61, 0x80, //.@@+..+@@. - 0x33, 0x00, //.+@@..@@.. - 0x33, 0x00, //..%@++@%.. - 0x1e, 0x00, //...@@@@... - 0x1e, 0x00, //...@@@@... - 0x33, 0x00, //..%@++@%.. - 0x33, 0x00, //.+@@..@@+. - 0x61, 0x80, //.@@+..+@@. - 0xe1, 0xc0, //%@@....@@% - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - 0x00, 0x00, //.......... - - - /*Unicode: U+0079 (y) , Width: 12 */ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x00, 0x00, //............ - 0x60, 0x60, //.@@......@@. - 0x60, 0x60, //.%@+....+@%. - 0x30, 0xc0, //..@@....@@.. - 0x30, 0xc0, //..%@+..+@@.. - 0x19, 0x80, //...@@..@@+.. - 0x19, 0x80, //...@@+.@@... - 0x0f, 0x00, //...+@%%@+... - 0x0f, 0x00, //....@@@@.... - 0x06, 0x00, //....+@@+.... - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //....+@%..... - 0x0c, 0x00, //....%@...... - 0x3c, 0x00, //..@@@%...... - 0x38, 0x00, //..@@%....... - - - /*Unicode: U+007a (z) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0x06, //....+@@. - 0x0c, //....@@+. - 0x1c, //...@@@.. - 0x38, //..%@@... - 0x30, //.+@@+... - 0x70, //.@@%.... - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - 0x00, //........ - 0x00, //........ - 0x00, //........ - 0x00, //........ - - - /*Unicode: U+007b ({) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0x0f, //....%@@@ - 0x1f, //...%@@@@ - 0x18, //...@@+.. - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x38, //..%@@... - 0xf0, //@@@@.... - 0xf0, //@@@@.... - 0x38, //..%@%... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@+.. - 0x1f, //...%@@@@ - 0x0f, //....%@@@ - 0x00, //........ - - - /*Unicode: U+007c (|) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - 0xc0, //@@ - - - /*Unicode: U+007d (}) , Width: 8 */ - 0x00, //........ - 0x00, //........ - 0xf0, //@@@%.... - 0xf8, //@@@@%... - 0x18, //..+@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x1c, //...@@%.. - 0x0f, //....@@@@ - 0x0f, //....@@@@ - 0x1c, //...%@%.. - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //..+@@... - 0xf8, //@@@@%... - 0xf0, //@@@%.... - 0x00, //........ - - - /*Unicode: U+007e (~) , Width: 11 */ - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x7c, 0x20, //.%@@@%...+@ - 0xff, 0xe0, //@@@@@@@@@@@ - 0x87, 0xc0, //@+...%@@@%. - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - 0x00, 0x00, //........... - - - -#elif LV_USE_FONT_DEJAVU_20 == 2 - /*Unicode: U+0020 ( ) , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+0021 (!) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0022 (") , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0xf0, 0xf0, //@@..@@ - 0xf0, 0xf0, //@@..@@ - 0xf0, 0xf0, //@@..@@ - 0xf0, 0xf0, //@@..@@ - 0xf0, 0xf0, //@@..@@ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+0023 (#) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x30, 0x70, //.....@..+@.. - 0x00, 0x70, 0x70, //....+@..+@.. - 0x00, 0xb0, 0xa0, //....%@..%%.. - 0x00, 0xe0, 0xd0, //....@%..@+.. - 0x3f, 0xff, 0xff, //.@@@@@@@@@@@ - 0x3f, 0xff, 0xff, //.@@@@@@@@@@@ - 0x01, 0xc2, 0xc0, //...+@..%@... - 0x03, 0x83, 0x40, //...@%..@+... - 0xff, 0xff, 0xfc, //@@@@@@@@@@@. - 0xff, 0xff, 0xfc, //@@@@@@@@@@@. - 0x07, 0x0b, 0x00, //..+@..%@.... - 0x0a, 0x0a, 0x00, //..%%..%%.... - 0x0e, 0x0d, 0x00, //..@%..@+.... - 0x0d, 0x0c, 0x00, //..@+..@..... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0024 ($) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0xc0, 0x00, //....@.... - 0x00, 0xc0, 0x00, //....@.... - 0x1b, 0xf8, 0x00, //.+%@@@%.. - 0x7f, 0xff, 0x00, //+@@@@@@@. - 0xf8, 0xc7, 0x00, //@@%.@.+@. - 0xf0, 0xc0, 0x00, //@@..@.... - 0xbe, 0xc0, 0x00, //%@@%@.... - 0x3f, 0xfd, 0x00, //.@@@@@@+. - 0x01, 0xff, 0x40, //...+@@@@+ - 0x00, 0xc7, 0xc0, //....@.+@@ - 0x00, 0xc3, 0xc0, //....@..@@ - 0xd0, 0xcb, 0xc0, //@+..@.%@@ - 0xff, 0xff, 0x40, //@@@@@@@@+ - 0x2f, 0xf9, 0x00, //.%@@@@%+. - 0x00, 0xc0, 0x00, //....@.... - 0x00, 0xc0, 0x00, //....@.... - 0x00, 0xc0, 0x00, //....@.... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0025 (%) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x2f, 0x80, 0x07, 0x00, //.%@@%.....+@... - 0x75, 0xd0, 0x0c, 0x00, //+@++@+....@.... - 0xf0, 0xf0, 0x28, 0x00, //@@..@@...%%.... - 0xf0, 0xf0, 0x30, 0x00, //@@..@@...@..... - 0xf0, 0xf0, 0xd0, 0x00, //@@..@@..@+..... - 0xb5, 0xd1, 0x80, 0x00, //+@++@+.+%...... - 0x2f, 0x83, 0x0b, 0xe0, //.%@@%..@..%@@%. - 0x00, 0x09, 0x1d, 0x74, //......%+.+@++@+ - 0x00, 0x1c, 0x3c, 0x3c, //.....+@..@@..@@ - 0x00, 0x30, 0x3c, 0x3c, //.....@...@@..@@ - 0x00, 0xa0, 0x3c, 0x3c, //....%%...@@..@@ - 0x00, 0xc0, 0x1d, 0x74, //....@....+@++@+ - 0x03, 0x40, 0x0b, 0xe0, //...@+.....%@@%. - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0026 (&) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x01, 0xfe, 0x40, //...+@@@%+... - 0x07, 0xff, 0xc0, //..+@@@@@@... - 0x0f, 0x41, 0xc0, //..@@+..+%... - 0x0f, 0x00, 0x00, //..@@........ - 0x0b, 0x80, 0x00, //..%@%....... - 0x0b, 0xe0, 0x00, //..%@@%...... - 0x2e, 0xf8, 0x3c, //.%@%@@%..@@. - 0xb4, 0x7e, 0x78, //%@+.+@@%+@%. - 0xf0, 0x1f, 0xf0, //@@...+@@@@.. - 0xf4, 0x07, 0xd0, //@@+...+@@+.. - 0xbd, 0x07, 0xe0, //%@@+..+@@%.. - 0x3f, 0xff, 0xf8, //.@@@@@@@@@%. - 0x0b, 0xf8, 0x7e, //..%@@@%.+@@% - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0027 (') , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0028 (() , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x0b, //..%@ - 0x0d, //..@+ - 0x2c, //.%@. - 0x38, //.@%. - 0x74, //+@+. - 0xb0, //%@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xb0, //%@.. - 0x74, //+@+. - 0x38, //.@%. - 0x2c, //.%@. - 0x0d, //..@+ - 0x0b, //..%@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+0029 ()) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xe0, //@%.. - 0x70, //+@.. - 0x38, //.@%. - 0x2c, //.%@. - 0x1d, //.+@+ - 0x0e, //..@% - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0e, //..@% - 0x1d, //.+@+ - 0x2c, //.%@. - 0x38, //.@%. - 0x70, //+@.. - 0xe0, //@%.. - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+002a (*) , Width: 7 */ - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x03, 0x00, //...@... - 0x83, 0x08, //%..@..% - 0x77, 0x74, //+@+@+@+ - 0x0f, 0xc0, //..@@@.. - 0x0f, 0xc0, //..@@@.. - 0x77, 0x74, //+@+@+@+ - 0x83, 0x08, //%..@..% - 0x03, 0x00, //...@... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - - - /*Unicode: U+002b (+) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+002c (,) , Width: 3 */ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x3c, //.@@ - 0x3c, //.@@ - 0x70, //+@. - 0xd0, //@+. - 0x00, //... - 0x00, //... - - - /*Unicode: U+002d (-) , Width: 5 */ - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0xff, 0xc0, //@@@@@ - 0xff, 0xc0, //@@@@@ - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - 0x00, 0x00, //..... - - - /*Unicode: U+002e (.) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+002f (/) , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0xf0, //....@@ - 0x01, 0xe0, //...+@% - 0x02, 0xd0, //...%@+ - 0x03, 0xc0, //...@@. - 0x03, 0xc0, //...@@. - 0x0b, 0x80, //..+@%. - 0x0f, 0x40, //..@@+. - 0x0f, 0x00, //..@@.. - 0x1f, 0x00, //.+@@.. - 0x2e, 0x00, //.%@%.. - 0x3d, 0x00, //.@@+.. - 0x3c, 0x00, //.@@... - 0x78, 0x00, //+@%... - 0xb4, 0x00, //%@+... - 0xf0, 0x00, //@@.... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+0030 (0) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x07, 0xf4, 0x00, //..+@@@+.. - 0x2f, 0xfe, 0x00, //.%@@@@@%. - 0x7d, 0x1f, 0x40, //+@@+.+@@+ - 0xb4, 0x07, 0x80, //%@+...+@% - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xb4, 0x07, 0x80, //%@+...+@% - 0x7d, 0x1f, 0x40, //+@@+.+@@+ - 0x2f, 0xfe, 0x00, //.%@@@@@%. - 0x0b, 0xf8, 0x00, //..+@@@+.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0031 (1) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x1f, 0xc0, //.+@@@... - 0xff, 0xc0, //@@@@@... - 0xd3, 0xc0, //@+.@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0032 (2) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x2f, 0xe0, 0x00, //.%@@@%... - 0xff, 0xfd, 0x00, //@@@@@@@+. - 0xd0, 0x3f, 0x00, //@+...@@@. - 0x00, 0x0f, 0x00, //......@@. - 0x00, 0x0f, 0x00, //......@@. - 0x00, 0x2d, 0x00, //.....%@+. - 0x00, 0x7c, 0x00, //....+@@.. - 0x01, 0xf0, 0x00, //...+@@... - 0x07, 0xd0, 0x00, //..+@@+... - 0x1f, 0x40, 0x00, //.+@@+.... - 0x7d, 0x00, 0x00, //+@@+..... - 0xff, 0xff, 0x00, //@@@@@@@@. - 0xff, 0xff, 0x00, //@@@@@@@@. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0033 (3) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x2f, 0xf8, 0x00, //.%@@@@%.. - 0xff, 0xff, 0x40, //@@@@@@@@+ - 0xd0, 0x0b, 0xc0, //@+....%@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x0b, 0x80, //......%@% - 0x0f, 0xfd, 0x00, //..@@@@@+. - 0x0f, 0xfe, 0x00, //..@@@@@%. - 0x00, 0x1f, 0x80, //.....+@@% - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x90, 0x1f, 0x80, //%+...+@@% - 0xff, 0xff, 0x00, //@@@@@@@@. - 0x2f, 0xf8, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0034 (4) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x2f, 0x00, //.....%@@.. - 0x00, 0x7f, 0x00, //....+@@@.. - 0x00, 0xdf, 0x00, //....@+@@.. - 0x02, 0xcf, 0x00, //...%@.@@.. - 0x07, 0x0f, 0x00, //..+@..@@.. - 0x0d, 0x0f, 0x00, //..@+..@@.. - 0x3c, 0x0f, 0x00, //.@@...@@.. - 0x70, 0x0f, 0x00, //+@....@@.. - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0x00, 0x0f, 0x00, //......@@.. - 0x00, 0x0f, 0x00, //......@@.. - 0x00, 0x0f, 0x00, //......@@.. - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0035 (5) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x3f, 0xfc, //.@@@@@@. - 0x3f, 0xfc, //.@@@@@@. - 0x3c, 0x00, //.@@..... - 0x3c, 0x00, //.@@..... - 0x3f, 0xf0, //.@@@@@.. - 0x3f, 0xfc, //.@@@@@@. - 0x20, 0x3e, //.%...@@% - 0x00, 0x0f, //......@@ - 0x00, 0x0f, //......@@ - 0x00, 0x0f, //......@@ - 0x90, 0x7e, //%...+@@% - 0xff, 0xfc, //@@@@@@@. - 0x6f, 0xe0, //.%@@@%.. - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0036 (6) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x02, 0xfd, 0x00, //...%@@@+. - 0x1f, 0xff, 0x00, //.+@@@@@@. - 0x3e, 0x02, 0x00, //.@@%...%. - 0xbc, 0x00, 0x00, //+@@...... - 0xf4, 0x00, 0x00, //@@+...... - 0xf2, 0xf8, 0x00, //@@.%@@%.. - 0xfb, 0xff, 0x00, //@@%@@@@@. - 0xf8, 0x0b, 0x80, //@@%...%@% - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xb0, 0x03, 0xc0, //%@.....@@ - 0x78, 0x0b, 0x80, //+@%...%@% - 0x2f, 0xff, 0x00, //.%@@@@@@. - 0x07, 0xf8, 0x00, //..+@@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0037 (7) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x2d, //.....%@+ - 0x00, 0x3c, //.....@@. - 0x00, 0x7c, //....+@@. - 0x00, 0xb4, //....%@+. - 0x00, 0xf0, //....@@.. - 0x00, 0xf0, //....@@.. - 0x02, 0xe0, //...%@%.. - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x0b, 0x80, //..%@%... - 0x0f, 0x40, //..@@+... - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0038 (8) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x1b, 0xf9, 0x00, //.+%@@@%+. - 0x7f, 0xff, 0x40, //+@@@@@@@+ - 0xf8, 0x0b, 0xc0, //@@%...%@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xb8, 0x0b, 0x80, //%@%...%@% - 0x1f, 0xfd, 0x00, //.+@@@@@+. - 0x2f, 0xfe, 0x00, //.%@@@@@%. - 0xb8, 0x0b, 0x80, //%@%...%@% - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf8, 0x0b, 0xc0, //@@%...%@@ - 0x7f, 0xff, 0x40, //+@@@@@@@+ - 0x0b, 0xf8, 0x00, //..%@@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0039 (9) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x0b, 0xf4, 0x00, //..%@@@+.. - 0x3f, 0xfe, 0x00, //.@@@@@@%. - 0xb8, 0x0b, 0x00, //%@%...%@. - 0xf0, 0x03, 0x80, //@@.....@% - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf8, 0x0b, 0xc0, //%@%...%@@ - 0x7f, 0xfb, 0xc0, //.@@@@@%@@ - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x00, 0x07, 0xc0, //......+@@ - 0x00, 0x0f, 0x40, //......@@+ - 0x20, 0x2f, 0x00, //.%...%@@. - 0x3f, 0xfd, 0x00, //.@@@@@@+. - 0x1f, 0xe0, 0x00, //.+@@@%... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+003a (:) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+003b (;) , Width: 3 */ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x3c, //.@@ - 0x3c, //.@@ - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x00, //... - 0x3c, //.@@ - 0x3c, //.@@ - 0x70, //+@. - 0xd0, //@+. - 0x00, //... - 0x00, //... - - - /*Unicode: U+003c (<) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x1c, //.........+@ - 0x00, 0x06, 0xfc, //.......%@@@ - 0x00, 0x7f, 0xe4, //....+@@@@%+ - 0x1b, 0xfd, 0x00, //.+%@@@@+... - 0xff, 0x90, 0x00, //@@@@%+..... - 0xff, 0x90, 0x00, //@@@@%+..... - 0x1b, 0xfd, 0x00, //.+%@@@@+... - 0x00, 0x7f, 0xe4, //....+@@@@%+ - 0x00, 0x06, 0xfc, //......+%@@@ - 0x00, 0x00, 0x1c, //.........+@ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003d (=) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003e (>) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xd0, 0x00, 0x00, //@+......... - 0xfe, 0x40, 0x00, //@@@%....... - 0x6f, 0xf4, 0x00, //+%@@@@+.... - 0x01, 0xff, 0x90, //...+@@@@%+. - 0x00, 0x1b, 0xfc, //.....+%@@@@ - 0x00, 0x1b, 0xfc, //.....+%@@@@ - 0x01, 0xff, 0x90, //...+@@@@%+. - 0x6f, 0xf4, 0x00, //+%@@@@+.... - 0xfe, 0x40, 0x00, //@@@%+...... - 0xd0, 0x00, 0x00, //@+......... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003f (?) , Width: 7 */ - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x6f, 0xd0, //.%@@@+. - 0xff, 0xf4, //@@@@@@+ - 0xd0, 0xbc, //@+..%@@ - 0x00, 0x3c, //.....@@ - 0x00, 0x78, //....+@% - 0x00, 0xf0, //....@@. - 0x03, 0xc0, //...@@.. - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x00, 0x00, //....... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - - - /*Unicode: U+0040 (@) , Width: 16 */ - 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x2f, 0xf9, 0x00, //.....%@@@@%+.... - 0x02, 0xff, 0xff, 0xd0, //...%@@@@@@@@@+.. - 0x0b, 0xe0, 0x06, 0xf4, //..%@@%....+%@@+. - 0x2f, 0x00, 0x00, 0x7c, //.%@@........+@@. - 0x3c, 0x00, 0x00, 0x1e, //.@@..........+@% - 0xb8, 0x0f, 0x3c, 0x0f, //%@%...@@.@@...@@ - 0xf0, 0x2f, 0xfc, 0x0f, //@@...%@@@@@...@@ - 0xf0, 0x3c, 0x3c, 0x1f, //@@...@@..@@..+@@ - 0xf0, 0x3c, 0x3c, 0x7d, //@@...@@..@@.+@@+ - 0xf0, 0x2f, 0xff, 0xf4, //@@...%@@@@@@@@+. - 0xb8, 0x0f, 0x3e, 0x40, //%@%...@@.@@%+... - 0x7c, 0x00, 0x00, 0x00, //.@@............. - 0x2f, 0x00, 0x00, 0x00, //.%@@............ - 0x0f, 0xe0, 0x0b, 0x00, //..@@@+....+@.... - 0x02, 0xff, 0xff, 0x00, //...%@@@@@@@@.... - 0x00, 0x6f, 0xe4, 0x00, //....+%@@@%+..... - 0x00, 0x00, 0x00, 0x00, //................ - - - /*Unicode: U+0041 (A) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x7d, 0x00, //....+@@+.... - 0x00, 0xff, 0x00, //....@@@@.... - 0x00, 0xff, 0x00, //....@@@@.... - 0x02, 0xd7, 0x80, //...%@++@%... - 0x03, 0xc3, 0xc0, //...@@..@@... - 0x07, 0x82, 0xd0, //..+@%..%@+.. - 0x0f, 0x00, 0xf0, //..@@....@@.. - 0x0f, 0xff, 0xf0, //..@@@@@@@@.. - 0x2f, 0xff, 0xf8, //.%@@@@@@@@%. - 0x3c, 0x00, 0x3c, //.@@......@@. - 0x78, 0x00, 0x2d, //+@%......%@+ - 0xf4, 0x00, 0x1f, //@@+......+@@ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0042 (B) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0xff, 0xf4, 0x00, //@@@@@@+.. - 0xff, 0xfe, 0x00, //@@@@@@@%. - 0xf0, 0x1f, 0x00, //@@...+@@. - 0xf0, 0x0f, 0x00, //@@....@@. - 0xf0, 0x1e, 0x00, //@@...+@%. - 0xff, 0xf8, 0x00, //@@@@@@%.. - 0xff, 0xfd, 0x00, //@@@@@@@+. - 0xf0, 0x0b, 0x40, //@@....%@+ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x0b, 0xc0, //@@....%@@ - 0xff, 0xff, 0x40, //@@@@@@@@+ - 0xff, 0xf8, 0x00, //@@@@@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0043 (C) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x01, 0xbf, 0xe0, //...+%@@@@%. - 0x0f, 0xff, 0xfc, //..@@@@@@@@@ - 0x3f, 0x40, 0x1c, //.@@@+....+@ - 0x7c, 0x00, 0x00, //+@@........ - 0xb4, 0x00, 0x00, //%@+........ - 0xf0, 0x00, 0x00, //@@......... - 0xf0, 0x00, 0x00, //@@......... - 0xf0, 0x00, 0x00, //@@......... - 0xb4, 0x00, 0x00, //%@+........ - 0x7c, 0x00, 0x00, //+@@........ - 0x3f, 0x40, 0x1c, //.@@@+....+@ - 0x0f, 0xff, 0xfc, //..@@@@@@@@@ - 0x01, 0xbf, 0xe0, //...+%@@@@%. - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0044 (D) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xff, 0xf9, 0x00, //@@@@@@%+... - 0xff, 0xff, 0xc0, //@@@@@@@@@.. - 0xf0, 0x07, 0xf0, //@@....+@@@. - 0xf0, 0x00, 0xf4, //@@......@@+ - 0xf0, 0x00, 0x7c, //@@......+@@ - 0xf0, 0x00, 0x3c, //@@.......@@ - 0xf0, 0x00, 0x3c, //@@.......@@ - 0xf0, 0x00, 0x3c, //@@.......@@ - 0xf0, 0x00, 0x7c, //@@......+@@ - 0xf0, 0x00, 0xf4, //@@......@@+ - 0xf0, 0x07, 0xf0, //@@....+@@@. - 0xff, 0xff, 0xc0, //@@@@@@@@@.. - 0xff, 0xf9, 0x00, //@@@@@@%+... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0045 (E) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0046 (F) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xff, 0xfc, //@@@@@@@. - 0xff, 0xfc, //@@@@@@@. - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0047 (G) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x01, 0xbf, 0xe0, //...+%@@@@%. - 0x0f, 0xff, 0xfc, //..@@@@@@@@@ - 0x3f, 0x40, 0x1c, //.@@@+....+@ - 0x7c, 0x00, 0x00, //+@@........ - 0xf4, 0x00, 0x00, //%@+........ - 0xf0, 0x0f, 0xfc, //@@....@@@@@ - 0xf0, 0x0f, 0xfc, //@@....@@@@@ - 0xf0, 0x00, 0x3c, //@@.......@@ - 0xf4, 0x00, 0x3c, //@@+......@@ - 0x7c, 0x00, 0x3c, //+@@......@@ - 0x3f, 0x40, 0x7c, //.@@@+...+@@ - 0x0f, 0xff, 0xf4, //..@@@@@@@@+ - 0x01, 0xff, 0x80, //...+@@@@%.. - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0048 (H) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0049 (I) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+004a (J) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x2e, //.%@% - 0xfc, //@@@. - 0xe0, //@%.. - - - /*Unicode: U+004b (K) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xf0, 0x03, 0xd0, //@@.....@@+. - 0xf0, 0x0f, 0x40, //@@....@@+.. - 0xf0, 0x3d, 0x00, //@@...@@+... - 0xf0, 0xf4, 0x00, //@@..@@+.... - 0xf3, 0xd0, 0x00, //@@.@@+..... - 0xff, 0x40, 0x00, //@@@@+...... - 0xff, 0x00, 0x00, //@@@@....... - 0xf7, 0xc0, 0x00, //@@+@@...... - 0xf1, 0xf0, 0x00, //@@.+@@..... - 0xf0, 0x7c, 0x00, //@@..+@@.... - 0xf0, 0x1f, 0x00, //@@...+@@... - 0xf0, 0x07, 0xd0, //@@....+@@.. - 0xf0, 0x01, 0xf4, //@@.....+@@+ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+004c (L) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+004d (M) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0xfd, 0x00, 0x7f, //@@@+....+@@@ - 0xff, 0x00, 0xbf, //@@@%....%@@@ - 0xfb, 0x00, 0xef, //@@%@....@%@@ - 0xf7, 0x81, 0xdf, //@@.@+..+@.@@ - 0xf3, 0xc3, 0xcf, //@@.@@..@@.@@ - 0xf2, 0xc3, 0x8f, //@@.%@..@+.@@ - 0xf0, 0xeb, 0x0f, //@@..@%%@..@@ - 0xf0, 0xff, 0x0f, //@@..@@@@..@@ - 0xf0, 0x7d, 0x0f, //@@..+@@+..@@ - 0xf0, 0x3c, 0x0f, //@@...@@...@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+004e (N) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0xf8, 0x00, 0xf0, //@@%.....@@ - 0xfc, 0x00, 0xf0, //@@@.....@@ - 0xfe, 0x00, 0xf0, //@@@%....@@ - 0xfb, 0x40, 0xf0, //@@%@+...@@ - 0xf3, 0xc0, 0xf0, //@@.@@...@@ - 0xf2, 0xd0, 0xf0, //@@.%@+..@@ - 0xf0, 0xf0, 0xf0, //@@..@@..@@ - 0xf0, 0x78, 0xf0, //@@..+@%.@@ - 0xf0, 0x3d, 0xf0, //@@...@@.@@ - 0xf0, 0x1f, 0xf0, //@@...+@@@@ - 0xf0, 0x0b, 0xf0, //@@....%@@@ - 0xf0, 0x03, 0xf0, //@@.....@@@ - 0xf0, 0x02, 0xf0, //@@.....%@@ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+004f (O) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x01, 0xff, 0x80, //...+@@@@+... - 0x0f, 0xff, 0xf0, //..@@@@@@@@.. - 0x3f, 0x41, 0xfc, //.@@@+..+@@@. - 0x7c, 0x00, 0x3d, //+@@......@@+ - 0xf4, 0x00, 0x1e, //%@+......+@% - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf4, 0x00, 0x1e, //%@+......+@% - 0x7c, 0x00, 0x3d, //+@@......@@+ - 0x3f, 0x41, 0xfc, //.@@@+..+@@@. - 0x0f, 0xff, 0xf0, //..@@@@@@@@.. - 0x02, 0xff, 0x80, //...+@@@@+... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0050 (P) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xff, 0xf4, //@@@@@%+. - 0xff, 0xfd, //@@@@@@@+ - 0xf0, 0x2f, //@@...%@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x2f, //@@...%@@ - 0xff, 0xfd, //@@@@@@@+ - 0xff, 0xf4, //@@@@@@+. - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0051 (Q) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x01, 0xff, 0x80, //...+@@@@%... - 0x0f, 0xff, 0xf0, //..@@@@@@@@.. - 0x3f, 0x41, 0xfc, //.@@@+..+@@@. - 0x7c, 0x00, 0x3d, //+@@......@@+ - 0xf4, 0x00, 0x1f, //%@+......+@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf0, 0x00, 0x0f, //@@........@@ - 0xf4, 0x00, 0x1e, //%@+......+@% - 0x7c, 0x00, 0x3d, //+@@......@@+ - 0x3f, 0x41, 0xf8, //.@@@+..+@@%. - 0x0f, 0xff, 0xe0, //..@@@@@@@%.. - 0x02, 0xff, 0x80, //...%@@@@%... - 0x00, 0x07, 0xd0, //......+@@+.. - 0x00, 0x01, 0xf4, //.......+@@+. - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0052 (R) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0xff, 0xf4, 0x00, //@@@@@@+... - 0xff, 0xfd, 0x00, //@@@@@@@+.. - 0xf0, 0x2f, 0x00, //@@...%@@.. - 0xf0, 0x0f, 0x00, //@@....@@.. - 0xf0, 0x0f, 0x00, //@@....@@.. - 0xf0, 0x2e, 0x00, //@@...%@%.. - 0xff, 0xfc, 0x00, //@@@@@@@... - 0xff, 0xf4, 0x00, //@@@@@@+... - 0xf0, 0x7c, 0x00, //@@..+@@... - 0xf0, 0x1f, 0x00, //@@...+@@.. - 0xf0, 0x0f, 0x40, //@@....@@+. - 0xf0, 0x07, 0xc0, //@@....+@@. - 0xf0, 0x02, 0xe0, //@@.....%@% - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0053 (S) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x0b, 0xf8, 0x00, //..%@@@%.. - 0x7f, 0xff, 0x00, //+@@@@@@@. - 0xf8, 0x06, 0x00, //@@%...+%. - 0xf0, 0x00, 0x00, //@@....... - 0xf4, 0x00, 0x00, //@@+...... - 0x7f, 0xe4, 0x00, //+@@@@%+.. - 0x1b, 0xff, 0x00, //..%@@@@@. - 0x00, 0x1f, 0x80, //.....+@@% - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0xd0, 0x0f, 0xc0, //@+....%@@ - 0xff, 0xff, 0x40, //@@@@@@@@+ - 0x2f, 0xf8, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0054 (T) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0055 (U) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf4, 0x01, 0xf0, //@@+....+@@ - 0x7d, 0x07, 0xd0, //+@@+..+@@+ - 0x3f, 0xff, 0xc0, //.@@@@@@@@. - 0x07, 0xfd, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0056 (V) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0xf4, 0x00, 0x1f, //@@+......+@@ - 0x78, 0x00, 0x2d, //+@%......%@+ - 0x3c, 0x00, 0x3c, //.@@......@@. - 0x2d, 0x00, 0x78, //.%@+....+@%. - 0x0f, 0x00, 0xf0, //..@@....@@.. - 0x0f, 0x01, 0xf0, //..@@....@@.. - 0x07, 0x82, 0xd0, //..+@%..%@+.. - 0x03, 0xc3, 0xc0, //...@@..@@... - 0x02, 0xd7, 0x80, //...%@++@%... - 0x01, 0xff, 0x40, //....@@@@+... - 0x00, 0xff, 0x00, //....@@@@.... - 0x00, 0x7d, 0x00, //....+@@+.... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0057 (W) , Width: 17 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0xf0, 0x03, 0xf0, 0x03, 0xc0, //@@.....@@@.....@@ - 0xb4, 0x07, 0xf4, 0x07, 0x80, //%@+...+@@@+...+@% - 0x78, 0x0b, 0xb8, 0x0b, 0x40, //+@%...%@%@%...%@+ - 0x3c, 0x0f, 0x3c, 0x0f, 0x00, //.@@...@@.@@...@@. - 0x3c, 0x0f, 0x3c, 0x0f, 0x00, //.@@...@@.@@...@@. - 0x2d, 0x1e, 0x2d, 0x1e, 0x00, //.%@+.+@%.%@+.+@%. - 0x1e, 0x2d, 0x1e, 0x2d, 0x00, //.+@%.%@+.+@%.%@+. - 0x0f, 0x3c, 0x0f, 0x3c, 0x00, //..@@.@@...@@.@@.. - 0x0f, 0x7c, 0x0f, 0x7c, 0x00, //..@@+@@...@@+@@.. - 0x0b, 0xf8, 0x0b, 0xf8, 0x00, //..%@@@%...%@@@%.. - 0x07, 0xf4, 0x07, 0xf4, 0x00, //..+@@@+...+@@@+.. - 0x03, 0xf0, 0x03, 0xf0, 0x00, //...@@@.....@@@... - 0x03, 0xf0, 0x03, 0xf0, 0x00, //...@@@.....@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, //................. - - - /*Unicode: U+0058 (X) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x2e, 0x00, 0xb8, //.%@%....%@% - 0x0f, 0x41, 0xf0, //..@@+..+@@. - 0x0b, 0xc3, 0xd0, //..%@@..@@+. - 0x03, 0xdb, 0x80, //...@@+%@%.. - 0x01, 0xff, 0x00, //...+@@@@... - 0x00, 0xfd, 0x00, //....%@@+... - 0x00, 0xbc, 0x00, //....%@@.... - 0x01, 0xff, 0x00, //...+@@@@... - 0x03, 0xdf, 0x40, //...@@+@@+.. - 0x0b, 0x87, 0xc0, //..%@%.+@@.. - 0x1f, 0x03, 0xe0, //.+@@...@@%. - 0x3d, 0x00, 0xf0, //.@@+....@@. - 0xbc, 0x00, 0xb8, //%@@.....%@% - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0059 (Y) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0xbc, 0x00, 0x3e, //%@@......@@% - 0x3d, 0x00, 0x7c, //.@@+....+@@. - 0x0f, 0x00, 0xf0, //..@@....@@.. - 0x07, 0x82, 0xd0, //..+@%..%@+.. - 0x02, 0xd7, 0x80, //...%@++@%... - 0x00, 0xff, 0x00, //....@@@@.... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+005a (Z) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0x00, 0x02, 0xf0, //.......%@@. - 0x00, 0x0b, 0xc0, //......%@@.. - 0x00, 0x1f, 0x40, //.....+@@+.. - 0x00, 0x3e, 0x00, //.....@@%... - 0x00, 0xf8, 0x00, //....@@%.... - 0x02, 0xf0, 0x00, //...%@@..... - 0x07, 0xc0, 0x00, //..+@@...... - 0x1f, 0x40, 0x00, //.+@@+...... - 0x3e, 0x00, 0x00, //.@@%....... - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005b ([) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xff, //@@@@ - 0xff, //@@@@ - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xf0, //@@.. - 0xff, //@@@@ - 0xff, //@@@@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+005c (\) , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0xf0, 0x00, //@@.... - 0xb4, 0x00, //%@+... - 0x78, 0x00, //+@%... - 0x3c, 0x00, //.@@... - 0x3d, 0x00, //.@@+.. - 0x2e, 0x00, //.%@%.. - 0x1f, 0x00, //.+@@.. - 0x0f, 0x00, //..@@.. - 0x0f, 0x40, //..@@+. - 0x0b, 0x80, //..+@%. - 0x03, 0xc0, //...@@. - 0x03, 0xc0, //...@@. - 0x02, 0xd0, //...%@+ - 0x01, 0xe0, //...+@% - 0x00, 0xf0, //....@@ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+005d (]) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xff, //@@@@ - 0xff, //@@@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0xff, //@@@@ - 0xff, //@@@@ - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+005e (^) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0xfc, 0x00, //....@@@.... - 0x02, 0xee, 0x00, //...%@%@%... - 0x0b, 0x47, 0x80, //..%@+.+@%.. - 0x2d, 0x01, 0xe0, //.%@+...+@%. - 0xb4, 0x00, 0x78, //%@+.....+@% - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005f (_) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0xc0, //@@@@@@@@@ - 0xff, 0xff, 0xc0, //@@@@@@@@@ - - - /*Unicode: U+0060 (`) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0xb0, //%@.. - 0x2c, //.%@. - 0x0a, //..%% - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - 0x00, //.... - - - /*Unicode: U+0061 (a) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x1b, 0xf4, //.+%@@@+. - 0x3f, 0xfc, //.@@@@@@. - 0x20, 0x2e, //.%...%@% - 0x00, 0x0f, //......@@ - 0x1f, 0xff, //.+@@@@@@ - 0xbf, 0xff, //%@@@@@@@ - 0xf4, 0x0f, //@@+...@@ - 0xf4, 0x2f, //@@+..%@@ - 0xbf, 0xef, //%@@@@%@@ - 0x2f, 0x8f, //.%@@%.@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0062 (b) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf2, 0xf8, 0x00, //@@.%@@%.. - 0xfb, 0xff, 0x00, //@@%@@@@@. - 0xfc, 0x0f, 0x80, //@@@...@@% - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xfc, 0x0f, 0x80, //@@@...@@% - 0xfb, 0xff, 0x00, //@@%@@@@@. - 0xf2, 0xf8, 0x00, //@@.%@@%.. - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0063 (c) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x07, 0xf9, //..+@@@%+ - 0x2f, 0xff, //.%@@@@@@ - 0x7d, 0x02, //+@@+...% - 0xf4, 0x00, //@@+..... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf4, 0x00, //@@+..... - 0x7d, 0x02, //+@@+...% - 0x2f, 0xff, //.%@@@@@@ - 0x07, 0xf9, //..+@@@%+ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0064 (d) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0065 (e) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x06, 0xfe, 0x00, //..+%@@@%.. - 0x2f, 0xff, 0xc0, //.%@@@@@@@. - 0x7d, 0x03, 0xe0, //+@@+...@@% - 0xf0, 0x00, 0xf0, //@@......@@ - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0xff, 0xff, 0xf0, //@@@@@@@@@@ - 0xf0, 0x00, 0x00, //@@........ - 0x7d, 0x00, 0x70, //+@@+....+@ - 0x2f, 0xff, 0xf0, //.%@@@@@@@@ - 0x06, 0xff, 0x80, //..+%@@@@%. - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0066 (f) , Width: 7 */ - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x02, 0xfc, //...%@@@ - 0x0b, 0xfc, //..%@@@@ - 0x0f, 0x40, //..@@+.. - 0x0f, 0x00, //..@@... - 0xff, 0xfc, //@@@@@@@ - 0xff, 0xfc, //@@@@@@@ - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x0f, 0x00, //..@@... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - - - /*Unicode: U+0067 (g) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x00, 0x07, 0x80, //......+@% - 0x20, 0x1f, 0x40, //.%...+@@+ - 0x3f, 0xff, 0x00, //.@@@@@@@. - 0x1b, 0xf8, 0x00, //.+%@@@%.. - - - /*Unicode: U+0068 (h) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf0, 0x00, //@@...... - 0xf2, 0xf8, //@@.%@@%. - 0xfb, 0xfd, //@@%@@@@+ - 0xfc, 0x2f, //@@@..%@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0069 (i) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006a (j) , Width: 4 */ - 0x00, //.... - 0x00, //.... - 0x0f, //..@@ - 0x0f, //..@@ - 0x00, //.... - 0x00, //.... - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x0f, //..@@ - 0x1f, //.+@@ - 0xfd, //@@@+ - 0xf4, //@@+. - - - /*Unicode: U+006b (k) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x0f, 0x40, //@@....@@+ - 0xf0, 0x7d, 0x00, //@@..+@@+. - 0xf1, 0xf4, 0x00, //@@.+@@+.. - 0xf7, 0xd0, 0x00, //@@+@@+... - 0xff, 0x00, 0x00, //@@@@..... - 0xff, 0x40, 0x00, //@@@@+.... - 0xf7, 0xd0, 0x00, //@@+@@+... - 0xf1, 0xf4, 0x00, //@@.+@@+.. - 0xf0, 0x7d, 0x00, //@@..+@@+. - 0xf0, 0x1f, 0x40, //@@...+@@+ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+006c (l) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006d (m) , Width: 14 */ - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0xf2, 0xf4, 0x2f, 0x80, //@@.%@@+..%@@%. - 0xfb, 0xfd, 0xff, 0xd0, //@@%@@@@+@@@@@+ - 0xfc, 0x2f, 0xc2, 0xf0, //@@@..%@@@..%@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0xf0, 0x0f, 0x00, 0xf0, //@@....@@....@@ - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, //.............. - - - /*Unicode: U+006e (n) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xf2, 0xf8, //@@.%@@%. - 0xfb, 0xfd, //@@%@@@@+ - 0xfc, 0x2f, //@@@..%@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+006f (o) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x07, 0xfd, 0x00, //..+@@@@+.. - 0x3f, 0xff, 0x80, //.%@@@@@@%. - 0x7d, 0x07, 0xd0, //+@@+..+@@+ - 0xf4, 0x01, 0xf0, //@@+....+@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf0, 0x00, 0xf0, //@@......@@ - 0xf4, 0x01, 0xf0, //@@+....+@@ - 0x7d, 0x07, 0xd0, //+@@+..+@@+ - 0x3f, 0xff, 0x80, //.%@@@@@@%. - 0x07, 0xfd, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0070 (p) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0xf2, 0xf8, 0x00, //@@.%@@%.. - 0xfb, 0xff, 0x00, //@@%@@@@@. - 0xfc, 0x0f, 0x80, //@@@...@@% - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xfc, 0x0f, 0x80, //@@@...@@% - 0xfb, 0xff, 0x00, //@@%@@@@@. - 0xf2, 0xf8, 0x00, //@@.%@@%.. - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - 0xf0, 0x00, 0x00, //@@....... - - - /*Unicode: U+0071 (q) , Width: 9 */ - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, //......... - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf0, 0x03, 0xc0, //@@.....@@ - 0xf4, 0x07, 0xc0, //@@+...+@@ - 0xbc, 0x0f, 0xc0, //%@@...@@@ - 0x3f, 0xfb, 0xc0, //.@@@@@%@@ - 0x0b, 0xe3, 0xc0, //..%@@%.@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - 0x00, 0x03, 0xc0, //.......@@ - - - /*Unicode: U+0072 (r) , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0xf2, 0xf0, //@@.%@@ - 0xfb, 0xf0, //@@%@@@ - 0xfd, 0x00, //@@@+.. - 0xf4, 0x00, //@@+... - 0xf0, 0x00, //@@.... - 0xf0, 0x00, //@@.... - 0xf0, 0x00, //@@.... - 0xf0, 0x00, //@@.... - 0xf0, 0x00, //@@.... - 0xf0, 0x00, //@@.... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+0073 (s) , Width: 7 */ - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x2f, 0xe4, //.+@@@%+ - 0xbf, 0xfc, //%@@@@@@ - 0xf4, 0x08, //@@+...% - 0xf9, 0x00, //@@%+... - 0x7f, 0xf0, //+@@@@@. - 0x06, 0xfc, //..+%@@% - 0x00, 0x3c, //.....@@ - 0x90, 0x7c, //%+..+@@ - 0xff, 0xf8, //@@@@@@% - 0x2f, 0xd0, //.%@@@+. - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - 0x00, 0x00, //....... - - - /*Unicode: U+0074 (t) , Width: 6 */ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0xff, 0xf0, //@@@@@@ - 0xff, 0xf0, //@@@@@@ - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0x3c, 0x00, //.@@... - 0x3d, 0x00, //.@@+.. - 0x2f, 0xf0, //.%@@@@ - 0x0b, 0xf0, //..%@@@ - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - 0x00, 0x00, //...... - - - /*Unicode: U+0075 (u) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf0, 0x0f, //@@....@@ - 0xf8, 0x3f, //@@%..@@@ - 0x7f, 0xef, //+@@@@%@@ - 0x2f, 0x8f, //.%@@%.@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+0076 (v) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x3c, 0x00, 0x3c, //.@@......@@. - 0x2d, 0x00, 0x78, //.%@+....+@%. - 0x1f, 0x00, 0xf0, //..@@....@@.. - 0x0f, 0x00, 0xf0, //..@@....@@.. - 0x07, 0x82, 0xd0, //..+@%..%@+.. - 0x03, 0xc3, 0xc0, //...@@..@@... - 0x02, 0xc7, 0x80, //...%@.+@%... - 0x01, 0xef, 0x00, //...+@%@@.... - 0x00, 0xff, 0x00, //....@@@@.... - 0x00, 0x7d, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0077 (w) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x3c, 0x0f, 0xc0, 0xf0, //.@@...@@@...@@. - 0x3c, 0x0f, 0xc0, 0xf0, //.@@...@@@...@@. - 0x2d, 0x1f, 0xd1, 0xe0, //.%@+.+@@@+.+@%. - 0x1e, 0x2d, 0xe2, 0xd0, //.+@%.%@+@%.%@+. - 0x0f, 0x3c, 0xf3, 0xc0, //..@@.@@.@@.@@.. - 0x0f, 0x38, 0xb3, 0xc0, //..@@.@%.%@.@@.. - 0x0b, 0xb4, 0x7b, 0x80, //..%@%@+.+@%@%.. - 0x07, 0xf0, 0x3f, 0x40, //..+@@@...@@@+.. - 0x03, 0xf0, 0x3f, 0x00, //...@@@...@@@... - 0x03, 0xe0, 0x2f, 0x00, //...@@%...%@@... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0078 (x) , Width: 10 */ - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0xbc, 0x03, 0xe0, //%@@....@@% - 0x3d, 0x07, 0xc0, //.@@+..+@@. - 0x1f, 0x0f, 0x00, //.+@@..@@.. - 0x0b, 0x5e, 0x00, //..%@++@%.. - 0x03, 0xfc, 0x00, //...@@@@... - 0x03, 0xfc, 0x00, //...@@@@... - 0x0b, 0x5e, 0x00, //..%@++@%.. - 0x1f, 0x0f, 0x40, //.+@@..@@+. - 0x3d, 0x07, 0xc0, //.@@+..+@@. - 0xbc, 0x03, 0xe0, //%@@....@@% - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0079 (y) , Width: 12 */ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, //............ - 0x3c, 0x00, 0x3c, //.@@......@@. - 0x2d, 0x00, 0x78, //.%@+....+@%. - 0x0f, 0x00, 0xf0, //..@@....@@.. - 0x0b, 0x41, 0xf0, //..%@+..+@@.. - 0x03, 0xc3, 0xd0, //...@@..@@+.. - 0x03, 0xd3, 0xc0, //...@@+.@@... - 0x01, 0xeb, 0x40, //...+@%%@+... - 0x00, 0xff, 0x00, //....@@@@.... - 0x00, 0x7d, 0x00, //....+@@+.... - 0x00, 0x3c, 0x00, //.....@@..... - 0x00, 0x78, 0x00, //....+@%..... - 0x00, 0xb0, 0x00, //....%@...... - 0x0f, 0xe0, 0x00, //..@@@%...... - 0x0f, 0x80, 0x00, //..@@%....... - - - /*Unicode: U+007a (z) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x7c, //....+@@. - 0x00, 0xf4, //....@@+. - 0x03, 0xf0, //...@@@.. - 0x0b, 0xc0, //..%@@... - 0x1f, 0x40, //.+@@+... - 0x3e, 0x00, //.@@%.... - 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - - - /*Unicode: U+007b ({) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0x00, 0xbf, //....%@@@ - 0x02, 0xff, //...%@@@@ - 0x03, 0xd0, //...@@+.. - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x0b, 0xc0, //..%@@... - 0xff, 0x00, //@@@@.... - 0xff, 0x00, //@@@@.... - 0x0b, 0x80, //..%@%... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xd0, //...@@+.. - 0x02, 0xff, //...%@@@@ - 0x00, 0xbf, //....%@@@ - 0x00, 0x00, //........ - - - /*Unicode: U+007c (|) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - 0xf0, //@@ - - - /*Unicode: U+007d (}) , Width: 8 */ - 0x00, 0x00, //........ - 0x00, 0x00, //........ - 0xfe, 0x00, //@@@%.... - 0xff, 0x80, //@@@@%... - 0x07, 0xc0, //..+@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xe0, //...@@%.. - 0x00, 0xff, //....@@@@ - 0x00, 0xff, //....@@@@ - 0x02, 0xe0, //...%@%.. - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x03, 0xc0, //...@@... - 0x07, 0xc0, //..+@@... - 0xff, 0x80, //@@@@%... - 0xfe, 0x00, //@@@%.... - 0x00, 0x00, //........ - - - /*Unicode: U+007e (~) , Width: 11 */ - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x2f, 0xe0, 0x1c, //.%@@@%...+@ - 0xff, 0xff, 0xfc, //@@@@@@@@@@@ - 0xd0, 0x6f, 0xe0, //@+...%@@@%. - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, //........... - - - -#elif LV_USE_FONT_DEJAVU_20 == 4 - /*Unicode: U+0020 ( ) , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0021 (!) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xee, //@@ - 0xdd, //@@ - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0022 (") , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0xff, 0x00, 0xff, //@@..@@ - 0xff, 0x00, 0xff, //@@..@@ - 0xff, 0x00, 0xff, //@@..@@ - 0xff, 0x00, 0xff, //@@..@@ - 0xff, 0x00, 0xff, //@@..@@ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0023 (#) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x2f, 0x30, 0x4f, 0x10, //.....@..+@.. - 0x00, 0x00, 0x6f, 0x00, 0x7d, 0x00, //....+@..+@.. - 0x00, 0x00, 0x9c, 0x00, 0xba, 0x00, //....%@..%%.. - 0x00, 0x00, 0xd8, 0x00, 0xe6, 0x00, //....@%..@+.. - 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, //.@@@@@@@@@@@ - 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, //.@@@@@@@@@@@ - 0x00, 0x07, 0xe0, 0x09, 0xd0, 0x00, //...+@..%@... - 0x00, 0x0c, 0x90, 0x0e, 0x70, 0x00, //...@%..@+... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@. - 0x00, 0x6f, 0x00, 0x8d, 0x00, 0x00, //..+@..%@.... - 0x00, 0xab, 0x00, 0xb9, 0x00, 0x00, //..%%..%%.... - 0x00, 0xd8, 0x00, 0xf6, 0x00, 0x00, //..@%..@+.... - 0x01, 0xf4, 0x02, 0xf2, 0x00, 0x00, //..@+..@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0024 ($) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0xf0, 0x00, 0x00, //....@.... - 0x00, 0x00, 0xf0, 0x00, 0x00, //....@.... - 0x04, 0xbe, 0xfe, 0xa3, 0x00, //.+%@@@%.. - 0x6f, 0xff, 0xff, 0xff, 0x00, //+@@@@@@@. - 0xef, 0x91, 0xf1, 0x5c, 0x00, //@@%.@.+@. - 0xff, 0x10, 0xf0, 0x00, 0x00, //@@..@.... - 0xbf, 0xd8, 0xf2, 0x00, 0x00, //%@@%@.... - 0x1c, 0xff, 0xff, 0xd6, 0x00, //.@@@@@@+. - 0x00, 0x37, 0xfe, 0xff, 0x60, //...+@@@@+ - 0x00, 0x00, 0xf0, 0x6f, 0xd0, //....@.+@@ - 0x00, 0x00, 0xf0, 0x0f, 0xf0, //....@..@@ - 0xc6, 0x10, 0xf1, 0x9f, 0xe0, //@+..@.%@@ - 0xff, 0xff, 0xff, 0xff, 0x60, //@@@@@@@@+ - 0x28, 0xce, 0xfe, 0xb4, 0x00, //.%@@@@%+. - 0x00, 0x00, 0xf0, 0x00, 0x00, //....@.... - 0x00, 0x00, 0xf0, 0x00, 0x00, //....@.... - 0x00, 0x00, 0xf0, 0x00, 0x00, //....@.... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0025 (%) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x08, 0xee, 0x80, 0x00, 0x00, 0x4d, 0x00, 0x00, //.%@@%.....+@... - 0x7f, 0x66, 0xf7, 0x00, 0x00, 0xe3, 0x00, 0x00, //+@++@+....@.... - 0xdf, 0x11, 0xfd, 0x00, 0x09, 0x90, 0x00, 0x00, //@@..@@...%%.... - 0xff, 0x00, 0xff, 0x00, 0x3e, 0x00, 0x00, 0x00, //@@..@@...@..... - 0xdf, 0x11, 0xfd, 0x00, 0xc5, 0x00, 0x00, 0x00, //@@..@@..@+..... - 0x8f, 0x66, 0xf7, 0x07, 0xb0, 0x00, 0x00, 0x00, //+@++@+.+%...... - 0x08, 0xee, 0x80, 0x1e, 0x10, 0x8e, 0xe8, 0x00, //.%@@%..@..%@@%. - 0x00, 0x00, 0x00, 0xb7, 0x07, 0xf6, 0x6f, 0x70, //......%+.+@++@+ - 0x00, 0x00, 0x05, 0xc0, 0x0d, 0xf1, 0x1f, 0xd0, //.....+@..@@..@@ - 0x00, 0x00, 0x0e, 0x30, 0x0f, 0xf0, 0x0f, 0xf0, //.....@...@@..@@ - 0x00, 0x00, 0x99, 0x00, 0x0d, 0xf1, 0x1f, 0xd0, //....%%...@@..@@ - 0x00, 0x03, 0xe0, 0x00, 0x07, 0xf6, 0x6f, 0x70, //....@....+@++@+ - 0x00, 0x0d, 0x40, 0x00, 0x00, 0x8e, 0xe8, 0x00, //...@+.....%@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0026 (&) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x04, 0xcf, 0xeb, 0x40, 0x00, //...+@@@%+... - 0x00, 0x5f, 0xff, 0xff, 0xf0, 0x00, //..+@@@@@@... - 0x00, 0xdf, 0x70, 0x04, 0xc0, 0x00, //..@@+..+%... - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //..@@........ - 0x00, 0xbf, 0x80, 0x00, 0x00, 0x00, //..%@%....... - 0x00, 0x9f, 0xf9, 0x00, 0x00, 0x00, //..%@@%...... - 0x0b, 0xf8, 0xff, 0x90, 0x1f, 0xe0, //.%@%@@%..@@. - 0x8f, 0x50, 0x5f, 0xf9, 0x5f, 0x90, //%@+.+@@%+@%. - 0xef, 0x00, 0x04, 0xff, 0xef, 0x10, //@@...+@@@@.. - 0xff, 0x40, 0x00, 0x6f, 0xf5, 0x00, //@@+...+@@+.. - 0xaf, 0xe5, 0x10, 0x6f, 0xf9, 0x00, //%@@+..+@@%.. - 0x1e, 0xff, 0xff, 0xfc, 0xff, 0x80, //.@@@@@@@@@%. - 0x01, 0x8d, 0xfe, 0x90, 0x5f, 0xf8, //..%@@@%.+@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0027 (') , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+0028 (() , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x8c, //..%@ - 0x02, 0xf5, //..@+ - 0x0a, 0xe0, //.%@. - 0x1f, 0xa0, //.@%. - 0x6f, 0x60, //+@+. - 0xbf, 0x30, //%@.. - 0xdf, 0x10, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xdf, 0x10, //@@.. - 0xbf, 0x30, //%@.. - 0x6f, 0x60, //+@+. - 0x1f, 0xa0, //.@%. - 0x0a, 0xf0, //.%@. - 0x02, 0xf5, //..@+ - 0x00, 0x8c, //..%@ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - - - /*Unicode: U+0029 ()) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0xc8, 0x00, //@%.. - 0x5f, 0x20, //+@.. - 0x0f, 0xa0, //.@%. - 0x0a, 0xf1, //.%@. - 0x06, 0xf6, //.+@+ - 0x03, 0xfa, //..@% - 0x01, 0xfd, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x01, 0xfd, //..@@ - 0x03, 0xfa, //..@% - 0x06, 0xf6, //.+@+ - 0x0a, 0xf1, //.%@. - 0x0f, 0xa0, //.@%. - 0x5f, 0x20, //+@.. - 0xc8, 0x00, //@%.. - 0x00, 0x00, //.... - 0x00, 0x00, //.... - - - /*Unicode: U+002a (*) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x0f, 0x00, 0x00, //...@... - 0xa2, 0x0f, 0x02, 0xa0, //%..@..% - 0x5e, 0x5f, 0x5e, 0x50, //+@+@+@+ - 0x02, 0xcf, 0xc2, 0x00, //..@@@.. - 0x02, 0xcf, 0xc2, 0x00, //..@@@.. - 0x5e, 0x5f, 0x5e, 0x50, //+@+@+@+ - 0xa2, 0x0f, 0x02, 0xa0, //%..@..% - 0x00, 0x0f, 0x00, 0x00, //...@... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+002b (+) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+002c (,) , Width: 3 */ - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x0f, 0xf0, //.@@ - 0x1f, 0xd0, //.@@ - 0x6f, 0x20, //+@. - 0xc6, 0x00, //@+. - 0x00, 0x00, //... - 0x00, 0x00, //... - - - /*Unicode: U+002d (-) , Width: 5 */ - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0xff, 0xff, 0xf0, //@@@@@ - 0xff, 0xff, 0xf0, //@@@@@ - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, //..... - - - /*Unicode: U+002e (.) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+002f (/) , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x03, 0xfd, //....@@ - 0x00, 0x07, 0xf9, //...+@% - 0x00, 0x0b, 0xf5, //...%@+ - 0x00, 0x0f, 0xf1, //...@@. - 0x00, 0x3f, 0xd0, //...@@. - 0x00, 0x8f, 0x90, //..+@%. - 0x00, 0xcf, 0x40, //..@@+. - 0x00, 0xff, 0x00, //..@@.. - 0x04, 0xfc, 0x00, //.+@@.. - 0x08, 0xf8, 0x00, //.%@%.. - 0x0d, 0xf4, 0x00, //.@@+.. - 0x1f, 0xf0, 0x00, //.@@... - 0x5f, 0xb0, 0x00, //+@%... - 0x9f, 0x70, 0x00, //%@+... - 0xdf, 0x30, 0x00, //@@.... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0030 (0) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x7d, 0xfd, 0x70, 0x00, //..+@@@+.. - 0x0a, 0xff, 0xff, 0xfa, 0x00, //.%@@@@@%. - 0x4f, 0xf4, 0x04, 0xff, 0x40, //+@@+.+@@+ - 0xaf, 0x70, 0x00, 0x7f, 0xa0, //%@+...+@% - 0xdf, 0x20, 0x00, 0x2f, 0xd0, //@@.....@@ - 0xff, 0x00, 0x00, 0x0f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x0f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x0f, 0xf0, //@@.....@@ - 0xdf, 0x20, 0x00, 0x2f, 0xd0, //@@.....@@ - 0xaf, 0x70, 0x00, 0x7f, 0xa0, //%@+...+@% - 0x4f, 0xf4, 0x04, 0xff, 0x40, //+@@+.+@@+ - 0x0a, 0xff, 0xff, 0xfa, 0x00, //.%@@@@@%. - 0x00, 0x8d, 0xfd, 0x80, 0x00, //..+@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0031 (1) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x27, 0xcf, 0xf0, 0x00, //.+@@@... - 0xff, 0xff, 0xf0, 0x00, //@@@@@... - 0xd7, 0x2f, 0xf0, 0x00, //@+.@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0032 (2) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x39, 0xdf, 0xea, 0x30, 0x00, //.%@@@%... - 0xff, 0xff, 0xff, 0xf5, 0x00, //@@@@@@@+. - 0xc5, 0x10, 0x2c, 0xfd, 0x00, //@+...@@@. - 0x00, 0x00, 0x02, 0xff, 0x00, //......@@. - 0x00, 0x00, 0x01, 0xfd, 0x00, //......@@. - 0x00, 0x00, 0x08, 0xf7, 0x00, //.....%@+. - 0x00, 0x00, 0x5f, 0xd0, 0x00, //....+@@.. - 0x00, 0x05, 0xff, 0x20, 0x00, //...+@@... - 0x00, 0x6f, 0xf4, 0x00, 0x00, //..+@@+... - 0x06, 0xff, 0x60, 0x00, 0x00, //.+@@+.... - 0x7f, 0xf6, 0x00, 0x00, 0x00, //+@@+..... - 0xff, 0xff, 0xff, 0xff, 0x10, //@@@@@@@@. - 0xff, 0xff, 0xff, 0xff, 0x10, //@@@@@@@@. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0033 (3) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x38, 0xdf, 0xfd, 0x92, 0x00, //.%@@@@%.. - 0xff, 0xff, 0xff, 0xff, 0x50, //@@@@@@@@+ - 0xc6, 0x20, 0x03, 0xaf, 0xd0, //@+....%@@ - 0x00, 0x00, 0x00, 0x1f, 0xe0, //.......@@ - 0x00, 0x00, 0x02, 0xaf, 0x90, //......%@% - 0x00, 0xff, 0xff, 0xd7, 0x00, //..@@@@@+. - 0x00, 0xff, 0xff, 0xf8, 0x00, //..@@@@@%. - 0x00, 0x00, 0x14, 0xcf, 0x80, //.....+@@% - 0x00, 0x00, 0x00, 0x1f, 0xe0, //.......@@ - 0x00, 0x00, 0x00, 0x2f, 0xf0, //.......@@ - 0xb4, 0x10, 0x14, 0xdf, 0xb0, //%+...+@@% - 0xff, 0xff, 0xff, 0xfe, 0x20, //@@@@@@@@. - 0x39, 0xdf, 0xfd, 0x81, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0034 (4) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x0a, 0xff, 0x00, //.....%@@.. - 0x00, 0x00, 0x5f, 0xff, 0x00, //....+@@@.. - 0x00, 0x01, 0xe7, 0xff, 0x00, //....@+@@.. - 0x00, 0x0b, 0xc0, 0xff, 0x00, //...%@.@@.. - 0x00, 0x6f, 0x20, 0xff, 0x00, //..+@..@@.. - 0x02, 0xf7, 0x00, 0xff, 0x00, //..@+..@@.. - 0x0c, 0xc0, 0x00, 0xff, 0x00, //.@@...@@.. - 0x7f, 0x20, 0x00, 0xff, 0x00, //+@....@@.. - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0x00, 0x00, 0x00, 0xff, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0xff, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0xff, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0035 (5) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x0f, 0xff, 0xff, 0xf0, //.@@@@@@. - 0x0f, 0xff, 0xff, 0xf0, //.@@@@@@. - 0x0f, 0xf0, 0x00, 0x00, //.@@..... - 0x0f, 0xf0, 0x00, 0x00, //.@@..... - 0x0f, 0xfd, 0xfc, 0x30, //.@@@@@.. - 0x0f, 0xff, 0xff, 0xf2, //.@@@@@@. - 0x0a, 0x20, 0x3d, 0xfa, //.%...@@% - 0x00, 0x00, 0x03, 0xfe, //......@@ - 0x00, 0x00, 0x00, 0xff, //......@@ - 0x00, 0x00, 0x03, 0xfe, //......@@ - 0xb4, 0x00, 0x4e, 0xf9, //%...+@@% - 0xff, 0xff, 0xff, 0xe1, //@@@@@@@. - 0x4a, 0xef, 0xd9, 0x10, //.%@@@%.. - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0036 (6) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x3a, 0xef, 0xc4, 0x00, //...%@@@+. - 0x04, 0xff, 0xff, 0xff, 0x00, //.+@@@@@@. - 0x1e, 0xfb, 0x20, 0x3b, 0x00, //.@@%...%. - 0x8f, 0xd0, 0x00, 0x00, 0x00, //+@@...... - 0xcf, 0x60, 0x00, 0x00, 0x00, //@@+...... - 0xef, 0x39, 0xef, 0xb3, 0x00, //@@.%@@%.. - 0xff, 0xaf, 0xff, 0xff, 0x30, //@@%@@@@@. - 0xff, 0xb2, 0x02, 0xbf, 0xb0, //@@%...%@% - 0xdf, 0x10, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xaf, 0x10, 0x00, 0x1f, 0xf0, //%@.....@@ - 0x4f, 0xb2, 0x02, 0xbf, 0xb0, //+@%...%@% - 0x0a, 0xff, 0xff, 0xff, 0x30, //.%@@@@@@. - 0x00, 0x7d, 0xfe, 0xa2, 0x00, //..+@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0037 (7) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xfc, //@@@@@@@@ - 0x00, 0x00, 0x0a, 0xf7, //.....%@+ - 0x00, 0x00, 0x0f, 0xf2, //.....@@. - 0x00, 0x00, 0x4f, 0xd0, //....+@@. - 0x00, 0x00, 0x9f, 0x70, //....%@+. - 0x00, 0x00, 0xef, 0x20, //....@@.. - 0x00, 0x03, 0xfd, 0x00, //....@@.. - 0x00, 0x09, 0xf8, 0x00, //...%@%.. - 0x00, 0x0e, 0xf3, 0x00, //...@@... - 0x00, 0x3f, 0xe0, 0x00, //...@@... - 0x00, 0x8f, 0x90, 0x00, //..%@%... - 0x00, 0xdf, 0x40, 0x00, //..@@+... - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0038 (8) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x04, 0xbe, 0xfe, 0xb4, 0x00, //.+%@@@%+. - 0x6f, 0xff, 0xff, 0xff, 0x60, //+@@@@@@@+ - 0xef, 0x91, 0x01, 0x9f, 0xe0, //@@%...%@@ - 0xef, 0x00, 0x00, 0x1f, 0xe0, //@@.....@@ - 0x9f, 0x91, 0x01, 0x9f, 0x90, //%@%...%@% - 0x07, 0xef, 0xff, 0xe7, 0x00, //.+@@@@@+. - 0x08, 0xff, 0xff, 0xf8, 0x00, //.%@@@@@%. - 0x8f, 0xb2, 0x02, 0xbf, 0x80, //%@%...%@% - 0xef, 0x10, 0x00, 0x1f, 0xe0, //@@.....@@ - 0xff, 0x10, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xcf, 0xb2, 0x02, 0xbf, 0xc0, //@@%...%@@ - 0x4f, 0xff, 0xff, 0xff, 0x40, //+@@@@@@@+ - 0x02, 0xad, 0xfe, 0xb3, 0x00, //..%@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0039 (9) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x02, 0xae, 0xfd, 0x70, 0x00, //..%@@@+.. - 0x3f, 0xff, 0xff, 0xf9, 0x00, //.@@@@@@%. - 0xbf, 0xb2, 0x02, 0xbf, 0x30, //%@%...%@. - 0xff, 0x10, 0x00, 0x1f, 0x90, //@@.....@% - 0xff, 0x10, 0x00, 0x1f, 0xd0, //@@.....@@ - 0xcf, 0xb2, 0x02, 0xbf, 0xf0, //%@%...%@@ - 0x4f, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x03, 0xbf, 0xe9, 0x3f, 0xe0, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x6f, 0xc0, //......+@@ - 0x00, 0x00, 0x00, 0xdf, 0x70, //......@@+ - 0x0b, 0x30, 0x2b, 0xfe, 0x10, //.%...%@@. - 0x0f, 0xff, 0xff, 0xf4, 0x00, //.@@@@@@+. - 0x04, 0xcf, 0xea, 0x30, 0x00, //.+@@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+003a (:) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+003b (;) , Width: 3 */ - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x0f, 0xf0, //.@@ - 0x0f, 0xf0, //.@@ - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x00, 0x00, //... - 0x0f, 0xf0, //.@@ - 0x1f, 0xd0, //.@@ - 0x6f, 0x20, //+@. - 0xc6, 0x00, //@+. - 0x00, 0x00, //... - 0x00, 0x00, //... - - - /*Unicode: U+003c (<) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x16, 0xc0, //.........+@ - 0x00, 0x00, 0x00, 0x4a, 0xff, 0xf0, //.......%@@@ - 0x00, 0x01, 0x7d, 0xff, 0xfb, 0x50, //....+@@@@%+ - 0x05, 0xbf, 0xff, 0xd7, 0x10, 0x00, //.+%@@@@+... - 0xef, 0xff, 0xa4, 0x00, 0x00, 0x00, //@@@@%+..... - 0xef, 0xff, 0xa4, 0x00, 0x00, 0x00, //@@@@%+..... - 0x05, 0xbf, 0xff, 0xd7, 0x10, 0x00, //.+%@@@@+... - 0x00, 0x01, 0x7d, 0xff, 0xfb, 0x50, //....+@@@@%+ - 0x00, 0x00, 0x00, 0x4a, 0xff, 0xf0, //......+%@@@ - 0x00, 0x00, 0x00, 0x00, 0x16, 0xc0, //.........+@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003d (=) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003e (>) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, //@+......... - 0xff, 0xfa, 0x40, 0x00, 0x00, 0x00, //@@@%....... - 0x5b, 0xff, 0xfd, 0x71, 0x00, 0x00, //+%@@@@+.... - 0x00, 0x17, 0xdf, 0xff, 0xb5, 0x00, //...+@@@@%+. - 0x00, 0x00, 0x04, 0xaf, 0xff, 0xe0, //.....+%@@@@ - 0x00, 0x00, 0x04, 0xaf, 0xff, 0xe0, //.....+%@@@@ - 0x00, 0x17, 0xdf, 0xff, 0xb5, 0x00, //...+@@@@%+. - 0x5b, 0xff, 0xfd, 0x71, 0x00, 0x00, //+%@@@@+.... - 0xff, 0xfa, 0x40, 0x00, 0x00, 0x00, //@@@%+...... - 0xc6, 0x10, 0x00, 0x00, 0x00, 0x00, //@+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003f (?) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x4a, 0xef, 0xd6, 0x00, //.%@@@+. - 0xff, 0xff, 0xff, 0x70, //@@@@@@+ - 0xc4, 0x01, 0x9f, 0xd0, //@+..%@@ - 0x00, 0x00, 0x0f, 0xf0, //.....@@ - 0x00, 0x00, 0x4f, 0xa0, //....+@% - 0x00, 0x02, 0xed, 0x10, //....@@. - 0x00, 0x2e, 0xd1, 0x00, //...@@.. - 0x00, 0xcf, 0x30, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0040 (@) , Width: 16 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x18, 0xce, 0xfe, 0xb6, 0x00, 0x00, //.....%@@@@%+.... - 0x00, 0x08, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x00, //...%@@@@@@@@@+.. - 0x00, 0xbf, 0xf9, 0x30, 0x01, 0x5b, 0xff, 0x60, //..%@@%....+%@@+. - 0x09, 0xfe, 0x30, 0x00, 0x00, 0x00, 0x6f, 0xf2, //.%@@........+@@. - 0x2f, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfa, //.@@..........+@% - 0x9f, 0x90, 0x02, 0xce, 0x3f, 0xf0, 0x01, 0xfe, //%@%...@@.@@...@@ - 0xdf, 0x30, 0x0b, 0xff, 0xcf, 0xf0, 0x00, 0xff, //@@...%@@@@@...@@ - 0xff, 0x00, 0x0e, 0xf3, 0x3f, 0xf0, 0x05, 0xfc, //@@...@@..@@..+@@ - 0xff, 0x00, 0x0e, 0xf3, 0x3f, 0xf1, 0x7f, 0xf5, //@@...@@..@@.+@@+ - 0xdf, 0x20, 0x0b, 0xff, 0xcf, 0xff, 0xff, 0x60, //@@...%@@@@@@@@+. - 0x9f, 0x80, 0x02, 0xce, 0x3f, 0xeb, 0x71, 0x00, //%@%...@@.@@%+... - 0x4f, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.@@............. - 0x0b, 0xfd, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, //.%@@............ - 0x01, 0xdf, 0xf8, 0x20, 0x02, 0x8d, 0x20, 0x00, //..@@@+....+@.... - 0x00, 0x1b, 0xff, 0xff, 0xff, 0xfc, 0x10, 0x00, //...%@@@@@@@@.... - 0x00, 0x00, 0x4a, 0xef, 0xeb, 0x50, 0x00, 0x00, //....+%@@@%+..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - - - /*Unicode: U+0041 (A) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x0e, 0xe0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x5f, 0xf5, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0xcf, 0xfc, 0x00, 0x00, //....@@@@.... - 0x00, 0x02, 0xfc, 0xcf, 0x20, 0x00, //....@@@@.... - 0x00, 0x09, 0xf6, 0x5f, 0x90, 0x00, //...%@++@%... - 0x00, 0x0e, 0xf0, 0x0e, 0xe0, 0x00, //...@@..@@... - 0x00, 0x5f, 0xa0, 0x08, 0xf6, 0x00, //..+@%..%@+.. - 0x00, 0xcf, 0x30, 0x02, 0xfc, 0x00, //..@@....@@.. - 0x02, 0xff, 0xff, 0xff, 0xff, 0x20, //..@@@@@@@@.. - 0x09, 0xff, 0xff, 0xff, 0xff, 0x90, //.%@@@@@@@@%. - 0x0f, 0xf1, 0x00, 0x00, 0x1f, 0xf0, //.@@......@@. - 0x6f, 0xb0, 0x00, 0x00, 0x0b, 0xf6, //+@%......%@+ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfc, //@@+......+@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0042 (B) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0xfc, 0x60, 0x00, //@@@@@@+.. - 0xff, 0xff, 0xff, 0xf8, 0x00, //@@@@@@@%. - 0xff, 0x00, 0x07, 0xfe, 0x00, //@@...+@@. - 0xff, 0x00, 0x00, 0xff, 0x00, //@@....@@. - 0xff, 0x00, 0x07, 0xfa, 0x00, //@@...+@%. - 0xff, 0xff, 0xff, 0x91, 0x00, //@@@@@@%.. - 0xff, 0xff, 0xff, 0xd6, 0x00, //@@@@@@@+. - 0xff, 0x00, 0x02, 0xbf, 0x60, //@@....%@+ - 0xff, 0x00, 0x00, 0x1f, 0xd0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x02, 0xbf, 0xc0, //@@....%@@ - 0xff, 0xff, 0xff, 0xff, 0x40, //@@@@@@@@+ - 0xff, 0xff, 0xfe, 0xa3, 0x00, //@@@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0043 (C) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x05, 0xbe, 0xff, 0xd9, 0x30, //...+%@@@@%. - 0x01, 0xcf, 0xff, 0xff, 0xff, 0xf0, //..@@@@@@@@@ - 0x0c, 0xfe, 0x61, 0x00, 0x26, 0xc0, //.@@@+....+@ - 0x6f, 0xd1, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0xbf, 0x50, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0xef, 0x10, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xef, 0x10, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xbf, 0x50, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0x6f, 0xd1, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0x0c, 0xfe, 0x61, 0x00, 0x26, 0xc0, //.@@@+....+@ - 0x01, 0xcf, 0xff, 0xff, 0xff, 0xf0, //..@@@@@@@@@ - 0x00, 0x06, 0xbe, 0xff, 0xd9, 0x30, //...+%@@@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0044 (D) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xfe, 0xb6, 0x00, 0x00, //@@@@@@%+... - 0xff, 0xff, 0xff, 0xff, 0xe3, 0x00, //@@@@@@@@@.. - 0xff, 0x00, 0x01, 0x5d, 0xfe, 0x10, //@@....+@@@. - 0xff, 0x00, 0x00, 0x00, 0xdf, 0x70, //@@......@@+ - 0xff, 0x00, 0x00, 0x00, 0x5f, 0xc0, //@@......+@@ - 0xff, 0x00, 0x00, 0x00, 0x1f, 0xe0, //@@.......@@ - 0xff, 0x00, 0x00, 0x00, 0x0f, 0xf0, //@@.......@@ - 0xff, 0x00, 0x00, 0x00, 0x1f, 0xe0, //@@.......@@ - 0xff, 0x00, 0x00, 0x00, 0x5f, 0xc0, //@@......+@@ - 0xff, 0x00, 0x00, 0x00, 0xdf, 0x70, //@@......@@+ - 0xff, 0x00, 0x01, 0x5d, 0xfe, 0x10, //@@....+@@@. - 0xff, 0xff, 0xff, 0xff, 0xe3, 0x00, //@@@@@@@@@.. - 0xff, 0xff, 0xfe, 0xb6, 0x00, 0x00, //@@@@@@%+... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0045 (E) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0046 (F) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xf0, //@@@@@@@. - 0xff, 0xff, 0xff, 0xf0, //@@@@@@@. - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0047 (G) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x06, 0xbe, 0xff, 0xc9, 0x30, //...+%@@@@%. - 0x02, 0xdf, 0xff, 0xff, 0xff, 0xf0, //..@@@@@@@@@ - 0x0d, 0xfd, 0x51, 0x00, 0x26, 0xc0, //.@@@+....+@ - 0x6f, 0xd0, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0xcf, 0x50, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0xef, 0x10, 0x00, 0xff, 0xff, 0xf0, //@@....@@@@@ - 0xff, 0x00, 0x00, 0xff, 0xff, 0xf0, //@@....@@@@@ - 0xef, 0x10, 0x00, 0x00, 0x0f, 0xf0, //@@.......@@ - 0xcf, 0x40, 0x00, 0x00, 0x0f, 0xf0, //@@+......@@ - 0x7f, 0xc0, 0x00, 0x00, 0x0f, 0xf0, //+@@......@@ - 0x0d, 0xfc, 0x40, 0x01, 0x6f, 0xf0, //.@@@+...+@@ - 0x02, 0xef, 0xff, 0xff, 0xff, 0x60, //..@@@@@@@@+ - 0x00, 0x07, 0xcf, 0xfd, 0x92, 0x00, //...+@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0048 (H) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0049 (I) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+004a (J) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x02, 0xfe, //..@@ - 0x2b, 0xfa, //.%@% - 0xff, 0xf3, //@@@. - 0xfb, 0x30, //@%.. - - - /*Unicode: U+004b (K) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0x00, 0x00, 0x2e, 0xf7, 0x00, //@@.....@@+. - 0xff, 0x00, 0x02, 0xef, 0x60, 0x00, //@@....@@+.. - 0xff, 0x00, 0x2e, 0xf6, 0x00, 0x00, //@@...@@+... - 0xff, 0x02, 0xef, 0x50, 0x00, 0x00, //@@..@@+.... - 0xff, 0x3e, 0xf4, 0x00, 0x00, 0x00, //@@.@@+..... - 0xff, 0xef, 0x40, 0x00, 0x00, 0x00, //@@@@+...... - 0xff, 0xfe, 0x20, 0x00, 0x00, 0x00, //@@@@....... - 0xff, 0x4f, 0xe2, 0x00, 0x00, 0x00, //@@+@@...... - 0xff, 0x05, 0xfe, 0x30, 0x00, 0x00, //@@.+@@..... - 0xff, 0x00, 0x5f, 0xe3, 0x00, 0x00, //@@..+@@.... - 0xff, 0x00, 0x06, 0xff, 0x30, 0x00, //@@...+@@... - 0xff, 0x00, 0x00, 0x6f, 0xf4, 0x00, //@@....+@@.. - 0xff, 0x00, 0x00, 0x07, 0xff, 0x40, //@@.....+@@+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+004c (L) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+004d (M) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xff, 0xf6, 0x00, 0x00, 0x4f, 0xff, //@@@+....+@@@ - 0xff, 0xfc, 0x00, 0x00, 0xaf, 0xff, //@@@%....%@@@ - 0xff, 0xaf, 0x20, 0x01, 0xfa, 0xff, //@@%@....@%@@ - 0xff, 0x4f, 0x80, 0x07, 0xf4, 0xff, //@@.@+..+@.@@ - 0xff, 0x0e, 0xd0, 0x0d, 0xd0, 0xff, //@@.@@..@@.@@ - 0xff, 0x08, 0xf3, 0x3f, 0x80, 0xff, //@@.%@..@+.@@ - 0xff, 0x02, 0xf9, 0x9f, 0x20, 0xff, //@@..@%%@..@@ - 0xff, 0x00, 0xcf, 0xfc, 0x00, 0xff, //@@..@@@@..@@ - 0xff, 0x00, 0x6f, 0xf6, 0x00, 0xff, //@@..+@@+..@@ - 0xff, 0x00, 0x0f, 0xf0, 0x00, 0xff, //@@...@@...@@ - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, //@@........@@ - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, //@@........@@ - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, //@@........@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+004e (N) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0x80, 0x00, 0x00, 0xff, //@@%.....@@ - 0xff, 0xf2, 0x00, 0x00, 0xff, //@@@.....@@ - 0xff, 0xfb, 0x00, 0x00, 0xff, //@@@%....@@ - 0xff, 0xbf, 0x40, 0x00, 0xff, //@@%@+...@@ - 0xff, 0x2f, 0xd0, 0x00, 0xff, //@@.@@...@@ - 0xff, 0x08, 0xf7, 0x00, 0xff, //@@.%@+..@@ - 0xff, 0x01, 0xef, 0x10, 0xff, //@@..@@..@@ - 0xff, 0x00, 0x6f, 0xa0, 0xff, //@@..+@%.@@ - 0xff, 0x00, 0x0d, 0xf4, 0xff, //@@...@@.@@ - 0xff, 0x00, 0x04, 0xfd, 0xff, //@@...+@@@@ - 0xff, 0x00, 0x00, 0xaf, 0xff, //@@....%@@@ - 0xff, 0x00, 0x00, 0x2f, 0xff, //@@.....@@@ - 0xff, 0x00, 0x00, 0x08, 0xff, //@@.....%@@ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+004f (O) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x07, 0xdf, 0xfd, 0x80, 0x00, //...+@@@@+... - 0x02, 0xef, 0xff, 0xff, 0xfe, 0x20, //..@@@@@@@@.. - 0x0d, 0xfc, 0x40, 0x04, 0xcf, 0xd0, //.@@@+..+@@@. - 0x6f, 0xd0, 0x00, 0x00, 0x0d, 0xf6, //+@@......@@+ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfb, //%@+......+@% - 0xef, 0x10, 0x00, 0x00, 0x01, 0xfe, //@@........@@ - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, //@@........@@ - 0xef, 0x10, 0x00, 0x00, 0x01, 0xfe, //@@........@@ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfb, //%@+......+@% - 0x6f, 0xd0, 0x00, 0x00, 0x0d, 0xf6, //+@@......@@+ - 0x0d, 0xfc, 0x40, 0x04, 0xcf, 0xd0, //.@@@+..+@@@. - 0x02, 0xef, 0xff, 0xff, 0xfe, 0x20, //..@@@@@@@@.. - 0x00, 0x08, 0xdf, 0xfd, 0x80, 0x00, //...+@@@@+... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0050 (P) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xfc, 0x40, //@@@@@%+. - 0xff, 0xff, 0xff, 0xf4, //@@@@@@@+ - 0xff, 0x00, 0x1a, 0xfc, //@@...%@@ - 0xff, 0x00, 0x01, 0xff, //@@....@@ - 0xff, 0x00, 0x01, 0xff, //@@....@@ - 0xff, 0x00, 0x1a, 0xfc, //@@...%@@ - 0xff, 0xff, 0xff, 0xf4, //@@@@@@@+ - 0xff, 0xff, 0xfc, 0x40, //@@@@@@+. - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0051 (Q) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x07, 0xdf, 0xfd, 0x81, 0x00, //...+@@@@%... - 0x02, 0xef, 0xff, 0xff, 0xfe, 0x20, //..@@@@@@@@.. - 0x0d, 0xfc, 0x40, 0x04, 0xcf, 0xd0, //.@@@+..+@@@. - 0x6f, 0xd0, 0x00, 0x00, 0x0d, 0xf7, //+@@......@@+ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfc, //%@+......+@@ - 0xef, 0x10, 0x00, 0x00, 0x01, 0xfe, //@@........@@ - 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, //@@........@@ - 0xef, 0x10, 0x00, 0x00, 0x01, 0xfd, //@@........@@ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfb, //%@+......+@% - 0x6f, 0xd0, 0x00, 0x00, 0x0d, 0xf4, //+@@......@@+ - 0x0d, 0xfc, 0x40, 0x04, 0xcf, 0xa0, //.@@@+..+@@%. - 0x02, 0xef, 0xff, 0xff, 0xfa, 0x00, //..@@@@@@@%.. - 0x00, 0x18, 0xdf, 0xff, 0xa0, 0x00, //...%@@@@%... - 0x00, 0x00, 0x00, 0x4f, 0xf6, 0x00, //......+@@+.. - 0x00, 0x00, 0x00, 0x06, 0xff, 0x40, //.......+@@+. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0052 (R) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0xff, 0xfc, 0x50, 0x00, //@@@@@@+... - 0xff, 0xff, 0xff, 0xf5, 0x00, //@@@@@@@+.. - 0xff, 0x00, 0x1a, 0xfc, 0x00, //@@...%@@.. - 0xff, 0x00, 0x01, 0xff, 0x00, //@@....@@.. - 0xff, 0x00, 0x01, 0xfe, 0x00, //@@....@@.. - 0xff, 0x00, 0x1a, 0xfa, 0x00, //@@...%@%.. - 0xff, 0xff, 0xff, 0xc1, 0x00, //@@@@@@@... - 0xff, 0xff, 0xff, 0x40, 0x00, //@@@@@@+... - 0xff, 0x00, 0x5f, 0xf3, 0x00, //@@..+@@... - 0xff, 0x00, 0x07, 0xfc, 0x00, //@@...+@@.. - 0xff, 0x00, 0x00, 0xdf, 0x60, //@@....@@+. - 0xff, 0x00, 0x00, 0x4f, 0xe1, //@@....+@@. - 0xff, 0x00, 0x00, 0x0a, 0xfa, //@@.....%@% - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0053 (S) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x03, 0xbe, 0xfd, 0x93, 0x00, //..%@@@%.. - 0x5f, 0xff, 0xff, 0xff, 0x00, //+@@@@@@@. - 0xdf, 0xb2, 0x01, 0x5b, 0x00, //@@%...+%. - 0xff, 0x10, 0x00, 0x00, 0x00, //@@....... - 0xdf, 0x71, 0x00, 0x00, 0x00, //@@+...... - 0x5f, 0xff, 0xda, 0x50, 0x00, //+@@@@%+.. - 0x04, 0xbf, 0xff, 0xfc, 0x10, //..%@@@@@. - 0x00, 0x00, 0x26, 0xdf, 0x90, //.....+@@% - 0x00, 0x00, 0x00, 0x2f, 0xe0, //.......@@ - 0x00, 0x00, 0x00, 0x1f, 0xf0, //.......@@ - 0xc6, 0x20, 0x03, 0xcf, 0xd0, //@+....%@@ - 0xff, 0xff, 0xff, 0xff, 0x50, //@@@@@@@@+ - 0x38, 0xdf, 0xfe, 0xa3, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0054 (T) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0055 (U) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xff, 0x00, 0x00, 0x00, 0xff, //@@......@@ - 0xef, 0x10, 0x00, 0x01, 0xfe, //@@......@@ - 0xcf, 0x50, 0x00, 0x05, 0xfc, //@@+....+@@ - 0x6f, 0xe5, 0x11, 0x5e, 0xf6, //+@@+..+@@+ - 0x0c, 0xff, 0xff, 0xff, 0xc0, //.@@@@@@@@. - 0x00, 0x7d, 0xff, 0xd7, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0056 (V) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xcf, 0x50, 0x00, 0x00, 0x05, 0xfc, //@@+......+@@ - 0x6f, 0xb0, 0x00, 0x00, 0x0b, 0xf6, //+@%......%@+ - 0x0f, 0xf1, 0x00, 0x00, 0x1f, 0xf0, //.@@......@@. - 0x09, 0xf7, 0x00, 0x00, 0x7f, 0x90, //.%@+....+@%. - 0x03, 0xfd, 0x00, 0x00, 0xdf, 0x30, //..@@....@@.. - 0x00, 0xdf, 0x30, 0x04, 0xfd, 0x00, //..@@....@@.. - 0x00, 0x6f, 0xa0, 0x0a, 0xf7, 0x00, //..+@%..%@+.. - 0x00, 0x1f, 0xf0, 0x0f, 0xf1, 0x00, //...@@..@@... - 0x00, 0x0a, 0xf6, 0x6f, 0xa0, 0x00, //...%@++@%... - 0x00, 0x04, 0xfc, 0xcf, 0x40, 0x00, //....@@@@+... - 0x00, 0x00, 0xdf, 0xfd, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x7f, 0xf7, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x1f, 0xf1, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0057 (W) , Width: 17 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0xdf, 0x20, 0x00, 0x3f, 0xff, 0x20, 0x00, 0x2f, 0xd0, //@@.....@@@.....@@ - 0x9f, 0x60, 0x00, 0x7f, 0xff, 0x60, 0x00, 0x6f, 0x90, //%@+...+@@@+...+@% - 0x5f, 0xb0, 0x00, 0xbf, 0x9f, 0xa0, 0x00, 0xaf, 0x50, //+@%...%@%@%...%@+ - 0x1f, 0xe0, 0x00, 0xff, 0x1f, 0xe0, 0x00, 0xef, 0x10, //.@@...@@.@@...@@. - 0x0d, 0xf3, 0x03, 0xfc, 0x0c, 0xf2, 0x02, 0xfd, 0x00, //.@@...@@.@@...@@. - 0x09, 0xf7, 0x07, 0xf8, 0x08, 0xf6, 0x06, 0xf9, 0x00, //.%@+.+@%.%@+.+@%. - 0x05, 0xfb, 0x0b, 0xf4, 0x04, 0xfa, 0x0a, 0xf4, 0x00, //.+@%.%@+.+@%.%@+. - 0x01, 0xfe, 0x0f, 0xf0, 0x00, 0xfe, 0x0e, 0xf0, 0x00, //..@@.@@...@@.@@.. - 0x00, 0xcf, 0x6f, 0xc0, 0x00, 0xcf, 0x5f, 0xc0, 0x00, //..@@+@@...@@+@@.. - 0x00, 0x8f, 0xef, 0x80, 0x00, 0x8f, 0xdf, 0x80, 0x00, //..%@@@%...%@@@%.. - 0x00, 0x4f, 0xff, 0x40, 0x00, 0x4f, 0xff, 0x40, 0x00, //..+@@@+...+@@@+.. - 0x00, 0x0f, 0xff, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, //...@@@.....@@@... - 0x00, 0x0c, 0xfc, 0x00, 0x00, 0x0c, 0xfc, 0x00, 0x00, //...@@@.....@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - - - /*Unicode: U+0058 (X) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x0b, 0xfb, 0x00, 0x00, 0xbf, 0xa0, //.%@%....%@% - 0x02, 0xff, 0x40, 0x06, 0xfe, 0x10, //..@@+..+@@. - 0x00, 0x8f, 0xd0, 0x1f, 0xf5, 0x00, //..%@@..@@+. - 0x00, 0x0e, 0xf7, 0xbf, 0xb0, 0x00, //...@@+%@%.. - 0x00, 0x05, 0xff, 0xfe, 0x10, 0x00, //...+@@@@... - 0x00, 0x00, 0xcf, 0xf6, 0x00, 0x00, //....%@@+... - 0x00, 0x00, 0xbf, 0xf3, 0x00, 0x00, //....%@@.... - 0x00, 0x05, 0xff, 0xfc, 0x00, 0x00, //...+@@@@... - 0x00, 0x1e, 0xf7, 0xef, 0x50, 0x00, //...@@+@@+.. - 0x00, 0xaf, 0xb0, 0x6f, 0xe0, 0x00, //..%@%.+@@.. - 0x05, 0xff, 0x20, 0x0d, 0xf8, 0x00, //.+@@...@@%. - 0x1e, 0xf7, 0x00, 0x03, 0xff, 0x20, //.@@+....@@. - 0xaf, 0xc0, 0x00, 0x00, 0xaf, 0xb0, //%@@.....%@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0059 (Y) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xaf, 0xc0, 0x00, 0x00, 0x0c, 0xfa, //%@@......@@% - 0x0d, 0xf7, 0x00, 0x00, 0x7f, 0xd0, //.@@+....+@@. - 0x03, 0xff, 0x20, 0x02, 0xff, 0x30, //..@@....@@.. - 0x00, 0x6f, 0xb0, 0x0b, 0xf6, 0x00, //..+@%..%@+.. - 0x00, 0x0b, 0xf6, 0x6f, 0xb0, 0x00, //...%@++@%... - 0x00, 0x01, 0xef, 0xfe, 0x10, 0x00, //....@@@@.... - 0x00, 0x00, 0x3f, 0xf3, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+005a (Z) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x0b, 0xfe, 0x10, //.......%@@. - 0x00, 0x00, 0x00, 0x8f, 0xf3, 0x00, //......%@@.. - 0x00, 0x00, 0x05, 0xff, 0x60, 0x00, //.....+@@+.. - 0x00, 0x00, 0x2f, 0xf9, 0x00, 0x00, //.....@@%... - 0x00, 0x00, 0xdf, 0xb0, 0x00, 0x00, //....@@%.... - 0x00, 0x0a, 0xfd, 0x10, 0x00, 0x00, //...%@@..... - 0x00, 0x7f, 0xf2, 0x00, 0x00, 0x00, //..+@@...... - 0x04, 0xff, 0x50, 0x00, 0x00, 0x00, //.+@@+...... - 0x1e, 0xf8, 0x00, 0x00, 0x00, 0x00, //.@@%....... - 0xcf, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005b ([) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0xff, 0xff, //@@@@ - 0xff, 0xff, //@@@@ - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0x00, //@@.. - 0xff, 0xff, //@@@@ - 0xff, 0xff, //@@@@ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - - - /*Unicode: U+005c (\) , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0xdf, 0x30, 0x00, //@@.... - 0x9f, 0x70, 0x00, //%@+... - 0x5f, 0xb0, 0x00, //+@%... - 0x1f, 0xf0, 0x00, //.@@... - 0x0d, 0xf4, 0x00, //.@@+.. - 0x08, 0xf8, 0x00, //.%@%.. - 0x04, 0xfc, 0x00, //.+@@.. - 0x00, 0xff, 0x00, //..@@.. - 0x00, 0xcf, 0x40, //..@@+. - 0x00, 0x8f, 0x90, //..+@%. - 0x00, 0x3f, 0xd0, //...@@. - 0x00, 0x0f, 0xf1, //...@@. - 0x00, 0x0b, 0xf5, //...%@+ - 0x00, 0x07, 0xf9, //...+@% - 0x00, 0x03, 0xfd, //....@@ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+005d (]) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0xff, 0xff, //@@@@ - 0xff, 0xff, //@@@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0xff, 0xff, //@@@@ - 0xff, 0xff, //@@@@ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - - - /*Unicode: U+005e (^) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0xcf, 0xc0, 0x00, 0x00, //....@@@.... - 0x00, 0x0b, 0xfa, 0xfb, 0x00, 0x00, //...%@%@%... - 0x00, 0xaf, 0x60, 0x6f, 0xa0, 0x00, //..%@+.+@%.. - 0x09, 0xf5, 0x00, 0x05, 0xf9, 0x00, //.%@+...+@%. - 0x8f, 0x40, 0x00, 0x00, 0x4f, 0x80, //%@+.....+@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005f (_) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xf0, //@@@@@@@@@ - - - /*Unicode: U+0060 (`) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x8e, 0x10, //%@.. - 0x0a, 0xc0, //.%@. - 0x00, 0xb9, //..%% - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0x00, //.... - - - /*Unicode: U+0061 (a) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x04, 0xbe, 0xfc, 0x40, //.+%@@@+. - 0x0f, 0xff, 0xff, 0xf3, //.@@@@@@. - 0x0a, 0x30, 0x2a, 0xfa, //.%...%@% - 0x00, 0x00, 0x01, 0xfe, //......@@ - 0x07, 0xcf, 0xff, 0xff, //.+@@@@@@ - 0x8f, 0xff, 0xff, 0xff, //%@@@@@@@ - 0xef, 0x51, 0x01, 0xff, //@@+...@@ - 0xef, 0x40, 0x2a, 0xff, //@@+..%@@ - 0xaf, 0xff, 0xfa, 0xff, //%@@@@%@@ - 0x1a, 0xee, 0x90, 0xff, //.%@@%.@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0062 (b) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x09, 0xef, 0xa1, 0x00, //@@.%@@%.. - 0xff, 0xaf, 0xff, 0xfe, 0x10, //@@%@@@@@. - 0xff, 0xd3, 0x03, 0xef, 0x80, //@@@...@@% - 0xff, 0x40, 0x00, 0x4f, 0xd0, //@@+...+@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x40, 0x00, 0x4f, 0xd0, //@@+...+@@ - 0xff, 0xd3, 0x03, 0xef, 0x80, //@@@...@@% - 0xff, 0xaf, 0xff, 0xfe, 0x10, //@@%@@@@@. - 0xff, 0x09, 0xef, 0xa2, 0x00, //@@.%@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0063 (c) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x6c, 0xff, 0xb4, //..+@@@%+ - 0x0b, 0xff, 0xff, 0xff, //.%@@@@@@ - 0x7f, 0xf6, 0x10, 0x3a, //+@@+...% - 0xcf, 0x60, 0x00, 0x00, //@@+..... - 0xff, 0x10, 0x00, 0x00, //@@...... - 0xff, 0x10, 0x00, 0x00, //@@...... - 0xcf, 0x60, 0x00, 0x00, //@@+..... - 0x7f, 0xf6, 0x10, 0x3a, //+@@+...% - 0x0b, 0xff, 0xff, 0xff, //.%@@@@@@ - 0x00, 0x7d, 0xff, 0xb4, //..+@@@%+ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0064 (d) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x02, 0xaf, 0xe9, 0x0f, 0xf0, //..%@@%.@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x8f, 0xd3, 0x03, 0xef, 0xf0, //%@@...@@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0x8f, 0xd3, 0x03, 0xef, 0xf0, //%@@...@@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x02, 0xbf, 0xe9, 0x0f, 0xf0, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0065 (e) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x5b, 0xef, 0xd8, 0x00, //..+%@@@%.. - 0x0a, 0xff, 0xff, 0xff, 0xd0, //.%@@@@@@@. - 0x6f, 0xe5, 0x10, 0x3c, 0xf8, //+@@+...@@% - 0xcf, 0x30, 0x00, 0x02, 0xfd, //@@......@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xcf, 0x30, 0x00, 0x00, 0x00, //@@........ - 0x6f, 0xe6, 0x10, 0x02, 0x6c, //+@@+....+@ - 0x09, 0xff, 0xff, 0xff, 0xff, //.%@@@@@@@@ - 0x00, 0x4a, 0xef, 0xfd, 0x82, //..+%@@@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0066 (f) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x08, 0xdf, 0xf0, //...%@@@ - 0x00, 0x8f, 0xff, 0xf0, //..%@@@@ - 0x00, 0xdf, 0x50, 0x00, //..@@+.. - 0x00, 0xff, 0x00, 0x00, //..@@... - 0xff, 0xff, 0xff, 0xf0, //@@@@@@@ - 0xff, 0xff, 0xff, 0xf0, //@@@@@@@ - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0xff, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0067 (g) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x02, 0xbf, 0xe9, 0x0f, 0xf0, //..%@@%.@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x8f, 0xd3, 0x03, 0xdf, 0xf0, //%@@...@@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0x8f, 0xd3, 0x03, 0xdf, 0xf0, //%@@...@@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x02, 0xbf, 0xe9, 0x2f, 0xe0, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x6f, 0xb0, //......+@% - 0x0a, 0x30, 0x16, 0xff, 0x60, //.%...+@@+ - 0x0f, 0xff, 0xff, 0xfc, 0x00, //.@@@@@@@. - 0x04, 0xbe, 0xfd, 0x80, 0x00, //.+%@@@%.. - - - /*Unicode: U+0068 (h) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x00, 0x00, 0x00, //@@...... - 0xff, 0x09, 0xfe, 0x80, //@@.%@@%. - 0xff, 0xaf, 0xff, 0xf6, //@@%@@@@+ - 0xff, 0xc2, 0x09, 0xfc, //@@@..%@@ - 0xff, 0x30, 0x01, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0069 (i) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006a (j) , Width: 4 */ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0x00, //.... - 0x00, 0x00, //.... - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x00, 0xff, //..@@ - 0x07, 0xfd, //.+@@ - 0xff, 0xf7, //@@@+ - 0xfd, 0x70, //@@+. - - - /*Unicode: U+006b (k) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x03, 0xef, 0x70, //@@....@@+ - 0xff, 0x00, 0x4f, 0xf6, 0x00, //@@..+@@+. - 0xff, 0x04, 0xff, 0x50, 0x00, //@@.+@@+.. - 0xff, 0x5f, 0xf4, 0x00, 0x00, //@@+@@+... - 0xff, 0xfe, 0x30, 0x00, 0x00, //@@@@..... - 0xff, 0xff, 0x50, 0x00, 0x00, //@@@@+.... - 0xff, 0x6f, 0xf5, 0x00, 0x00, //@@+@@+... - 0xff, 0x06, 0xff, 0x60, 0x00, //@@.+@@+.. - 0xff, 0x00, 0x7f, 0xf6, 0x00, //@@..+@@+. - 0xff, 0x00, 0x07, 0xff, 0x70, //@@...+@@+ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+006c (l) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0x00, //.. - 0x00, //.. - 0x00, //.. - 0x00, //.. - - - /*Unicode: U+006d (m) , Width: 14 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0xff, 0x09, 0xfe, 0x60, 0x1a, 0xee, 0x80, //@@.%@@+..%@@%. - 0xff, 0xaf, 0xff, 0xf4, 0xcf, 0xff, 0xf5, //@@%@@@@+@@@@@+ - 0xff, 0xc2, 0x09, 0xfe, 0xc2, 0x09, 0xfc, //@@@..%@@@..%@@ - 0xff, 0x30, 0x01, 0xff, 0x30, 0x01, 0xfe, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, //@@....@@....@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - - - /*Unicode: U+006e (n) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0x09, 0xfe, 0x80, //@@.%@@%. - 0xff, 0xaf, 0xff, 0xf6, //@@%@@@@+ - 0xff, 0xc2, 0x09, 0xfc, //@@@..%@@ - 0xff, 0x30, 0x01, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+006f (o) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x7c, 0xff, 0xc7, 0x00, //..+@@@@+.. - 0x0c, 0xff, 0xff, 0xff, 0xb0, //.%@@@@@@%. - 0x7f, 0xe6, 0x11, 0x6f, 0xf7, //+@@+..+@@+ - 0xdf, 0x50, 0x00, 0x06, 0xfc, //@@+....+@@ - 0xff, 0x10, 0x00, 0x01, 0xff, //@@......@@ - 0xff, 0x10, 0x00, 0x01, 0xff, //@@......@@ - 0xdf, 0x50, 0x00, 0x06, 0xfc, //@@+....+@@ - 0x7f, 0xe5, 0x11, 0x5e, 0xf7, //+@@+..+@@+ - 0x0c, 0xff, 0xff, 0xff, 0xb0, //.%@@@@@@%. - 0x00, 0x7d, 0xff, 0xd7, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0070 (p) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0x09, 0xef, 0xa1, 0x00, //@@.%@@%.. - 0xff, 0xaf, 0xff, 0xfe, 0x10, //@@%@@@@@. - 0xff, 0xd3, 0x03, 0xef, 0x80, //@@@...@@% - 0xff, 0x40, 0x00, 0x4f, 0xd0, //@@+...+@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x40, 0x00, 0x4f, 0xd0, //@@+...+@@ - 0xff, 0xd3, 0x03, 0xef, 0x80, //@@@...@@% - 0xff, 0xaf, 0xff, 0xfe, 0x10, //@@%@@@@@. - 0xff, 0x09, 0xef, 0xa2, 0x00, //@@.%@@%.. - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0x00, 0x00, 0x00, 0x00, //@@....... - - - /*Unicode: U+0071 (q) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x02, 0xaf, 0xe9, 0x0f, 0xf0, //..%@@%.@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x8f, 0xd3, 0x03, 0xef, 0xf0, //%@@...@@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xff, 0x00, 0x00, 0x1f, 0xf0, //@@.....@@ - 0xdf, 0x40, 0x00, 0x4f, 0xf0, //@@+...+@@ - 0x8f, 0xd3, 0x03, 0xef, 0xf0, //%@@...@@@ - 0x1e, 0xff, 0xff, 0xaf, 0xf0, //.@@@@@%@@ - 0x02, 0xbf, 0xe9, 0x0f, 0xf0, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - 0x00, 0x00, 0x00, 0x0f, 0xf0, //.......@@ - - - /*Unicode: U+0072 (r) , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0xff, 0x09, 0xef, //@@.%@@ - 0xff, 0xaf, 0xff, //@@%@@@ - 0xff, 0xe4, 0x00, //@@@+.. - 0xff, 0x50, 0x00, //@@+... - 0xff, 0x10, 0x00, //@@.... - 0xff, 0x00, 0x00, //@@.... - 0xff, 0x00, 0x00, //@@.... - 0xff, 0x00, 0x00, //@@.... - 0xff, 0x00, 0x00, //@@.... - 0xff, 0x00, 0x00, //@@.... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0073 (s) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x08, 0xdf, 0xfb, 0x40, //.+@@@%+ - 0x9f, 0xff, 0xff, 0xf0, //%@@@@@@ - 0xef, 0x71, 0x03, 0xa0, //@@+...% - 0xdf, 0xb7, 0x30, 0x00, //@@%+... - 0x4e, 0xff, 0xfd, 0x20, //+@@@@@. - 0x00, 0x48, 0xef, 0xc0, //..+%@@% - 0x00, 0x00, 0x1f, 0xf0, //.....@@ - 0xb4, 0x00, 0x6f, 0xf0, //%+..+@@ - 0xff, 0xff, 0xff, 0xa0, //@@@@@@% - 0x3a, 0xef, 0xd7, 0x00, //.%@@@+. - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0074 (t) , Width: 6 */ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0xff, 0xff, 0xff, //@@@@@@ - 0xff, 0xff, 0xff, //@@@@@@ - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0x0f, 0xf0, 0x00, //.@@... - 0x0e, 0xf4, 0x00, //.@@+.. - 0x0a, 0xff, 0xff, //.%@@@@ - 0x01, 0xae, 0xff, //..%@@@ - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0075 (u) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xff, 0x00, 0x00, 0xff, //@@....@@ - 0xef, 0x10, 0x03, 0xff, //@@....@@ - 0xcf, 0x90, 0x2c, 0xff, //@@%..@@@ - 0x6f, 0xff, 0xfa, 0xff, //+@@@@%@@ - 0x08, 0xef, 0xa0, 0xff, //.%@@%.@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0076 (v) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x1f, 0xf1, 0x00, 0x00, 0x0e, 0xe0, //.@@......@@. - 0x0a, 0xf7, 0x00, 0x00, 0x6f, 0x80, //.%@+....+@%. - 0x04, 0xfc, 0x00, 0x00, 0xcf, 0x20, //..@@....@@.. - 0x00, 0xdf, 0x20, 0x03, 0xfc, 0x00, //..@@....@@.. - 0x00, 0x7f, 0x80, 0x09, 0xf6, 0x00, //..+@%..%@+.. - 0x00, 0x1f, 0xd0, 0x0f, 0xf0, 0x00, //...@@..@@... - 0x00, 0x0a, 0xf3, 0x6f, 0x90, 0x00, //...%@.+@%... - 0x00, 0x04, 0xf9, 0xcf, 0x30, 0x00, //...+@%@@.... - 0x00, 0x00, 0xdf, 0xfd, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x7f, 0xf7, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0077 (w) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x0f, 0xf0, 0x00, 0xcf, 0xc0, 0x00, 0xff, 0x00, //.@@...@@@...@@. - 0x0c, 0xf3, 0x01, 0xff, 0xf0, 0x03, 0xfc, 0x00, //.@@...@@@...@@. - 0x08, 0xf7, 0x04, 0xfd, 0xf4, 0x07, 0xf8, 0x00, //.%@+.+@@@+.+@%. - 0x04, 0xfa, 0x08, 0xf5, 0xf8, 0x0a, 0xf4, 0x00, //.+@%.%@+@%.%@+. - 0x00, 0xfd, 0x0c, 0xe0, 0xec, 0x0d, 0xf0, 0x00, //..@@.@@.@@.@@.. - 0x00, 0xcf, 0x2f, 0x90, 0xaf, 0x1f, 0xc0, 0x00, //..@@.@%.%@.@@.. - 0x00, 0x8f, 0x9f, 0x50, 0x5f, 0x8f, 0x80, 0x00, //..%@%@+.+@%@%.. - 0x00, 0x5f, 0xff, 0x10, 0x1f, 0xef, 0x50, 0x00, //..+@@@...@@@+.. - 0x00, 0x1f, 0xfc, 0x00, 0x0d, 0xff, 0x10, 0x00, //...@@@...@@@... - 0x00, 0x0d, 0xf8, 0x00, 0x08, 0xfd, 0x00, 0x00, //...@@%...%@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0078 (x) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xaf, 0xd0, 0x00, 0x0d, 0xfa, //%@@....@@% - 0x1e, 0xf5, 0x00, 0x5f, 0xd0, //.@@+..+@@. - 0x04, 0xfd, 0x00, 0xdf, 0x30, //.+@@..@@.. - 0x00, 0x9f, 0x55, 0xf8, 0x00, //..%@++@%.. - 0x00, 0x0d, 0xdd, 0xc0, 0x00, //...@@@@... - 0x00, 0x1e, 0xef, 0xe1, 0x00, //...@@@@... - 0x00, 0xaf, 0x57, 0xfa, 0x00, //..%@++@%.. - 0x05, 0xfd, 0x00, 0xef, 0x50, //.+@@..@@+. - 0x1e, 0xf4, 0x00, 0x5f, 0xe1, //.@@+..+@@. - 0xaf, 0xc0, 0x00, 0x0c, 0xfa, //%@@....@@% - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0079 (y) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x2f, 0xf1, 0x00, 0x00, 0x0f, 0xf2, //.@@......@@. - 0x0a, 0xf7, 0x00, 0x00, 0x7f, 0xa0, //.%@+....+@%. - 0x03, 0xfe, 0x00, 0x00, 0xef, 0x30, //..@@....@@.. - 0x00, 0xbf, 0x50, 0x05, 0xfc, 0x00, //..%@+..+@@.. - 0x00, 0x3f, 0xd0, 0x0c, 0xf4, 0x00, //...@@..@@+.. - 0x00, 0x0c, 0xf4, 0x3f, 0xd0, 0x00, //...@@+.@@... - 0x00, 0x04, 0xfb, 0xaf, 0x60, 0x00, //...+@%%@+... - 0x00, 0x00, 0xdf, 0xfe, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x5f, 0xf7, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x2f, 0xe0, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x6f, 0x80, 0x00, 0x00, //....+@%..... - 0x00, 0x01, 0xbf, 0x20, 0x00, 0x00, //....%@...... - 0x00, 0xff, 0xfb, 0x00, 0x00, 0x00, //..@@@%...... - 0x00, 0xff, 0xb1, 0x00, 0x00, 0x00, //..@@%....... - - - /*Unicode: U+007a (z) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xfd, //@@@@@@@@ - 0x00, 0x00, 0x4f, 0xf3, //....+@@. - 0x00, 0x01, 0xef, 0x70, //....@@+. - 0x00, 0x0c, 0xfc, 0x00, //...@@@.. - 0x00, 0x9f, 0xe1, 0x00, //..%@@... - 0x05, 0xff, 0x50, 0x00, //.+@@+... - 0x2f, 0xfa, 0x00, 0x00, //.@@%.... - 0xdf, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007b ({) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x01, 0x9d, 0xff, //....%@@@ - 0x00, 0x0a, 0xff, 0xff, //...%@@@@ - 0x00, 0x0e, 0xf6, 0x00, //...@@+.. - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x01, 0x8f, 0xc0, 0x00, //..%@@... - 0xff, 0xfc, 0x30, 0x00, //@@@@.... - 0xff, 0xfc, 0x20, 0x00, //@@@@.... - 0x01, 0xaf, 0xb0, 0x00, //..%@%... - 0x00, 0x1f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0e, 0xf7, 0x00, //...@@+.. - 0x00, 0x09, 0xff, 0xff, //...%@@@@ - 0x00, 0x00, 0x9d, 0xff, //....%@@@ - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007c (|) , Width: 2 */ - 0x00, //.. - 0x00, //.. - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - 0xff, //@@ - - - /*Unicode: U+007d (}) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xd9, 0x10, 0x00, //@@@%.... - 0xff, 0xff, 0xa0, 0x00, //@@@@%... - 0x00, 0x6f, 0xe0, 0x00, //..+@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0c, 0xf8, 0x10, //...@@%.. - 0x00, 0x03, 0xcf, 0xff, //....@@@@ - 0x00, 0x02, 0xcf, 0xff, //....@@@@ - 0x00, 0x0b, 0xfa, 0x10, //...%@%.. - 0x00, 0x0f, 0xf1, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x0f, 0xf0, 0x00, //...@@... - 0x00, 0x7f, 0xe0, 0x00, //..+@@... - 0xff, 0xff, 0x90, 0x00, //@@@@%... - 0xff, 0xd9, 0x00, 0x00, //@@@%.... - 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007e (~) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x18, 0xef, 0xd8, 0x30, 0x05, 0xd0, //.%@@@%...+@ - 0xef, 0xff, 0xff, 0xff, 0xff, 0xe0, //@@@@@@@@@@@ - 0xe6, 0x10, 0x48, 0xdf, 0xe9, 0x10, //@+...%@@@%. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - -#elif LV_USE_FONT_DEJAVU_20 == 8 - /*Unicode: U+0020 ( ) , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0021 (!) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xf4, 0xf2, //@@ - 0xe4, 0xe2, //@@ - 0xd2, 0xd2, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+0022 (") , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, //@@..@@ - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, //@@..@@ - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, //@@..@@ - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, //@@..@@ - 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, //@@..@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0023 (#) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x2a, 0xff, 0x36, 0x00, 0x44, 0xff, 0x16, 0x00, //.....@..+@.. - 0x00, 0x00, 0x00, 0x00, 0x62, 0xf6, 0x04, 0x00, 0x7e, 0xde, 0x00, 0x00, //....+@..+@.. - 0x00, 0x00, 0x00, 0x00, 0x9a, 0xc4, 0x00, 0x00, 0xb8, 0xa6, 0x00, 0x00, //....%@..%%.. - 0x00, 0x00, 0x00, 0x00, 0xd2, 0x8a, 0x00, 0x00, 0xee, 0x6e, 0x00, 0x00, //....@%..@+.. - 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //.@@@@@@@@@@@ - 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //.@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x70, 0xea, 0x04, 0x00, 0x90, 0xd2, 0x00, 0x00, 0x00, //...+@..%@... - 0x00, 0x00, 0x00, 0xcc, 0x94, 0x00, 0x02, 0xe6, 0x78, 0x00, 0x00, 0x00, //...@%..@+... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, //@@@@@@@@@@@. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, //@@@@@@@@@@@. - 0x00, 0x00, 0x66, 0xf0, 0x00, 0x00, 0x86, 0xd6, 0x00, 0x00, 0x00, 0x00, //..+@..%@.... - 0x00, 0x00, 0xa0, 0xba, 0x00, 0x00, 0xbe, 0x9c, 0x00, 0x00, 0x00, 0x00, //..%%..%%.... - 0x00, 0x00, 0xd8, 0x82, 0x00, 0x02, 0xf2, 0x64, 0x00, 0x00, 0x00, 0x00, //..@%..@+.... - 0x00, 0x12, 0xff, 0x4a, 0x00, 0x2e, 0xff, 0x2a, 0x00, 0x00, 0x00, 0x00, //..@+..@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0024 ($) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //....@.... - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //....@.... - 0x00, 0x42, 0xb4, 0xe6, 0xff, 0xea, 0xac, 0x3c, 0x00, //.+%@@@%.. - 0x66, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //+@@@@@@@. - 0xe0, 0xff, 0x9c, 0x18, 0xff, 0x18, 0x50, 0xc2, 0x00, //@@%.@.+@. - 0xf2, 0xff, 0x12, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //@@..@.... - 0xb6, 0xff, 0xd4, 0x86, 0xff, 0x28, 0x00, 0x00, 0x00, //%@@%@.... - 0x1c, 0xce, 0xff, 0xff, 0xff, 0xff, 0xde, 0x64, 0x00, //.@@@@@@+. - 0x00, 0x00, 0x3c, 0x7c, 0xff, 0xe0, 0xff, 0xff, 0x64, //...+@@@@+ - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x68, 0xff, 0xd6, //....@.+@@ - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x0c, 0xff, 0xf6, //....@..@@ - 0xca, 0x62, 0x16, 0x00, 0xff, 0x1c, 0x9c, 0xff, 0xe0, //@+..@.%@@ - 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0x66, //@@@@@@@@+ - 0x2e, 0x8c, 0xcc, 0xee, 0xff, 0xe4, 0xb2, 0x42, 0x00, //.%@@@@%+. - 0x00, 0x00, 0x00, 0x02, 0xff, 0x00, 0x00, 0x00, 0x00, //....@.... - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //....@.... - 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, //....@.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0025 (%) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x04, 0x8a, 0xe6, 0xe4, 0x88, 0x04, 0x00, 0x00, 0x00, 0x00, 0x4e, 0xd4, 0x04, 0x00, 0x00, //.%@@%.....+@... - 0x7c, 0xff, 0x6a, 0x6c, 0xff, 0x78, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x3a, 0x00, 0x00, 0x00, //+@++@+....@.... - 0xda, 0xff, 0x14, 0x16, 0xff, 0xd8, 0x00, 0x00, 0x00, 0x90, 0x98, 0x00, 0x00, 0x00, 0x00, //@@..@@...%%.... - 0xf6, 0xff, 0x02, 0x02, 0xff, 0xf4, 0x00, 0x00, 0x34, 0xe4, 0x0e, 0x00, 0x00, 0x00, 0x00, //@@..@@...@..... - 0xda, 0xff, 0x14, 0x14, 0xff, 0xda, 0x00, 0x02, 0xce, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, //@@..@@..@+..... - 0x80, 0xff, 0x68, 0x68, 0xff, 0x7c, 0x00, 0x74, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //+@++@+.+%...... - 0x06, 0x8e, 0xe6, 0xe6, 0x8c, 0x04, 0x1e, 0xe8, 0x1e, 0x04, 0x8a, 0xe4, 0xe6, 0x8a, 0x04, //.%@@%..@..%@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x72, 0x00, 0x7c, 0xff, 0x6a, 0x6a, 0xff, 0x7a, //......%+.+@++@+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xce, 0x02, 0x00, 0xda, 0xff, 0x14, 0x14, 0xff, 0xda, //.....+@..@@..@@ - 0x00, 0x00, 0x00, 0x00, 0x0e, 0xe4, 0x34, 0x00, 0x00, 0xf6, 0xff, 0x02, 0x02, 0xff, 0xf4, //.....@...@@..@@ - 0x00, 0x00, 0x00, 0x00, 0x98, 0x90, 0x00, 0x00, 0x00, 0xda, 0xff, 0x14, 0x14, 0xff, 0xda, //....%%...@@..@@ - 0x00, 0x00, 0x00, 0x3a, 0xe0, 0x0c, 0x00, 0x00, 0x00, 0x7e, 0xff, 0x68, 0x68, 0xff, 0x7c, //....@....+@++@+ - 0x00, 0x00, 0x04, 0xd4, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x04, 0x8c, 0xe6, 0xe6, 0x8c, 0x04, //...@+.....%@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0026 (&) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x4a, 0xc8, 0xf6, 0xee, 0xb0, 0x42, 0x00, 0x00, 0x00, //...+@@@%+... - 0x00, 0x00, 0x54, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, //..+@@@@@@... - 0x00, 0x00, 0xde, 0xff, 0x72, 0x0e, 0x08, 0x4a, 0xc0, 0x00, 0x00, 0x00, //..@@+..+%... - 0x00, 0x00, 0xfa, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..@@........ - 0x00, 0x00, 0xb0, 0xff, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..%@%....... - 0x00, 0x04, 0x9a, 0xff, 0xff, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..%@@%...... - 0x08, 0xbc, 0xf0, 0x8e, 0xfc, 0xff, 0x96, 0x00, 0x1c, 0xff, 0xe2, 0x00, //.%@%@@%..@@. - 0x8c, 0xff, 0x58, 0x00, 0x54, 0xf8, 0xff, 0x9a, 0x54, 0xff, 0x92, 0x00, //%@+.+@@%+@%. - 0xe8, 0xff, 0x0e, 0x00, 0x00, 0x46, 0xf4, 0xff, 0xe6, 0xf0, 0x18, 0x00, //@@...+@@@@.. - 0xf0, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x66, 0xff, 0xff, 0x50, 0x00, 0x00, //@@+...+@@+.. - 0xaa, 0xff, 0xe8, 0x5a, 0x14, 0x08, 0x6e, 0xff, 0xff, 0x98, 0x00, 0x00, //%@@+..+@@%.. - 0x1c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6, 0xff, 0xff, 0x8e, 0x00, //.@@@@@@@@@%. - 0x00, 0x10, 0x88, 0xd8, 0xf8, 0xec, 0x92, 0x02, 0x56, 0xf2, 0xff, 0x84, //..%@@@%.+@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0027 (') , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+0028 (() , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x84, 0xc6, //..%@ - 0x00, 0x24, 0xf8, 0x54, //..@+ - 0x00, 0xa4, 0xee, 0x04, //.%@. - 0x18, 0xf8, 0xa2, 0x00, //.@%. - 0x6c, 0xff, 0x62, 0x00, //+@+. - 0xb0, 0xff, 0x34, 0x00, //%@.. - 0xdc, 0xff, 0x14, 0x00, //@@.. - 0xf4, 0xff, 0x06, 0x00, //@@.. - 0xf4, 0xff, 0x06, 0x00, //@@.. - 0xdc, 0xff, 0x16, 0x00, //@@.. - 0xb0, 0xff, 0x36, 0x00, //%@.. - 0x6c, 0xff, 0x66, 0x00, //+@+. - 0x18, 0xf8, 0xa6, 0x00, //.@%. - 0x00, 0xa2, 0xf0, 0x04, //.%@. - 0x00, 0x22, 0xf6, 0x56, //..@+ - 0x00, 0x00, 0x82, 0xc6, //..%@ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - - - /*Unicode: U+0029 ()) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0xc6, 0x82, 0x00, 0x00, //@%.. - 0x58, 0xf6, 0x22, 0x00, //+@.. - 0x04, 0xf0, 0xa0, 0x00, //.@%. - 0x00, 0xa6, 0xf6, 0x14, //.%@. - 0x00, 0x66, 0xff, 0x68, //.+@+ - 0x00, 0x36, 0xff, 0xae, //..@% - 0x00, 0x16, 0xff, 0xdc, //..@@ - 0x00, 0x06, 0xff, 0xf2, //..@@ - 0x00, 0x08, 0xff, 0xf2, //..@@ - 0x00, 0x16, 0xff, 0xdc, //..@@ - 0x00, 0x36, 0xff, 0xac, //..@% - 0x00, 0x66, 0xff, 0x68, //.+@+ - 0x00, 0xa6, 0xf6, 0x14, //.%@. - 0x04, 0xf0, 0xa0, 0x00, //.@%. - 0x58, 0xf6, 0x22, 0x00, //+@.. - 0xc6, 0x82, 0x00, 0x00, //@%.. - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - - - /*Unicode: U+002a (*) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, //...@... - 0xa4, 0x2c, 0x00, 0xff, 0x00, 0x2c, 0xa4, //%..@..% - 0x5e, 0xe6, 0x52, 0xff, 0x52, 0xe6, 0x5e, //+@+@+@+ - 0x00, 0x24, 0xcc, 0xff, 0xcc, 0x24, 0x00, //..@@@.. - 0x00, 0x24, 0xca, 0xff, 0xca, 0x24, 0x00, //..@@@.. - 0x5c, 0xe6, 0x52, 0xff, 0x54, 0xe6, 0x5c, //+@+@+@+ - 0xa6, 0x2c, 0x00, 0xff, 0x00, 0x2e, 0xa6, //%..@..% - 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, //...@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+002b (+) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+002c (,) , Width: 3 */ - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0xff, 0xff, //.@@ - 0x10, 0xff, 0xda, //.@@ - 0x6c, 0xf4, 0x2e, //+@. - 0xce, 0x60, 0x00, //@+. - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - - - /*Unicode: U+002d (-) , Width: 5 */ - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - 0x00, 0x00, 0x00, 0x00, 0x00, //..... - - - /*Unicode: U+002e (.) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+002f (/) , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x30, 0xff, 0xdc, //....@@ - 0x00, 0x00, 0x00, 0x74, 0xff, 0x9a, //...+@% - 0x00, 0x00, 0x00, 0xb6, 0xff, 0x58, //...%@+ - 0x00, 0x00, 0x04, 0xf4, 0xff, 0x16, //...@@. - 0x00, 0x00, 0x3c, 0xff, 0xd2, 0x00, //...@@. - 0x00, 0x00, 0x80, 0xff, 0x90, 0x00, //..+@%. - 0x00, 0x00, 0xc4, 0xff, 0x4c, 0x00, //..@@+. - 0x00, 0x0c, 0xfa, 0xfa, 0x0e, 0x00, //..@@.. - 0x00, 0x4a, 0xff, 0xc8, 0x00, 0x00, //.+@@.. - 0x00, 0x8c, 0xff, 0x84, 0x00, 0x00, //.%@%.. - 0x00, 0xd0, 0xff, 0x42, 0x00, 0x00, //.@@+.. - 0x14, 0xfc, 0xf6, 0x06, 0x00, 0x00, //.@@... - 0x56, 0xff, 0xbc, 0x00, 0x00, 0x00, //+@%... - 0x9a, 0xff, 0x7a, 0x00, 0x00, 0x00, //%@+... - 0xdc, 0xff, 0x38, 0x00, 0x00, 0x00, //@@.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0030 (0) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x06, 0x7e, 0xdc, 0xf8, 0xdc, 0x7e, 0x04, 0x00, //..+@@@+.. - 0x00, 0xac, 0xff, 0xff, 0xff, 0xff, 0xff, 0xaa, 0x00, //.%@@@@@%. - 0x46, 0xff, 0xf0, 0x46, 0x06, 0x46, 0xf0, 0xff, 0x44, //+@@+.+@@+ - 0xa2, 0xff, 0x76, 0x00, 0x00, 0x00, 0x76, 0xff, 0xa0, //%@+...+@% - 0xd6, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x2c, 0xff, 0xd6, //@@.....@@ - 0xf2, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xf0, //@@.....@@ - 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfa, //@@.....@@ - 0xf2, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xf0, //@@.....@@ - 0xd6, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x2c, 0xff, 0xd6, //@@.....@@ - 0xa2, 0xff, 0x76, 0x00, 0x00, 0x00, 0x76, 0xff, 0xa2, //%@+...+@% - 0x48, 0xff, 0xf0, 0x44, 0x06, 0x44, 0xf0, 0xff, 0x46, //+@@+.+@@+ - 0x00, 0xae, 0xff, 0xff, 0xff, 0xff, 0xff, 0xac, 0x00, //.%@@@@@%. - 0x00, 0x06, 0x80, 0xde, 0xf8, 0xde, 0x80, 0x06, 0x00, //..+@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0031 (1) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x26, 0x76, 0xc6, 0xfc, 0xff, 0x00, 0x00, 0x00, //.+@@@... - 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, //@@@@@... - 0xd4, 0x7e, 0x2a, 0xff, 0xff, 0x00, 0x00, 0x00, //@+.@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0032 (2) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x36, 0x98, 0xdc, 0xf8, 0xe0, 0xae, 0x34, 0x00, 0x00, //.%@@@%... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x50, 0x00, //@@@@@@@+. - 0xc4, 0x5e, 0x1c, 0x06, 0x2e, 0xc4, 0xff, 0xd6, 0x00, //@+...@@@. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xff, 0xf6, 0x00, //......@@. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xd2, 0x00, //......@@. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0xff, 0x7a, 0x00, //.....%@+. - 0x00, 0x00, 0x00, 0x00, 0x58, 0xfc, 0xd8, 0x08, 0x00, //....+@@.. - 0x00, 0x00, 0x00, 0x58, 0xfa, 0xf2, 0x2c, 0x00, 0x00, //...+@@... - 0x00, 0x00, 0x64, 0xfc, 0xfa, 0x4e, 0x00, 0x00, 0x00, //..+@@+... - 0x00, 0x6e, 0xff, 0xfc, 0x60, 0x00, 0x00, 0x00, 0x00, //.+@@+.... - 0x7a, 0xff, 0xfc, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, //+@@+..... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, //@@@@@@@@. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x12, //@@@@@@@@. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0033 (3) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x30, 0x8c, 0xd0, 0xf4, 0xf0, 0xd6, 0x9a, 0x2c, 0x00, //.%@@@@%.. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x56, //@@@@@@@@+ - 0xc8, 0x6a, 0x26, 0x04, 0x0c, 0x32, 0xa8, 0xff, 0xde, //@+....%@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xff, 0xee, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x0a, 0x2c, 0xa2, 0xff, 0x92, //......%@% - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xdc, 0x74, 0x02, //..@@@@@+. - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x8e, 0x04, //..@@@@@%. - 0x00, 0x00, 0x00, 0x00, 0x10, 0x44, 0xcc, 0xff, 0x8c, //.....+@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xff, 0xe6, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0xff, 0xf2, //.......@@ - 0xb8, 0x4e, 0x14, 0x02, 0x14, 0x4a, 0xd2, 0xff, 0xb6, //%+...+@@% - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xea, 0x28, //@@@@@@@@. - 0x38, 0x9e, 0xde, 0xfa, 0xf2, 0xd0, 0x8a, 0x18, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0034 (4) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xff, 0xff, 0x00, 0x00, //.....%@@.. - 0x00, 0x00, 0x00, 0x00, 0x5a, 0xf8, 0xff, 0xff, 0x00, 0x00, //....+@@@.. - 0x00, 0x00, 0x00, 0x1a, 0xee, 0x7a, 0xff, 0xff, 0x00, 0x00, //....@+@@.. - 0x00, 0x00, 0x00, 0xb6, 0xcc, 0x02, 0xff, 0xff, 0x00, 0x00, //...%@.@@.. - 0x00, 0x00, 0x66, 0xf8, 0x2c, 0x00, 0xff, 0xff, 0x00, 0x00, //..+@..@@.. - 0x00, 0x22, 0xf2, 0x7a, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //..@+..@@.. - 0x00, 0xc2, 0xca, 0x02, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //.@@...@@.. - 0x74, 0xf8, 0x2a, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //+@....@@.. - 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, //......@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0035 (5) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //.@@@@@@. - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //.@@@@@@. - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.@@..... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.@@..... - 0x00, 0xff, 0xff, 0xd4, 0xf6, 0xc4, 0x3c, 0x00, //.@@@@@.. - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x2e, //.@@@@@@. - 0x00, 0xa2, 0x26, 0x08, 0x3e, 0xd8, 0xff, 0xaa, //.%...@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xff, 0xe8, //......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xfa, //......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xff, 0xe4, //......@@ - 0xb2, 0x40, 0x0a, 0x0e, 0x4c, 0xe0, 0xff, 0x9c, //%...+@@% - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x1a, //@@@@@@@. - 0x40, 0xac, 0xea, 0xf8, 0xde, 0x96, 0x18, 0x00, //.%@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0036 (6) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x30, 0xac, 0xea, 0xf6, 0xc2, 0x4c, 0x00, //...%@@@+. - 0x00, 0x4c, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //.+@@@@@@. - 0x16, 0xee, 0xff, 0xb6, 0x2a, 0x06, 0x32, 0xb4, 0x00, //.@@%...%. - 0x80, 0xff, 0xd8, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, //+@@...... - 0xc8, 0xff, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@+...... - 0xee, 0xff, 0x34, 0x90, 0xee, 0xf2, 0xba, 0x3a, 0x00, //@@.%@@%.. - 0xfa, 0xff, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3a, //@@%@@@@@. - 0xf2, 0xff, 0xb8, 0x2a, 0x06, 0x2a, 0xba, 0xff, 0xbe, //@@%...%@% - 0xd6, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xf4, //@@.....@@ - 0xa0, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xf2, //%@.....@@ - 0x42, 0xff, 0xba, 0x28, 0x06, 0x28, 0xba, 0xff, 0xb8, //+@%...%@% - 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x30, //.%@@@@@@. - 0x00, 0x02, 0x76, 0xd8, 0xf8, 0xec, 0xaa, 0x2a, 0x00, //..+@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0037 (7) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc2, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xff, 0x70, //.....%@+ - 0x00, 0x00, 0x00, 0x00, 0x06, 0xf0, 0xff, 0x20, //.....@@. - 0x00, 0x00, 0x00, 0x00, 0x4a, 0xff, 0xd0, 0x00, //....+@@. - 0x00, 0x00, 0x00, 0x00, 0x9c, 0xff, 0x7e, 0x00, //....%@+. - 0x00, 0x00, 0x00, 0x02, 0xea, 0xff, 0x2e, 0x00, //....@@.. - 0x00, 0x00, 0x00, 0x3e, 0xff, 0xdc, 0x00, 0x00, //....@@.. - 0x00, 0x00, 0x00, 0x90, 0xff, 0x8c, 0x00, 0x00, //...%@%.. - 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3c, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x34, 0xff, 0xe8, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x84, 0xff, 0x9a, 0x00, 0x00, 0x00, //..%@%... - 0x00, 0x00, 0xd6, 0xff, 0x4a, 0x00, 0x00, 0x00, //..@@+... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0038 (8) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x42, 0xb2, 0xe0, 0xf6, 0xe0, 0xb2, 0x42, 0x00, //.+%@@@%+. - 0x6a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6a, //+@@@@@@@+ - 0xe4, 0xff, 0x96, 0x1e, 0x04, 0x1e, 0x98, 0xff, 0xe4, //@@%...%@@ - 0xee, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xec, //@@.....@@ - 0x92, 0xff, 0x94, 0x1c, 0x04, 0x1e, 0x96, 0xff, 0x92, //%@%...%@% - 0x02, 0x76, 0xe0, 0xff, 0xff, 0xff, 0xe0, 0x76, 0x02, //.+@@@@@+. - 0x02, 0x8c, 0xf2, 0xff, 0xff, 0xff, 0xf2, 0x8c, 0x02, //.%@@@@@%. - 0x86, 0xff, 0xb8, 0x28, 0x06, 0x2a, 0xba, 0xff, 0x86, //%@%...%@% - 0xe4, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xe4, //@@.....@@ - 0xf6, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xf6, //@@.....@@ - 0xc8, 0xff, 0xb8, 0x28, 0x06, 0x28, 0xba, 0xff, 0xc6, //@@%...%@@ - 0x46, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x44, //+@@@@@@@+ - 0x00, 0x2e, 0xaa, 0xde, 0xf8, 0xea, 0xb2, 0x38, 0x00, //..%@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0039 (9) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x2a, 0xaa, 0xea, 0xf8, 0xd6, 0x72, 0x02, 0x00, //..%@@@+.. - 0x30, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9c, 0x00, //.@@@@@@%. - 0xb8, 0xff, 0xbc, 0x2a, 0x06, 0x2a, 0xbc, 0xff, 0x3e, //%@%...%@. - 0xf2, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0x9c, //@@.....@% - 0xf4, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0xff, 0xd4, //@@.....@@ - 0xc0, 0xff, 0xba, 0x28, 0x06, 0x28, 0xb8, 0xff, 0xf0, //%@%...%@@ - 0x40, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xaa, 0xff, 0xfa, //.@@@@@%@@ - 0x00, 0x3e, 0xbc, 0xf2, 0xee, 0x90, 0x34, 0xff, 0xee, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xff, 0xc6, //......+@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xd6, 0xff, 0x7e, //......@@+ - 0x00, 0xb2, 0x30, 0x04, 0x28, 0xb4, 0xff, 0xee, 0x16, //.%...%@@. - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x4c, 0x00, //.@@@@@@+. - 0x00, 0x4c, 0xc2, 0xf6, 0xea, 0xac, 0x30, 0x00, 0x00, //.+@@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+003a (:) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+003b (;) , Width: 3 */ - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0xff, 0xff, //.@@ - 0x00, 0xff, 0xff, //.@@ - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - 0x00, 0xff, 0xff, //.@@ - 0x10, 0xff, 0xda, //.@@ - 0x6c, 0xf4, 0x2e, //+@. - 0xce, 0x60, 0x00, //@+. - 0x00, 0x00, 0x00, //... - 0x00, 0x00, 0x00, //... - - - /*Unicode: U+003c (<) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x6a, 0xcc, //.........+@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa4, 0xf6, 0xff, 0xff, //.......%@@@ - 0x00, 0x00, 0x00, 0x1a, 0x7a, 0xdc, 0xff, 0xff, 0xfc, 0xb6, 0x54, //....+@@@@%+ - 0x04, 0x52, 0xb4, 0xfc, 0xff, 0xff, 0xde, 0x7c, 0x1c, 0x00, 0x00, //.+%@@@@+... - 0xea, 0xff, 0xff, 0xf6, 0xa4, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@@%+..... - 0xea, 0xff, 0xff, 0xf6, 0xa4, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@@%+..... - 0x04, 0x54, 0xb6, 0xfc, 0xff, 0xff, 0xdc, 0x7c, 0x1c, 0x00, 0x00, //.+%@@@@+... - 0x00, 0x00, 0x00, 0x1c, 0x7c, 0xdc, 0xff, 0xff, 0xfc, 0xb6, 0x54, //....+@@@@%+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xa4, 0xf6, 0xff, 0xff, //......+%@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x6a, 0xce, //.........+@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003d (=) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003e (>) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xcc, 0x6a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@+......... - 0xff, 0xff, 0xf6, 0xa4, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@%....... - 0x54, 0xb8, 0xfc, 0xff, 0xff, 0xdc, 0x7a, 0x1a, 0x00, 0x00, 0x00, //+%@@@@+.... - 0x00, 0x00, 0x1c, 0x7e, 0xde, 0xff, 0xff, 0xfc, 0xb4, 0x52, 0x04, //...+@@@@%+. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xa6, 0xf6, 0xff, 0xff, 0xea, //.....+%@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xa6, 0xf6, 0xff, 0xff, 0xea, //.....+%@@@@ - 0x00, 0x00, 0x1c, 0x7c, 0xde, 0xff, 0xff, 0xfc, 0xb6, 0x52, 0x04, //...+@@@@%+. - 0x54, 0xb6, 0xfc, 0xff, 0xff, 0xdc, 0x7c, 0x1a, 0x00, 0x00, 0x00, //+%@@@@+.... - 0xff, 0xff, 0xf6, 0xa4, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@%+...... - 0xce, 0x6a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+003f (?) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x40, 0xac, 0xe8, 0xf6, 0xd2, 0x68, 0x00, //.%@@@+. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, //@@@@@@+ - 0xc2, 0x4e, 0x0c, 0x12, 0x94, 0xff, 0xda, //@+..%@@ - 0x00, 0x00, 0x00, 0x00, 0x0c, 0xff, 0xf2, //.....@@ - 0x00, 0x00, 0x00, 0x00, 0x46, 0xff, 0xa4, //....+@% - 0x00, 0x00, 0x00, 0x20, 0xe4, 0xd0, 0x10, //....@@. - 0x00, 0x00, 0x26, 0xe2, 0xd6, 0x14, 0x00, //...@@.. - 0x00, 0x00, 0xc4, 0xff, 0x38, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xf8, 0xff, 0x02, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0040 (@) , Width: 16 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x82, 0xca, 0xec, 0xf6, 0xe0, 0xb4, 0x66, 0x08, 0x00, 0x00, 0x00, //.....%@@@@%+.... - 0x00, 0x00, 0x02, 0x8a, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x4c, 0x00, 0x00, //...%@@@@@@@@@+.. - 0x00, 0x04, 0xb8, 0xff, 0xfa, 0x9a, 0x3e, 0x0e, 0x04, 0x1a, 0x56, 0xbc, 0xff, 0xfc, 0x60, 0x00, //..%@@%....+%@@+. - 0x00, 0x94, 0xff, 0xe6, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xfa, 0xf8, 0x2a, //.%@@........+@@. - 0x2c, 0xfc, 0xf8, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xa2, //.@@..........+@% - 0x90, 0xff, 0x94, 0x00, 0x00, 0x20, 0xca, 0xe6, 0x34, 0xff, 0xff, 0x00, 0x00, 0x1a, 0xff, 0xe6, //%@%...@@.@@...@@ - 0xd4, 0xff, 0x36, 0x00, 0x00, 0xb2, 0xff, 0xff, 0xc8, 0xff, 0xff, 0x00, 0x00, 0x0e, 0xff, 0xf6, //@@...%@@@@@...@@ - 0xf2, 0xff, 0x0e, 0x00, 0x00, 0xee, 0xff, 0x32, 0x36, 0xff, 0xff, 0x00, 0x00, 0x5e, 0xff, 0xce, //@@...@@..@@..+@@ - 0xf4, 0xff, 0x0a, 0x00, 0x00, 0xee, 0xff, 0x32, 0x32, 0xff, 0xff, 0x1c, 0x72, 0xf2, 0xff, 0x56, //@@...@@..@@.+@@+ - 0xda, 0xff, 0x2e, 0x00, 0x00, 0xb2, 0xff, 0xff, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x6a, 0x00, //@@...%@@@@@@@@+. - 0x9e, 0xff, 0x84, 0x00, 0x00, 0x22, 0xcc, 0xe6, 0x36, 0xf6, 0xe2, 0xba, 0x76, 0x18, 0x00, 0x00, //%@%...@@.@@%+... - 0x40, 0xff, 0xf2, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.@@............. - 0x00, 0xb4, 0xff, 0xd6, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.%@@............ - 0x00, 0x12, 0xd8, 0xff, 0xf0, 0x80, 0x2c, 0x08, 0x08, 0x2c, 0x80, 0xd6, 0x2a, 0x00, 0x00, 0x00, //..@@@+....+@.... - 0x00, 0x00, 0x12, 0xba, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc4, 0x1c, 0x00, 0x00, 0x00, //...%@@@@@@@@.... - 0x00, 0x00, 0x00, 0x00, 0x4a, 0xa8, 0xe2, 0xf8, 0xe8, 0xb4, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, //....+%@@@%+..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................ - - - /*Unicode: U+0041 (A) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x06, 0xea, 0xec, 0x06, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x5a, 0xff, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, 0x00, 0xc2, 0xff, 0xff, 0xc4, 0x00, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x28, 0xff, 0xc6, 0xc4, 0xff, 0x2a, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x90, 0xff, 0x64, 0x5c, 0xff, 0x92, 0x00, 0x00, 0x00, //...%@++@%... - 0x00, 0x00, 0x08, 0xee, 0xf4, 0x0c, 0x06, 0xea, 0xee, 0x08, 0x00, 0x00, //...@@..@@... - 0x00, 0x00, 0x5e, 0xff, 0xa0, 0x00, 0x00, 0x8c, 0xff, 0x60, 0x00, 0x00, //..+@%..%@+.. - 0x00, 0x00, 0xc6, 0xff, 0x3e, 0x00, 0x00, 0x24, 0xfc, 0xc6, 0x00, 0x00, //..@@....@@.. - 0x00, 0x2e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2e, 0x00, //..@@@@@@@@.. - 0x00, 0x94, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x94, 0x00, //.%@@@@@@@@%. - 0x0a, 0xf0, 0xfc, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xfc, 0xf0, 0x0a, //.@@......@@. - 0x64, 0xff, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xff, 0x62, //+@%......%@+ - 0xca, 0xff, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xff, 0xca, //@@+......+@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0042 (B) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0xff, 0xff, 0xf2, 0xce, 0x68, 0x00, 0x00, //@@@@@@+.. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x88, 0x00, //@@@@@@@%. - 0xff, 0xff, 0x00, 0x00, 0x0c, 0x7a, 0xff, 0xea, 0x00, //@@...+@@. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x0a, 0xff, 0xf0, 0x00, //@@....@@. - 0xff, 0xff, 0x00, 0x00, 0x0c, 0x76, 0xff, 0xac, 0x00, //@@...+@%. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x98, 0x10, 0x00, //@@@@@@%.. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0x60, 0x00, //@@@@@@@+. - 0xff, 0xff, 0x00, 0x00, 0x06, 0x2c, 0xb4, 0xff, 0x66, //@@....%@+ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xda, //@@.....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xf6, //@@.....@@ - 0xff, 0xff, 0x00, 0x00, 0x06, 0x2c, 0xb4, 0xff, 0xcc, //@@....%@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x46, //@@@@@@@@+ - 0xff, 0xff, 0xff, 0xff, 0xfa, 0xe4, 0xaa, 0x36, 0x00, //@@@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0043 (C) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x02, 0x5e, 0xb6, 0xe6, 0xf8, 0xf2, 0xd2, 0x96, 0x36, //...+%@@@@%. - 0x00, 0x18, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //..@@@@@@@@@ - 0x04, 0xca, 0xff, 0xe2, 0x66, 0x1e, 0x04, 0x08, 0x28, 0x64, 0xc4, //.@@@+....+@ - 0x64, 0xff, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0xbc, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0xea, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xfa, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xea, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@......... - 0xbc, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0x64, 0xff, 0xdc, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0x04, 0xcc, 0xff, 0xe0, 0x64, 0x1e, 0x04, 0x08, 0x26, 0x64, 0xc4, //.@@@+....+@ - 0x00, 0x1a, 0xca, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //..@@@@@@@@@ - 0x00, 0x00, 0x04, 0x60, 0xb8, 0xe8, 0xfa, 0xf2, 0xd2, 0x94, 0x36, //...+%@@@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0044 (D) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xf2, 0xe0, 0xb2, 0x68, 0x0a, 0x00, 0x00, //@@@@@@%+... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x32, 0x00, //@@@@@@@@@.. - 0xff, 0xff, 0x00, 0x00, 0x06, 0x1e, 0x5e, 0xd6, 0xff, 0xe8, 0x12, //@@....+@@@. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd0, 0xff, 0x7e, //@@......@@+ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xff, 0xc6, //@@......+@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xec, //@@.......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xfa, //@@.......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xec, //@@.......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xff, 0xc6, //@@......+@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd0, 0xff, 0x7c, //@@......@@+ - 0xff, 0xff, 0x00, 0x00, 0x04, 0x1e, 0x5c, 0xd6, 0xff, 0xe8, 0x12, //@@....+@@@. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x32, 0x00, //@@@@@@@@@.. - 0xff, 0xff, 0xff, 0xff, 0xf4, 0xe2, 0xb4, 0x68, 0x0a, 0x00, 0x00, //@@@@@@%+... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0045 (E) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0046 (F) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //@@@@@@@. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //@@@@@@@. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0047 (G) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x08, 0x6c, 0xbe, 0xea, 0xfa, 0xf0, 0xce, 0x92, 0x36, //...+%@@@@%. - 0x00, 0x22, 0xd6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //..@@@@@@@@@ - 0x08, 0xd6, 0xff, 0xd8, 0x5c, 0x1a, 0x04, 0x0a, 0x2a, 0x68, 0xc6, //.@@@+....+@ - 0x6c, 0xff, 0xd4, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //+@@........ - 0xc0, 0xff, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //%@+........ - 0xec, 0xff, 0x14, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, //@@....@@@@@ - 0xfa, 0xff, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, //@@....@@@@@ - 0xec, 0xff, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@.......@@ - 0xc2, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@+......@@ - 0x72, 0xff, 0xc8, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //+@@......@@ - 0x0c, 0xde, 0xff, 0xc4, 0x46, 0x0e, 0x04, 0x1e, 0x6e, 0xff, 0xff, //.@@@+...+@@ - 0x00, 0x2c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x66, //..@@@@@@@@+ - 0x00, 0x00, 0x0e, 0x7a, 0xca, 0xf0, 0xf8, 0xdc, 0x96, 0x24, 0x00, //...+@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0048 (H) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0049 (I) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+004a (J) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x04, 0xff, 0xf8, //..@@ - 0x00, 0x2a, 0xff, 0xe0, //..@@ - 0x24, 0xb8, 0xff, 0xa6, //.%@% - 0xff, 0xff, 0xf8, 0x32, //@@@. - 0xf0, 0xbc, 0x3e, 0x00, //@%.. - - - /*Unicode: U+004b (K) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x22, 0xe0, 0xff, 0x78, 0x00, //@@.....@@+. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x26, 0xe4, 0xfc, 0x6c, 0x00, 0x00, //@@....@@+.. - 0xff, 0xff, 0x00, 0x00, 0x28, 0xe6, 0xfc, 0x60, 0x00, 0x00, 0x00, //@@...@@+... - 0xff, 0xff, 0x00, 0x2c, 0xe8, 0xf8, 0x54, 0x00, 0x00, 0x00, 0x00, //@@..@@+.... - 0xff, 0xff, 0x30, 0xea, 0xf6, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, //@@.@@+..... - 0xff, 0xff, 0xee, 0xf2, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@@+...... - 0xff, 0xff, 0xf6, 0xe6, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@@@....... - 0xff, 0xff, 0x4c, 0xf8, 0xe8, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, //@@+@@...... - 0xff, 0xff, 0x00, 0x52, 0xfa, 0xec, 0x30, 0x00, 0x00, 0x00, 0x00, //@@.+@@..... - 0xff, 0xff, 0x00, 0x00, 0x5a, 0xfc, 0xee, 0x36, 0x00, 0x00, 0x00, //@@..+@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x62, 0xfc, 0xf0, 0x3a, 0x00, 0x00, //@@...+@@... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x6a, 0xff, 0xf2, 0x40, 0x00, //@@....+@@.. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xff, 0xf4, 0x44, //@@.....+@@+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+004c (L) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+004d (M) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xff, 0xff, 0xff, 0x62, 0x00, 0x00, 0x00, 0x00, 0x44, 0xff, 0xff, 0xff, //@@@+....+@@@ - 0xff, 0xff, 0xf2, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xf2, 0xff, 0xff, //@@@%....%@@@ - 0xff, 0xff, 0xa0, 0xfc, 0x20, 0x00, 0x00, 0x12, 0xf8, 0xa0, 0xff, 0xff, //@@%@....@%@@ - 0xff, 0xff, 0x40, 0xff, 0x80, 0x00, 0x00, 0x70, 0xff, 0x40, 0xff, 0xff, //@@.@+..+@.@@ - 0xff, 0xff, 0x00, 0xe0, 0xde, 0x00, 0x00, 0xd2, 0xde, 0x00, 0xff, 0xff, //@@.@@..@@.@@ - 0xff, 0xff, 0x00, 0x82, 0xff, 0x3e, 0x38, 0xff, 0x80, 0x00, 0xff, 0xff, //@@.%@..@+.@@ - 0xff, 0xff, 0x00, 0x22, 0xff, 0x9e, 0x9c, 0xff, 0x22, 0x00, 0xff, 0xff, //@@..@%%@..@@ - 0xff, 0xff, 0x00, 0x00, 0xc2, 0xf2, 0xf2, 0xc2, 0x00, 0x00, 0xff, 0xff, //@@..@@@@..@@ - 0xff, 0xff, 0x00, 0x00, 0x62, 0xff, 0xff, 0x62, 0x00, 0x00, 0xff, 0xff, //@@..+@@+..@@ - 0xff, 0xff, 0x00, 0x00, 0x0c, 0xf4, 0xf4, 0x0c, 0x00, 0x00, 0xff, 0xff, //@@...@@...@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@........@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@........@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@........@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+004e (N) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0xff, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@%.....@@ - 0xff, 0xff, 0xf8, 0x26, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@@.....@@ - 0xff, 0xff, 0xff, 0xb6, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@@%....@@ - 0xff, 0xff, 0xb4, 0xff, 0x4e, 0x00, 0x00, 0x00, 0xff, 0xff, //@@%@+...@@ - 0xff, 0xff, 0x26, 0xfa, 0xdc, 0x06, 0x00, 0x00, 0xff, 0xff, //@@.@@...@@ - 0xff, 0xff, 0x00, 0x8e, 0xff, 0x7c, 0x00, 0x00, 0xff, 0xff, //@@.%@+..@@ - 0xff, 0xff, 0x00, 0x10, 0xea, 0xf4, 0x1c, 0x00, 0xff, 0xff, //@@..@@..@@ - 0xff, 0xff, 0x00, 0x00, 0x68, 0xff, 0xaa, 0x00, 0xff, 0xff, //@@..+@%.@@ - 0xff, 0xff, 0x00, 0x00, 0x02, 0xd2, 0xff, 0x40, 0xff, 0xff, //@@...@@.@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x42, 0xff, 0xd4, 0xff, 0xff, //@@...+@@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xae, 0xff, 0xff, 0xff, //@@....%@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x22, 0xf8, 0xff, 0xff, //@@.....@@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, 0xff, //@@.....%@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+004f (O) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x0e, 0x7e, 0xd0, 0xf2, 0xf2, 0xd0, 0x80, 0x0e, 0x00, 0x00, //...+@@@@+... - 0x00, 0x28, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x28, 0x00, //..@@@@@@@@.. - 0x08, 0xd8, 0xff, 0xce, 0x46, 0x0a, 0x0a, 0x44, 0xce, 0xff, 0xd8, 0x08, //.@@@+..+@@@. - 0x6e, 0xff, 0xd4, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd6, 0xff, 0x6c, //+@@......@@+ - 0xc0, 0xff, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xff, 0xbe, //%@+......+@% - 0xec, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xff, 0xea, //@@........@@ - 0xfa, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xfa, //@@........@@ - 0xec, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xff, 0xea, //@@........@@ - 0xc0, 0xff, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xff, 0xbe, //%@+......+@% - 0x6e, 0xff, 0xd4, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd4, 0xff, 0x6c, //+@@......@@+ - 0x0a, 0xda, 0xff, 0xcc, 0x44, 0x0a, 0x08, 0x42, 0xcc, 0xff, 0xd8, 0x08, //.@@@+..+@@@. - 0x00, 0x28, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x28, 0x00, //..@@@@@@@@.. - 0x00, 0x00, 0x0e, 0x80, 0xd0, 0xf4, 0xf4, 0xd2, 0x80, 0x0e, 0x00, 0x00, //...+@@@@+... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0050 (P) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, 0xf2, 0xc0, 0x4a, 0x00, //@@@@@%+. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4c, //@@@@@@@+ - 0xff, 0xff, 0x00, 0x00, 0x1a, 0xa8, 0xff, 0xc6, //@@...%@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x14, 0xff, 0xf4, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x14, 0xff, 0xf4, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x18, 0xa6, 0xff, 0xc6, //@@...%@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4e, //@@@@@@@+ - 0xff, 0xff, 0xff, 0xff, 0xf2, 0xc2, 0x4a, 0x00, //@@@@@@+. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0051 (Q) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x0e, 0x7e, 0xd0, 0xf2, 0xf4, 0xd2, 0x82, 0x10, 0x00, 0x00, //...+@@@@%... - 0x00, 0x28, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x2c, 0x00, //..@@@@@@@@.. - 0x08, 0xd8, 0xff, 0xce, 0x46, 0x0a, 0x0a, 0x44, 0xce, 0xff, 0xde, 0x0c, //.@@@+..+@@@. - 0x6e, 0xff, 0xd4, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd6, 0xff, 0x74, //+@@......@@+ - 0xc0, 0xff, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xff, 0xc2, //%@+......+@@ - 0xec, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xff, 0xec, //@@........@@ - 0xfa, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xf6, //@@........@@ - 0xec, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0xff, 0xdc, //@@........@@ - 0xc0, 0xff, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0xff, 0xb0, //%@+......+@% - 0x6e, 0xff, 0xd4, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xd4, 0xff, 0x4a, //+@@......@@+ - 0x0a, 0xdc, 0xff, 0xcc, 0x44, 0x0a, 0x08, 0x42, 0xcc, 0xff, 0xac, 0x00, //.@@@+..+@@%. - 0x00, 0x2a, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x08, 0x00, //..@@@@@@@%.. - 0x00, 0x00, 0x10, 0x82, 0xd2, 0xf4, 0xff, 0xff, 0xa6, 0x00, 0x00, 0x00, //...%@@@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xfa, 0xff, 0x62, 0x00, 0x00, //......+@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0xff, 0xf8, 0x42, 0x00, //.......+@@+. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0052 (R) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0xff, 0xff, 0xff, 0xf2, 0xc6, 0x58, 0x00, 0x00, 0x00, //@@@@@@+... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5c, 0x00, 0x00, //@@@@@@@+.. - 0xff, 0xff, 0x00, 0x00, 0x18, 0xa0, 0xff, 0xce, 0x00, 0x00, //@@...%@@.. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x14, 0xff, 0xf6, 0x00, 0x00, //@@....@@.. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x14, 0xff, 0xea, 0x00, 0x00, //@@....@@.. - 0xff, 0xff, 0x00, 0x00, 0x16, 0xa0, 0xff, 0xa4, 0x00, 0x00, //@@...%@%.. - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc4, 0x14, 0x00, 0x00, //@@@@@@@... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x48, 0x00, 0x00, 0x00, //@@@@@@+... - 0xff, 0xff, 0x00, 0x06, 0x58, 0xf6, 0xf8, 0x30, 0x00, 0x00, //@@..+@@... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x74, 0xff, 0xc6, 0x00, 0x00, //@@...+@@.. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0xff, 0x66, 0x00, //@@....@@+. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x42, 0xff, 0xee, 0x18, //@@....+@@. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xff, 0xac, //@@.....%@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0053 (S) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x34, 0xb0, 0xe0, 0xf8, 0xde, 0x9e, 0x3a, 0x00, //..%@@@%.. - 0x50, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, //+@@@@@@@. - 0xd2, 0xff, 0xb6, 0x2e, 0x06, 0x14, 0x54, 0xbe, 0x00, //@@%...+%. - 0xf6, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xd4, 0xff, 0x7c, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, //@@+...... - 0x56, 0xff, 0xff, 0xff, 0xda, 0xa6, 0x5a, 0x04, 0x00, //+@@@@%+.. - 0x00, 0x40, 0xb0, 0xf2, 0xff, 0xff, 0xff, 0xce, 0x12, //..%@@@@@. - 0x00, 0x00, 0x00, 0x02, 0x28, 0x68, 0xde, 0xff, 0x96, //.....+@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0xff, 0xe0, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xf8, //.......@@ - 0xc8, 0x68, 0x26, 0x06, 0x0a, 0x38, 0xc0, 0xff, 0xd4, //@+....%@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x52, //@@@@@@@@+ - 0x32, 0x8e, 0xd0, 0xf4, 0xf8, 0xe2, 0xaa, 0x3a, 0x00, //.%@@@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0054 (T) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0055 (U) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@......@@ - 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfc, //@@......@@ - 0xee, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x16, 0xff, 0xee, //@@......@@ - 0xc4, 0xff, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x5c, 0xff, 0xc4, //@@+....+@@ - 0x6e, 0xff, 0xe8, 0x54, 0x12, 0x12, 0x56, 0xea, 0xff, 0x6c, //+@@+..+@@+ - 0x04, 0xc4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc2, 0x04, //.@@@@@@@@. - 0x00, 0x08, 0x7a, 0xd2, 0xf6, 0xf4, 0xd2, 0x7a, 0x08, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0056 (V) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xcc, 0xff, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0xff, 0xcc, //@@+......+@@ - 0x68, 0xff, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xff, 0x66, //+@%......%@+ - 0x0e, 0xf4, 0xfc, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xfc, 0xf4, 0x0c, //.@@......@@. - 0x00, 0x9e, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xff, 0x9e, 0x00, //.%@+....+@%. - 0x00, 0x38, 0xff, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xff, 0x38, 0x00, //..@@....@@.. - 0x00, 0x00, 0xd4, 0xff, 0x3e, 0x00, 0x00, 0x40, 0xff, 0xd4, 0x00, 0x00, //..@@....@@.. - 0x00, 0x00, 0x6e, 0xff, 0xa2, 0x00, 0x00, 0xa2, 0xff, 0x70, 0x00, 0x00, //..+@%..%@+.. - 0x00, 0x00, 0x12, 0xf6, 0xf4, 0x0c, 0x0e, 0xf4, 0xf8, 0x12, 0x00, 0x00, //...@@..@@... - 0x00, 0x00, 0x00, 0xa4, 0xff, 0x66, 0x66, 0xff, 0xa6, 0x00, 0x00, 0x00, //...%@++@%... - 0x00, 0x00, 0x00, 0x40, 0xff, 0xc8, 0xca, 0xff, 0x42, 0x00, 0x00, 0x00, //....@@@@+... - 0x00, 0x00, 0x00, 0x00, 0xda, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x00, 0x76, 0xff, 0xff, 0x78, 0x00, 0x00, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, 0x00, 0x16, 0xf8, 0xfa, 0x18, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0057 (W) , Width: 17 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0xde, 0xff, 0x2e, 0x00, 0x00, 0x00, 0x3a, 0xff, 0xff, 0xff, 0x22, 0x00, 0x00, 0x00, 0x2e, 0xff, 0xdc, //@@.....@@@.....@@ - 0x9c, 0xff, 0x6e, 0x00, 0x00, 0x00, 0x7a, 0xff, 0xf8, 0xff, 0x64, 0x00, 0x00, 0x00, 0x6e, 0xff, 0x9a, //%@+...+@@@+...+@% - 0x5a, 0xff, 0xb0, 0x00, 0x00, 0x00, 0xba, 0xff, 0x98, 0xff, 0xa4, 0x00, 0x00, 0x00, 0xae, 0xff, 0x58, //+@%...%@%@%...%@+ - 0x18, 0xff, 0xec, 0x00, 0x00, 0x04, 0xf4, 0xfc, 0x1e, 0xfa, 0xe4, 0x00, 0x00, 0x00, 0xec, 0xff, 0x16, //.@@...@@.@@...@@. - 0x00, 0xd6, 0xff, 0x30, 0x00, 0x38, 0xff, 0xce, 0x00, 0xc8, 0xff, 0x28, 0x00, 0x2e, 0xff, 0xd2, 0x00, //.@@...@@.@@...@@. - 0x00, 0x94, 0xff, 0x72, 0x00, 0x78, 0xff, 0x8c, 0x00, 0x88, 0xff, 0x68, 0x00, 0x6e, 0xff, 0x90, 0x00, //.%@+.+@%.%@+.+@%. - 0x00, 0x50, 0xff, 0xb2, 0x00, 0xb6, 0xff, 0x4c, 0x00, 0x48, 0xff, 0xaa, 0x00, 0xae, 0xff, 0x4e, 0x00, //.+@%.%@+.+@%.%@+. - 0x00, 0x10, 0xfc, 0xee, 0x06, 0xf2, 0xfa, 0x0e, 0x00, 0x0c, 0xfa, 0xea, 0x02, 0xec, 0xfa, 0x0e, 0x00, //..@@.@@...@@.@@.. - 0x00, 0x00, 0xcc, 0xff, 0x6a, 0xff, 0xca, 0x00, 0x00, 0x00, 0xc8, 0xff, 0x5c, 0xff, 0xc8, 0x00, 0x00, //..@@+@@...@@+@@.. - 0x00, 0x00, 0x8a, 0xff, 0xe2, 0xff, 0x88, 0x00, 0x00, 0x00, 0x88, 0xff, 0xda, 0xff, 0x86, 0x00, 0x00, //..%@@@%...%@@@%.. - 0x00, 0x00, 0x48, 0xff, 0xff, 0xff, 0x48, 0x00, 0x00, 0x00, 0x48, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, //..+@@@+...+@@@+.. - 0x00, 0x00, 0x0a, 0xfa, 0xff, 0xfa, 0x0a, 0x00, 0x00, 0x00, 0x0c, 0xfa, 0xff, 0xf8, 0x08, 0x00, 0x00, //...@@@.....@@@... - 0x00, 0x00, 0x00, 0xc4, 0xff, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xff, 0xc0, 0x00, 0x00, 0x00, //...@@@.....@@%... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //................. - - - /*Unicode: U+0058 (X) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0xb4, 0xff, 0xb0, 0x00, 0x00, 0x00, 0x00, 0xba, 0xff, 0xaa, //.%@%....%@% - 0x00, 0x24, 0xf8, 0xff, 0x46, 0x00, 0x00, 0x64, 0xff, 0xec, 0x16, //..@@+..+@@. - 0x00, 0x00, 0x86, 0xff, 0xd6, 0x04, 0x1a, 0xf0, 0xff, 0x5a, 0x00, //..%@@..@@+. - 0x00, 0x00, 0x0a, 0xe4, 0xff, 0x72, 0xb4, 0xff, 0xb2, 0x00, 0x00, //...@@+%@%.. - 0x00, 0x00, 0x00, 0x58, 0xff, 0xfa, 0xff, 0xee, 0x1a, 0x00, 0x00, //...+@@@@... - 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x62, 0x00, 0x00, 0x00, //....%@@+... - 0x00, 0x00, 0x00, 0x00, 0xb2, 0xff, 0xff, 0x34, 0x00, 0x00, 0x00, //....%@@.... - 0x00, 0x00, 0x00, 0x5c, 0xff, 0xff, 0xff, 0xc6, 0x00, 0x00, 0x00, //...+@@@@... - 0x00, 0x00, 0x16, 0xec, 0xff, 0x7a, 0xec, 0xff, 0x5c, 0x00, 0x00, //...@@+@@+.. - 0x00, 0x00, 0xae, 0xff, 0xbe, 0x00, 0x6a, 0xff, 0xe4, 0x0c, 0x00, //..%@%.+@@.. - 0x00, 0x58, 0xff, 0xf4, 0x22, 0x00, 0x02, 0xd0, 0xff, 0x88, 0x00, //.+@@...@@%. - 0x14, 0xea, 0xff, 0x70, 0x00, 0x00, 0x00, 0x3e, 0xff, 0xf8, 0x24, //.@@+....@@. - 0xaa, 0xff, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0xff, 0xb4, //%@@.....%@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+0059 (Y) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0xa0, 0xff, 0xca, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0xca, 0xff, 0xa0, //%@@......@@% - 0x0a, 0xd8, 0xff, 0x72, 0x00, 0x00, 0x00, 0x00, 0x74, 0xff, 0xd8, 0x0a, //.@@+....+@@. - 0x00, 0x30, 0xf8, 0xf4, 0x22, 0x00, 0x00, 0x22, 0xf4, 0xf6, 0x30, 0x00, //..@@....@@.. - 0x00, 0x00, 0x6e, 0xff, 0xbc, 0x00, 0x00, 0xbe, 0xff, 0x6c, 0x00, 0x00, //..+@%..%@+.. - 0x00, 0x00, 0x00, 0xb0, 0xff, 0x64, 0x66, 0xff, 0xb0, 0x00, 0x00, 0x00, //...%@++@%... - 0x00, 0x00, 0x00, 0x12, 0xe2, 0xf0, 0xf0, 0xe2, 0x10, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x00, 0x3c, 0xff, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+005a (Z) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xbc, 0xff, 0xe6, 0x1a, //.......%@@. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xff, 0xf8, 0x38, 0x00, //......%@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xff, 0xff, 0x60, 0x00, 0x00, //.....+@@+.. - 0x00, 0x00, 0x00, 0x00, 0x28, 0xf2, 0xff, 0x92, 0x00, 0x00, 0x00, //.....@@%... - 0x00, 0x00, 0x00, 0x0c, 0xd6, 0xff, 0xbc, 0x02, 0x00, 0x00, 0x00, //....@@%.... - 0x00, 0x00, 0x00, 0xac, 0xff, 0xde, 0x12, 0x00, 0x00, 0x00, 0x00, //...%@@..... - 0x00, 0x00, 0x76, 0xff, 0xf2, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, //..+@@...... - 0x00, 0x42, 0xfa, 0xfc, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.+@@+...... - 0x1e, 0xea, 0xff, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.@@%....... - 0xca, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005b ([) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0x00, 0x00, //@@.. - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - - - /*Unicode: U+005c (\) , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0xdc, 0xff, 0x38, 0x00, 0x00, 0x00, //@@.... - 0x9a, 0xff, 0x7a, 0x00, 0x00, 0x00, //%@+... - 0x56, 0xff, 0xbc, 0x00, 0x00, 0x00, //+@%... - 0x14, 0xfc, 0xf6, 0x06, 0x00, 0x00, //.@@... - 0x00, 0xd0, 0xff, 0x42, 0x00, 0x00, //.@@+.. - 0x00, 0x8c, 0xff, 0x84, 0x00, 0x00, //.%@%.. - 0x00, 0x4a, 0xff, 0xc8, 0x00, 0x00, //.+@@.. - 0x00, 0x0c, 0xfa, 0xfa, 0x0e, 0x00, //..@@.. - 0x00, 0x00, 0xc4, 0xff, 0x4c, 0x00, //..@@+. - 0x00, 0x00, 0x80, 0xff, 0x90, 0x00, //..+@%. - 0x00, 0x00, 0x3c, 0xff, 0xd2, 0x00, //...@@. - 0x00, 0x00, 0x04, 0xf4, 0xff, 0x16, //...@@. - 0x00, 0x00, 0x00, 0xb6, 0xff, 0x58, //...%@+ - 0x00, 0x00, 0x00, 0x74, 0xff, 0x9a, //...+@% - 0x00, 0x00, 0x00, 0x30, 0xff, 0xdc, //....@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+005d (]) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0xff, 0xff, 0xff, 0xff, //@@@@ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - - - /*Unicode: U+005e (^) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x08, 0xc2, 0xff, 0xc2, 0x08, 0x00, 0x00, 0x00, //....@@@.... - 0x00, 0x00, 0x04, 0xb6, 0xff, 0xae, 0xff, 0xb4, 0x04, 0x00, 0x00, //...%@%@%... - 0x00, 0x00, 0xa8, 0xfc, 0x62, 0x00, 0x64, 0xfc, 0xa6, 0x00, 0x00, //..%@+.+@%.. - 0x00, 0x98, 0xf8, 0x54, 0x00, 0x00, 0x00, 0x56, 0xf8, 0x98, 0x00, //.%@+...+@%. - 0x88, 0xf4, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xf4, 0x86, //%@+.....+@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - /*Unicode: U+005f (_) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@ - - - /*Unicode: U+0060 (`) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x8a, 0xe8, 0x1c, 0x00, //%@.. - 0x00, 0xa0, 0xc8, 0x06, //.%@. - 0x00, 0x02, 0xb6, 0x9a, //..%% - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - - - /*Unicode: U+0061 (a) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x44, 0xb2, 0xee, 0xf4, 0xc4, 0x42, 0x00, //.+%@@@+. - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x32, //.@@@@@@. - 0x00, 0xaa, 0x30, 0x06, 0x20, 0xac, 0xff, 0xa6, //.%...%@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xe0, //......@@ - 0x02, 0x72, 0xce, 0xf4, 0xff, 0xff, 0xff, 0xf8, //.+@@@@@@ - 0x8c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //%@@@@@@@ - 0xec, 0xff, 0x5c, 0x10, 0x02, 0x10, 0xff, 0xff, //@@+...@@ - 0xec, 0xff, 0x4e, 0x06, 0x20, 0xaa, 0xff, 0xff, //@@+..%@@ - 0xa4, 0xff, 0xff, 0xff, 0xff, 0xae, 0xff, 0xff, //%@@@@%@@ - 0x10, 0xa2, 0xec, 0xee, 0x9c, 0x0a, 0xff, 0xff, //.%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0062 (b) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x08, 0x98, 0xea, 0xf2, 0xae, 0x1e, 0x00, //@@.%@@%.. - 0xff, 0xff, 0xac, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x10, //@@%@@@@@. - 0xff, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0x88, //@@@...@@% - 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xd4, //@@+...+@@ - 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xf6, //@@.....@@ - 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xf6, //@@.....@@ - 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xd4, //@@+...+@@ - 0xff, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0x88, //@@@...@@% - 0xff, 0xff, 0xac, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x10, //@@%@@@@@. - 0xff, 0xff, 0x0a, 0x9a, 0xec, 0xf2, 0xae, 0x20, 0x00, //@@.%@@%.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0063 (c) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x02, 0x6e, 0xca, 0xf2, 0xf4, 0xbe, 0x4c, //..+@@@%+ - 0x04, 0xb8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //.%@@@@@@ - 0x72, 0xff, 0xf2, 0x6c, 0x1a, 0x06, 0x38, 0xae, //+@@+...% - 0xce, 0xff, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, //@@+..... - 0xf4, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xf4, 0xff, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xce, 0xff, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, //@@+..... - 0x70, 0xff, 0xf0, 0x6a, 0x1a, 0x06, 0x36, 0xae, //+@@+...% - 0x04, 0xba, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //.%@@@@@@ - 0x00, 0x04, 0x72, 0xd0, 0xf6, 0xf2, 0xbe, 0x4c, //..+@@@%+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0064 (d) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x20, 0xae, 0xf2, 0xea, 0x96, 0x08, 0xff, 0xff, //..%@@%.@@ - 0x12, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xac, 0xff, 0xff, //.@@@@@%@@ - 0x88, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0xff, //%@@...@@@ - 0xd6, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xff, //@@+...+@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xd6, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xff, //@@+...+@@ - 0x88, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0xff, //%@@...@@@ - 0x12, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xac, 0xff, 0xff, //.@@@@@%@@ - 0x00, 0x20, 0xb0, 0xf2, 0xec, 0x98, 0x08, 0xff, 0xff, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+0065 (e) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x5a, 0xbe, 0xee, 0xf8, 0xda, 0x88, 0x0e, 0x00, //..+%@@@%.. - 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0x0c, //.%@@@@@@@. - 0x62, 0xff, 0xe2, 0x54, 0x12, 0x08, 0x38, 0xc8, 0xff, 0x86, //+@@+...@@% - 0xc6, 0xff, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x20, 0xff, 0xd8, //@@......@@ - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, //@@@@@@@@@@ - 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@@@ - 0xca, 0xff, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@........ - 0x60, 0xff, 0xe6, 0x62, 0x1e, 0x08, 0x06, 0x24, 0x64, 0xc4, //+@@+....+@ - 0x00, 0x90, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //.%@@@@@@@@ - 0x00, 0x00, 0x42, 0xaa, 0xe2, 0xf8, 0xf4, 0xd2, 0x8c, 0x2e, //..+%@@@@%. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0066 (f) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x06, 0x88, 0xde, 0xfa, 0xff, //...%@@@ - 0x00, 0x00, 0x82, 0xff, 0xff, 0xff, 0xff, //..%@@@@ - 0x00, 0x00, 0xdc, 0xff, 0x50, 0x04, 0x00, //..@@+.. - 0x00, 0x00, 0xfa, 0xff, 0x00, 0x00, 0x00, //..@@... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@ - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //..@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0067 (g) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x22, 0xb0, 0xf2, 0xea, 0x96, 0x08, 0xff, 0xff, //..%@@%.@@ - 0x12, 0xe4, 0xff, 0xff, 0xff, 0xff, 0xac, 0xff, 0xff, //.@@@@@%@@ - 0x8a, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xde, 0xff, 0xff, //%@@...@@@ - 0xd6, 0xff, 0x4a, 0x00, 0x00, 0x00, 0x4c, 0xff, 0xff, //@@+...+@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xd6, 0xff, 0x4a, 0x00, 0x00, 0x00, 0x4a, 0xff, 0xff, //@@+...+@@ - 0x8a, 0xff, 0xdc, 0x3c, 0x0a, 0x3c, 0xdc, 0xff, 0xff, //%@@...@@@ - 0x14, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xae, 0xff, 0xfa, //.@@@@@%@@ - 0x00, 0x24, 0xb2, 0xf4, 0xec, 0x98, 0x28, 0xff, 0xe8, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0xff, 0xbe, //......+@% - 0x00, 0xae, 0x3c, 0x0c, 0x18, 0x64, 0xf0, 0xff, 0x6a, //.%...+@@+ - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xca, 0x04, //.@@@@@@@. - 0x00, 0x48, 0xb6, 0xe4, 0xf8, 0xda, 0x88, 0x0c, 0x00, //.+%@@@%.. - - - /*Unicode: U+0068 (h) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@...... - 0xff, 0xff, 0x08, 0x9c, 0xf0, 0xea, 0x86, 0x00, //@@.%@@%. - 0xff, 0xff, 0xaa, 0xff, 0xff, 0xff, 0xff, 0x6a, //@@%@@@@+ - 0xff, 0xff, 0xcc, 0x2a, 0x0e, 0x98, 0xff, 0xca, //@@@..%@@ - 0xff, 0xff, 0x36, 0x00, 0x00, 0x18, 0xff, 0xf2, //@@....@@ - 0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0069 (i) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+006a (j) , Width: 4 */ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0x00, 0x00, //.... - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x00, 0xff, 0xff, //..@@ - 0x00, 0x0e, 0xff, 0xf6, //..@@ - 0x08, 0x76, 0xff, 0xd2, //.+@@ - 0xff, 0xff, 0xff, 0x7a, //@@@+ - 0xfa, 0xda, 0x7e, 0x02, //@@+. - - - /*Unicode: U+006b (k) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x3a, 0xee, 0xff, 0x76, //@@....@@+ - 0xff, 0xff, 0x00, 0x00, 0x44, 0xf4, 0xfc, 0x62, 0x00, //@@..+@@+. - 0xff, 0xff, 0x00, 0x4e, 0xf6, 0xf8, 0x54, 0x00, 0x00, //@@.+@@+.. - 0xff, 0xff, 0x5a, 0xfa, 0xf2, 0x44, 0x00, 0x00, 0x00, //@@+@@+... - 0xff, 0xff, 0xfc, 0xee, 0x38, 0x00, 0x00, 0x00, 0x00, //@@@@..... - 0xff, 0xff, 0xff, 0xf8, 0x52, 0x00, 0x00, 0x00, 0x00, //@@@@+.... - 0xff, 0xff, 0x6c, 0xff, 0xfa, 0x5a, 0x00, 0x00, 0x00, //@@+@@+... - 0xff, 0xff, 0x00, 0x6e, 0xff, 0xfc, 0x64, 0x00, 0x00, //@@.+@@+.. - 0xff, 0xff, 0x00, 0x00, 0x70, 0xff, 0xfc, 0x6e, 0x00, //@@..+@@+. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x72, 0xff, 0xff, 0x78, //@@...+@@+ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - - - /*Unicode: U+006c (l) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0x00, 0x00, //.. - - - /*Unicode: U+006d (m) , Width: 14 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0xff, 0xff, 0x0a, 0x9e, 0xf0, 0xe6, 0x6e, 0x00, 0x10, 0xa2, 0xee, 0xea, 0x84, 0x00, //@@.%@@+..%@@%. - 0xff, 0xff, 0xac, 0xff, 0xff, 0xff, 0xff, 0x4c, 0xc8, 0xff, 0xff, 0xff, 0xff, 0x5c, //@@%@@@@+@@@@@+ - 0xff, 0xff, 0xce, 0x2c, 0x0c, 0x94, 0xff, 0xee, 0xce, 0x2c, 0x0c, 0x94, 0xff, 0xc2, //@@@..%@@@..%@@ - 0xff, 0xff, 0x36, 0x00, 0x00, 0x18, 0xff, 0xff, 0x36, 0x00, 0x00, 0x18, 0xff, 0xe8, //@@....@@....@@ - 0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0xff, 0xfc, //@@....@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@....@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.............. - - - /*Unicode: U+006e (n) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0x08, 0x9c, 0xf0, 0xea, 0x86, 0x00, //@@.%@@%. - 0xff, 0xff, 0xaa, 0xff, 0xff, 0xff, 0xff, 0x6a, //@@%@@@@+ - 0xff, 0xff, 0xcc, 0x2a, 0x0e, 0x98, 0xff, 0xca, //@@@..%@@ - 0xff, 0xff, 0x36, 0x00, 0x00, 0x18, 0xff, 0xf2, //@@....@@ - 0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+006f (o) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x04, 0x76, 0xce, 0xf4, 0xf4, 0xce, 0x74, 0x04, 0x00, //..+@@@@+.. - 0x06, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0x04, //.%@@@@@@%. - 0x76, 0xff, 0xee, 0x60, 0x14, 0x14, 0x60, 0xf0, 0xff, 0x74, //+@@+..+@@+ - 0xd0, 0xff, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x62, 0xff, 0xce, //@@+....+@@ - 0xf6, 0xff, 0x12, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xf4, //@@......@@ - 0xf6, 0xff, 0x12, 0x00, 0x00, 0x00, 0x00, 0x14, 0xff, 0xf4, //@@......@@ - 0xd0, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0xce, //@@+....+@@ - 0x76, 0xff, 0xec, 0x5c, 0x12, 0x12, 0x5e, 0xee, 0xff, 0x74, //+@@+..+@@+ - 0x06, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbe, 0x04, //.%@@@@@@%. - 0x00, 0x06, 0x76, 0xd0, 0xf6, 0xf4, 0xd0, 0x74, 0x04, 0x00, //..+@@@@+.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0070 (p) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0xff, 0xff, 0x08, 0x98, 0xea, 0xf2, 0xae, 0x1e, 0x00, //@@.%@@%.. - 0xff, 0xff, 0xac, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x10, //@@%@@@@@. - 0xff, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0x88, //@@@...@@% - 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xd4, //@@+...+@@ - 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xf6, //@@.....@@ - 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xf6, //@@.....@@ - 0xff, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xd4, //@@+...+@@ - 0xff, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0x88, //@@@...@@% - 0xff, 0xff, 0xac, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x10, //@@%@@@@@. - 0xff, 0xff, 0x0a, 0x9a, 0xec, 0xf2, 0xae, 0x20, 0x00, //@@.%@@%.. - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //@@....... - - - /*Unicode: U+0071 (q) , Width: 9 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //......... - 0x00, 0x20, 0xae, 0xf2, 0xea, 0x96, 0x08, 0xff, 0xff, //..%@@%.@@ - 0x12, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xac, 0xff, 0xff, //.@@@@@%@@ - 0x88, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0xff, //%@@...@@@ - 0xd6, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xff, //@@+...+@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xf6, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, //@@.....@@ - 0xd6, 0xff, 0x4c, 0x00, 0x00, 0x00, 0x4e, 0xff, 0xff, //@@+...+@@ - 0x88, 0xff, 0xde, 0x3e, 0x0a, 0x3e, 0xe0, 0xff, 0xff, //%@@...@@@ - 0x12, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xac, 0xff, 0xff, //.@@@@@%@@ - 0x00, 0x20, 0xb0, 0xf2, 0xec, 0x98, 0x08, 0xff, 0xff, //..%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //.......@@ - - - /*Unicode: U+0072 (r) , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0xff, 0xff, 0x08, 0x92, 0xe8, 0xfa, //@@.%@@ - 0xff, 0xff, 0xaa, 0xff, 0xff, 0xff, //@@%@@@ - 0xff, 0xff, 0xe2, 0x48, 0x0a, 0x00, //@@@+.. - 0xff, 0xff, 0x50, 0x00, 0x00, 0x00, //@@+... - 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, //@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //@@.... - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, //@@.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0073 (s) , Width: 7 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x08, 0x80, 0xd6, 0xf4, 0xf0, 0xba, 0x4a, //.+@@@%+ - 0x9e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //%@@@@@@ - 0xee, 0xff, 0x70, 0x10, 0x04, 0x34, 0xac, //@@+...% - 0xd8, 0xff, 0xb2, 0x7e, 0x3c, 0x00, 0x00, //@@%+... - 0x42, 0xe8, 0xff, 0xff, 0xff, 0xda, 0x2e, //+@@@@@. - 0x00, 0x08, 0x48, 0x8e, 0xe4, 0xff, 0xc0, //..+%@@% - 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xf4, //.....@@ - 0xb6, 0x44, 0x0a, 0x0a, 0x68, 0xff, 0xf6, //%+..+@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa4, //@@@@@@% - 0x3e, 0xaa, 0xea, 0xf4, 0xd6, 0x7c, 0x08, //.%@@@+. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //....... - - - /*Unicode: U+0074 (t) , Width: 6 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@ - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //.@@... - 0x00, 0xfc, 0xff, 0x02, 0x00, 0x00, //.@@... - 0x00, 0xea, 0xff, 0x46, 0x00, 0x00, //.@@+.. - 0x00, 0xaa, 0xff, 0xff, 0xff, 0xff, //.%@@@@ - 0x00, 0x18, 0xaa, 0xec, 0xfc, 0xff, //..%@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //...... - - - /*Unicode: U+0075 (u) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, //@@....@@ - 0xff, 0xff, 0x00, 0x00, 0x00, 0x06, 0xff, 0xff, //@@....@@ - 0xea, 0xff, 0x1a, 0x00, 0x00, 0x36, 0xff, 0xff, //@@....@@ - 0xc4, 0xff, 0x96, 0x0c, 0x2a, 0xcc, 0xff, 0xff, //@@%..@@@ - 0x60, 0xff, 0xff, 0xff, 0xff, 0xaa, 0xff, 0xff, //+@@@@%@@ - 0x00, 0x86, 0xea, 0xf0, 0xa0, 0x0a, 0xff, 0xff, //.%@@%.@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+0076 (v) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x12, 0xf6, 0xfa, 0x16, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xee, 0xe8, 0x04, //.@@......@@. - 0x00, 0xa6, 0xff, 0x70, 0x00, 0x00, 0x00, 0x00, 0x62, 0xff, 0x8a, 0x00, //.%@+....+@%. - 0x00, 0x40, 0xff, 0xcc, 0x00, 0x00, 0x00, 0x00, 0xca, 0xff, 0x26, 0x00, //..@@....@@.. - 0x00, 0x00, 0xd8, 0xff, 0x28, 0x00, 0x00, 0x30, 0xff, 0xc4, 0x00, 0x00, //..@@....@@.. - 0x00, 0x00, 0x74, 0xff, 0x82, 0x00, 0x00, 0x98, 0xff, 0x62, 0x00, 0x00, //..+@%..%@+.. - 0x00, 0x00, 0x14, 0xf8, 0xdc, 0x00, 0x0c, 0xf2, 0xf2, 0x0a, 0x00, 0x00, //...@@..@@... - 0x00, 0x00, 0x00, 0xa8, 0xff, 0x3a, 0x66, 0xff, 0x9c, 0x00, 0x00, 0x00, //...%@.+@%... - 0x00, 0x00, 0x00, 0x42, 0xff, 0x96, 0xce, 0xff, 0x38, 0x00, 0x00, 0x00, //...+@%@@.... - 0x00, 0x00, 0x00, 0x00, 0xda, 0xf6, 0xff, 0xd6, 0x00, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x00, 0x76, 0xff, 0xff, 0x74, 0x00, 0x00, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - - - /*Unicode: U+0077 (w) , Width: 15 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x06, 0xf8, 0xfc, 0x0a, 0x00, 0x00, 0xce, 0xff, 0xce, 0x00, 0x00, 0x0a, 0xfc, 0xf6, 0x06, //.@@...@@@...@@. - 0x00, 0xc2, 0xff, 0x3e, 0x00, 0x10, 0xfc, 0xff, 0xfc, 0x0e, 0x00, 0x3e, 0xff, 0xc2, 0x00, //.@@...@@@...@@. - 0x00, 0x84, 0xff, 0x74, 0x00, 0x4c, 0xff, 0xdc, 0xff, 0x4a, 0x00, 0x72, 0xff, 0x84, 0x00, //.%@+.+@@@+.+@%. - 0x00, 0x48, 0xff, 0xaa, 0x00, 0x8c, 0xff, 0x58, 0xff, 0x88, 0x00, 0xa8, 0xff, 0x46, 0x00, //.+@%.%@+@%.%@+. - 0x00, 0x0c, 0xfa, 0xde, 0x00, 0xcc, 0xe4, 0x00, 0xe4, 0xc6, 0x00, 0xdc, 0xfa, 0x0c, 0x00, //..@@.@@.@@.@@.. - 0x00, 0x00, 0xcc, 0xff, 0x24, 0xfc, 0x9e, 0x00, 0xa0, 0xf8, 0x1c, 0xff, 0xcc, 0x00, 0x00, //..@@.@%.%@.@@.. - 0x00, 0x00, 0x8e, 0xff, 0x96, 0xff, 0x5a, 0x00, 0x5a, 0xff, 0x8a, 0xff, 0x8e, 0x00, 0x00, //..%@%@+.+@%@%.. - 0x00, 0x00, 0x50, 0xff, 0xf6, 0xfc, 0x14, 0x00, 0x16, 0xfc, 0xee, 0xff, 0x50, 0x00, 0x00, //..+@@@...@@@+.. - 0x00, 0x00, 0x14, 0xff, 0xff, 0xce, 0x00, 0x00, 0x00, 0xd0, 0xff, 0xff, 0x14, 0x00, 0x00, //...@@@...@@@... - 0x00, 0x00, 0x00, 0xd6, 0xff, 0x88, 0x00, 0x00, 0x00, 0x8a, 0xff, 0xd4, 0x00, 0x00, 0x00, //...@@%...%@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............... - - - /*Unicode: U+0078 (x) , Width: 10 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0xa6, 0xff, 0xd2, 0x00, 0x00, 0x00, 0x00, 0xd2, 0xff, 0xa4, //%@@....@@% - 0x10, 0xe4, 0xff, 0x56, 0x00, 0x00, 0x56, 0xff, 0xde, 0x0e, //.@@+..+@@. - 0x00, 0x46, 0xff, 0xd6, 0x00, 0x02, 0xd6, 0xfc, 0x3c, 0x00, //.+@@..@@.. - 0x00, 0x00, 0x94, 0xff, 0x5c, 0x5c, 0xff, 0x84, 0x00, 0x00, //..%@++@%.. - 0x00, 0x00, 0x08, 0xda, 0xda, 0xda, 0xce, 0x04, 0x00, 0x00, //...@@@@... - 0x00, 0x00, 0x16, 0xec, 0xe0, 0xf0, 0xe8, 0x12, 0x00, 0x00, //...@@@@... - 0x00, 0x00, 0xae, 0xff, 0x5c, 0x76, 0xff, 0xa6, 0x00, 0x00, //..%@++@%.. - 0x00, 0x58, 0xff, 0xd2, 0x00, 0x06, 0xe0, 0xff, 0x52, 0x00, //.+@@..@@+. - 0x14, 0xea, 0xff, 0x4a, 0x00, 0x00, 0x58, 0xff, 0xe8, 0x12, //.@@+..+@@. - 0xaa, 0xff, 0xc2, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xa8, //%@@....@@% - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //.......... - - - /*Unicode: U+0079 (y) , Width: 12 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............ - 0x24, 0xfc, 0xf4, 0x12, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf2, 0xfc, 0x26, //.@@......@@. - 0x00, 0xa8, 0xff, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x74, 0xff, 0xae, 0x00, //.%@+....+@%. - 0x00, 0x30, 0xff, 0xe4, 0x04, 0x00, 0x00, 0x02, 0xe0, 0xff, 0x38, 0x00, //..@@....@@.. - 0x00, 0x00, 0xb6, 0xff, 0x5e, 0x00, 0x00, 0x56, 0xff, 0xc2, 0x00, 0x00, //..%@+..+@@.. - 0x00, 0x00, 0x3e, 0xff, 0xd0, 0x00, 0x00, 0xc6, 0xff, 0x4c, 0x00, 0x00, //...@@..@@+.. - 0x00, 0x00, 0x00, 0xc4, 0xff, 0x42, 0x36, 0xff, 0xd4, 0x00, 0x00, 0x00, //...@@+.@@... - 0x00, 0x00, 0x00, 0x4a, 0xff, 0xb6, 0xa8, 0xff, 0x60, 0x00, 0x00, 0x00, //...+@%%@+... - 0x00, 0x00, 0x00, 0x00, 0xd0, 0xfc, 0xfa, 0xe2, 0x04, 0x00, 0x00, 0x00, //....@@@@.... - 0x00, 0x00, 0x00, 0x00, 0x58, 0xff, 0xff, 0x74, 0x00, 0x00, 0x00, 0x00, //....+@@+.... - 0x00, 0x00, 0x00, 0x00, 0x24, 0xff, 0xee, 0x0c, 0x00, 0x00, 0x00, 0x00, //.....@@..... - 0x00, 0x00, 0x00, 0x00, 0x62, 0xff, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, //....+@%..... - 0x00, 0x00, 0x00, 0x10, 0xba, 0xff, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, //....%@...... - 0x00, 0x00, 0xff, 0xff, 0xff, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..@@@%...... - 0x00, 0x00, 0xff, 0xf6, 0xb6, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..@@%....... - - - /*Unicode: U+007a (z) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xda, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x4a, 0xfc, 0xfa, 0x36, //....+@@. - 0x00, 0x00, 0x00, 0x1e, 0xec, 0xff, 0x7a, 0x00, //....@@+. - 0x00, 0x00, 0x06, 0xca, 0xff, 0xc2, 0x02, 0x00, //...@@@.. - 0x00, 0x00, 0x98, 0xff, 0xee, 0x1e, 0x00, 0x00, //..%@@... - 0x00, 0x5c, 0xff, 0xff, 0x58, 0x00, 0x00, 0x00, //.+@@+... - 0x2a, 0xf4, 0xff, 0xa2, 0x00, 0x00, 0x00, 0x00, //.@@%.... - 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, //@@@@@@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007b ({) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x10, 0x96, 0xda, 0xf4, 0xff, //....%@@@ - 0x00, 0x00, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, //...%@@@@ - 0x00, 0x00, 0x00, 0xe8, 0xff, 0x66, 0x0c, 0x00, //...@@+.. - 0x00, 0x00, 0x00, 0xfc, 0xff, 0x04, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x0c, 0xff, 0xf6, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x14, 0x86, 0xff, 0xcc, 0x00, 0x00, 0x00, //..%@@... - 0xff, 0xff, 0xff, 0xca, 0x32, 0x00, 0x00, 0x00, //@@@@.... - 0xff, 0xff, 0xfc, 0xc2, 0x26, 0x00, 0x00, 0x00, //@@@@.... - 0x00, 0x1e, 0xaa, 0xff, 0xbe, 0x00, 0x00, 0x00, //..%@%... - 0x00, 0x00, 0x1e, 0xff, 0xf0, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xfa, 0xff, 0x08, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xe2, 0xff, 0x74, 0x0e, 0x00, //...@@+.. - 0x00, 0x00, 0x00, 0x96, 0xff, 0xff, 0xff, 0xff, //...%@@@@ - 0x00, 0x00, 0x00, 0x0c, 0x90, 0xd8, 0xf6, 0xff, //....%@@@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007c (|) , Width: 2 */ - 0x00, 0x00, //.. - 0x00, 0x00, //.. - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - 0xff, 0xff, //@@ - - - /*Unicode: U+007d (}) , Width: 8 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - 0xff, 0xf4, 0xda, 0x96, 0x10, 0x00, 0x00, 0x00, //@@@%.... - 0xff, 0xff, 0xff, 0xff, 0xa4, 0x00, 0x00, 0x00, //@@@@%... - 0x00, 0x0c, 0x64, 0xff, 0xe8, 0x00, 0x00, 0x00, //..+@@... - 0x00, 0x00, 0x04, 0xff, 0xfc, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xf8, 0xff, 0x0a, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xcc, 0xff, 0x86, 0x14, 0x00, //...@@%.. - 0x00, 0x00, 0x00, 0x32, 0xca, 0xff, 0xff, 0xff, //....@@@@ - 0x00, 0x00, 0x00, 0x26, 0xc2, 0xfc, 0xff, 0xff, //....@@@@ - 0x00, 0x00, 0x00, 0xbe, 0xff, 0xa8, 0x1e, 0x00, //...%@%.. - 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1e, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x00, 0x0a, 0xff, 0xf8, 0x00, 0x00, 0x00, //...@@... - 0x00, 0x0c, 0x70, 0xff, 0xe0, 0x00, 0x00, 0x00, //..+@@... - 0xff, 0xff, 0xff, 0xff, 0x96, 0x00, 0x00, 0x00, //@@@@%... - 0xff, 0xf6, 0xd8, 0x90, 0x0c, 0x00, 0x00, 0x00, //@@@%.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........ - - - /*Unicode: U+007e (~) , Width: 11 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, //........... - 0x10, 0x8e, 0xe4, 0xf6, 0xd0, 0x8a, 0x3e, 0x0a, 0x0e, 0x58, 0xda, //.%@@@%...+@ - 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, //@@@@@@@@@@@ - 0xea, 0x68, 0x12, 0x0c, 0x40, 0x8a, 0xd2, 0xf6, 0xe4, 0x90, 0x10, //@+...%@@@%. - 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //........... - - - -#endif -}; + /*4 rows*/ +}; +uint32_t advance_w :8; /*The glyph need this space. Draw the next glyph after this width */ +uint32_t advance_w_fract :4; /*Fractional part of `advance_width` in 1/16 unit*/ +uint32_t box_w :8; /*Width of the glyph's bounding box*/ +uint32_t box_h :8; /*Height of the glyph's bounding box*/ +uint32_t ofs_x :8; /*x offset of the bounding box*/ +uint32_t ofs_y :8; /*y offset of the bounding box*/ +uint32_t glyph_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { -#if LV_USE_FONT_DEJAVU_20 == 1 - {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ - {.w_px = 2, .glyph_index = 20}, /*Unicode: U+0021 (!)*/ - {.w_px = 6, .glyph_index = 40}, /*Unicode: U+0022 (")*/ - {.w_px = 12, .glyph_index = 60}, /*Unicode: U+0023 (#)*/ - {.w_px = 9, .glyph_index = 100}, /*Unicode: U+0024 ($)*/ - {.w_px = 15, .glyph_index = 140}, /*Unicode: U+0025 (%)*/ - {.w_px = 12, .glyph_index = 180}, /*Unicode: U+0026 (&)*/ - {.w_px = 2, .glyph_index = 220}, /*Unicode: U+0027 (')*/ - {.w_px = 4, .glyph_index = 240}, /*Unicode: U+0028 (()*/ - {.w_px = 4, .glyph_index = 260}, /*Unicode: U+0029 ())*/ - {.w_px = 7, .glyph_index = 280}, /*Unicode: U+002a (*)*/ - {.w_px = 12, .glyph_index = 300}, /*Unicode: U+002b (+)*/ - {.w_px = 3, .glyph_index = 340}, /*Unicode: U+002c (,)*/ - {.w_px = 5, .glyph_index = 360}, /*Unicode: U+002d (-)*/ - {.w_px = 2, .glyph_index = 380}, /*Unicode: U+002e (.)*/ - {.w_px = 6, .glyph_index = 400}, /*Unicode: U+002f (/)*/ - {.w_px = 9, .glyph_index = 420}, /*Unicode: U+0030 (0)*/ - {.w_px = 8, .glyph_index = 460}, /*Unicode: U+0031 (1)*/ - {.w_px = 9, .glyph_index = 480}, /*Unicode: U+0032 (2)*/ - {.w_px = 9, .glyph_index = 520}, /*Unicode: U+0033 (3)*/ - {.w_px = 10, .glyph_index = 560}, /*Unicode: U+0034 (4)*/ - {.w_px = 8, .glyph_index = 600}, /*Unicode: U+0035 (5)*/ - {.w_px = 9, .glyph_index = 620}, /*Unicode: U+0036 (6)*/ - {.w_px = 8, .glyph_index = 660}, /*Unicode: U+0037 (7)*/ - {.w_px = 9, .glyph_index = 680}, /*Unicode: U+0038 (8)*/ - {.w_px = 9, .glyph_index = 720}, /*Unicode: U+0039 (9)*/ - {.w_px = 2, .glyph_index = 760}, /*Unicode: U+003a (:)*/ - {.w_px = 3, .glyph_index = 780}, /*Unicode: U+003b (;)*/ - {.w_px = 11, .glyph_index = 800}, /*Unicode: U+003c (<)*/ - {.w_px = 11, .glyph_index = 840}, /*Unicode: U+003d (=)*/ - {.w_px = 11, .glyph_index = 880}, /*Unicode: U+003e (>)*/ - {.w_px = 7, .glyph_index = 920}, /*Unicode: U+003f (?)*/ - {.w_px = 16, .glyph_index = 940}, /*Unicode: U+0040 (@)*/ - {.w_px = 12, .glyph_index = 980}, /*Unicode: U+0041 (A)*/ - {.w_px = 9, .glyph_index = 1020}, /*Unicode: U+0042 (B)*/ - {.w_px = 11, .glyph_index = 1060}, /*Unicode: U+0043 (C)*/ - {.w_px = 11, .glyph_index = 1100}, /*Unicode: U+0044 (D)*/ - {.w_px = 8, .glyph_index = 1140}, /*Unicode: U+0045 (E)*/ - {.w_px = 8, .glyph_index = 1160}, /*Unicode: U+0046 (F)*/ - {.w_px = 11, .glyph_index = 1180}, /*Unicode: U+0047 (G)*/ - {.w_px = 10, .glyph_index = 1220}, /*Unicode: U+0048 (H)*/ - {.w_px = 2, .glyph_index = 1260}, /*Unicode: U+0049 (I)*/ - {.w_px = 4, .glyph_index = 1280}, /*Unicode: U+004a (J)*/ - {.w_px = 11, .glyph_index = 1300}, /*Unicode: U+004b (K)*/ - {.w_px = 8, .glyph_index = 1340}, /*Unicode: U+004c (L)*/ - {.w_px = 12, .glyph_index = 1360}, /*Unicode: U+004d (M)*/ - {.w_px = 10, .glyph_index = 1400}, /*Unicode: U+004e (N)*/ - {.w_px = 12, .glyph_index = 1440}, /*Unicode: U+004f (O)*/ - {.w_px = 8, .glyph_index = 1480}, /*Unicode: U+0050 (P)*/ - {.w_px = 12, .glyph_index = 1500}, /*Unicode: U+0051 (Q)*/ - {.w_px = 10, .glyph_index = 1540}, /*Unicode: U+0052 (R)*/ - {.w_px = 9, .glyph_index = 1580}, /*Unicode: U+0053 (S)*/ - {.w_px = 12, .glyph_index = 1620}, /*Unicode: U+0054 (T)*/ - {.w_px = 10, .glyph_index = 1660}, /*Unicode: U+0055 (U)*/ - {.w_px = 12, .glyph_index = 1700}, /*Unicode: U+0056 (V)*/ - {.w_px = 17, .glyph_index = 1740}, /*Unicode: U+0057 (W)*/ - {.w_px = 11, .glyph_index = 1800}, /*Unicode: U+0058 (X)*/ - {.w_px = 12, .glyph_index = 1840}, /*Unicode: U+0059 (Y)*/ - {.w_px = 11, .glyph_index = 1880}, /*Unicode: U+005a (Z)*/ - {.w_px = 4, .glyph_index = 1920}, /*Unicode: U+005b ([)*/ - {.w_px = 6, .glyph_index = 1940}, /*Unicode: U+005c (\)*/ - {.w_px = 4, .glyph_index = 1960}, /*Unicode: U+005d (])*/ - {.w_px = 11, .glyph_index = 1980}, /*Unicode: U+005e (^)*/ - {.w_px = 9, .glyph_index = 2020}, /*Unicode: U+005f (_)*/ - {.w_px = 4, .glyph_index = 2060}, /*Unicode: U+0060 (`)*/ - {.w_px = 8, .glyph_index = 2080}, /*Unicode: U+0061 (a)*/ - {.w_px = 9, .glyph_index = 2100}, /*Unicode: U+0062 (b)*/ - {.w_px = 8, .glyph_index = 2140}, /*Unicode: U+0063 (c)*/ - {.w_px = 9, .glyph_index = 2160}, /*Unicode: U+0064 (d)*/ - {.w_px = 10, .glyph_index = 2200}, /*Unicode: U+0065 (e)*/ - {.w_px = 7, .glyph_index = 2240}, /*Unicode: U+0066 (f)*/ - {.w_px = 9, .glyph_index = 2260}, /*Unicode: U+0067 (g)*/ - {.w_px = 8, .glyph_index = 2300}, /*Unicode: U+0068 (h)*/ - {.w_px = 2, .glyph_index = 2320}, /*Unicode: U+0069 (i)*/ - {.w_px = 4, .glyph_index = 2340}, /*Unicode: U+006a (j)*/ - {.w_px = 9, .glyph_index = 2360}, /*Unicode: U+006b (k)*/ - {.w_px = 2, .glyph_index = 2400}, /*Unicode: U+006c (l)*/ - {.w_px = 14, .glyph_index = 2420}, /*Unicode: U+006d (m)*/ - {.w_px = 8, .glyph_index = 2460}, /*Unicode: U+006e (n)*/ - {.w_px = 10, .glyph_index = 2480}, /*Unicode: U+006f (o)*/ - {.w_px = 9, .glyph_index = 2520}, /*Unicode: U+0070 (p)*/ - {.w_px = 9, .glyph_index = 2560}, /*Unicode: U+0071 (q)*/ - {.w_px = 6, .glyph_index = 2600}, /*Unicode: U+0072 (r)*/ - {.w_px = 7, .glyph_index = 2620}, /*Unicode: U+0073 (s)*/ - {.w_px = 6, .glyph_index = 2640}, /*Unicode: U+0074 (t)*/ - {.w_px = 8, .glyph_index = 2660}, /*Unicode: U+0075 (u)*/ - {.w_px = 12, .glyph_index = 2680}, /*Unicode: U+0076 (v)*/ - {.w_px = 15, .glyph_index = 2720}, /*Unicode: U+0077 (w)*/ - {.w_px = 10, .glyph_index = 2760}, /*Unicode: U+0078 (x)*/ - {.w_px = 12, .glyph_index = 2800}, /*Unicode: U+0079 (y)*/ - {.w_px = 8, .glyph_index = 2840}, /*Unicode: U+007a (z)*/ - {.w_px = 8, .glyph_index = 2860}, /*Unicode: U+007b ({)*/ - {.w_px = 2, .glyph_index = 2880}, /*Unicode: U+007c (|)*/ - {.w_px = 8, .glyph_index = 2900}, /*Unicode: U+007d (})*/ - {.w_px = 11, .glyph_index = 2920}, /*Unicode: U+007e (~)*/ - -#elif LV_USE_FONT_DEJAVU_20 == 2 - {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ - {.w_px = 2, .glyph_index = 40}, /*Unicode: U+0021 (!)*/ - {.w_px = 6, .glyph_index = 60}, /*Unicode: U+0022 (")*/ - {.w_px = 12, .glyph_index = 100}, /*Unicode: U+0023 (#)*/ - {.w_px = 9, .glyph_index = 160}, /*Unicode: U+0024 ($)*/ - {.w_px = 15, .glyph_index = 220}, /*Unicode: U+0025 (%)*/ - {.w_px = 12, .glyph_index = 300}, /*Unicode: U+0026 (&)*/ - {.w_px = 2, .glyph_index = 360}, /*Unicode: U+0027 (')*/ - {.w_px = 4, .glyph_index = 380}, /*Unicode: U+0028 (()*/ - {.w_px = 4, .glyph_index = 400}, /*Unicode: U+0029 ())*/ - {.w_px = 7, .glyph_index = 420}, /*Unicode: U+002a (*)*/ - {.w_px = 12, .glyph_index = 460}, /*Unicode: U+002b (+)*/ - {.w_px = 3, .glyph_index = 520}, /*Unicode: U+002c (,)*/ - {.w_px = 5, .glyph_index = 540}, /*Unicode: U+002d (-)*/ - {.w_px = 2, .glyph_index = 580}, /*Unicode: U+002e (.)*/ - {.w_px = 6, .glyph_index = 600}, /*Unicode: U+002f (/)*/ - {.w_px = 9, .glyph_index = 640}, /*Unicode: U+0030 (0)*/ - {.w_px = 8, .glyph_index = 700}, /*Unicode: U+0031 (1)*/ - {.w_px = 9, .glyph_index = 740}, /*Unicode: U+0032 (2)*/ - {.w_px = 9, .glyph_index = 800}, /*Unicode: U+0033 (3)*/ - {.w_px = 10, .glyph_index = 860}, /*Unicode: U+0034 (4)*/ - {.w_px = 8, .glyph_index = 920}, /*Unicode: U+0035 (5)*/ - {.w_px = 9, .glyph_index = 960}, /*Unicode: U+0036 (6)*/ - {.w_px = 8, .glyph_index = 1020}, /*Unicode: U+0037 (7)*/ - {.w_px = 9, .glyph_index = 1060}, /*Unicode: U+0038 (8)*/ - {.w_px = 9, .glyph_index = 1120}, /*Unicode: U+0039 (9)*/ - {.w_px = 2, .glyph_index = 1180}, /*Unicode: U+003a (:)*/ - {.w_px = 3, .glyph_index = 1200}, /*Unicode: U+003b (;)*/ - {.w_px = 11, .glyph_index = 1220}, /*Unicode: U+003c (<)*/ - {.w_px = 11, .glyph_index = 1280}, /*Unicode: U+003d (=)*/ - {.w_px = 11, .glyph_index = 1340}, /*Unicode: U+003e (>)*/ - {.w_px = 7, .glyph_index = 1400}, /*Unicode: U+003f (?)*/ - {.w_px = 16, .glyph_index = 1440}, /*Unicode: U+0040 (@)*/ - {.w_px = 12, .glyph_index = 1520}, /*Unicode: U+0041 (A)*/ - {.w_px = 9, .glyph_index = 1580}, /*Unicode: U+0042 (B)*/ - {.w_px = 11, .glyph_index = 1640}, /*Unicode: U+0043 (C)*/ - {.w_px = 11, .glyph_index = 1700}, /*Unicode: U+0044 (D)*/ - {.w_px = 8, .glyph_index = 1760}, /*Unicode: U+0045 (E)*/ - {.w_px = 8, .glyph_index = 1800}, /*Unicode: U+0046 (F)*/ - {.w_px = 11, .glyph_index = 1840}, /*Unicode: U+0047 (G)*/ - {.w_px = 10, .glyph_index = 1900}, /*Unicode: U+0048 (H)*/ - {.w_px = 2, .glyph_index = 1960}, /*Unicode: U+0049 (I)*/ - {.w_px = 4, .glyph_index = 1980}, /*Unicode: U+004a (J)*/ - {.w_px = 11, .glyph_index = 2000}, /*Unicode: U+004b (K)*/ - {.w_px = 8, .glyph_index = 2060}, /*Unicode: U+004c (L)*/ - {.w_px = 12, .glyph_index = 2100}, /*Unicode: U+004d (M)*/ - {.w_px = 10, .glyph_index = 2160}, /*Unicode: U+004e (N)*/ - {.w_px = 12, .glyph_index = 2220}, /*Unicode: U+004f (O)*/ - {.w_px = 8, .glyph_index = 2280}, /*Unicode: U+0050 (P)*/ - {.w_px = 12, .glyph_index = 2320}, /*Unicode: U+0051 (Q)*/ - {.w_px = 10, .glyph_index = 2380}, /*Unicode: U+0052 (R)*/ - {.w_px = 9, .glyph_index = 2440}, /*Unicode: U+0053 (S)*/ - {.w_px = 12, .glyph_index = 2500}, /*Unicode: U+0054 (T)*/ - {.w_px = 10, .glyph_index = 2560}, /*Unicode: U+0055 (U)*/ - {.w_px = 12, .glyph_index = 2620}, /*Unicode: U+0056 (V)*/ - {.w_px = 17, .glyph_index = 2680}, /*Unicode: U+0057 (W)*/ - {.w_px = 11, .glyph_index = 2780}, /*Unicode: U+0058 (X)*/ - {.w_px = 12, .glyph_index = 2840}, /*Unicode: U+0059 (Y)*/ - {.w_px = 11, .glyph_index = 2900}, /*Unicode: U+005a (Z)*/ - {.w_px = 4, .glyph_index = 2960}, /*Unicode: U+005b ([)*/ - {.w_px = 6, .glyph_index = 2980}, /*Unicode: U+005c (\)*/ - {.w_px = 4, .glyph_index = 3020}, /*Unicode: U+005d (])*/ - {.w_px = 11, .glyph_index = 3040}, /*Unicode: U+005e (^)*/ - {.w_px = 9, .glyph_index = 3100}, /*Unicode: U+005f (_)*/ - {.w_px = 4, .glyph_index = 3160}, /*Unicode: U+0060 (`)*/ - {.w_px = 8, .glyph_index = 3180}, /*Unicode: U+0061 (a)*/ - {.w_px = 9, .glyph_index = 3220}, /*Unicode: U+0062 (b)*/ - {.w_px = 8, .glyph_index = 3280}, /*Unicode: U+0063 (c)*/ - {.w_px = 9, .glyph_index = 3320}, /*Unicode: U+0064 (d)*/ - {.w_px = 10, .glyph_index = 3380}, /*Unicode: U+0065 (e)*/ - {.w_px = 7, .glyph_index = 3440}, /*Unicode: U+0066 (f)*/ - {.w_px = 9, .glyph_index = 3480}, /*Unicode: U+0067 (g)*/ - {.w_px = 8, .glyph_index = 3540}, /*Unicode: U+0068 (h)*/ - {.w_px = 2, .glyph_index = 3580}, /*Unicode: U+0069 (i)*/ - {.w_px = 4, .glyph_index = 3600}, /*Unicode: U+006a (j)*/ - {.w_px = 9, .glyph_index = 3620}, /*Unicode: U+006b (k)*/ - {.w_px = 2, .glyph_index = 3680}, /*Unicode: U+006c (l)*/ - {.w_px = 14, .glyph_index = 3700}, /*Unicode: U+006d (m)*/ - {.w_px = 8, .glyph_index = 3780}, /*Unicode: U+006e (n)*/ - {.w_px = 10, .glyph_index = 3820}, /*Unicode: U+006f (o)*/ - {.w_px = 9, .glyph_index = 3880}, /*Unicode: U+0070 (p)*/ - {.w_px = 9, .glyph_index = 3940}, /*Unicode: U+0071 (q)*/ - {.w_px = 6, .glyph_index = 4000}, /*Unicode: U+0072 (r)*/ - {.w_px = 7, .glyph_index = 4040}, /*Unicode: U+0073 (s)*/ - {.w_px = 6, .glyph_index = 4080}, /*Unicode: U+0074 (t)*/ - {.w_px = 8, .glyph_index = 4120}, /*Unicode: U+0075 (u)*/ - {.w_px = 12, .glyph_index = 4160}, /*Unicode: U+0076 (v)*/ - {.w_px = 15, .glyph_index = 4220}, /*Unicode: U+0077 (w)*/ - {.w_px = 10, .glyph_index = 4300}, /*Unicode: U+0078 (x)*/ - {.w_px = 12, .glyph_index = 4360}, /*Unicode: U+0079 (y)*/ - {.w_px = 8, .glyph_index = 4420}, /*Unicode: U+007a (z)*/ - {.w_px = 8, .glyph_index = 4460}, /*Unicode: U+007b ({)*/ - {.w_px = 2, .glyph_index = 4500}, /*Unicode: U+007c (|)*/ - {.w_px = 8, .glyph_index = 4520}, /*Unicode: U+007d (})*/ - {.w_px = 11, .glyph_index = 4560}, /*Unicode: U+007e (~)*/ - -#elif LV_USE_FONT_DEJAVU_20 == 4 - {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ - {.w_px = 2, .glyph_index = 60}, /*Unicode: U+0021 (!)*/ - {.w_px = 6, .glyph_index = 80}, /*Unicode: U+0022 (")*/ - {.w_px = 12, .glyph_index = 140}, /*Unicode: U+0023 (#)*/ - {.w_px = 9, .glyph_index = 260}, /*Unicode: U+0024 ($)*/ - {.w_px = 15, .glyph_index = 360}, /*Unicode: U+0025 (%)*/ - {.w_px = 12, .glyph_index = 520}, /*Unicode: U+0026 (&)*/ - {.w_px = 2, .glyph_index = 640}, /*Unicode: U+0027 (')*/ - {.w_px = 4, .glyph_index = 660}, /*Unicode: U+0028 (()*/ - {.w_px = 4, .glyph_index = 700}, /*Unicode: U+0029 ())*/ - {.w_px = 7, .glyph_index = 740}, /*Unicode: U+002a (*)*/ - {.w_px = 12, .glyph_index = 820}, /*Unicode: U+002b (+)*/ - {.w_px = 3, .glyph_index = 940}, /*Unicode: U+002c (,)*/ - {.w_px = 5, .glyph_index = 980}, /*Unicode: U+002d (-)*/ - {.w_px = 2, .glyph_index = 1040}, /*Unicode: U+002e (.)*/ - {.w_px = 6, .glyph_index = 1060}, /*Unicode: U+002f (/)*/ - {.w_px = 9, .glyph_index = 1120}, /*Unicode: U+0030 (0)*/ - {.w_px = 8, .glyph_index = 1220}, /*Unicode: U+0031 (1)*/ - {.w_px = 9, .glyph_index = 1300}, /*Unicode: U+0032 (2)*/ - {.w_px = 9, .glyph_index = 1400}, /*Unicode: U+0033 (3)*/ - {.w_px = 10, .glyph_index = 1500}, /*Unicode: U+0034 (4)*/ - {.w_px = 8, .glyph_index = 1600}, /*Unicode: U+0035 (5)*/ - {.w_px = 9, .glyph_index = 1680}, /*Unicode: U+0036 (6)*/ - {.w_px = 8, .glyph_index = 1780}, /*Unicode: U+0037 (7)*/ - {.w_px = 9, .glyph_index = 1860}, /*Unicode: U+0038 (8)*/ - {.w_px = 9, .glyph_index = 1960}, /*Unicode: U+0039 (9)*/ - {.w_px = 2, .glyph_index = 2060}, /*Unicode: U+003a (:)*/ - {.w_px = 3, .glyph_index = 2080}, /*Unicode: U+003b (;)*/ - {.w_px = 11, .glyph_index = 2120}, /*Unicode: U+003c (<)*/ - {.w_px = 11, .glyph_index = 2240}, /*Unicode: U+003d (=)*/ - {.w_px = 11, .glyph_index = 2360}, /*Unicode: U+003e (>)*/ - {.w_px = 7, .glyph_index = 2480}, /*Unicode: U+003f (?)*/ - {.w_px = 16, .glyph_index = 2560}, /*Unicode: U+0040 (@)*/ - {.w_px = 12, .glyph_index = 2720}, /*Unicode: U+0041 (A)*/ - {.w_px = 9, .glyph_index = 2840}, /*Unicode: U+0042 (B)*/ - {.w_px = 11, .glyph_index = 2940}, /*Unicode: U+0043 (C)*/ - {.w_px = 11, .glyph_index = 3060}, /*Unicode: U+0044 (D)*/ - {.w_px = 8, .glyph_index = 3180}, /*Unicode: U+0045 (E)*/ - {.w_px = 8, .glyph_index = 3260}, /*Unicode: U+0046 (F)*/ - {.w_px = 11, .glyph_index = 3340}, /*Unicode: U+0047 (G)*/ - {.w_px = 10, .glyph_index = 3460}, /*Unicode: U+0048 (H)*/ - {.w_px = 2, .glyph_index = 3560}, /*Unicode: U+0049 (I)*/ - {.w_px = 4, .glyph_index = 3580}, /*Unicode: U+004a (J)*/ - {.w_px = 11, .glyph_index = 3620}, /*Unicode: U+004b (K)*/ - {.w_px = 8, .glyph_index = 3740}, /*Unicode: U+004c (L)*/ - {.w_px = 12, .glyph_index = 3820}, /*Unicode: U+004d (M)*/ - {.w_px = 10, .glyph_index = 3940}, /*Unicode: U+004e (N)*/ - {.w_px = 12, .glyph_index = 4040}, /*Unicode: U+004f (O)*/ - {.w_px = 8, .glyph_index = 4160}, /*Unicode: U+0050 (P)*/ - {.w_px = 12, .glyph_index = 4240}, /*Unicode: U+0051 (Q)*/ - {.w_px = 10, .glyph_index = 4360}, /*Unicode: U+0052 (R)*/ - {.w_px = 9, .glyph_index = 4460}, /*Unicode: U+0053 (S)*/ - {.w_px = 12, .glyph_index = 4560}, /*Unicode: U+0054 (T)*/ - {.w_px = 10, .glyph_index = 4680}, /*Unicode: U+0055 (U)*/ - {.w_px = 12, .glyph_index = 4780}, /*Unicode: U+0056 (V)*/ - {.w_px = 17, .glyph_index = 4900}, /*Unicode: U+0057 (W)*/ - {.w_px = 11, .glyph_index = 5080}, /*Unicode: U+0058 (X)*/ - {.w_px = 12, .glyph_index = 5200}, /*Unicode: U+0059 (Y)*/ - {.w_px = 11, .glyph_index = 5320}, /*Unicode: U+005a (Z)*/ - {.w_px = 4, .glyph_index = 5440}, /*Unicode: U+005b ([)*/ - {.w_px = 6, .glyph_index = 5480}, /*Unicode: U+005c (\)*/ - {.w_px = 4, .glyph_index = 5540}, /*Unicode: U+005d (])*/ - {.w_px = 11, .glyph_index = 5580}, /*Unicode: U+005e (^)*/ - {.w_px = 9, .glyph_index = 5700}, /*Unicode: U+005f (_)*/ - {.w_px = 4, .glyph_index = 5800}, /*Unicode: U+0060 (`)*/ - {.w_px = 8, .glyph_index = 5840}, /*Unicode: U+0061 (a)*/ - {.w_px = 9, .glyph_index = 5920}, /*Unicode: U+0062 (b)*/ - {.w_px = 8, .glyph_index = 6020}, /*Unicode: U+0063 (c)*/ - {.w_px = 9, .glyph_index = 6100}, /*Unicode: U+0064 (d)*/ - {.w_px = 10, .glyph_index = 6200}, /*Unicode: U+0065 (e)*/ - {.w_px = 7, .glyph_index = 6300}, /*Unicode: U+0066 (f)*/ - {.w_px = 9, .glyph_index = 6380}, /*Unicode: U+0067 (g)*/ - {.w_px = 8, .glyph_index = 6480}, /*Unicode: U+0068 (h)*/ - {.w_px = 2, .glyph_index = 6560}, /*Unicode: U+0069 (i)*/ - {.w_px = 4, .glyph_index = 6580}, /*Unicode: U+006a (j)*/ - {.w_px = 9, .glyph_index = 6620}, /*Unicode: U+006b (k)*/ - {.w_px = 2, .glyph_index = 6720}, /*Unicode: U+006c (l)*/ - {.w_px = 14, .glyph_index = 6740}, /*Unicode: U+006d (m)*/ - {.w_px = 8, .glyph_index = 6880}, /*Unicode: U+006e (n)*/ - {.w_px = 10, .glyph_index = 6960}, /*Unicode: U+006f (o)*/ - {.w_px = 9, .glyph_index = 7060}, /*Unicode: U+0070 (p)*/ - {.w_px = 9, .glyph_index = 7160}, /*Unicode: U+0071 (q)*/ - {.w_px = 6, .glyph_index = 7260}, /*Unicode: U+0072 (r)*/ - {.w_px = 7, .glyph_index = 7320}, /*Unicode: U+0073 (s)*/ - {.w_px = 6, .glyph_index = 7400}, /*Unicode: U+0074 (t)*/ - {.w_px = 8, .glyph_index = 7460}, /*Unicode: U+0075 (u)*/ - {.w_px = 12, .glyph_index = 7540}, /*Unicode: U+0076 (v)*/ - {.w_px = 15, .glyph_index = 7660}, /*Unicode: U+0077 (w)*/ - {.w_px = 10, .glyph_index = 7820}, /*Unicode: U+0078 (x)*/ - {.w_px = 12, .glyph_index = 7920}, /*Unicode: U+0079 (y)*/ - {.w_px = 8, .glyph_index = 8040}, /*Unicode: U+007a (z)*/ - {.w_px = 8, .glyph_index = 8120}, /*Unicode: U+007b ({)*/ - {.w_px = 2, .glyph_index = 8200}, /*Unicode: U+007c (|)*/ - {.w_px = 8, .glyph_index = 8220}, /*Unicode: U+007d (})*/ - {.w_px = 11, .glyph_index = 8300}, /*Unicode: U+007e (~)*/ - -#elif LV_USE_FONT_DEJAVU_20 == 8 - {.w_px = 6, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ - {.w_px = 2, .glyph_index = 120}, /*Unicode: U+0021 (!)*/ - {.w_px = 6, .glyph_index = 160}, /*Unicode: U+0022 (")*/ - {.w_px = 12, .glyph_index = 280}, /*Unicode: U+0023 (#)*/ - {.w_px = 9, .glyph_index = 520}, /*Unicode: U+0024 ($)*/ - {.w_px = 15, .glyph_index = 700}, /*Unicode: U+0025 (%)*/ - {.w_px = 12, .glyph_index = 1000}, /*Unicode: U+0026 (&)*/ - {.w_px = 2, .glyph_index = 1240}, /*Unicode: U+0027 (')*/ - {.w_px = 4, .glyph_index = 1280}, /*Unicode: U+0028 (()*/ - {.w_px = 4, .glyph_index = 1360}, /*Unicode: U+0029 ())*/ - {.w_px = 7, .glyph_index = 1440}, /*Unicode: U+002a (*)*/ - {.w_px = 12, .glyph_index = 1580}, /*Unicode: U+002b (+)*/ - {.w_px = 3, .glyph_index = 1820}, /*Unicode: U+002c (,)*/ - {.w_px = 5, .glyph_index = 1880}, /*Unicode: U+002d (-)*/ - {.w_px = 2, .glyph_index = 1980}, /*Unicode: U+002e (.)*/ - {.w_px = 6, .glyph_index = 2020}, /*Unicode: U+002f (/)*/ - {.w_px = 9, .glyph_index = 2140}, /*Unicode: U+0030 (0)*/ - {.w_px = 8, .glyph_index = 2320}, /*Unicode: U+0031 (1)*/ - {.w_px = 9, .glyph_index = 2480}, /*Unicode: U+0032 (2)*/ - {.w_px = 9, .glyph_index = 2660}, /*Unicode: U+0033 (3)*/ - {.w_px = 10, .glyph_index = 2840}, /*Unicode: U+0034 (4)*/ - {.w_px = 8, .glyph_index = 3040}, /*Unicode: U+0035 (5)*/ - {.w_px = 9, .glyph_index = 3200}, /*Unicode: U+0036 (6)*/ - {.w_px = 8, .glyph_index = 3380}, /*Unicode: U+0037 (7)*/ - {.w_px = 9, .glyph_index = 3540}, /*Unicode: U+0038 (8)*/ - {.w_px = 9, .glyph_index = 3720}, /*Unicode: U+0039 (9)*/ - {.w_px = 2, .glyph_index = 3900}, /*Unicode: U+003a (:)*/ - {.w_px = 3, .glyph_index = 3940}, /*Unicode: U+003b (;)*/ - {.w_px = 11, .glyph_index = 4000}, /*Unicode: U+003c (<)*/ - {.w_px = 11, .glyph_index = 4220}, /*Unicode: U+003d (=)*/ - {.w_px = 11, .glyph_index = 4440}, /*Unicode: U+003e (>)*/ - {.w_px = 7, .glyph_index = 4660}, /*Unicode: U+003f (?)*/ - {.w_px = 16, .glyph_index = 4800}, /*Unicode: U+0040 (@)*/ - {.w_px = 12, .glyph_index = 5120}, /*Unicode: U+0041 (A)*/ - {.w_px = 9, .glyph_index = 5360}, /*Unicode: U+0042 (B)*/ - {.w_px = 11, .glyph_index = 5540}, /*Unicode: U+0043 (C)*/ - {.w_px = 11, .glyph_index = 5760}, /*Unicode: U+0044 (D)*/ - {.w_px = 8, .glyph_index = 5980}, /*Unicode: U+0045 (E)*/ - {.w_px = 8, .glyph_index = 6140}, /*Unicode: U+0046 (F)*/ - {.w_px = 11, .glyph_index = 6300}, /*Unicode: U+0047 (G)*/ - {.w_px = 10, .glyph_index = 6520}, /*Unicode: U+0048 (H)*/ - {.w_px = 2, .glyph_index = 6720}, /*Unicode: U+0049 (I)*/ - {.w_px = 4, .glyph_index = 6760}, /*Unicode: U+004a (J)*/ - {.w_px = 11, .glyph_index = 6840}, /*Unicode: U+004b (K)*/ - {.w_px = 8, .glyph_index = 7060}, /*Unicode: U+004c (L)*/ - {.w_px = 12, .glyph_index = 7220}, /*Unicode: U+004d (M)*/ - {.w_px = 10, .glyph_index = 7460}, /*Unicode: U+004e (N)*/ - {.w_px = 12, .glyph_index = 7660}, /*Unicode: U+004f (O)*/ - {.w_px = 8, .glyph_index = 7900}, /*Unicode: U+0050 (P)*/ - {.w_px = 12, .glyph_index = 8060}, /*Unicode: U+0051 (Q)*/ - {.w_px = 10, .glyph_index = 8300}, /*Unicode: U+0052 (R)*/ - {.w_px = 9, .glyph_index = 8500}, /*Unicode: U+0053 (S)*/ - {.w_px = 12, .glyph_index = 8680}, /*Unicode: U+0054 (T)*/ - {.w_px = 10, .glyph_index = 8920}, /*Unicode: U+0055 (U)*/ - {.w_px = 12, .glyph_index = 9120}, /*Unicode: U+0056 (V)*/ - {.w_px = 17, .glyph_index = 9360}, /*Unicode: U+0057 (W)*/ - {.w_px = 11, .glyph_index = 9700}, /*Unicode: U+0058 (X)*/ - {.w_px = 12, .glyph_index = 9920}, /*Unicode: U+0059 (Y)*/ - {.w_px = 11, .glyph_index = 10160}, /*Unicode: U+005a (Z)*/ - {.w_px = 4, .glyph_index = 10380}, /*Unicode: U+005b ([)*/ - {.w_px = 6, .glyph_index = 10460}, /*Unicode: U+005c (\)*/ - {.w_px = 4, .glyph_index = 10580}, /*Unicode: U+005d (])*/ - {.w_px = 11, .glyph_index = 10660}, /*Unicode: U+005e (^)*/ - {.w_px = 9, .glyph_index = 10880}, /*Unicode: U+005f (_)*/ - {.w_px = 4, .glyph_index = 11060}, /*Unicode: U+0060 (`)*/ - {.w_px = 8, .glyph_index = 11140}, /*Unicode: U+0061 (a)*/ - {.w_px = 9, .glyph_index = 11300}, /*Unicode: U+0062 (b)*/ - {.w_px = 8, .glyph_index = 11480}, /*Unicode: U+0063 (c)*/ - {.w_px = 9, .glyph_index = 11640}, /*Unicode: U+0064 (d)*/ - {.w_px = 10, .glyph_index = 11820}, /*Unicode: U+0065 (e)*/ - {.w_px = 7, .glyph_index = 12020}, /*Unicode: U+0066 (f)*/ - {.w_px = 9, .glyph_index = 12160}, /*Unicode: U+0067 (g)*/ - {.w_px = 8, .glyph_index = 12340}, /*Unicode: U+0068 (h)*/ - {.w_px = 2, .glyph_index = 12500}, /*Unicode: U+0069 (i)*/ - {.w_px = 4, .glyph_index = 12540}, /*Unicode: U+006a (j)*/ - {.w_px = 9, .glyph_index = 12620}, /*Unicode: U+006b (k)*/ - {.w_px = 2, .glyph_index = 12800}, /*Unicode: U+006c (l)*/ - {.w_px = 14, .glyph_index = 12840}, /*Unicode: U+006d (m)*/ - {.w_px = 8, .glyph_index = 13120}, /*Unicode: U+006e (n)*/ - {.w_px = 10, .glyph_index = 13280}, /*Unicode: U+006f (o)*/ - {.w_px = 9, .glyph_index = 13480}, /*Unicode: U+0070 (p)*/ - {.w_px = 9, .glyph_index = 13660}, /*Unicode: U+0071 (q)*/ - {.w_px = 6, .glyph_index = 13840}, /*Unicode: U+0072 (r)*/ - {.w_px = 7, .glyph_index = 13960}, /*Unicode: U+0073 (s)*/ - {.w_px = 6, .glyph_index = 14100}, /*Unicode: U+0074 (t)*/ - {.w_px = 8, .glyph_index = 14220}, /*Unicode: U+0075 (u)*/ - {.w_px = 12, .glyph_index = 14380}, /*Unicode: U+0076 (v)*/ - {.w_px = 15, .glyph_index = 14620}, /*Unicode: U+0077 (w)*/ - {.w_px = 10, .glyph_index = 14920}, /*Unicode: U+0078 (x)*/ - {.w_px = 12, .glyph_index = 15120}, /*Unicode: U+0079 (y)*/ - {.w_px = 8, .glyph_index = 15360}, /*Unicode: U+007a (z)*/ - {.w_px = 8, .glyph_index = 15520}, /*Unicode: U+007b ({)*/ - {.w_px = 2, .glyph_index = 15680}, /*Unicode: U+007c (|)*/ - {.w_px = 8, .glyph_index = 15720}, /*Unicode: U+007d (})*/ - {.w_px = 11, .glyph_index = 15880}, /*Unicode: U+007e (~)*/ + {.adv_w = 6, .adv_w_fract = 0, .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ + {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 0}, /*Unicode: U+0031 (1)*/ + {.adv_w = 9, .adv_w_fract = 0, .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 13}, /*Unicode: U+0033 (3)*/ + {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 26}, /*Unicode: U+0041 (A)*/ + {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .glyph_index = 39}, /*Unicode: U+0061 (a)*/ +}; -#endif +static const uint16_t lv_font_dejavu_20_unicode_map[] = { + 32, /*Unicode: U+0020 ( )*/ + 49, /*Unicode: U+0031 (1)*/ + 51, /*Unicode: U+0033 (3)*/ + 65, /*Unicode: U+0041 (A)*/ + 97, /*Unicode: U+0061 (a)*/ }; lv_font_t lv_font_dejavu_20 = { @@ -9160,21 +112,13 @@ lv_font_t lv_font_dejavu_20 = { .h_px = 20, /*Font height in pixels*/ .glyph_bitmap = lv_font_dejavu_20_glyph_bitmap, /*Bitmap of glyphs*/ .glyph_dsc = lv_font_dejavu_20_glyph_dsc, /*Description of glyphs*/ - .glyph_cnt = 95, /*Number of glyphs in the font*/ + .glyph_cnt = 5, /*Number of glyphs in the font*/ .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ - .get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/ - .get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/ -#if LV_USE_FONT_DEJAVU_20 == 1 + .get_bitmap = lv_font_get_glyph_bitmap_plain, /*Function pointer to get glyph's bitmap*/ + .get_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ .bpp = 1, /*Bit per pixel*/ -#elif LV_USE_FONT_DEJAVU_20 == 2 - .bpp = 2, /*Bit per pixel*/ -#elif LV_USE_FONT_DEJAVU_20 == 4 - .bpp = 4, /*Bit per pixel*/ -#elif LV_USE_FONT_DEJAVU_20 == 8 - .bpp = 8, /*Bit per pixel*/ -#endif .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; -#endif /*LV_USE_FONT_DEJAVU_20*/ +#endif /*USE_LV_FONT_DEJAVU_20*/ diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index df89aea99565..d7c4ddad95b8 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -112,7 +112,7 @@ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter) * @param letter an UNICODE character code * @return pointer to the bitmap of the letter */ -const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter) +const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter) { const lv_font_t * font_i = font_p; while(font_i != NULL) { @@ -131,12 +131,12 @@ const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter) * @param letter an UNICODE character code * @return the width of a letter */ -uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter) +uint8_t lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter, lv_font_glyph_dsc_t * dsc) { const lv_font_t * font_i = font_p; int16_t w; while(font_i != NULL) { - w = font_i->get_width(font_i, letter); + w = font_i->get_dsc(font_i, letter, dsc); if(w >= 0) { /*Glyph found*/ uint8_t m = font_i->monospace; @@ -150,26 +150,6 @@ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter) return 0; } -/** - * Get the width of the letter without overwriting it with the `monospace` attribute - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return the width of a letter - */ -uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter) -{ - const lv_font_t * font_i = font_p; - int16_t w; - while(font_i != NULL) { - w = font_i->get_width(font_i, letter); - if(w >= 0) return w; - - font_i = font_i->next_page; - } - - return 0; -} - /** * Get the bit-per-pixel of font * @param font pointer to font @@ -196,37 +176,28 @@ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter) * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ -const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t unicode_letter) +const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t unicode_letter) { /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - uint32_t index = (unicode_letter - font->unicode_first); - return &font->glyph_bitmap[font->glyph_dsc[index].glyph_index]; -} - -/** - * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters - * in the range (sparse) - * @param font pointer to font - * @param unicode_letter an unicode letter which bitmap should be get - * @return pointer to the bitmap or NULL if not found - */ -const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unicode_letter) -{ - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - - uint32_t * pUnicode; - - pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, - sizeof(uint32_t), lv_font_codeCompare); - - if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); - return &font->glyph_bitmap[font->glyph_dsc[idx].glyph_index]; + /*No Unicode list -> Continuous font*/ + if(font->unicode_list == NULL) { + uint32_t index = (unicode_letter - font->unicode_first); + return &font->glyph_bitmap[font->glyph_dsc[index].bitmap_index]; + } + /*Has Unicode list -> Sparse font */ + else { + uint32_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, + sizeof(uint32_t), lv_font_codeCompare); + if(pUnicode != NULL) { + uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); + return &font->glyph_bitmap[font->glyph_dsc[idx].bitmap_index]; + } } + /*If not returned earlier then the letter is not found in this font*/ return NULL; } @@ -237,40 +208,32 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico * @param unicode_letter an unicode letter which width should be get * @return width of the gylph or -1 if not found */ -int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_letter) +const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, uint32_t unicode_letter) { /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) { - return -1; + return NULL; } - uint32_t index = (unicode_letter - font->unicode_first); - return font->glyph_dsc[index].w_px; -} - -/** - * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all - * characters in the range (sparse) - * @param font pointer to font - * @param unicode_letter an unicode letter which width should be get - * @return width of the glyph or -1 if not found - */ -int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter) -{ - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return -1; - - uint32_t * pUnicode; - - pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, - sizeof(uint32_t), lv_font_codeCompare); - - if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); - return font->glyph_dsc[idx].w_px; + /*No Unicode list -> Continuous font*/ + if(font->unicode_list == NULL) { + uint32_t index = (unicode_letter - font->unicode_first); + return &font->glyph_dsc[index]; + } + /*Has Unicode list -> Sparse font */ + else { + uint32_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, + sizeof(uint32_t), lv_font_codeCompare); + + if(pUnicode != NULL) { + uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); + return &font->glyph_dsc[idx]; + } } - return -1; + /*If not returned earlier then the letter is not found in this font*/ + return NULL; } /********************** diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index ec7b5ba1b068..a6b376dfd8cd 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -35,16 +35,15 @@ extern "C" { typedef struct { - uint32_t w_px : 8; - uint32_t glyph_index : 24; + uint32_t adv_w :8; /*The glyph need this space. Draw the next glyph after this width */ + uint32_t adv_w_fract :4; /*Fractional part of `advance_width` in 1/16 unit*/ + uint32_t box_w :8; /*Width of the glyph's bounding box*/ + uint32_t box_h :8; /*Height of the glyph's bounding box*/ + uint32_t ofs_x :8; /*x offset of the bounding box*/ + uint32_t ofs_y :8; /*y offset of the bounding box*/ + uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ } lv_font_glyph_dsc_t; -typedef struct -{ - uint32_t unicode : 21; - uint32_t glyph_dsc_index : 11; -} lv_font_unicode_map_t; - typedef struct _lv_font_struct { uint32_t unicode_first; @@ -52,15 +51,19 @@ typedef struct _lv_font_struct const uint8_t * glyph_bitmap; const lv_font_glyph_dsc_t * glyph_dsc; const uint32_t * unicode_list; - const uint8_t * (*get_bitmap)(const struct _lv_font_struct *, - uint32_t); /*Get a glyph's bitmap from a font*/ - int16_t (*get_width)(const struct _lv_font_struct *, - uint32_t); /*Get a glyph's with with a given font*/ - struct _lv_font_struct * next_page; /*Pointer to a font extension*/ - uint32_t h_px : 8; - uint32_t bpp : 4; /*Bit per pixel: 1, 2 or 4*/ - uint32_t monospace : 8; /*Fix width (0: normal width)*/ - uint16_t glyph_cnt; /*Number of glyphs (letters) in the font*/ + + /*Get a glyph's descriptor from a font*/ + const uint8_t * (*get_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t * dsc); + + /*Get a glyph's bitmap from a font*/ + const uint8_t * (*get_bitmap)(const struct _lv_font_struct *, uint32_t); + + /*Pointer to a font extension*/ + struct _lv_font_struct * next_page; + uint32_t line_height :8; + uint32_t monospace :8; /*Fix width (0: normal width)*/ + uint32_t bpp :4; /*Bit per pixel: 1, 2, 4 or 8*/ + uint16_t glyph_cnt :11; /*Number of glyphs in the font. Max. 2048*/ } lv_font_t; /********************** @@ -100,7 +103,7 @@ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter); * @param letter an UNICODE character code * @return pointer to the bitmap of the letter */ -const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter); +const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter); /** * Get the width of a letter in a font. If `monospace` is set then return with it. From 4b43adaad10f8ca1613c73b9cdf7bd0baec5e5bf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 05:50:24 +0200 Subject: [PATCH 331/590] lv_conf_template.h and lv_conf_checker.h update --- lv_conf_template.h | 5 +++-- src/lv_conf_checker.h | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index a288e3bbbb98..ac19861d3706 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -158,8 +158,9 @@ typedef void * lv_group_user_data_t; #define LV_ATTRIBUTE_TASK_HANDLER /* With size optimization (-Os) the compiler might not align data to - * 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/ -#define LV_ATTRIBUTE_MEM_ALIGN __attribute__((aligned(4))) + * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. + * E.g. __attribute__((aligned(4))) */ +#define LV_ATTRIBUTE_MEM_ALIGN /* 1: Variable length array is supported*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 028aca2a7a8f..e673941d5e3f 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -225,6 +225,14 @@ #define LV_ATTRIBUTE_TASK_HANDLER #endif +/* With size optimization (-Os) the compiler might not align data to + * 4 or 8 byte boundary. This alignment will be explicitly applied where needed. + * E.g. __attribute__((aligned(4))) */ +#ifndef LV_ATTRIBUTE_MEM_ALIGN +#define LV_ATTRIBUTE_MEM_ALIGN +#endif + + /* 1: Variable length array is supported*/ #ifndef LV_COMPILER_VLA_SUPPORTED #define LV_COMPILER_VLA_SUPPORTED 1 @@ -545,6 +553,9 @@ #ifndef LV_LABEL_WAIT_CHAR_COUNT # define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ #endif +#ifndef LV_LABEL_TEXT_SEL +# define LV_LABEL_TEXT_SEL 1 /*Enable selecting text of the label */ +#endif #endif /*LED (dependencies: -)*/ From 2d5183b05d199e7138a42397091195e2973646ab Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 06:00:50 +0200 Subject: [PATCH 332/590] lv_kb: make controll buttons work on click instead of press --- src/lv_objx/lv_kb.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 0e54a6baf987..c5f9fbeff570 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -16,6 +16,7 @@ /********************* * DEFINES *********************/ +#define LV_KB_CTRL_BTN_FLAGS (LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_CLICK_TRIG) /********************** * TYPEDEFS @@ -37,10 +38,10 @@ static const char * kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), - 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, - 2}; + LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 6, 2, 2}; static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", @@ -48,10 +49,10 @@ static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { - 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, (6 | LV_BTNM_CTRL_NO_REPEAT), - 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6, 2, - 2}; + LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 6, 2, 2}; static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", "Bksp", "\n", "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", @@ -59,17 +60,21 @@ static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8" LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, (2 | LV_BTNM_CTRL_NO_REPEAT), - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 6, 2, 2}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + LV_KB_CTRL_BTN_FLAGS | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + LV_KB_CTRL_BTN_FLAGS | 2, LV_KB_CTRL_BTN_FLAGS | 2, 6, 2, 2}; static const char * kb_map_num[] = {"1", "2", "3", LV_SYMBOL_CLOSE, "\n", "4", "5", "6", LV_SYMBOL_OK, "\n", "7", "8", "9", "Bksp", "\n", "+/-", "0", ".", LV_SYMBOL_LEFT, LV_SYMBOL_RIGHT, ""}; -static const lv_btnm_ctrl_t kb_ctrl_num_map[] = {1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1}; +static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { + 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + LV_KB_CTRL_BTN_FLAGS | 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 1, LV_KB_CTRL_BTN_FLAGS | 1}; /* clang-format on */ /********************** @@ -317,7 +322,7 @@ const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) */ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) { - if(event != LV_EVENT_PRESSED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; + if(event != LV_EVENT_SELECTED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); uint16_t btn_id = lv_btnm_get_active_btn(kb); From e2cfba7c9f7b92130601a71a2421934ce2d69538 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 08:45:07 +0200 Subject: [PATCH 333/590] add user data where is was missing --- src/lv_core/lv_group.h | 7 +++--- src/lv_core/lv_indev.c | 20 ---------------- src/lv_core/lv_indev.h | 14 ----------- src/lv_core/lv_obj.c | 26 +++++++++++---------- src/lv_core/lv_obj.h | 5 ++-- src/lv_core/lv_style.c | 22 ++++++++++-------- src/lv_core/lv_style.h | 13 +++++++++-- src/lv_draw/lv_draw_basic.c | 8 +++---- src/lv_hal/lv_hal_disp.h | 4 ++-- src/lv_hal/lv_hal_indev.h | 19 ++++++++------- src/lv_misc/lv_anim.c | 18 +++++++-------- src/lv_misc/lv_anim.h | 36 +++++++++++++++++++++-------- src/lv_objx/lv_bar.c | 14 +++++------ src/lv_objx/lv_btn.c | 30 ++++++++++++------------ src/lv_objx/lv_ddlist.c | 8 +++---- src/lv_objx/lv_label.c | 32 +++++++++++++------------- src/lv_objx/lv_list.c | 12 +++++----- src/lv_objx/lv_mbox.c | 10 ++++---- src/lv_objx/lv_page.c | 46 ++++++++++++++++++------------------- src/lv_objx/lv_preload.c | 18 +++++++-------- src/lv_objx/lv_roller.c | 16 +++++++++---- src/lv_objx/lv_spinbox.h | 3 --- src/lv_objx/lv_ta.c | 30 ++++++++++++------------ src/lv_objx/lv_tabview.c | 14 +++++------ src/lv_objx/lv_tileview.c | 8 +++---- src/lv_objx/lv_tileview.h | 4 ---- 26 files changed, 217 insertions(+), 220 deletions(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index f33ed03a70f0..2c05ea38c3b7 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -52,10 +52,9 @@ typedef struct _lv_group_t { lv_ll_t obj_ll; /*Linked list to store the objects in the group */ lv_obj_t ** obj_focus; /*The object in focus*/ - lv_group_style_mod_func_t - style_mod; /*A function which modifies the style of the focused object*/ - lv_group_style_mod_func_t - style_mod_edit; /*A function which modifies the style of the focused object*/ + + lv_group_style_mod_func_t style_mod; /*A function to modifies the style of the focused object*/ + lv_group_style_mod_func_t style_mod_edit; /*A function which modifies the style of the edited object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ #if LV_USE_USER_DATA_SINGLE diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index fa4c594b9fe1..91fe3a68179e 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -219,16 +219,6 @@ void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points) } } -/** - * Set feedback callback for indev. - * @param indev pointer to an input device - * @param feedback feedback callback - */ -void lv_indev_set_feedback(lv_indev_t * indev, lv_indev_feedback_t feedback) -{ - indev->feedback = feedback; -} - /** * Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device @@ -295,16 +285,6 @@ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point) } } -/** - * Get feedback callback for indev. - * @param indev pointer to an input device - * @return feedback callback - */ -lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t * indev) -{ - return indev->feedback; -} - /** * Do nothing until the next release * @param indev pointer to an input device diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index 3fce12694c45..e29afc761bc1 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -97,13 +97,6 @@ void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group); */ void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points); -/** - * Set feedback callback for indev. - * @param indev pointer to an input device - * @param feedback feedback callback - */ -void lv_indev_set_feedback(lv_indev_t * indev, lv_indev_feedback_t feedback); - /** * Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON) * @param indev pointer to an input device @@ -134,13 +127,6 @@ bool lv_indev_is_dragging(const lv_indev_t * indev); */ void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point); -/** - * Get feedback callback for indev. - * @param indev pointer to an input device - * @return feedback callback - */ -lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t * indev); - /** * Do nothing until the next release * @param indev pointer to an input device diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 0cd0400dcdd9..dd9563a8ff53 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1383,10 +1383,10 @@ void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj) * @param type type of animation from 'lv_anim_builtin_t'. 'OR' it with ANIM_IN or ANIM_OUT * @param time time of animation in milliseconds * @param delay delay before the animation in milliseconds - * @param cb a function to call when the animation is ready + * @param ready_cb a function to call when the animation is ready */ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, - void (*cb)(lv_obj_t *)) + lv_anim_ready_cb_t ready_cb) { lv_obj_t * par = lv_obj_get_parent(obj); @@ -1398,8 +1398,8 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 a.var = obj; a.time = time; a.act_time = (int32_t)-delay; - a.end_cb = (void (*)(void *))cb; - a.path = lv_anim_path_linear; + a.ready_cb = ready_cb; + a.path_cb = lv_anim_path_linear; a.playback_pause = 0; a.repeat_pause = 0; a.playback = 0; @@ -1408,37 +1408,37 @@ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint1 /*Init to ANIM_IN*/ switch(type) { case LV_ANIM_FLOAT_LEFT: - a.fp = (void (*)(void *, int32_t))lv_obj_set_x; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_x; a.start = -lv_obj_get_width(obj); a.end = lv_obj_get_x(obj); break; case LV_ANIM_FLOAT_RIGHT: - a.fp = (void (*)(void *, int32_t))lv_obj_set_x; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_x; a.start = lv_obj_get_width(par); a.end = lv_obj_get_x(obj); break; case LV_ANIM_FLOAT_TOP: - a.fp = (void (*)(void *, int32_t))lv_obj_set_y; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_y; a.start = -lv_obj_get_height(obj); a.end = lv_obj_get_y(obj); break; case LV_ANIM_FLOAT_BOTTOM: - a.fp = (void (*)(void *, int32_t))lv_obj_set_y; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_y; a.start = lv_obj_get_height(par); a.end = lv_obj_get_y(obj); break; case LV_ANIM_GROW_H: - a.fp = (void (*)(void *, int32_t))lv_obj_set_width; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_width; a.start = 0; a.end = lv_obj_get_width(obj); break; case LV_ANIM_GROW_V: - a.fp = (void (*)(void *, int32_t))lv_obj_set_height; + a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_height; a.start = 0; a.end = lv_obj_get_height(obj); break; case LV_ANIM_NONE: - a.fp = NULL; + a.exec_cb = NULL; a.start = 0; a.end = 0; break; @@ -2091,7 +2091,9 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) lv_indev_t * indev_act = lv_indev_get_act(); if(sign > _LV_SIGNAL_FEEDBACK_SECTION_START && sign < _LV_SIGNAL_FEEDBACK_SECTION_END) { - if(indev_act != NULL && indev_act->feedback != NULL) indev_act->feedback(indev_act, sign); + if(indev_act != NULL) { + if(indev_act->driver.feedback_cb) indev_act->driver.feedback_cb(&indev_act->driver, sign); + } } if(sign == LV_SIGNAL_CHILD_CHG) { diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 657a83583f97..09b07a0d19f0 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -612,16 +612,17 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj); #if LV_USE_ANIMATION + /** * Animate an object * @param obj pointer to an object to animate * @param type type of animation from 'lv_anim_builtin_t'. 'OR' it with ANIM_IN or ANIM_OUT * @param time time of animation in milliseconds * @param delay delay before the animation in milliseconds - * @param cb a function to call when the animation is ready + * @param ready_cb a function to call when the animation is ready */ void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, - void (*cb)(lv_obj_t *)); + lv_anim_ready_cb_t ready_cb); #endif /*======================= diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 27200133991b..ea6b3bb59cde 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -33,7 +33,7 @@ typedef struct will be modified too*/ lv_style_t style_end; lv_style_t * style_anim; - void (*end_cb)(void *); + lv_anim_ready_cb_t ready_cb; } lv_style_anim_dsc_t; #endif @@ -42,7 +42,7 @@ typedef struct **********************/ #if LV_USE_ANIMATION static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val); -static void style_animation_common_end_cb(void * ptr); +static void style_animation_common_end_cb(lv_anim_t * a); #endif /********************** @@ -303,15 +303,15 @@ void * lv_style_anim_create(lv_style_anim_t * anim) memcpy(&dsc->style_start, anim->style_start, sizeof(lv_style_t)); memcpy(&dsc->style_end, anim->style_end, sizeof(lv_style_t)); memcpy(dsc->style_anim, anim->style_start, sizeof(lv_style_t)); - dsc->end_cb = anim->end_cb; + dsc->ready_cb = anim->ready_cb; lv_anim_t a; a.var = (void *)dsc; a.start = 0; a.end = STYLE_MIX_MAX; - a.fp = (lv_anim_fp_t)style_animator; - a.path = lv_anim_path_linear; - a.end_cb = style_animation_common_end_cb; + a.exec_cb = (lv_anim_exec_cb_t)style_animator; + a.path_cb = lv_anim_path_linear; + a.ready_cb = style_animation_common_end_cb; a.act_time = anim->act_time; a.time = anim->time; a.playback = anim->playback; @@ -348,13 +348,15 @@ static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val) /** * Called when a style animation is ready * It called the user defined call back and free the allocated memories - * @param ptr the 'animated variable' set by lv_style_anim_create() + * @param a pointer to the animation */ -static void style_animation_common_end_cb(void * ptr) +static void style_animation_common_end_cb(lv_anim_t * a) { - lv_style_anim_dsc_t * dsc = ptr; /*To avoid casting*/ - if(dsc->end_cb) dsc->end_cb(dsc); + (void) a; /*Unused*/ + lv_style_anim_dsc_t * dsc = a->var; /*To avoid casting*/ + + if(dsc->ready_cb) dsc->ready_cb(a); lv_mem_free(dsc); } diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index e77b8085ae50..4f4ac19b47e5 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -115,11 +115,19 @@ typedef struct const lv_style_t * style_start; /*Pointer to the starting style*/ const lv_style_t * style_end; /*Pointer to the destination style*/ lv_style_t * style_anim; /*Pointer to a style to animate*/ - lv_anim_cb_t end_cb; /*Call it when the animation is ready (NULL if unused)*/ + lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready (NULL if unused)*/ int16_t time; /*Animation time in ms*/ int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ uint16_t playback_pause; /*Wait before play back*/ uint16_t repeat_pause; /*Wait before repeat*/ +#if LV_USE_USER_DATA_SINGLE + lv_anim_user_data_t user_data; /*Custom user data*/ +#endif + +#if LV_USE_USER_DATA_MULTI + lv_anim_user_data_t ready_user_data; +#endif + uint8_t playback : 1; /*When the animation is ready play it back*/ uint8_t repeat : 1; /*Repeat the animation infinitely*/ } lv_style_anim_t; @@ -135,7 +143,8 @@ a.playback = 0; a.playback_pause = 0; a.repeat = 0; a.repeat_pause = 0; -a.end_cb = NULL; +a.ready_cb = NULL; +a.user_data = NULL; lv_style_anim_create(&a); */ #endif diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 144fc4733446..cf57b723ad28 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -158,7 +158,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ else if(opa == LV_OPA_COVER) { /*Use hw fill if present*/ if(disp->driver.mem_fill_cb) { - disp->driver.mem_fill_cb(vdb->buf_act, &vdb->area, &vdb_rel_a, color); + disp->driver.mem_fill_cb(&disp->driver, vdb->buf_act, &vdb->area, &vdb_rel_a, color); } /*Use hw blend if present and the area is not too small*/ else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && @@ -175,7 +175,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ /*Blend the filled line to every line VDB line-by-line*/ lv_coord_t row; for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_blend_cb(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); + disp->driver.mem_blend_cb(&disp->driver, &vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); vdb_buf_tmp += vdb_width; } @@ -200,7 +200,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ } lv_coord_t row; for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) { - disp->driver.mem_blend_cb(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); + disp->driver.mem_blend_cb(&disp->driver, &vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa); vdb_buf_tmp += vdb_width; } @@ -441,7 +441,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint if(disp->driver.mem_blend_cb == false) { sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } else { - disp->driver.mem_blend_cb(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); + disp->driver.mem_blend_cb(&disp->driver, vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); } #else sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa); diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index ed4a2c7dab58..7026ba9561cf 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -92,10 +92,10 @@ typedef struct _disp_drv_t #if LV_USE_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ - void (*mem_blend_cb)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); + void (*mem_blend_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); /*OPTIONAL: Fill a memory with a color (GPU only)*/ - void (*mem_fill_cb)(lv_color_t * dest_buf, const lv_area_t * dest_area, + void (*mem_fill_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, const lv_area_t * fill_area, lv_color_t color); #endif diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index f53d8e0aa158..d5ac7f4f201a 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -54,6 +54,7 @@ typedef uint8_t lv_indev_type_t; enum { LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR }; typedef uint8_t lv_indev_state_t; + /*Data type when an input device is read */ typedef struct { @@ -73,18 +74,23 @@ typedef struct _lv_indev_drv_t /*Input device type*/ lv_indev_type_t type; - /*Function pointer to read_cb data. Return 'true' if there is still data to be read_cb - * (buffered)*/ + /*Function pointer to read input device data. + * Return 'true' if there is still data to be read (buffered)*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data); -#if LV_USE_USER_DATA_MULTI - lv_indev_drv_user_data_t read_user_data; -#endif + /*Called when an action happened on the input device.*/ + void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); #if LV_USE_USER_DATA_SINGLE lv_indev_drv_user_data_t user_data; #endif +#if LV_USE_USER_DATA_MULTI + lv_indev_drv_user_data_t read_user_data; + lv_indev_drv_user_data_t feedback_user_data; +#endif + + /*Pointer to the assigned display*/ struct _disp_t * disp; @@ -143,8 +149,6 @@ typedef struct _lv_indev_proc_t uint8_t wait_until_release : 1; } lv_indev_proc_t; -typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, uint8_t); - struct _lv_obj_t; struct _lv_group_t; @@ -154,7 +158,6 @@ typedef struct _lv_indev_t { lv_indev_drv_t driver; lv_indev_proc_t proc; - lv_indev_feedback_t feedback; struct _lv_obj_t * cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/ struct _lv_group_t * group; /*Keypad destination group*/ const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index a8fda05b144f..3da4584bee4f 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -68,8 +68,8 @@ void lv_anim_create(lv_anim_t * anim_p) { LV_LOG_TRACE("animation create started") /* Do not let two animations for the same 'var' with the same 'fp'*/ - if(anim_p->fp != NULL) - lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/ + if(anim_p->exec_cb != NULL) + lv_anim_del(anim_p->var, anim_p->exec_cb); /*fp == NULL would delete all animations of var*/ /*Add the new animation to the animation linked list*/ lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll)); @@ -81,7 +81,7 @@ void lv_anim_create(lv_anim_t * anim_p) memcpy(new_anim, anim_p, sizeof(lv_anim_t)); /*Set the start value*/ - if(new_anim->fp != NULL) new_anim->fp(new_anim->var, new_anim->start); + if(new_anim->exec_cb != NULL) new_anim->exec_cb(new_anim->var, new_anim->start); /* Creating an animation changed the linked list. * It's important if it happens in a ready callback. (see `anim_task`)*/ @@ -97,7 +97,7 @@ void lv_anim_create(lv_anim_t * anim_p) * or NULL to delete all animations of 'var' * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_fp_t fp) +bool lv_anim_del(void * var, lv_anim_exec_cb_t fp) { lv_anim_t * a; lv_anim_t * a_next; @@ -107,7 +107,7 @@ bool lv_anim_del(void * var, lv_anim_fp_t fp) /*'a' might be deleted, so get the next object while 'a' is valid*/ a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a); - if(a->var == var && (a->fp == fp || fp == NULL)) { + if(a->var == var && (a->exec_cb == fp || fp == NULL)) { lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in @@ -386,9 +386,9 @@ static void anim_task(void * param) if(a->act_time > a->time) a->act_time = a->time; int32_t new_value; - new_value = a->path(a); + new_value = a->path_cb(a); - if(a->fp != NULL) a->fp(a->var, new_value); /*Apply the calculated value*/ + if(a->exec_cb != NULL) a->exec_cb(a->var, new_value); /*Apply the calculated value*/ /*If the time is elapsed the animation is ready*/ if(a->act_time >= a->time) { @@ -422,7 +422,7 @@ static bool anim_ready_handler(lv_anim_t * a) * - no repeat, play back is enabled and play back is ready */ if((a->repeat == 0 && a->playback == 0) || (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { - void (*cb)(void *) = a->end_cb; + lv_anim_ready_cb_t ready_cb = a->ready_cb; void * p = a->var; lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); @@ -431,7 +431,7 @@ static bool anim_ready_handler(lv_anim_t * a) /* Call the callback function at the end*/ /* Check if an animation is deleted in the cb function * if yes then the caller function has to know this*/ - if(cb != NULL) cb(p); + if(ready_cb != NULL) ready_cb(p); } /*If the animation is not deleted then restart it*/ else { diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 7f17cf3c9b17..b5cc326b2acf 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -34,23 +34,37 @@ extern "C" { struct _lv_anim_t; -typedef int32_t (*lv_anim_path_t)(const struct _lv_anim_t *); +/*Generic prototype of "animator" functions*/ +typedef void (*lv_anim_exec_cb_t)(void *, int32_t); -typedef void (*lv_anim_fp_t)(void *, int32_t); -typedef void (*lv_anim_cb_t)(void *); +/*Get the current value in an animation*/ +typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); + +/*Callback for animation ready*/ +typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); typedef struct _lv_anim_t { void * var; /*Variable to animate*/ - lv_anim_fp_t fp; /*Animator function*/ - lv_anim_cb_t end_cb; /*Call it when the animation is ready*/ - lv_anim_path_t path; /*An array with the steps of animations*/ + lv_anim_exec_cb_t exec_cb; /*Function to execute to animate*/ + lv_anim_path_cb_t path_cb; /*An array with the steps of animations*/ + lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready*/ int32_t start; /*Start value*/ int32_t end; /*End value*/ uint16_t time; /*Animation time in ms*/ int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ uint16_t playback_pause; /*Wait before play back*/ uint16_t repeat_pause; /*Wait before repeat*/ +#if LV_USE_USER_DATA_SINGLE + lv_anim_user_data_t user_data; /*Custom user data*/ +#endif + +#if LV_USE_USER_DATA_MULTI + lv_anim_user_data_t exec_user_data; + lv_anim_user_data_t path_user_data; + lv_anim_user_data_t ready_user_data; +#endif + uint8_t playback : 1; /*When the animation is ready play it back*/ uint8_t repeat : 1; /*Repeat the animation infinitely*/ /*Animation system use these - user shouldn't set*/ @@ -63,15 +77,16 @@ lv_anim_t a; a.var = obj; a.start = lv_obj_get_height(obj); a.end = new_height; -a.fp = (lv_anim_fp_t)lv_obj_set_height; -a.path = lv_anim_path_linear; -a.end_cb = NULL; +a.exec_cb = (lv_anim_fp_t)lv_obj_set_height; +a.path_cb = lv_anim_path_linear; +a.ready_cb = NULL; a.act_time = 0; a.time = 200; a.playback = 0; a.playback_pause = 0; a.repeat = 0; a.repeat_pause = 0; +a.user_data = NULL; lv_anim_create(&a); */ /********************** @@ -96,7 +111,7 @@ void lv_anim_create(lv_anim_t * anim_p); * or NULL to ignore it and delete all animation with 'var * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_fp_t fp); +bool lv_anim_del(void * var, lv_anim_exec_cb_t fp); /** * Get the number of currently running animations @@ -162,6 +177,7 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a); * @return the current value to set */ int32_t lv_anim_path_step(const lv_anim_t * a); + /********************** * MACROS **********************/ diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 14154fabdd55..d53593855aee 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -31,7 +31,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); static void lv_bar_animate(void * bar, int32_t value); -static void lv_bar_anim_ready(void * bar); +static void lv_bar_anim_ready(lv_anim_t * a); /********************** * STATIC VARIABLES @@ -158,9 +158,9 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) a.var = bar; a.start = LV_BAR_ANIM_STATE_START; a.end = LV_BAR_ANIM_STATE_END; - a.fp = (lv_anim_fp_t)lv_bar_animate; - a.path = lv_anim_path_linear; - a.end_cb = lv_bar_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_bar_animate; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_bar_anim_ready; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -482,11 +482,11 @@ static void lv_bar_animate(void * bar, int32_t value) lv_obj_invalidate(bar); } -static void lv_bar_anim_ready(void * bar) +static void lv_bar_anim_ready(lv_anim_t * a) { - lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + lv_bar_ext_t * ext = lv_obj_get_ext_attr(a->var); ext->anim_state = LV_BAR_ANIM_STATE_INV; - lv_bar_set_value(bar, ext->anim_end, false); + lv_bar_set_value(a->var, ext->anim_end, false); } #endif diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index d08442b879e3..4b1cdd8b7d04 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -36,7 +36,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val); -static void lv_btn_ink_effect_anim_ready(void * p); +static void lv_btn_ink_effect_anim_ready(lv_anim_t * a); #endif /********************** @@ -502,7 +502,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Forget the old inked button*/ if(ink_obj != NULL && ink_obj != btn) { - lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); + lv_anim_del(ink_obj, (lv_anim_exec_cb_t)lv_btn_ink_effect_anim); lv_obj_invalidate(ink_obj); ink_obj = NULL; } @@ -517,9 +517,9 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = btn; a.start = 0; a.end = LV_BTN_INK_VALUE_MAX; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; a.time = ext->ink_in_time; a.playback = 0; @@ -586,9 +586,9 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = ink_obj; a.start = LV_BTN_INK_VALUE_MAX; a.end = 0; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; a.time = ext->ink_out_time; a.playback = 0; @@ -624,7 +624,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { - lv_anim_del(ink_obj, (lv_anim_fp_t)lv_btn_ink_effect_anim); + lv_anim_del(ink_obj, (lv_anim_exec_cb_t)lv_btn_ink_effect_anim); ink_obj = NULL; } #endif @@ -657,11 +657,11 @@ static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val) /** * Called to clean up when the ink animation is ready - * @param p unused + * @param a unused */ -static void lv_btn_ink_effect_anim_ready(void * p) +static void lv_btn_ink_effect_anim_ready(lv_anim_t * a) { - (void)p; /*Unused*/ + (void) a; /*Unused*/ lv_btn_ext_t * ext = lv_obj_get_ext_attr(ink_obj); lv_btn_state_t state = lv_btn_get_state(ink_obj); @@ -675,9 +675,9 @@ static void lv_btn_ink_effect_anim_ready(void * p) a.var = ink_obj; a.start = LV_BTN_INK_VALUE_MAX; a.end = 0; - a.fp = (lv_anim_fp_t)lv_btn_ink_effect_anim; - a.path = lv_anim_path_linear; - a.end_cb = lv_btn_ink_effect_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = -ext->ink_wait_time; a.time = ext->ink_out_time; a.playback = 0; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index a1b565ed4aab..c2a1b2166e57 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -872,7 +872,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION - lv_anim_del(ddlist, (lv_anim_fp_t)lv_ddlist_adjust_height); /*If an animation is in progress then + lv_anim_del(ddlist, (lv_anim_exec_cb_t)lv_ddlist_adjust_height); /*If an animation is in progress then it will overwrite this changes*/ lv_ddlist_anim_cb(ddlist); /*Force animation complete to fix highlight selection*/ } else { @@ -880,9 +880,9 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) a.var = ddlist; a.start = lv_obj_get_height(ddlist); a.end = new_height; - a.fp = (lv_anim_fp_t)lv_ddlist_adjust_height; - a.path = lv_anim_path_linear; - a.end_cb = (lv_anim_cb_t)lv_ddlist_anim_cb; + a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; + a.path_cb = lv_anim_path_linear; + a.ready_cb = (lv_anim_ready_cb_t)lv_ddlist_anim_cb; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 585f69e82b39..4a8d3111b75a 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -264,10 +264,10 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) #if LV_USE_ANIMATION /*Delete the old animation (if exists)*/ - lv_anim_del(label, (lv_anim_fp_t)lv_obj_set_x); - lv_anim_del(label, (lv_anim_fp_t)lv_obj_set_y); - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_obj_set_x); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); #endif ext->offset.x = 0; ext->offset.y = 0; @@ -948,8 +948,8 @@ static void lv_label_refr_text(lv_obj_t * label) anim.repeat = 1; anim.playback = 1; anim.start = 0; - anim.end_cb = NULL; - anim.path = lv_anim_path_linear; + anim.ready_cb = NULL; + anim.path_cb = lv_anim_path_linear; anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; @@ -959,24 +959,24 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { anim.end = lv_obj_get_width(label) - size.x; - anim.fp = (lv_anim_fp_t)lv_label_set_offset_x; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); ext->offset.x = 0; } if(size.y > lv_obj_get_height(label) && hor_anim == false) { anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_height(font)); - anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); ext->offset.y = 0; } #endif @@ -992,32 +992,32 @@ static void lv_label_refr_text(lv_obj_t * label) anim.act_time = -(((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; - anim.end_cb = NULL; - anim.path = lv_anim_path_linear; + anim.ready_cb = NULL; + anim.path_cb = lv_anim_path_linear; anim.playback_pause = 0; anim.repeat_pause = 0; bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { anim.end = -size.x - lv_font_get_width(font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; - anim.fp = (lv_anim_fp_t)lv_label_set_offset_x; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); ext->offset.x = 0; } if(size.y > lv_obj_get_height(label) && hor_anim == false) { anim.end = -size.y - (lv_font_get_height(font)); - anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_fp_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); ext->offset.y = 0; } #endif diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index c52bfbe630c9..3d7e9dee4a1b 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -627,9 +627,9 @@ void lv_list_up(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; @@ -670,9 +670,9 @@ void lv_list_down(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 40c409099ee8..e98c40ee1b47 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -36,7 +36,7 @@ **********************/ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param); static void mbox_realign(lv_obj_t * mbox); -static void lv_mbox_close_end_cb(lv_obj_t * mbox); +static void lv_mbox_close_ready_cb(lv_anim_t * a); static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event); /********************** @@ -204,12 +204,12 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) /*Add shrinking animations*/ lv_obj_animate(mbox, LV_ANIM_GROW_H | LV_ANIM_OUT, ext->anim_time, delay, NULL); lv_obj_animate(mbox, LV_ANIM_GROW_V | LV_ANIM_OUT, ext->anim_time, delay, - lv_mbox_close_end_cb); + lv_mbox_close_ready_cb); /*Disable fit to let shrinking work*/ lv_cont_set_fit(mbox, LV_FIT_NONE); } else { - lv_obj_animate(mbox, LV_ANIM_NONE, ext->anim_time, delay, lv_mbox_close_end_cb); + lv_obj_animate(mbox, LV_ANIM_NONE, ext->anim_time, delay, lv_mbox_close_ready_cb); } #else (void)delay; /*Unused*/ @@ -491,9 +491,9 @@ static void mbox_realign(lv_obj_t * mbox) } } -static void lv_mbox_close_end_cb(lv_obj_t * mbox) +static void lv_mbox_close_ready_cb(lv_anim_t * a) { - lv_obj_del(mbox); + lv_obj_del(a->var); } static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index fc8e2ddfd38b..874df970214b 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -41,7 +41,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); static void edge_flash_anim(void * page, int32_t v); -static void edge_flash_anim_end(void * page); +static void edge_flash_anim_end(lv_anim_t * a); static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event); /********************** @@ -433,12 +433,12 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) #else /* Be sure there is no position changing animation in progress * because it can overide the current changes*/ - lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_x); - lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_y); - lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_pos); - lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_x); - lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_y); - lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos); + lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_x); + lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_pos); + lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_x); + lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_pos); #endif const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); @@ -500,17 +500,17 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) a.start = lv_obj_get_y(ext->scrl); a.end = scrlable_y; a.time = anim_time; - a.end_cb = NULL; + a.ready_cb = NULL; a.playback = 0; a.repeat = 0; a.var = ext->scrl; - a.path = lv_anim_path_linear; - a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; lv_anim_create(&a); a.start = lv_obj_get_x(ext->scrl); a.end = scrlable_x; - a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; lv_anim_create(&a); #endif } @@ -530,9 +530,9 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_x(scrl); a.end = a.start + dist; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_PAGE_SCROLL_ANIM_TIME; a.playback = 0; @@ -559,9 +559,9 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = a.start + dist; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_PAGE_SCROLL_ANIM_TIME; a.playback = 0; @@ -588,9 +588,9 @@ void lv_page_start_edge_flash(lv_obj_t * page) a.var = page; a.start = 0; a.end = LV_PAGE_END_FLASH_SIZE; - a.fp = (lv_anim_fp_t)edge_flash_anim; - a.path = lv_anim_path_linear; - a.end_cb = edge_flash_anim_end; + a.exec_cb = (lv_anim_exec_cb_t)edge_flash_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = edge_flash_anim_end; a.act_time = 0; a.time = LV_PAGE_END_ANIM_TIME; a.playback = 1; @@ -1201,14 +1201,14 @@ static void edge_flash_anim(void * page, int32_t v) lv_obj_invalidate(page); } -static void edge_flash_anim_end(void * page) +static void edge_flash_anim_end(lv_anim_t * a) { - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + lv_page_ext_t * ext = lv_obj_get_ext_attr(a->var); ext->edge_flash.top_ip = 0; ext->edge_flash.bottom_ip = 0; ext->edge_flash.left_ip = 0; ext->edge_flash.right_ip = 0; - lv_obj_invalidate(page); + lv_obj_invalidate(a->var); } #endif diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 7bff32e65160..4d8c0b8741e8 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -189,9 +189,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.fp = (lv_anim_fp_t)lv_preload_spinner_anim; - a.path = lv_anim_path_ease_in_out; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.path_cb = lv_anim_path_ease_in_out; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->time; a.playback = 0; @@ -211,9 +211,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) b.start = ext->arc_length; b.end = 360 - ext->arc_length; } - b.fp = (lv_anim_fp_t)lv_preload_set_arc_length; - b.path = lv_anim_path_ease_in_out; - b.end_cb = NULL; + b.exec_cb = (lv_anim_exec_cb_t)lv_preload_set_arc_length; + b.path_cb = lv_anim_path_ease_in_out; + b.ready_cb = NULL; b.act_time = 0; b.time = ext->time; b.playback = 1; @@ -237,9 +237,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.fp = (lv_anim_fp_t)lv_preload_spinner_anim; - a.path = lv_anim_path_ease_in_out; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.path_cb = lv_anim_path_ease_in_out; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->time; a.playback = 0; diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index f27730b212e9..7fa684ddf5f1 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -37,6 +37,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param); static void refr_position(lv_obj_t * roller, bool anim_en); static void inf_normalize(void * roller_scrl); +static void scroll_anim_ready_cb(lv_anim_t * a); static void draw_bg(lv_obj_t * roller, const lv_area_t * mask); /********************** @@ -399,7 +400,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); - lv_anim_del(lv_page_get_scrl(roller), (lv_anim_fp_t)lv_obj_set_y); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); @@ -413,7 +414,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); - lv_anim_del(lv_page_get_scrl(roller), (lv_anim_fp_t)lv_obj_set_y); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); } @@ -632,9 +633,9 @@ static void refr_position(lv_obj_t * roller, bool anim_en) a.var = roller_scrl; a.start = lv_obj_get_y(roller_scrl); a.end = new_y; - a.fp = (lv_anim_fp_t)lv_obj_set_y; - a.path = lv_anim_path_linear; - a.end_cb = inf_normalize; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = scroll_anim_ready_cb; a.act_time = 0; a.time = ext->ddlist.anim_time; a.playback = 0; @@ -677,4 +678,9 @@ static void inf_normalize(void * scrl) } } +static void scroll_anim_ready_cb(lv_anim_t * a) +{ + inf_normalize(a->var); +} + #endif diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index 969832b4ebae..484457f27c43 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -38,9 +38,6 @@ extern "C" { * TYPEDEFS **********************/ -/*callback on value change*/ -typedef void (*lv_spinbox_value_changed_cb_t)(lv_obj_t * spinbox, int32_t new_value); - /*Data of spinbox*/ typedef struct { diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index b6a912ba0622..48e1d91ebf94 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -163,17 +163,17 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) /*Create a cursor blinker animation*/ lv_anim_t a; a.var = new_ta; - a.fp = (lv_anim_fp_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; a.time = LV_TA_CURSOR_BLINK_TIME; a.act_time = 0; - a.end_cb = NULL; + a.ready_cb = NULL; a.start = 1; a.end = 0; a.repeat = 1; a.repeat_pause = 0; a.playback = 1; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #endif @@ -248,17 +248,17 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; a.start = 0; a.end = 1; a.repeat = 0; a.repeat_pause = 0; a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -328,17 +328,17 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; a.start = 0; a.end = 1; a.repeat = 0; a.repeat_pause = 0; a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -468,17 +468,17 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.fp = (lv_anim_fp_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.end_cb = (lv_anim_cb_t)pwd_char_hider; + a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; a.start = 0; a.end = 1; a.repeat = 0; a.repeat_pause = 0; a.playback = 0; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #else pwd_char_hider(ta); @@ -574,17 +574,17 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; - a.fp = (lv_anim_fp_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; a.time = LV_TA_CURSOR_BLINK_TIME; a.act_time = 0; - a.end_cb = NULL; + a.ready_cb = NULL; a.start = 1; a.end = 0; a.repeat = 1; a.repeat_pause = 0; a.playback = 1; a.playback_pause = 0; - a.path = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #endif diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 5e34723456f8..d5d1066839a6 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -379,9 +379,9 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) a.var = ext->content; a.start = lv_obj_get_x(ext->content); a.end = cont_x; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -431,18 +431,18 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) case LV_TABVIEW_BTNS_POS_BOTTOM: a.start = lv_obj_get_x(ext->indic); a.end = indic_pos; - a.fp = (lv_anim_fp_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: a.start = lv_obj_get_y(ext->indic); a.end = indic_pos; - a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; break; } - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index db62d8541970..f4a95938019b 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -211,9 +211,9 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_anim_t a; a.var = scrl; - a.fp = (lv_anim_fp_t)lv_obj_set_x; - a.path = lv_anim_path_linear; - a.end_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -230,7 +230,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b if(y_coord != y_act) { a.start = y_act; a.end = y_coord; - a.fp = (lv_anim_fp_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; lv_anim_create(&a); } #endif diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index d53a4716d5c6..85ac9c086699 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -31,10 +31,6 @@ extern "C" { * TYPEDEFS **********************/ -/* parametes: pointer to a tileview object, x, y (tile coordinates to load) - * return: LV_RES_INV: to prevent the loading of the tab; LV_RES_OK: if everything is fine*/ -typedef lv_res_t (*lv_tileview_action_t)(lv_obj_t *, lv_coord_t, lv_coord_t); - /*Data of tileview*/ typedef struct { From 56fcd2d1512ccdf9d5207d0b447fe3938723cb85 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 09:20:04 +0200 Subject: [PATCH 334/590] fix memory corruptions due to animation audates --- src/lv_misc/lv_anim.c | 11 ++++++----- src/lv_misc/lv_mem.c | 2 +- src/lv_objx/lv_page.c | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 3da4584bee4f..df38c69437a5 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -422,16 +422,17 @@ static bool anim_ready_handler(lv_anim_t * a) * - no repeat, play back is enabled and play back is ready */ if((a->repeat == 0 && a->playback == 0) || (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { - lv_anim_ready_cb_t ready_cb = a->ready_cb; - void * p = a->var; + + /*Create copy from the animation and delete the animation from the list. + * This way the `ready_cb` will see the animations like it's animation is ready deleted*/ + lv_anim_t a_tmp; + memcpy(&a_tmp, a, sizeof(lv_anim_t)); lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); anim_list_changed = true; /* Call the callback function at the end*/ - /* Check if an animation is deleted in the cb function - * if yes then the caller function has to know this*/ - if(ready_cb != NULL) ready_cb(p); + if(a_tmp.ready_cb != NULL) a_tmp.ready_cb(&a_tmp); } /*If the animation is not deleted then restart it*/ else { diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index 146eba2bef65..bfea3490b620 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -19,7 +19,7 @@ * DEFINES *********************/ /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ -#define LV_MEM_ADD_JUNK 0 +#define LV_MEM_ADD_JUNK 1 #ifdef LV_MEM_ENV64 #define MEM_UNIT uint64_t diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 874df970214b..49dc461439a1 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -768,11 +768,11 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) if(res != LV_RES_OK) return res; lv_page_ext_t * ext = lv_obj_get_ext_attr(page); - lv_fit_t fit_left = lv_page_get_scrl_fit_left(page); - lv_fit_t fit_top = lv_page_get_scrl_fit_top(page); - const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); lv_obj_t * child; if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/ + const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); + lv_fit_t fit_left = lv_page_get_scrl_fit_left(page); + lv_fit_t fit_top = lv_page_get_scrl_fit_top(page); child = lv_obj_get_child(page, NULL); while(child != NULL) { if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) { From 9e3162080ff297e8d3be2ec66fb8d7a1192797e4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 22 Apr 2019 10:17:21 +0200 Subject: [PATCH 335/590] ddlist and roller fixes --- src/lv_objx/lv_ddlist.c | 64 ++++++++++++++++++++++++++--------------- src/lv_objx/lv_ddlist.h | 2 +- src/lv_objx/lv_roller.c | 60 ++++++++++++++++++++++++-------------- src/lv_objx/lv_roller.h | 2 +- 4 files changed, 81 insertions(+), 47 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index c2a1b2166e57..cf1d22339808 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -44,7 +44,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); static void lv_ddlist_refr_width(lv_obj_t* ddlist); -static void lv_ddlist_anim_cb(lv_obj_t * ddlist); +static void lv_ddlist_anim_ready_cb(lv_anim_t * a); +static void lv_ddlist_anim_finish(lv_obj_t* ddlist); static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height); /********************** @@ -182,13 +183,13 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) switch(lv_label_get_align(ext->label)) { case LV_LABEL_ALIGN_LEFT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break; case LV_LABEL_ALIGN_CENTER: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break; case LV_LABEL_ALIGN_RIGHT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break; } @@ -236,9 +237,9 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h) * @param ddlist pointer to a drop down list * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit) +void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit) { - lv_cont_set_fit2(ddlist, fit, LV_FIT_NONE); + lv_cont_set_fit2(ddlist, fit, lv_cont_get_fit_bottom(ddlist)); lv_ddlist_refr_size(ddlist, false); } @@ -315,13 +316,13 @@ void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align) lv_label_set_align(ext->label, align); switch(align) { case LV_LABEL_ALIGN_LEFT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break; case LV_LABEL_ALIGN_CENTER: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_MID, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break; case LV_LABEL_ALIGN_RIGHT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); + lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break; } @@ -851,14 +852,19 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); const lv_style_t * style = lv_obj_get_style(ddlist); lv_coord_t new_height; - if(ext->opened) { /*Open the list*/ - if(ext->fix_height == 0) + + /*Open the list*/ + if(ext->opened) { + if(ext->fix_height == 0) { new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + style->body.padding.bottom; - else + } else { new_height = ext->fix_height; + } - } else { /*Close the list*/ + } + /*Close the list*/ + else { const lv_font_t * font = style->text.font; const lv_style_t * label_style = lv_obj_get_style(ext->label); lv_coord_t font_h = lv_font_get_height(font); @@ -874,15 +880,19 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) #if LV_USE_ANIMATION lv_anim_del(ddlist, (lv_anim_exec_cb_t)lv_ddlist_adjust_height); /*If an animation is in progress then it will overwrite this changes*/ - lv_ddlist_anim_cb(ddlist); /*Force animation complete to fix highlight selection*/ + + /*Force animation complete to fix highlight selection*/ + lv_ddlist_anim_finish(ddlist); + + } else { lv_anim_t a; a.var = ddlist; a.start = lv_obj_get_height(ddlist); a.end = new_height; - a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; - a.path_cb = lv_anim_path_linear; - a.ready_cb = (lv_anim_ready_cb_t)lv_ddlist_anim_cb; + a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_ddlist_anim_ready_cb; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -899,16 +909,24 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) /** * Position the list and remove the selection highlight if it's closed. * Called at end of list animation. - * @param ddlist pointer to a drop down list + * @param a pointer to the animation + */ +static void lv_ddlist_anim_ready_cb(lv_anim_t * a) +{ + lv_obj_t * ddlist = a->var; + lv_ddlist_anim_finish(ddlist); +} + +/** + * Clean up after the open animation + * @param ddlist */ -static void lv_ddlist_anim_cb(lv_obj_t * ddlist) +static void lv_ddlist_anim_finish(lv_obj_t* ddlist) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); lv_ddlist_pos_current_option(ddlist); - ext->force_sel = 0; /*Turn off drawing of selection*/ - if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } @@ -952,10 +970,10 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) static void lv_ddlist_refr_width(lv_obj_t* ddlist) { /*Set the TIGHT fit horizontally the set the width to the content*/ - lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, LV_FIT_TIGHT); + lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, lv_page_get_scrl_fit_bottom(ddlist)); /*Revert FILL fit to fill the parent with the options area. It allows to RIGHT/CENTER align the text*/ - lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, LV_FIT_TIGHT); + lv_page_set_scrl_fit2(ddlist, LV_FIT_FILL, lv_page_get_scrl_fit_bottom(ddlist)); } #endif diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 6a47880d6225..05ec32946a33 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -109,7 +109,7 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); * @param ddlist pointer to a drop down list * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) */ -void lv_ddlist_set_fit(lv_obj_t * ddlist, lv_fit_t fit); +void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit); /** * Set arrow draw in a drop down list diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 7fa684ddf5f1..677fb221c525 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -36,6 +36,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * param); static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param); static void refr_position(lv_obj_t * roller, bool anim_en); +static void refr_height(lv_obj_t * roller); static void inf_normalize(void * roller_scrl); static void scroll_anim_ready_cb(lv_anim_t * a); static void draw_bg(lv_obj_t * roller, const lv_area_t * mask); @@ -87,8 +88,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_roller); lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ - lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, - LV_FIT_NONE); /*Height is specified directly*/ + lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_DEF_ANIM_TIME); lv_ddlist_set_stay_open(new_roller, true); @@ -141,6 +141,11 @@ void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf) if(inf == false) { ext->inf = 0; lv_ddlist_set_options(roller, options); + + /* Make sure the roller's height and the scrollable's height is refreshed. + * They are refreshed in `LV_SIGNAL_COORD_CHG` but if the new options has the same width + * that signal won't be called. (It called because LV_FIT_TIGHT hor fit)*/ + refr_height(roller); } else { ext->inf = 1; @@ -155,9 +160,13 @@ void lv_roller_set_options(lv_obj_t * roller, const char * options, bool inf) lv_ddlist_set_options(roller, opt_extra); lv_mem_free(opt_extra); + /* Make sure the roller's height and the scrollable's height is refreshed. + * They are refreshed in `LV_SIGNAL_COORD_CHG` but if the new options has the same width + * that signal won't be called. (It called because LV_FIT_TIGHT hor fit)*/ + refr_height(roller); + uint16_t real_id_cnt = ext->ddlist.option_cnt / LV_ROLLER_INF_PAGES; - ext->ddlist.sel_opt_id = - ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt; /*Select the middle page*/ + lv_roller_set_selected(roller, ((LV_ROLLER_INF_PAGES / 2) + 1) * real_id_cnt, false); /*Select the middle page*/ } } @@ -387,21 +396,9 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par } lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_align_t obj_align = LV_ALIGN_IN_LEFT_MID; - if(ext->ddlist.label) { - lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label); - if(LV_LABEL_ALIGN_CENTER == label_align) - obj_align = LV_ALIGN_CENTER; - else if(LV_LABEL_ALIGN_RIGHT == label_align) - obj_align = LV_ALIGN_IN_RIGHT_MID; - } if(sign == LV_SIGNAL_STYLE_CHG) { - lv_obj_set_height(lv_page_get_scrl(roller), - lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); - lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); - lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); - lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); + refr_height(roller); refr_position(roller, false); } else if(sign == LV_SIGNAL_CORD_CHG) { @@ -409,11 +406,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par if(lv_obj_get_width(roller) != lv_area_get_width(param) || lv_obj_get_height(roller) != lv_area_get_height(param)) { - lv_ddlist_set_fix_height(roller, lv_obj_get_height(roller)); - lv_obj_set_height(lv_page_get_scrl(roller), - lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); - - lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); + refr_height(roller); lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); @@ -647,6 +640,29 @@ static void refr_position(lv_obj_t * roller, bool anim_en) } } +/** + * Refresh the height of the roller and the scrolable + * @param roller pointer to roller + */ +static void refr_height(lv_obj_t * roller) +{ + lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); + lv_align_t obj_align = LV_ALIGN_IN_LEFT_MID; + if(ext->ddlist.label) { + lv_label_align_t label_align = lv_label_get_align(ext->ddlist.label); + if(LV_LABEL_ALIGN_CENTER == label_align) + obj_align = LV_ALIGN_CENTER; + else if(LV_LABEL_ALIGN_RIGHT == label_align) + obj_align = LV_ALIGN_IN_RIGHT_MID; + } + + lv_obj_set_height(lv_page_get_scrl(roller), + lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); + lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); + lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); +} + /** * Set the middle page for the roller if inifinte is enabled * @param scrl pointer to the roller's scrollable (lv_obj_t *) diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index 25f5c7b8dd9e..c99b665240d0 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -104,7 +104,7 @@ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt); */ static inline void lv_roller_set_hor_fit(lv_obj_t * roller, lv_fit_t fit) { - lv_ddlist_set_fit(roller, fit); + lv_ddlist_set_hor_fit(roller, fit); } /** From ca19f8f4ff216101d7bceffd3fc8efa94f96e1c5 Mon Sep 17 00:00:00 2001 From: seyyah Date: Mon, 22 Apr 2019 16:14:29 +0300 Subject: [PATCH 336/590] Add lv_anim_user_data_t May be related to: Commit - [add user data where is was missing](https://github.com/littlevgl/lvgl/commit/e2cfba7c9f7b92130601a71a2421934ce2d69538) --- lv_conf_template.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lv_conf_template.h b/lv_conf_template.h index ac19861d3706..2e22c1e6f4b4 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -120,6 +120,9 @@ /*1: Enable the Animations */ #define LV_USE_ANIMATION 1 +#if LV_USE_ANIMATION +typedef void * lv_anim_user_data_t; +#endif /* 1: Enable shadow drawing*/ #define LV_USE_SHADOW 1 From 4a663c42d4726f07c3ce8725aa12d66ea388f6a3 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Sun, 21 Apr 2019 02:47:58 +0300 Subject: [PATCH 337/590] fix lv_conf.h include --- src/lv_misc/lv_area.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index e890bb7b03dc..b8ab439194f3 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -6,7 +6,12 @@ /********************* * INCLUDES *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif + #include "lv_area.h" #include "lv_math.h" From 5e60002a9b09099a1220c4ed716382cb0bd38d2b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 23 Apr 2019 05:59:10 +0200 Subject: [PATCH 338/590] lv_win: remove unused header style (Fixes #1041) --- src/lv_objx/lv_win.c | 4 ++-- src/lv_objx/lv_win.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 0ccac7135dce..bd7ec309f7c2 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -64,7 +64,6 @@ lv_obj_t * lv_win_create(lv_obj_t * par, const lv_obj_t * copy) ext->page = NULL; ext->header = NULL; ext->title = NULL; - ext->style_header = &lv_style_plain_color; ext->style_btn_rel = &lv_style_btn_rel; ext->style_btn_pr = &lv_style_btn_pr; ext->btn_size = (LV_DPI) / 2; @@ -538,7 +537,8 @@ static void lv_win_realign(lv_obj_t * win) btn = lv_obj_get_child_back(ext->header, btn); } - lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.left, 0); + const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER); + lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, style_header->body.padding.left, 0); lv_obj_set_pos(ext->header, 0, 0); diff --git a/src/lv_objx/lv_win.h b/src/lv_objx/lv_win.h index 100348e7500c..c418908d0bc5 100644 --- a/src/lv_objx/lv_win.h +++ b/src/lv_objx/lv_win.h @@ -61,7 +61,6 @@ typedef struct lv_obj_t * page; /*Pointer to a page which holds the content*/ lv_obj_t * header; /*Pointer to the header container of the window*/ lv_obj_t * title; /*Pointer to the title label of the window*/ - const lv_style_t * style_header; /*Style of the header container*/ const lv_style_t * style_btn_rel; /*Control button releases style*/ const lv_style_t * style_btn_pr; /*Control button pressed style*/ lv_coord_t btn_size; /*Size of the control buttons (square)*/ From abd081da30a207e219b003feee01eaac89a4d85d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 23 Apr 2019 06:42:26 +0200 Subject: [PATCH 339/590] add LV_TXT_ENC to lv_conf.h and ISO8859-1 support --- lv_conf_template.h | 7 +++ src/lv_conf_checker.h | 11 ++++ src/lv_misc/lv_txt.c | 140 +++++++++++++++++++++++++++++++++++++++++- src/lv_misc/lv_txt.h | 3 + src/lv_objx/lv_win.c | 2 +- 5 files changed, 161 insertions(+), 2 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 2e22c1e6f4b4..65552024057f 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -264,6 +264,13 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * Text settings *=================*/ +/* Select a character encoding for strings. + * Your IDE or editor should have the same character encoding + * - LV_TXT_ENC_UTF8 + * - LV_TXT_ENC_ISO8859_1 + * */ +#define LV_TXT_ENC LV_TXT_ENC_UTF8 + /*Can break (wrap) texts on these chars*/ #define LV_TXT_BREAK_CHARS " ,.;:-_" diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index e673941d5e3f..60dc6985db00 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -169,6 +169,8 @@ #ifndef LV_USE_ANIMATION #define LV_USE_ANIMATION 1 #endif +#if LV_USE_ANIMATION +#endif /* 1: Enable shadow drawing*/ #ifndef LV_USE_SHADOW @@ -401,6 +403,15 @@ * Text settings *=================*/ +/* Select a character encoding for strings. + * Your IDE or editor should have the same character encoding + * - LV_TXT_ENC_UTF8 + * - LV_TXT_ENC_ISO8859_1 + * */ +#ifndef LV_TXT_ENC +#define LV_TXT_ENC LV_TXT_ENC_UTF8 +#endif + /*Can break (wrap) texts on these chars*/ #ifndef LV_TXT_BREAK_CHARS #define LV_TXT_BREAK_CHARS " ,.;:-_" diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 00564135e035..bba881608d55 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -38,6 +38,7 @@ **********************/ static bool is_break_char(uint32_t letter); +#if LV_TXT_ENC == LV_TXT_ENC_UTF8 static uint8_t lv_txt_utf8_size(const char * str); static uint32_t lv_txt_unicode_to_utf8(uint32_t letter_uni); static uint32_t lv_txt_utf8_conv_wc(uint32_t c); @@ -46,7 +47,16 @@ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start); static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id); static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id); static uint32_t lv_txt_utf8_get_length(const char * txt); - +#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +static uint8_t lv_txt_iso8859_1_size(const char * str); +static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni); +static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c); +static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i); +static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i_start); +static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id); +static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id); +static uint32_t lv_txt_iso8859_1_get_length(const char * txt); +#endif /********************** * STATIC VARIABLES **********************/ @@ -54,6 +64,7 @@ static uint32_t lv_txt_utf8_get_length(const char * txt); /********************** * GLOBAL VARIABLES **********************/ +#if LV_TXT_ENC == LV_TXT_ENC_UTF8 uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_utf8_size; uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_utf8; uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_utf8_conv_wc; @@ -62,6 +73,17 @@ uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_pre uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id; uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id; uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length; +#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_iso8859_1_size; +uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_iso8859_1; +uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_iso8859_1_conv_wc; +uint32_t (*lv_txt_encoded_next)(const char *, uint32_t *) = lv_txt_iso8859_1_next; +uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_iso8859_1_prev; +uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_iso8859_1_get_byte_id; +uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_iso8859_1_get_char_id; +uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_iso8859_1_get_length; + +#endif /********************** * MACROS @@ -413,6 +435,7 @@ void lv_txt_cut(char * txt, uint32_t pos, uint32_t len) } } +#if LV_TXT_ENC == LV_TXT_ENC_UTF8 /******************************* * UTF-8 ENCODER/DECOER ******************************/ @@ -654,6 +677,121 @@ static uint32_t lv_txt_utf8_get_length(const char * txt) return len; } +#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +/******************************* + * IOS8859-1 ENCODER/DECOER + ******************************/ + +/** + * Give the size of an ISO8859-1 coded character + * @param str pointer to a character in a string + * @return length of the UTF-8 character (1,2,3 or 4). O on invalid code + */ +static uint8_t lv_txt_iso8859_1_size(const char * str) +{ + (void) str; /*Unused*/ + return 1; +} + + +/** + * Convert an Unicode letter to ISO8859-1. + * @param letter_uni an Unicode letter + * @return ISO8859-1 coded character in Little Endian to be compatible with C chars (e.g. 'Á', 'Ű') + */ +static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni) +{ + if(letter_uni < 128) return letter_uni; + else return ' '; +} + +/** + * Convert wide characters to ASCII, however wide characters in ASCII range (e.g. 'A') are ASCII compatible by default. + * So this function does nothing just returns with `c`. + * @param c a character, e.g. 'A' + * @return same as `c` + */ +static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c) +{ + return c; +} + +/** + * Decode an ISO8859-1 character from a string. + * @param txt pointer to '\0' terminated string + * @param i start byte index in 'txt' where to start. + * After call it will point to the next UTF-8 char in 'txt'. + * NULL to use txt[0] as index + * @return the decoded Unicode character or 0 on invalid UTF-8 code + */ +static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i) +{ + if(i == NULL) return txt[1]; /*Get the next char */ + + uint8_t letter = txt[*i] ; + (*i)++; + return letter; +} + +/** + * Get previous ISO8859-1 character form a string. + * @param txt pointer to '\0' terminated string + * @param i start byte index in 'txt' where to start. After the call it will point to the previous UTF-8 char in 'txt'. + * @return the decoded Unicode character or 0 on invalid UTF-8 code + */ +static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i) +{ + if(i == NULL) return *(txt - 1); /*Get the prev. char */ + + (*i)--; + uint8_t letter = txt[*i] ; + + return letter; +} + +/** + * Convert a character index (in an ISO8859-1 text) to byte index. + * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long + * @param txt a '\0' terminated UTF-8 string + * @param utf8_id character index + * @return byte index of the 'utf8_id'th letter + */ +static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id) +{ + (void) txt; /*Unused*/ + return utf8_id; /*In Non encoded no difference*/ +} + + +/** + * Convert a byte index (in an ISO8859-1 text) to character index. + * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long + * @param txt a '\0' terminated UTF-8 string + * @param byte_id byte index + * @return character index of the letter at 'byte_id'th position + */ +static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id) +{ + (void) txt; /*Unused*/ + return byte_id; /*In Non encoded no difference*/ +} + +/** + * Get the number of characters (and NOT bytes) in a string. Decode it with UTF-8 if enabled. + * E.g.: "ÁBC" is 3 characters (but 4 bytes) + * @param txt a '\0' terminated char string + * @return number of characters + */ +static uint32_t lv_txt_iso8859_1_get_length(const char * txt) +{ + return strlen(txt); +} +#else + +#error "Invalid character encoding. See `LV_TXT_ENC` in `lv_conf.h`" + +#endif + /********************** * STATIC FUNCTIONS **********************/ diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index df418fb1c310..07ce649247da 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -29,6 +29,9 @@ extern "C" { *********************/ #define LV_TXT_COLOR_CMD "#" +#define LV_TXT_ENC_UTF8 1 +#define LV_TXT_ENC_ISO8859_1 2 + /********************** * TYPEDEFS **********************/ diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index bd7ec309f7c2..54fb1f74a634 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -537,7 +537,7 @@ static void lv_win_realign(lv_obj_t * win) btn = lv_obj_get_child_back(ext->header, btn); } - const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER); + const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER); lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, style_header->body.padding.left, 0); lv_obj_set_pos(ext->header, 0, 0); From d7661e8bbccc05378255d8e4ee8e784b472ff046 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Tue, 23 Apr 2019 09:51:14 +0430 Subject: [PATCH 340/590] minor fixes --- src/lv_objx/lv_chart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index aad2bb8d86b2..c662ad49f41d 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -99,8 +99,8 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) memset(&ext->x_axis, 0, sizeof(ext->x_axis)); memset(&ext->y_axis, 0, sizeof(ext->y_axis)); - if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_chart); - if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_chart); + if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_cb(new_chart); + if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_chart); lv_obj_set_signal_cb(new_chart, lv_chart_signal); lv_obj_set_design_cb(new_chart, lv_chart_design); @@ -624,9 +624,9 @@ static lv_res_t lv_chart_signal(lv_obj_t * chart, lv_signal_t sign, void * param if(buf->type[i] == NULL) break; } buf->type[i] = "lv_chart"; - } else if(sign == LV_SIGNAL_REFR_EXT_SIZE) { + } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Provide extra px draw area around the chart*/ - chart->ext_size = ext->margin; + chart->ext_draw_pad = ext->margin; } return res; From 514e2baacaabdbf53678211aeb52b44285098d85 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 23 Apr 2019 14:56:40 +0200 Subject: [PATCH 341/590] make user data and callback name more consistent (Fixes #1036) --- src/lv_core/lv_group.c | 30 +++++++++++++++--------------- src/lv_core/lv_group.h | 18 +++++++++--------- src/lv_core/lv_obj.c | 16 ++++++++-------- src/lv_core/lv_obj.h | 12 ++++++------ src/lv_hal/lv_hal_disp.h | 2 ++ src/lv_misc/lv_task.c | 6 +++--- src/lv_misc/lv_task.h | 4 ++-- src/lv_themes/lv_theme.h | 4 ++-- src/lv_themes/lv_theme_alien.c | 4 ++-- src/lv_themes/lv_theme_default.c | 4 ++-- src/lv_themes/lv_theme_material.c | 4 ++-- src/lv_themes/lv_theme_mono.c | 4 ++-- src/lv_themes/lv_theme_nemo.c | 4 ++-- src/lv_themes/lv_theme_night.c | 4 ++-- src/lv_themes/lv_theme_templ.c | 4 ++-- src/lv_themes/lv_theme_zen.c | 4 ++-- 16 files changed, 63 insertions(+), 61 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 15009fea0cdf..e054657f1b1c 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -291,11 +291,11 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c) /** * Set a function for a group which will modify the object's style if it is in focus * @param group pointer to a group - * @param style_mod_func the style modifier function pointer + * @param style_mod_cb the style modifier function pointer */ -void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func) +void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_cb) { - group->style_mod = style_mod_func; + group->style_mod_cb = style_mod_cb; if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus); } @@ -304,9 +304,9 @@ void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_func_t sty * @param group pointer to a group * @param style_mod_func the style modifier function pointer */ -void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func) +void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_edit_cb) { - group->style_mod_edit = style_mod_func; + group->style_mod_edit_cb = style_mod_edit_cb; if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus); } @@ -381,9 +381,9 @@ lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style) lv_style_copy(&group->style_tmp, style); if(group->editing) { - if(group->style_mod_edit) group->style_mod_edit(group, &group->style_tmp); + if(group->style_mod_edit_cb) group->style_mod_edit_cb(group, &group->style_tmp); } else { - if(group->style_mod) group->style_mod(group, &group->style_tmp); + if(group->style_mod_cb) group->style_mod_cb(group, &group->style_tmp); } return &group->style_tmp; } @@ -418,10 +418,10 @@ lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group) * @param group pointer to a group * @return pointer to the style modifier function */ -lv_group_style_mod_func_t lv_group_get_style_mod_cb(const lv_group_t * group) +lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group) { if(!group) return false; - return group->style_mod; + return group->style_mod_cb; } /** @@ -429,10 +429,10 @@ lv_group_style_mod_func_t lv_group_get_style_mod_cb(const lv_group_t * group) * @param group pointer to a group * @return pointer to the style modifier function */ -lv_group_style_mod_func_t lv_group_get_style_mod_edit_cb(const lv_group_t * group) +lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group) { if(!group) return false; - return group->style_mod_edit; + return group->style_mod_edit_cb; } /** @@ -582,11 +582,11 @@ static void style_mod_edit_def(lv_group_t * group, lv_style_t * style) static void refresh_theme(lv_group_t * g, lv_theme_t * th) { - g->style_mod = style_mod_def; - g->style_mod_edit = style_mod_edit_def; + g->style_mod_cb = style_mod_def; + g->style_mod_edit_cb = style_mod_edit_def; if(th) { - if(th->group.style_mod) g->style_mod = th->group.style_mod; - if(th->group.style_mod_edit) g->style_mod_edit = th->group.style_mod_edit; + if(th->group.style_mod_cb) g->style_mod_cb = th->group.style_mod_cb; + if(th->group.style_mod_edit_cb) g->style_mod_edit_cb = th->group.style_mod_edit_cb; } } diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 2c05ea38c3b7..02edca0d245a 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -45,7 +45,7 @@ extern "C" { **********************/ struct _lv_group_t; -typedef void (*lv_group_style_mod_func_t)(struct _lv_group_t *, lv_style_t *); +typedef void (*lv_group_style_mod_cb_t)(struct _lv_group_t *, lv_style_t *); typedef void (*lv_group_focus_cb_t)(struct _lv_group_t *); typedef struct _lv_group_t @@ -53,8 +53,8 @@ typedef struct _lv_group_t lv_ll_t obj_ll; /*Linked list to store the objects in the group */ lv_obj_t ** obj_focus; /*The object in focus*/ - lv_group_style_mod_func_t style_mod; /*A function to modifies the style of the focused object*/ - lv_group_style_mod_func_t style_mod_edit; /*A function which modifies the style of the edited object*/ + lv_group_style_mod_cb_t style_mod_cb; /*A function to modifies the style of the focused object*/ + lv_group_style_mod_cb_t style_mod_edit_cb; /*A function which modifies the style of the edited object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ #if LV_USE_USER_DATA_SINGLE @@ -151,16 +151,16 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c); /** * Set a function for a group which will modify the object's style if it is in focus * @param group pointer to a group - * @param style_mod_func the style modifier function pointer + * @param style_mod_cb the style modifier function pointer */ -void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func); +void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_cb); /** * Set a function for a group which will modify the object's style if it is in focus in edit mode * @param group pointer to a group - * @param style_mod_func the style modifier function pointer + * @param style_mod_edit_cb the style modifier function pointer */ -void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func); +void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_cb_t style_mod_edit_cb); /** * Set a function for a group which will be called when a new object is focused @@ -228,14 +228,14 @@ lv_group_user_data_t * lv_group_get_user_data(lv_group_t * group); * @param group pointer to a group * @return pointer to the style modifier function */ -lv_group_style_mod_func_t lv_group_get_style_mod_cb(const lv_group_t * group); +lv_group_style_mod_cb_t lv_group_get_style_mod_cb(const lv_group_t * group); /** * Get a the style modifier function of a group in edit mode * @param group pointer to a group * @return pointer to the style modifier function */ -lv_group_style_mod_func_t lv_group_get_style_mod_edit_cb(const lv_group_t * group); +lv_group_style_mod_cb_t lv_group_get_style_mod_edit_cb(const lv_group_t * group); /** * Get the focus callback function of a group diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index dd9563a8ff53..eaf6f0e05168 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1259,11 +1259,11 @@ void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot) * Set a an event handler function for an object. * Used by the user to react on event which happens with the object. * @param obj pointer to an object - * @param cb the new event function + * @param event_cb the new event function */ -void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb) +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb) { - obj->event_cb = cb; + obj->event_cb = event_cb; } /** @@ -1322,9 +1322,9 @@ const void * lv_event_get_data(void) * @param obj pointer to an object * @param cb the new signal function */ -void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb) +void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb) { - obj->signal_cb = cb; + obj->signal_cb = signal_cb; } /** @@ -1340,11 +1340,11 @@ void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param) /** * Set a new design function for an object * @param obj pointer to an object - * @param cb the new design function + * @param design_cb the new design function */ -void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t cb) +void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t design_cb) { - obj->design_cb = cb; + obj->design_cb = design_cb; } /*---------------- diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 09b07a0d19f0..2280a1c64751 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -552,9 +552,9 @@ void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot); * Set a an event handler function for an object. * Used by the user to react on event which happens with the object. * @param obj pointer to an object - * @param cb the new event function + * @param event_cb the new event function */ -void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t cb); +void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); /** * Send an event to the object @@ -575,9 +575,9 @@ const void * lv_event_get_data(void); * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. * @param obj pointer to an object - * @param cb the new signal function + * @param signal_cb the new signal function */ -void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t cb); +void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb); /** * Send an event to the object @@ -589,9 +589,9 @@ void lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param); /** * Set a new design function for an object * @param obj pointer to an object - * @param cb the new design function + * @param design_cb the new design function */ -void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t cb); +void lv_obj_set_design_cb(lv_obj_t * obj, lv_design_cb_t design_cb); /*---------------- * Other set diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 7026ba9561cf..320af018efa4 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -105,6 +105,8 @@ typedef struct _disp_drv_t #if LV_USE_USER_DATA_MULTI lv_disp_drv_user_data_t flush_user_data; + lv_disp_drv_user_data_t mem_blend_user_data; + lv_disp_drv_user_data_t mem_fill_user_data; lv_disp_drv_user_data_t rounder_user_data; lv_disp_drv_user_data_t set_px_user_data; lv_disp_drv_user_data_t monitor_user_data; diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index 4354f45b6044..b009ee34c6f8 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -165,10 +165,10 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) * @param task a function which is the task itself * @param period call period in ms unit * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) - * @param param free parameter + * @param user_data free parameter * @return pointer to the new task */ -lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * param) +lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * user_data) { lv_task_t * new_lv_task = NULL; lv_task_t * tmp; @@ -200,7 +200,7 @@ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t new_lv_task->period = period; new_lv_task->task = task; new_lv_task->prio = prio; - new_lv_task->param = param; + new_lv_task->param = user_data; new_lv_task->once = 0; new_lv_task->last_run = lv_tick_get(); diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 94fb4a13cac8..8d5112260ca2 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -80,11 +80,11 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); * @param task a function which is the task itself * @param period call period in ms unit * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) - * @param param free parameter + * @param user_data free parameter * @return pointer to the new task */ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, - void * param); + void * user_data); /** * Delete a lv_task diff --git a/src/lv_themes/lv_theme.h b/src/lv_themes/lv_theme.h index 4671d83142d2..2ce92d0d81a5 100644 --- a/src/lv_themes/lv_theme.h +++ b/src/lv_themes/lv_theme.h @@ -328,8 +328,8 @@ typedef struct #if LV_USE_GROUP struct { - lv_group_style_mod_func_t style_mod; - lv_group_style_mod_func_t style_mod_edit; + lv_group_style_mod_cb_t style_mod_cb; + lv_group_style_mod_cb_t style_mod_edit_cb; } group; #endif } lv_theme_t; diff --git a/src/lv_themes/lv_theme_alien.c b/src/lv_themes/lv_theme_alien.c index 5150fc265c9d..dceed68caaf1 100644 --- a/src/lv_themes/lv_theme_alien.c +++ b/src/lv_themes/lv_theme_alien.c @@ -929,8 +929,8 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c index b0e63706d8a5..46a9e0a689f2 100644 --- a/src/lv_themes/lv_theme_default.c +++ b/src/lv_themes/lv_theme_default.c @@ -450,8 +450,8 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 301c4502e304..23317973aca2 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -908,8 +908,8 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index a28cb2d5c219..99095efdbdfc 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -497,8 +497,8 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_nemo.c b/src/lv_themes/lv_theme_nemo.c index 214d8b0e2663..544f806823fb 100644 --- a/src/lv_themes/lv_theme_nemo.c +++ b/src/lv_themes/lv_theme_nemo.c @@ -901,8 +901,8 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_night.c b/src/lv_themes/lv_theme_night.c index a3c23b9398bb..1d743ce194cc 100644 --- a/src/lv_themes/lv_theme_night.c +++ b/src/lv_themes/lv_theme_night.c @@ -818,8 +818,8 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_templ.c b/src/lv_themes/lv_theme_templ.c index 2f0871905fd4..8479f202a3cb 100644 --- a/src/lv_themes/lv_theme_templ.c +++ b/src/lv_themes/lv_theme_templ.c @@ -450,8 +450,8 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c index 9367f4fd526c..e0eee0ce5473 100644 --- a/src/lv_themes/lv_theme_zen.c +++ b/src/lv_themes/lv_theme_zen.c @@ -874,8 +874,8 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod = style_mod; - theme.group.style_mod_edit = style_mod_edit; + theme.group.style_mod_cb = style_mod; + theme.group.style_mod_edit_cb = style_mod_edit; #endif return &theme; From 1e5f690a45bde7e6f3b1dbe14a8b0f1a0c329ca9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 23 Apr 2019 15:09:37 +0200 Subject: [PATCH 342/590] lv_txt: do not call lv_font_get_width twice --- src/lv_misc/lv_txt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index bba881608d55..8205860af1ab 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -335,7 +335,7 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * lv_coord_t char_width = lv_font_get_width(font, letter); if(char_width > 0) { - width += lv_font_get_width(font, letter); + width += char_width; width += letter_space; } } From 4e6aac2157e1a42a6ad106b0ba0e62c183ffc122 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 23 Apr 2019 15:56:59 +0200 Subject: [PATCH 343/590] font rework --- src/lv_draw/lv_draw_basic.c | 2 +- src/lv_draw/lv_draw_label.c | 2 +- src/lv_misc/lv_font.c | 48 ++++++++++++++++++------------------- src/lv_misc/lv_font.h | 27 +++++++++++---------- src/lv_misc/lv_txt.c | 2 +- src/lv_objx/lv_calendar.c | 16 ++++++------- src/lv_objx/lv_cb.c | 4 ++-- src/lv_objx/lv_ddlist.c | 10 ++++---- src/lv_objx/lv_label.c | 14 +++++------ src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_roller.c | 12 +++++----- src/lv_objx/lv_ta.c | 14 +++++------ src/lv_objx/lv_table.c | 4 ++-- src/lv_objx/lv_tabview.c | 2 +- 14 files changed, 81 insertions(+), 78 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 958fcac5549f..fb45a91498f1 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -243,7 +243,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv lv_coord_t pos_x = pos_p->x; lv_coord_t pos_y = pos_p->y; uint8_t letter_w = lv_font_get_real_width(font_p, letter); - uint8_t letter_h = lv_font_get_height(font_p); + uint8_t letter_h = lv_font_get_line_height(font_p); uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ const uint8_t * bpp_opa_table; uint8_t mask_init; diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index bb0f2c4d2330..2f9db67b3878 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -70,7 +70,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st w = p.x; } - lv_coord_t line_height = lv_font_get_height(font) + style->text.line_space; + lv_coord_t line_height = lv_font_get_line_height(font) + style->text.line_space; /*Init variables for the first line*/ lv_coord_t line_width = 0; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index d7c4ddad95b8..6fd58ce41f9d 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -90,20 +90,22 @@ void lv_font_remove(lv_font_t * child, lv_font_t * parent) */ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter) { - const lv_font_t * font_i = font_p; - int16_t w; - while(font_i != NULL) { - w = font_i->get_width(font_i, letter); - if(w >= 0) { - /*Glyph found*/ - if(font_i->monospace) return true; - return false; - } - - font_i = font_i->next_page; - } - - return 0; +// const lv_font_t * font_i = font_p; +// int16_t w; +// while(font_i != NULL) { +// w = font_i->get_width(font_i, letter); +// if(w >= 0) { +// /*Glyph found*/ +// if(font_i->monospace) return true; +// return false; +// } +// +// font_i = font_i->next_page; +// } +// +// return 0; + + return false; } /** @@ -126,28 +128,26 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett } /** - * Get the width of a letter in a font. If `monospace` is set then return with it. + * Get the description of a glyph in a font. * @param font_p pointer to a font * @param letter an UNICODE character code - * @return the width of a letter + * @return pointer to a glyph descriptor */ -uint8_t lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter, lv_font_glyph_dsc_t * dsc) +lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter) { const lv_font_t * font_i = font_p; - int16_t w; + lv_font_glyph_dsc_t * dsc; while(font_i != NULL) { - w = font_i->get_dsc(font_i, letter, dsc); - if(w >= 0) { + dsc = font_i->get_dsc(font_i, letter); + if(dsc) { /*Glyph found*/ - uint8_t m = font_i->monospace; - if(m) w = m; - return w; + return dsc; } font_i = font_i->next_page; } - return 0; + return NULL; } /** diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index a6b376dfd8cd..3c2af9330a32 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -35,13 +35,14 @@ extern "C" { typedef struct { + uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ uint32_t adv_w :8; /*The glyph need this space. Draw the next glyph after this width */ uint32_t adv_w_fract :4; /*Fractional part of `advance_width` in 1/16 unit*/ - uint32_t box_w :8; /*Width of the glyph's bounding box*/ - uint32_t box_h :8; /*Height of the glyph's bounding box*/ - uint32_t ofs_x :8; /*x offset of the bounding box*/ - uint32_t ofs_y :8; /*y offset of the bounding box*/ - uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ + + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + uint8_t ofs_x; /*x offset of the bounding box*/ + int8_t ofs_y; /*y offset of the bounding box*/ } lv_font_glyph_dsc_t; typedef struct _lv_font_struct @@ -60,10 +61,12 @@ typedef struct _lv_font_struct /*Pointer to a font extension*/ struct _lv_font_struct * next_page; - uint32_t line_height :8; - uint32_t monospace :8; /*Fix width (0: normal width)*/ - uint32_t bpp :4; /*Bit per pixel: 1, 2, 4 or 8*/ - uint16_t glyph_cnt :11; /*Number of glyphs in the font. Max. 2048*/ + uint8_t size; + uint8_t ascent; + int8_t descent; + uint8_t monospace; /*Fix width (0: normal width)*/ + uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ + uint16_t glyph_cnt; /*Number of glyphs in the font. Max. 2048*/ } lv_font_t; /********************** @@ -122,13 +125,13 @@ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter); uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter); /** - * Get the height of a font + * Get the line height of a font. All characters fit into this height * @param font_p pointer to a font * @return the height of a font */ -static inline uint8_t lv_font_get_height(const lv_font_t * font_p) +static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) { - return font_p->h_px; + return (uint8_t)((int16_t)font_p->ascent - font_p->descent); } /** diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 00564135e035..375c220d4988 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -97,7 +97,7 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * uint32_t line_start = 0; uint32_t new_line_start = 0; lv_coord_t act_line_length; - uint8_t letter_height = lv_font_get_height(font); + uint8_t letter_height = lv_font_get_line_height(font); /*Calc. the height and longest line*/ while(text[line_start] != '\0') { diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index bef7f7b99688..978fcc805615 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -624,7 +624,7 @@ static lv_coord_t get_header_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_header->text.font) + ext->style_header->body.padding.top + + return lv_font_get_line_height(ext->style_header->text.font) + ext->style_header->body.padding.top + ext->style_header->body.padding.bottom; } @@ -637,7 +637,7 @@ static lv_coord_t get_day_names_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_height(ext->style_day_names->text.font) + + return lv_font_get_line_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.top + ext->style_day_names->body.padding.bottom; } @@ -702,7 +702,7 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) lv_area_t label_area; label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; - label_area.y2 = label_area.y1 + lv_font_get_height(ext->style_day_names->text.font); + label_area.y2 = label_area.y1 + lv_font_get_line_height(ext->style_day_names->text.font); uint32_t i; for(i = 0; i < 7; i++) { label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; @@ -725,15 +725,15 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top + - lv_font_get_height(ext->style_day_names->text.font) + + lv_font_get_line_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.bottom; - label_area.y2 = label_area.y1 + lv_font_get_height(style_bg->text.font); + label_area.y2 = label_area.y1 + lv_font_get_line_height(style_bg->text.font); lv_coord_t w = lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom; lv_coord_t box_w = w / 7; - lv_coord_t vert_space = (h - (6 * lv_font_get_height(style_bg->text.font))) / 5; + lv_coord_t vert_space = (h - (6 * lv_font_get_line_height(style_bg->text.font))) / 5; uint32_t week; uint8_t day_cnt; @@ -854,8 +854,8 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) } /*Got to the next weeks row*/ - label_area.y1 += vert_space + lv_font_get_height(style_bg->text.font); - label_area.y2 += vert_space + lv_font_get_height(style_bg->text.font); + label_area.y1 += vert_space + lv_font_get_line_height(style_bg->text.font); + label_area.y2 += vert_space + lv_font_get_line_height(style_bg->text.font); } } diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index 8e3073e786d5..ee4195911485 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -314,8 +314,8 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) if(sign == LV_SIGNAL_STYLE_CHG) { const lv_style_t * label_style = lv_label_get_style(ext->label); - lv_obj_set_size(ext->bullet, lv_font_get_height(label_style->text.font), - lv_font_get_height(label_style->text.font)); + lv_obj_set_size(ext->bullet, lv_font_get_line_height(label_style->text.font), + lv_font_get_line_height(label_style->text.font)); lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index a1b565ed4aab..5d8919a0907a 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -544,7 +544,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig if(ext->opened != 0 || ext->force_sel) { const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); /*Draw the selected*/ lv_area_t rect_area; @@ -569,7 +569,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig if(ext->opened || ext->force_sel) { const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_area_t area_sel; area_sel.y1 = ext->label->coords.y1; @@ -601,7 +601,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); const lv_font_t * font = style->text.font; const lv_style_t * sel_style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_style_t new_style; lv_style_copy(&new_style, style); new_style.text.color = sel_style->text.color; @@ -861,7 +861,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) } else { /*Close the list*/ const lv_font_t * font = style->text.font; const lv_style_t * label_style = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); new_height = font_h + 2 * label_style->text.line_space; lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE); @@ -933,7 +933,7 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); const lv_style_t * style = lv_obj_get_style(ddlist); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); const lv_style_t * label_style = lv_obj_get_style(ext->label); lv_obj_t * scrl = lv_page_get_scrl(ddlist); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 5cdad61476e4..91357e86982e 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -457,7 +457,7 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t lv_coord_t max_w = lv_obj_get_width(label); const lv_style_t * style = lv_obj_get_style(label); const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); + uint8_t letter_height = lv_font_get_line_height(font); lv_coord_t y = 0; lv_txt_flag_t flag = LV_TXT_FLAG_NONE; @@ -530,7 +530,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) lv_coord_t max_w = lv_obj_get_width(label); const lv_style_t * style = lv_obj_get_style(label); const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); + uint8_t letter_height = lv_font_get_line_height(font); lv_coord_t y = 0; lv_txt_flag_t flag = LV_TXT_FLAG_NONE; @@ -635,7 +635,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) lv_coord_t max_w = lv_obj_get_width(label); const lv_style_t * style = lv_obj_get_style(label); const lv_font_t * font = style->text.font; - uint8_t letter_height = lv_font_get_height(font); + uint8_t letter_height = lv_font_get_line_height(font); lv_coord_t y = 0; lv_txt_flag_t flag = LV_TXT_FLAG_NONE; @@ -846,7 +846,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ /*Draw the text again below the original to make an circular effect */ if(size.y > lv_obj_get_height(label)) { ofs.x = ext->offset.x; - ofs.y = ext->offset.y + size.y + lv_font_get_height(style->text.font); + ofs.y = ext->offset.y + size.y + lv_font_get_line_height(style->text.font); lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); } @@ -970,7 +970,7 @@ static void lv_label_refr_text(lv_obj_t * label) } if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_height(font)); + anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_line_height(font)); anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); @@ -1011,7 +1011,7 @@ static void lv_label_refr_text(lv_obj_t * label) } if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = -size.y - (lv_font_get_height(font)); + anim.end = -size.y - (lv_font_get_line_height(font)); anim.fp = (lv_anim_fp_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); @@ -1033,7 +1033,7 @@ static void lv_label_refr_text(lv_obj_t * label) (lv_font_get_width(style->text.font, '.') + style->text.letter_space) * LV_LABEL_DOT_NUM; /*Shrink with dots*/ p.y = lv_obj_get_height(label); - p.y -= p.y % (lv_font_get_height(style->text.font) + + p.y -= p.y % (lv_font_get_line_height(style->text.font) + style->text.line_space); /*Round down to the last line*/ p.y -= style->text.line_space; /*Trim the last line space*/ uint32_t letter_id = lv_label_get_letter_on(label, &p); diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 40c409099ee8..87798e894d19 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -483,7 +483,7 @@ static void mbox_realign(lv_obj_t * mbox) if(ext->btnm) { const lv_style_t * btn_bg_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_BG); const lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); - lv_coord_t font_h = lv_font_get_height(btn_rel_style->text.font); + lv_coord_t font_h = lv_font_get_line_height(btn_rel_style->text.font); lv_obj_set_size(ext->btnm, w, font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom + btn_bg_style->body.padding.top + diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index f27730b212e9..fd5be93a60d8 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -202,7 +202,7 @@ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt) lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); uint8_t n_line_space = (row_cnt > 1) ? row_cnt - 1 : 1; - lv_ddlist_set_fix_height(roller, lv_font_get_height(style_label->text.font) * row_cnt + + lv_ddlist_set_fix_height(roller, lv_font_get_line_height(style_label->text.font) * row_cnt + style_label->text.line_space * n_line_space); } @@ -309,7 +309,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); const lv_font_t * font = style->text.font; lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_area_t rect_area; rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; @@ -326,7 +326,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig const lv_style_t * style = lv_roller_get_style(roller, LV_ROLLER_STYLE_BG); lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); const lv_font_t * font = style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_opa_t opa_scale = lv_obj_get_opa_scale(roller); /*Redraw the text on the selected area with a different color*/ @@ -505,7 +505,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); if(sign == LV_SIGNAL_DRAG_END) { /*If dragged then align the list to there be an element in the middle*/ @@ -610,7 +610,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_coord_t h = lv_obj_get_height(roller); /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. @@ -667,7 +667,7 @@ static void inf_normalize(void * scrl) /*Move to the new id*/ const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); const lv_font_t * font = style_label->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); lv_coord_t h = lv_obj_get_height(roller); lv_coord_t line_y1 = ext->ddlist.sel_opt_id * (font_h + style_label->text.line_space) + diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index b6a912ba0622..0c46a59bbe66 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -547,7 +547,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) lv_obj_get_coords(ext->label, &label_cords); /*Check the top*/ - lv_coord_t font_h = lv_font_get_height(font_p); + lv_coord_t font_h = lv_font_get_line_height(font_p); if(lv_obj_get_y(label_par) + cur_pos.y < 0) { lv_obj_set_y(label_par, -cur_pos.y + style->body.padding.top); } @@ -663,7 +663,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) const lv_style_t * style_ta = lv_obj_get_style(ta); const lv_style_t * style_scrl = lv_obj_get_style(lv_page_get_scrl(ta)); const lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); ext->one_line = 1; lv_page_set_scrl_fit2(ta, LV_FIT_TIGHT, LV_FIT_FLOOD); @@ -1049,7 +1049,7 @@ void lv_ta_cursor_down(lv_obj_t * ta) /*Increment the y with one line and keep the valid x*/ const lv_style_t * label_style = lv_obj_get_style(ext->label); const lv_font_t * font_p = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font_p); + lv_coord_t font_h = lv_font_get_line_height(font_p); pos.y += font_h + label_style->text.line_space + 1; pos.x = ext->cursor.valid_x; @@ -1080,7 +1080,7 @@ void lv_ta_cursor_up(lv_obj_t * ta) /*Decrement the y with one line and keep the valid x*/ const lv_style_t * label_style = lv_obj_get_style(ext->label); const lv_font_t * font = label_style->text.font; - lv_coord_t font_h = lv_font_get_height(font); + lv_coord_t font_h = lv_font_get_line_height(font); pos.y -= font_h + label_style->text.line_space - 1; pos.x = ext->cursor.valid_x; @@ -1222,7 +1222,7 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) if(ext->one_line) { /*In one line mode refresh the Text Area height because 'vpad' can modify it*/ const lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); lv_obj_set_height( ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + style_scrl->body.padding.top + style_scrl->body.padding.bottom); @@ -1352,7 +1352,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Set ext. size because the cursor might be out of this object*/ const lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_height(style_label->text.font); + lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); scrl->ext_draw_pad = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h); } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ @@ -1520,7 +1520,7 @@ static void refr_cursor_area(lv_obj_t * ta) uint32_t letter = lv_txt_encoded_next(&txt[byte_pos], NULL); - lv_coord_t letter_h = lv_font_get_height(label_style->text.font); + lv_coord_t letter_h = lv_font_get_line_height(label_style->text.font); /*Set letter_w (set not 0 on non printable but valid chars)*/ lv_coord_t letter_w; if(letter == '\0' || letter == '\n' || letter == '\r') { diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index c830cc58c80d..a20d45b7a042 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -804,7 +804,7 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) uint16_t row_start = row_id * ext->col_cnt; uint16_t cell; uint16_t col; - lv_coord_t h_max = lv_font_get_height(ext->cell_style[0]->text.font) + + lv_coord_t h_max = lv_font_get_line_height(ext->cell_style[0]->text.font) + ext->cell_style[0]->body.padding.top + ext->cell_style[0]->body.padding.bottom; @@ -834,7 +834,7 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) /*With text crop assume 1 line*/ if(format.s.crop) { h_max = - LV_MATH_MAX(lv_font_get_height(cell_style->text.font) + + LV_MATH_MAX(lv_font_get_line_height(cell_style->text.font) + cell_style->body.padding.top + cell_style->body.padding.bottom, h_max); } diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 2fe913f8d035..71b65c169814 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -867,7 +867,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_set_width(ext->indic, indic_width); /*Set the tabs height*/ - lv_coord_t btns_height = lv_font_get_height(style_btn_rel->text.font) + + lv_coord_t btns_height = lv_font_get_line_height(style_btn_rel->text.font) + style_btn_rel->body.padding.top + style_btn_rel->body.padding.bottom + style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; From 2edf8f4aabdb0a3258d5b8cf602d359784c77be7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 24 Apr 2019 05:44:15 +0200 Subject: [PATCH 344/590] font rework --- src/lv_fonts/lv_font_dejavu_20.c | 20 ++++++-------------- src/lv_misc/lv_font.h | 22 +++------------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 597d0417d71a..4b74ef393595 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -1,7 +1,7 @@ #include "../lv_misc/lv_font.h" -#if USE_LV_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ +#if LV_USE_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ /*********************************************************************************** * DejaVuSans.ttf 20 px Font in U+0020 ( ) .. U+007e (~) range with 1 bpp @@ -81,21 +81,13 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*4 rows*/ }; -uint32_t advance_w :8; /*The glyph need this space. Draw the next glyph after this width */ -uint32_t advance_w_fract :4; /*Fractional part of `advance_width` in 1/16 unit*/ -uint32_t box_w :8; /*Width of the glyph's bounding box*/ -uint32_t box_h :8; /*Height of the glyph's bounding box*/ -uint32_t ofs_x :8; /*x offset of the bounding box*/ -uint32_t ofs_y :8; /*y offset of the bounding box*/ -uint32_t glyph_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { - {.adv_w = 6, .adv_w_fract = 0, .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .glyph_index = 0}, /*Unicode: U+0020 ( )*/ - {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 0}, /*Unicode: U+0031 (1)*/ - {.adv_w = 9, .adv_w_fract = 0, .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 13}, /*Unicode: U+0033 (3)*/ - {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .glyph_index = 26}, /*Unicode: U+0041 (A)*/ - {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .glyph_index = 39}, /*Unicode: U+0061 (a)*/ + {.adv_w = 6, .adv_w_fract = 0, .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0}, /*Unicode: U+0020 ( )*/ + {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0}, /*Unicode: U+0031 (1)*/ + {.adv_w = 9, .adv_w_fract = 0, .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ + {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 26}, /*Unicode: U+0041 (A)*/ + {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 39}, /*Unicode: U+0061 (a)*/ }; static const uint16_t lv_font_dejavu_20_unicode_map[] = { diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 3c2af9330a32..e4cea7797e61 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -142,6 +142,7 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) */ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter); + /** * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in * the range @@ -149,16 +150,8 @@ uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter); * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ -const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t unicode_letter); +const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t unicode_letter); -/** - * Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters - * in the range (sparse) - * @param font pointer to font - * @param unicode_letter an unicode letter which bitmap should be get - * @return pointer to the bitmap or NULL if not found - */ -const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unicode_letter); /** * Generic glyph width get function used in 'font->get_width' when the font contains all characters * in the range @@ -166,16 +159,7 @@ const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unico * @param unicode_letter an unicode letter which width should be get * @return width of the gylph or -1 if not found */ -int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_letter); - -/** - * Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all - * characters in the range (sparse) - * @param font pointer to font - * @param unicode_letter an unicode letter which width should be get - * @return width of the glyph or -1 if not found - */ -int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter); +const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, uint32_t unicode_letter); /********************** * MACROS From 4b657eb07ba894dd55a4818dc95906733d724dfa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 24 Apr 2019 06:13:50 +0200 Subject: [PATCH 345/590] rename LV_TXT_ENC_ISO8859-1 to ..._ASCII --- lv_conf_template.h | 2 +- src/lv_conf_checker.h | 2 +- src/lv_misc/lv_txt.c | 8 ++++---- src/lv_misc/lv_txt.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 65552024057f..908e18ce639f 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -267,7 +267,7 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i /* Select a character encoding for strings. * Your IDE or editor should have the same character encoding * - LV_TXT_ENC_UTF8 - * - LV_TXT_ENC_ISO8859_1 + * - LV_TXT_ENC_ASCII * */ #define LV_TXT_ENC LV_TXT_ENC_UTF8 diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 60dc6985db00..770a84ae50ee 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -406,7 +406,7 @@ /* Select a character encoding for strings. * Your IDE or editor should have the same character encoding * - LV_TXT_ENC_UTF8 - * - LV_TXT_ENC_ISO8859_1 + * - LV_TXT_ENC_ASCII * */ #ifndef LV_TXT_ENC #define LV_TXT_ENC LV_TXT_ENC_UTF8 diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 8205860af1ab..05ee952e95e4 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -47,7 +47,7 @@ static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start); static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id); static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id); static uint32_t lv_txt_utf8_get_length(const char * txt); -#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +#elif LV_TXT_ENC == LV_TXT_ENC_ASCII static uint8_t lv_txt_iso8859_1_size(const char * str); static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni); static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c); @@ -73,7 +73,7 @@ uint32_t (*lv_txt_encoded_prev)(const char *, uint32_t *) = lv_txt_utf8_pre uint32_t (*lv_txt_encoded_get_byte_id)(const char *, uint32_t) = lv_txt_utf8_get_byte_id; uint32_t (*lv_encoded_get_char_id)(const char *, uint32_t) = lv_txt_utf8_get_char_id; uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_utf8_get_length; -#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +#elif LV_TXT_ENC == LV_TXT_ENC_ASCII uint8_t (*lv_txt_encoded_size)(const char *) = lv_txt_iso8859_1_size; uint32_t (*lv_txt_unicode_to_encoded)(uint32_t) = lv_txt_unicode_to_iso8859_1; uint32_t (*lv_txt_encoded_conv_wc)(uint32_t) = lv_txt_iso8859_1_conv_wc; @@ -677,9 +677,9 @@ static uint32_t lv_txt_utf8_get_length(const char * txt) return len; } -#elif LV_TXT_ENC == LV_TXT_ENC_ISO8859_1 +#elif LV_TXT_ENC == LV_TXT_ENC_ASCII /******************************* - * IOS8859-1 ENCODER/DECOER + * ASCII ENCODER/DECOER ******************************/ /** diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index 07ce649247da..1150d3f233fd 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -30,7 +30,7 @@ extern "C" { #define LV_TXT_COLOR_CMD "#" #define LV_TXT_ENC_UTF8 1 -#define LV_TXT_ENC_ISO8859_1 2 +#define LV_TXT_ENC_ASCII 2 /********************** * TYPEDEFS From 8dc2b36bf7bc614eebee040ad0fba8890d8b1e80 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 24 Apr 2019 06:26:03 +0200 Subject: [PATCH 346/590] lv_canvas_mult_buf: fix with LV_COLOR_16_SWAP --- src/lv_objx/lv_canvas.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 92f70ac4a8cf..4d7c0565b70e 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -283,12 +283,11 @@ void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coor (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> 6; #else - canvas_buf_color[j].ch.red = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; - canvas_buf_color[j].ch.blue = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 6; - canvas_buf_color[j].ch.red = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 6; + uint8_t green_canvas = (canvas_buf_color[j].ch.green_h << 3) + (canvas_buf_color[j].ch.green_l); + uint8_t green_buf = (copy_buf_color[j].ch.green_h << 3) + (copy_buf_color[j].ch.green_l); + uint8_t green_res = (uint16_t)((uint16_t)green_canvas * green_buf) >> 6; + canvas_buf_color[j].ch.green_h = (green_res >> 3) & 0x07; + canvas_buf_color[j].ch.green_l = green_res & 0x07; #endif /*LV_COLOR_16_SWAP*/ #elif LV_COLOR_DEPTH == 8 From 5321b9b62e32f80410ff3d6cd6e31d8437bdb0ce Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 24 Apr 2019 17:28:38 +0200 Subject: [PATCH 347/590] make the basics of the new font system work --- src/lv_draw/lv_draw_basic.c | 58 ++++++++++++++++++-------------- src/lv_fonts/lv_font_dejavu_20.c | 24 +++++++------ src/lv_misc/lv_font.c | 52 ++++++++++++++++------------ src/lv_misc/lv_font.h | 40 +++++++++++++++------- src/lv_objx/lv_tabview.c | 2 +- 5 files changed, 105 insertions(+), 71 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 6cfc222a533d..5a911d2a66e0 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -227,11 +227,15 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) { - const uint8_t bpp1_opa_table[2] = { - 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + /*clang-format off*/ + const uint8_t bpp1_opa_table[2] = { 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}; + 68, 85, 102, 119, + 136, 153, 170, 187, + 204, 221, 238, 255}; + /*clang-format on*/ + if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; @@ -240,35 +244,38 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv return; } - lv_coord_t pos_x = pos_p->x; - lv_coord_t pos_y = pos_p->y; - uint8_t letter_w = lv_font_get_real_width(font_p, letter); - uint8_t letter_h = lv_font_get_line_height(font_p); + const lv_font_glyph_dsc_t * g = lv_font_get_glyph_dsc(font_p, letter); + + lv_coord_t pos_x = pos_p->x + g->ofs_x; + lv_coord_t pos_y = pos_p->y + g->ofs_y; + uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ + + const uint8_t * bpp_opa_table; - uint8_t mask_init; - uint8_t mask; + uint8_t bitmask_init; + uint8_t bitmask; if(lv_font_is_monospace(font_p, letter)) { - pos_x += (lv_font_get_width(font_p, letter) - letter_w) / 2; + pos_x += (lv_font_get_width(font_p, letter) - g->box_w) / 2; } switch(bpp) { case 1: bpp_opa_table = bpp1_opa_table; - mask_init = 0x80; + bitmask_init = 0x80; break; case 2: bpp_opa_table = bpp2_opa_table; - mask_init = 0xC0; + bitmask_init = 0xC0; break; case 4: bpp_opa_table = bpp4_opa_table; - mask_init = 0xF0; + bitmask_init = 0xF0; break; case 8: bpp_opa_table = NULL; - mask_init = 0xFF; + bitmask_init = 0xFF; break; /*No opa table, pixel value will be used directly*/ default: return; /*Invalid bpp. Can't render the letter*/ } @@ -278,7 +285,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv if(map_p == NULL) return; /*If the letter is completely out of mask don't draw it */ - if(pos_x + letter_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + letter_h < mask_p->y1 || + if(pos_x + g->box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g->box_h < mask_p->y1 || pos_y > mask_p->y2) return; @@ -290,17 +297,16 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv lv_coord_t col, row; uint8_t col_bit; uint8_t col_byte_cnt; - uint8_t width_byte_scr = - letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ - if(letter_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ - if((letter_w * bpp) & 0x7) width_byte_bpp++; + uint8_t width_byte_scr = g->box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ + if(g->box_w & 0x7) width_byte_scr++; + uint8_t width_byte_bpp = (g->box_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ + if((g->box_w * bpp) & 0x7) width_byte_bpp++; /* Calculate the col/row start/end on the map*/ lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x; - lv_coord_t col_end = pos_x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_x + 1; + lv_coord_t col_end = pos_x + g->box_w <= mask_p->x2 ? g->box_w : mask_p->x2 - pos_x + 1; lv_coord_t row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y; - lv_coord_t row_end = pos_y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_y + 1; + lv_coord_t row_end = pos_y + g->box_h <= mask_p->y2 ? g->box_h : mask_p->y2 - pos_y + 1; /*Set a pointer on VDB to the first pixel of the letter*/ vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + pos_x - vdb->area.x1; @@ -316,9 +322,9 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv for(row = row_start; row < row_end; row++) { col_byte_cnt = 0; col_bit = (col_start * bpp) % 8; - mask = mask_init >> col_bit; + bitmask = bitmask_init >> col_bit; for(col = col_start; col < col_end; col++) { - letter_px = (*map_p & mask) >> (8 - col_bit - bpp); + letter_px = (*map_p & bitmask) >> (8 - col_bit - bpp); if(letter_px != 0) { if(opa == LV_OPA_COVER) { px_opa = bpp == 8 ? letter_px : bpp_opa_table[letter_px]; @@ -345,11 +351,11 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv if(col_bit < 8 - bpp) { col_bit += bpp; - mask = mask >> bpp; + bitmask = bitmask >> bpp; } else { col_bit = 0; col_byte_cnt++; - mask = mask_init; + bitmask = bitmask_init; map_p++; } } diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 4b74ef393595..22ed3c36a575 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -86,11 +86,11 @@ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { {.adv_w = 6, .adv_w_fract = 0, .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0}, /*Unicode: U+0020 ( )*/ {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0}, /*Unicode: U+0031 (1)*/ {.adv_w = 9, .adv_w_fract = 0, .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ - {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 26}, /*Unicode: U+0041 (A)*/ - {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 39}, /*Unicode: U+0061 (a)*/ + {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ + {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ }; -static const uint16_t lv_font_dejavu_20_unicode_map[] = { +static const uint16_t lv_font_dejavu_20_unicode_list[] = { 32, /*Unicode: U+0020 ( )*/ 49, /*Unicode: U+0031 (1)*/ 51, /*Unicode: U+0033 (3)*/ @@ -98,17 +98,21 @@ static const uint16_t lv_font_dejavu_20_unicode_map[] = { 97, /*Unicode: U+0061 (a)*/ }; +static lv_font_dsc_built_in_t lv_font_dejavu_20_dsc = { + .glyph_cnt = 5, /*Number of glyphs in the font*/ + .glyph_bitmap = lv_font_dejavu_20_glyph_bitmap, /*Bitmap of glyphs*/ + .glyph_dsc = lv_font_dejavu_20_glyph_dsc, /*Description of glyphs*/ + .unicode_list = lv_font_dejavu_20_unicode_list, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ +}; + lv_font_t lv_font_dejavu_20 = { .unicode_first = 32, /*First Unicode letter in this font*/ .unicode_last = 126, /*Last Unicode letter in this font*/ - .h_px = 20, /*Font height in pixels*/ - .glyph_bitmap = lv_font_dejavu_20_glyph_bitmap, /*Bitmap of glyphs*/ - .glyph_dsc = lv_font_dejavu_20_glyph_dsc, /*Description of glyphs*/ - .glyph_cnt = 5, /*Number of glyphs in the font*/ - .unicode_list = NULL, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ - .get_bitmap = lv_font_get_glyph_bitmap_plain, /*Function pointer to get glyph's bitmap*/ - .get_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ + .dsc = &lv_font_dejavu_20_dsc, + .get_glyph_bitmap = lv_font_get_glyph_bitmap_plain, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ .bpp = 1, /*Bit per pixel*/ + .line_height = 20, /*Font height in pixels*/ .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index 6fd58ce41f9d..cd3d0c10cfd2 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -118,7 +118,7 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett { const lv_font_t * font_i = font_p; while(font_i != NULL) { - const uint8_t * bitmap = font_i->get_bitmap(font_i, letter); + const uint8_t * bitmap = font_i->get_glyph_bitmap(font_i, letter); if(bitmap) return bitmap; font_i = font_i->next_page; @@ -133,12 +133,12 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett * @param letter an UNICODE character code * @return pointer to a glyph descriptor */ -lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter) +const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter) { const lv_font_t * font_i = font_p; - lv_font_glyph_dsc_t * dsc; + const lv_font_glyph_dsc_t * dsc; while(font_i != NULL) { - dsc = font_i->get_dsc(font_i, letter); + dsc = font_i->get_glyph_dsc(font_i, letter); if(dsc) { /*Glyph found*/ return dsc; @@ -150,6 +150,12 @@ lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t l return NULL; } +uint8_t lv_font_get_width(const lv_font_t * font, uint32_t letter) +{ + const lv_font_glyph_dsc_t * dsc = lv_font_get_glyph_dsc(font, letter); + return dsc ? dsc->adv_w : 0; +} + /** * Get the bit-per-pixel of font * @param font pointer to font @@ -181,19 +187,21 @@ const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; + lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; + /*No Unicode list -> Continuous font*/ - if(font->unicode_list == NULL) { + if(font_dsc->unicode_list == NULL) { uint32_t index = (unicode_letter - font->unicode_first); - return &font->glyph_bitmap[font->glyph_dsc[index].bitmap_index]; + return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[index].bitmap_index]; } /*Has Unicode list -> Sparse font */ else { - uint32_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, - sizeof(uint32_t), lv_font_codeCompare); + uint16_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, + sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); - return &font->glyph_bitmap[font->glyph_dsc[idx].bitmap_index]; + uint32_t idx = (uint32_t)(pUnicode - font_dsc->unicode_list); + return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[idx].bitmap_index]; } } @@ -211,24 +219,24 @@ const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, uint32_t unicode_letter) { /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) { - return NULL; - } + if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; + + lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; /*No Unicode list -> Continuous font*/ - if(font->unicode_list == NULL) { + if(font_dsc->unicode_list == NULL) { uint32_t index = (unicode_letter - font->unicode_first); - return &font->glyph_dsc[index]; + return &font_dsc->glyph_dsc[index]; } /*Has Unicode list -> Sparse font */ else { - uint32_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, (uint32_t *)font->unicode_list, font->glyph_cnt, - sizeof(uint32_t), lv_font_codeCompare); + uint16_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, + sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font->unicode_list); - return &font->glyph_dsc[idx]; + uint32_t idx = (uint16_t)(pUnicode - font_dsc->unicode_list); + return &font_dsc->glyph_dsc[idx]; } } @@ -255,5 +263,5 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, */ static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) { - return (*(uint32_t *)pRef) - (*(uint32_t *)pElement); + return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); } diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index e4cea7797e61..2bfd052d3c25 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -45,28 +45,34 @@ typedef struct int8_t ofs_y; /*y offset of the bounding box*/ } lv_font_glyph_dsc_t; +typedef struct { + const uint8_t * glyph_bitmap; + const lv_font_glyph_dsc_t * glyph_dsc; + const uint16_t * unicode_list; + uint16_t glyph_cnt; /*Number of glyphs in the font. */ +}lv_font_dsc_built_in_t; + + typedef struct _lv_font_struct { uint32_t unicode_first; uint32_t unicode_last; - const uint8_t * glyph_bitmap; - const lv_font_glyph_dsc_t * glyph_dsc; - const uint32_t * unicode_list; /*Get a glyph's descriptor from a font*/ - const uint8_t * (*get_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t * dsc); + const lv_font_glyph_dsc_t * (*get_glyph_dsc)(const struct _lv_font_struct *, uint32_t letter); /*Get a glyph's bitmap from a font*/ - const uint8_t * (*get_bitmap)(const struct _lv_font_struct *, uint32_t); + const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); - /*Pointer to a font extension*/ + /*Pointer to the font in a font pack (must have the same line height)*/ struct _lv_font_struct * next_page; - uint8_t size; - uint8_t ascent; - int8_t descent; - uint8_t monospace; /*Fix width (0: normal width)*/ + uint8_t size; /*The original size*/ + uint8_t line_height; /*The real line height where any text fits*/ + uint8_t base_line; /*Base line measured from the top of the line*/ + uint8_t monospace; /*Overwrite the glyph's width (0: normal width)*/ uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ - uint16_t glyph_cnt; /*Number of glyphs in the font. Max. 2048*/ + + void * dsc; /*Store implementation specific data here*/ } lv_font_t; /********************** @@ -100,6 +106,7 @@ void lv_font_remove(lv_font_t * child, lv_font_t * parent); */ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter); + /** * Return with the bitmap of a font. * @param font_p pointer to a font @@ -108,6 +115,15 @@ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter); */ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter); +/** + * Get the description of a glyph in a font. + * @param font_p pointer to a font + * @param letter an UNICODE character code + * @return pointer to a glyph descriptor + */ +const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter); + +uint8_t lv_font_get_width(const lv_font_t * font, uint32_t letter); /** * Get the width of a letter in a font. If `monospace` is set then return with it. * @param font_p pointer to a font @@ -131,7 +147,7 @@ uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter); */ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) { - return (uint8_t)((int16_t)font_p->ascent - font_p->descent); + return font_p->line_height;//(uint8_t)((int16_t)font_p->ascent - font_p->descent); } /** diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d5d1066839a6..cdf0395b2115 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -1023,7 +1023,7 @@ static void tabview_realign(lv_obj_t * tabview) switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - btns_size = lv_font_get_height(style_btn_rel->text.font) + + btns_size = lv_font_get_line_height(style_btn_rel->text.font) + style_btn_rel->body.padding.top + style_btn_rel->body.padding.bottom + style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; From b623eabb0abf8528a9628e008dfa8ed2b8c8e532 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 10:58:34 +0200 Subject: [PATCH 348/590] font: ignore glyphs with NULL dsc --- src/lv_draw/lv_draw_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 5a911d2a66e0..8ec2b44e2888 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -245,7 +245,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv } const lv_font_glyph_dsc_t * g = lv_font_get_glyph_dsc(font_p, letter); - + if(g == NULL) return; lv_coord_t pos_x = pos_p->x + g->ofs_x; lv_coord_t pos_y = pos_p->y + g->ofs_y; From 630199d9a31e91d8806dd60113176afc645ee38d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 10:59:22 +0200 Subject: [PATCH 349/590] kb: event fix --- src/lv_objx/lv_kb.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index c5f9fbeff570..9ac9372b9fd7 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -350,17 +350,21 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) return; } else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0) { if(kb->event_cb != lv_kb_def_event_cb) { - lv_event_send(kb, LV_EVENT_CANCEL, NULL); + lv_res_t res = lv_event_send(kb, LV_EVENT_CANCEL, NULL); + if(res != LV_RES_OK) return; } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); } return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { - if(kb->event_cb != lv_kb_def_event_cb) - lv_event_send(kb, LV_EVENT_APPLY, NULL); - else + if(kb->event_cb != lv_kb_def_event_cb) { + lv_res_t res = lv_event_send(kb, LV_EVENT_APPLY, NULL); + if(res != LV_RES_OK) return; + } + else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ + } return; } From 15c27c8a9b0e306b1e0263fc9d2efbce1e36a8a3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 11:01:14 +0200 Subject: [PATCH 350/590] kb: event fix --- src/lv_objx/lv_kb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 9ac9372b9fd7..10a34951ca94 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -355,6 +355,7 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ lv_obj_del(kb); + return; } return; } else if(strcmp(txt, LV_SYMBOL_OK) == 0) { From 5243d235a6e8bb8c95870ac9a77e79d629641fb2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 11:32:13 +0200 Subject: [PATCH 351/590] lv_task: add user data and pass lv_task_t as task_cb parameter --- src/lv_core/lv_indev.c | 4 ++-- src/lv_core/lv_indev.h | 4 ++-- src/lv_core/lv_refr.c | 6 +++--- src/lv_core/lv_refr.h | 4 ++-- src/lv_misc/lv_task.c | 18 +++++++++++++----- src/lv_misc/lv_task.h | 21 ++++++++++++++------- 6 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 91fe3a68179e..8727ca8a18da 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -68,13 +68,13 @@ void lv_indev_init(void) * Called periodically to read the input devices * @param param pointer to and input device to read */ -void lv_indev_read_task(void * param) +void lv_indev_read_task(lv_task_t * task) { LV_LOG_TRACE("indev read task started"); lv_indev_data_t data; - indev_act = param; + indev_act = task->user_data; /*Read and process all indevs*/ if(indev_act->driver.disp == NULL) return; /*Not assigned to any displays*/ diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index e29afc761bc1..f1adeca88b01 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -36,9 +36,9 @@ void lv_indev_init(void); /** * Called periodically to read the input devices - * @param param pointer to and input device to read + * @param task pointer to the task itself */ -void lv_indev_read_task(void * param); +void lv_indev_read_task(lv_task_t * task); /** * Get the currently processed input device. Can be used in action functions too. diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index b8ff84710f9e..155b8c75f765 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -132,15 +132,15 @@ lv_disp_t * lv_refr_get_disp_refreshing(void) /** * Called periodically to handle the refreshing - * @param param point to a `lv_disp_t` to refresh + * @param task pointer to the task itself */ -void lv_disp_refr_task(void * param) +void lv_disp_refr_task(lv_task_t * task) { LV_LOG_TRACE("lv_refr_task: started"); uint32_t start = lv_tick_get(); - disp_refr = param; + disp_refr = task->user_data; lv_refr_join_area(); diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index 990e32f87f56..ed74a0ea8391 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -69,9 +69,9 @@ lv_disp_t * lv_refr_get_disp_refreshing(void); /** * Called periodically to handle the refreshing - * @param param point to a `lv_disp_t` to refresh + * @param task pointer to the task itself */ -void lv_disp_refr_task(void * param); +void lv_disp_refr_task(lv_task_t * task); /********************** * STATIC FUNCTIONS diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index b009ee34c6f8..e2ece2abf202 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -138,7 +138,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) if(task_deleted) break; /*If a task was deleted then this or the next item might be corrupted*/ if(task_created) - break; /*If a task was deleted then this or the next item might be corrupted*/ + break; /*If a task was created then this or the next item might be corrupted*/ LV_GC_ROOT(_lv_task_act) = next; /*Load the next task*/ } @@ -165,7 +165,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) * @param task a function which is the task itself * @param period call period in ms unit * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) - * @param user_data free parameter + * @param user_data custom parameter * @return pointer to the new task */ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * user_data) @@ -198,12 +198,20 @@ lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t } new_lv_task->period = period; - new_lv_task->task = task; + new_lv_task->task_cb = task; new_lv_task->prio = prio; - new_lv_task->param = user_data; + new_lv_task->once = 0; new_lv_task->last_run = lv_tick_get(); +#if LV_USE_USER_DATA_SINGLE + new_lv_task->user_data = user_data; +#endif + +#if LV_USE_USER_DATA_MULTI + new_lv_task->task_user_data = NULL; +#endif + task_created = true; return new_lv_task; @@ -322,7 +330,7 @@ static bool lv_task_exec(lv_task_t * lv_task_p) lv_task_p->last_run = lv_tick_get(); task_deleted = false; task_created = false; - lv_task_p->task(lv_task_p->param); + lv_task_p->task_cb(lv_task_p); /*Delete if it was a one shot lv_task*/ if(task_deleted == false) { /*The task might be deleted by itself as well*/ diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 8d5112260ca2..e3959a98dcc3 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -55,8 +55,16 @@ typedef struct { uint32_t period; uint32_t last_run; - void (*task)(void *); - void * param; + void (*task_cb)(void *); + +#if LV_USE_USER_DATA_SINGLE + void * user_data; +#endif + +#if LV_USE_USER_DATA_MULTI + void * task_user_data; +#endif + uint8_t prio : 3; uint8_t once : 1; } lv_task_t; @@ -80,15 +88,14 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); * @param task a function which is the task itself * @param period call period in ms unit * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) - * @param user_data free parameter - * @return pointer to the new task + * @param user_data custom parameter + * @return pointer to the new task_cb */ -lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, - void * user_data); +lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * user_data); /** * Delete a lv_task - * @param lv_task_p pointer to task created by lv_task_p + * @param lv_task_p pointer to task_cb created by lv_task_p */ void lv_task_del(lv_task_t * lv_task_p); From 0892cbadc480738dedf7a58589fe73c340200184 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 19:26:49 +0200 Subject: [PATCH 352/590] kb: set the size to screen by default --- src/lv_objx/lv_kb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 10a34951ca94..a5dd73f84274 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -118,7 +118,12 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new keyboard keyboard*/ if(copy == NULL) { - lv_obj_set_size(new_kb, LV_DPI * 3, LV_DPI * 2); + /* Set a size which fits into the parent. + * Don't use `par` directly because if the window is created on a page it is moved to the + * scrollable so the parent has changed */ + lv_obj_set_size(new_kb, lv_obj_get_width_fit(lv_obj_get_parent(new_kb)), + lv_obj_get_height_fit(lv_obj_get_parent(new_kb))); + lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb); lv_btnm_set_map(new_kb, kb_map_lc); From cc48391333d91fc5387a70cc320e34af66397522 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 19:37:19 +0200 Subject: [PATCH 353/590] font: remove monospace --- src/lv_fonts/lv_font_dejavu_20.c | 11 +++++------ src/lv_misc/lv_font.c | 26 -------------------------- src/lv_misc/lv_font.h | 12 ++++++++---- 3 files changed, 13 insertions(+), 36 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 22ed3c36a575..45851ff9e4bf 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -83,11 +83,11 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*Store the glyph descriptions*/ static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { - {.adv_w = 6, .adv_w_fract = 0, .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0}, /*Unicode: U+0020 ( )*/ - {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0}, /*Unicode: U+0031 (1)*/ - {.adv_w = 9, .adv_w_fract = 0, .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ - {.adv_w = 12, .adv_w_fract = 0, .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ - {.adv_w = 8, .adv_w_fract = 0, .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ + {.adv_w = LV_FONT_SET_ADV_W(6, 0), .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0}, /*Unicode: U+0020 ( )*/ + {.adv_w = LV_FONT_SET_ADV_W(8, 0), .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0}, /*Unicode: U+0031 (1)*/ + {.adv_w = LV_FONT_SET_ADV_W(9, 0), .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ + {.adv_w = LV_FONT_SET_ADV_W(12, 0), .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ + {.adv_w = LV_FONT_SET_ADV_W(8, 0), .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ }; static const uint16_t lv_font_dejavu_20_unicode_list[] = { @@ -113,7 +113,6 @@ lv_font_t lv_font_dejavu_20 = { .get_glyph_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ .bpp = 1, /*Bit per pixel*/ .line_height = 20, /*Font height in pixels*/ - .monospace = 0, .next_page = NULL, /*Pointer to a font extension*/ }; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index cd3d0c10cfd2..62426363f06c 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -82,32 +82,6 @@ void lv_font_remove(lv_font_t * child, lv_font_t * parent) parent->next_page = child->next_page; } -/** - * Tells if font which contains `letter` is monospace or not - * @param font_p point to font - * @param letter an UNICODE character code - * @return true: the letter is monospace; false not monospace - */ -bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter) -{ -// const lv_font_t * font_i = font_p; -// int16_t w; -// while(font_i != NULL) { -// w = font_i->get_width(font_i, letter); -// if(w >= 0) { -// /*Glyph found*/ -// if(font_i->monospace) return true; -// return false; -// } -// -// font_i = font_i->next_page; -// } -// -// return 0; - - return false; -} - /** * Return with the bitmap of a font. * @param font_p pointer to a font diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 2bfd052d3c25..c79b3164063f 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -28,6 +28,8 @@ extern "C" { /********************* * DEFINES *********************/ +/*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/ +#define LV_FONT_ADV_W_FRACT_DIGIT 4 /********************** * TYPEDEFS @@ -36,9 +38,7 @@ extern "C" { typedef struct { uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - uint32_t adv_w :8; /*The glyph need this space. Draw the next glyph after this width */ - uint32_t adv_w_fract :4; /*Fractional part of `advance_width` in 1/16 unit*/ - + uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ uint8_t box_w; /*Width of the glyph's bounding box*/ uint8_t box_h; /*Height of the glyph's bounding box*/ uint8_t ofs_x; /*x offset of the bounding box*/ @@ -69,7 +69,6 @@ typedef struct _lv_font_struct uint8_t size; /*The original size*/ uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line*/ - uint8_t monospace; /*Overwrite the glyph's width (0: normal width)*/ uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ void * dsc; /*Store implementation specific data here*/ @@ -183,6 +182,11 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; +#define LV_FONT_SET_ADV_W(_integer, _fract) ((_integer << LV_FONT_ADV_W_FRACT_DIGIT) + _fract) +#define LV_FONT_GET_ADV_W_INT(_adv_w) (_adw_v >> LV_FONT_ADV_W_FRACT_DIGIT) +#define LV_FONT_GET_ADV_W_FRACT(_adv_w) (_adw_v & ((1 << LV_FONT_ADV_W_FRACT_DIGIT) -1)) + + /********************** * ADD BUILT IN FONTS **********************/ From d8a17c483a57616dcd5b918ee63ad32260e898e8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 19:43:10 +0200 Subject: [PATCH 354/590] font: separate int. and fract. advanced width --- src/lv_draw/lv_draw_basic.c | 4 ---- src/lv_draw/lv_draw_label.c | 2 +- src/lv_misc/lv_font.c | 10 ++++++++-- src/lv_misc/lv_font.h | 16 ++++------------ src/lv_misc/lv_txt.c | 6 +++--- src/lv_objx/lv_label.c | 16 ++++++++-------- src/lv_objx/lv_ta.c | 10 +++++----- src/lv_objx/lv_tabview.c | 2 +- 8 files changed, 30 insertions(+), 36 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 8ec2b44e2888..5699a91454dc 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -256,10 +256,6 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv uint8_t bitmask_init; uint8_t bitmask; - if(lv_font_is_monospace(font_p, letter)) { - pos_x += (lv_font_get_width(font_p, letter) - g->box_w) / 2; - } - switch(bpp) { case 1: bpp_opa_table = bpp1_opa_table; diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 2f9db67b3878..786c48de6822 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -181,7 +181,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st if(cmd_state == CMD_STATE_IN) color = recolor; - letter_w = lv_font_get_width(font, letter); + letter_w = lv_font_get_width_int(font, letter); if(sel_start != 0xFFFF && sel_end != 0xFFFF) { int char_ind = lv_encoded_get_char_id(txt, i); diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index 62426363f06c..fa7c58de12a3 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -124,10 +124,16 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint return NULL; } -uint8_t lv_font_get_width(const lv_font_t * font, uint32_t letter) +uint8_t lv_font_get_width_int(const lv_font_t * font, uint32_t letter) { const lv_font_glyph_dsc_t * dsc = lv_font_get_glyph_dsc(font, letter); - return dsc ? dsc->adv_w : 0; + return dsc ? LV_FONT_GET_ADV_W_INT(dsc->adv_w) : 0; +} + +uint8_t lv_font_get_width_fract(const lv_font_t * font, uint32_t letter) +{ + const lv_font_glyph_dsc_t * dsc = lv_font_get_glyph_dsc(font, letter); + return dsc ? LV_FONT_GET_ADV_W_FRACT(dsc->adv_w) : 0; } /** diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index c79b3164063f..389678a5e6d7 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -122,22 +122,14 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett */ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter); -uint8_t lv_font_get_width(const lv_font_t * font, uint32_t letter); +uint8_t lv_font_get_width_int(const lv_font_t * font, uint32_t letter); /** * Get the width of a letter in a font. If `monospace` is set then return with it. * @param font_p pointer to a font * @param letter an UNICODE character code * @return the width of a letter */ -uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter); - -/** - * Get the width of the letter without overwriting it with the `monospace` attribute - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return the width of a letter - */ -uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter); +uint8_t lv_font_get_width_int(const lv_font_t * font_p, uint32_t letter); /** * Get the line height of a font. All characters fit into this height @@ -183,8 +175,8 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; #define LV_FONT_SET_ADV_W(_integer, _fract) ((_integer << LV_FONT_ADV_W_FRACT_DIGIT) + _fract) -#define LV_FONT_GET_ADV_W_INT(_adv_w) (_adw_v >> LV_FONT_ADV_W_FRACT_DIGIT) -#define LV_FONT_GET_ADV_W_FRACT(_adv_w) (_adw_v & ((1 << LV_FONT_ADV_W_FRACT_DIGIT) -1)) +#define LV_FONT_GET_ADV_W_INT(_adv_w) (_adv_w >> LV_FONT_ADV_W_FRACT_DIGIT) +#define LV_FONT_GET_ADV_W_FRACT(_adv_w) (_adv_w & ((1 << LV_FONT_ADV_W_FRACT_DIGIT) -1)) /********************** diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 0b1df19defe1..52526c02a0ae 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -196,7 +196,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord } else { /*Check the actual length*/ n_char_since_last_break++; - letter_width = lv_font_get_width(font, letter); + letter_width = lv_font_get_width_int(font, letter); cur_w += letter_width; /* Get the length of the current work and determine best place @@ -242,7 +242,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord break; } n_char_since_last_break++; - lv_coord_t letter_width2 = lv_font_get_width(font, letter); + lv_coord_t letter_width2 = lv_font_get_width_int(font, letter); cur_w += letter_width2; if(cur_w > max_width) { /* Current letter already exceeds, return previous */ @@ -333,7 +333,7 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * } } - lv_coord_t char_width = lv_font_get_width(font, letter); + lv_coord_t char_width = lv_font_get_width_int(font, letter); if(char_width > 0) { width += char_width; width += letter_space; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index e6456eab4aa5..d541c58571af 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -577,7 +577,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) } } - x += lv_font_get_width(font, letter); + x += lv_font_get_width_int(font, letter); if(pos->x < x) { i = i_current; break; @@ -683,7 +683,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) } } last_x = x; - x += lv_font_get_width(font, letter); + x += lv_font_get_width_int(font, letter); if(pos->x < x) { i = i_current; break; @@ -692,7 +692,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) i_current = i; } - int max_diff = lv_font_get_width(font, letter) + style->text.letter_space + 1; + int max_diff = lv_font_get_width_int(font, letter) + style->text.letter_space + 1; return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff)); } @@ -836,7 +836,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ /*Draw the text again next to the original to make an circular effect */ if(size.x > lv_obj_get_width(label)) { ofs.x = ext->offset.x + size.x + - lv_font_get_width(style->text.font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; + lv_font_get_width_int(style->text.font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, @@ -951,7 +951,7 @@ static void lv_label_refr_text(lv_obj_t * label) anim.ready_cb = NULL; anim.path_cb = lv_anim_path_linear; anim.playback_pause = - (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / + (((lv_font_get_width_int(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.repeat_pause = anim.playback_pause; anim.act_time = -anim.playback_pause; @@ -991,7 +991,7 @@ static void lv_label_refr_text(lv_obj_t * label) anim.playback = 0; anim.start = 0; anim.act_time = - -(((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) / + -(((lv_font_get_width_int(style->text.font, ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.ready_cb = NULL; anim.path_cb = lv_anim_path_linear; @@ -1000,7 +1000,7 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = -size.x - lv_font_get_width(font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; + anim.end = -size.x - lv_font_get_width_int(font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); @@ -1031,7 +1031,7 @@ static void lv_label_refr_text(lv_obj_t * label) } else { lv_point_t p; p.x = lv_obj_get_width(label) - - (lv_font_get_width(style->text.font, '.') + style->text.letter_space) * + (lv_font_get_width_int(style->text.font, '.') + style->text.letter_space) * LV_LABEL_DOT_NUM; /*Shrink with dots*/ p.y = lv_obj_get_height(label); p.y -= p.y % (lv_font_get_line_height(style->text.font) + diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index a179b83d5edb..e78da1456a34 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -455,7 +455,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Don't let 'width == 0' because the cursor will not be visible*/ if(lv_obj_get_width(ext->label) == 0) { const lv_style_t * style = lv_obj_get_style(ext->label); - lv_obj_set_width(ext->label, lv_font_get_width(style->text.font, ' ')); + lv_obj_set_width(ext->label, lv_font_get_width_int(style->text.font, ' ')); } if(ext->pwd_mode != 0) { @@ -1524,9 +1524,9 @@ static void refr_cursor_area(lv_obj_t * ta) /*Set letter_w (set not 0 on non printable but valid chars)*/ lv_coord_t letter_w; if(letter == '\0' || letter == '\n' || letter == '\r') { - letter_w = lv_font_get_width(label_style->text.font, ' '); + letter_w = lv_font_get_width_int(label_style->text.font, ' '); } else { - letter_w = lv_font_get_width(label_style->text.font, letter); + letter_w = lv_font_get_width_int(label_style->text.font, letter); } lv_point_t letter_pos; @@ -1544,9 +1544,9 @@ static void refr_cursor_area(lv_obj_t * ta) } if(letter == '\0' || letter == '\n' || letter == '\r') { - letter_w = lv_font_get_width(label_style->text.font, ' '); + letter_w = lv_font_get_width_int(label_style->text.font, ' '); } else { - letter_w = lv_font_get_width(label_style->text.font, letter); + letter_w = lv_font_get_width_int(label_style->text.font, letter); } } diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index cdf0395b2115..f707e2c5bea5 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -1031,7 +1031,7 @@ static void tabview_realign(lv_obj_t * tabview) break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: - btns_size = lv_font_get_width(style_btn_rel->text.font, 0x0041) + // 'A' + btns_size = lv_font_get_width_int(style_btn_rel->text.font, 0x0041) + // 'A' style_btn_rel->body.padding.left + style_btn_rel->body.padding.right + style_btn_bg->body.padding.left + style_btn_bg->body.padding.right; From 12ee3b350486524e79382a6c4f109bb39cb2294e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 27 Apr 2019 20:15:55 +0200 Subject: [PATCH 355/590] kb: set default height to parent size / 2 --- src/lv_objx/lv_kb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index a5dd73f84274..18975aad25ad 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -122,7 +122,7 @@ lv_obj_t * lv_kb_create(lv_obj_t * par, const lv_obj_t * copy) * Don't use `par` directly because if the window is created on a page it is moved to the * scrollable so the parent has changed */ lv_obj_set_size(new_kb, lv_obj_get_width_fit(lv_obj_get_parent(new_kb)), - lv_obj_get_height_fit(lv_obj_get_parent(new_kb))); + lv_obj_get_height_fit(lv_obj_get_parent(new_kb)) / 2); lv_obj_align(new_kb, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); lv_obj_set_event_cb(new_kb, lv_kb_def_event_cb); From 1e4fd8fdfb8e93d52118b8b2781639103e6bfd52 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 28 Apr 2019 17:26:18 +0200 Subject: [PATCH 356/590] event fixes: crashed when the obj was deleted in nested events --- src/lv_core/lv_obj.c | 21 +++++++++++++++------ src/lv_core/lv_obj.h | 9 +++++++++ src/lv_objx/lv_btnm.c | 12 +++++++----- src/lv_objx/lv_kb.c | 4 ++-- src/lv_objx/lv_ta.c | 1 + 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index eaf6f0e05168..ef920d07d8aa 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -377,8 +377,6 @@ lv_res_t lv_obj_del(lv_obj_t * obj) { lv_obj_invalidate(obj); - if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; - /*Delete from the group*/ #if LV_USE_GROUP bool was_focused = false; @@ -410,9 +408,12 @@ lv_res_t lv_obj_del(lv_obj_t * obj) i = i_next; } - /*Let the suer free the resources used in `LV_EVENT_DELETE`*/ + /*Let the user free the resources used in `LV_EVENT_DELETE`*/ lv_event_send(obj, LV_EVENT_DELETE, NULL); + if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; + + /*Remove the object from parent's children list*/ lv_obj_t * par = lv_obj_get_parent(obj); if(par == NULL) { /*It is a screen*/ @@ -1277,6 +1278,9 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) { if(obj == NULL) return LV_RES_OK; + /*In case of nested events the object might be already deleted. */ + if(event_act_obj == obj && event_act_obj_deleted) return LV_RES_INV; + /*If the event was send from an other event save the current states to restore it at the end*/ lv_obj_t * prev_obj_act = event_act_obj; bool prev_obj_act_deleted = event_act_obj_deleted; @@ -1290,6 +1294,13 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) bool deleted = event_act_obj_deleted; + /* If the object was deleted here and the previous object is the same like this + * restore deleted state (because this object was deleted)*/ + if(event_act_obj == prev_obj_act && event_act_obj_deleted) { + prev_obj_act_deleted = true; + deleted = true; + } + /*Restore the previous states*/ event_act_obj = prev_obj_act; event_act_obj_deleted = prev_obj_act_deleted; @@ -2176,9 +2187,6 @@ static void refresh_children_style(lv_obj_t * obj) */ static void delete_children(lv_obj_t * obj) { - - if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; - lv_obj_t * i; lv_obj_t * i_next; i = lv_ll_get_head(&(obj->child_ll)); @@ -2209,6 +2217,7 @@ static void delete_children(lv_obj_t * obj) /*Let the suer free the resources used in `LV_EVENT_DELETE`*/ lv_event_send(obj, LV_EVENT_DELETE, NULL); + if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; /*Remove the animations from this object*/ #if LV_USE_ANIMATION diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2280a1c64751..59d5ad8d9cdc 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -571,6 +571,15 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data); */ const void * lv_event_get_data(void); +/** + * Mark the current object in the event as deleted. + * It not required in the general cases because the library will take care of it. + * However if an event is sent manually to an other object from an event where the object is deleted + * the library will not know about the deletion (because it happened in an other object's event). + * In this specific case the object need to be marked as deleted manually. + */ +void lv_event_mark_as_deleted(void); + /** * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index e91d7434e0c2..6f284e92af2c 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -721,7 +721,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_PRESSING) { @@ -737,8 +737,10 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } if(btn_pr != LV_BTNM_BTN_NONE) { uint32_t b = ext->btn_id_act; - lv_event_send(btnm, LV_EVENT_SELECTED, &b); - invalidate_button_area(btnm, btn_pr); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + if(res == LV_RES_OK) { + invalidate_button_area(btnm, btn_pr); + } } } @@ -773,7 +775,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { @@ -782,7 +784,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 18975aad25ad..c1135fb2d27a 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -41,7 +41,7 @@ static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 6, 2, 2}; + LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "Bksp", "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Enter", "\n", @@ -52,7 +52,7 @@ static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 6, 2, 2}; + LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", "Bksp", "\n", "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 48e1d91ebf94..28090c62bfb6 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -108,6 +108,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->cursor.type = LV_CURSOR_LINE; ext->cursor.valid_x = 0; ext->one_line = 0; + ext->text_sel_en = 0; ext->label = NULL; ext->placeholder = NULL; From 9f216a55be65ec05c477ac55f73a6efad50f7680 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 28 Apr 2019 21:53:14 +0200 Subject: [PATCH 357/590] event: make delete in event more stabile --- src/lv_core/lv_obj.c | 67 ++++++++++++++++++++++++-------------------- src/lv_core/lv_obj.h | 9 ------ 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ef920d07d8aa..c34741e297eb 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -34,6 +34,12 @@ /********************** * TYPEDEFS **********************/ +typedef struct _lv_event_temp_data +{ + lv_obj_t * obj; + bool deleted; + struct _lv_event_temp_data * prev; +}lv_event_temp_data_t; /********************** * STATIC PROTOTYPES @@ -42,6 +48,7 @@ static void refresh_children_position(lv_obj_t * obj, lv_coord_t x_diff, lv_coor static void report_style_mod_core(void * style_p, lv_obj_t * obj); static void refresh_children_style(lv_obj_t * obj); static void delete_children(lv_obj_t * obj); +static void lv_event_mark_deleted(lv_obj_t * obj); static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); @@ -49,9 +56,8 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); * STATIC VARIABLES **********************/ static bool lv_initialized = false; -static lv_obj_t * event_act_obj; /*Stores the which event is currently being executed*/ -static bool event_act_obj_deleted; /*Shows that the object was deleted in the event function*/ -static const void * event_act_data; /*Stores the data passed to the event*/ +static lv_event_temp_data_t * event_temp_data_head; + /********************** * MACROS **********************/ @@ -411,8 +417,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Let the user free the resources used in `LV_EVENT_DELETE`*/ lv_event_send(obj, LV_EVENT_DELETE, NULL); - if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; - + lv_event_mark_deleted(obj); /*Remove the object from parent's children list*/ lv_obj_t * par = lv_obj_get_parent(obj); @@ -1278,35 +1283,26 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) { if(obj == NULL) return LV_RES_OK; - /*In case of nested events the object might be already deleted. */ - if(event_act_obj == obj && event_act_obj_deleted) return LV_RES_INV; + lv_event_temp_data_t event_temp_data; + event_temp_data.obj = obj; + event_temp_data.deleted = false; + event_temp_data.prev = NULL; - /*If the event was send from an other event save the current states to restore it at the end*/ - lv_obj_t * prev_obj_act = event_act_obj; - bool prev_obj_act_deleted = event_act_obj_deleted; - const void * prev_data = event_act_data; + if(event_temp_data_head == NULL) { + event_temp_data_head = &event_temp_data; + } else { + event_temp_data.prev = event_temp_data_head; + event_temp_data_head = &event_temp_data; + } - event_act_obj = obj; - event_act_obj_deleted = false; - event_act_data = data; + event_temp_data_head = &event_temp_data; if(obj->event_cb) obj->event_cb(obj, event); - bool deleted = event_act_obj_deleted; - - /* If the object was deleted here and the previous object is the same like this - * restore deleted state (because this object was deleted)*/ - if(event_act_obj == prev_obj_act && event_act_obj_deleted) { - prev_obj_act_deleted = true; - deleted = true; - } - - /*Restore the previous states*/ - event_act_obj = prev_obj_act; - event_act_obj_deleted = prev_obj_act_deleted; - event_act_data = prev_data; + /*Remove this element from the list*/ + event_temp_data_head = event_temp_data_head->prev; - if(deleted) { + if(event_temp_data.deleted) { return LV_RES_INV; } @@ -1324,7 +1320,7 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) */ const void * lv_event_get_data(void) { - return event_act_data; + return NULL; //event_act_data; } /** @@ -2217,7 +2213,8 @@ static void delete_children(lv_obj_t * obj) /*Let the suer free the resources used in `LV_EVENT_DELETE`*/ lv_event_send(obj, LV_EVENT_DELETE, NULL); - if(event_act_obj == obj && event_act_obj_deleted == false) event_act_obj_deleted = true; + + lv_event_mark_deleted(obj); /*Remove the animations from this object*/ #if LV_USE_ANIMATION @@ -2250,3 +2247,13 @@ static void delete_children(lv_obj_t * obj) if(obj->ext_attr != NULL) lv_mem_free(obj->ext_attr); lv_mem_free(obj); /*Free the object itself*/ } + +static void lv_event_mark_deleted(lv_obj_t * obj) +{ + lv_event_temp_data_t * t = event_temp_data_head; + + while(t) { + if(t->obj == obj) t->deleted = true; + t = t->prev; + } +} diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 59d5ad8d9cdc..2280a1c64751 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -571,15 +571,6 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data); */ const void * lv_event_get_data(void); -/** - * Mark the current object in the event as deleted. - * It not required in the general cases because the library will take care of it. - * However if an event is sent manually to an other object from an event where the object is deleted - * the library will not know about the deletion (because it happened in an other object's event). - * In this specific case the object need to be marked as deleted manually. - */ -void lv_event_mark_as_deleted(void); - /** * Set the a signal function of an object. Used internally by the library. * Always call the previous signal function in the new. From b7850e25848da30d706cd6b4c21579f1d4e8d300 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 30 Apr 2019 15:03:52 +0200 Subject: [PATCH 358/590] fix warnings --- src/lv_hal/lv_hal_disp.c | 3 +-- src/lv_misc/lv_task.c | 2 +- src/lv_misc/lv_task.h | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 25fada1d84eb..8add208cea45 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -137,8 +137,7 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) disp_def = disp_def_tmp; /*Revert the default display*/ /*Create a refresh task*/ - disp->refr_task = - lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp); + disp->refr_task = lv_task_create(lv_disp_refr_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, disp); lv_mem_assert(disp->refr_task); if(disp->refr_task == NULL) return NULL; diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index e2ece2abf202..0824222ee930 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -168,7 +168,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) * @param user_data custom parameter * @return pointer to the new task */ -lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * user_data) +lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_prio_t prio, void * user_data) { lv_task_t * new_lv_task = NULL; lv_task_t * tmp; diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index e3959a98dcc3..b0e37b54d826 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -51,11 +51,11 @@ typedef uint8_t lv_task_prio_t; /** * Descriptor of a lv_task */ -typedef struct +typedef struct _lv_task_t { uint32_t period; uint32_t last_run; - void (*task_cb)(void *); + void (*task_cb)(struct _lv_task_t *); #if LV_USE_USER_DATA_SINGLE void * user_data; @@ -91,7 +91,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); * @param user_data custom parameter * @return pointer to the new task_cb */ -lv_task_t * lv_task_create(void (*task)(void *), uint32_t period, lv_task_prio_t prio, void * user_data); +lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_prio_t prio, void * user_data); /** * Delete a lv_task From 864c970ba35e17933c95caf4c4a864e778251cb9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 1 May 2019 16:43:32 +0200 Subject: [PATCH 359/590] font: add kerning support --- src/lv_draw/lv_draw_basic.c | 43 +++++------ src/lv_draw/lv_draw_label.c | 4 +- src/lv_fonts/lv_font_dejavu_20.c | 24 +++--- src/lv_misc/lv_font.c | 107 ++++++++++++++------------ src/lv_misc/lv_font.h | 128 ++++++++++++++++--------------- src/lv_misc/lv_txt.c | 18 +++-- src/lv_objx/lv_label.c | 45 +++++++---- src/lv_objx/lv_ta.c | 12 +-- src/lv_objx/lv_tabview.c | 2 +- 9 files changed, 210 insertions(+), 173 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 5699a91454dc..156cb3f229a7 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -244,19 +244,18 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv return; } - const lv_font_glyph_dsc_t * g = lv_font_get_glyph_dsc(font_p, letter); - if(g == NULL) return; - lv_coord_t pos_x = pos_p->x + g->ofs_x; - lv_coord_t pos_y = pos_p->y + g->ofs_y; - - uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/ + lv_font_glyph_dsc_t g; + bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter); + if(g_ret == false) return; + lv_coord_t pos_x = pos_p->x + g.ofs_x; + lv_coord_t pos_y = pos_p->y + g.ofs_y; const uint8_t * bpp_opa_table; uint8_t bitmask_init; uint8_t bitmask; - switch(bpp) { + switch(g.bpp) { case 1: bpp_opa_table = bpp1_opa_table; bitmask_init = 0x80; @@ -281,7 +280,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv if(map_p == NULL) return; /*If the letter is completely out of mask don't draw it */ - if(pos_x + g->box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g->box_h < mask_p->y1 || + if(pos_x + g.box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g.box_h < mask_p->y1 || pos_y > mask_p->y2) return; @@ -293,16 +292,16 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv lv_coord_t col, row; uint8_t col_bit; uint8_t col_byte_cnt; - uint8_t width_byte_scr = g->box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ - if(g->box_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (g->box_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ - if((g->box_w * bpp) & 0x7) width_byte_bpp++; + uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ + if(g.box_w & 0x7) width_byte_scr++; + uint8_t width_byte_bpp = (g.box_w * g.bpp) >> 3; /*Letter width in byte. Real width in the font*/ + if((g.box_w * g.bpp) & 0x7) width_byte_bpp++; /* Calculate the col/row start/end on the map*/ lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x; - lv_coord_t col_end = pos_x + g->box_w <= mask_p->x2 ? g->box_w : mask_p->x2 - pos_x + 1; + lv_coord_t col_end = pos_x + g.box_w <= mask_p->x2 ? g.box_w : mask_p->x2 - pos_x + 1; lv_coord_t row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y; - lv_coord_t row_end = pos_y + g->box_h <= mask_p->y2 ? g->box_h : mask_p->y2 - pos_y + 1; + lv_coord_t row_end = pos_y + g.box_h <= mask_p->y2 ? g.box_h : mask_p->y2 - pos_y + 1; /*Set a pointer on VDB to the first pixel of the letter*/ vdb_buf_tmp += ((pos_y - vdb->area.y1) * vdb_width) + pos_x - vdb->area.x1; @@ -311,21 +310,21 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv vdb_buf_tmp += (row_start * vdb_width) + col_start; /*Move on the map too*/ - map_p += (row_start * width_byte_bpp) + ((col_start * bpp) >> 3); + map_p += (row_start * width_byte_bpp) + ((col_start * g.bpp) >> 3); uint8_t letter_px; lv_opa_t px_opa; for(row = row_start; row < row_end; row++) { col_byte_cnt = 0; - col_bit = (col_start * bpp) % 8; + col_bit = (col_start * g.bpp) % 8; bitmask = bitmask_init >> col_bit; for(col = col_start; col < col_end; col++) { - letter_px = (*map_p & bitmask) >> (8 - col_bit - bpp); + letter_px = (*map_p & bitmask) >> (8 - col_bit - g.bpp); if(letter_px != 0) { if(opa == LV_OPA_COVER) { - px_opa = bpp == 8 ? letter_px : bpp_opa_table[letter_px]; + px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px]; } else { - px_opa = bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8 + px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8 : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; } @@ -345,9 +344,9 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv vdb_buf_tmp++; - if(col_bit < 8 - bpp) { - col_bit += bpp; - bitmask = bitmask >> bpp; + if(col_bit < 8 - g.bpp) { + col_bit += g.bpp; + bitmask = bitmask >> g.bpp; } else { col_bit = 0; col_byte_cnt++; diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 786c48de6822..947dd703550a 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -136,8 +136,10 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st cmd_state = CMD_STATE_WAIT; i = line_start; uint32_t letter; + uint32_t letter_next; while(i < line_end) { letter = lv_txt_encoded_next(txt, &i); + letter_next = lv_txt_encoded_next(&txt[i], NULL); /*Handle the re-color command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { @@ -181,7 +183,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st if(cmd_state == CMD_STATE_IN) color = recolor; - letter_w = lv_font_get_width_int(font, letter); + letter_w = lv_font_get_glyph_width(font, letter, letter_next); if(sel_start != 0xFFFF && sel_end != 0xFFFF) { int char_ind = lv_encoded_get_char_id(txt, i); diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 45851ff9e4bf..786e152cfdb8 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -81,13 +81,19 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*4 rows*/ }; + +static const lv_font_kern_t kern_0031[] = { + {.next_unicode = 0x0033, .space = 3 << 4}, + {.next_unicode = 0x0000} /*Trailing*/ +}; + /*Store the glyph descriptions*/ -static const lv_font_glyph_dsc_t lv_font_dejavu_20_glyph_dsc[] = { - {.adv_w = LV_FONT_SET_ADV_W(6, 0), .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0}, /*Unicode: U+0020 ( )*/ - {.adv_w = LV_FONT_SET_ADV_W(8, 0), .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0}, /*Unicode: U+0031 (1)*/ - {.adv_w = LV_FONT_SET_ADV_W(9, 0), .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ - {.adv_w = LV_FONT_SET_ADV_W(12, 0), .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ - {.adv_w = LV_FONT_SET_ADV_W(8, 0), .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ +static const lv_font_glyph_dsc_built_in_t lv_font_dejavu_20_glyph_dsc[] = { + {.adv_w = LV_FONT_SET_WIDTH(6, 0), .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0, }, /*Unicode: U+0020 ( )*/ + {.adv_w = LV_FONT_SET_WIDTH(8, 0), .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0, .kern_table = kern_0031}, /*Unicode: U+0031 (1)*/ + {.adv_w = LV_FONT_SET_WIDTH(9, 0), .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ + {.adv_w = LV_FONT_SET_WIDTH(12, 0), .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ + {.adv_w = LV_FONT_SET_WIDTH(8, 0), .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ }; static const uint16_t lv_font_dejavu_20_unicode_list[] = { @@ -99,10 +105,11 @@ static const uint16_t lv_font_dejavu_20_unicode_list[] = { }; static lv_font_dsc_built_in_t lv_font_dejavu_20_dsc = { - .glyph_cnt = 5, /*Number of glyphs in the font*/ + .glyph_cnt = 5, /*Number of glyphs in the font*/ .glyph_bitmap = lv_font_dejavu_20_glyph_bitmap, /*Bitmap of glyphs*/ .glyph_dsc = lv_font_dejavu_20_glyph_dsc, /*Description of glyphs*/ - .unicode_list = lv_font_dejavu_20_unicode_list, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ + .unicode_list = lv_font_dejavu_20_unicode_list, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ + .bpp = 1, /*Bit per pixel*/ }; lv_font_t lv_font_dejavu_20 = { @@ -111,7 +118,6 @@ lv_font_t lv_font_dejavu_20 = { .dsc = &lv_font_dejavu_20_dsc, .get_glyph_bitmap = lv_font_get_glyph_bitmap_plain, /*Function pointer to get glyph's bitmap*/ .get_glyph_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ - .bpp = 1, /*Bit per pixel*/ .line_height = 20, /*Font height in pixels*/ .next_page = NULL, /*Pointer to a font extension*/ }; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index fa7c58de12a3..b72c87216f36 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -102,62 +102,60 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett } /** - * Get the description of a glyph in a font. - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return pointer to a glyph descriptor + * Get the descriptor of a glyph + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` */ -const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter) +bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter) { const lv_font_t * font_i = font_p; - const lv_font_glyph_dsc_t * dsc; + bool ret; while(font_i != NULL) { - dsc = font_i->get_glyph_dsc(font_i, letter); - if(dsc) { - /*Glyph found*/ - return dsc; - } + ret = font_i->get_glyph_dsc(font_i, dsc_out, letter); + if(ret) return ret; font_i = font_i->next_page; } - return NULL; -} - -uint8_t lv_font_get_width_int(const lv_font_t * font, uint32_t letter) -{ - const lv_font_glyph_dsc_t * dsc = lv_font_get_glyph_dsc(font, letter); - return dsc ? LV_FONT_GET_ADV_W_INT(dsc->adv_w) : 0; -} - -uint8_t lv_font_get_width_fract(const lv_font_t * font, uint32_t letter) -{ - const lv_font_glyph_dsc_t * dsc = lv_font_get_glyph_dsc(font, letter); - return dsc ? LV_FONT_GET_ADV_W_FRACT(dsc->adv_w) : 0; + return false; } /** - * Get the bit-per-pixel of font - * @param font pointer to font - * @param letter a letter from font (font extensions can have different bpp) - * @return bpp of the font (or font extension) + * Get the width of a glyph with kerning + * @param font pointer to a font + * @param letter an UNICODE letter + * @param letter_next the next letter after `letter`. Used for kerning + * @return the width of the glyph */ -uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter) +uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next) { - const lv_font_t * font_i = font; - while(font_i != NULL) { - if(letter >= font_i->unicode_first && letter <= font_i->unicode_last) { - return font_i->bpp; + lv_font_glyph_dsc_t dsc; + bool ret = lv_font_get_glyph_dsc(font, &dsc, letter); + if(ret == false) return 0; + + int32_t w = dsc.adv_w; + + /*Apply kerning is required*/ + if(dsc.kern_table && letter_next != 0) { + uint32_t i; + for(i = 0; dsc.kern_table[i].next_unicode != 0; i++) { + if((uint32_t)dsc.kern_table[i].next_unicode == letter_next) { + w += dsc.kern_table[i].space; + break; + } } - font_i = font_i->next_page; } - return 0; + if(w < 0) w = 0; + + return w <= 0 ? 0 : LV_FONT_GET_WIDTH_INT(w); } /** - * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in - * the range + * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found @@ -190,23 +188,23 @@ const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t } /** - * Generic glyph width get function used in 'font->get_width' when the font contains all characters - * in the range - * @param font pointer to font - * @param unicode_letter an unicode letter which width should be get - * @return width of the gylph or -1 if not found + * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` */ -const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, uint32_t unicode_letter) +bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) { /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; - + int32_t index = -1; /*No Unicode list -> Continuous font*/ if(font_dsc->unicode_list == NULL) { - uint32_t index = (unicode_letter - font->unicode_first); - return &font_dsc->glyph_dsc[index]; + index = (unicode_letter - font->unicode_first); } /*Has Unicode list -> Sparse font */ else { @@ -215,13 +213,22 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); if(pUnicode != NULL) { - uint32_t idx = (uint16_t)(pUnicode - font_dsc->unicode_list); - return &font_dsc->glyph_dsc[idx]; + index = (uint16_t)(pUnicode - font_dsc->unicode_list); } } - /*If not returned earlier then the letter is not found in this font*/ - return NULL; + if(index > 0) { + dsc_out->adv_w = font_dsc->glyph_dsc[index].adv_w; + dsc_out->box_h = font_dsc->glyph_dsc[index].box_h; + dsc_out->box_w = font_dsc->glyph_dsc[index].box_w; + dsc_out->ofs_x = font_dsc->glyph_dsc[index].ofs_x; + dsc_out->ofs_y = font_dsc->glyph_dsc[index].ofs_y; + dsc_out->kern_table = font_dsc->glyph_dsc[index].kern_table; + dsc_out->bpp = font_dsc->bpp; + return true; + } else { + return false; + } } /********************** diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 389678a5e6d7..d40eaa5c6701 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -29,29 +29,27 @@ extern "C" { * DEFINES *********************/ /*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/ -#define LV_FONT_ADV_W_FRACT_DIGIT 4 +#define LV_FONT_WIDTH_FRACT_DIGIT 4 /********************** * TYPEDEFS **********************/ -typedef struct -{ - uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ - uint8_t box_w; /*Width of the glyph's bounding box*/ - uint8_t box_h; /*Height of the glyph's bounding box*/ - uint8_t ofs_x; /*x offset of the bounding box*/ - int8_t ofs_y; /*y offset of the bounding box*/ -} lv_font_glyph_dsc_t; - typedef struct { - const uint8_t * glyph_bitmap; - const lv_font_glyph_dsc_t * glyph_dsc; - const uint16_t * unicode_list; - uint16_t glyph_cnt; /*Number of glyphs in the font. */ -}lv_font_dsc_built_in_t; + int32_t next_unicode :23; + int32_t space :9; /*5 integer, 4 fractional*/ +}lv_font_kern_t; +typedef struct +{ + uint16_t adv_w; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + int8_t ofs_x; /*x offset of the bounding box*/ + int8_t ofs_y; /*y offset of the bounding box*/ + uint8_t bpp; /*Bit-per-pixel: 1, 2, 4, 8*/ + const lv_font_kern_t * kern_table; +}lv_font_glyph_dsc_t; typedef struct _lv_font_struct { @@ -59,21 +57,41 @@ typedef struct _lv_font_struct uint32_t unicode_last; /*Get a glyph's descriptor from a font*/ - const lv_font_glyph_dsc_t * (*get_glyph_dsc)(const struct _lv_font_struct *, uint32_t letter); + bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter); /*Get a glyph's bitmap from a font*/ const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); /*Pointer to the font in a font pack (must have the same line height)*/ struct _lv_font_struct * next_page; - uint8_t size; /*The original size*/ + uint8_t size; /*The original size (height)*/ uint8_t line_height; /*The real line height where any text fits*/ - uint8_t base_line; /*Base line measured from the top of the line*/ - uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ - + uint8_t base_line; /*Base line measured from the top of the line_height*/ void * dsc; /*Store implementation specific data here*/ } lv_font_t; +typedef struct +{ + uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ + uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ + + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + int8_t ofs_x; /*x offset of the bounding box*/ + int8_t ofs_y; /*y offset of the bounding box*/ + + const lv_font_kern_t * kern_table; +}lv_font_glyph_dsc_built_in_t; + + +typedef struct { + const uint8_t * glyph_bitmap; + const lv_font_glyph_dsc_built_in_t * glyph_dsc; + const uint16_t * unicode_list; + uint16_t glyph_cnt; /*Number of glyphs in the font. */ + uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ +}lv_font_dsc_built_in_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -97,15 +115,6 @@ void lv_font_add(lv_font_t * child, lv_font_t * parent); */ void lv_font_remove(lv_font_t * child, lv_font_t * parent); -/** - * Tells if font which contains `letter` is monospace or not - * @param font_p point to font - * @param letter an UNICODE character code - * @return true: the letter is monospace; false not monospace - */ -bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter); - - /** * Return with the bitmap of a font. * @param font_p pointer to a font @@ -115,21 +124,23 @@ bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter); const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter); /** - * Get the description of a glyph in a font. - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return pointer to a glyph descriptor + * Get the descriptor of a glyph + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` */ -const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc(const lv_font_t * font_p, uint32_t letter); +bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter); -uint8_t lv_font_get_width_int(const lv_font_t * font, uint32_t letter); /** - * Get the width of a letter in a font. If `monospace` is set then return with it. - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return the width of a letter + * Get the width of a glyph with kerning + * @param font pointer to a font + * @param letter an UNICODE letter + * @param letter_next the next letter after `letter`. Used for kerning + * @return the width of the glyph */ -uint8_t lv_font_get_width_int(const lv_font_t * font_p, uint32_t letter); +uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); /** * Get the line height of a font. All characters fit into this height @@ -138,35 +149,26 @@ uint8_t lv_font_get_width_int(const lv_font_t * font_p, uint32_t letter); */ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) { - return font_p->line_height;//(uint8_t)((int16_t)font_p->ascent - font_p->descent); + return font_p->line_height; } /** - * Get the bit-per-pixel of font - * @param font pointer to font - * @param letter a letter from font (font extensions can have different bpp) - * @return bpp of the font (or font extension) - */ -uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter); - - -/** - * Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in - * the range + * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. * @param font pointer to font * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ -const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t unicode_letter); +const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t letter); /** - * Generic glyph width get function used in 'font->get_width' when the font contains all characters - * in the range - * @param font pointer to font - * @param unicode_letter an unicode letter which width should be get - * @return width of the gylph or -1 if not found + * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` */ -const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, uint32_t unicode_letter); +bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); /********************** * MACROS @@ -174,9 +176,9 @@ const lv_font_glyph_dsc_t * lv_font_get_glyph_dsc_plain(const lv_font_t * font, #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; -#define LV_FONT_SET_ADV_W(_integer, _fract) ((_integer << LV_FONT_ADV_W_FRACT_DIGIT) + _fract) -#define LV_FONT_GET_ADV_W_INT(_adv_w) (_adv_w >> LV_FONT_ADV_W_FRACT_DIGIT) -#define LV_FONT_GET_ADV_W_FRACT(_adv_w) (_adv_w & ((1 << LV_FONT_ADV_W_FRACT_DIGIT) -1)) +#define LV_FONT_SET_WIDTH(_integer, _fract) ((_integer << LV_FONT_WIDTH_FRACT_DIGIT) + _fract) +#define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) +#define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) /********************** diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 52526c02a0ae..85799d05f92f 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -173,11 +173,13 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord uint32_t n_char_since_last_break = 0; /* Used count word length of long words */ uint32_t last_break = NO_BREAK_FOUND; lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t letter = 0; + uint32_t letter; + uint32_t letter_next; while(txt[i] != '\0') { lv_coord_t letter_width; letter = lv_txt_encoded_next(txt, &i); + letter_next = lv_txt_encoded_next(&txt[i], NULL); /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { @@ -196,7 +198,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord } else { /*Check the actual length*/ n_char_since_last_break++; - letter_width = lv_font_get_width_int(font, letter); + letter_width = lv_font_get_glyph_width(font, letter, letter_next); cur_w += letter_width; /* Get the length of the current work and determine best place @@ -210,12 +212,12 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord i = last_break; } else { uint32_t i_tmp = i; - cur_w -= - w_at_last_break + - letter_space; /*ignore the first letter_space after the break char */ + /*ignore the first letter_space after the break char */ + cur_w -= w_at_last_break + letter_space; bool other = true; while(txt[i_tmp] != '\0') { letter = lv_txt_encoded_next(txt, &i_tmp); + letter_next = lv_txt_encoded_next(&txt[i_tmp], NULL); /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { @@ -242,7 +244,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord break; } n_char_since_last_break++; - lv_coord_t letter_width2 = lv_font_get_width_int(font, letter); + lv_coord_t letter_width2 = lv_font_get_glyph_width(font, letter, letter_next); cur_w += letter_width2; if(cur_w > max_width) { /* Current letter already exceeds, return previous */ @@ -323,17 +325,19 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * lv_coord_t width = 0; lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; uint32_t letter; + uint32_t letter_next; if(length != 0) { while(i < length) { letter = lv_txt_encoded_next(txt, &i); + letter_next = lv_txt_encoded_next(&txt[i], NULL); if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { continue; } } - lv_coord_t char_width = lv_font_get_width_int(font, letter); + lv_coord_t char_width = lv_font_get_glyph_width(font, letter, letter_next); if(char_width > 0) { width += char_width; width += letter_space; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index d541c58571af..eb419bd8ae11 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -564,12 +564,20 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) } lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t i = line_start; uint32_t i_current = i; uint32_t letter; + uint32_t letter_next; + while(i <= new_line_start - 1) { - letter = - lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ + /* Get the current letter. + * Be careful 'i' already points to the next character*/ + letter = lv_txt_encoded_next(txt, &i); + + /*Get the next letter too for kerning*/ + letter_next = lv_txt_encoded_next(&txt[i], NULL); + /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { @@ -577,7 +585,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) } } - x += lv_font_get_width_int(font, letter); + x += lv_font_get_glyph_width(font, letter, letter_next); if(pos->x < x) { i = i_current; break; @@ -670,12 +678,20 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) } lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t i = line_start; uint32_t i_current = i; - uint32_t letter = 0; + uint32_t letter; + uint32_t letter_next; + while(i <= new_line_start - 1) { - letter = - lv_txt_encoded_next(txt, &i); /*Be careful 'i' already points to the next character*/ + /* Get the current letter + * Be careful 'i' already points to the next character */ + letter = lv_txt_encoded_next(txt, &i); + + /*Get the next letter for kerning*/ + letter_next = lv_txt_encoded_next(&txt[i], NULL); + /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { @@ -683,7 +699,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) } } last_x = x; - x += lv_font_get_width_int(font, letter); + x += lv_font_get_glyph_width(font, letter, letter_next); if(pos->x < x) { i = i_current; break; @@ -692,7 +708,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) i_current = i; } - int max_diff = lv_font_get_width_int(font, letter) + style->text.letter_space + 1; + int32_t max_diff = lv_font_get_glyph_width(font, letter, letter_next) + style->text.letter_space + 1; return (pos->x >= (last_x - style->text.letter_space) && pos->x <= (last_x + max_diff)); } @@ -833,10 +849,11 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ style->text.line_space, LV_COORD_MAX, flag); lv_point_t ofs; + /*Draw the text again next to the original to make an circular effect */ if(size.x > lv_obj_get_width(label)) { ofs.x = ext->offset.x + size.x + - lv_font_get_width_int(style->text.font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; + lv_font_get_glyph_width(style->text.font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, @@ -950,8 +967,7 @@ static void lv_label_refr_text(lv_obj_t * label) anim.start = 0; anim.ready_cb = NULL; anim.path_cb = lv_anim_path_linear; - anim.playback_pause = - (((lv_font_get_width_int(style->text.font, ' ') + style->text.letter_space) * 1000) / + anim.playback_pause = (((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.repeat_pause = anim.playback_pause; anim.act_time = -anim.playback_pause; @@ -990,8 +1006,7 @@ static void lv_label_refr_text(lv_obj_t * label) anim.repeat = 1; anim.playback = 0; anim.start = 0; - anim.act_time = - -(((lv_font_get_width_int(style->text.font, ' ') + style->text.letter_space) * 1000) / + anim.act_time = -(((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; anim.ready_cb = NULL; anim.path_cb = lv_anim_path_linear; @@ -1000,7 +1015,7 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = -size.x - lv_font_get_width_int(font, ' ') * LV_LABEL_WAIT_CHAR_COUNT; + anim.end = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); @@ -1031,7 +1046,7 @@ static void lv_label_refr_text(lv_obj_t * label) } else { lv_point_t p; p.x = lv_obj_get_width(label) - - (lv_font_get_width_int(style->text.font, '.') + style->text.letter_space) * + (lv_font_get_glyph_width(style->text.font, '.', '.') + style->text.letter_space) * LV_LABEL_DOT_NUM; /*Shrink with dots*/ p.y = lv_obj_get_height(label); p.y -= p.y % (lv_font_get_line_height(style->text.font) + diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 66151328ccbe..9b20fee8a094 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -456,7 +456,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Don't let 'width == 0' because the cursor will not be visible*/ if(lv_obj_get_width(ext->label) == 0) { const lv_style_t * style = lv_obj_get_style(ext->label); - lv_obj_set_width(ext->label, lv_font_get_width_int(style->text.font, ' ')); + lv_obj_set_width(ext->label, lv_font_get_glyph_width(style->text.font, ' ', '\0')); } if(ext->pwd_mode != 0) { @@ -1522,12 +1522,14 @@ static void refr_cursor_area(lv_obj_t * ta) uint32_t letter = lv_txt_encoded_next(&txt[byte_pos], NULL); lv_coord_t letter_h = lv_font_get_line_height(label_style->text.font); + /*Set letter_w (set not 0 on non printable but valid chars)*/ lv_coord_t letter_w; if(letter == '\0' || letter == '\n' || letter == '\r') { - letter_w = lv_font_get_width_int(label_style->text.font, ' '); + letter_w = lv_font_get_glyph_width(label_style->text.font, ' ', '\0'); } else { - letter_w = lv_font_get_width_int(label_style->text.font, letter); + /*`letter_next` parameter is '\0' to ignore kerning*/ + letter_w = lv_font_get_glyph_width(label_style->text.font, letter, '\0'); } lv_point_t letter_pos; @@ -1545,9 +1547,9 @@ static void refr_cursor_area(lv_obj_t * ta) } if(letter == '\0' || letter == '\n' || letter == '\r') { - letter_w = lv_font_get_width_int(label_style->text.font, ' '); + letter_w = lv_font_get_glyph_width(label_style->text.font, ' ', '\0'); } else { - letter_w = lv_font_get_width_int(label_style->text.font, letter); + letter_w = lv_font_get_glyph_width(label_style->text.font, letter, '\0'); } } diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index f707e2c5bea5..9cdf2cac562b 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -1031,7 +1031,7 @@ static void tabview_realign(lv_obj_t * tabview) break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: - btns_size = lv_font_get_width_int(style_btn_rel->text.font, 0x0041) + // 'A' + btns_size = lv_font_get_glyph_width(style_btn_rel->text.font, 'A', '\0') + style_btn_rel->body.padding.left + style_btn_rel->body.padding.right + style_btn_bg->body.padding.left + style_btn_bg->body.padding.right; From cc97e114c2272753fb78e77879f391a6b9322884 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 1 May 2019 17:44:22 +0200 Subject: [PATCH 360/590] font: add comments --- src/lv_misc/lv_font.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index d40eaa5c6701..63325c8813e1 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -35,11 +35,17 @@ extern "C" { * TYPEDEFS **********************/ +/*------------------ + * General types + *-----------------*/ + +/*One element of a kerning table*/ typedef struct { int32_t next_unicode :23; int32_t space :9; /*5 integer, 4 fractional*/ }lv_font_kern_t; +/*Describe the properties of a glyph*/ typedef struct { uint16_t adv_w; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ @@ -51,6 +57,7 @@ typedef struct const lv_font_kern_t * kern_table; }lv_font_glyph_dsc_t; +/*Describe the properties of a font*/ typedef struct _lv_font_struct { uint32_t unicode_first; @@ -70,6 +77,12 @@ typedef struct _lv_font_struct void * dsc; /*Store implementation specific data here*/ } lv_font_t; + +/*--------------------------------------------- + * Types for LittlevGL's internal font format + *---------------------------------------------*/ + +/*Describe a glyph in internal font format */ typedef struct { uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ @@ -84,6 +97,7 @@ typedef struct }lv_font_glyph_dsc_built_in_t; +/*Describe store additional data for fonts */ typedef struct { const uint8_t * glyph_bitmap; const lv_font_glyph_dsc_built_in_t * glyph_dsc; @@ -96,8 +110,12 @@ typedef struct { * GLOBAL PROTOTYPES **********************/ +/*---------------- + * General API + *---------------*/ + /** - * Initialize the fonts + * Initialize the font module */ void lv_font_init(void); @@ -152,6 +170,10 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) return font_p->line_height; } +/*---------------------------------- + * LittlevGL's internal font format + *----------------------------------*/ + /** * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. * @param font pointer to font From 469157ebd931606c23ab133cee174d11ebf3415a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 1 May 2019 18:08:56 +0200 Subject: [PATCH 361/590] font: update kern space format --- src/lv_fonts/lv_font_dejavu_20.c | 4 ++-- src/lv_misc/lv_font.c | 8 ++++++-- src/lv_misc/lv_font.h | 9 +++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 786e152cfdb8..c7a77ca49901 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -83,8 +83,8 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { static const lv_font_kern_t kern_0031[] = { - {.next_unicode = 0x0033, .space = 3 << 4}, - {.next_unicode = 0x0000} /*Trailing*/ + {.next_unicode = 0x0033, .space = LV_FONT_SET_WIDTH(8, 0), .space_sign = LV_FONT_KERN_POSITIVE}, + {.next_unicode = 0x0000} /*Trailing*/ }; /*Store the glyph descriptions*/ diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index b72c87216f36..9de3fa9ba9e4 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -42,7 +42,7 @@ static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); **********************/ /** - * Initialize the fonts + * Initialize the font module */ void lv_font_init(void) { @@ -143,7 +143,11 @@ uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_ uint32_t i; for(i = 0; dsc.kern_table[i].next_unicode != 0; i++) { if((uint32_t)dsc.kern_table[i].next_unicode == letter_next) { - w += dsc.kern_table[i].space; + if(dsc.kern_table[i].space_sign == LV_FONT_KERN_POSITIVE) { + w += dsc.kern_table[i].space; + } else { + w -= dsc.kern_table[i].space; + } break; } } diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 63325c8813e1..3c04ae4043ef 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -41,8 +41,10 @@ extern "C" { /*One element of a kerning table*/ typedef struct { - int32_t next_unicode :23; - int32_t space :9; /*5 integer, 4 fractional*/ + uint32_t next_unicode :23; + + uint32_t space :8; /*5 integer, 4 fractional*/ + uint32_t space_sign :1; /*0: space positive; 1: space negative*/ }lv_font_kern_t; /*Describe the properties of a glyph*/ @@ -202,6 +204,9 @@ bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * d #define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) #define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) +#define LV_FONT_KERN_POSITIVE 0 +#define LV_FONT_KERN_NEGATIVE 1 + /********************** * ADD BUILT IN FONTS From 0c7d9b96f7baf71b92e0824a87f52a32356f6198 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 1 May 2019 18:10:44 +0200 Subject: [PATCH 362/590] font: minor formatting --- src/lv_misc/lv_font.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 3c04ae4043ef..653d76ea7fa3 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -31,6 +31,9 @@ extern "C" { /*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/ #define LV_FONT_WIDTH_FRACT_DIGIT 4 +#define LV_FONT_KERN_POSITIVE 0 +#define LV_FONT_KERN_NEGATIVE 1 + /********************** * TYPEDEFS **********************/ @@ -204,10 +207,6 @@ bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * d #define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) #define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) -#define LV_FONT_KERN_POSITIVE 0 -#define LV_FONT_KERN_NEGATIVE 1 - - /********************** * ADD BUILT IN FONTS **********************/ From 73ef86f9a9d79b0690dd262b4d4f1ce973415b9d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 3 May 2019 15:22:59 +0200 Subject: [PATCH 363/590] lv_obj_del: fix --- src/lv_core/lv_obj.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index c34741e297eb..45361d92dbbc 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -435,6 +435,9 @@ lv_res_t lv_obj_del(lv_obj_t * obj) if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + if(indev->proc.types.pointer.last_pressed == obj) { + indev->proc.types.pointer.last_pressed = NULL; + } #if LV_USE_GROUP if(indev->group == group && was_focused) { @@ -2228,6 +2231,10 @@ static void delete_children(lv_obj_t * obj) if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { lv_indev_reset(indev); } + + if(indev->proc.types.pointer.last_pressed == obj) { + indev->proc.types.pointer.last_pressed = NULL; + } #if LV_USE_GROUP if(indev->group == group && was_focused) { lv_indev_reset(indev); From f6c60b8204997bb7d74f5e84e82b5832614f4ead Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 3 May 2019 15:43:56 +0200 Subject: [PATCH 364/590] lv_draw_letter: fix coloe of pixelswith LV_OPA_COVER and LV_OPA_TRANSP --- src/lv_draw/lv_draw_basic.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index cf57b723ad28..c0e93b28e33d 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -290,10 +290,13 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv lv_coord_t col, row; uint8_t col_bit; uint8_t col_byte_cnt; - uint8_t width_byte_scr = - letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ + + /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ + uint8_t width_byte_scr = letter_w >> 3; if(letter_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/ + + /*Letter width in byte. Real width in the font*/ + uint8_t width_byte_bpp = (letter_w * bpp) >> 3; if((letter_w * bpp) & 0x7) width_byte_bpp++; /* Calculate the col/row start/end on the map*/ @@ -332,12 +335,16 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); } else { + if(px_opa > LV_OPA_MAX) *vdb_buf_tmp = color; + else if(px_opa < LV_OPA_MIN) continue; + else { #if LV_COLOR_SCREEN_TRANSP == 0 - *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa); + *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa); #else - *vdb_buf_tmp = - color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); + *vdb_buf_tmp = + color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); #endif + } } } From 18d59bef0106c4b2ff0f80c9aaa1da3180eb51af Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 3 May 2019 17:03:37 +0200 Subject: [PATCH 365/590] add lv_font_dummy.h to comment on it --- src/lv_misc/lv_font_dummy.h | 224 ++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 src/lv_misc/lv_font_dummy.h diff --git a/src/lv_misc/lv_font_dummy.h b/src/lv_misc/lv_font_dummy.h new file mode 100644 index 000000000000..653d76ea7fa3 --- /dev/null +++ b/src/lv_misc/lv_font_dummy.h @@ -0,0 +1,224 @@ +/** + * @file lv_font.h + * + */ + +#ifndef LV_FONT_H +#define LV_FONT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif + +#include +#include +#include + +#include "lv_symbol_def.h" + +/********************* + * DEFINES + *********************/ +/*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/ +#define LV_FONT_WIDTH_FRACT_DIGIT 4 + +#define LV_FONT_KERN_POSITIVE 0 +#define LV_FONT_KERN_NEGATIVE 1 + +/********************** + * TYPEDEFS + **********************/ + +/*------------------ + * General types + *-----------------*/ + +/*One element of a kerning table*/ +typedef struct { + uint32_t next_unicode :23; + + uint32_t space :8; /*5 integer, 4 fractional*/ + uint32_t space_sign :1; /*0: space positive; 1: space negative*/ +}lv_font_kern_t; + +/*Describe the properties of a glyph*/ +typedef struct +{ + uint16_t adv_w; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + int8_t ofs_x; /*x offset of the bounding box*/ + int8_t ofs_y; /*y offset of the bounding box*/ + uint8_t bpp; /*Bit-per-pixel: 1, 2, 4, 8*/ + const lv_font_kern_t * kern_table; +}lv_font_glyph_dsc_t; + +/*Describe the properties of a font*/ +typedef struct _lv_font_struct +{ + uint32_t unicode_first; + uint32_t unicode_last; + + /*Get a glyph's descriptor from a font*/ + bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter); + + /*Get a glyph's bitmap from a font*/ + const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); + + /*Pointer to the font in a font pack (must have the same line height)*/ + struct _lv_font_struct * next_page; + uint8_t size; /*The original size (height)*/ + uint8_t line_height; /*The real line height where any text fits*/ + uint8_t base_line; /*Base line measured from the top of the line_height*/ + void * dsc; /*Store implementation specific data here*/ +} lv_font_t; + + +/*--------------------------------------------- + * Types for LittlevGL's internal font format + *---------------------------------------------*/ + +/*Describe a glyph in internal font format */ +typedef struct +{ + uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ + uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ + + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + int8_t ofs_x; /*x offset of the bounding box*/ + int8_t ofs_y; /*y offset of the bounding box*/ + + const lv_font_kern_t * kern_table; +}lv_font_glyph_dsc_built_in_t; + + +/*Describe store additional data for fonts */ +typedef struct { + const uint8_t * glyph_bitmap; + const lv_font_glyph_dsc_built_in_t * glyph_dsc; + const uint16_t * unicode_list; + uint16_t glyph_cnt; /*Number of glyphs in the font. */ + uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ +}lv_font_dsc_built_in_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/*---------------- + * General API + *---------------*/ + +/** + * Initialize the font module + */ +void lv_font_init(void); + +/** + * Add a font to an other to extend the character set. + * @param child the font to add + * @param parent this font will be extended. Using it later will contain the characters from `child` + */ +void lv_font_add(lv_font_t * child, lv_font_t * parent); + +/** + * Remove a font from a character set. + * @param child the font to remove + * @param parent remove `child` from here + */ +void lv_font_remove(lv_font_t * child, lv_font_t * parent); + +/** + * Return with the bitmap of a font. + * @param font_p pointer to a font + * @param letter an UNICODE character code + * @return pointer to the bitmap of the letter + */ +const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter); + +/** + * Get the descriptor of a glyph + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` + */ +bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter); + +/** + * Get the width of a glyph with kerning + * @param font pointer to a font + * @param letter an UNICODE letter + * @param letter_next the next letter after `letter`. Used for kerning + * @return the width of the glyph + */ +uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); + +/** + * Get the line height of a font. All characters fit into this height + * @param font_p pointer to a font + * @return the height of a font + */ +static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) +{ + return font_p->line_height; +} + +/*---------------------------------- + * LittlevGL's internal font format + *----------------------------------*/ + +/** + * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. + * @param font pointer to font + * @param unicode_letter an unicode letter which bitmap should be get + * @return pointer to the bitmap or NULL if not found + */ +const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t letter); + +/** + * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` + */ +bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); + +/********************** + * MACROS + **********************/ + +#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; + +#define LV_FONT_SET_WIDTH(_integer, _fract) ((_integer << LV_FONT_WIDTH_FRACT_DIGIT) + _fract) +#define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) +#define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) + +/********************** + * ADD BUILT IN FONTS + **********************/ +#include "../lv_fonts/lv_font_builtin.h" + +/*Declare the custom (user defined) fonts*/ +#ifdef LV_FONT_CUSTOM_DECLARE +LV_FONT_CUSTOM_DECLARE +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*USE_FONT*/ From f4c0055c5ab69546bf1efd3c8054524787cb4935 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 3 May 2019 19:25:58 +0200 Subject: [PATCH 366/590] add lv_obj_move_foreground/background --- src/lv_core/lv_disp.c | 2 +- src/lv_core/lv_group.c | 3 +-- src/lv_core/lv_indev.c | 5 +---- src/lv_core/lv_obj.c | 45 ++++++++++++++++++++++++++++++++----- src/lv_core/lv_obj.h | 12 ++++++++++ src/lv_draw/lv_draw_basic.c | 3 +-- src/lv_misc/lv_ll.c | 37 +++++++++++++++++++++--------- src/lv_misc/lv_ll.h | 4 +++- 8 files changed, 86 insertions(+), 25 deletions(-) diff --git a/src/lv_core/lv_disp.c b/src/lv_core/lv_disp.c index a59debbcf292..cf2f49d51d5d 100644 --- a/src/lv_core/lv_disp.c +++ b/src/lv_core/lv_disp.c @@ -112,7 +112,7 @@ void lv_disp_assign_screen(lv_disp_t * disp, lv_obj_t * scr) if(old_disp == disp) return; - lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr); + lv_ll_chg_list(&old_disp->scr_ll, &disp->scr_ll, scr, true); } /** diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index e054657f1b1c..8a2328985c3d 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -671,8 +671,7 @@ static void obj_to_foreground(lv_obj_t * obj) /*Move the last_top object to the foreground*/ lv_obj_t * par = lv_obj_get_parent(last_top); /*After list change it will be the new head*/ - lv_ll_chg_list(&par->child_ll, &par->child_ll, last_top); - lv_obj_invalidate(last_top); + lv_obj_move_foreground(last_top); } } diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 8727ca8a18da..8ee40a230e4a 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -738,10 +738,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(last_top != NULL) { /*Move the last_top object to the foreground*/ - lv_obj_t * par = lv_obj_get_parent(last_top); - /*After list change it will be the new head*/ - lv_ll_chg_list(&par->child_ll, &par->child_ll, last_top); - lv_obj_invalidate(last_top); + lv_obj_move_foreground(last_top); } /*Send a signal about the press*/ diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 45361d92dbbc..3114c5211d98 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -214,7 +214,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) else { LV_LOG_TRACE("Object create started"); - new_obj = lv_ll_ins_head(&(parent)->child_ll); + new_obj = lv_ll_ins_head(&parent->child_ll); lv_mem_assert(new_obj); if(new_obj == NULL) return NULL; @@ -428,8 +428,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) lv_ll_rem(&(par->child_ll), obj); } - /* Reset all input devices if - * the object to delete is used*/ + /* Reset all input devices if the object to delete is used*/ lv_indev_t * indev = lv_indev_get_next(NULL); while(indev) { if(indev->proc.types.pointer.act_obj == obj || indev->proc.types.pointer.last_obj == obj) { @@ -552,7 +551,7 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent) lv_obj_t * old_par = obj->par; - lv_ll_chg_list(&obj->par->child_ll, &parent->child_ll, obj); + lv_ll_chg_list(&obj->par->child_ll, &parent->child_ll, obj, true); obj->par = parent; lv_obj_set_pos(obj, old_pos.x, old_pos.y); @@ -565,6 +564,42 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent) lv_obj_invalidate(obj); } +/** + * Move and object to the foreground + * @param obj pointer to an object + */ +void lv_obj_move_foreground(lv_obj_t * obj) +{ + lv_obj_t * parent = lv_obj_get_parent(obj); + + lv_obj_invalidate(parent); + + lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, true); + + /*Notify the new parent about the child*/ + parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj); + + lv_obj_invalidate(parent); +} + +/** + * Move and object to the background + * @param obj pointer to an object + */ +void lv_obj_move_background(lv_obj_t * obj) +{ + lv_obj_t * parent = lv_obj_get_parent(obj); + + lv_obj_invalidate(parent); + + lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, false); + + /*Notify the new parent about the child*/ + parent->signal_cb(parent, LV_SIGNAL_CHILD_CHG, obj); + + lv_obj_invalidate(parent); +} + /*-------------------- * Coordinate set * ------------------*/ @@ -2017,7 +2052,7 @@ void * lv_obj_get_group(const lv_obj_t * obj) } /** - * Tell whether the ohe object is the focused object of a group or not. + * Tell whether the object is the focused object of a group or not. * @param obj pointer to an object * @return true: the object is focused, false: the object is not focused or not in a group */ diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2280a1c64751..435c86a93352 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -328,6 +328,18 @@ void lv_obj_invalidate(const lv_obj_t * obj); */ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); +/** + * Move and object to the foreground + * @param obj pointer to an object + */ +void lv_obj_move_foreground(lv_obj_t * obj); + +/** + * Move and object to the background + * @param obj pointer to an object + */ +void lv_obj_move_background(lv_obj_t * obj); + /*-------------------- * Coordinate set * ------------------*/ diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index c0e93b28e33d..e3ce5f365dbb 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -336,8 +336,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv (row + pos_y) - vdb->area.y1, color, px_opa); } else { if(px_opa > LV_OPA_MAX) *vdb_buf_tmp = color; - else if(px_opa < LV_OPA_MIN) continue; - else { + else if(px_opa > LV_OPA_MIN) { #if LV_COLOR_SCREEN_TRANSP == 0 *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa); #else diff --git a/src/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c index dd5432b94678..755a76ccbe49 100644 --- a/src/lv_misc/lv_ll.c +++ b/src/lv_misc/lv_ll.c @@ -214,22 +214,39 @@ void lv_ll_clear(lv_ll_t * ll_p) * @param ll_ori_p pointer to the original (old) linked list * @param ll_new_p pointer to the new linked list * @param node pointer to a node + * @param head true: be the head in the new list + * false be the head in the new list */ -void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node) +void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head) { lv_ll_rem(ll_ori_p, node); - /*Set node as head*/ - node_set_prev(ll_new_p, node, NULL); - node_set_next(ll_new_p, node, ll_new_p->head); + if(head) { + /*Set node as head*/ + node_set_prev(ll_new_p, node, NULL); + node_set_next(ll_new_p, node, ll_new_p->head); - if(ll_new_p->head != NULL) { /*If there is old head then before it goes the new*/ - node_set_prev(ll_new_p, ll_new_p->head, node); - } + if(ll_new_p->head != NULL) { /*If there is old head then before it goes the new*/ + node_set_prev(ll_new_p, ll_new_p->head, node); + } + + ll_new_p->head = node; /*Set the new head in the dsc.*/ + if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/ + ll_new_p->tail = node; + } + } else { + /*Set node as tail*/ + node_set_prev(ll_new_p, node, ll_new_p->tail); + node_set_next(ll_new_p, node, NULL); + + if(ll_new_p->tail != NULL) { /*If there is old tail then after it goes the new*/ + node_set_next(ll_new_p, ll_new_p->tail, node); + } - ll_new_p->head = node; /*Set the new head in the dsc.*/ - if(ll_new_p->tail == NULL) { /*If there is no tail (first node) set the tail too*/ - ll_new_p->tail = node; + ll_new_p->tail = node; /*Set the new tail in the dsc.*/ + if(ll_new_p->head == NULL) { /*If there is no head (first node) set the head too*/ + ll_new_p->head = node; + } } } diff --git a/src/lv_misc/lv_ll.h b/src/lv_misc/lv_ll.h index bad5383acdd7..d289269ac7cf 100644 --- a/src/lv_misc/lv_ll.h +++ b/src/lv_misc/lv_ll.h @@ -89,8 +89,10 @@ void lv_ll_clear(lv_ll_t * ll_p); * @param ll_ori_p pointer to the original (old) linked list * @param ll_new_p pointer to the new linked list * @param node pointer to a node + * @param head true: be the head in the new list + * false be the head in the new list */ -void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node); +void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head); /** * Return with head node of the linked list From 1a70d98ba40bbbfb834a6b897e5075acc0e3047c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 4 May 2019 07:53:31 +0200 Subject: [PATCH 367/590] lv_roller: fix if clikced while animated --- src/lv_objx/lv_roller.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 677fb221c525..533b0c1a4a05 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -506,7 +506,8 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, lv_coord_t label_y1 = ext->ddlist.label->coords.y1 - roller->coords.y1; lv_coord_t label_unit = font_h + style_label->text.line_space; lv_coord_t mid = (roller->coords.y2 - roller->coords.y1) / 2; - id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit; + + id = (mid - label_y1 + style_label->text.line_space / 2) / label_unit; if(id < 0) id = 0; if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; @@ -515,19 +516,23 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, ext->ddlist.sel_opt_id_ori = id; res = lv_event_send(roller, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return res; - } else if(sign == LV_SIGNAL_RELEASED) { - /*If picked an option by clicking then set it*/ + } + /*If picked an option by clicking then set it*/ + else if(sign == LV_SIGNAL_RELEASED) { if(!lv_indev_is_dragging(indev)) { id = ext->ddlist.sel_opt_id; #if LV_USE_GROUP + /*In edit mode go to navigate mode if an option is selected*/ lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); if(editing) - lv_group_set_editing( - g, false); /*In edit mode go to navigate mode if an option is selected*/ + lv_group_set_editing(g, false); #endif } } + else if(sign == LV_SIGNAL_PRESSED) { + lv_anim_del(roller_scrl, (lv_anim_exec_cb_t)lv_obj_set_y); + } /*Position the scrollable according to the new selected option*/ if(id != -1) { From 45c4970fc6cb0a341d2099d4031742210625458b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 7 May 2019 05:40:01 +0200 Subject: [PATCH 368/590] letter draw optimization --- src/lv_draw/lv_draw_basic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index e3ce5f365dbb..668c21c92091 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -334,7 +334,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); - } else { + } else if (vdb_buf_tmp->full != color.full) { if(px_opa > LV_OPA_MAX) *vdb_buf_tmp = color; else if(px_opa > LV_OPA_MIN) { #if LV_COLOR_SCREEN_TRANSP == 0 From be84581bbc8194cf9c6b633a938db56457fed1c5 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 7 May 2019 06:30:38 +0200 Subject: [PATCH 369/590] lv_anim: add typedef int16_t lv_anim_value_t --- src/lv_core/lv_group.c | 2 -- src/lv_core/lv_obj.c | 81 ------------------------------------------ src/lv_core/lv_obj.h | 29 --------------- src/lv_misc/lv_anim.c | 43 +++++++++++----------- src/lv_misc/lv_anim.h | 24 +++++++------ src/lv_objx/lv_mbox.c | 39 +++++++++++++++++--- 6 files changed, 70 insertions(+), 148 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 8a2328985c3d..7d6cfa1fd9ea 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -669,8 +669,6 @@ static void obj_to_foreground(lv_obj_t * obj) if(last_top != NULL) { /*Move the last_top object to the foreground*/ - lv_obj_t * par = lv_obj_get_parent(last_top); - /*After list change it will be the new head*/ lv_obj_move_foreground(last_top); } } diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 3114c5211d98..af7b50aa2260 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1421,87 +1421,6 @@ void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj) lv_obj_invalidate(obj); } -#if LV_USE_ANIMATION -/** - * Animate an object - * @param obj pointer to an object to animate - * @param type type of animation from 'lv_anim_builtin_t'. 'OR' it with ANIM_IN or ANIM_OUT - * @param time time of animation in milliseconds - * @param delay delay before the animation in milliseconds - * @param ready_cb a function to call when the animation is ready - */ -void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, - lv_anim_ready_cb_t ready_cb) -{ - lv_obj_t * par = lv_obj_get_parent(obj); - - /*Get the direction*/ - bool out = (type & LV_ANIM_DIR_MASK) == LV_ANIM_IN ? false : true; - type = type & (~LV_ANIM_DIR_MASK); - - lv_anim_t a; - a.var = obj; - a.time = time; - a.act_time = (int32_t)-delay; - a.ready_cb = ready_cb; - a.path_cb = lv_anim_path_linear; - a.playback_pause = 0; - a.repeat_pause = 0; - a.playback = 0; - a.repeat = 0; - - /*Init to ANIM_IN*/ - switch(type) { - case LV_ANIM_FLOAT_LEFT: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_x; - a.start = -lv_obj_get_width(obj); - a.end = lv_obj_get_x(obj); - break; - case LV_ANIM_FLOAT_RIGHT: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_x; - a.start = lv_obj_get_width(par); - a.end = lv_obj_get_x(obj); - break; - case LV_ANIM_FLOAT_TOP: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_y; - a.start = -lv_obj_get_height(obj); - a.end = lv_obj_get_y(obj); - break; - case LV_ANIM_FLOAT_BOTTOM: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_y; - a.start = lv_obj_get_height(par); - a.end = lv_obj_get_y(obj); - break; - case LV_ANIM_GROW_H: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_width; - a.start = 0; - a.end = lv_obj_get_width(obj); - break; - case LV_ANIM_GROW_V: - a.exec_cb = (void (*)(void *, int32_t))lv_obj_set_height; - a.start = 0; - a.end = lv_obj_get_height(obj); - break; - case LV_ANIM_NONE: - a.exec_cb = NULL; - a.start = 0; - a.end = 0; - break; - default: break; - } - - /*Swap start and end in case of ANIM OUT*/ - if(out != false) { - int32_t tmp = a.start; - a.start = a.end; - a.end = tmp; - } - - lv_anim_create(&a); -} - -#endif - /*======================= * Getter functions *======================*/ diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 435c86a93352..3193b9ca1aeb 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -44,10 +44,6 @@ extern "C" { #define LV_MAX_ANCESTOR_NUM 8 -#define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/ -#define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/ -#define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/ - #define LV_EXT_CLICK_AREA_OFF 0 #define LV_EXT_CLICK_AREA_TINY 1 #define LV_EXT_CLICK_AREA_FULL 2 @@ -261,17 +257,6 @@ typedef struct ... [x]: "lv_obj" */ } lv_obj_type_t; -enum { - LV_ANIM_NONE = 0, - LV_ANIM_FLOAT_TOP, /*Float from/to the top*/ - LV_ANIM_FLOAT_LEFT, /*Float from/to the left*/ - LV_ANIM_FLOAT_BOTTOM, /*Float from/to the bottom*/ - LV_ANIM_FLOAT_RIGHT, /*Float from/to the right*/ - LV_ANIM_GROW_H, /*Grow/shrink horizontally*/ - LV_ANIM_GROW_V, /*Grow/shrink vertically*/ -}; -typedef uint8_t lv_anim_builtin_t; - /********************** * GLOBAL PROTOTYPES **********************/ @@ -623,20 +608,6 @@ void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size); */ void lv_obj_refresh_ext_draw_pad(lv_obj_t * obj); -#if LV_USE_ANIMATION - -/** - * Animate an object - * @param obj pointer to an object to animate - * @param type type of animation from 'lv_anim_builtin_t'. 'OR' it with ANIM_IN or ANIM_OUT - * @param time time of animation in milliseconds - * @param delay delay before the animation in milliseconds - * @param ready_cb a function to call when the animation is ready - */ -void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, - lv_anim_ready_cb_t ready_cb); -#endif - /*======================= * Getter functions *======================*/ diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index df38c69437a5..ef2d6696cbc2 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -33,7 +33,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static void anim_task(void * param); +static void anim_task(lv_task_t * param); static bool anim_ready_handler(lv_anim_t * a); /********************** @@ -141,7 +141,7 @@ uint16_t lv_anim_count_running(void) * @param end end value of the animation * @return the required time [ms] for the animation with the given parameters */ -uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end) +uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end) { int32_t d = LV_MATH_ABS((int32_t)start - end); uint32_t time = (int32_t)((int32_t)(d * 1000) / speed); @@ -160,14 +160,16 @@ uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_linear(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_linear(const lv_anim_t * a) { /*Calculate the current step*/ - uint16_t step; - if(a->time == a->act_time) + uint32_t step; + if(a->time == a->act_time) { step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/ - else - step = (a->act_time * LV_ANIM_RESOLUTION) / a->time; + } + else { + step = ((int32_t)a->act_time * LV_ANIM_RESOLUTION) / a->time; + } /* Get the new value which will be proportional to `step` * and the `start` and `end` values*/ @@ -176,7 +178,7 @@ int32_t lv_anim_path_linear(const lv_anim_t * a) new_value = new_value >> LV_ANIM_RES_SHIFT; new_value += a->start; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -184,7 +186,7 @@ int32_t lv_anim_path_linear(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_in(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_ease_in(const lv_anim_t * a) { /*Calculate the current step*/ uint32_t t; @@ -200,7 +202,7 @@ int32_t lv_anim_path_ease_in(const lv_anim_t * a) new_value = new_value >> 10; new_value += a->start; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -208,7 +210,7 @@ int32_t lv_anim_path_ease_in(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_out(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_ease_out(const lv_anim_t * a) { /*Calculate the current step*/ @@ -225,7 +227,7 @@ int32_t lv_anim_path_ease_out(const lv_anim_t * a) new_value = new_value >> 10; new_value += a->start; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -233,7 +235,7 @@ int32_t lv_anim_path_ease_out(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_in_out(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_ease_in_out(const lv_anim_t * a) { /*Calculate the current step*/ @@ -250,7 +252,7 @@ int32_t lv_anim_path_ease_in_out(const lv_anim_t * a) new_value = new_value >> 10; new_value += a->start; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -258,7 +260,7 @@ int32_t lv_anim_path_ease_in_out(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_overshoot(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_overshoot(const lv_anim_t * a) { /*Calculate the current step*/ @@ -275,7 +277,7 @@ int32_t lv_anim_path_overshoot(const lv_anim_t * a) new_value = new_value >> 10; new_value += a->start; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -283,7 +285,7 @@ int32_t lv_anim_path_overshoot(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_bounce(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_bounce(const lv_anim_t * a) { /*Calculate the current step*/ uint32_t t; @@ -328,12 +330,11 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a) int32_t step = lv_bezier3(t, 1024, 1024, 800, 0); int32_t new_value; - new_value = (int32_t)step * diff; new_value = new_value >> 10; new_value = a->end - new_value; - return new_value; + return (lv_anim_value_t)new_value; } /** @@ -342,7 +343,7 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_step(const lv_anim_t * a) +lv_anim_value_t lv_anim_path_step(const lv_anim_t * a) { if(a->act_time >= a->time) return a->end; @@ -358,7 +359,7 @@ int32_t lv_anim_path_step(const lv_anim_t * a) * Periodically handle the animations. * @param param unused */ -static void anim_task(void * param) +static void anim_task(lv_task_t * param) { (void)param; diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index b5cc326b2acf..95444d60b1be 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -32,13 +32,15 @@ extern "C" { * TYPEDEFS **********************/ +typedef int16_t lv_anim_value_t; /*Type of the animated value*/ + struct _lv_anim_t; /*Generic prototype of "animator" functions*/ -typedef void (*lv_anim_exec_cb_t)(void *, int32_t); +typedef void (*lv_anim_exec_cb_t)(void *, lv_anim_value_t); /*Get the current value in an animation*/ -typedef int32_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); +typedef lv_anim_value_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); /*Callback for animation ready*/ typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); @@ -77,7 +79,7 @@ lv_anim_t a; a.var = obj; a.start = lv_obj_get_height(obj); a.end = new_height; -a.exec_cb = (lv_anim_fp_t)lv_obj_set_height; +a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -126,49 +128,49 @@ uint16_t lv_anim_count_running(void); * @param end end value of the animation * @return the required time [ms] for the animation with the given parameters */ -uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end); +uint16_t lv_anim_speed_to_time(uint16_t speed, lv_anim_value_t start, lv_anim_value_t end); /** * Calculate the current value of an animation applying linear characteristic * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_linear(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_linear(const lv_anim_t * a); /** * Calculate the current value of an animation slowing down the start phase * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_in(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_ease_in(const lv_anim_t * a); /** * Calculate the current value of an animation slowing down the end phase * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_out(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_ease_out(const lv_anim_t * a); /** * Calculate the current value of an animation applying an "S" characteristic (cosine) * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_ease_in_out(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_ease_in_out(const lv_anim_t * a); /** * Calculate the current value of an animation with overshoot at the end * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_overshoot(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_overshoot(const lv_anim_t * a); /** * Calculate the current value of an animation with 3 bounces * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_bounce(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_bounce(const lv_anim_t * a); /** * Calculate the current value of an animation applying step characteristic. @@ -176,7 +178,7 @@ int32_t lv_anim_path_bounce(const lv_anim_t * a); * @param a pointer to an animation * @return the current value to set */ -int32_t lv_anim_path_step(const lv_anim_t * a); +lv_anim_value_t lv_anim_path_step(const lv_anim_t * a); /********************** * MACROS diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index e98c40ee1b47..a4f6a777a7cb 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -202,14 +202,45 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) if(ext->anim_time != 0) { /*Add shrinking animations*/ - lv_obj_animate(mbox, LV_ANIM_GROW_H | LV_ANIM_OUT, ext->anim_time, delay, NULL); - lv_obj_animate(mbox, LV_ANIM_GROW_V | LV_ANIM_OUT, ext->anim_time, delay, - lv_mbox_close_ready_cb); + lv_anim_t a; + a.var = mbox; + a.start = lv_obj_get_height(mbox); + a.end = 0; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; + a.act_time = -delay; + a.time = ext->anim_time; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; + a.user_data = NULL; + lv_anim_create(&a); + + a.start = lv_obj_get_width(mbox); + a.ready_cb = lv_mbox_close_ready_cb; + lv_anim_create(&a); /*Disable fit to let shrinking work*/ lv_cont_set_fit(mbox, LV_FIT_NONE); } else { - lv_obj_animate(mbox, LV_ANIM_NONE, ext->anim_time, delay, lv_mbox_close_ready_cb); + /*Create an animation to delete the mbox `delay` ms later*/ + lv_anim_t a; + a.var = mbox; + a.start = 0; + a.end = 1; + a.exec_cb = (lv_anim_exec_cb_t)NULL; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_mbox_close_ready_cb; + a.act_time = -delay; + a.time = 0; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; + a.user_data = NULL; + lv_anim_create(&a); } #else (void)delay; /*Unused*/ From 0b31110d3ecccac18a4ba90281a71421acb8f2c9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 7 May 2019 12:15:02 +0200 Subject: [PATCH 370/590] minor fixes --- src/lv_core/lv_obj.c | 41 ++++++++++++++++++++++++++++++++++------- src/lv_core/lv_obj.h | 12 +++++++++++- src/lv_core/lv_refr.c | 7 ++++++- src/lv_misc/lv_anim.h | 2 +- src/lv_misc/lv_task.h | 2 -- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index c34741e297eb..83f5c6b58647 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -57,6 +57,7 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param); **********************/ static bool lv_initialized = false; static lv_event_temp_data_t * event_temp_data_head; +static const void * event_act_data; /********************** * MACROS @@ -1283,6 +1284,23 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) { if(obj == NULL) return LV_RES_OK; + lv_res_t res; + res = lv_event_send_func(obj->event_cb, obj, event, data); + return res; +} + +/** + * Call an event function with an object, event, and data. + * @param event_cb an event callback function. If `NULL` `LV_RES_OK` will return without any actions. + * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`) + * @param event an event + * @param data pointer to a custom data + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event + */ +lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data) +{ + if(event_cb == NULL) return LV_RES_OK; + lv_event_temp_data_t event_temp_data; event_temp_data.obj = obj; event_temp_data.deleted = false; @@ -1297,18 +1315,26 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) event_temp_data_head = &event_temp_data; - if(obj->event_cb) obj->event_cb(obj, event); + event_act_data = data; + + if(event_cb) event_cb(obj, event); /*Remove this element from the list*/ event_temp_data_head = event_temp_data_head->prev; if(event_temp_data.deleted) { + event_act_data = NULL; return LV_RES_INV; } - if(obj->parent_event && obj->par) { - lv_res_t res = lv_event_send(obj->par, event, data); - if(res != LV_RES_OK) return LV_RES_INV; + if(obj) { + if(obj->parent_event && obj->par) { + lv_res_t res = lv_event_send(obj->par, event, data); + if(res != LV_RES_OK) { + event_act_data = NULL; + return LV_RES_INV; + } + } } return LV_RES_OK; @@ -1320,7 +1346,7 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) */ const void * lv_event_get_data(void) { - return NULL; //event_act_data; + return event_act_data; } /** @@ -1981,14 +2007,15 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) } #if LV_USE_USER_DATA_SINGLE + /** * Get a pointer to the object's user data * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj) +lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj) { - return &obj->user_data; + return obj->user_data; } /** diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2280a1c64751..12de8a268ebd 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -565,6 +565,16 @@ void lv_obj_set_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); */ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data); +/** + * Call an event function with an object, event, and data. + * @param event_cb an event callback function + * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`) + * @param event an event + * @param data pointer to a custom data + * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event + */ +lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data); + /** * Get the `data` parameter of the current event * @return the `data` parameter @@ -920,7 +930,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t * lv_obj_get_user_data(lv_obj_t * obj); +lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); /** * Set the object's user data. The data will be copied. diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 155b8c75f765..66519be5dc44 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -69,7 +69,12 @@ void lv_refr_init(void) */ void lv_refr_now(void) { - lv_disp_refr_task(NULL); + lv_disp_t * d; + d = lv_disp_get_next(NULL); + while(d) { + lv_disp_refr_task(d->refr_task); + d = lv_disp_get_next(NULL); + } } /** diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index b5cc326b2acf..a3c81903b682 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -77,7 +77,7 @@ lv_anim_t a; a.var = obj; a.start = lv_obj_get_height(obj); a.end = new_height; -a.exec_cb = (lv_anim_fp_t)lv_obj_set_height; +a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index b0e37b54d826..0a01a6acf91c 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -57,9 +57,7 @@ typedef struct _lv_task_t uint32_t last_run; void (*task_cb)(struct _lv_task_t *); -#if LV_USE_USER_DATA_SINGLE void * user_data; -#endif #if LV_USE_USER_DATA_MULTI void * task_user_data; From 861e0900230a04e6e7925ff64b6202126c3571aa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 8 May 2019 12:04:02 +0200 Subject: [PATCH 371/590] minor fixes --- src/lv_core/lv_refr.c | 2 +- src/lv_misc/lv_task.c | 2 -- src/lv_objx/lv_mbox.c | 2 -- src/lv_objx/lv_ta.c | 20 ++++++++++++++++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 66519be5dc44..57b7c6ae2fb7 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -73,7 +73,7 @@ void lv_refr_now(void) d = lv_disp_get_next(NULL); while(d) { lv_disp_refr_task(d->refr_task); - d = lv_disp_get_next(NULL); + d = lv_disp_get_next(d); } } diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index 0824222ee930..af7c105aa6fe 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -204,9 +204,7 @@ lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_p new_lv_task->once = 0; new_lv_task->last_run = lv_tick_get(); -#if LV_USE_USER_DATA_SINGLE new_lv_task->user_data = user_data; -#endif #if LV_USE_USER_DATA_MULTI new_lv_task->task_user_data = NULL; diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index a4f6a777a7cb..11fa529a2012 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -215,7 +215,6 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) a.playback_pause = 0; a.repeat = 0; a.repeat_pause = 0; - a.user_data = NULL; lv_anim_create(&a); a.start = lv_obj_get_width(mbox); @@ -239,7 +238,6 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) a.playback_pause = 0; a.repeat = 0; a.repeat_pause = 0; - a.user_data = NULL; lv_anim_create(&a); } #else diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 28090c62bfb6..16d7ee56e9bc 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -48,6 +48,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x); #endif +static void pwd_char_hider_anim_ready(lv_anim_t * a); static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); @@ -252,7 +253,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; + a.ready_cb = pwd_char_hider_anim_ready; a.start = 0; a.end = 1; a.repeat = 0; @@ -332,7 +333,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; + a.ready_cb = pwd_char_hider_anim_ready; a.start = 0; a.end = 1; a.repeat = 0; @@ -469,10 +470,10 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.ready_cb = (lv_anim_ready_cb_t)pwd_char_hider; + a.ready_cb = pwd_char_hider_anim_ready; a.start = 0; a.end = 1; a.repeat = 0; @@ -1418,6 +1419,17 @@ static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x) #endif + +/** + * Call when an animation is ready to convert all characters to '*' + * @param a pointer to the animation + */ +static void pwd_char_hider_anim_ready(lv_anim_t * a) +{ + lv_obj_t * ta = a->var; + pwd_char_hider(ta); +} + /** * Hide all characters (convert them to '*') * @param ta: pointer to text area object From 1ddf6596312bdbde35ce8b6285bd9595eb24faa8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 8 May 2019 16:08:05 +0200 Subject: [PATCH 372/590] indev encoder: fix when an object is deleted in the event function --- src/lv_core/lv_indev.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 8ee40a230e4a..a9dec80f2fb5 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -510,12 +510,21 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.types.keypad.last_state = LV_INDEV_STATE_REL; /*To skip the processing of release*/ } + /* Save the last keys before anything else. + * They need to be already saved if the the function returns for any reason*/ + lv_indev_state_t last_state = i->proc.types.keypad.last_state; + uint32_t last_key = i->proc.types.keypad.last_key; + i->proc.types.keypad.last_state = data->state; + i->proc.types.keypad.last_key = data->key; + lv_group_t * g = i->group; if(g == NULL) return; lv_obj_t * focused = lv_group_get_focused(g); if(focused == NULL) return; + + /*Process the steps first. They are valid only with released button*/ if(data->state == LV_INDEV_STATE_REL) { /*In edit mode send LEFT/RIGHT keys*/ @@ -543,7 +552,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(focused == NULL) return; /*Button press happened*/ - if(data->state == LV_INDEV_STATE_PR && i->proc.types.keypad.last_state == LV_INDEV_STATE_REL) { + if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_REL) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -558,7 +567,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && - i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + last_state == LV_INDEV_STATE_PR) { if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; @@ -585,7 +594,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Release happened*/ else if(data->state == LV_INDEV_STATE_REL && - i->proc.types.keypad.last_state == LV_INDEV_STATE_PR) { + last_state == LV_INDEV_STATE_PR) { bool editable = false; focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); @@ -633,8 +642,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 0; } - i->proc.types.keypad.last_state = data->state; - i->proc.types.keypad.last_key = data->key; #else (void)data; /*Unused*/ (void)i; /*Unused*/ From 0f6f2accb61aabb685cbeaee752b431dbdd773c7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 9 May 2019 06:03:25 +0200 Subject: [PATCH 373/590] draw_triange/line optimization: return if the coords are out of the mask --- src/lv_draw/lv_draw_line.c | 6 ++++++ src/lv_draw/lv_draw_triangle.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index 5ede6ba42525..c965d981d7c3 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -85,6 +85,12 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv if(style->line.width == 0) return; if(point1->x == point2->x && point1->y == point2->y) return; + /*Return if the points are out of the mask*/ + if(point1->x < mask->x1 && point2->x < mask->x1) return; + if(point1->x > mask->x2 && point2->x > mask->x2) return; + if(point1->y < mask->y1 && point2->y < mask->y1) return; + if(point1->y > mask->y2 && point2->y > mask->y2) return; + line_draw_t main_line; lv_point_t p1; lv_point_t p2; diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 52d512aef58d..54f557e1afe0 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -44,6 +44,31 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { + /*Return if the points are out of the mask*/ + if(points[0].x < mask->x1 && + points[1].x < mask->x1 && + points[2].x < mask->x1) { + return; + } + + if(points[0].x > mask->x2 && + points[1].x > mask->x2 && + points[2].x > mask->x2) { + return; + } + + if(points[0].y < mask->y1 && + points[1].y < mask->y1 && + points[2].y < mask->y1) { + return; + } + + if(points[0].y > mask->y2 && + points[1].y > mask->y2 && + points[2].y > mask->y2) { + return; + } + lv_point_t tri[3]; memcpy(tri, points, sizeof(tri)); From c31ab099f748ceba806c7584c8f922222578e3d3 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 9 May 2019 06:04:03 +0200 Subject: [PATCH 374/590] add MASK_AREA_DEBUG option --- src/lv_core/lv_refr.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 155b8c75f765..7d2ee5659cb1 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -14,6 +14,7 @@ #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_gc.h" +#include "../lv_draw/lv_draw_basic.h" #if defined(LV_GC_INCLUDE) #include LV_GC_INCLUDE @@ -22,6 +23,8 @@ /********************* * DEFINES *********************/ +/* Draw translucent random colored areas on the invalidated (redrawn) areas*/ +#define MASK_AREA_DEBUG 0 /********************** * TYPEDEFS @@ -359,8 +362,7 @@ static void lv_refr_area_part(const lv_area_t * area_p) /*In non double buffered mode, before rendering the next part wait until the previous image is * flushed*/ if(lv_disp_is_double_buf(disp_refr) == false) { - while(vdb->flushing) - ; + while(vdb->flushing); } lv_obj_t * top_p; @@ -501,8 +503,13 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p) /* Redraw the object */ obj->design_cb(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN); - // usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/ +#if MASK_AREA_DEBUG + static lv_color_t debug_color = LV_COLOR_RED; + lv_draw_fill(&obj_ext_mask, &obj_ext_mask, debug_color, LV_OPA_50); + debug_color.full *= 17; + debug_color.full += 0xA1; +#endif /*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/ lv_obj_get_coords(obj, &obj_area); union_ok = lv_area_intersect(&obj_mask, mask_ori_p, &obj_area); From 424bff48f5c7b9ebc41c3d910382c6c890fb63a2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 9 May 2019 06:04:45 +0200 Subject: [PATCH 375/590] lv_obj_move_fore/background: move only if not there now --- src/lv_core/lv_obj.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index af7b50aa2260..5bd6353a6948 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -572,6 +572,9 @@ void lv_obj_move_foreground(lv_obj_t * obj) { lv_obj_t * parent = lv_obj_get_parent(obj); + /*Do nothing of already in the foreground*/ + if(lv_ll_get_head(&parent->child_ll) == obj) return; + lv_obj_invalidate(parent); lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, true); @@ -590,6 +593,9 @@ void lv_obj_move_background(lv_obj_t * obj) { lv_obj_t * parent = lv_obj_get_parent(obj); + /*Do nothing of already in the background*/ + if(lv_ll_get_tail(&parent->child_ll) == obj) return; + lv_obj_invalidate(parent); lv_ll_chg_list(&parent->child_ll, &parent->child_ll, obj, false); From aa4897cdc5c3ab714c99dae2bcf42dfb78abcf2d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 9 May 2019 06:38:25 +0200 Subject: [PATCH 376/590] minor fixes --- src/lv_core/lv_obj.c | 2 -- src/lv_draw/lv_draw_rect.c | 1 + src/lv_objx/lv_mbox.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 42f28a17565b..fbbaf33bdfc1 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1343,8 +1343,6 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) */ lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data) { - if(event_cb == NULL) return LV_RES_OK; - lv_event_temp_data_t event_temp_data; event_temp_data.obj = obj; event_temp_data.deleted = false; diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 330bf7d98db5..6a2fad4d2cd2 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -80,6 +80,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty lv_opa_t opa_scale) { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; + if(lv_area_is_on(coords, mask) == false) return; #if LV_USE_SHADOW if(style->body.shadow.width != 0) { diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 11fa529a2012..cb9de0e2a253 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -527,7 +527,7 @@ static void lv_mbox_close_ready_cb(lv_anim_t * a) static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) { - if(event != LV_EVENT_CLICKED) return; + if(event != LV_EVENT_SELECTED) return; uint16_t btn_id = lv_mbox_get_active_btn(mbox); if(btn_id == LV_BTNM_BTN_NONE) return; From 0442ffe6cb794210fcaf7560e1c8112f6c9018f3 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Thu, 9 May 2019 10:21:50 +0430 Subject: [PATCH 377/590] keep the pressed_date after release we shouldn't lose the pressed_date after the release and press lost --- src/lv_objx/lv_calendar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 3701367bf094..8a1fe1bdbf47 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -487,6 +487,8 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * } ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; } else if(calculate_touched_day(calendar, &p)) { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); ext->btn_pressing = 0; @@ -494,10 +496,11 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); ext->btn_pressing = 0; ext->pressed_date.year = 0; + ext->pressed_date.month = 0; + ext->pressed_date.day = 0; } } else if(sign == LV_SIGNAL_PRESS_LOST) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - ext->pressed_date.year = 0; ext->btn_pressing = 0; lv_obj_invalidate(calendar); @@ -522,7 +525,6 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * if(res != LV_RES_OK) return res; } - ext->pressed_date.year = 0; ext->btn_pressing = 0; lv_obj_invalidate(calendar); } else if(sign == LV_SIGNAL_CONTROL) { From 523170297e18e81dd0e8eec273c5bd6b9d0eb438 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 9 May 2019 15:55:01 +0200 Subject: [PATCH 378/590] fix a bug in rendering order (scrollbar coverd sibling obejcts too) --- src/lv_core/lv_indev.c | 2 +- src/lv_core/lv_refr.c | 9 +++------ src/lv_draw/lv_draw_basic.c | 4 +++- src/lv_draw/lv_draw_rect.c | 8 ++++++-- src/lv_objx/lv_page.c | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index a9dec80f2fb5..e606180fa7ee 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -739,7 +739,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) lv_obj_t * i = proc->types.pointer.act_obj; lv_obj_t * last_top = NULL; while(i != NULL) { - if(i->top != 0) last_top = i; + if(i->top) last_top = i; i = lv_obj_get_parent(i); } diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 0465d2fbe6e6..700e59b2b8bb 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -464,6 +464,9 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) i = lv_ll_get_prev(&(par->child_ll), i); } + /*Call the post draw design function of the parents of the to object*/ + par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST); + /*The new border will be there last parents, *so the 'younger' brothers of parent will be refreshed*/ border_p = par; @@ -471,12 +474,6 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) par = lv_obj_get_parent(par); } - /*Call the post draw design function of the parents of the to object*/ - par = lv_obj_get_parent(top_p); - while(par != NULL) { - par->design_cb(par, mask_p, LV_DESIGN_DRAW_POST); - par = lv_obj_get_parent(par); - } } /** diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 668c21c92091..636160f981af 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -128,7 +128,9 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ union_ok = lv_area_intersect(&res_a, cords_p, mask_p); /*If there are common part of the three area then draw to the vdb*/ - if(union_ok == false) return; + if(union_ok == false) { + return; + } lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 6a2fad4d2cd2..7b28b10060a2 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -80,13 +80,17 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty lv_opa_t opa_scale) { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; - if(lv_area_is_on(coords, mask) == false) return; #if LV_USE_SHADOW if(style->body.shadow.width != 0) { lv_draw_shadow(coords, mask, style, opa_scale); } #endif + + /* If the object is out of the mask there is nothing to draw. + * Draw shadow before it because the shadow is out of `coords`*/ + if(lv_area_is_on(coords, mask) == false) return; + if(style->body.opa > LV_OPA_MIN) { lv_draw_rect_main_mid(coords, mask, style, opa_scale); @@ -1477,7 +1481,7 @@ static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area { bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; - lv_coord_t swidth = style->body.shadow.width; // + LV_ANTIALIAS; + lv_coord_t swidth = style->body.shadow.width; lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 49dc461439a1..e07b04dace5d 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -631,7 +631,7 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo style_tmp.body.border.width = 0; lv_draw_rect(&page->coords, mask, &style_tmp, lv_obj_get_opa_scale(page)); - } else if(mode == LV_DESIGN_DRAW_POST) { /*Draw the scroll bars finally*/ + } else if(mode == LV_DESIGN_DRAW_POST) { /*Draw only a border*/ style_tmp.body.shadow.width = 0; style_tmp.body.opa = LV_OPA_TRANSP; From 7631d41c8873415546dc2a9933b3e862b547835e Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Thu, 9 May 2019 09:02:11 -0700 Subject: [PATCH 379/590] lv_obj_user_data_ptr initial commit. Also deleted an unused variable in lv_indev to prevent compiler warnings --- src/lv_core/lv_indev.c | 1 - src/lv_core/lv_obj.c | 14 ++++++++++++-- src/lv_core/lv_obj.h | 9 ++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index e606180fa7ee..416937af8cee 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -513,7 +513,6 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /* Save the last keys before anything else. * They need to be already saved if the the function returns for any reason*/ lv_indev_state_t last_state = i->proc.types.keypad.last_state; - uint32_t last_key = i->proc.types.keypad.last_key; i->proc.types.keypad.last_state = data->state; i->proc.types.keypad.last_key = data->key; diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index fbbaf33bdfc1..8ef301738392 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1970,15 +1970,25 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) #if LV_USE_USER_DATA_SINGLE /** - * Get a pointer to the object's user data + * Get the object's user data * @param obj pointer to an object - * @return pointer to the user data + * @return user data */ lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj) { return obj->user_data; } +/** + * Get a pointer to the object's user data + * @param obj pointer to an object + * @return pointer to the user data + */ +lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj) +{ + return &obj->user_data; +} + /** * Set the object's user data. The data will be copied. * @param obj pointer to an object diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 6dd264db6621..0e84850304fb 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -908,12 +908,19 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); #if LV_USE_USER_DATA_SINGLE +/** + * Get the object's user data + * @param obj pointer to an object + * @return user data + */ +lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); + /** * Get a pointer to the object's user data * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); +lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj); /** * Set the object's user data. The data will be copied. From 8b29a88b582f4f59adbbb33771d12696187e3b66 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 10 May 2019 07:41:32 +0200 Subject: [PATCH 380/590] lv_btn: fix warning --- src/lv_objx/lv_btn.c | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 4b1cdd8b7d04..a8f72ad38e8d 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -606,21 +606,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(c == LV_KEY_LEFT || c == LV_KEY_DOWN) { if(lv_btn_get_toggle(btn)) lv_btn_set_state(btn, LV_BTN_STATE_REL); } - // else if(c == LV_KEY_ENTER) { - // if(lv_btn_get_toggle(btn)) { - // if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) - // lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); else if(state == - // LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) - // lv_btn_set_state(btn, LV_BTN_STATE_REL); - // } else { - // if(state == LV_BTN_STATE_REL || state == LV_BTN_STATE_PR) - // lv_btn_set_state(btn, LV_BTN_STATE_REL); else if(state == - // LV_BTN_STATE_TGL_REL || state == LV_BTN_STATE_TGL_PR) - // lv_btn_set_state(btn, LV_BTN_STATE_TGL_REL); - // } - // res = lv_obj_send_event(btn, LV_EVENT_VALUE_CHANGED); - // if(res != LV_RES_OK) return res; - // } } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { @@ -671,20 +656,20 @@ static void lv_btn_ink_effect_anim_ready(lv_anim_t * a) if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && ink_playback == false) { - lv_anim_t a; - a.var = ink_obj; - a.start = LV_BTN_INK_VALUE_MAX; - a.end = 0; - a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_btn_ink_effect_anim_ready; - a.act_time = -ext->ink_wait_time; - a.time = ext->ink_out_time; - a.playback = 0; - a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; - lv_anim_create(&a); + lv_anim_t new_a; + new_a.var = ink_obj; + new_a.start = LV_BTN_INK_VALUE_MAX; + new_a.end = 0; + new_a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + new_a.path_cb = lv_anim_path_linear; + new_a.ready_cb = lv_btn_ink_effect_anim_ready; + new_a.act_time = -ext->ink_wait_time; + new_a.time = ext->ink_out_time; + new_a.playback = 0; + new_a.playback_pause = 0; + new_a.repeat = 0; + new_a.repeat_pause = 0; + lv_anim_create(&new_a); ink_playback = true; } else { From 1cd4ac4aef795f8b9dd92419e61278fb5967b1bb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 10 May 2019 07:42:08 +0200 Subject: [PATCH 381/590] clag-format: incraese ColumnLimit to 120 --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 0329eeab9ab7..a8674b33f240 100644 --- a/.clang-format +++ b/.clang-format @@ -39,7 +39,7 @@ BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true -ColumnLimit: 100 +ColumnLimit: 120 CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 4 From 1489629b61cbeab95c228c09932f46d601477c89 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 10 May 2019 15:12:41 +0200 Subject: [PATCH 382/590] ddlist and roller: fix to save the selected option by encoder --- src/lv_objx/lv_ddlist.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index cf1d22339808..ed2def291a31 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -791,6 +791,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) /*Leave edit mode once a new item is selected*/ lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { + ext->sel_opt_id_ori = ext->sel_opt_id; lv_group_t * g = lv_obj_get_group(ddlist); if(lv_group_get_editing(g)) { lv_group_set_editing(g, false); @@ -820,10 +821,9 @@ static lv_res_t release_handler(lv_obj_t * ddlist) } ext->sel_opt_id = new_opt; + ext->sel_opt_id_ori = ext->sel_opt_id; } - ext->sel_opt_id_ori = ext->sel_opt_id; - lv_res_t res = lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &ext->sel_opt_id); if(res != LV_RES_OK) return res; @@ -883,25 +883,26 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) /*Force animation complete to fix highlight selection*/ lv_ddlist_anim_finish(ddlist); - - } else { - lv_anim_t a; - a.var = ddlist; - a.start = lv_obj_get_height(ddlist); - a.end = new_height; - a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_ddlist_anim_ready_cb; - a.act_time = 0; - a.time = ext->anim_time; - a.playback = 0; - a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; - - ext->force_sel = 1; /*Keep the list item selected*/ - lv_anim_create(&a); + /*Run the animation only if the the size will be different*/ + if(lv_obj_get_height(ddlist) != new_height) { + lv_anim_t a; + a.var = ddlist; + a.start = lv_obj_get_height(ddlist); + a.end = new_height; + a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_ddlist_anim_ready_cb; + a.act_time = 0; + a.time = ext->anim_time; + a.playback = 0; + a.playback_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; + + ext->force_sel = 1; /*Keep the list item selected*/ + lv_anim_create(&a); + } #endif } } From 7f30fb0058b0cd2dbbb83d3c42dea086893f0b9b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 11 May 2019 07:58:37 +0200 Subject: [PATCH 383/590] font update --- src/lv_misc/lv_font.h | 28 +++++++++++++++++++++++++--- src/lv_misc/lv_font_dummy.h | 28 +++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 653d76ea7fa3..c2733e33ddb0 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -101,14 +101,36 @@ typedef struct const lv_font_kern_t * kern_table; }lv_font_glyph_dsc_built_in_t; +typedef struct { + /* First Unicode character for this range */ + uint32_t range_start; + + /* Number of Unicode characters related to this range. + * Last Unicode character = range_start + range_length - 1*/ + uint16_t range_length; + + /* First glyph ID (array index of `glyph_dsc`) for this range */ + uint16_t glyph_id_start; + + /* NULL: the range is mapped continuously from `glyph_id_start` + * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ + uint16_t * unicode_list; +}lv_font_cmap_built_in_t; /*Describe store additional data for fonts */ typedef struct { const uint8_t * glyph_bitmap; const lv_font_glyph_dsc_built_in_t * glyph_dsc; - const uint16_t * unicode_list; - uint16_t glyph_cnt; /*Number of glyphs in the font. */ - uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ + + /* Map the glyphs to Unicode characters. + * Array of `lv_font_cmap_built_in_t` variables*/ + const lv_font_cmap_built_in_t * cmaps; + + /*Number of cmap tables*/ + uint8_t cmap_num; + + /*Bit per pixel: 1, 2, 4 or 8*/ + uint8_t bpp; }lv_font_dsc_built_in_t; /********************** diff --git a/src/lv_misc/lv_font_dummy.h b/src/lv_misc/lv_font_dummy.h index 653d76ea7fa3..c2733e33ddb0 100644 --- a/src/lv_misc/lv_font_dummy.h +++ b/src/lv_misc/lv_font_dummy.h @@ -101,14 +101,36 @@ typedef struct const lv_font_kern_t * kern_table; }lv_font_glyph_dsc_built_in_t; +typedef struct { + /* First Unicode character for this range */ + uint32_t range_start; + + /* Number of Unicode characters related to this range. + * Last Unicode character = range_start + range_length - 1*/ + uint16_t range_length; + + /* First glyph ID (array index of `glyph_dsc`) for this range */ + uint16_t glyph_id_start; + + /* NULL: the range is mapped continuously from `glyph_id_start` + * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ + uint16_t * unicode_list; +}lv_font_cmap_built_in_t; /*Describe store additional data for fonts */ typedef struct { const uint8_t * glyph_bitmap; const lv_font_glyph_dsc_built_in_t * glyph_dsc; - const uint16_t * unicode_list; - uint16_t glyph_cnt; /*Number of glyphs in the font. */ - uint8_t bpp; /*Bit per pixel: 1, 2, 4 or 8*/ + + /* Map the glyphs to Unicode characters. + * Array of `lv_font_cmap_built_in_t` variables*/ + const lv_font_cmap_built_in_t * cmaps; + + /*Number of cmap tables*/ + uint8_t cmap_num; + + /*Bit per pixel: 1, 2, 4 or 8*/ + uint8_t bpp; }lv_font_dsc_built_in_t; /********************** From a3bfdb240e3ef0f4364a6b7afdf6971d156972c9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 13 May 2019 05:50:27 +0200 Subject: [PATCH 384/590] define LV_KEY_... as enum --- src/lv_core/lv_group.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 02edca0d245a..c58ed48c48ea 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -25,19 +25,22 @@ extern "C" { * DEFINES *********************/ /*Predefined keys to control the focused object via lv_group_send(group, c)*/ -/*For compatibility in signal function define the keys regardless to LV_GROUP*/ -#define LV_KEY_UP 17 /*0x11*/ -#define LV_KEY_DOWN 18 /*0x12*/ -#define LV_KEY_RIGHT 19 /*0x13*/ -#define LV_KEY_LEFT 20 /*0x14*/ -#define LV_KEY_ESC 27 /*0x1B*/ -#define LV_KEY_DEL 127 /*0x7F*/ -#define LV_KEY_BACKSPACE 8 /*0x08*/ -#define LV_KEY_ENTER 10 /*0x0A, '\n'*/ -#define LV_KEY_NEXT 9 /*0x09, '\t'*/ -#define LV_KEY_PREV 11 /*0x0B, '*/ -#define LV_KEY_HOME 2 /*0x02, STX*/ -#define LV_KEY_END 3 /*0x03, ETX*/ +/*For compatibility in signal function define the keys regardless to `LV_USE_GROUP`*/ + +typedef enum { + LV_KEY_UP = 17, /*0x11*/ + LV_KEY_DOWN = 18, /*0x12*/ + LV_KEY_RIGHT = 19, /*0x13*/ + LV_KEY_LEFT = 20, /*0x14*/ + LV_KEY_ESC = 27, /*0x1B*/ + LV_KEY_DEL = 127, /*0x7F*/ + LV_KEY_BACKSPACE = 8, /*0x08*/ + LV_KEY_ENTER = 10, /*0x0A, '\n'*/ + LV_KEY_NEXT = 9, /*0x09, '\t'*/ + LV_KEY_PREV=11, /*0x0B, '*/ + LV_KEY_HOME = 2, /*0x02, STX*/ + LV_KEY_END = 3, /*0x03, ETX*/ +} lv_key_t; #if LV_USE_GROUP != 0 /********************** From 85ead39b6a507f58bb6213acf4e5f6c585521288 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 13 May 2019 09:06:01 -0700 Subject: [PATCH 385/590] initial commit of lv_obj_count_children_recursive and of lv_ll_get_len --- src/lv_core/lv_obj.c | 17 +++++++++++++++++ src/lv_core/lv_obj.h | 6 ++++++ src/lv_misc/lv_ll.c | 16 ++++++++++++++++ src/lv_misc/lv_ll.h | 7 +++++++ 4 files changed, 46 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 8ef301738392..499322f23237 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -206,6 +206,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->opa_scale_en = 0; new_obj->opa_scale = LV_OPA_COVER; new_obj->parent_event = 0; + new_obj->reserved = 0; new_obj->ext_attr = NULL; @@ -1570,6 +1571,22 @@ uint16_t lv_obj_count_children(const lv_obj_t * obj) return cnt; } +/** Recursively count the children of an object + * @param obj pointer to an object + * @return children number of 'obj' + */ +uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj){ + lv_obj_t * i; + uint16_t cnt = 0; + + LV_LL_READ(obj->child_ll, i) { + cnt++; // Count the child + cnt += lv_obj_count_children_recursive(i); // recursively count children's children + } + + return cnt; +} + /*--------------------- * Coordinate get *--------------------*/ diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 0e84850304fb..048e6353bd5f 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -672,6 +672,12 @@ lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child); */ uint16_t lv_obj_count_children(const lv_obj_t * obj); +/** Recursively count the children of an object + * @param obj pointer to an object + * @return children number of 'obj' + */ +uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj); + /*--------------------- * Coordinate get *--------------------*/ diff --git a/src/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c index 755a76ccbe49..c979f91da7b4 100644 --- a/src/lv_misc/lv_ll.c +++ b/src/lv_misc/lv_ll.c @@ -318,6 +318,22 @@ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act) return prev; } +/** + * Return the length of the linked list. + * @param ll_p pointer to linked list + * @return length of the linked list + */ +uint32_t lv_ll_get_len(const lv_ll_t *ll_p){ + uint32_t len = 0; + void * node; + + for(node=lv_ll_get_head(ll_p); node!=NULL; node=lv_ll_get_next(ll_p, node)) { + len++; + } + + return len; +} + void lv_ll_swap(lv_ll_t * ll_p, void * n1_p, void * n2_p) { (void)(ll_p); diff --git a/src/lv_misc/lv_ll.h b/src/lv_misc/lv_ll.h index d289269ac7cf..7c6baba6359f 100644 --- a/src/lv_misc/lv_ll.h +++ b/src/lv_misc/lv_ll.h @@ -124,6 +124,13 @@ void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act); */ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act); +/** + * Return the length of the linked list. + * @param ll_p pointer to linked list + * @return length of the linked list + */ +uint32_t lv_ll_get_len(const lv_ll_t *ll_p); + /** * Move a nodw before an other node in the same linked list * @param ll_p pointer to a linked list From d58c8663d4c35a3f0a75256fae0abf75c3e04c47 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 14 May 2019 06:34:20 +0200 Subject: [PATCH 386/590] start to reqork the image decoder interface --- lv_conf_template.h | 4 +- src/lv_core/lv_indev.c | 2 +- src/lv_draw/lv_draw_img.c | 505 ------------------------------ src/lv_draw/lv_draw_img.h | 95 +----- src/lv_misc/lv_gc.h | 1 + src/lv_misc/lv_img_decoder.c | 587 +++++++++++++++++++++++++++++++++++ src/lv_misc/lv_img_decoder.h | 165 ++++++++++ 7 files changed, 758 insertions(+), 601 deletions(-) create mode 100644 src/lv_misc/lv_img_decoder.c create mode 100644 src/lv_misc/lv_img_decoder.h diff --git a/lv_conf_template.h b/lv_conf_template.h index 908e18ce639f..7eb4065f60e4 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -145,6 +145,9 @@ typedef void * lv_group_user_data_t; /* 1: Enable alpha indexed images */ #define LV_IMG_CF_ALPHA 1 +/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_img_decoder_user_data_t; + /*1: Add a `user_data` to drivers and objects*/ #define LV_USE_USER_DATA_SINGLE 1 @@ -165,7 +168,6 @@ typedef void * lv_group_user_data_t; * E.g. __attribute__((aligned(4))) */ #define LV_ATTRIBUTE_MEM_ALIGN - /* 1: Variable length array is supported*/ #define LV_COMPILER_VLA_SUPPORTED 1 diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 416937af8cee..b31bf1ff1530 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -876,7 +876,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->reset_query != 0) return; - /*Handle click focus*/ + /*Handle click focus*/ #if LV_USE_GROUP /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index c09bf3279021..ebc9b0e3ef1a 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -7,7 +7,6 @@ * INCLUDES *********************/ #include "lv_draw_img.h" -#include "../lv_misc/lv_fs.h" /********************* * DEFINES @@ -23,33 +22,9 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style, lv_opa_t opa_scale); -static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style); -static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); -static void lv_img_decoder_close(void); -static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf); -static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf); - /********************** * STATIC VARIABLES **********************/ -static bool decoder_custom; -static const void * decoder_src; -static lv_img_src_t decoder_src_type; -static lv_img_header_t decoder_header; -static const lv_style_t * decoder_style; -#if LV_USE_FILESYSTEM -static lv_fs_file_t decoder_file; -#endif -#if LV_IMG_CF_INDEXED -static lv_color_t decoder_index_map[256]; -#endif - -static lv_img_decoder_info_f_t lv_img_decoder_info_custom; -static lv_img_decoder_open_f_t lv_img_decoder_open_custom; -static lv_img_decoder_read_line_f_t lv_img_decoder_read_line_custom; -static lv_img_decoder_close_f_t lv_img_decoder_close_custom; /********************** * MACROS @@ -90,63 +65,6 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * } } -/** - * Initialize and `lv_img_dsc_t` variable with the image's info - * @param src variable, filename or symbol - * @param header store the result here - * @return LV_RES_OK: succeeded; LV_RES_INV: failed - */ -lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header) -{ - header->always_zero = 0; - /*Try to get info with the custom functions first*/ - if(lv_img_decoder_info_custom) { - lv_res_t custom_res; - custom_res = lv_img_decoder_info_custom(src, header); - if(custom_res == LV_RES_OK) return LV_RES_OK; /*Custom info has supported this source*/ - } - - lv_img_src_t src_type = lv_img_src_get_type(src); - if(src_type == LV_IMG_SRC_VARIABLE) { - header->w = ((lv_img_dsc_t *)src)->header.w; - header->h = ((lv_img_dsc_t *)src)->header.h; - header->cf = ((lv_img_dsc_t *)src)->header.cf; - } -#if LV_USE_FILESYSTEM - else if(src_type == LV_IMG_SRC_FILE) { - lv_fs_file_t file; - lv_fs_res_t res; - uint32_t rn; - res = lv_fs_open(&file, src, LV_FS_MODE_RD); - if(res == LV_FS_RES_OK) { - res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn); - lv_fs_close(&file); - } - - /*Create a dummy header on fs error*/ - if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { - header->w = LV_DPI; - header->h = LV_DPI; - header->cf = LV_IMG_CF_UNKNOWN; - return LV_RES_INV; - } - } -#endif - else if(src_type == LV_IMG_SRC_SYMBOL) { - /*The size depend on the font but it is unknown here. It should be handled outside of the - * function*/ - header->w = 1; - header->h = 1; - /* Symbols always have transparent parts. Important because of cover check in the design - * function. The actual value doesn't matter because lv_draw_label will draw it*/ - header->cf = LV_IMG_CF_ALPHA_1BIT; - } else { - LV_LOG_WARN("Image get info found unknown src type"); - return LV_RES_INV; - } - return LV_RES_OK; -} - /** * Get the color of an image's pixel * @param dsc an image descriptor @@ -512,24 +430,6 @@ lv_img_src_t lv_img_src_get_type(const void * src) return img_src_type; } -/** - * Set custom decoder functions. See the typdefs of the function typed above for more info about - * them - * @param info_fp info get function - * @param open_fp open function - * @param read_fp read line function - * @param close_fp clode function - */ -void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, - lv_img_decoder_read_line_f_t read_fp, - lv_img_decoder_close_f_t close_fp) -{ - lv_img_decoder_info_custom = info_fp; - lv_img_decoder_open_custom = open_fp; - lv_img_decoder_read_line_custom = read_fp; - lv_img_decoder_close_custom = close_fp; -} - /********************** * STATIC FUNCTIONS **********************/ @@ -611,408 +511,3 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas return LV_RES_OK; } - -static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style) -{ - decoder_custom = false; - - /*Try to open with the custom functions first*/ - if(lv_img_decoder_open_custom) { - const uint8_t * custom_res; - custom_res = lv_img_decoder_open_custom(src, style); - if(custom_res != LV_IMG_DECODER_OPEN_FAIL) { - decoder_custom = - true; /*Mark that custom decoder function should be used for this img source.*/ - return custom_res; /*Custom open supported this source*/ - } - } - - decoder_src = src; - decoder_style = style; - decoder_src_type = lv_img_src_get_type(src); - - lv_res_t header_res; - header_res = lv_img_dsc_get_info(src, &decoder_header); - if(header_res == LV_RES_INV) { - decoder_src = NULL; - decoder_src_type = LV_IMG_SRC_UNKNOWN; - LV_LOG_WARN("Built-in image decoder can't get the header info"); - return LV_IMG_DECODER_OPEN_FAIL; - } - - /*Open the file if it's a file*/ - if(decoder_src_type == LV_IMG_SRC_FILE) { -#if LV_USE_FILESYSTEM - lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD); - if(res != LV_FS_RES_OK) { - LV_LOG_WARN("Built-in image decoder can't open the file"); - return LV_IMG_DECODER_OPEN_FAIL; - } -#else - LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); - return LV_IMG_DECODER_OPEN_FAIL; -#endif - } - - /*Process the different color formats*/ - lv_img_cf_t cf = decoder_header.cf; - if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - /*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's - * pointer*/ - return ((lv_img_dsc_t *)decoder_src)->data; - } else { - /*If it's file it need to be read line by line later*/ - return NULL; - } - } else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || - cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { - -#if LV_IMG_CF_INDEXED -#if LV_USE_FILESYSTEM - lv_color32_t palette_file[256]; -#endif - - lv_color32_t * palette_p = NULL; - uint8_t px_size = lv_img_color_format_get_px_size(cf); - uint32_t palette_size = 1 << px_size; - - if(decoder_src_type == LV_IMG_SRC_FILE) { - /*Read the palette from file*/ -#if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, 4); /*Skip the header*/ - lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); - palette_p = palette_file; -#else - LV_LOG_WARN( - "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); - return LV_IMG_DECODER_OPEN_FAIL; -#endif - } else { - /*The palette begins in the beginning of the image data. Just point to it.*/ - palette_p = (lv_color32_t *)((lv_img_dsc_t *)decoder_src)->data; - } - - uint32_t i; - for(i = 0; i < palette_size; i++) { - decoder_index_map[i] = - lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); - } - return NULL; -#else - LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED"); - return LV_IMG_DECODER_OPEN_FAIL; -#endif - } else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || - cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { -#if LV_IMG_CF_ALPHA - return NULL; /*Nothing to process*/ -#else - LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA"); - return LV_IMG_DECODER_OPEN_FAIL; -#endif - } else { - LV_LOG_WARN("Image decoder open: unknown color format") - return LV_IMG_DECODER_OPEN_FAIL; - } -} - -static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) -{ - /*Try to read the line with the custom functions*/ - if(decoder_custom) { - if(lv_img_decoder_read_line_custom) { - lv_res_t custom_res; - custom_res = lv_img_decoder_read_line_custom(x, y, len, buf); - return custom_res; - } else { - LV_LOG_WARN("Image open with custom decoder but read not supported") - } - return LV_RES_INV; /*It"s an error if not returned earlier*/ - } - - if(decoder_src_type == LV_IMG_SRC_FILE) { -#if LV_USE_FILESYSTEM - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); - - lv_fs_res_t res; - - if(decoder_header.cf == LV_IMG_CF_TRUE_COLOR || - decoder_header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - decoder_header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { - uint32_t pos = ((y * decoder_header.w + x) * px_size) >> 3; - pos += 4; /*Skip the header*/ - res = lv_fs_seek(&decoder_file, pos); - if(res != LV_FS_RES_OK) { - LV_LOG_WARN("Built-in image decoder seek failed"); - return false; - } - uint32_t btr = len * (px_size >> 3); - uint32_t br = 0; - lv_fs_read(&decoder_file, buf, btr, &br); - if(res != LV_FS_RES_OK || btr != br) { - LV_LOG_WARN("Built-in image decoder read failed"); - return false; - } - } else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { - - lv_img_built_in_decoder_line_alpha(x, y, len, buf); - } else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { - lv_img_built_in_decoder_line_indexed(x, y, len, buf); - } else { - LV_LOG_WARN("Built-in image decoder read not supports the color format"); - return false; - } -#else - LV_LOG_WARN("Image built-in decoder can't read file because LV_USE_FILESYSTEM = 0"); - return false; -#endif - } else if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; - - if(img_dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { - lv_img_built_in_decoder_line_alpha(x, y, len, buf); - } else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { - lv_img_built_in_decoder_line_indexed(x, y, len, buf); - } else { - LV_LOG_WARN("Built-in image decoder not supports the color format"); - return false; - } - } - - return true; -} - -static void lv_img_decoder_close(void) -{ - /*Try to close with the custom functions*/ - if(decoder_custom) { - if(lv_img_decoder_close_custom) lv_img_decoder_close_custom(); - return; - } - - /*It was opened with built-in decoder*/ - if(decoder_src) { -#if LV_USE_FILESYSTEM - if(decoder_src_type == LV_IMG_SRC_FILE) { - lv_fs_close(&decoder_file); - } -#endif - decoder_src_type = LV_IMG_SRC_UNKNOWN; - decoder_src = NULL; - } -} - -static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) -{ - -#if LV_IMG_CF_ALPHA - const lv_opa_t alpha1_opa_table[2] = { - 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ - const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ - const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, 136, 153, - 170, 187, 204, 221, 238, 255}; - - /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ - lv_color_t bg_color = decoder_style->image.color; - lv_coord_t i; - for(i = 0; i < len; i++) { -#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1 - buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full; -#elif LV_COLOR_DEPTH == 16 - /*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/ - buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full & 0xFF; - buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + 1] = (bg_color.full >> 8) & 0xFF; -#elif LV_COLOR_DEPTH == 32 - *((uint32_t *)&buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE]) = bg_color.full; -#else -#error "Invalid LV_COLOR_DEPTH. Check it in lv_conf.h" -#endif - } - - const lv_opa_t * opa_table = NULL; - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); - uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ - - lv_coord_t w = 0; - uint32_t ofs = 0; - int8_t pos = 0; - switch(decoder_header.cf) { - case LV_IMG_CF_ALPHA_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - pos = 7 - (x & 0x7); - opa_table = alpha1_opa_table; - break; - case LV_IMG_CF_ALPHA_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - pos = 6 - ((x & 0x3) * 2); - opa_table = alpha2_opa_table; - break; - case LV_IMG_CF_ALPHA_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - pos = 4 - ((x & 0x1) * 4); - opa_table = alpha4_opa_table; - break; - case LV_IMG_CF_ALPHA_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - pos = 0; - break; - } - -#if LV_USE_FILESYSTEM -#if LV_COMPILER_VLA_SUPPORTED - uint8_t fs_buf[w]; -#else - uint8_t fs_buf[LV_HOR_RES_MAX]; -#endif -#endif - const uint8_t * data_tmp = NULL; - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; - data_tmp = img_dsc->data + ofs; - } else { -#if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ - lv_fs_read(&decoder_file, fs_buf, w, NULL); - data_tmp = fs_buf; -#else - LV_LOG_WARN( - "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); - data_tmp = NULL; /*To avoid warnings*/ - return LV_RES_INV; -#endif - } - - uint8_t byte_act = 0; - uint8_t val_act; - for(i = 0; i < len; i++) { - val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; - - buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; - - pos -= px_size; - if(pos < 0) { - pos = 8 - px_size; - data_tmp++; - } - } - - return LV_RES_OK; - -#else - LV_LOG_WARN( - "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); - return LV_RES_INV; -#endif -} - -static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) -{ - -#if LV_IMG_CF_INDEXED - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); - uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ - - lv_coord_t w = 0; - int8_t pos = 0; - uint32_t ofs = 0; - switch(decoder_header.cf) { - case LV_IMG_CF_INDEXED_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - ofs += 8; /*Skip the palette*/ - pos = 7 - (x & 0x7); - break; - case LV_IMG_CF_INDEXED_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - ofs += 16; /*Skip the palette*/ - pos = 6 - ((x & 0x3) * 2); - break; - case LV_IMG_CF_INDEXED_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - ofs += 64; /*Skip the palette*/ - pos = 4 - ((x & 0x1) * 4); - break; - case LV_IMG_CF_INDEXED_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - ofs += 1024; /*Skip the palette*/ - pos = 0; - break; - } - -#if LV_USE_FILESYSTEM -#if LV_COMPILER_VLA_SUPPORTED - uint8_t fs_buf[w]; -#else - uint8_t fs_buf[LV_HOR_RES_MAX]; -#endif -#endif - const uint8_t * data_tmp = NULL; - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; - data_tmp = img_dsc->data + ofs; - } else { -#if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ - lv_fs_read(&decoder_file, fs_buf, w, NULL); - data_tmp = fs_buf; -#else - LV_LOG_WARN( - "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); - data_tmp = NULL; /*To avoid warnings*/ - return LV_RES_INV; -#endif - } - - uint8_t byte_act = 0; - uint8_t val_act; - lv_coord_t i; - lv_color_t * cbuf = (lv_color_t *)buf; - for(i = 0; i < len; i++) { - val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; - cbuf[i] = decoder_index_map[val_act]; - - pos -= px_size; - if(pos < 0) { - pos = 8 - px_size; - data_tmp++; - } - } - - return LV_RES_OK; -#else - LV_LOG_WARN( - "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); - return LV_RES_INV; -#endif -} diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 33d332d23636..43c1a13df6ae 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -15,108 +15,15 @@ extern "C" { *********************/ #include "lv_draw.h" #include "../lv_core/lv_obj.h" +#include "../lv_misc/lv_img_decoder.h" /********************* * DEFINES *********************/ -#define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)) /********************** * TYPEDEFS **********************/ -struct _lv_img_t; - -typedef struct -{ - - /* The first 8 bit is very important to distinguish the different source types. - * For more info see `lv_img_get_src_type()` in lv_img.c */ - uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/ - uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a - non-printable character*/ - - uint32_t reserved : 2; /*Reserved to be used later*/ - - uint32_t w : 11; /*Width of the image map*/ - uint32_t h : 11; /*Height of the image map*/ -} lv_img_header_t; - -/*Image color format*/ -enum { - LV_IMG_CF_UNKNOWN = 0, - - LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ - LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder - function*/ - LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs - custom decoder function*/ - - LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ - LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ - LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels - will be transparent*/ - - LV_IMG_CF_INDEXED_1BIT, /*Can have 2 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_2BIT, /*Can have 4 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_4BIT, /*Can have 16 different colors in a palette (always chroma keyed)*/ - LV_IMG_CF_INDEXED_8BIT, /*Can have 256 different colors in a palette (always chroma keyed)*/ - - LV_IMG_CF_ALPHA_1BIT, /*Can have one color and it can be drawn or not*/ - LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/ - LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/ - LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/ -}; -typedef uint8_t lv_img_cf_t; - -/* Image header it is compatible with - * the result image converter utility*/ -typedef struct -{ - lv_img_header_t header; - uint32_t data_size; - const uint8_t * data; -} lv_img_dsc_t; - -/* Decoder function definitions */ - -/** - * Get info from an image and store in the `header` - * @param src the image source. Can be a pointer to a C array or a file name (Use - * `lv_img_src_get_type` to determine the type) - * @param header store the info here - * @return LV_RES_OK: info written correctly; LV_RES_INV: failed - */ -typedef lv_res_t (*lv_img_decoder_info_f_t)(const void * src, lv_img_header_t * header); - -/** - * Open an image for decoding. Prepare it as it is required to read it later - * @param src the image source. Can be a pointer to a C array or a file name (Use - * `lv_img_src_get_type` to determine the type) - * @param style the style of image (maybe it will be required to determine a color or something) - * @return there are 3 possible return values: - * 1) buffer with the decoded image - * 2) if can decode the whole image NULL. decoder_read_line will be called to read the image - * line-by-line 3) LV_IMG_DECODER_OPEN_FAIL if the image format is unknown to the decoder or an - * error occurred - */ -typedef const uint8_t * (*lv_img_decoder_open_f_t)(const void * src, const lv_style_t * style); - -/** - * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`. - * Required only if the "open" function can't return with the whole decoded pixel array. - * @param x start x coordinate - * @param y startt y coordinate - * @param len number of pixels to decode - * @param buf a buffer to store the decoded pixels - * @return LV_RES_OK: ok; LV_RES_INV: failed - */ -typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf); - -/** - * Close the pending decoding. Free resources etc. - */ -typedef void (*lv_img_decoder_close_f_t)(void); /********************** * GLOBAL PROTOTYPES diff --git a/src/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h index 97aeb6b7963c..ac9d93f3d006 100644 --- a/src/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -37,6 +37,7 @@ extern "C" { prefix lv_ll_t _lv_file_ll; \ prefix lv_ll_t _lv_anim_ll; \ prefix lv_ll_t _lv_group_ll; \ + prefix lv_ll_t _lv_img_defoder_ll; \ prefix void * _lv_task_act; #define LV_NO_PREFIX diff --git a/src/lv_misc/lv_img_decoder.c b/src/lv_misc/lv_img_decoder.c new file mode 100644 index 000000000000..d0a0454077d9 --- /dev/null +++ b/src/lv_misc/lv_img_decoder.c @@ -0,0 +1,587 @@ +/** + * @file lv_img_decoder.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_img_decoder.h" +#include "lv_ll.h" + +#if defined(LV_GC_INCLUDE) +#include LV_GC_INCLUDE +#endif /* LV_ENABLE_GC */ + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ +/** + * Initialize the image decoder module + * */ +void lv_img_decoder_init(void) +{ + lv_ll_init(&LV_GC_ROOT(_lv_img_defoder_ll), sizeof(lv_img_decoder_t)); + + lv_img_decoder_t decoder; + + /*Create a decoder for true color images*/ + decoder = lv_img_decoder_craete(); + if(decoder) return; + + /*Create a decoder for Alpha indexed images*/ + decoder = lv_img_decoder_craete(); + if(decoder) return; + + /*Create a decoder for color indexed images*/ + decoder = lv_img_decoder_craete(); + if(decoder) return; + +} + +lv_img_decoder_t * lv_img_decoder_craete(void) +{ + lv_img_decoder_t * decoder; + decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll)); + lv_mem_assert(decoder); + + return decoder; +} + +void lv_img_decoder_delete(lv_img_decoder_t * decoder) +{ + lv_ll_rem(&LV_GC_ROOT(_lv_img_defoder_ll), decoder); + lv_mem_free(decoder); +} + +void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb) +{ + decoder->info_cb = info_cb; +} + +void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb) +{ + decoder->open_cb = open_cb; +} + +void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb) +{ + decoder->read_line_cb = read_line_cb; +} + +void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb) +{ + decoder->read_line_cb = close_cb; +} + +void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data) +{ + memcpy(&decoder->user_data, &user_data, sizeof(user_data)); +} + +lv_img_decoder_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder) +{ + return decoder->user_data; +} + +lv_img_decoder_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder) +{ + return &decoder->user_data; +} + + +lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) +{ + header->always_zero = 0; + + lv_res_t res; + lv_img_decoder_t * d; + LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) { + res = LV_RES_INV; + if(d->info_cb) { + res = d->info_cb(d, src, header); + if(res == LV_RES_OK) break; + } + } + + return res; +} + + +const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style) +{ + dsc->style = style; + dsc->src = src; + dsc->src_type = lv_img_src_get_type(src); + + lv_res_t header_res; + header_res = lv_img_decoder_get_info(src, &dsc->header); + if(header_res != LV_RES_OK) return LV_IMG_DECODER_OPEN_FAIL; + + const uint8_t * res = NULL; + lv_img_decoder_t * d; + LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) { + res = NULL; + dsc->decoder = d; + if(d->open_cb) res = d->open_cb(d, dsc); + + if(res != LV_IMG_DECODER_OPEN_FAIL) break; + } +} + +static lv_res_t lv_img_decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +{ + lv_res_t res = LV_RES_INV; + if(decoder->read_line_cb)res = decoder->read_line_cb(decoder, dsc, x, y, len, buf); + + return res; +} + +static void lv_img_decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +{ + if(decoder->close_cb) decoder->close_cb(decoder, dsc); +} + + +static lv_res_t img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +{ + lv_img_src_t src_type = lv_img_src_get_type(src); + if(src_type == LV_IMG_SRC_VARIABLE) { + header->w = ((lv_img_dsc_t *)src)->header.w; + header->h = ((lv_img_dsc_t *)src)->header.h; + header->cf = ((lv_img_dsc_t *)src)->header.cf; + } + #if LV_USE_FILESYSTEM + else if(src_type == LV_IMG_SRC_FILE) { + lv_fs_file_t file; + lv_fs_res_t res; + uint32_t rn; + res = lv_fs_open(&file, src, LV_FS_MODE_RD); + if(res == LV_FS_RES_OK) { + res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn); + lv_fs_close(&file); + } + + /*Create a dummy header on fs error*/ + if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { + header->w = LV_DPI; + header->h = LV_DPI; + header->cf = LV_IMG_CF_UNKNOWN; + return LV_RES_INV; + } + } + #endif + else if(src_type == LV_IMG_SRC_SYMBOL) { + /*The size depend on the font but it is unknown here. It should be handled outside of the + * function*/ + header->w = 1; + header->h = 1; + /* Symbols always have transparent parts. Important because of cover check in the design + * function. The actual value doesn't matter because lv_draw_label will draw it*/ + header->cf = LV_IMG_CF_ALPHA_1BIT; + } else { + LV_LOG_WARN("Image get info found unknown src type"); + return LV_RES_INV; + } + return LV_RES_OK; +} + +static uint8_t * img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc,) +{ + if(header_res == LV_RES_INV) { + decoder_src = NULL; + decoder_src_type = LV_IMG_SRC_UNKNOWN; + LV_LOG_WARN("Built-in image decoder can't get the header info"); + return LV_IMG_DECODER_OPEN_FAIL; + } + + /*Open the file if it's a file*/ + if(decoder_src_type == LV_IMG_SRC_FILE) { +#if LV_USE_FILESYSTEM + lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD); + if(res != LV_FS_RES_OK) { + LV_LOG_WARN("Built-in image decoder can't open the file"); + return LV_IMG_DECODER_OPEN_FAIL; + } +#else + LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); + return LV_IMG_DECODER_OPEN_FAIL; +#endif + } + + /*Process the different color formats*/ + lv_img_cf_t cf = decoder_header.cf; + if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + if(decoder_src_type == LV_IMG_SRC_VARIABLE) { + /*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's + * pointer*/ + return ((lv_img_dsc_t *)decoder_src)->data; + } else { + /*If it's file it need to be read line by line later*/ + return NULL; + } + } else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || + cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { + +#if LV_IMG_CF_INDEXED +#if LV_USE_FILESYSTEM + lv_color32_t palette_file[256]; +#endif + + lv_color32_t * palette_p = NULL; + uint8_t px_size = lv_img_color_format_get_px_size(cf); + uint32_t palette_size = 1 << px_size; + + if(decoder_src_type == LV_IMG_SRC_FILE) { + /*Read the palette from file*/ +#if LV_USE_FILESYSTEM + lv_fs_seek(&decoder_file, 4); /*Skip the header*/ + lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); + palette_p = palette_file; +#else + LV_LOG_WARN( + "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); + return LV_IMG_DECODER_OPEN_FAIL; +#endif + } else { + /*The palette begins in the beginning of the image data. Just point to it.*/ + palette_p = (lv_color32_t *)((lv_img_dsc_t *)decoder_src)->data; + } + + uint32_t i; + for(i = 0; i < palette_size; i++) { + decoder_index_map[i] = + lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); + } + return NULL; +#else + LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED"); + return LV_IMG_DECODER_OPEN_FAIL; +#endif + } else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || + cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { +#if LV_IMG_CF_ALPHA + return NULL; /*Nothing to process*/ +#else + LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA"); + return LV_IMG_DECODER_OPEN_FAIL; +#endif + } else { + LV_LOG_WARN("Image decoder open: unknown color format") + return LV_IMG_DECODER_OPEN_FAIL; + } +} + + +static lv_res_t lv_img_decoder_built_in_line_read(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) +{ + if(dsc->src_type == LV_IMG_SRC_FILE) { + #if LV_USE_FILESYSTEM + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); + + lv_fs_res_t res; + + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + uint32_t pos = ((y * dsc->header.w + x) * px_size) >> 3; + pos += 4; /*Skip the header*/ + res = lv_fs_seek(&decoder_file, pos); + if(res != LV_FS_RES_OK) { + LV_LOG_WARN("Built-in image decoder seek failed"); + return false; + } + uint32_t btr = len * (px_size >> 3); + uint32_t br = 0; + lv_fs_read(&decoder_file, buf, btr, &br); + if(res != LV_FS_RES_OK || btr != br) { + LV_LOG_WARN("Built-in image decoder read failed"); + return false; + } + } else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { + + lv_img_built_in_decoder_line_alpha(x, y, len, buf); + } else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || + decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { + lv_img_built_in_decoder_line_indexed(x, y, len, buf); + } else { + LV_LOG_WARN("Built-in image decoder read not supports the color format"); + return false; + } + #else + LV_LOG_WARN("Image built-in decoder can't read file because LV_USE_FILESYSTEM = 0"); + return false; + #endif + } else if(decoder_src_type == LV_IMG_SRC_VARIABLE) { + const lv_img_dsc_t * img_dsc = decoder_src; + + if(img_dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || + img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || + img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + lv_img_built_in_decoder_line_alpha(x, y, len, buf); + } else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || + img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + lv_img_built_in_decoder_line_indexed(x, y, len, buf); + } else { + LV_LOG_WARN("Built-in image decoder not supports the color format"); + return false; + } + } + + return true; +} + +static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +{ + + /*It was opened with built-in decoder*/ + if(decoder_src) { +#if LV_USE_FILESYSTEM + if(decoder_src_type == LV_IMG_SRC_FILE) { + lv_fs_close(&decoder_file); + } +#endif + decoder_src_type = LV_IMG_SRC_UNKNOWN; + decoder_src = NULL; + } +} + + +static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) +{ + +#if LV_IMG_CF_ALPHA + const lv_opa_t alpha1_opa_table[2] = { + 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, 136, 153, + 170, 187, 204, 221, 238, 255}; + + /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ + lv_color_t bg_color = decoder_style->image.color; + lv_coord_t i; + for(i = 0; i < len; i++) { +#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1 + buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full; +#elif LV_COLOR_DEPTH == 16 + /*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/ + buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full & 0xFF; + buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + 1] = (bg_color.full >> 8) & 0xFF; +#elif LV_COLOR_DEPTH == 32 + *((uint32_t *)&buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE]) = bg_color.full; +#else +#error "Invalid LV_COLOR_DEPTH. Check it in lv_conf.h" +#endif + } + + const lv_opa_t * opa_table = NULL; + uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); + uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ + + lv_coord_t w = 0; + uint32_t ofs = 0; + int8_t pos = 0; + switch(decoder_header.cf) { + case LV_IMG_CF_ALPHA_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + pos = 7 - (x & 0x7); + opa_table = alpha1_opa_table; + break; + case LV_IMG_CF_ALPHA_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + pos = 6 - ((x & 0x3) * 2); + opa_table = alpha2_opa_table; + break; + case LV_IMG_CF_ALPHA_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + pos = 4 - ((x & 0x1) * 4); + opa_table = alpha4_opa_table; + break; + case LV_IMG_CF_ALPHA_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + pos = 0; + break; + } + +#if LV_USE_FILESYSTEM +#if LV_COMPILER_VLA_SUPPORTED + uint8_t fs_buf[w]; +#else + uint8_t fs_buf[LV_HOR_RES_MAX]; +#endif +#endif + const uint8_t * data_tmp = NULL; + if(decoder_src_type == LV_IMG_SRC_VARIABLE) { + const lv_img_dsc_t * img_dsc = decoder_src; + data_tmp = img_dsc->data + ofs; + } else { +#if LV_USE_FILESYSTEM + lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ + lv_fs_read(&decoder_file, fs_buf, w, NULL); + data_tmp = fs_buf; +#else + LV_LOG_WARN( + "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); + data_tmp = NULL; /*To avoid warnings*/ + return LV_RES_INV; +#endif + } + + uint8_t byte_act = 0; + uint8_t val_act; + for(i = 0; i < len; i++) { + val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; + + buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = + decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; + + pos -= px_size; + if(pos < 0) { + pos = 8 - px_size; + data_tmp++; + } + } + + return LV_RES_OK; + +#else + LV_LOG_WARN( + "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); + return LV_RES_INV; +#endif +} + +static lv_res_t lv_img_built_in_decoder_line_indexed(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) +{ + +#if LV_IMG_CF_INDEXED + uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); + uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ + + lv_coord_t w = 0; + int8_t pos = 0; + uint32_t ofs = 0; + switch(decoder_header.cf) { + case LV_IMG_CF_INDEXED_1BIT: + w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(decoder_header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + ofs += 8; /*Skip the palette*/ + pos = 7 - (x & 0x7); + break; + case LV_IMG_CF_INDEXED_2BIT: + w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(decoder_header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + ofs += 16; /*Skip the palette*/ + pos = 6 - ((x & 0x3) * 2); + break; + case LV_IMG_CF_INDEXED_4BIT: + w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(decoder_header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + ofs += 64; /*Skip the palette*/ + pos = 4 - ((x & 0x1) * 4); + break; + case LV_IMG_CF_INDEXED_8BIT: + w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + ofs += 1024; /*Skip the palette*/ + pos = 0; + break; + } + +#if LV_USE_FILESYSTEM +#if LV_COMPILER_VLA_SUPPORTED + uint8_t fs_buf[w]; +#else + uint8_t fs_buf[LV_HOR_RES_MAX]; +#endif +#endif + const uint8_t * data_tmp = NULL; + if(decoder_src_type == LV_IMG_SRC_VARIABLE) { + const lv_img_dsc_t * img_dsc = decoder_src; + data_tmp = img_dsc->data + ofs; + } else { +#if LV_USE_FILESYSTEM + lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ + lv_fs_read(&decoder_file, fs_buf, w, NULL); + data_tmp = fs_buf; +#else + LV_LOG_WARN( + "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); + data_tmp = NULL; /*To avoid warnings*/ + return LV_RES_INV; +#endif + } + + uint8_t byte_act = 0; + uint8_t val_act; + lv_coord_t i; + lv_color_t * cbuf = (lv_color_t *)buf; + for(i = 0; i < len; i++) { + val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; + cbuf[i] = decoder_index_map[val_act]; + + pos -= px_size; + if(pos < 0) { + pos = 8 - px_size; + data_tmp++; + } + } + + return LV_RES_OK; +#else + LV_LOG_WARN( + "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); + return LV_RES_INV; +#endif +} + + + + +/********************** + * STATIC FUNCTIONS + **********************/ diff --git a/src/lv_misc/lv_img_decoder.h b/src/lv_misc/lv_img_decoder.h new file mode 100644 index 000000000000..7432a4342784 --- /dev/null +++ b/src/lv_misc/lv_img_decoder.h @@ -0,0 +1,165 @@ +/** + * @file lv_img_decoder.h + * + */ + +#ifndef LV_IMG_DEOCER_H +#define LV_IMG_DEOCER_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif + +#include +#include "lv_fs.h" + +/********************* + * DEFINES + *********************/ +#define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)); + +/********************** + * TYPEDEFS + **********************/ +typedef struct +{ + + /* The first 8 bit is very important to distinguish the different source types. + * For more info see `lv_img_get_src_type()` in lv_img.c */ + uint32_t cf : 5; /* Color format: See `lv_img_color_format_t`*/ + uint32_t always_zero : 3; /*It the upper bits of the first byte. Always zero to look like a + non-printable character*/ + + uint32_t reserved : 2; /*Reserved to be used later*/ + + uint32_t w : 11; /*Width of the image map*/ + uint32_t h : 11; /*Height of the image map*/ +} lv_img_header_t; + +/*Image color format*/ +enum { + LV_IMG_CF_UNKNOWN = 0, + + LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ + LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder + function*/ + LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs + custom decoder function*/ + + LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ + LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ + LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels + will be transparent*/ + + LV_IMG_CF_INDEXED_1BIT, /*Can have 2 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_2BIT, /*Can have 4 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_4BIT, /*Can have 16 different colors in a palette (always chroma keyed)*/ + LV_IMG_CF_INDEXED_8BIT, /*Can have 256 different colors in a palette (always chroma keyed)*/ + + LV_IMG_CF_ALPHA_1BIT, /*Can have one color and it can be drawn or not*/ + LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/ + LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/ + LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/ +}; +typedef uint8_t lv_img_cf_t; + +/* Image header it is compatible with + * the result image converter utility*/ +typedef struct +{ + lv_img_header_t header; + uint32_t data_size; + const uint8_t * data; +} lv_img_dsc_t; + +/* Decoder function definitions */ + +struct _lv_img_decoder; +struct _lv_img_decoder_dsc; + +/** + * Get info from an image and store in the `header` + * @param src the image source. Can be a pointer to a C array or a file name (Use + * `lv_img_src_get_type` to determine the type) + * @param header store the info here + * @return LV_RES_OK: info written correctly; LV_RES_INV: failed + */ +typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src, lv_img_header_t * header); + +/** + * Open an image for decoding. Prepare it as it is required to read it later + * @param src the image source. Can be a pointer to a C array or a file name (Use + * `lv_img_src_get_type` to determine the type) + * @param style the style of image (maybe it will be required to determine a color or something) + * @return there are 3 possible return values: + * 1) buffer with the decoded image + * 2) if can decode the whole image NULL. decoder_read_line will be called to read the image + * line-by-line + * 3) LV_IMG_DECODER_OPEN_FAIL if the image format is unknown to the decoder or an + * error occurred + */ +typedef const uint8_t * (*lv_img_decoder_open_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); + +/** + * Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`. + * Required only if the "open" function can't return with the whole decoded pixel array. + * @param x start x coordinate + * @param y start y coordinate + * @param len number of pixels to decode + * @param buf a buffer to store the decoded pixels + * @return LV_RES_OK: ok; LV_RES_INV: failed + */ +typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc, + lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); + +/** + * Close the pending decoding. Free resources etc. + */ +typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); + +typedef struct _lv_img_decoder_dsc { + lv_img_decoder_info_f_t info_cb; + lv_img_decoder_open_f_t open_cb; + lv_img_decoder_read_line_f_t read_line_cb; + lv_img_decoder_close_f_t close_cb; + +#if LV_USE_USER_DATA_SINGLE + lv_img_decoder_user_data_t user_data; +#endif +}lv_img_decoder_t; + + +typedef struct { + lv_img_decoder_t * decoder; + const lv_style_t * style; + const void * src; + lv_img_src_t src_type; + lv_img_header_t header; + +#if LV_USE_USER_DATA_SINGLE + void * user_data; +#endif +}lv_img_decoder_dsc_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * MACROS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_TEMPL_H*/ From 3a78360b623b12c3a81ecfbf7cbfdb0cb3b58e15 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 14 May 2019 06:47:30 +0200 Subject: [PATCH 387/590] lv_indev: do not leave edit mode manually on POINTER release --- src/lv_core/lv_indev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 416937af8cee..7fc131c9e581 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -876,12 +876,8 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(proc->reset_query != 0) return; - /*Handle click focus*/ + /*Handle click focus*/ #if LV_USE_GROUP - /*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/ - lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); - if(lv_group_get_editing(g)) lv_group_set_editing(g, false); - /*Check, if the parent is in a group focus on it.*/ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click focus protection*/ From 5afe9c119a1e86fb15e1655e3728385f8398df17 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 14 May 2019 07:19:00 +0200 Subject: [PATCH 388/590] lv_indev fix --- src/lv_core/lv_indev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 7fc131c9e581..e89166f078b3 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -878,6 +878,10 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Handle click focus*/ #if LV_USE_GROUP + /* Edit mode is not used by POINTER devices. + * So leave edit mode if the focused object is still `act_obj`*/ + lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); + /*Check, if the parent is in a group focus on it.*/ if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click focus protection*/ From 72fb15c3fb35f5a559ef6bea5d73f7bda17cd72d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 14 May 2019 07:19:56 +0200 Subject: [PATCH 389/590] comment updates --- src/lv_core/lv_indev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index e89166f078b3..82d7882259f0 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -878,8 +878,6 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Handle click focus*/ #if LV_USE_GROUP - /* Edit mode is not used by POINTER devices. - * So leave edit mode if the focused object is still `act_obj`*/ lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); /*Check, if the parent is in a group focus on it.*/ From f706de55170e876140a1436406b8d11f58599160 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 14 May 2019 15:45:03 +0200 Subject: [PATCH 390/590] img_decoder is working (not fully tested yet) --- src/lv_core/lv_obj.c | 3 + src/lv_core/lv_obj.h | 8 +- src/lv_draw/lv_draw.h | 16 +- src/lv_draw/lv_draw_img.c | 14 +- src/lv_draw/lv_draw_img.h | 8 - src/lv_misc/lv_img_decoder.c | 559 +++++++++++++++++++---------------- src/lv_misc/lv_img_decoder.h | 56 +++- src/lv_misc/lv_types.h | 44 +++ src/lv_objx/lv_img.c | 3 +- src/lv_objx/lv_imgbtn.c | 2 +- 10 files changed, 421 insertions(+), 292 deletions(-) create mode 100644 src/lv_misc/lv_types.h diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 8ef301738392..9ebd4964e7e4 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -16,6 +16,7 @@ #include "../lv_misc/lv_anim.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_fs.h" +#include "../lv_misc/lv_img_decoder.h" #include "../lv_hal/lv_hal.h" #include #include @@ -109,6 +110,8 @@ void lv_init(void) /*Init the input device handling*/ lv_indev_init(); + lv_img_decoder_init(); + lv_initialized = true; LV_LOG_INFO("lv_init ready"); } diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 0e84850304fb..19a2d9522f0c 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -22,6 +22,7 @@ extern "C" { #include #include #include "lv_style.h" +#include "../lv_misc/lv_types.h" #include "../lv_misc/lv_area.h" #include "../lv_misc/lv_mem.h" #include "../lv_misc/lv_ll.h" @@ -64,13 +65,6 @@ typedef uint8_t lv_design_mode_t; typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); -enum { - LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action - function or an operation was failed*/ - LV_RES_OK, /*The object is valid (no deleted) after the action*/ -}; -typedef uint8_t lv_res_t; - enum { LV_EVENT_PRESSED, /*The object has been pressed*/ LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index 0d346653af33..1828e32c21a0 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -21,30 +21,16 @@ extern "C" { #include "../lv_core/lv_style.h" #include "../lv_misc/lv_txt.h" +#include "../lv_misc/lv_img_decoder.h" /********************* * DEFINES *********************/ -/*If image pixels contains alpha we need to know how much byte is a pixel*/ -#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 2 -#elif LV_COLOR_DEPTH == 16 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 3 -#elif LV_COLOR_DEPTH == 32 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 4 -#endif /********************** * TYPEDEFS **********************/ -enum { - LV_IMG_SRC_VARIABLE, - LV_IMG_SRC_FILE, - LV_IMG_SRC_SYMBOL, - LV_IMG_SRC_UNKNOWN, -}; -typedef uint8_t lv_img_src_t; /********************** * GLOBAL PROTOTYPES diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index ebc9b0e3ef1a..0986f1af4969 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -452,20 +452,20 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas lv_img_header_t header; lv_res_t header_res; - header_res = lv_img_dsc_get_info(src, &header); + header_res = lv_img_decoder_get_info(src, &header); if(header_res != LV_RES_OK) { LV_LOG_WARN("Image draw can't get image info"); - lv_img_decoder_close(); return LV_RES_INV; } bool chroma_keyed = lv_img_color_format_is_chroma_keyed(header.cf); bool alpha_byte = lv_img_color_format_has_alpha(header.cf); - const uint8_t * img_data = lv_img_decoder_open(src, style); + lv_img_decoder_dsc_t dsc; + const uint8_t * img_data = lv_img_decoder_open(&dsc, src, style); if(img_data == LV_IMG_DECODER_OPEN_FAIL) { LV_LOG_WARN("Image draw cannot open the image resource"); - lv_img_decoder_close(); + lv_img_decoder_close(&dsc); return LV_RES_INV; } @@ -493,9 +493,9 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas lv_coord_t row; lv_res_t read_res; for(row = mask_com.y1; row <= mask_com.y2; row++) { - read_res = lv_img_decoder_read_line(x, y, width, buf); + read_res = lv_img_decoder_read_line(&dsc, x, y, width, buf); if(read_res != LV_RES_OK) { - lv_img_decoder_close(); + lv_img_decoder_close(&dsc); LV_LOG_WARN("Image draw can't read the line"); return LV_RES_INV; } @@ -507,7 +507,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas } } - lv_img_decoder_close(); + lv_img_decoder_close(&dsc); return LV_RES_OK; } diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 43c1a13df6ae..446b2c30239e 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -40,14 +40,6 @@ extern "C" { void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style, lv_opa_t opa_scale); -/** - * Initialize and `lv_img_dsc_t` variable with the image's info - * @param src variable, filename or symbol - * @param header store the result here - * @return LV_RES_OK: succeeded; LV_RES_INV: failed - */ -lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header); - /** * Get the type of an image source * @param src pointer to an image source: diff --git a/src/lv_misc/lv_img_decoder.c b/src/lv_misc/lv_img_decoder.c index d0a0454077d9..a18a9a28b1af 100644 --- a/src/lv_misc/lv_img_decoder.c +++ b/src/lv_misc/lv_img_decoder.c @@ -7,7 +7,10 @@ * INCLUDES *********************/ #include "lv_img_decoder.h" +#include "../lv_draw/lv_draw_img.h" #include "lv_ll.h" +#include "lv_color.h" +#include "lv_gc.h" #if defined(LV_GC_INCLUDE) #include LV_GC_INCLUDE @@ -20,11 +23,29 @@ /********************** * TYPEDEFS **********************/ +typedef struct { + lv_fs_file_t * f; + lv_color_t * palette; +}lv_img_decoder_built_in_data_t; + /********************** * STATIC PROTOTYPES **********************/ +static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); +static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, + lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); +static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, + lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); +static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); + + /********************** * STATIC VARIABLES **********************/ @@ -36,6 +57,7 @@ /********************** * GLOBAL FUNCTIONS **********************/ + /** * Initialize the image decoder module * */ @@ -43,27 +65,30 @@ void lv_img_decoder_init(void) { lv_ll_init(&LV_GC_ROOT(_lv_img_defoder_ll), sizeof(lv_img_decoder_t)); - lv_img_decoder_t decoder; - - /*Create a decoder for true color images*/ - decoder = lv_img_decoder_craete(); - if(decoder) return; - - /*Create a decoder for Alpha indexed images*/ - decoder = lv_img_decoder_craete(); - if(decoder) return; + lv_img_decoder_t * decoder; - /*Create a decoder for color indexed images*/ - decoder = lv_img_decoder_craete(); - if(decoder) return; + /*Create a decoder for the built in color format*/ + decoder = lv_img_decoder_create(); + if(decoder == NULL) { + LV_LOG_WARN("lv_img_decoder_init: out of memory"); + lv_mem_assert(decoder); + return; + } + lv_img_decoder_set_info_cb(decoder, lv_img_decoder_built_in_info); + lv_img_decoder_set_open_cb(decoder, lv_img_decoder_built_in_open); + lv_img_decoder_set_read_line_cb(decoder, lv_img_decoder_built_in_read_line); + lv_img_decoder_set_close_cb(decoder, lv_img_decoder_built_in_close); } -lv_img_decoder_t * lv_img_decoder_craete(void) +lv_img_decoder_t * lv_img_decoder_create(void) { lv_img_decoder_t * decoder; decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll)); lv_mem_assert(decoder); + if(decoder == NULL) return NULL; + + memset(decoder, 0, sizeof(lv_img_decoder_t)); return decoder; } @@ -91,7 +116,7 @@ void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_ void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb) { - decoder->read_line_cb = close_cb; + decoder->close_cb = close_cb; } void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data) @@ -99,17 +124,16 @@ void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t u memcpy(&decoder->user_data, &user_data, sizeof(user_data)); } -lv_img_decoder_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder) +lv_img_decoder_user_data_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder) { return decoder->user_data; } -lv_img_decoder_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder) +lv_img_decoder_user_data_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder) { return &decoder->user_data; } - lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) { header->always_zero = 0; @@ -127,12 +151,12 @@ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) return res; } - const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style) { dsc->style = style; dsc->src = src; dsc->src_type = lv_img_src_get_type(src); + dsc->user_data = NULL; lv_res_t header_res; header_res = lv_img_decoder_get_info(src, &dsc->header); @@ -147,251 +171,287 @@ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src if(res != LV_IMG_DECODER_OPEN_FAIL) break; } + + return res; } -static lv_res_t lv_img_decoder_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { lv_res_t res = LV_RES_INV; - if(decoder->read_line_cb)res = decoder->read_line_cb(decoder, dsc, x, y, len, buf); + if(dsc->decoder->read_line_cb)res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf); return res; } -static void lv_img_decoder_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) +void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc) { - if(decoder->close_cb) decoder->close_cb(decoder, dsc); + if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc); } -static lv_res_t img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) +/********************** + * STATIC FUNCTIONS + **********************/ + + +static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) { lv_img_src_t src_type = lv_img_src_get_type(src); - if(src_type == LV_IMG_SRC_VARIABLE) { - header->w = ((lv_img_dsc_t *)src)->header.w; - header->h = ((lv_img_dsc_t *)src)->header.h; - header->cf = ((lv_img_dsc_t *)src)->header.cf; + if(src_type == LV_IMG_SRC_VARIABLE) { + header->w = ((lv_img_dsc_t *)src)->header.w; + header->h = ((lv_img_dsc_t *)src)->header.h; + header->cf = ((lv_img_dsc_t *)src)->header.cf; + } +#if LV_USE_FILESYSTEM + else if(src_type == LV_IMG_SRC_FILE) { + lv_fs_file_t file; + lv_fs_res_t res; + uint32_t rn; + res = lv_fs_open(&file, src, LV_FS_MODE_RD); + if(res == LV_FS_RES_OK) { + res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn); + lv_fs_close(&file); } - #if LV_USE_FILESYSTEM - else if(src_type == LV_IMG_SRC_FILE) { - lv_fs_file_t file; - lv_fs_res_t res; - uint32_t rn; - res = lv_fs_open(&file, src, LV_FS_MODE_RD); - if(res == LV_FS_RES_OK) { - res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn); - lv_fs_close(&file); - } - /*Create a dummy header on fs error*/ - if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { - header->w = LV_DPI; - header->h = LV_DPI; - header->cf = LV_IMG_CF_UNKNOWN; - return LV_RES_INV; - } - } - #endif - else if(src_type == LV_IMG_SRC_SYMBOL) { - /*The size depend on the font but it is unknown here. It should be handled outside of the - * function*/ - header->w = 1; - header->h = 1; - /* Symbols always have transparent parts. Important because of cover check in the design - * function. The actual value doesn't matter because lv_draw_label will draw it*/ - header->cf = LV_IMG_CF_ALPHA_1BIT; - } else { - LV_LOG_WARN("Image get info found unknown src type"); + /*Create a dummy header on fs error*/ + if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) { + header->w = LV_DPI; + header->h = LV_DPI; + header->cf = LV_IMG_CF_UNKNOWN; return LV_RES_INV; } - return LV_RES_OK; + } +#endif + else if(src_type == LV_IMG_SRC_SYMBOL) { + /*The size depend on the font but it is unknown here. It should be handled outside of the + * function*/ + header->w = 1; + header->h = 1; + /* Symbols always have transparent parts. Important because of cover check in the design + * function. The actual value doesn't matter because lv_draw_label will draw it*/ + header->cf = LV_IMG_CF_ALPHA_1BIT; + } else { + LV_LOG_WARN("Image get info found unknown src type"); + return LV_RES_INV; + } + return LV_RES_OK; } -static uint8_t * img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc,) +static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) { - if(header_res == LV_RES_INV) { - decoder_src = NULL; - decoder_src_type = LV_IMG_SRC_UNKNOWN; - LV_LOG_WARN("Built-in image decoder can't get the header info"); - return LV_IMG_DECODER_OPEN_FAIL; - } - /*Open the file if it's a file*/ - if(decoder_src_type == LV_IMG_SRC_FILE) { + if(dsc->src_type == LV_IMG_SRC_FILE) { #if LV_USE_FILESYSTEM - lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD); + lv_fs_file_t f; + lv_fs_res_t res = lv_fs_open(&f, dsc->src, LV_FS_MODE_RD); if(res != LV_FS_RES_OK) { LV_LOG_WARN("Built-in image decoder can't open the file"); return LV_IMG_DECODER_OPEN_FAIL; } + + /*If the file was open successfully save the file descriptor*/ + if(dsc->user_data == NULL) { + dsc->user_data = lv_mem_alloc(sizeof(lv_img_decoder_built_in_data_t)); + if(dsc->user_data == NULL) { + LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); + lv_mem_assert(dsc->user_data); + } + memset(dsc->user_data, 0, sizeof(lv_img_decoder_built_in_data_t)); + } + + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; + user_data->f = lv_mem_alloc(sizeof(f)); + if(user_data->f == NULL) { + LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); + lv_mem_assert(user_data->f); + } + + memcpy(user_data->f, &f, sizeof(f)); + #else LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } - /*Process the different color formats*/ - lv_img_cf_t cf = decoder_header.cf; + lv_img_cf_t cf = dsc->header.cf; + /*Process true color formats*/ if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - /*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's - * pointer*/ - return ((lv_img_dsc_t *)decoder_src)->data; + cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + /* In case of uncompressed formats the image stored in the ROM/RAM. + * So simply give its pointer*/ + return ((lv_img_dsc_t *)dsc->src)->data; } else { - /*If it's file it need to be read line by line later*/ + /*If it's a file it need to be read line by line later*/ return NULL; } - } else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || - cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { + } + /*Process indexed images. Build a palette*/ + else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || + cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED -#if LV_USE_FILESYSTEM - lv_color32_t palette_file[256]; -#endif - - lv_color32_t * palette_p = NULL; uint8_t px_size = lv_img_color_format_get_px_size(cf); uint32_t palette_size = 1 << px_size; - if(decoder_src_type == LV_IMG_SRC_FILE) { + /*Allocate the palette*/ + if(dsc->user_data == NULL) { + dsc->user_data = lv_mem_alloc(sizeof(lv_img_decoder_built_in_data_t)); + if(dsc->user_data == NULL) { + LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); + lv_mem_assert(dsc->user_data); + } + memset(dsc->user_data, 0, sizeof(lv_img_decoder_built_in_data_t)); + } + + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; + user_data->palette = lv_mem_alloc(sizeof(palette_size * sizeof(lv_color_t))); + if(user_data->palette == NULL) { + LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); + lv_mem_assert(user_data->f); + } +#if LV_USE_FILESYSTEM + lv_color32_t palette_tmp[256]; +#endif + lv_color32_t * palette_p; + + if(dsc->src_type == LV_IMG_SRC_FILE) { /*Read the palette from file*/ #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, 4); /*Skip the header*/ - lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL); - palette_p = palette_file; + lv_fs_seek(user_data->f, 4); /*Skip the header*/ + lv_fs_read(user_data->f, palette_tmp, palette_size * sizeof(lv_color_t), NULL); + palette_p = palette_tmp; #else LV_LOG_WARN( - "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); + "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { /*The palette begins in the beginning of the image data. Just point to it.*/ - palette_p = (lv_color32_t *)((lv_img_dsc_t *)decoder_src)->data; + palette_p = (lv_color32_t *)((lv_img_dsc_t *)dsc->src)->data; } uint32_t i; for(i = 0; i < palette_size; i++) { - decoder_index_map[i] = - lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); + user_data->palette[i] = lv_color_make(palette_p[i].ch.red, palette_p[i].ch.green, palette_p[i].ch.blue); } return NULL; #else LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED"); return LV_IMG_DECODER_OPEN_FAIL; #endif - } else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || - cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { + } + /*Alpha indexed images. */ + else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || + cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { #if LV_IMG_CF_ALPHA return NULL; /*Nothing to process*/ #else LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA"); return LV_IMG_DECODER_OPEN_FAIL; #endif - } else { + } + /*Unknown format. Can't decode it.*/ + else { + /*Free the potentially allocated memories*/ + lv_img_decoder_built_in_close(decoder, dsc); + LV_LOG_WARN("Image decoder open: unknown color format") return LV_IMG_DECODER_OPEN_FAIL; } } -static lv_res_t lv_img_decoder_built_in_line_read(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) + +static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, + lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { + (void)decoder; /*Unused*/ + + lv_res_t res = LV_RES_INV; + if(dsc->src_type == LV_IMG_SRC_FILE) { - #if LV_USE_FILESYSTEM - uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); - - lv_fs_res_t res; - - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { - uint32_t pos = ((y * dsc->header.w + x) * px_size) >> 3; - pos += 4; /*Skip the header*/ - res = lv_fs_seek(&decoder_file, pos); - if(res != LV_FS_RES_OK) { - LV_LOG_WARN("Built-in image decoder seek failed"); - return false; - } - uint32_t btr = len * (px_size >> 3); - uint32_t br = 0; - lv_fs_read(&decoder_file, buf, btr, &br); - if(res != LV_FS_RES_OK || btr != br) { - LV_LOG_WARN("Built-in image decoder read failed"); - return false; - } - } else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_2BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_4BIT || - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) { - - lv_img_built_in_decoder_line_alpha(x, y, len, buf); - } else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_2BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_4BIT || - decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) { - lv_img_built_in_decoder_line_indexed(x, y, len, buf); - } else { - LV_LOG_WARN("Built-in image decoder read not supports the color format"); - return false; - } - #else - LV_LOG_WARN("Image built-in decoder can't read file because LV_USE_FILESYSTEM = 0"); - return false; - #endif - } else if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; - - if(img_dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { - lv_img_built_in_decoder_line_alpha(x, y, len, buf); - } else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { - lv_img_built_in_decoder_line_indexed(x, y, len, buf); - } else { - LV_LOG_WARN("Built-in image decoder not supports the color format"); - return false; - } - } - - return true; + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf); + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + + res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf); + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf); + } else { + LV_LOG_WARN("Built-in image decoder read not supports the color format"); + return false; + } + } + + return res; } static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) { + (void)decoder; /*Unused*/ - /*It was opened with built-in decoder*/ - if(decoder_src) { -#if LV_USE_FILESYSTEM - if(decoder_src_type == LV_IMG_SRC_FILE) { - lv_fs_close(&decoder_file); - } -#endif - decoder_src_type = LV_IMG_SRC_UNKNOWN; - decoder_src = NULL; + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; + if(user_data) { + if(user_data->f) lv_mem_free(user_data->f); + if(user_data->palette) lv_mem_free(user_data->palette); + + lv_mem_free(user_data); + + dsc->user_data = NULL; } } -static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, + lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +{ + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; + lv_fs_res_t res; + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); + + uint32_t pos = ((y * dsc->header.w + x) * px_size) >> 3; + pos += 4; /*Skip the header*/ + res = lv_fs_seek(user_data->f, pos); + if(res != LV_FS_RES_OK) { + LV_LOG_WARN("Built-in image decoder seek failed"); + return LV_RES_INV; + } + uint32_t btr = len * (px_size >> 3); + uint32_t br = 0; + lv_fs_read(user_data->f, buf, btr, &br); + if(res != LV_FS_RES_OK || btr != br) { + LV_LOG_WARN("Built-in image decoder read failed"); + return LV_RES_INV; + } + + return LV_RES_OK; +} + +static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) { #if LV_IMG_CF_ALPHA const lv_opa_t alpha1_opa_table[2] = { - 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, 136, 153, - 170, 187, 204, 221, 238, 255}; + 68, 85, 102, 119, 136, 153, + 170, 187, 204, 221, 238, 255}; /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ - lv_color_t bg_color = decoder_style->image.color; + lv_color_t bg_color = dsc->style->image.color; lv_coord_t i; for(i = 0; i < len; i++) { #if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1 @@ -408,42 +468,43 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, l } const lv_opa_t * opa_table = NULL; - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ lv_coord_t w = 0; uint32_t ofs = 0; int8_t pos = 0; - switch(decoder_header.cf) { - case LV_IMG_CF_ALPHA_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - pos = 7 - (x & 0x7); - opa_table = alpha1_opa_table; - break; - case LV_IMG_CF_ALPHA_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - pos = 6 - ((x & 0x3) * 2); - opa_table = alpha2_opa_table; - break; - case LV_IMG_CF_ALPHA_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - pos = 4 - ((x & 0x1) * 4); - opa_table = alpha4_opa_table; - break; - case LV_IMG_CF_ALPHA_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - pos = 0; - break; + switch(dsc->header.cf) { + case LV_IMG_CF_ALPHA_1BIT: + w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(dsc->header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + pos = 7 - (x & 0x7); + opa_table = alpha1_opa_table; + break; + case LV_IMG_CF_ALPHA_2BIT: + w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(dsc->header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + pos = 6 - ((x & 0x3) * 2); + opa_table = alpha2_opa_table; + break; + case LV_IMG_CF_ALPHA_4BIT: + w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(dsc->header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + pos = 4 - ((x & 0x1) * 4); + opa_table = alpha4_opa_table; + break; + case LV_IMG_CF_ALPHA_8BIT: + w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; #if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; #else @@ -451,17 +512,17 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, l #endif #endif const uint8_t * data_tmp = NULL; - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; + if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + const lv_img_dsc_t * img_dsc = dsc->src; + data_tmp = img_dsc->data + ofs; } else { #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ - lv_fs_read(&decoder_file, fs_buf, w, NULL); + lv_fs_seek(user_data->f, ofs + 4); /*+4 to skip the header*/ + lv_fs_read(user_data->f, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN( - "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN( "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -473,7 +534,7 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, l val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = - decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; + dsc->header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; pos -= px_size; if(pos < 0) { @@ -486,52 +547,54 @@ static lv_res_t lv_img_built_in_decoder_line_alpha(lv_img_decoder_t * decoder, l #else LV_LOG_WARN( - "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); + "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); return LV_RES_INV; #endif } -static lv_res_t lv_img_built_in_decoder_line_indexed(lv_img_decoder_t * decoder, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf) { #if LV_IMG_CF_INDEXED - uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf); + uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/ lv_coord_t w = 0; int8_t pos = 0; uint32_t ofs = 0; - switch(decoder_header.cf) { - case LV_IMG_CF_INDEXED_1BIT: - w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(decoder_header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - ofs += 8; /*Skip the palette*/ - pos = 7 - (x & 0x7); - break; - case LV_IMG_CF_INDEXED_2BIT: - w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(decoder_header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - ofs += 16; /*Skip the palette*/ - pos = 6 - ((x & 0x3) * 2); - break; - case LV_IMG_CF_INDEXED_4BIT: - w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(decoder_header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - ofs += 64; /*Skip the palette*/ - pos = 4 - ((x & 0x1) * 4); - break; - case LV_IMG_CF_INDEXED_8BIT: - w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - ofs += 1024; /*Skip the palette*/ - pos = 0; - break; + switch(dsc->header.cf) { + case LV_IMG_CF_INDEXED_1BIT: + w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(dsc->header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + ofs += 8; /*Skip the palette*/ + pos = 7 - (x & 0x7); + break; + case LV_IMG_CF_INDEXED_2BIT: + w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(dsc->header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + ofs += 16; /*Skip the palette*/ + pos = 6 - ((x & 0x3) * 2); + break; + case LV_IMG_CF_INDEXED_4BIT: + w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(dsc->header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + ofs += 64; /*Skip the palette*/ + pos = 4 - ((x & 0x1) * 4); + break; + case LV_IMG_CF_INDEXED_8BIT: + w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + ofs += 1024; /*Skip the palette*/ + pos = 0; + break; } + lv_img_decoder_built_in_data_t * user_data = dsc->user_data; + #if LV_USE_FILESYSTEM #if LV_COMPILER_VLA_SUPPORTED uint8_t fs_buf[w]; @@ -540,17 +603,17 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_img_decoder_t * decoder, #endif #endif const uint8_t * data_tmp = NULL; - if(decoder_src_type == LV_IMG_SRC_VARIABLE) { - const lv_img_dsc_t * img_dsc = decoder_src; + if(dsc->src_type == LV_IMG_SRC_VARIABLE) { + const lv_img_dsc_t * img_dsc = dsc->src; data_tmp = img_dsc->data + ofs; } else { #if LV_USE_FILESYSTEM - lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/ - lv_fs_read(&decoder_file, fs_buf, w, NULL); + lv_fs_seek(user_data->f, ofs + 4); /*+4 to skip the header*/ + lv_fs_read(user_data->f, fs_buf, w, NULL); data_tmp = fs_buf; #else LV_LOG_WARN( - "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); + "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -562,7 +625,7 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_img_decoder_t * decoder, lv_color_t * cbuf = (lv_color_t *)buf; for(i = 0; i < len; i++) { val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; - cbuf[i] = decoder_index_map[val_act]; + cbuf[i] = user_data->palette[val_act]; pos -= px_size; if(pos < 0) { @@ -574,14 +637,10 @@ static lv_res_t lv_img_built_in_decoder_line_indexed(lv_img_decoder_t * decoder, return LV_RES_OK; #else LV_LOG_WARN( - "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); + "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); return LV_RES_INV; #endif } - -/********************** - * STATIC FUNCTIONS - **********************/ diff --git a/src/lv_misc/lv_img_decoder.h b/src/lv_misc/lv_img_decoder.h index 7432a4342784..e431f227abe9 100644 --- a/src/lv_misc/lv_img_decoder.h +++ b/src/lv_misc/lv_img_decoder.h @@ -21,15 +21,38 @@ extern "C" { #include #include "lv_fs.h" +#include "lv_types.h" +#include "lv_area.h" +#include "../lv_core/lv_style.h" /********************* * DEFINES *********************/ -#define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)); +/*If image pixels contains alpha we need to know how much byte is a pixel*/ +#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 2 +#elif LV_COLOR_DEPTH == 16 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 3 +#elif LV_COLOR_DEPTH == 32 +#define LV_IMG_PX_SIZE_ALPHA_BYTE 4 +#endif + + +#define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)) /********************** * TYPEDEFS **********************/ + +enum { + LV_IMG_SRC_VARIABLE, + LV_IMG_SRC_FILE, + LV_IMG_SRC_SYMBOL, + LV_IMG_SRC_UNKNOWN, +}; + +typedef uint8_t lv_img_src_t; + typedef struct { @@ -126,7 +149,7 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decode */ typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); -typedef struct _lv_img_decoder_dsc { +typedef struct _lv_img_decoder { lv_img_decoder_info_f_t info_cb; lv_img_decoder_open_f_t open_cb; lv_img_decoder_read_line_f_t read_line_cb; @@ -138,7 +161,7 @@ typedef struct _lv_img_decoder_dsc { }lv_img_decoder_t; -typedef struct { +typedef struct _lv_img_decoder_dsc { lv_img_decoder_t * decoder; const lv_style_t * style; const void * src; @@ -154,6 +177,33 @@ typedef struct { * GLOBAL PROTOTYPES **********************/ +/** + * Initialize the image decoder module + * */ +void lv_img_decoder_init(void); + +lv_img_decoder_t * lv_img_decoder_create(void); + +void lv_img_decoder_delete(lv_img_decoder_t * decoder); + +void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb); + +void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb); + +void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb); + +void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb); +void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data); + +lv_img_decoder_user_data_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder); +lv_img_decoder_user_data_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder); + +lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header); +const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style); + +lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); + +void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc); /********************** * MACROS **********************/ diff --git a/src/lv_misc/lv_types.h b/src/lv_misc/lv_types.h new file mode 100644 index 000000000000..bdd860f56e66 --- /dev/null +++ b/src/lv_misc/lv_types.h @@ -0,0 +1,44 @@ +/** + * @file lv_types.h + * + */ + +#ifndef LV_TYPES_H +#define LV_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +enum { + LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action + function or an operation was failed*/ + LV_RES_OK, /*The object is valid (no deleted) after the action*/ +}; +typedef uint8_t lv_res_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * MACROS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_TYPES_H*/ diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 510ad9f580a6..15a3299d8a53 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -15,6 +15,7 @@ #endif #include "../lv_themes/lv_theme.h" +#include "../lv_misc/lv_img_decoder.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_log.h" @@ -148,7 +149,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) } lv_img_header_t header; - lv_img_dsc_get_info(src_img, &header); + lv_img_decoder_get_info(src_img, &header); /*Save the source*/ if(src_type == LV_IMG_SRC_VARIABLE) { diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index cf98c82b1bfd..58a03b1c6107 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -375,7 +375,7 @@ static void refr_img(lv_obj_t * imgbtn) #endif lv_res_t info_res; - info_res = lv_img_dsc_get_info(src, &header); + info_res = lv_img_decoder_get_info(src, &header); if(info_res == LV_RES_OK) { ext->act_cf = header.cf; #if LV_IMGBTN_TILED == 0 From e31b6a156e07d7b8220b1012103531400dcc8499 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 05:22:03 +0200 Subject: [PATCH 391/590] move lv_img_decoder to lv_draw --- src/lv_core/lv_obj.c | 1 - src/lv_draw/lv_draw.h | 2 +- src/lv_draw/lv_draw_img.h | 3 +-- src/{lv_misc => lv_draw}/lv_img_decoder.c | 6 +++--- src/{lv_misc => lv_draw}/lv_img_decoder.h | 6 +++--- src/lv_objx/lv_img.c | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) rename src/{lv_misc => lv_draw}/lv_img_decoder.c (99%) rename src/{lv_misc => lv_draw}/lv_img_decoder.h (98%) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 9ebd4964e7e4..c49224c72e7e 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -16,7 +16,6 @@ #include "../lv_misc/lv_anim.h" #include "../lv_misc/lv_task.h" #include "../lv_misc/lv_fs.h" -#include "../lv_misc/lv_img_decoder.h" #include "../lv_hal/lv_hal.h" #include #include diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index 1828e32c21a0..8d3d281a74f0 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -21,7 +21,7 @@ extern "C" { #include "../lv_core/lv_style.h" #include "../lv_misc/lv_txt.h" -#include "../lv_misc/lv_img_decoder.h" +#include "lv_img_decoder.h" /********************* * DEFINES diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 446b2c30239e..d8e9271764f8 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -14,8 +14,7 @@ extern "C" { * INCLUDES *********************/ #include "lv_draw.h" -#include "../lv_core/lv_obj.h" -#include "../lv_misc/lv_img_decoder.h" +#include "lv_img_decoder.h" /********************* * DEFINES diff --git a/src/lv_misc/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c similarity index 99% rename from src/lv_misc/lv_img_decoder.c rename to src/lv_draw/lv_img_decoder.c index a18a9a28b1af..b52cd7de2fab 100644 --- a/src/lv_misc/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -8,9 +8,9 @@ *********************/ #include "lv_img_decoder.h" #include "../lv_draw/lv_draw_img.h" -#include "lv_ll.h" -#include "lv_color.h" -#include "lv_gc.h" +#include "../lv_misc/lv_ll.h" +#include "../lv_misc/lv_color.h" +#include "../lv_misc/lv_gc.h" #if defined(LV_GC_INCLUDE) #include LV_GC_INCLUDE diff --git a/src/lv_misc/lv_img_decoder.h b/src/lv_draw/lv_img_decoder.h similarity index 98% rename from src/lv_misc/lv_img_decoder.h rename to src/lv_draw/lv_img_decoder.h index e431f227abe9..058360323d69 100644 --- a/src/lv_misc/lv_img_decoder.h +++ b/src/lv_draw/lv_img_decoder.h @@ -20,9 +20,9 @@ extern "C" { #endif #include -#include "lv_fs.h" -#include "lv_types.h" -#include "lv_area.h" +#include "../lv_misc/lv_fs.h" +#include "../lv_misc/lv_types.h" +#include "../lv_misc/lv_area.h" #include "../lv_core/lv_style.h" /********************* diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 15a3299d8a53..f9eca884db28 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -15,7 +15,7 @@ #endif #include "../lv_themes/lv_theme.h" -#include "../lv_misc/lv_img_decoder.h" +#include "../lv_draw/lv_img_decoder.h" #include "../lv_misc/lv_fs.h" #include "../lv_misc/lv_txt.h" #include "../lv_misc/lv_log.h" From 5af101a1eb01249fa1aa67047e53557aa6da4fd4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 06:15:12 +0200 Subject: [PATCH 392/590] add inline anim set functions --- src/lv_core/lv_obj.c | 2 +- src/lv_core/lv_style.c | 2 +- src/lv_core/lv_style.h | 63 ++++++++++++++++++++++++++++++++ src/lv_misc/lv_anim.c | 2 +- src/lv_misc/lv_anim.h | 83 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 148 insertions(+), 4 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 8ef301738392..7766d2862eee 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -90,7 +90,7 @@ void lv_init(void) lv_font_init(); #if LV_USE_ANIMATION - lv_anim_init(); + lv_anim_core_init(); #endif #if LV_USE_GROUP diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index ea6b3bb59cde..894326e9be99 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -318,7 +318,7 @@ void * lv_style_anim_create(lv_style_anim_t * anim) a.playback_pause = anim->playback_pause; a.repeat = anim->repeat; a.repeat_pause = anim->repeat_pause; - + a.user_data = anim->user_data; lv_anim_create(&a); return dsc; diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 4f4ac19b47e5..05d63331f49e 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -147,6 +147,69 @@ a.ready_cb = NULL; a.user_data = NULL; lv_style_anim_create(&a); */ + + +static inline void lv_style_anim_init(lv_style_anim_t * a) +{ + memset(a, 0, sizeof(lv_style_anim_t)); +} + +static inline void lv_style_anim_set_styles(lv_style_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end) +{ + a->style_anim = to_anim; + a->style_start = start; + a->style_end = end; +} + +static inline void lv_style_anim_set_time(lv_style_anim_t * a, uint16_t duration, uint16_t delay) +{ + a->time = duration; + a->act_time = -delay; +} + +static inline void lv_style_anim_set_ready_cb(lv_style_anim_t * a, lv_anim_ready_cb_t ready_cb) +{ + a->ready_cb = ready_cb; +} + +static inline void lv_style_anim_set_playback(lv_style_anim_t * a, uint16_t wait_time) +{ + a->playback = 1; + a->playback_pause = wait_time; +} + +static inline void lv_style_anim_clear_playback(lv_style_anim_t * a) +{ + a->playback = 0; +} + +static inline void lv_style_anim_set_repeat(lv_style_anim_t * a, uint16_t wait_time) +{ + a->repeat = 1; + a->repeat_pause = wait_time; +} + +static inline void lv_style_anim_clear_repeat(lv_style_anim_t * a) +{ + a->repeat = 0; +} + +static inline void lv_style_anim_set_user_data(lv_style_anim_t * a, lv_anim_user_data_t user_data) +{ + memcpy(&a->user_data, &user_data, sizeof(user_data)); +} + +static inline lv_anim_user_data_t lv_style_anim_get_user_data(lv_style_anim_t * a) +{ + return a->user_data; +} + +static inline lv_anim_user_data_t * lv_style_anim_get_user_data_ptr(lv_style_anim_t * a) +{ + return &a->user_data; +} + + #endif /********************** diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index ef2d6696cbc2..24d158325048 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -53,7 +53,7 @@ static bool anim_list_changed; /** * Init. the animation module */ -void lv_anim_init(void) +void lv_anim_core_init(void) { lv_ll_init(&LV_GC_ROOT(_lv_anim_ll), sizeof(lv_anim_t)); last_task_run = lv_tick_get(); diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 95444d60b1be..393a7c6fa8fb 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -98,7 +98,88 @@ lv_anim_create(&a); /** * Init. the animation module */ -void lv_anim_init(void); +void lv_anim_core_init(void); + + +/** + * Initialize an animation variable + * @param a pointer to animation + */ +static inline void lv_anim_init(lv_anim_t * a) +{ + memset(a, 0, sizeof(lv_anim_t)); +} + + +static inline void lv_anim_set_var(lv_anim_t * a, void * var) +{ + a->var = var; +} + +static inline void lv_anim_set_time(lv_anim_t * a, uint16_t duration, uint16_t delay) +{ + a->time = duration; + a->act_time = -delay; +} + +static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_anim_value_t end) +{ + a->start = start; + a->end = end; +} + +static inline void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_cb_t exec_cb) +{ + a->exec_cb = exec_cb; +} + +static inline void lv_anim_set_path_cb(lv_anim_t * a, lv_anim_path_cb_t path_cb) +{ + a->path_cb = path_cb; +} + +static inline void lv_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb) +{ + a->ready_cb = ready_cb; +} + +static inline void lv_anim_set_playback(lv_anim_t * a, uint16_t wait_time) +{ + a->playback = 1; + a->playback_pause = wait_time; +} + +static inline void lv_anim_clear_playback(lv_anim_t * a) +{ + a->playback = 0; +} + +static inline void lv_anim_set_repeat(lv_anim_t * a, uint16_t wait_time) +{ + a->repeat = 1; + a->repeat_pause = wait_time; +} + +static inline void lv_anim_clear_repeat(lv_anim_t * a) +{ + a->repeat = 0; +} + +static inline void lv_anim_set_user_data(lv_anim_t * a, lv_anim_user_data_t user_data) +{ + memcpy(&a->user_data, &user_data, sizeof(user_data)); +} + +static inline lv_anim_user_data_t lv_anim_get_user_data(lv_anim_t * a) +{ + return a->user_data; +} + +static inline lv_anim_user_data_t * lv_anim_get_user_data_ptr(lv_anim_t * a) +{ + return &a->user_data; +} + /** * Create an animation From fe8157cc882735de7c04ee7cdb6706fa6a135653 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 06:43:16 +0200 Subject: [PATCH 393/590] add LV_EVENT_KEY --- src/lv_core/lv_group.c | 10 +++++++++- src/lv_core/lv_obj.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 7d6cfa1fd9ea..2a0afee30c18 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -285,7 +285,15 @@ lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c) lv_obj_t * act = lv_group_get_focused(group); if(act == NULL) return LV_RES_OK; - return act->signal_cb(act, LV_SIGNAL_CONTROL, &c); + lv_res_t res; + + res = act->signal_cb(act, LV_SIGNAL_CONTROL, &c); + if(res != LV_RES_OK) return res; + + res = lv_event_send(act, LV_EVENT_KEY, &c); + if(res != LV_RES_OK) return res; + + return res; } /** diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 0e84850304fb..d9159f9ba9ef 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -84,6 +84,7 @@ enum { LV_EVENT_DRAG_BEGIN, LV_EVENT_DRAG_END, LV_EVENT_DRAG_THROW_BEGIN, + LV_EVENT_KEY, LV_EVENT_FOCUSED, LV_EVENT_DEFOCUSED, LV_EVENT_VALUE_CHANGED, From eebe04bd9504f991b40cd46b58c2ed4e8e43a73c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 06:46:27 +0200 Subject: [PATCH 394/590] lv_key_t: fix format --- src/lv_core/lv_group.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index c58ed48c48ea..6119df80cee3 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -27,7 +27,7 @@ extern "C" { /*Predefined keys to control the focused object via lv_group_send(group, c)*/ /*For compatibility in signal function define the keys regardless to `LV_USE_GROUP`*/ -typedef enum { +enum { LV_KEY_UP = 17, /*0x11*/ LV_KEY_DOWN = 18, /*0x12*/ LV_KEY_RIGHT = 19, /*0x13*/ @@ -40,7 +40,8 @@ typedef enum { LV_KEY_PREV=11, /*0x0B, '*/ LV_KEY_HOME = 2, /*0x02, STX*/ LV_KEY_END = 3, /*0x03, ETX*/ -} lv_key_t; +}; +typedef uint8_t lv_key_t; #if LV_USE_GROUP != 0 /********************** From 6a265896a233d64387eac70d91b9dd221406d66b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 07:34:19 +0200 Subject: [PATCH 395/590] fix screen copy --- src/lv_core/lv_indev.c | 4 ++-- src/lv_core/lv_obj.c | 7 ++++++- src/lv_misc/lv_mem.c | 8 ++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 82d7882259f0..f2ab53c3c0d1 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -881,8 +881,8 @@ static void indev_proc_release(lv_indev_proc_t * proc) lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); /*Check, if the parent is in a group focus on it.*/ - if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == - false) { /*Respect the click focus protection*/ + /*Respect the click focus protection*/ + if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { lv_obj_t * parent = proc->types.pointer.act_obj; while(g == NULL) { diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 8ef301738392..ba60312da36d 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -359,7 +359,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) } #endif - lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy)); + /*Set the same coordinates for non screen objects*/ + if(lv_obj_get_parent(copy) != NULL) { + lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy)); + } else { + lv_obj_set_pos(new_obj, 0, 0); + } LV_LOG_INFO("Object create ready"); } diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index bfea3490b620..6dfcea849346 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -126,7 +126,9 @@ void * lv_mem_alloc(uint32_t size) #endif void * alloc = NULL; -#if LV_MEM_CUSTOM == 0 /*Use the allocation from dyn_mem*/ + +#if LV_MEM_CUSTOM == 0 + /*Use the built-in allocators*/ lv_mem_ent_t * e = NULL; // Search for a appropriate entry @@ -141,7 +143,8 @@ void * lv_mem_alloc(uint32_t size) // End if there is not next entry OR the alloc. is successful } while(e != NULL && alloc == NULL); -#else /*Use custom, user defined malloc function*/ +#else +/*Use custom, user defined malloc function*/ #if LV_ENABLE_GC == 1 /*gc must not include header*/ alloc = LV_MEM_CUSTOM_ALLOC(size); #else /* LV_ENABLE_GC */ @@ -150,6 +153,7 @@ void * lv_mem_alloc(uint32_t size) if(alloc != NULL) { ((lv_mem_ent_t *)alloc)->header.s.d_size = size; ((lv_mem_ent_t *)alloc)->header.s.used = 1; + alloc = &((lv_mem_ent_t *)alloc)->first_data; } #endif /* LV_ENABLE_GC */ From 648d42ec947919dc7a4613d2550e96b94f17754a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 07:36:13 +0200 Subject: [PATCH 396/590] fix screen copy --- src/lv_core/lv_obj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ba60312da36d..f786ee0a8bf1 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -360,7 +360,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #endif /*Set the same coordinates for non screen objects*/ - if(lv_obj_get_parent(copy) != NULL) { + if(lv_obj_get_parent(copy) != NULL && parent != NULL) { lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy)); } else { lv_obj_set_pos(new_obj, 0, 0); From 569bbdf0589a6c57e6839a8bf94d17984339d680 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 18:27:26 +0200 Subject: [PATCH 397/590] remove lv_style_anim_t and replace it with simply lv_anim_t --- src/lv_core/lv_style.c | 74 ++++++--------- src/lv_core/lv_style.h | 210 ++++++++++++++++++++++------------------- src/lv_misc/lv_anim.c | 27 ++++-- src/lv_misc/lv_anim.h | 141 ++++++++++++++++++++------- 4 files changed, 272 insertions(+), 180 deletions(-) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 894326e9be99..2d6b67fdaa71 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -26,16 +26,6 @@ /********************** * TYPEDEFS **********************/ -#if LV_USE_ANIMATION -typedef struct -{ - lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it - will be modified too*/ - lv_style_t style_end; - lv_style_t * style_anim; - lv_anim_ready_cb_t ready_cb; -} lv_style_anim_dsc_t; -#endif /********************** * STATIC PROTOTYPES @@ -286,44 +276,38 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * #if LV_USE_ANIMATION -/** - * Create an animation from a pre-configured 'lv_style_anim_t' variable - * @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied) - * @return pointer to a descriptor. Really this variable will be animated. (Can be used in - * `lv_anim_del(dsc, NULL)`) - */ -void * lv_style_anim_create(lv_style_anim_t * anim) + +void lv_style_anim_init(lv_anim_t * a) { - lv_style_anim_dsc_t * dsc; - dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t)); - lv_mem_assert(dsc); - if(dsc == NULL) return NULL; - - dsc->style_anim = anim->style_anim; - memcpy(&dsc->style_start, anim->style_start, sizeof(lv_style_t)); - memcpy(&dsc->style_end, anim->style_end, sizeof(lv_style_t)); - memcpy(dsc->style_anim, anim->style_start, sizeof(lv_style_t)); - dsc->ready_cb = anim->ready_cb; - - lv_anim_t a; - a.var = (void *)dsc; - a.start = 0; - a.end = STYLE_MIX_MAX; - a.exec_cb = (lv_anim_exec_cb_t)style_animator; - a.path_cb = lv_anim_path_linear; - a.ready_cb = style_animation_common_end_cb; - a.act_time = anim->act_time; - a.time = anim->time; - a.playback = anim->playback; - a.playback_pause = anim->playback_pause; - a.repeat = anim->repeat; - a.repeat_pause = anim->repeat_pause; - a.user_data = anim->user_data; - lv_anim_create(&a); - - return dsc; + lv_anim_init(a); + a->start = 0; + a->end = STYLE_MIX_MAX; + a->exec_cb = (lv_anim_exec_cb_t)style_animator; + a->path_cb = lv_anim_path_linear; + a->ready_cb = style_animation_common_end_cb; + + lv_style_anim_dsc_t * dsc; + dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t)); + lv_mem_assert(dsc); + if(dsc == NULL) return; + dsc->ready_cb = NULL; + dsc->style_anim = NULL; + lv_style_copy(&dsc->style_start, &lv_style_plain); + lv_style_copy(&dsc->style_end, &lv_style_plain); + + a->var = (void *)dsc; + } +void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end) +{ + + lv_style_anim_dsc_t * dsc = a->var; + dsc->style_anim = to_anim; + memcpy(&dsc->style_start, start, sizeof(lv_style_t)); + memcpy(&dsc->style_end, end, sizeof(lv_style_t)); + memcpy(dsc->style_anim, start, sizeof(lv_style_t)); +} #endif /********************** * STATIC FUNCTIONS diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 05d63331f49e..a4d5b6f8e3aa 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -112,141 +112,161 @@ typedef struct #if LV_USE_ANIMATION typedef struct { - const lv_style_t * style_start; /*Pointer to the starting style*/ - const lv_style_t * style_end; /*Pointer to the destination style*/ - lv_style_t * style_anim; /*Pointer to a style to animate*/ - lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready (NULL if unused)*/ - int16_t time; /*Animation time in ms*/ - int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ - uint16_t playback_pause; /*Wait before play back*/ - uint16_t repeat_pause; /*Wait before repeat*/ -#if LV_USE_USER_DATA_SINGLE - lv_anim_user_data_t user_data; /*Custom user data*/ + lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it + will be modified too*/ + lv_style_t style_end; + lv_style_t * style_anim; + lv_anim_ready_cb_t ready_cb; +} lv_style_anim_dsc_t; #endif -#if LV_USE_USER_DATA_MULTI - lv_anim_user_data_t ready_user_data; -#endif +/********************** + * GLOBAL PROTOTYPES + **********************/ - uint8_t playback : 1; /*When the animation is ready play it back*/ - uint8_t repeat : 1; /*Repeat the animation infinitely*/ -} lv_style_anim_t; - -/* Example initialization -lv_style_anim_t a; -a.style_anim = &style_to_anim; -a.style_start = &style_1; -a.style_end = &style_2; -a.act_time = 0; -a.time = 1000; -a.playback = 0; -a.playback_pause = 0; -a.repeat = 0; -a.repeat_pause = 0; -a.ready_cb = NULL; -a.user_data = NULL; -lv_style_anim_create(&a); +/** + * Init the basic styles */ +void lv_style_init(void); +/** + * Copy a style to an other + * @param dest pointer to the destination style + * @param src pointer to the source style + */ +void lv_style_copy(lv_style_t * dest, const lv_style_t * src); -static inline void lv_style_anim_init(lv_style_anim_t * a) -{ - memset(a, 0, sizeof(lv_style_anim_t)); -} +/** + * Mix two styles according to a given ratio + * @param start start style + * @param end end style + * @param res store the result style here + * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style + */ +void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, + uint16_t ratio); -static inline void lv_style_anim_set_styles(lv_style_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end) -{ - a->style_anim = to_anim; - a->style_start = start; - a->style_end = end; -} +#if LV_USE_ANIMATION -static inline void lv_style_anim_set_time(lv_style_anim_t * a, uint16_t duration, uint16_t delay) -{ - a->time = duration; - a->act_time = -delay; -} +/** + * Initialize an animation variable. + * E.g.: + * lv_anim_t a; + * lv_style_anim__init(&a); + * lv_style_anim_set_...(&a); + * lv_style_anim_create(&a); + * @param a pointer to an `lv_anim_t` variable to initialize + */ +void lv_style_anim_init(lv_anim_t * a); -static inline void lv_style_anim_set_ready_cb(lv_style_anim_t * a, lv_anim_ready_cb_t ready_cb) -{ - a->ready_cb = ready_cb; -} +/** + * + * @param a pointer to an initialized `lv_anim_t` variable + * @param to_anim pointer to the style to animate + * @param start pointer to a style to animate from (start value) + * @param end pointer to a style to animate to (end value) + */ +void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end); -static inline void lv_style_anim_set_playback(lv_style_anim_t * a, uint16_t wait_time) +/** + * Set the duration and delay of an animation + * @param a pointer to an initialized `lv_anim_t` variable + * @param duration duration of the animation in milliseconds + * @param delay delay before the animation in milliseconds + */ +static inline void lv_style_anim_set_time(lv_anim_t * a, uint16_t duration, uint16_t delay) { - a->playback = 1; - a->playback_pause = wait_time; + lv_anim_set_time(a, duration, delay); } -static inline void lv_style_anim_clear_playback(lv_style_anim_t * a) +/** + * Set a function call when the animation is ready + * @param a pointer to an initialized `lv_anim_t` variable + * @param ready_cb a function call when the animation is ready + */ +static inline void lv_style_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb) { - a->playback = 0; + lv_style_anim_dsc_t * dsc = a->var; + dsc->ready_cb = ready_cb; } -static inline void lv_style_anim_set_repeat(lv_style_anim_t * a, uint16_t wait_time) +/** + * Make the animation to play back to when the forward direction is ready + * @param a pointer to an initialized `lv_anim_t` variable + * @param wait_time time in milliseconds to wait before starting the back direction + */ +static inline void lv_style_anim_set_playback(lv_anim_t * a, uint16_t wait_time) { - a->repeat = 1; - a->repeat_pause = wait_time; + lv_anim_set_playback(a, wait_time); } -static inline void lv_style_anim_clear_repeat(lv_style_anim_t * a) +/** + * Disable playback. (Disabled after `lv_anim_init()`) + * @param a pointer to an initialized `lv_anim_t` variable + */ +static inline void lv_style_anim_clear_playback(lv_anim_t * a) { - a->repeat = 0; + lv_anim_clear_playback(a); } -static inline void lv_style_anim_set_user_data(lv_style_anim_t * a, lv_anim_user_data_t user_data) +/** + * Make the animation to start again when ready. + * @param a pointer to an initialized `lv_anim_t` variable + * @param wait_time time in milliseconds to wait before starting the animation again + */ +static inline void lv_style_anim_set_repeat(lv_anim_t * a, uint16_t wait_time) { - memcpy(&a->user_data, &user_data, sizeof(user_data)); + lv_anim_set_repeat(a, wait_time); } -static inline lv_anim_user_data_t lv_style_anim_get_user_data(lv_style_anim_t * a) +/** + * Disable repeat. (Disabled after `lv_anim_init()`) + * @param a pointer to an initialized `lv_anim_t` variable + */ +static inline void lv_style_anim_clear_repeat(lv_anim_t * a) { - return a->user_data; + lv_anim_clear_repeat(a); } -static inline lv_anim_user_data_t * lv_style_anim_get_user_data_ptr(lv_style_anim_t * a) +/** + * Set a user specific data for the animation + * @param a pointer to an initialized `lv_anim_t` variable + * @param user_data the user data + */ +static inline void lv_style_anim_set_user_data(lv_anim_t * a, lv_anim_user_data_t user_data) { - return &a->user_data; + lv_anim_set_user_data(a, user_data); } - -#endif - -/********************** - * GLOBAL PROTOTYPES - **********************/ - /** - * Init the basic styles + * Get the user data + * @param a pointer to an initialized `lv_anim_t` variable + * @return the user data */ -void lv_style_init(void); +static inline lv_anim_user_data_t lv_style_anim_get_user_data(lv_anim_t * a) +{ + return lv_anim_get_user_data(a); +} /** - * Copy a style to an other - * @param dest pointer to the destination style - * @param src pointer to the source style + * Get pointer to the user data + * @param a pointer to an initialized `lv_anim_t` variable + * @return pointer to the user data */ -void lv_style_copy(lv_style_t * dest, const lv_style_t * src); +static inline lv_anim_user_data_t * lv_style_anim_get_user_data_ptr(lv_anim_t * a) +{ + return lv_style_anim_get_user_data_ptr(a); +} /** - * Mix two styles according to a given ratio - * @param start start style - * @param end end style - * @param res store the result style here - * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style + * Create an animation + * @param a an initialized 'anim_t' variable. Not required after call. */ -void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, - uint16_t ratio); - -#if LV_USE_ANIMATION +static inline void lv_style_anim_create(lv_anim_t * a) +{ + return lv_anim_create(a); +} -/** - * Create an animation from a pre-configured 'lv_style_anim_t' variable - * @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied) - * @return pointer to a descriptor. Really this variable will be animated. (Can be used in - * `lv_anim_del(dsc, NULL)`) - */ -void * lv_style_anim_create(lv_style_anim_t * anim); #endif /************************* diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 24d158325048..77251a40c7c7 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -60,16 +60,31 @@ void lv_anim_core_init(void) lv_task_create(anim_task, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, NULL); } +/** + * Initialize an animation variable. + * E.g.: + * lv_anim_t a; + * lv_anim_init(&a); + * lv_anim_set_...(&a); + * lv_anim_craete(&a); + * @param a pointer to an `lv_anim_t` variable to initialize + */ +void lv_anim_init(lv_anim_t * a) +{ + memset(a, 0, sizeof(lv_anim_t)); + a->time = 500; + a->end = 100; +} /** * Create an animation - * @param anim_p an initialized 'anim_t' variable. Not required after call. + * @param a an initialized 'anim_t' variable. Not required after call. */ -void lv_anim_create(lv_anim_t * anim_p) +void lv_anim_create(lv_anim_t * a) { LV_LOG_TRACE("animation create started") /* Do not let two animations for the same 'var' with the same 'fp'*/ - if(anim_p->exec_cb != NULL) - lv_anim_del(anim_p->var, anim_p->exec_cb); /*fp == NULL would delete all animations of var*/ + if(a->exec_cb != NULL) + lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/ /*Add the new animation to the animation linked list*/ lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll)); @@ -77,8 +92,8 @@ void lv_anim_create(lv_anim_t * anim_p) if(new_anim == NULL) return; /*Initialize the animation descriptor*/ - anim_p->playback_now = 0; - memcpy(new_anim, anim_p, sizeof(lv_anim_t)); + a->playback_now = 0; + memcpy(new_anim, a, sizeof(lv_anim_t)); /*Set the start value*/ if(new_anim->exec_cb != NULL) new_anim->exec_cb(new_anim->var, new_anim->start); diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 393a7c6fa8fb..77e50b8b4a79 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -23,6 +23,7 @@ extern "C" { #include #include +#include /********************* * DEFINES @@ -32,19 +33,28 @@ extern "C" { * TYPEDEFS **********************/ -typedef int16_t lv_anim_value_t; /*Type of the animated value*/ - struct _lv_anim_t; -/*Generic prototype of "animator" functions*/ +/*Type of the animated value*/ +typedef int16_t lv_anim_value_t; + +/* Generic prototype of "animator" functions. + * First parameter is the variable to animate. + * Second parameter is the value to set. + * Compatible with `lv_xxx_set_yyy(obj, value)` functions*/ typedef void (*lv_anim_exec_cb_t)(void *, lv_anim_value_t); -/*Get the current value in an animation*/ +/* Same as `lv_anim_exec_cb_t` but receives `lv_anim_t *` as the first parameter. + * It's more consistent but less convenient. Might be used by binding generator functions.*/ +typedef void (*lv_anim_custom_exec_cb_t)(struct _lv_anim_t *, lv_anim_value_t); + +/*Get the current value during an animation*/ typedef lv_anim_value_t (*lv_anim_path_cb_t)(const struct _lv_anim_t *); -/*Callback for animation ready*/ +/*Callback to call when the animation is ready*/ typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); +/*Describe an animation*/ typedef struct _lv_anim_t { void * var; /*Variable to animate*/ @@ -71,26 +81,9 @@ typedef struct _lv_anim_t uint8_t repeat : 1; /*Repeat the animation infinitely*/ /*Animation system use these - user shouldn't set*/ uint8_t playback_now : 1; /*Play back is in progress*/ - uint32_t has_run : 1; /*Indicates the animation has run it this round*/ + uint32_t has_run : 1; /*Indicates the animation has run in this round*/ } lv_anim_t; -/*Example initialization -lv_anim_t a; -a.var = obj; -a.start = lv_obj_get_height(obj); -a.end = new_height; -a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; -a.path_cb = lv_anim_path_linear; -a.ready_cb = NULL; -a.act_time = 0; -a.time = 200; -a.playback = 0; -a.playback_pause = 0; -a.repeat = 0; -a.repeat_pause = 0; -a.user_data = NULL; -lv_anim_create(&a); - */ /********************** * GLOBAL PROTOTYPES **********************/ @@ -100,92 +93,172 @@ lv_anim_create(&a); */ void lv_anim_core_init(void); - /** - * Initialize an animation variable - * @param a pointer to animation + * Initialize an animation variable. + * E.g.: + * lv_anim_t a; + * lv_anim_init(&a); + * lv_anim_set_...(&a); + * lv_anim_create(&a); + * @param a pointer to an `lv_anim_t` variable to initialize */ -static inline void lv_anim_init(lv_anim_t * a) -{ - memset(a, 0, sizeof(lv_anim_t)); -} - +void lv_anim_init(lv_anim_t * a); +/** + * Set a variable to animate + * @param a pointer to an initialized `lv_anim_t` variable + * @param var pointer to a variable to animate + */ static inline void lv_anim_set_var(lv_anim_t * a, void * var) { a->var = var; } +/** + * Set the duration and delay of an animation + * @param a pointer to an initialized `lv_anim_t` variable + * @param duration duration of the animation in milliseconds + * @param delay delay before the animation in milliseconds + */ static inline void lv_anim_set_time(lv_anim_t * a, uint16_t duration, uint16_t delay) { a->time = duration; a->act_time = -delay; } +/** + * Set the start and end values of an animation + * @param a pointer to an initialized `lv_anim_t` variable + * @param start the start value + * @param end the end value + */ static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_anim_value_t end) { a->start = start; a->end = end; } +/** + * Set a function to execute by the aniamtion + * @param a pointer to an initialized `lv_anim_t` variable + * @param exec_cb a function to execute. + * LittelvGL's built-in functions can be used. + * E.g. lv_obj_set_x + */ static inline void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_cb_t exec_cb) { a->exec_cb = exec_cb; } +/** + * The same as `lv_anim_set_exec_cb` but `lv_anim_custom_exec_cb_t` receives + * `lv_anim_t * ` as its first parameter instead of `void *`. + * This function might be used when LittlevGL is binded to other languages because + * it's more consistent to have `lv_anim_t *` as first parameter. + * @param a pointer to an initialized `lv_anim_t` variable + * @param exec_cb a function to execute. + */ +static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) +{ + a->exec_cb = (lv_anim_exec_cb_t)exec_cb; +} + +/** + * Set the path (curve) of the animation. + * @param a pointer to an initialized `lv_anim_t` variable + * @param path_cb a function the get the current value of the animation. + * The built in functions starts with `lv_anim_path_...` + */ static inline void lv_anim_set_path_cb(lv_anim_t * a, lv_anim_path_cb_t path_cb) { a->path_cb = path_cb; } +/** + * Set a function call when the animation is ready + * @param a pointer to an initialized `lv_anim_t` variable + * @param ready_cb a function call when the animation is ready + */ static inline void lv_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb) { a->ready_cb = ready_cb; } +/** + * Make the animation to play back to when the forward direction is ready + * @param a pointer to an initialized `lv_anim_t` variable + * @param wait_time time in milliseconds to wait before starting the back direction + */ static inline void lv_anim_set_playback(lv_anim_t * a, uint16_t wait_time) { a->playback = 1; a->playback_pause = wait_time; } +/** + * Disable playback. (Disabled after `lv_anim_init()`) + * @param a pointer to an initialized `lv_anim_t` variable + */ static inline void lv_anim_clear_playback(lv_anim_t * a) { a->playback = 0; } +/** + * Make the animation to start again when ready. + * @param a pointer to an initialized `lv_anim_t` variable + * @param wait_time time in milliseconds to wait before starting the animation again + */ static inline void lv_anim_set_repeat(lv_anim_t * a, uint16_t wait_time) { a->repeat = 1; a->repeat_pause = wait_time; } +/** + * Disable repeat. (Disabled after `lv_anim_init()`) + * @param a pointer to an initialized `lv_anim_t` variable + */ static inline void lv_anim_clear_repeat(lv_anim_t * a) { a->repeat = 0; } +/** + * Set a user specific data for the animation + * @param a pointer to an initialized `lv_anim_t` variable + * @param user_data the user data + */ static inline void lv_anim_set_user_data(lv_anim_t * a, lv_anim_user_data_t user_data) { memcpy(&a->user_data, &user_data, sizeof(user_data)); } +/** + * Get the user data + * @param a pointer to an initialized `lv_anim_t` variable + * @return the user data + */ static inline lv_anim_user_data_t lv_anim_get_user_data(lv_anim_t * a) { return a->user_data; } +/** + * Get pointer to the user data + * @param a pointer to an initialized `lv_anim_t` variable + * @return pointer to the user data + */ static inline lv_anim_user_data_t * lv_anim_get_user_data_ptr(lv_anim_t * a) { return &a->user_data; } - /** * Create an animation - * @param anim_p an initialized 'anim_t' variable. Not required after call. + * @param a an initialized 'anim_t' variable. Not required after call. */ -void lv_anim_create(lv_anim_t * anim_p); +void lv_anim_create(lv_anim_t * a); /** * Delete an animation for a variable with a given animatior function From 78c527ee4fc8784c4595d4a64e58a9d8ec55de2c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 18:50:38 +0200 Subject: [PATCH 398/590] remove LV_USE_USER_DATA_MULTI --- lv_conf_template.h | 3 --- src/lv_conf_checker.h | 5 ----- src/lv_core/lv_group.c | 6 ------ src/lv_core/lv_group.h | 6 ------ src/lv_core/lv_obj.c | 16 ---------------- src/lv_core/lv_obj.h | 6 ------ src/lv_draw/lv_draw.mk | 1 + src/lv_draw/lv_img_decoder.c | 2 ++ src/lv_hal/lv_hal_disp.h | 9 --------- src/lv_hal/lv_hal_indev.h | 6 ------ src/lv_misc/lv_anim.h | 6 ------ src/lv_misc/lv_task.c | 4 ---- src/lv_misc/lv_task.h | 4 ---- 13 files changed, 3 insertions(+), 71 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 7eb4065f60e4..baa076c03008 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -151,9 +151,6 @@ typedef void * lv_img_decoder_user_data_t; /*1: Add a `user_data` to drivers and objects*/ #define LV_USE_USER_DATA_SINGLE 1 -/*1: Add separate `user_data` for every callback*/ -#define LV_USE_USER_DATA_MULTI 0 - /*===================== * Compiler settings *====================*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 770a84ae50ee..e7f975b54790 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -209,11 +209,6 @@ #define LV_USE_USER_DATA_SINGLE 1 #endif -/*1: Add separate `user_data` for every callback*/ -#ifndef LV_USE_USER_DATA_MULTI -#define LV_USE_USER_DATA_MULTI 0 -#endif - /*===================== * Compiler settings *====================*/ diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 2a0afee30c18..98c36a825e1d 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -78,12 +78,6 @@ lv_group_t * lv_group_create(void) memset(&group->user_data, 0, sizeof(lv_group_user_data_t)); #endif -#if LV_USE_USER_DATA_MULTI - memset(&group->focus_user_data, 0, sizeof(lv_group_user_data_t)); - memset(&group->style_mod_user_data, 0, sizeof(lv_group_user_data_t)); - memset(&group->style_mod_edit_user_data, 0, sizeof(lv_group_user_data_t)); -#endif - /*Initialize style modification callbacks from current theme*/ refresh_theme(group, lv_theme_get_current()); diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 6119df80cee3..8827325e9910 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -65,12 +65,6 @@ typedef struct _lv_group_t lv_group_user_data_t user_data; #endif -#if LV_USE_USER_DATA_MULTI - lv_group_user_data_t focus_user_data; - lv_group_user_data_t style_mod_user_data; - lv_group_user_data_t style_mod_edit_user_data; -#endif - uint8_t frozen : 1; /*1: can't focus to new object*/ uint8_t editing : 1; /*1: Edit mode, 0: Navigate mode*/ uint8_t click_focus : 1; /*1: If an object in a group is clicked by an indev then it will be diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index df24e25c3f35..5735e081047a 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -188,11 +188,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if LV_USE_USER_DATA_MULTI - memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); - memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); - memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); -#endif #if LV_USE_GROUP new_obj->group_p = NULL; @@ -275,11 +270,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if LV_USE_USER_DATA_SINGLE memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif -#if LV_USE_USER_DATA_MULTI - memset(&new_obj->event_user_data, 0, sizeof(lv_obj_user_data_t)); - memset(&new_obj->signal_user_data, 0, sizeof(lv_obj_user_data_t)); - memset(&new_obj->design_user_data, 0, sizeof(lv_obj_user_data_t)); -#endif #if LV_USE_GROUP new_obj->group_p = NULL; @@ -319,12 +309,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #if LV_USE_USER_DATA_SINGLE memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); #endif -#if LV_USE_USER_DATA_MULTI - memcpy(&new_obj->event_user_data, ©->event_user_data, sizeof(lv_obj_user_data_t)); - memcpy(&new_obj->signal_user_data, ©->signal_user_data, sizeof(lv_obj_user_data_t)); - memcpy(&new_obj->design_user_data, ©->design_user_data, sizeof(lv_obj_user_data_t)); -#endif - /*Copy realign*/ #if LV_USE_OBJ_REALIGN new_obj->realign.align = copy->realign.align; diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 5cec764846ec..2e1debe91cc4 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -223,12 +223,6 @@ typedef struct _lv_obj_t lv_obj_user_data_t user_data; #endif -#if LV_USE_USER_DATA_MULTI - lv_obj_user_data_t event_user_data; - lv_obj_user_data_t signal_user_data; - lv_obj_user_data_t design_user_data; -#endif - } lv_obj_t; /*Protect some attributes (max. 8 bit)*/ diff --git a/src/lv_draw/lv_draw.mk b/src/lv_draw/lv_draw.mk index ac9e76041337..43b5ee48af23 100644 --- a/src/lv_draw/lv_draw.mk +++ b/src/lv_draw/lv_draw.mk @@ -6,6 +6,7 @@ CSRCS += lv_draw_line.c CSRCS += lv_draw_img.c CSRCS += lv_draw_arc.c CSRCS += lv_draw_triangle.c +CSRCS += lv_img_decoder.c DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_draw VPATH += :$(LVGL_DIR)/lvgl/src/lv_draw diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index b52cd7de2fab..5822be982c90 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -196,6 +196,8 @@ void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc) static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) { + (void)decoder; /*Unused*/ + lv_img_src_t src_type = lv_img_src_get_type(src); if(src_type == LV_IMG_SRC_VARIABLE) { header->w = ((lv_img_dsc_t *)src)->header.w; diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 320af018efa4..e541d4279895 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -103,15 +103,6 @@ typedef struct _disp_drv_t lv_disp_drv_user_data_t user_data; #endif -#if LV_USE_USER_DATA_MULTI - lv_disp_drv_user_data_t flush_user_data; - lv_disp_drv_user_data_t mem_blend_user_data; - lv_disp_drv_user_data_t mem_fill_user_data; - lv_disp_drv_user_data_t rounder_user_data; - lv_disp_drv_user_data_t set_px_user_data; - lv_disp_drv_user_data_t monitor_user_data; -#endif - } lv_disp_drv_t; struct _lv_obj_t; diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index d5ac7f4f201a..97ab836e602d 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -85,12 +85,6 @@ typedef struct _lv_indev_drv_t lv_indev_drv_user_data_t user_data; #endif -#if LV_USE_USER_DATA_MULTI - lv_indev_drv_user_data_t read_user_data; - lv_indev_drv_user_data_t feedback_user_data; -#endif - - /*Pointer to the assigned display*/ struct _disp_t * disp; diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 77e50b8b4a79..a86052e14aae 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -71,12 +71,6 @@ typedef struct _lv_anim_t lv_anim_user_data_t user_data; /*Custom user data*/ #endif -#if LV_USE_USER_DATA_MULTI - lv_anim_user_data_t exec_user_data; - lv_anim_user_data_t path_user_data; - lv_anim_user_data_t ready_user_data; -#endif - uint8_t playback : 1; /*When the animation is ready play it back*/ uint8_t repeat : 1; /*Repeat the animation infinitely*/ /*Animation system use these - user shouldn't set*/ diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index af7c105aa6fe..c0ac143356ed 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -206,10 +206,6 @@ lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_p new_lv_task->user_data = user_data; -#if LV_USE_USER_DATA_MULTI - new_lv_task->task_user_data = NULL; -#endif - task_created = true; return new_lv_task; diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 0a01a6acf91c..67b219a71565 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -59,10 +59,6 @@ typedef struct _lv_task_t void * user_data; -#if LV_USE_USER_DATA_MULTI - void * task_user_data; -#endif - uint8_t prio : 3; uint8_t once : 1; } lv_task_t; From de824833a00bbb6a113080995e0b5eaae2dde514 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 18:51:31 +0200 Subject: [PATCH 399/590] remove LV_USE_USER_DATA_SINGE to LV_USE_USER_DATA --- lv_conf_template.h | 2 +- src/lv_conf_checker.h | 4 ++-- src/lv_core/lv_group.c | 4 ++-- src/lv_core/lv_group.h | 4 ++-- src/lv_core/lv_obj.c | 8 ++++---- src/lv_core/lv_obj.h | 4 ++-- src/lv_draw/lv_img_decoder.h | 4 ++-- src/lv_hal/lv_hal_disp.h | 2 +- src/lv_hal/lv_hal_indev.h | 2 +- src/lv_misc/lv_anim.h | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index baa076c03008..c9a8a62d0f99 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -149,7 +149,7 @@ typedef void * lv_group_user_data_t; typedef void * lv_img_decoder_user_data_t; /*1: Add a `user_data` to drivers and objects*/ -#define LV_USE_USER_DATA_SINGLE 1 +#define LV_USE_USER_DATA 1 /*===================== * Compiler settings diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index e7f975b54790..8be7b83d9f34 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -205,8 +205,8 @@ #endif /*1: Add a `user_data` to drivers and objects*/ -#ifndef LV_USE_USER_DATA_SINGLE -#define LV_USE_USER_DATA_SINGLE 1 +#ifndef LV_USE_USER_DATA +#define LV_USE_USER_DATA 1 #endif /*===================== diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 98c36a825e1d..fd5f25753631 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -74,7 +74,7 @@ lv_group_t * lv_group_create(void) group->refocus_policy = LV_GROUP_REFOCUS_POLICY_PREV; group->wrap = 1; -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA memset(&group->user_data, 0, sizeof(lv_group_user_data_t)); #endif @@ -403,7 +403,7 @@ lv_obj_t * lv_group_get_focused(const lv_group_t * group) return *group->obj_focus; } -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA /** * Get a pointer to the group's user data * @param group pointer to an group diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 8827325e9910..89d71ee8b1d0 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -61,7 +61,7 @@ typedef struct _lv_group_t lv_group_style_mod_cb_t style_mod_edit_cb; /*A function which modifies the style of the edited object*/ lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ lv_style_t style_tmp; /*Stores the modified style of the focused object */ -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_group_user_data_t user_data; #endif @@ -211,7 +211,7 @@ lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style); */ lv_obj_t * lv_group_get_focused(const lv_group_t * group); -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA /** * Get a pointer to the group's user data * @param group pointer to an group diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 5735e081047a..5bbd838c1f0b 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -185,7 +185,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) new_obj->event_cb = NULL; /*Init. user date*/ -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif @@ -267,7 +267,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #endif /*Init. user date*/ -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA memset(&new_obj->user_data, 0, sizeof(lv_obj_user_data_t)); #endif @@ -306,7 +306,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) #endif /*Set free data*/ -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA memcpy(&new_obj->user_data, ©->user_data, sizeof(lv_obj_user_data_t)); #endif /*Copy realign*/ @@ -1958,7 +1958,7 @@ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf) } } -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA /** * Get the object's user data diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 2e1debe91cc4..47aad3231dd0 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -219,7 +219,7 @@ typedef struct _lv_obj_t lv_reailgn_t realign; #endif -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_obj_user_data_t user_data; #endif @@ -896,7 +896,7 @@ void * lv_obj_get_ext_attr(const lv_obj_t * obj); */ void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf); -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA /** * Get the object's user data * @param obj pointer to an object diff --git a/src/lv_draw/lv_img_decoder.h b/src/lv_draw/lv_img_decoder.h index 058360323d69..2dc6227bf204 100644 --- a/src/lv_draw/lv_img_decoder.h +++ b/src/lv_draw/lv_img_decoder.h @@ -155,7 +155,7 @@ typedef struct _lv_img_decoder { lv_img_decoder_read_line_f_t read_line_cb; lv_img_decoder_close_f_t close_cb; -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_img_decoder_user_data_t user_data; #endif }lv_img_decoder_t; @@ -168,7 +168,7 @@ typedef struct _lv_img_decoder_dsc { lv_img_src_t src_type; lv_img_header_t header; -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA void * user_data; #endif }lv_img_decoder_dsc_t; diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index e541d4279895..ba35b6c67db5 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -99,7 +99,7 @@ typedef struct _disp_drv_t const lv_area_t * fill_area, lv_color_t color); #endif -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_disp_drv_user_data_t user_data; #endif diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index 97ab836e602d..cea6ebba7186 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -81,7 +81,7 @@ typedef struct _lv_indev_drv_t /*Called when an action happened on the input device.*/ void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_indev_drv_user_data_t user_data; #endif diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index a86052e14aae..39d65c5bc1c8 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -67,7 +67,7 @@ typedef struct _lv_anim_t int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ uint16_t playback_pause; /*Wait before play back*/ uint16_t repeat_pause; /*Wait before repeat*/ -#if LV_USE_USER_DATA_SINGLE +#if LV_USE_USER_DATA lv_anim_user_data_t user_data; /*Custom user data*/ #endif From 5a712931efb20bcea8a3f95aef02be488fd5180e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 15 May 2019 18:58:01 +0200 Subject: [PATCH 400/590] lv_page: fix vertical scrollbar position --- src/lv_objx/lv_page.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 49dc461439a1..e243add98c01 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -1124,15 +1124,16 @@ static void lv_page_sb_refresh(lv_obj_t * page) return; } - /*Horizontal scrollbar*/ + /*Full sized horizontal scrollbar*/ if(scrl_w <= - obj_w - style->body.padding.left - style->body.padding.right) { /*Full sized scroll bar*/ + obj_w - style->body.padding.left - style->body.padding.right) { lv_area_set_width(&ext->sb.hor_area, obj_w - 2 * sb_hor_pad); lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, - obj_h - ext->sb.style->body.padding.inner - - ext->sb.style->body.padding.bottom); + obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0; - } else { + } + /*Smaller horizontal scrollbar*/ + else { size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + style->body.padding.left + style->body.padding.right); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; @@ -1149,16 +1150,16 @@ static void lv_page_sb_refresh(lv_obj_t * page) if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; } - /*Vertical scrollbar*/ - if(scrl_h <= - obj_h - style->body.padding.top - style->body.padding.bottom) { /*Full sized scroll bar*/ + /*Full sized vertical scroll bar*/ + if(scrl_h <= obj_h - style->body.padding.top - style->body.padding.bottom) { lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad); lv_area_set_pos(&ext->sb.ver_area, - obj_w - ext->sb.style->body.padding.inner - - ext->sb.style->body.padding.right, + obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; - } else { + } + /*Smaller vertical scroll bar*/ + else { size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + style->body.padding.top + style->body.padding.bottom); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; @@ -1166,7 +1167,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) lv_area_set_pos( &ext->sb.ver_area, - obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom, + obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * (obj_h - size_tmp - 2 * sb_ver_pad)) / From c1b8c2f522ca113bb8b3b67405564382b60fed14 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 16 May 2019 10:27:45 +0200 Subject: [PATCH 401/590] imgbtn: follow image decder changes --- src/lv_objx/lv_imgbtn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index 58a03b1c6107..952644087e0f 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -281,7 +281,7 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig src = ext->img_src_left[state]; if(src) { - lv_img_dsc_get_info(src, &header); + lv_img_decoder_get_info(src, &header); left_w = header.w; coords.x1 = imgbtn->coords.x1; coords.y1 = imgbtn->coords.y1; @@ -292,7 +292,7 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig src = ext->img_src_right[state]; if(src) { - lv_img_dsc_get_info(src, &header); + lv_img_decoder_get_info(src, &header); right_w = header.w; coords.x1 = imgbtn->coords.x2 - header.w + 1; coords.y1 = imgbtn->coords.y1; @@ -305,7 +305,7 @@ static bool lv_imgbtn_design(lv_obj_t * imgbtn, const lv_area_t * mask, lv_desig if(src) { lv_coord_t obj_w = lv_obj_get_width(imgbtn); lv_coord_t i; - lv_img_dsc_get_info(src, &header); + lv_img_decoder_get_info(src, &header); coords.x1 = imgbtn->coords.x1 + left_w; coords.y1 = imgbtn->coords.y1; From 04df148f0c55dfb421b9628841479493a7513549 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 16 May 2019 15:30:52 +0200 Subject: [PATCH 402/590] add comments to lv_img_decoder --- src/lv_draw/lv_img_decoder.c | 152 ++++++++++++++++++++++------------- src/lv_draw/lv_img_decoder.h | 108 +++++++++++++++++++++++-- 2 files changed, 198 insertions(+), 62 deletions(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index 5822be982c90..bf10848f4809 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -81,59 +81,13 @@ void lv_img_decoder_init(void) lv_img_decoder_set_close_cb(decoder, lv_img_decoder_built_in_close); } -lv_img_decoder_t * lv_img_decoder_create(void) -{ - lv_img_decoder_t * decoder; - decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll)); - lv_mem_assert(decoder); - if(decoder == NULL) return NULL; - - memset(decoder, 0, sizeof(lv_img_decoder_t)); - - return decoder; -} - -void lv_img_decoder_delete(lv_img_decoder_t * decoder) -{ - lv_ll_rem(&LV_GC_ROOT(_lv_img_defoder_ll), decoder); - lv_mem_free(decoder); -} - -void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb) -{ - decoder->info_cb = info_cb; -} - -void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb) -{ - decoder->open_cb = open_cb; -} - -void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb) -{ - decoder->read_line_cb = read_line_cb; -} - -void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb) -{ - decoder->close_cb = close_cb; -} - -void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data) -{ - memcpy(&decoder->user_data, &user_data, sizeof(user_data)); -} - -lv_img_decoder_user_data_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder) -{ - return decoder->user_data; -} - -lv_img_decoder_user_data_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder) -{ - return &decoder->user_data; -} - +/** + * Get information about an image. + * Try the created image decoder one by one. Once one is able to get info that info will be used. + * @param src the image source. E.g. file name or variable. + * @param header the image info will be stored here + * @return LV_RES_OK: success; LV_RES_INV: wasn't able to get info about the image + */ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) { header->always_zero = 0; @@ -151,6 +105,19 @@ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) return res; } +/** + * Open an image. + * Try the created image decoder one by one. Once one is able to open the image that decoder is save in `dsc` + * @param dsc describe a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable. + * @param src the image source. Can be + * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`) + * 2) Variable: Pointer to an `lv_img_dsc_t` variable + * 3) Symbol: E.g. `LV_SYMBOL_OK` + * @param style the style of the image + * @return LV_IMG_DECODER_OPEN_FAIL: can open the image + * NULL: the image is opened but `lv_img_decoder_read_line` needs to be used to get the info line by line + * Else: a pointer to a buffer which holds the uncompressed pixels of the image + */ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style) { dsc->style = style; @@ -175,6 +142,15 @@ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src return res; } +/** + * Read a line from an opened image + * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param x start X coordinate (from left) + * @param y start Y coordinate (from top) + * @param len number of pixels to read + * @param buf store the data here + * @return LV_RES_OK: success; LV_RES_INV: an error occurred + */ lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { lv_res_t res = LV_RES_INV; @@ -183,17 +159,85 @@ lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_c return res; } +/** + * Close a decoding session + * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + */ void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc) { if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc); } +/** + * Create a new image decoder + * @return pointer to the new image decoder + */ +lv_img_decoder_t * lv_img_decoder_create(void) +{ + lv_img_decoder_t * decoder; + decoder = lv_ll_ins_head(&LV_GC_ROOT(_lv_img_defoder_ll)); + lv_mem_assert(decoder); + if(decoder == NULL) return NULL; + + memset(decoder, 0, sizeof(lv_img_decoder_t)); + + return decoder; +} + +/** + * Delete an image decoder + * @param decoder pointer to an image decoder + */ +void lv_img_decoder_delete(lv_img_decoder_t * decoder) +{ + lv_ll_rem(&LV_GC_ROOT(_lv_img_defoder_ll), decoder); + lv_mem_free(decoder); +} + +/** + * Set a callback to get information about the image + * @param decoder pointer to an image decoder + * @param info_cb a function to collect info about an image (fill an `lv_img_header_t` struct) + */ +void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb) +{ + decoder->info_cb = info_cb; +} + +/** + * Set a callback to open an image + * @param decoder pointer to an image decoder + * @param open_cb a function to open an image + */ +void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb) +{ + decoder->open_cb = open_cb; +} + +/** + * Set a callback to a decoded line of an image + * @param decoder pointer to an image decoder + * @param read_line_cb a function to read a line of an image + */ +void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb) +{ + decoder->read_line_cb = read_line_cb; +} + +/** + * Set a callback to close a decoding session. E.g. close files and free other resources. + * @param decoder pointer to an image decoder + * @param close_cb a function to close a decoding session + */ +void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb) +{ + decoder->close_cb = close_cb; +} /********************** * STATIC FUNCTIONS **********************/ - static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) { (void)decoder; /*Unused*/ diff --git a/src/lv_draw/lv_img_decoder.h b/src/lv_draw/lv_img_decoder.h index 2dc6227bf204..8112478695bc 100644 --- a/src/lv_draw/lv_img_decoder.h +++ b/src/lv_draw/lv_img_decoder.h @@ -179,31 +179,123 @@ typedef struct _lv_img_decoder_dsc { /** * Initialize the image decoder module - * */ + */ void lv_img_decoder_init(void); +/** + * Get information about an image. + * Try the created image decoder one by one. Once one is able to get info that info will be used. + * @param src the image source. Can be + * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`) + * 2) Variable: Pointer to an `lv_img_dsc_t` variable + * 3) Symbol: E.g. `LV_SYMBOL_OK` + * @param header the image info will be stored here + * @return LV_RES_OK: success; LV_RES_INV: wasn't able to get info about the image + */ +lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header); + +/** + * Open an image. + * Try the created image decoder one by one. Once one is able to open the image that decoder is save in `dsc` + * @param dsc describe a decoding session. Simply a pointer to an `lv_img_decoder_dsc_t` variable. + * @param src the image source. Can be + * 1) File name: E.g. "S:folder/img1.png" (The drivers needs to registered via `lv_fs_add_drv()`) + * 2) Variable: Pointer to an `lv_img_dsc_t` variable + * 3) Symbol: E.g. `LV_SYMBOL_OK` + * @param style the style of the image + * @return LV_IMG_DECODER_OPEN_FAIL: can open the image + * NULL: the image is opened but `lv_img_decoder_read_line` needs to be used to get the info line by line + * Else: a pointer to a buffer which holds the uncompressed pixels of the image + */ +const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style); + +/** + * Read a line from an opened image + * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + * @param x start X coordinate (from left) + * @param y start Y coordinate (from top) + * @param len number of pixels to read + * @param buf store the data here + * @return LV_RES_OK: success; LV_RES_INV: an error occurred + */ +lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); + +/** + * Close a decoding session + * @param dsc pointer to `lv_img_decoder_dsc_t` used in `lv_img_decoder_open` + */ +void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc); + +/** + * Create a new image decoder + * @return pointer to the new image decoder + */ lv_img_decoder_t * lv_img_decoder_create(void); +/** + * Delete an image decoder + * @param decoder pointer to an image decoder + */ void lv_img_decoder_delete(lv_img_decoder_t * decoder); +/** + * Set a callback to get information about the image + * @param decoder pointer to an image decoder + * @param info_cb a function to collect info about an image (fill an `lv_img_header_t` struct) + */ void lv_img_decoder_set_info_cb(lv_img_decoder_t * decoder, lv_img_decoder_info_f_t info_cb); +/** + * Set a callback to open an image + * @param decoder pointer to an image decoder + * @param open_cb a function to open an image + */ void lv_img_decoder_set_open_cb(lv_img_decoder_t * decoder, lv_img_decoder_open_f_t open_cb); +/** + * Set a callback to a decoded line of an image + * @param decoder pointer to an image decoder + * @param read_line_cb a function to read a line of an image + */ void lv_img_decoder_set_read_line_cb(lv_img_decoder_t * decoder, lv_img_decoder_read_line_f_t read_line_cb); +/** + * Set a callback to close a decoding session. E.g. close files and free other resources. + * @param decoder pointer to an image decoder + * @param close_cb a function to close a decoding session + */ void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_close_f_t close_cb); -void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data); -lv_img_decoder_user_data_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder); -lv_img_decoder_user_data_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder); +/** + * Set a custom user data in an image decoder. + * @param decoder pointer to an image decoder + * @param user_data the user data to set + */ +static inline void lv_img_decoder_set_user_data(lv_img_decoder_t * decoder, lv_img_decoder_t user_data) +{ + memcpy(&decoder->user_data, &user_data, sizeof(user_data)); +} -lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header); -const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style); +/** + * Get the user data + * @param decoder pointer to an image decoder + * @return the user data + */ +static inline lv_img_decoder_user_data_t lv_img_decoder_get_user_data(lv_img_decoder_t * decoder) +{ + return decoder->user_data; +} -lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +/** + * Get a pointer to the user data + * @param decoder pointer to an image decoder + * @return pointer to the user data + */ +static inline lv_img_decoder_user_data_t * lv_img_decoder_get_user_data_ptr(lv_img_decoder_t * decoder) +{ + return &decoder->user_data; +} -void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc); /********************** * MACROS **********************/ From bd15b805db64d228368443047d680fbf5be909de Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Thu, 16 May 2019 19:42:50 -0400 Subject: [PATCH 403/590] Apply fix from #1064 to dev-6.0 Fix mixup of SB and SCRL styles in lv_list_get_style --- src/lv_objx/lv_list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 3d7e9dee4a1b..6d06470a7600 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -582,8 +582,8 @@ const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type switch(type) { case LV_LIST_STYLE_BG: style = lv_page_get_style(list, LV_PAGE_STYLE_BG); break; - case LV_LIST_STYLE_SCRL: style = lv_page_get_style(list, LV_PAGE_STYLE_SB); break; - case LV_LIST_STYLE_SB: style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); break; + case LV_LIST_STYLE_SCRL: style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); break; + case LV_LIST_STYLE_SB: style = lv_page_get_style(list, LV_PAGE_STYLE_SB); break; case LV_LIST_STYLE_EDGE_FLASH: style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); break; From e421e08c2fadbc4f81846c5634c8e96f49346ddb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 07:39:56 +0200 Subject: [PATCH 404/590] remove unused lv_img_decoder_set_custom --- src/lv_draw/lv_draw_img.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index d8e9271764f8..5db721af7ea5 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -49,18 +49,6 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * */ lv_img_src_t lv_img_src_get_type(const void * src); -/** - * Set custom decoder functions. See the typdefs of the function typed above for more info about - * them - * @param info_fp info get function - * @param open_fp open function - * @param read_fp read line function - * @param close_fp clode function - */ -void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp, - lv_img_decoder_read_line_f_t read_fp, - lv_img_decoder_close_f_t close_fp); - /** * Get the color of an image's pixel * @param dsc an image descriptor From 4c623cae445a88c2157922164d6bed8a6ac324d8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 07:50:00 +0200 Subject: [PATCH 405/590] add lv_anim_del_custom --- src/lv_misc/lv_anim.c | 4 ++-- src/lv_misc/lv_anim.h | 24 ++++++++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 77251a40c7c7..5d8288c3c5c4 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -112,7 +112,7 @@ void lv_anim_create(lv_anim_t * a) * or NULL to delete all animations of 'var' * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_exec_cb_t fp) +bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb) { lv_anim_t * a; lv_anim_t * a_next; @@ -122,7 +122,7 @@ bool lv_anim_del(void * var, lv_anim_exec_cb_t fp) /*'a' might be deleted, so get the next object while 'a' is valid*/ a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a); - if(a->var == var && (a->exec_cb == fp || fp == NULL)) { + if(a->var == var && (a->exec_cb == exec_cb || exec_cb == NULL)) { lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a); lv_mem_free(a); anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 39d65c5bc1c8..a4bdbeec106d 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -255,13 +255,29 @@ static inline lv_anim_user_data_t * lv_anim_get_user_data_ptr(lv_anim_t * a) void lv_anim_create(lv_anim_t * a); /** - * Delete an animation for a variable with a given animatior function + * Delete an animation of a variable with a given animator function * @param var pointer to variable - * @param fp a function pointer which is animating 'var', - * or NULL to ignore it and delete all animation with 'var + * @param exec_cb a function pointer which is animating 'var', + * or NULL to ignore it and delete all the animations of 'var * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_exec_cb_t fp); +bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb); + +/** + * Delete an aniamation by getting the animated variable from `a`. + * Only animations with `exec_cb` will be deleted. + * This function exist becasue it's logical that all anim functions receives an + * `lv_anim_t` as their first parameter. It's not practical in C but might makes + * the API more conequent and makes easier to genrate bindings. + * @param a pointer to an animation. + * @param exec_cb a function pointer which is animating 'var', + * or NULL to ignore it and delete all the animations of 'var + * @return true: at least 1 animation is deleted, false: no animation is deleted + */ +static inline bool lv_anim_del_custom(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) +{ + return lv_anim_del(a->var, (lv_anim_exec_cb_t)exec_cb); +} /** * Get the number of currently running animations From b926fd496605c1b7068e54b2f9330f9e7daf90a7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 07:58:47 +0200 Subject: [PATCH 406/590] add lv_task_set_cb --- src/lv_core/lv_obj.c | 2 +- src/lv_misc/lv_anim.c | 6 +++--- src/lv_misc/lv_task.c | 12 +++++++++++- src/lv_misc/lv_task.h | 21 ++++++++++++++++++--- 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 5bbd838c1f0b..667eb5ad240a 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -82,7 +82,7 @@ void lv_init(void) /*Initialize the lv_misc modules*/ lv_mem_init(); - lv_task_init(); + lv_task_core_init(); #if LV_USE_FILESYSTEM lv_fs_init(); diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 5d8288c3c5c4..40e9eec8b6db 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -106,10 +106,10 @@ void lv_anim_create(lv_anim_t * a) } /** - * Delete an animation for a variable with a given animator function + * Delete an animation of a variable with a given animator function * @param var pointer to variable - * @param fp a function pointer which is animating 'var', - * or NULL to delete all animations of 'var' + * @param exec_cb a function pointer which is animating 'var', + * or NULL to delete all the animations of 'var' * @return true: at least 1 animation is deleted, false: no animation is deleted */ bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb) diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index c0ac143356ed..c68b5d0e36db 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -49,7 +49,7 @@ static bool task_created; /** * Init the lv_task module */ -void lv_task_init(void) +void lv_task_core_init(void) { lv_ll_init(&LV_GC_ROOT(_lv_task_ll), sizeof(lv_task_t)); @@ -211,6 +211,16 @@ lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_p return new_lv_task; } +/** + * Set the callback the task (the function to call periodically) + * @param task pointer to a task + * @param task_cb teh function to call periodically + */ +void lv_task_set_cb(lv_task_t * task, lv_task_cb_t task_cb) +{ + task->task_cb = task_cb; +} + /** * Delete a lv_task * @param lv_task_p pointer to task created by lv_task_p diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 67b219a71565..3224500329b4 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -34,6 +34,14 @@ extern "C" { /********************** * TYPEDEFS **********************/ + +struct _lv_task_t; + +/** + * Tasks execte this type type of functions. + */ +typedef void (*lv_task_cb_t)(struct _lv_task_t *); + /** * Possible priorities for lv_tasks */ @@ -55,7 +63,7 @@ typedef struct _lv_task_t { uint32_t period; uint32_t last_run; - void (*task_cb)(struct _lv_task_t *); + lv_task_cb_t task_cb; void * user_data; @@ -70,7 +78,7 @@ typedef struct _lv_task_t /** * Init the lv_task module */ -void lv_task_init(void); +void lv_task_core_init(void); /** * Call it periodically to handle lv_tasks. @@ -85,7 +93,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); * @param user_data custom parameter * @return pointer to the new task_cb */ -lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_prio_t prio, void * user_data); +lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data); /** * Delete a lv_task @@ -93,6 +101,13 @@ lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_p */ void lv_task_del(lv_task_t * lv_task_p); +/** + * Set the callback the task (the function to call periodically) + * @param task pointer to a task + * @param taack_cb teh function to call periodically + */ +void lv_task_set_cb(lv_task_t * task, lv_task_cb_t taack_cb); + /** * Set new priority for a lv_task * @param lv_task_p pointer to a lv_task From e525c08a0c692cd36b661d6dd6d187f32ef6a815 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 08:01:22 +0200 Subject: [PATCH 407/590] rename lv_anim_del_custom to lv_anim_custom_del --- src/lv_misc/lv_anim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index a4bdbeec106d..552b7ac145bf 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -274,7 +274,7 @@ bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb); * or NULL to ignore it and delete all the animations of 'var * @return true: at least 1 animation is deleted, false: no animation is deleted */ -static inline bool lv_anim_del_custom(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) +static inline bool lv_anim_custom_del(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { return lv_anim_del(a->var, (lv_anim_exec_cb_t)exec_cb); } From c136382be324d2909c49e8eccca1b948588963bf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 08:29:38 +0200 Subject: [PATCH 408/590] add lv_task_create_basic --- src/lv_misc/lv_task.c | 148 +++++++++++++++++++++++++----------------- src/lv_misc/lv_task.h | 35 ++++++---- 2 files changed, 109 insertions(+), 74 deletions(-) diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index c68b5d0e36db..4b35e399793f 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -20,6 +20,8 @@ * DEFINES *********************/ #define IDLE_MEAS_PERIOD 500 /*[ms]*/ +#define DEF_PRIO LV_TASK_PRIO_MID +#define DEF_PERIOD 500 /********************** * TYPEDEFS @@ -28,7 +30,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static bool lv_task_exec(lv_task_t * lv_task_p); +static bool lv_task_exec(lv_task_t * task); /********************** * STATIC VARIABLES @@ -159,56 +161,80 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) LV_LOG_TRACE("lv_task_handler ready"); } - /** - * Create a new lv_task - * @param task a function which is the task itself - * @param period call period in ms unit - * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) - * @param user_data custom parameter - * @return pointer to the new task + * Create an "empty" task. It needs to initialzed with at least + * `lv_task_set_cb` and `lv_task_set_period` + * @return pointer to the craeted task */ -lv_task_t * lv_task_create(void (*task)(lv_task_t *), uint32_t period, lv_task_prio_t prio, void * user_data) +lv_task_t * lv_task_create_basic(void) { - lv_task_t * new_lv_task = NULL; + lv_task_t * new_task = NULL; lv_task_t * tmp; /*Create task lists in order of priority from high to low*/ tmp = lv_ll_get_head(&LV_GC_ROOT(_lv_task_ll)); - if(NULL == tmp) { /*First task*/ - new_lv_task = lv_ll_ins_head(&LV_GC_ROOT(_lv_task_ll)); - lv_mem_assert(new_lv_task); - if(new_lv_task == NULL) return NULL; - } else { + + /*It's the first task*/ + if(NULL == tmp) { + new_task = lv_ll_ins_head(&LV_GC_ROOT(_lv_task_ll)); + lv_mem_assert(new_task); + if(new_task == NULL) return NULL; + } + /*Insert the new task to proper place according to its priority*/ + else { do { - if(tmp->prio <= prio) { - new_lv_task = lv_ll_ins_prev(&LV_GC_ROOT(_lv_task_ll), tmp); - lv_mem_assert(new_lv_task); - if(new_lv_task == NULL) return NULL; + if(tmp->prio <= DEF_PRIO) { + new_task = lv_ll_ins_prev(&LV_GC_ROOT(_lv_task_ll), tmp); + lv_mem_assert(new_task); + if(new_task == NULL) return NULL; break; } tmp = lv_ll_get_next(&LV_GC_ROOT(_lv_task_ll), tmp); } while(tmp != NULL); - if(tmp == NULL) { /*Only too high priority tasks were found*/ - new_lv_task = lv_ll_ins_tail(&LV_GC_ROOT(_lv_task_ll)); - lv_mem_assert(new_lv_task); - if(new_lv_task == NULL) return NULL; + /*Only too high priority tasks were found. Add the task to the end*/ + if(tmp == NULL) { + new_task = lv_ll_ins_tail(&LV_GC_ROOT(_lv_task_ll)); + lv_mem_assert(new_task); + if(new_task == NULL) return NULL; } } - new_lv_task->period = period; - new_lv_task->task_cb = task; - new_lv_task->prio = prio; + new_task->period = DEF_PERIOD; + new_task->task_cb = NULL; + new_task->prio = DEF_PRIO; - new_lv_task->once = 0; - new_lv_task->last_run = lv_tick_get(); + new_task->once = 0; + new_task->last_run = lv_tick_get(); - new_lv_task->user_data = user_data; + new_task->user_data= NULL; task_created = true; - return new_lv_task; + return new_task; +} + + +/** + * Create a new lv_task + * @param task a function which is the task itself + * @param period call period in ms unit + * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) + * @param user_data custom parameter + * @return pointer to the new task + */ +lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data) +{ + lv_task_t * new_task = lv_task_create_basic(); + lv_mem_assert(new_task); + if(new_task == NULL) return NULL; + + lv_task_set_cb(new_task, task_cb); + lv_task_set_period(new_task, period); + lv_task_set_prio(new_task, prio); + new_task->user_data = user_data; + + return new_task; } /** @@ -223,78 +249,80 @@ void lv_task_set_cb(lv_task_t * task, lv_task_cb_t task_cb) /** * Delete a lv_task - * @param lv_task_p pointer to task created by lv_task_p + * @param task pointer to task created by task */ -void lv_task_del(lv_task_t * lv_task_p) +void lv_task_del(lv_task_t * task) { - lv_ll_rem(&LV_GC_ROOT(_lv_task_ll), lv_task_p); + lv_ll_rem(&LV_GC_ROOT(_lv_task_ll), task); - lv_mem_free(lv_task_p); + lv_mem_free(task); - if(LV_GC_ROOT(_lv_task_act) == lv_task_p) task_deleted = true; /*The active task was deleted*/ + if(LV_GC_ROOT(_lv_task_act) == task) task_deleted = true; /*The active task was deleted*/ } /** * Set new priority for a lv_task - * @param lv_task_p pointer to a lv_task + * @param task pointer to a lv_task * @param prio the new priority */ -void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio) +void lv_task_set_prio(lv_task_t * task, lv_task_prio_t prio) { + if(task->prio == prio) return; + /*Find the tasks with new priority*/ lv_task_t * i; LV_LL_READ(LV_GC_ROOT(_lv_task_ll), i) { if(i->prio <= prio) { - if(i != lv_task_p) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, i); + if(i != task) lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, i); break; } } /*There was no such a low priority so far then add the node to the tail*/ if(i == NULL) { - lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), lv_task_p, NULL); + lv_ll_move_before(&LV_GC_ROOT(_lv_task_ll), task, NULL); } - lv_task_p->prio = prio; + task->prio = prio; } /** * Set new period for a lv_task - * @param lv_task_p pointer to a lv_task + * @param task pointer to a lv_task * @param period the new period */ -void lv_task_set_period(lv_task_t * lv_task_p, uint32_t period) +void lv_task_set_period(lv_task_t * task, uint32_t period) { - lv_task_p->period = period; + task->period = period; } /** * Make a lv_task ready. It will not wait its period. - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_ready(lv_task_t * lv_task_p) +void lv_task_ready(lv_task_t * task) { - lv_task_p->last_run = lv_tick_get() - lv_task_p->period - 1; + task->last_run = lv_tick_get() - task->period - 1; } /** * Delete the lv_task after one call - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_once(lv_task_t * lv_task_p) +void lv_task_once(lv_task_t * task) { - lv_task_p->once = 1; + task->once = 1; } /** * Reset a lv_task. * It will be called the previously set period milliseconds later. - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_reset(lv_task_t * lv_task_p) +void lv_task_reset(lv_task_t * task) { - lv_task_p->last_run = lv_tick_get(); + task->last_run = lv_tick_get(); } /** @@ -321,25 +349,25 @@ uint8_t lv_task_get_idle(void) /** * Execute task if its the priority is appropriate - * @param lv_task_p pointer to lv_task + * @param task pointer to lv_task * @return true: execute, false: not executed */ -static bool lv_task_exec(lv_task_t * lv_task_p) +static bool lv_task_exec(lv_task_t * task) { bool exec = false; /*Execute if at least 'period' time elapsed*/ - uint32_t elp = lv_tick_elaps(lv_task_p->last_run); - if(elp >= lv_task_p->period) { - lv_task_p->last_run = lv_tick_get(); + uint32_t elp = lv_tick_elaps(task->last_run); + if(elp >= task->period) { + task->last_run = lv_tick_get(); task_deleted = false; task_created = false; - lv_task_p->task_cb(lv_task_p); + if(task->task_cb) task->task_cb(task); /*Delete if it was a one shot lv_task*/ if(task_deleted == false) { /*The task might be deleted by itself as well*/ - if(lv_task_p->once != 0) { - lv_task_del(lv_task_p); + if(task->once != 0) { + lv_task_del(task); } } exec = true; diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 3224500329b4..7a814a6ff5f8 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -85,21 +85,28 @@ void lv_task_core_init(void); */ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void); +/** + * Create an "empty" task. It needs to initialzed with at least + * `lv_task_set_cb` and `lv_task_set_period` + * @return pointer to the craeted task + */ +lv_task_t * lv_task_create_basic(void); + /** * Create a new lv_task * @param task a function which is the task itself * @param period call period in ms unit * @param prio priority of the task (LV_TASK_PRIO_OFF means the task is stopped) * @param user_data custom parameter - * @return pointer to the new task_cb + * @return pointer to the new task */ -lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data); +lv_task_t * lv_task_create(lv_task_cb_t task_cb, uint32_t period, lv_task_prio_t prio, void * user_data); /** * Delete a lv_task - * @param lv_task_p pointer to task_cb created by lv_task_p + * @param task pointer to task_cb created by task */ -void lv_task_del(lv_task_t * lv_task_p); +void lv_task_del(lv_task_t * task); /** * Set the callback the task (the function to call periodically) @@ -110,36 +117,36 @@ void lv_task_set_cb(lv_task_t * task, lv_task_cb_t taack_cb); /** * Set new priority for a lv_task - * @param lv_task_p pointer to a lv_task + * @param task pointer to a lv_task * @param prio the new priority */ -void lv_task_set_prio(lv_task_t * lv_task_p, lv_task_prio_t prio); +void lv_task_set_prio(lv_task_t * task, lv_task_prio_t prio); /** * Set new period for a lv_task - * @param lv_task_p pointer to a lv_task + * @param task pointer to a lv_task * @param period the new period */ -void lv_task_set_period(lv_task_t * lv_task_p, uint32_t period); +void lv_task_set_period(lv_task_t * task, uint32_t period); /** * Make a lv_task ready. It will not wait its period. - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_ready(lv_task_t * lv_task_p); +void lv_task_ready(lv_task_t * task); /** * Delete the lv_task after one call - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_once(lv_task_t * lv_task_p); +void lv_task_once(lv_task_t * task); /** * Reset a lv_task. * It will be called the previously set period milliseconds later. - * @param lv_task_p pointer to a lv_task. + * @param task pointer to a lv_task. */ -void lv_task_reset(lv_task_t * lv_task_p); +void lv_task_reset(lv_task_t * task); /** * Enable or disable the whole lv_task handling From 1f334ba88be7a5f4c60a6882cf7355118aca6b74 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 08:29:51 +0200 Subject: [PATCH 409/590] mbox: close anim bugfix --- src/lv_objx/lv_mbox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index cb9de0e2a253..2a5aa026eceb 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -218,6 +218,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) lv_anim_create(&a); a.start = lv_obj_get_width(mbox); + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_width; a.ready_cb = lv_mbox_close_ready_cb; lv_anim_create(&a); From b842db91aa9932cfe14ba31af082cd98cb753c98 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 08:42:25 +0200 Subject: [PATCH 410/590] lv_ll_move_before: bugfix --- src/lv_misc/lv_ll.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c index 755a76ccbe49..438afedd100f 100644 --- a/src/lv_misc/lv_ll.c +++ b/src/lv_misc/lv_ll.c @@ -355,6 +355,9 @@ void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after) /*If `n_act` was moved before NULL then it become the new tail*/ if(n_after == NULL) ll_p->tail = n_act; + + /*If `n_act` was moved before `NULL` then it's the new head*/ + if(n_before == NULL) ll_p->head = n_act; } /** From 1ef0c197cdd725a682f5140c66efb1fe45762e1d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 09:03:53 +0200 Subject: [PATCH 411/590] built-in img decodder read line bug fix --- src/lv_draw/lv_img_decoder.c | 40 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index bf10848f4809..a66303cbf17f 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -417,27 +417,29 @@ static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, l lv_res_t res = LV_RES_INV; - if(dsc->src_type == LV_IMG_SRC_FILE) { - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) + { + /* For TRUE_COLOE images read line required only for files. + * For variables the image data was returned in `open`*/ + if(dsc->src_type == LV_IMG_SRC_FILE) { res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf); - } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { - - res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf); - } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { - res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf); - } else { - LV_LOG_WARN("Built-in image decoder read not supports the color format"); - return false; } + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + + res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf); + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf); + } else { + LV_LOG_WARN("Built-in image decoder read not supports the color format"); + return false; } return res; From ca19c7d92faa25486d518f157b279ec01389576e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 17 May 2019 16:59:12 +0200 Subject: [PATCH 412/590] minor formatting --- src/lv_objx/lv_list.c | 6 +++++- src/lv_objx/lv_list.h | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 6d06470a7600..3e5c8de0c08f 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -288,7 +288,8 @@ void lv_list_set_single_mode(lv_obj_t * list, bool mode) /** * Make a button selected * @param list pointer to a list object - * @param btn pointer to a button to selectthe + * @param btn pointer to a button to select + * NULL to not select any buttons */ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) { @@ -303,6 +304,9 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) } ext->selected_btn = btn; + + /*Don't forgat whci hbutton was selected. + * It will be restored when the list is focused.*/ if(btn != NULL) { ext->last_sel = btn; } diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 982d6d2a1369..b828884b2744 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -58,8 +58,7 @@ typedef struct uint32_t size; /*the number of items(buttons) in the list*/ bool single_mode; /* whether single selected mode is enabled */ #if LV_USE_GROUP - lv_obj_t * - last_sel; /* The last selected button. It will be reverted when the list is focused again */ + lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ lv_obj_t * selected_btn; /* The button is currently being selected*/ #endif } lv_list_ext_t; From cb6a4527a92621388f8c3843330c9a4389a37e6a Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Fri, 17 May 2019 09:12:30 -0700 Subject: [PATCH 413/590] lv_img_decoder.c Wrap filesystem calls in LV_USE_FILESYSTEM macro --- src/lv_draw/lv_draw_img.c | 1 + src/lv_draw/lv_img_decoder.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 0986f1af4969..d7f6071b1732 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -7,6 +7,7 @@ * INCLUDES *********************/ #include "lv_draw_img.h" +#include "lv_log.h" /********************* * DEFINES diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index a66303cbf17f..6bdb3a733e57 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -24,7 +24,9 @@ * TYPEDEFS **********************/ typedef struct { +#if LV_USE_FILESYSTEM lv_fs_file_t * f; +#endif lv_color_t * palette; }lv_img_decoder_built_in_data_t; @@ -92,7 +94,7 @@ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) { header->always_zero = 0; - lv_res_t res; + lv_res_t res = LV_RES_INV; lv_img_decoder_t * d; LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) { res = LV_RES_INV; @@ -315,7 +317,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, memcpy(user_data->f, &f, sizeof(f)); #else - LV_LOG_WARN("Image built-in decoder can read file because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder cannot read file because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } @@ -355,7 +357,9 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, user_data->palette = lv_mem_alloc(sizeof(palette_size * sizeof(lv_color_t))); if(user_data->palette == NULL) { LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); +#if LV_USE_FILESYSTEM lv_mem_assert(user_data->f); +#endif } #if LV_USE_FILESYSTEM lv_color32_t palette_tmp[256]; @@ -451,7 +455,9 @@ static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_dec lv_img_decoder_built_in_data_t * user_data = dsc->user_data; if(user_data) { +#if LV_USE_FILESYSTEM if(user_data->f) lv_mem_free(user_data->f); +#endif if(user_data->palette) lv_mem_free(user_data->palette); lv_mem_free(user_data); @@ -464,6 +470,7 @@ static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_dec static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { +#if LV_USE_FILESYSTEM lv_img_decoder_built_in_data_t * user_data = dsc->user_data; lv_fs_res_t res; uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf); @@ -484,6 +491,10 @@ static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * d } return LV_RES_OK; +#else + LV_LOG_WARN("Image built-in decoder cannot read file because LV_USE_FILESYSTEM = 0"); + return LV_RES_INV; +#endif } static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, From 42b546a6d7f912132ac02762d3eb9c87e266c8ae Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Sat, 18 May 2019 01:31:29 +0300 Subject: [PATCH 414/590] Fixed include path. Fixed typos --- src/lv_draw/lv_draw_img.c | 2 +- src/lv_misc/lv_task.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index d7f6071b1732..466037da06d4 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_draw_img.h" -#include "lv_log.h" +#include "../lv_misc/lv_log.h" /********************* * DEFINES diff --git a/src/lv_misc/lv_task.h b/src/lv_misc/lv_task.h index 7a814a6ff5f8..7b5c2f3dfc3c 100644 --- a/src/lv_misc/lv_task.h +++ b/src/lv_misc/lv_task.h @@ -111,9 +111,9 @@ void lv_task_del(lv_task_t * task); /** * Set the callback the task (the function to call periodically) * @param task pointer to a task - * @param taack_cb teh function to call periodically + * @param task_cb the function to call periodically */ -void lv_task_set_cb(lv_task_t * task, lv_task_cb_t taack_cb); +void lv_task_set_cb(lv_task_t * task, lv_task_cb_t task_cb); /** * Set new priority for a lv_task From f16561295b928301593b7340c3de29a81437f6b6 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 11:21:16 +0200 Subject: [PATCH 415/590] add LV_EVENT_CB_DECLARE --- src/lv_core/lv_obj.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 47aad3231dd0..3a01aed6ebce 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -941,6 +941,8 @@ bool lv_obj_is_focused(const lv_obj_t * obj); * MACROS **********************/ +#define LV_EVENT_CB_DECLARE(name) void name(lv_obj_t * obj, lv_event_t e) + #ifdef __cplusplus } /* extern "C" */ #endif From 432e87bfdf411282e562784ffa441f61f14c6e5b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 11:21:20 +0200 Subject: [PATCH 416/590] minor formatting --- src/lv_objx/lv_list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index b828884b2744..5d6c2985fc11 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -132,9 +132,10 @@ void lv_list_set_single_mode(lv_obj_t * list, bool mode); #if LV_USE_GROUP /** - * Make a button selected. Can be used while navigating in the list with a keypad. + * Make a button selected * @param list pointer to a list object * @param btn pointer to a button to select + * NULL to not select any buttons */ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn); #endif From 077a645a92048c3042d1ae2447a9a09c28d5f692 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 13:39:41 +0200 Subject: [PATCH 417/590] font: add kerning tables --- src/lv_misc/lv_font.h | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index c2733e33ddb0..e2fd43a2c0e9 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -42,14 +42,6 @@ extern "C" { * General types *-----------------*/ -/*One element of a kerning table*/ -typedef struct { - uint32_t next_unicode :23; - - uint32_t space :8; /*5 integer, 4 fractional*/ - uint32_t space_sign :1; /*0: space positive; 1: space negative*/ -}lv_font_kern_t; - /*Describe the properties of a glyph*/ typedef struct { @@ -59,7 +51,6 @@ typedef struct int8_t ofs_x; /*x offset of the bounding box*/ int8_t ofs_y; /*y offset of the bounding box*/ uint8_t bpp; /*Bit-per-pixel: 1, 2, 4, 8*/ - const lv_font_kern_t * kern_table; }lv_font_glyph_dsc_t; /*Describe the properties of a font*/ @@ -98,7 +89,6 @@ typedef struct int8_t ofs_x; /*x offset of the bounding box*/ int8_t ofs_y; /*y offset of the bounding box*/ - const lv_font_kern_t * kern_table; }lv_font_glyph_dsc_built_in_t; typedef struct { @@ -117,6 +107,21 @@ typedef struct { uint16_t * unicode_list; }lv_font_cmap_built_in_t; +typedef struct { + uint16_t * left_gylph_ids; + uint16_t * right_gylph_ids; + uint8_t * values; + uint16_t pair_num; +}lv_font_kern_pair_t; + +typedef struct { + uint8_t left_class_num; + uint8_t right_class_num; + uint8_t * class_pair_values; /*left_class_num * right_class_num value*/ + uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ +}lv_font_kern_classes_t; + /*Describe store additional data for fonts */ typedef struct { const uint8_t * glyph_bitmap; @@ -129,6 +134,12 @@ typedef struct { /*Number of cmap tables*/ uint8_t cmap_num; + /* Sotore kerning values. Only one oft hese pointer can have a valid values. + * to other should be `NULL` */ + const lv_font_kern_pair_t * kern_table; + const lv_font_kern_classes_t * kern_classes; + + /*Bit per pixel: 1, 2, 4 or 8*/ uint8_t bpp; }lv_font_dsc_built_in_t; From d8edbb8a41dd581c8a488a5acf8538be9627aaaf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 13:48:13 +0200 Subject: [PATCH 418/590] minor formatting --- src/lv_core/lv_obj.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 3a01aed6ebce..367d9b4920e6 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -941,6 +941,20 @@ bool lv_obj_is_focused(const lv_obj_t * obj); * MACROS **********************/ +/** + * Helps to quickly declare an event callback function. + * Will be expanded to: `void (lv_obj_t * obj, lv_event_t e)` + * + * Examples: + * static LV_EVENT_CB_DECLARE(my_event1); //Protoype declaration + * + * static LV_EVENT_CB_DECLARE(my_event1) + * { + * if(e == LV_EVENT_CLICKED) { + * lv_obj_set_hidden(obj ,true); + * } + * } + */ #define LV_EVENT_CB_DECLARE(name) void name(lv_obj_t * obj, lv_event_t e) #ifdef __cplusplus From 234fa342547034c491675e5d481073cec1a0e526 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 13:48:27 +0200 Subject: [PATCH 419/590] add lv_log_print_g_cb_t --- src/lv_misc/lv_log.c | 16 ++++++++-------- src/lv_misc/lv_log.h | 15 ++++++++++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/lv_misc/lv_log.c b/src/lv_misc/lv_log.c index 67680b855a27..2d12da4e1b19 100644 --- a/src/lv_misc/lv_log.c +++ b/src/lv_misc/lv_log.c @@ -27,7 +27,7 @@ /********************** * STATIC VARIABLES **********************/ -static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *); +static lv_log_print_g_cb_t custom_print_cb; /********************** * MACROS @@ -38,14 +38,14 @@ static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *); **********************/ /** - * Register custom print (or anything else) function to call when log is added - * @param f a function pointer: - * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * - * dsc)` + * Register custom print/write function to call when a log is added. + * It can format its "File path", "Line number" and "Description" as required + * and send the formatted log message to a consol or serial port. + * @param print_cb a function pointer to print a log */ -void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)) +void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) { - print_cb = f; + custom_print_cb = print_cb; } /** @@ -65,7 +65,7 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error"}; printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line); #else - if(print_cb) print_cb(level, file, line, dsc); + if(custom_print_cb) custom_print_cb(level, file, line, dsc); #endif } } diff --git a/src/lv_misc/lv_log.h b/src/lv_misc/lv_log.h index 26557cae8507..5292b746d336 100644 --- a/src/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -39,17 +39,22 @@ typedef int8_t lv_log_level_t; * TYPEDEFS **********************/ +/** + * Log print function. Receives "File path", "Line number" and "Description". + */ +typedef void (*lv_log_print_g_cb_t) (const char *, uint32_t, const char *); + /********************** * GLOBAL PROTOTYPES **********************/ /** - * Register custom print (or anything else) function to call when log is added - * @param f a function pointer: - * `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * - * dsc)` + * Register custom print/write function to call when a log is added. + * It can format its "File path", "Line number" and "Description" as required + * and send the formatted log message to a consol or serial port. + * @param print_cb a function pointer to print a log */ -void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *)); +void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb); /** * Add a log From f7bc8c2328e3a2210e757fe8b311693e1ce83600 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 18 May 2019 14:03:44 +0200 Subject: [PATCH 420/590] theme: update group styles in lv_theme_set_current --- src/lv_draw/lv_draw_img.c | 2 +- src/lv_themes/lv_theme.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index d7f6071b1732..466037da06d4 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -7,7 +7,7 @@ * INCLUDES *********************/ #include "lv_draw_img.h" -#include "lv_log.h" +#include "../lv_misc/lv_log.h" /********************* * DEFINES diff --git a/src/lv_themes/lv_theme.c b/src/lv_themes/lv_theme.c index 4f6c54e288a7..21cc38c2d050 100644 --- a/src/lv_themes/lv_theme.c +++ b/src/lv_themes/lv_theme.c @@ -57,6 +57,15 @@ void lv_theme_set_current(lv_theme_t * th) { #if LV_THEME_LIVE_UPDATE == 0 current_theme = th; + +#if LV_USE_GROUP + /*Copy group style modification callback functions*/ + memcpy(¤t_theme->group, &th->group, sizeof(th->group)); +#endif + + /*Let the object know their style might change*/ + lv_obj_report_style_mod(NULL); + #else uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/ @@ -87,10 +96,10 @@ void lv_theme_set_current(lv_theme_t * th) /*Let the object know their style might change*/ lv_obj_report_style_mod(NULL); -#if LV_USE_GROUP - lv_group_report_style_mod(NULL); #endif +#if LV_USE_GROUP + lv_group_report_style_mod(NULL); #endif } From 80760c46698461da3f55fe09e530ca287519cc8c Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sat, 18 May 2019 11:44:50 -0700 Subject: [PATCH 421/590] Fix LV_OBJX_DEF_ANIM_TIME guards --- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_roller.c | 2 +- src/lv_objx/lv_tabview.c | 2 +- src/lv_objx/lv_tileview.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index ed2def291a31..ff6beda09b01 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -22,7 +22,7 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -#ifndef LV_DDLIST_ANIM_TIME +#ifndef LV_DDLIST_DEF_ANIM_TIME #define LV_DDLIST_DEF_ANIM_TIME 200 /*ms*/ #endif #else diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 533b0c1a4a05..9d098463a245 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -17,7 +17,7 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -#ifndef LV_ROLLER_ANIM_TIME +#ifndef LV_ROLLER_DEF_ANIM_TIME #define LV_ROLLER_DEF_ANIM_TIME 200 /*ms*/ #endif #else diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d5d1066839a6..fad7969ce37a 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -18,7 +18,7 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -#ifndef LV_TABVIEW_ANIM_TIME +#ifndef LV_TABVIEW_DEF_ANIM_TIME #define LV_TABVIEW_DEF_ANIM_TIME \ 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ #endif diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index f4a95938019b..055d72acb62d 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -17,7 +17,7 @@ * DEFINES *********************/ #if LV_USE_ANIMATION -#ifndef LV_TILEVIEW_ANIM_TIME +#ifndef LV_TILEVIEW_DEF_ANIM_TIME #define LV_TILEVIEW_DEF_ANIM_TIME 300 /*Animation time loading a tile [ms] (0: no animation) */ #endif #else From 89a2856d6e2639f1aa04c931d27a4f48bc8d1993 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Sat, 18 May 2019 22:54:10 +0300 Subject: [PATCH 422/590] Add missing 'log level' argument to log callback --- src/lv_misc/lv_log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_misc/lv_log.h b/src/lv_misc/lv_log.h index 5292b746d336..4deb8f8d4aa7 100644 --- a/src/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -40,9 +40,9 @@ typedef int8_t lv_log_level_t; **********************/ /** - * Log print function. Receives "File path", "Line number" and "Description". + * Log print function. Receives "Log Level", "File path", "Line number" and "Description". */ -typedef void (*lv_log_print_g_cb_t) (const char *, uint32_t, const char *); +typedef void (*lv_log_print_g_cb_t) (lv_log_level_t level, const char *, uint32_t, const char *); /********************** * GLOBAL PROTOTYPES From f28efdd9f3b0ba8efdb2ff6a4f44267470098810 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sat, 18 May 2019 18:14:21 -0700 Subject: [PATCH 423/590] Change int32_t to int16_t in animation functions to fix warnings --- src/lv_core/lv_style.c | 6 +++--- src/lv_objx/lv_bar.c | 10 +++++----- src/lv_objx/lv_btn.c | 16 ++++++++-------- src/lv_objx/lv_ddlist.c | 4 ++-- src/lv_objx/lv_page.c | 6 ++---- src/lv_objx/lv_preload.c | 22 +++++++++++----------- src/lv_objx/lv_preload.h | 4 ++-- 7 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 2d6b67fdaa71..9e3f8ad38ca5 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -31,7 +31,7 @@ * STATIC PROTOTYPES **********************/ #if LV_USE_ANIMATION -static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val); +static void style_animator(lv_style_anim_dsc_t * dsc, int16_t val); static void style_animation_common_end_cb(lv_anim_t * a); #endif @@ -316,9 +316,9 @@ void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_styl /** * Used by the style animations to set the values of a style according to start and end style. * @param dsc the 'animated variable' set by lv_style_anim_create() - * @param val the current state of the animation between 0 and LV_STYLE_ANIM_RES + * @param val the current state of the animation between 0 and LV_ANIM_RESOLUTION */ -static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val) +static void style_animator(lv_style_anim_dsc_t * dsc, int16_t val) { const lv_style_t * start = &dsc->style_start; const lv_style_t * end = &dsc->style_end; diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index d53593855aee..2ecdd142d245 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -30,7 +30,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); -static void lv_bar_animate(void * bar, int32_t value); +static void lv_bar_anim(void * bar, int16_t value); static void lv_bar_anim_ready(lv_anim_t * a); /********************** @@ -158,9 +158,9 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) a.var = bar; a.start = LV_BAR_ANIM_STATE_START; a.end = LV_BAR_ANIM_STATE_END; - a.exec_cb = (lv_anim_exec_cb_t)lv_bar_animate; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_bar_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_bar_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_bar_anim_ready; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -475,7 +475,7 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) return res; } -static void lv_bar_animate(void * bar, int32_t value) +static void lv_bar_anim(void * bar, int16_t value) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); ext->anim_state = value; diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index a8f72ad38e8d..1d3700712fb2 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -35,7 +35,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT -static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val); +static void lv_btn_ink_effect_anim(lv_obj_t * btn, int16_t val); static void lv_btn_ink_effect_anim_ready(lv_anim_t * a); #endif @@ -517,9 +517,9 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = btn; a.start = 0; a.end = LV_BTN_INK_VALUE_MAX; - a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_btn_ink_effect_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; a.time = ext->ink_in_time; a.playback = 0; @@ -586,9 +586,9 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = ink_obj; a.start = LV_BTN_INK_VALUE_MAX; a.end = 0; - a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_btn_ink_effect_anim_ready; + a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; a.time = ext->ink_out_time; a.playback = 0; @@ -632,7 +632,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) * @param btn pointer to the animated button * @param val the new radius */ -static void lv_btn_ink_effect_anim(lv_obj_t * btn, int32_t val) +static void lv_btn_ink_effect_anim(lv_obj_t * btn, int16_t val) { if(btn) { ink_act_value = val; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index ff6beda09b01..0d2a9246512b 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -46,7 +46,7 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); static void lv_ddlist_refr_width(lv_obj_t* ddlist); static void lv_ddlist_anim_ready_cb(lv_anim_t * a); static void lv_ddlist_anim_finish(lv_obj_t* ddlist); -static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height); +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int16_t height); /********************** * STATIC VARIABLES @@ -937,7 +937,7 @@ static void lv_ddlist_anim_finish(lv_obj_t* ddlist) * @param ddlist Drop down list object * @param height New drop down list height */ -static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int32_t height) +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int16_t height) { lv_obj_set_height(ddlist, height); lv_ddlist_pos_current_option(ddlist); diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 361e33977630..641e202618cd 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -40,7 +40,7 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -static void edge_flash_anim(void * page, int32_t v); +static void edge_flash_anim(void * page, int16_t v); static void edge_flash_anim_end(lv_anim_t * a); static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event); @@ -435,10 +435,8 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) * because it can overide the current changes*/ lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_x); lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_y); - lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_pos); lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_x); lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_y); - lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_pos); #endif const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); @@ -1195,7 +1193,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) } } -static void edge_flash_anim(void * page, int32_t v) +static void edge_flash_anim(void * page, int16_t v) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.state = v; diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 4d8c0b8741e8..5986c8c8ffdb 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -127,7 +127,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) * @param preload pointer to a preload object * @param deg length of the arc */ -void lv_preload_set_arc_length(lv_obj_t * preload, uint16_t deg) +void lv_preload_set_arc_length(lv_obj_t * preload, int16_t deg) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); @@ -189,9 +189,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; - a.path_cb = lv_anim_path_ease_in_out; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.path_cb = lv_anim_path_ease_in_out; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->time; a.playback = 0; @@ -211,9 +211,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) b.start = ext->arc_length; b.end = 360 - ext->arc_length; } - b.exec_cb = (lv_anim_exec_cb_t)lv_preload_set_arc_length; - b.path_cb = lv_anim_path_ease_in_out; - b.ready_cb = NULL; + b.exec_cb = (lv_anim_exec_cb_t)lv_preload_set_arc_length; + b.path_cb = lv_anim_path_ease_in_out; + b.ready_cb = NULL; b.act_time = 0; b.time = ext->time; b.playback = 1; @@ -237,9 +237,9 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; - a.path_cb = lv_anim_path_ease_in_out; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.path_cb = lv_anim_path_ease_in_out; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->time; a.playback = 0; @@ -328,7 +328,7 @@ lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload) { * @param ptr pointer to preloader * @param val the current desired value [0..360] */ -void lv_preload_spinner_anim(void * ptr, int32_t val) +void lv_preload_spinner_anim(void * ptr, int16_t val) { lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 3590f3d1cfef..25b1b37b97e5 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -92,7 +92,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy); * @param preload pointer to a preload object * @param deg length of the arc */ -void lv_preload_set_arc_length(lv_obj_t * preload, uint16_t deg); +void lv_preload_set_arc_length(lv_obj_t * preload, int16_t deg); /** * Set the spin time of the arc @@ -175,7 +175,7 @@ lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload); * @param type which style should be get * @return style pointer to the style * */ -void lv_preload_spinner_anim(void * ptr, int32_t val); +void lv_preload_spinner_anim(void * ptr, int16_t val); /********************** * MACROS From 8c5c8ed82a9996cefeecadc99f349f440eb457de Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 19 May 2019 10:00:59 +0430 Subject: [PATCH 424/590] defining lv_group_remove_all_objs `lv_group_remove_all_objs` is a function for removing all objects from a group and making it free of objects. --- src/lv_core/lv_group.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index fd5f25753631..9a3cb6b35c18 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -193,6 +193,28 @@ void lv_group_remove_obj(lv_obj_t * obj) } } +/** + * remove all objects from a group + * @param group pointer to a group + */ +void lv_group_remove_all_objs(lv_group_t * group) +{ + /*Defocus the the currently focused object*/ + if(group->obj_focus != NULL) { + (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + lv_obj_invalidate(*group->obj_focus); + group->obj_focus = NULL; + } + + /*Remove the objects from the group*/ + lv_obj_t ** obj; + LV_LL_READ(group->obj_ll, obj) { + (*obj)->group_p = NULL; + } + + lv_ll_clear(&(group->obj_ll)); +} + /** * Focus on an object (defocus the current) * @param obj pointer to an object to focus on From 90b8bc95977748c5dabb5e06a761f2d7d4f2eebd Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 19 May 2019 10:03:57 +0430 Subject: [PATCH 425/590] declaring the `lv_group_remove_all_objs` function. --- src/lv_core/lv_group.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 89d71ee8b1d0..5fa8ce61d003 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -113,6 +113,12 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj); */ void lv_group_remove_obj(lv_obj_t * obj); +/** + * remove all objects from a group + * @param group pointer to a group + */ +void lv_group_remove_all_objs(lv_group_t * group); + /** * Focus on an object (defocus the current) * @param obj pointer to an object to focus on From b6d24040bfbe38fa27f20c00afd742071f002abd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 19 May 2019 10:51:20 +0200 Subject: [PATCH 426/590] font thinking --- src/lv_misc/lv_font.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index e2fd43a2c0e9..ef992a08f159 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -102,6 +102,23 @@ typedef struct { /* First glyph ID (array index of `glyph_dsc`) for this range */ uint16_t glyph_id_start; + /* Format 0 tiny + * glyph_id = glyph_id_start + (codepoint - range_start) */ + + /* Format 0 full + * glyph_id = glyph_id_start + glyph_id_list[codepoint - range_start] */ + + /* Sparse tiny + * glyph_id = glyph_id_start + search(unicode_list, codepoint - range_start) */ + + /* Sparse full + * glyph_id = glyph_id_start + glyph_id_list[search(unicode_list, codepoint - range_start)] */ + + uint16_t * unicode_list; + + + + /* NULL: the range is mapped continuously from `glyph_id_start` * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ uint16_t * unicode_list; From b0a4fd7dadca9c4f611bbbe25f5130e34c66a9af Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 19 May 2019 10:56:21 +0200 Subject: [PATCH 427/590] calendar: optimize cover check in the design function --- src/lv_core/lv_obj.c | 4 ++-- src/lv_objx/lv_calendar.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 1ca30a7069e2..2d2702ac3fd1 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -2051,12 +2051,12 @@ static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mo { if(mode == LV_DESIGN_COVER_CHK) { - /*Most trivial test. The mask is fully IN the object? If no it surely not covers it*/ + /*Most trivial test. Is the mask fully IN the object? If no it surely doesn't cover it*/ if(lv_area_is_in(mask_p, &obj->coords) == false) return false; /*Can cover the area only if fully solid (no opacity)*/ const lv_style_t * style = lv_obj_get_style(obj); - if(style->body.opa != LV_OPA_COVER) return false; + if(style->body.opa < LV_OPA_MAX) return false; /* Because of the radius it is not sure the area is covered * Check the areas where there is no radius*/ diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 510974d21831..e7aceaf2ce54 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -430,7 +430,7 @@ static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_d { /*Return false if the object is not covers the mask_p area*/ if(mode == LV_DESIGN_COVER_CHK) { - return false; + return ancestor_design(calendar, mask, mode); } /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { From 87979b5645444b23276fe417d9a5f17334710119 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 19 May 2019 13:55:24 +0430 Subject: [PATCH 428/590] Update src/lv_core/lv_group.c Co-Authored-By: Gabor Kiss-Vamosi --- src/lv_core/lv_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 9a3cb6b35c18..f71819672bb4 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -194,7 +194,7 @@ void lv_group_remove_obj(lv_obj_t * obj) } /** - * remove all objects from a group + * Remove all objects from a group * @param group pointer to a group */ void lv_group_remove_all_objs(lv_group_t * group) From aed05f26e488b49a496e175db324f7e613fc5998 Mon Sep 17 00:00:00 2001 From: Ali Rostami <9710249+ali-rostami@users.noreply.github.com> Date: Sun, 19 May 2019 13:55:34 +0430 Subject: [PATCH 429/590] Update src/lv_core/lv_group.h Co-Authored-By: Gabor Kiss-Vamosi --- src/lv_core/lv_group.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 5fa8ce61d003..43bc8d12c9ea 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -114,7 +114,7 @@ void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj); void lv_group_remove_obj(lv_obj_t * obj); /** - * remove all objects from a group + * Remove all objects from a group * @param group pointer to a group */ void lv_group_remove_all_objs(lv_group_t * group); From 7bbe91512a42b0e0c1f6dfe30a873bbbe15a3483 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Sun, 19 May 2019 10:56:34 -0700 Subject: [PATCH 430/590] indev.c: indev_obj_focused initial commit to correctly reset indev query when a callback changed the currently focused object and deletes the old one. Only tested on keypad indev, other indev types may need a similar fix re-using the indev_obj_focused variable --- src/lv_core/lv_indev.c | 213 ++++++++++++++++++++++------------------- src/lv_core/lv_indev.h | 7 ++ src/lv_core/lv_obj.c | 19 +--- 3 files changed, 128 insertions(+), 111 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index f2ab53c3c0d1..f00282a3a21a 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -47,10 +47,23 @@ static void indev_drag_throw(lv_indev_proc_t * proc); * STATIC VARIABLES **********************/ static lv_indev_t * indev_act; +#if LV_USE_GROUP +static lv_obj_t * indev_obj_focused = NULL; +#endif /********************** * MACROS **********************/ +/* Return if the lv_indev_proc_t proc reset_query is true, indicating that the object may have been deleted*/ +#if LV_USE_GROUP +#define CHECK_INDEV_RESET(proc) \ + if((proc).reset_query) { \ + indev_obj_focused = NULL; \ + return; \ + } while(0) +#else +#define CHECK_INDEV_RESET(proc) if((proc).reset_query) return; while(0) +#endif /********************** * GLOBAL FUNCTIONS @@ -310,6 +323,14 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev) return indev->refr_task; } +lv_obj_t * lv_indev_get_obj_focused() { +#if LV_USE_GROUP + return indev_obj_focused; +#else + return NULL; +#endif +} + /********************** * STATIC FUNCTIONS **********************/ @@ -360,8 +381,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_t * g = i->group; if(g == NULL) return; - lv_obj_t * focused = lv_group_get_focused(g); - if(focused == NULL) return; + indev_obj_focused = lv_group_get_focused(g); + if(indev_obj_focused == NULL) return; /*Save the last key to compare it with the current latter on RELEASE*/ uint32_t prev_key = i->proc.types.keypad.last_key; @@ -385,30 +406,30 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send the ENTER as a normal KEY*/ lv_group_send_data(g, LV_KEY_ENTER); - focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); + lv_event_send(indev_obj_focused, LV_EVENT_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); } else if(data->key == LV_KEY_ESC) { /*Send the ESC as a normal KEY*/ lv_group_send_data(g, LV_KEY_ESC); - lv_event_send(focused, LV_EVENT_CANCEL, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_CANCEL, NULL); + CHECK_INDEV_RESET(i->proc); } /*Move the focus on NEXT*/ else if(data->key == LV_KEY_NEXT) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(i->proc); } /*Move the focus on PREV*/ else if(data->key == LV_KEY_PREV) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(i->proc); } /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/ else { @@ -423,10 +444,10 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 1; if(data->key == LV_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS, NULL); + CHECK_INDEV_RESET(i->proc); + lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); } } /*Long press repeated time has elapsed?*/ @@ -437,29 +458,29 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send LONG_PRESS_REP on ENTER*/ if(data->key == LV_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS_REP, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS_REP, NULL); + CHECK_INDEV_RESET(i->proc); + lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + CHECK_INDEV_RESET(i->proc); } /*Move the focus on NEXT again*/ else if(data->key == LV_KEY_NEXT) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(i->proc); } /*Move the focus on PREV again*/ else if(data->key == LV_KEY_PREV) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - if(i->proc.reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(i->proc); } /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { lv_group_send_data(g, data->key); - if(i->proc.reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(i->proc); } } } @@ -469,23 +490,24 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) data->key = prev_key; if(data->key == LV_KEY_ENTER) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); if(i->proc.long_pr_sent == 0) { - lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); } - lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); } i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } + indev_obj_focused = NULL; #else (void)data; /*Unused*/ (void)i; /*Unused*/ @@ -519,10 +541,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_t * g = i->group; if(g == NULL) return; - lv_obj_t * focused = lv_group_get_focused(g); - if(focused == NULL) return; - - + indev_obj_focused = lv_group_get_focused(g); + if(indev_obj_focused == NULL) return; /*Process the steps first. They are valid only with released button*/ if(data->state == LV_INDEV_STATE_REL) { @@ -547,21 +567,21 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/ - focused = lv_group_get_focused(g); - if(focused == NULL) return; + indev_obj_focused = lv_group_get_focused(g); + if(indev_obj_focused == NULL) return; /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_REL) { bool editable = false; - focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { - focused->signal_cb(focused, LV_SIGNAL_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); } } /*Pressing*/ @@ -570,7 +590,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; - focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); /*On enter long press toggle edit mode.*/ if(editable) { @@ -583,10 +603,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*If not editable then just send a long press signal*/ else { - focused->signal_cb(focused, LV_SIGNAL_LONG_PRESS, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ - lv_event_send(focused, LV_EVENT_LONG_PRESSED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS, NULL); + CHECK_INDEV_RESET(i->proc); + lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED, NULL); + CHECK_INDEV_RESET(i->proc); } i->proc.long_pr_sent = 1; } @@ -596,37 +616,37 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) last_state == LV_INDEV_STATE_PR) { bool editable = false; - focused->signal_cb(focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); - if(i->proc.long_pr_sent == 0) lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); } /*An object is being edited and the button is released. */ else if(g->editing) { /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { - focused->signal_cb(focused, LV_SIGNAL_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_SHORT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_CLICKED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + CHECK_INDEV_RESET(i->proc); - lv_event_send(focused, LV_EVENT_RELEASED, NULL); - if(i->proc.reset_query) return; /*The object might be deleted*/ + lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + CHECK_INDEV_RESET(i->proc); lv_group_send_data(g, LV_KEY_ENTER); } @@ -640,7 +660,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } - + indev_obj_focused = NULL; #else (void)data; /*Unused*/ (void)i; /*Unused*/ @@ -713,9 +733,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ @@ -750,9 +770,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } } @@ -778,23 +798,23 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is active object and it can be dragged run the drag*/ if(proc->types.pointer.act_obj != NULL) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, - indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, + LV_SIGNAL_PRESSING, indev_act); + CHECK_INDEV_RESET(*proc); lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSING, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); indev_drag(proc); - if(proc->reset_query != 0) return; + CHECK_INDEV_RESET(*proc); /*If there is no drag then check for long press time*/ if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); /*Mark the signal sending to do not send it again*/ proc->long_pr_sent = 1; @@ -808,9 +828,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); proc->longpr_rep_timestamp = lv_tick_get(); } } @@ -840,41 +860,41 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); if(proc->types.pointer.drag_in_prog == 0) { if(proc->long_pr_sent == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } - if(proc->reset_query != 0) return; + CHECK_INDEV_RESET(*proc); /*Handle click focus*/ #if LV_USE_GROUP @@ -912,16 +932,15 @@ static void indev_proc_release(lv_indev_proc_t * proc) * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL); - if(proc->reset_query) - return; /*Not so strict as it's only the previous object and indev not uses it.*/ + CHECK_INDEV_RESET(*proc); lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); proc->types.pointer.last_pressed = proc->types.pointer.act_obj; } - if(proc->reset_query != 0) return; + CHECK_INDEV_RESET(*proc); proc->types.pointer.act_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; @@ -931,7 +950,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) * In case of reset query ignore the remaining parts.*/ if(proc->types.pointer.last_obj != NULL && proc->reset_query == 0) { indev_drag_throw(proc); - if(proc->reset_query != 0) return; + CHECK_INDEV_RESET(*proc); } } @@ -1094,9 +1113,9 @@ static void indev_drag(lv_indev_proc_t * state) /*Send the drag begin signal on first move*/ if(state->types.pointer.drag_in_prog == 0) { drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); - if(state->reset_query != 0) return; + CHECK_INDEV_RESET(*state); lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL); - if(state->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*state); } state->types.pointer.drag_in_prog = 1; @@ -1143,7 +1162,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); return; @@ -1183,9 +1202,9 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.x = 0; proc->types.pointer.drag_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } } /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end @@ -1193,8 +1212,8 @@ static void indev_drag_throw(lv_indev_proc_t * proc) else { proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - if(proc->reset_query) return; /*The object might be deleted*/ + CHECK_INDEV_RESET(*proc); } } diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index f1adeca88b01..761eeb74bc6e 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -141,6 +141,13 @@ void lv_indev_wait_release(lv_indev_t * indev); */ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); +/** + * Gets a pointer to the currently handled object. + * NULL if no object is currently being handled or if groups aren't used. + * @return pointer to currently focused object + */ +lv_obj_t * lv_indev_get_obj_focused(); + /********************** * MACROS **********************/ diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 1ca30a7069e2..ef9c8a582feb 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -378,13 +378,8 @@ lv_res_t lv_obj_del(lv_obj_t * obj) /*Delete from the group*/ #if LV_USE_GROUP - bool was_focused = false; lv_group_t * group = lv_obj_get_group(obj); - - if(group) { - if(lv_group_get_focused(group) == obj) was_focused = true; - lv_group_remove_obj(obj); - } + if(group) lv_group_remove_obj(obj); #endif /*Remove the animations from this object*/ @@ -432,7 +427,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } #if LV_USE_GROUP - if(indev->group == group && was_focused) { + if(indev->group == group && obj == lv_indev_get_obj_focused() ) { lv_indev_reset(indev); } #endif @@ -2197,15 +2192,11 @@ static void delete_children(lv_obj_t * obj) * the object still has access to all children during the * LV_SIGNAL_DEFOCUS call*/ #if LV_USE_GROUP - bool was_focused = false; lv_group_t * group = lv_obj_get_group(obj); - - if(group) { - if(lv_group_get_focused(obj->group_p) == obj) was_focused = true; - lv_group_remove_obj(obj); - } + if(group) lv_group_remove_obj(obj); #endif + while(i != NULL) { /*Get the next object before delete this*/ i_next = lv_ll_get_next(&(obj->child_ll), i); @@ -2239,7 +2230,7 @@ static void delete_children(lv_obj_t * obj) indev->proc.types.pointer.last_pressed = NULL; } #if LV_USE_GROUP - if(indev->group == group && was_focused) { + if(indev->group == group && obj == lv_indev_get_obj_focused() ) { lv_indev_reset(indev); } #endif From e8605a52ed1b0c9cb21ff8761dcbbab72ec4faee Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 20 May 2019 06:40:00 +0200 Subject: [PATCH 431/590] font: update fmt_txt --- src/lv_misc/lv_font.c | 130 ------------ src/lv_misc/lv_font.h | 114 ---------- src/lv_misc/lv_font_dummy.h | 246 ---------------------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 141 +++++++++++++ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 193 +++++++++++++++++ 5 files changed, 334 insertions(+), 490 deletions(-) delete mode 100644 src/lv_misc/lv_font_dummy.h create mode 100644 src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c create mode 100644 src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index 9de3fa9ba9e4..1b09975005fb 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -123,136 +123,6 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_o return false; } -/** - * Get the width of a glyph with kerning - * @param font pointer to a font - * @param letter an UNICODE letter - * @param letter_next the next letter after `letter`. Used for kerning - * @return the width of the glyph - */ -uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next) -{ - lv_font_glyph_dsc_t dsc; - bool ret = lv_font_get_glyph_dsc(font, &dsc, letter); - if(ret == false) return 0; - - int32_t w = dsc.adv_w; - - /*Apply kerning is required*/ - if(dsc.kern_table && letter_next != 0) { - uint32_t i; - for(i = 0; dsc.kern_table[i].next_unicode != 0; i++) { - if((uint32_t)dsc.kern_table[i].next_unicode == letter_next) { - if(dsc.kern_table[i].space_sign == LV_FONT_KERN_POSITIVE) { - w += dsc.kern_table[i].space; - } else { - w -= dsc.kern_table[i].space; - } - break; - } - } - } - - if(w < 0) w = 0; - - return w <= 0 ? 0 : LV_FONT_GET_WIDTH_INT(w); -} - -/** - * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. - * @param font pointer to font - * @param unicode_letter an unicode letter which bitmap should be get - * @return pointer to the bitmap or NULL if not found - */ -const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t unicode_letter) -{ - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - - lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; - - /*No Unicode list -> Continuous font*/ - if(font_dsc->unicode_list == NULL) { - uint32_t index = (unicode_letter - font->unicode_first); - return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[index].bitmap_index]; - } - /*Has Unicode list -> Sparse font */ - else { - uint16_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, - sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); - if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font_dsc->unicode_list); - return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[idx].bitmap_index]; - } - } - - /*If not returned earlier then the letter is not found in this font*/ - return NULL; -} - -/** - * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. - * @param font_p pointer to font - * @param dsc_out store the result descriptor here - * @param letter an UNICODE letter code - * @return true: descriptor is successfully loaded into `dsc_out`. - * false: the letter was not found, no data is loaded to `dsc_out` - */ -bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) -{ - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - - lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; - int32_t index = -1; - /*No Unicode list -> Continuous font*/ - if(font_dsc->unicode_list == NULL) { - index = (unicode_letter - font->unicode_first); - } - /*Has Unicode list -> Sparse font */ - else { - uint16_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, - sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); - - if(pUnicode != NULL) { - index = (uint16_t)(pUnicode - font_dsc->unicode_list); - } - } - - if(index > 0) { - dsc_out->adv_w = font_dsc->glyph_dsc[index].adv_w; - dsc_out->box_h = font_dsc->glyph_dsc[index].box_h; - dsc_out->box_w = font_dsc->glyph_dsc[index].box_w; - dsc_out->ofs_x = font_dsc->glyph_dsc[index].ofs_x; - dsc_out->ofs_y = font_dsc->glyph_dsc[index].ofs_y; - dsc_out->kern_table = font_dsc->glyph_dsc[index].kern_table; - dsc_out->bpp = font_dsc->bpp; - return true; - } else { - return false; - } -} - /********************** * STATIC FUNCTIONS **********************/ - -/** Code Comparator. - * - * Compares the value of both input arguments. - * - * @param[in] pRef Pointer to the reference. - * @param[in] pElement Pointer to the element to compare. - * - * @return Result of comparison. - * @retval < 0 Reference is greater than element. - * @retval = 0 Reference is equal to element. - * @retval > 0 Reference is less than element. - * - */ -static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) -{ - return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); -} diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index ef992a08f159..43a137c638bf 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -73,102 +73,10 @@ typedef struct _lv_font_struct void * dsc; /*Store implementation specific data here*/ } lv_font_t; - -/*--------------------------------------------- - * Types for LittlevGL's internal font format - *---------------------------------------------*/ - -/*Describe a glyph in internal font format */ -typedef struct -{ - uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ - - uint8_t box_w; /*Width of the glyph's bounding box*/ - uint8_t box_h; /*Height of the glyph's bounding box*/ - int8_t ofs_x; /*x offset of the bounding box*/ - int8_t ofs_y; /*y offset of the bounding box*/ - -}lv_font_glyph_dsc_built_in_t; - -typedef struct { - /* First Unicode character for this range */ - uint32_t range_start; - - /* Number of Unicode characters related to this range. - * Last Unicode character = range_start + range_length - 1*/ - uint16_t range_length; - - /* First glyph ID (array index of `glyph_dsc`) for this range */ - uint16_t glyph_id_start; - - /* Format 0 tiny - * glyph_id = glyph_id_start + (codepoint - range_start) */ - - /* Format 0 full - * glyph_id = glyph_id_start + glyph_id_list[codepoint - range_start] */ - - /* Sparse tiny - * glyph_id = glyph_id_start + search(unicode_list, codepoint - range_start) */ - - /* Sparse full - * glyph_id = glyph_id_start + glyph_id_list[search(unicode_list, codepoint - range_start)] */ - - uint16_t * unicode_list; - - - - - /* NULL: the range is mapped continuously from `glyph_id_start` - * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ - uint16_t * unicode_list; -}lv_font_cmap_built_in_t; - -typedef struct { - uint16_t * left_gylph_ids; - uint16_t * right_gylph_ids; - uint8_t * values; - uint16_t pair_num; -}lv_font_kern_pair_t; - -typedef struct { - uint8_t left_class_num; - uint8_t right_class_num; - uint8_t * class_pair_values; /*left_class_num * right_class_num value*/ - uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ - uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ -}lv_font_kern_classes_t; - -/*Describe store additional data for fonts */ -typedef struct { - const uint8_t * glyph_bitmap; - const lv_font_glyph_dsc_built_in_t * glyph_dsc; - - /* Map the glyphs to Unicode characters. - * Array of `lv_font_cmap_built_in_t` variables*/ - const lv_font_cmap_built_in_t * cmaps; - - /*Number of cmap tables*/ - uint8_t cmap_num; - - /* Sotore kerning values. Only one oft hese pointer can have a valid values. - * to other should be `NULL` */ - const lv_font_kern_pair_t * kern_table; - const lv_font_kern_classes_t * kern_classes; - - - /*Bit per pixel: 1, 2, 4 or 8*/ - uint8_t bpp; -}lv_font_dsc_built_in_t; - /********************** * GLOBAL PROTOTYPES **********************/ -/*---------------- - * General API - *---------------*/ - /** * Initialize the font module */ @@ -225,28 +133,6 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) return font_p->line_height; } -/*---------------------------------- - * LittlevGL's internal font format - *----------------------------------*/ - -/** - * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. - * @param font pointer to font - * @param unicode_letter an unicode letter which bitmap should be get - * @return pointer to the bitmap or NULL if not found - */ -const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t letter); - -/** - * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. - * @param font_p pointer to font - * @param dsc_out store the result descriptor here - * @param letter an UNICODE letter code - * @return true: descriptor is successfully loaded into `dsc_out`. - * false: the letter was not found, no data is loaded to `dsc_out` - */ -bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); - /********************** * MACROS **********************/ diff --git a/src/lv_misc/lv_font_dummy.h b/src/lv_misc/lv_font_dummy.h deleted file mode 100644 index c2733e33ddb0..000000000000 --- a/src/lv_misc/lv_font_dummy.h +++ /dev/null @@ -1,246 +0,0 @@ -/** - * @file lv_font.h - * - */ - -#ifndef LV_FONT_H -#define LV_FONT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - -#include -#include -#include - -#include "lv_symbol_def.h" - -/********************* - * DEFINES - *********************/ -/*Number of fractional digits in the advanced width (`adv_w`) field of `lv_font_glyph_dsc_t`*/ -#define LV_FONT_WIDTH_FRACT_DIGIT 4 - -#define LV_FONT_KERN_POSITIVE 0 -#define LV_FONT_KERN_NEGATIVE 1 - -/********************** - * TYPEDEFS - **********************/ - -/*------------------ - * General types - *-----------------*/ - -/*One element of a kerning table*/ -typedef struct { - uint32_t next_unicode :23; - - uint32_t space :8; /*5 integer, 4 fractional*/ - uint32_t space_sign :1; /*0: space positive; 1: space negative*/ -}lv_font_kern_t; - -/*Describe the properties of a glyph*/ -typedef struct -{ - uint16_t adv_w; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ - uint8_t box_w; /*Width of the glyph's bounding box*/ - uint8_t box_h; /*Height of the glyph's bounding box*/ - int8_t ofs_x; /*x offset of the bounding box*/ - int8_t ofs_y; /*y offset of the bounding box*/ - uint8_t bpp; /*Bit-per-pixel: 1, 2, 4, 8*/ - const lv_font_kern_t * kern_table; -}lv_font_glyph_dsc_t; - -/*Describe the properties of a font*/ -typedef struct _lv_font_struct -{ - uint32_t unicode_first; - uint32_t unicode_last; - - /*Get a glyph's descriptor from a font*/ - bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter); - - /*Get a glyph's bitmap from a font*/ - const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); - - /*Pointer to the font in a font pack (must have the same line height)*/ - struct _lv_font_struct * next_page; - uint8_t size; /*The original size (height)*/ - uint8_t line_height; /*The real line height where any text fits*/ - uint8_t base_line; /*Base line measured from the top of the line_height*/ - void * dsc; /*Store implementation specific data here*/ -} lv_font_t; - - -/*--------------------------------------------- - * Types for LittlevGL's internal font format - *---------------------------------------------*/ - -/*Describe a glyph in internal font format */ -typedef struct -{ - uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8 bit integer, 4 bit fractional */ - - uint8_t box_w; /*Width of the glyph's bounding box*/ - uint8_t box_h; /*Height of the glyph's bounding box*/ - int8_t ofs_x; /*x offset of the bounding box*/ - int8_t ofs_y; /*y offset of the bounding box*/ - - const lv_font_kern_t * kern_table; -}lv_font_glyph_dsc_built_in_t; - -typedef struct { - /* First Unicode character for this range */ - uint32_t range_start; - - /* Number of Unicode characters related to this range. - * Last Unicode character = range_start + range_length - 1*/ - uint16_t range_length; - - /* First glyph ID (array index of `glyph_dsc`) for this range */ - uint16_t glyph_id_start; - - /* NULL: the range is mapped continuously from `glyph_id_start` - * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ - uint16_t * unicode_list; -}lv_font_cmap_built_in_t; - -/*Describe store additional data for fonts */ -typedef struct { - const uint8_t * glyph_bitmap; - const lv_font_glyph_dsc_built_in_t * glyph_dsc; - - /* Map the glyphs to Unicode characters. - * Array of `lv_font_cmap_built_in_t` variables*/ - const lv_font_cmap_built_in_t * cmaps; - - /*Number of cmap tables*/ - uint8_t cmap_num; - - /*Bit per pixel: 1, 2, 4 or 8*/ - uint8_t bpp; -}lv_font_dsc_built_in_t; - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/*---------------- - * General API - *---------------*/ - -/** - * Initialize the font module - */ -void lv_font_init(void); - -/** - * Add a font to an other to extend the character set. - * @param child the font to add - * @param parent this font will be extended. Using it later will contain the characters from `child` - */ -void lv_font_add(lv_font_t * child, lv_font_t * parent); - -/** - * Remove a font from a character set. - * @param child the font to remove - * @param parent remove `child` from here - */ -void lv_font_remove(lv_font_t * child, lv_font_t * parent); - -/** - * Return with the bitmap of a font. - * @param font_p pointer to a font - * @param letter an UNICODE character code - * @return pointer to the bitmap of the letter - */ -const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter); - -/** - * Get the descriptor of a glyph - * @param font_p pointer to font - * @param dsc_out store the result descriptor here - * @param letter an UNICODE letter code - * @return true: descriptor is successfully loaded into `dsc_out`. - * false: the letter was not found, no data is loaded to `dsc_out` - */ -bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter); - -/** - * Get the width of a glyph with kerning - * @param font pointer to a font - * @param letter an UNICODE letter - * @param letter_next the next letter after `letter`. Used for kerning - * @return the width of the glyph - */ -uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); - -/** - * Get the line height of a font. All characters fit into this height - * @param font_p pointer to a font - * @return the height of a font - */ -static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) -{ - return font_p->line_height; -} - -/*---------------------------------- - * LittlevGL's internal font format - *----------------------------------*/ - -/** - * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. - * @param font pointer to font - * @param unicode_letter an unicode letter which bitmap should be get - * @return pointer to the bitmap or NULL if not found - */ -const uint8_t * lv_font_get_glyph_bitmap_plain(const lv_font_t * font, uint32_t letter); - -/** - * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. - * @param font_p pointer to font - * @param dsc_out store the result descriptor here - * @param letter an UNICODE letter code - * @return true: descriptor is successfully loaded into `dsc_out`. - * false: the letter was not found, no data is loaded to `dsc_out` - */ -bool lv_font_get_glyph_dsc_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); - -/********************** - * MACROS - **********************/ - -#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; - -#define LV_FONT_SET_WIDTH(_integer, _fract) ((_integer << LV_FONT_WIDTH_FRACT_DIGIT) + _fract) -#define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) -#define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) - -/********************** - * ADD BUILT IN FONTS - **********************/ -#include "../lv_fonts/lv_font_builtin.h" - -/*Declare the custom (user defined) fonts*/ -#ifdef LV_FONT_CUSTOM_DECLARE -LV_FONT_CUSTOM_DECLARE -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*USE_FONT*/ diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c new file mode 100644 index 000000000000..a1266c457c00 --- /dev/null +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -0,0 +1,141 @@ +/** + * @file lv_font.c + * + */ + +/********************* + * INCLUDES + *********************/ + +#include "lv_font.h" +#include "lv_log.h" +#include "lv_utils.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/********************** + * STATIC PROTOTYPES + **********************/ + +static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +/** + * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. + * @param font pointer to font + * @param unicode_letter an unicode letter which bitmap should be get + * @return pointer to the bitmap or NULL if not found + */ +const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uint32_t unicode_letter) +{ + /*Check the range*/ + if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; + + lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; + + /*No Unicode list -> Continuous font*/ + if(font_dsc->unicode_list == NULL) { + uint32_t index = (unicode_letter - font->unicode_first); + return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[index].bitmap_index]; + } + /*Has Unicode list -> Sparse font */ + else { + uint16_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, + sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); + if(pUnicode != NULL) { + uint32_t idx = (uint32_t)(pUnicode - font_dsc->unicode_list); + return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[idx].bitmap_index]; + } + } + + /*If not returned earlier then the letter is not found in this font*/ + return NULL; +} + +/** + * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` + */ +bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) +{ + /*Check the range*/ + if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; + + lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; + int32_t index = -1; + /*No Unicode list -> Continuous font*/ + if(font_dsc->unicode_list == NULL) { + index = (unicode_letter - font->unicode_first); + } + /*Has Unicode list -> Sparse font */ + else { + uint16_t * pUnicode; + pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, + sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); + + if(pUnicode != NULL) { + index = (uint16_t)(pUnicode - font_dsc->unicode_list); + } + } + + if(index > 0) { + dsc_out->adv_w = font_dsc->glyph_dsc[index].adv_w; + dsc_out->box_h = font_dsc->glyph_dsc[index].box_h; + dsc_out->box_w = font_dsc->glyph_dsc[index].box_w; + dsc_out->ofs_x = font_dsc->glyph_dsc[index].ofs_x; + dsc_out->ofs_y = font_dsc->glyph_dsc[index].ofs_y; + dsc_out->kern_table = font_dsc->glyph_dsc[index].kern_table; + dsc_out->bpp = font_dsc->bpp; + return true; + } else { + return false; + } +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +/** Code Comparator. + * + * Compares the value of both input arguments. + * + * @param[in] pRef Pointer to the reference. + * @param[in] pElement Pointer to the element to compare. + * + * @return Result of comparison. + * @retval < 0 Reference is greater than element. + * @retval = 0 Reference is equal to element. + * @retval > 0 Reference is less than element. + * + */ +static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) +{ + return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); +} diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h new file mode 100644 index 000000000000..0c3809f7d487 --- /dev/null +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -0,0 +1,193 @@ +/** + * @file lv_font.h + * + */ + +#ifndef LV_FONT_H +#define LV_FONT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#ifdef LV_CONF_INCLUDE_SIMPLE +#include "lv_conf.h" +#else +#include "../../../lv_conf.h" +#endif + +#include +#include +#include + +#include "../lv_font.h" + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +/*Describe a glyph*/ +typedef struct +{ + uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ + uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8.4 format. */ + + uint8_t box_w; /*Width of the glyph's bounding box*/ + uint8_t box_h; /*Height of the glyph's bounding box*/ + int8_t ofs_x; /*x offset of the bounding box*/ + uint8_t ofs_y; /*y offset of the bounding box. Measured from the top of the line*/ +}lv_font_glyph_dsc_fmt_txt_t; + +/* Map codepoints to a `glyph_dsc`s + * Several formats are supported to optimize memory usage + * See https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md + */ +typedef struct { + /* First Unicode character for this range */ + uint32_t range_start; + + /* Number of Unicode characters related to this range. + * Last Unicode character = range_start + range_length - 1*/ + uint16_t range_length; + + /* First glyph ID (array index of `glyph_dsc`) for this range */ + uint16_t glyph_id_start; + + /* + According the specification there are 4 formats: + https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md + + For simplicity introduce "relative code point": + rcp = codepoint - range_start + + and a search function: + search a "value" in an "array" and returns the index of "value". + + Format 0 tiny + unicode_list == NULL && glyph_id_list == NULL + glyph_id = glyph_id_start + rcp + + Format 0 full + unicode_list == NULL && glyph_id_list != NULL + glyph_id = glyph_id_start + glyph_id_list[rcp] + + Sparse tiny + unicode_list != NULL && glyph_id_list == NULL + glyph_id = glyph_id_start + search(unicode_list, rcp) + + Sparse full + unicode_list != NULL && glyph_id_list != NULL + glyph_id = glyph_id_start + glyph_id_list[search(unicode_list, rcp)] + */ + + uint16_t * unicode_list; + + /* if unicode_list == NULL uint8_t * + * else uint16_t * + */ + const void * glyph_id_list; +}lv_font_cmap_fmt_txt_t; + +/*A simple mapping of kern values from pairs*/ +typedef struct { + /*To get a kern value of two code points: + 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_cmap_built_in_t + 2 for(i = 0; i < pair_cnt; i++) + if(left_gylph_ids[i] == glyph_id_left && + right_gylph_ids[i] == glyph_id_right) + return values[i]; + */ + uint16_t * left_gylph_ids; + uint16_t * right_gylph_ids; + uint8_t * values; + uint16_t pair_cnt; +}lv_font_kern_pair_fmt_txt_t; + +/*More complex but more optimal class based kern value storage*/ +typedef struct { + /*To get a kern value of two code points: + 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_cmap_built_in_t + 2 Get the class of the left and right glyphs as `left_class` and `right_class` + for(i = 0; i < left_class_num; i++) + if(left_class_mapping[i] == glyph_id_left) + return i; + 3. value = class_pair_values[(left_class-1)*right_class_cnt + (righ_class-1)] + */ + + uint8_t * class_pair_values; /*left_class_num * right_class_num value*/ + uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + uint8_t left_class_cnt; + uint8_t right_class_cnt; +}lv_font_kern_classes_fmt_txt_t; + +/*Describe store additional data for fonts */ +typedef struct { + /*The bitmaps os all glyphs*/ + const uint8_t * glyph_bitmap; + + /*Describe the glyphs*/ + const lv_font_glyph_dsc_fmt_txt_t * glyph_dsc; + + /* Map the glyphs to Unicode characters. + * Array of `lv_font_cmap_fmt_txt_t` variables*/ + const lv_font_cmap_fmt_txt_t * cmaps; + + /* Sotore kerning values. + * Can be `lv_font_kern_pair_fmt_txt_t * or `lv_font_kern_classes_fmt_txt_t *` + * depending on `kern_classes` + * */ + const void * kern_dsc; + + /*Number of cmap tables*/ + uint16_t cmap_num :12; + + /*Bit per pixel: 1, 2, 4 or 8*/ + uint16_t bpp :3; + + /*Type of `kern_dsc`*/ + uint16_t kern_classes :1; +}lv_font_dsc_fmt_txt_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Used as `get_glyph_bitmap` callback in LittelvGL's native font format if the font is uncompressed. + * @param font pointer to font + * @param unicode_letter an unicode letter which bitmap should be get + * @return pointer to the bitmap or NULL if not found + */ +const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uint32_t letter); + +/** + * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. + * @param font_p pointer to font + * @param dsc_out store the result descriptor here + * @param letter an UNICODE letter code + * @return true: descriptor is successfully loaded into `dsc_out`. + * false: the letter was not found, no data is loaded to `dsc_out` + */ +bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); + +/********************** + * MACROS + **********************/ + +/********************** + * ADD BUILT IN FONTS + **********************/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*USE_FONT*/ From ba9f0cf9bbad549c0398eb3c3b4f72c1365ca97d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 20 May 2019 07:19:00 +0200 Subject: [PATCH 432/590] chart COLUMN draw speed optmize --- src/lv_objx/lv_chart.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index d12d8fef7c1a..7c4d40bf8cc3 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -860,12 +860,15 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) LV_LL_READ_BACK(ext->series_ll, ser) { lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; - rects.body.main_color = ser->color; - rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); col_a.x1 = x_act; col_a.x2 = col_a.x1 + col_w; x_act += col_w; + if(col_a.x2 < mask->x1) continue; + if(col_a.x1 > mask->x2) break; + + rects.body.main_color = ser->color; + rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); lv_coord_t p_act = (start_point + i) % ext->point_cnt; y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; From 45a29c1b8880458cf32d51e40e7b38663132f565 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 20 May 2019 12:11:59 +0200 Subject: [PATCH 433/590] fix typo --- src/lv_draw/lv_img_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index a66303cbf17f..1436dd5c7f31 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -421,7 +421,7 @@ static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, l dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { - /* For TRUE_COLOE images read line required only for files. + /* For TRUE_COLOR images read line required only for files. * For variables the image data was returned in `open`*/ if(dsc->src_type == LV_IMG_SRC_FILE) { res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf); From 22c2bc4453e44a8b204f9ebad8182ae0a7047bad Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Mon, 20 May 2019 07:50:39 -0400 Subject: [PATCH 434/590] Do not return non-void value in lv_style_anim_create --- src/lv_core/lv_style.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index a4d5b6f8e3aa..3d121a717763 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -264,7 +264,7 @@ static inline lv_anim_user_data_t * lv_style_anim_get_user_data_ptr(lv_anim_t * */ static inline void lv_style_anim_create(lv_anim_t * a) { - return lv_anim_create(a); + lv_anim_create(a); } #endif From 9d70ccc22633960dd1bb5ff7e5cc70514620aec7 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 20 May 2019 15:51:31 +0200 Subject: [PATCH 435/590] fix typo --- src/lv_fonts/lv_font_builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_fonts/lv_font_builtin.c b/src/lv_fonts/lv_font_builtin.c index 5236ae78672a..53b7e1b54c41 100644 --- a/src/lv_fonts/lv_font_builtin.c +++ b/src/lv_fonts/lv_font_builtin.c @@ -125,7 +125,7 @@ void lv_font_builtin_init(void) #if LV_USE_FONT_DEJAVU_30 != 0 lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30); #else - lv_font_add(&lv_font_symbol_30_basic, NULL); + lv_font_add(&lv_font_symbol_30, NULL); #endif #endif From a6f0afde4ccb77eaa0cf2729cff2fcdc9b0e7882 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 09:22:09 -0700 Subject: [PATCH 436/590] change some int16_t types to lv_anim_value_t for animation functions. use LV_USE_ANIMATION macros to remove unused variables when animation capabilities is disabled --- lv_conf_template.h | 2 +- src/lv_conf_checker.h | 2 +- src/lv_objx/lv_bar.c | 30 ++++++++++++++++++++------- src/lv_objx/lv_bar.h | 12 +++++++---- src/lv_objx/lv_btn.c | 4 ++-- src/lv_objx/lv_ddlist.c | 8 ++++++-- src/lv_objx/lv_label.c | 8 ++++++++ src/lv_objx/lv_label.h | 5 ++++- src/lv_objx/lv_list.c | 37 +++++++++++++++++---------------- src/lv_objx/lv_list.h | 14 ++++++++----- src/lv_objx/lv_mbox.c | 21 ++++++++++++------- src/lv_objx/lv_mbox.h | 2 ++ src/lv_objx/lv_page.c | 28 ++++++++++++++----------- src/lv_objx/lv_page.h | 3 ++- src/lv_objx/lv_preload.c | 9 +++----- src/lv_objx/lv_preload.h | 9 ++++---- src/lv_objx/lv_slider.h | 3 +-- src/lv_objx/lv_sw.c | 3 +++ src/lv_objx/lv_sw.h | 2 -- src/lv_objx/lv_ta.c | 24 ++++++++++------------ src/lv_objx/lv_tabview.c | 43 ++++++++++++++++++++++++++++----------- src/lv_objx/lv_tabview.h | 2 ++ src/lv_objx/lv_tileview.c | 16 +++++++++------ src/lv_objx/lv_tileview.h | 2 ++ 24 files changed, 184 insertions(+), 105 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index c9a8a62d0f99..59b6e02d45c6 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -394,7 +394,7 @@ typedef void * lv_obj_user_data_t; /*Page (dependencies: lv_cont)*/ #define LV_USE_PAGE 1 -/*Preload (dependencies: lv_arc)*/ +/*Preload (dependencies: lv_arc, lv_anim)*/ #define LV_USE_PRELOAD 1 #if LV_USE_PRELOAD != 0 # define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 8be7b83d9f34..5977ca8d8382 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -600,7 +600,7 @@ #define LV_USE_PAGE 1 #endif -/*Preload (dependencies: lv_arc)*/ +/*Preload (dependencies: lv_arc, lv_anim)*/ #ifndef LV_USE_PRELOAD #define LV_USE_PRELOAD 1 #endif diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 2ecdd142d245..a639219853b9 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -30,8 +30,10 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param); -static void lv_bar_anim(void * bar, int16_t value); +#if LV_USE_ANIMATION +static void lv_bar_anim(void * bar, lv_anim_value_t value); static void lv_bar_anim_ready(lv_anim_t * a); +#endif /********************** * STATIC VARIABLES @@ -73,10 +75,12 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) ext->min_value = 0; ext->max_value = 100; ext->cur_value = 0; +#if LV_USE_ANIMATION ext->anim_time = 200; ext->anim_start = 0; ext->anim_end = 0; ext->anim_state = LV_BAR_ANIM_STATE_INV; +#endif ext->sym = 0; ext->style_indic = &lv_style_pretty_color; @@ -241,10 +245,11 @@ int16_t lv_bar_get_value(const lv_obj_t * bar) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); /*If animated tell that it's already at the end value*/ +#if LV_USE_ANIMATION if(ext->anim_state != LV_BAR_ANIM_STATE_INV) return ext->anim_end; +#endif /*No animation, simple return the current value*/ - else - return ext->cur_value; + return ext->cur_value; } /** @@ -341,7 +346,10 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); if(ext->cur_value != ext->min_value || ext->sym || - ext->anim_start != LV_BAR_ANIM_STATE_INV) { +#if LV_USE_ANIMATION + ext->anim_start != LV_BAR_ANIM_STATE_INV +#endif + ) { const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); @@ -355,6 +363,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(w >= h) { /*Horizontal*/ +#if LV_USE_ANIMATION if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_x = @@ -369,7 +378,9 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode indic_area.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); - } else { + }else +#endif + { indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); } @@ -388,6 +399,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode } } } else { +#if LV_USE_ANIMATION if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_y = @@ -402,7 +414,9 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode indic_area.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); - } else { + } else +#endif + { indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); } @@ -475,7 +489,8 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) return res; } -static void lv_bar_anim(void * bar, int16_t value) +#if LV_USE_ANIMATION +static void lv_bar_anim(void * bar, lv_anim_value_t value) { lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); ext->anim_state = value; @@ -488,5 +503,6 @@ static void lv_bar_anim_ready(lv_anim_t * a) ext->anim_state = LV_BAR_ANIM_STATE_INV; lv_bar_set_value(a->var, ext->anim_end, false); } +#endif #endif diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index f2ba493a760d..2d923563f018 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -22,10 +22,12 @@ extern "C" { #if LV_USE_BAR != 0 #include "../lv_core/lv_obj.h" +#include "../lv_misc/lv_anim.h" #include "lv_cont.h" #include "lv_btn.h" #include "lv_label.h" + /********************* * DEFINES *********************/ @@ -46,10 +48,12 @@ typedef struct int16_t cur_value; /*Current value of the bar*/ int16_t min_value; /*Minimum value of the bar*/ int16_t max_value; /*Maximum value of the bar*/ - int16_t anim_start; - int16_t anim_end; - int16_t anim_state; - uint16_t anim_time; +#if LV_USE_ANIMATION + lv_anim_value_t anim_start; + lv_anim_value_t anim_end; + lv_anim_value_t anim_state; + lv_anim_value_t anim_time; +#endif uint8_t sym : 1; /*Symmetric: means the center is around zero value*/ const lv_style_t * style_indic; /*Style of the indicator*/ } lv_bar_ext_t; diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 1d3700712fb2..7dd163953aad 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -35,7 +35,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT -static void lv_btn_ink_effect_anim(lv_obj_t * btn, int16_t val); +static void lv_btn_ink_effect_anim(lv_obj_t * btn, lv_anim_value_t val); static void lv_btn_ink_effect_anim_ready(lv_anim_t * a); #endif @@ -632,7 +632,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) * @param btn pointer to the animated button * @param val the new radius */ -static void lv_btn_ink_effect_anim(lv_obj_t * btn, int16_t val) +static void lv_btn_ink_effect_anim(lv_obj_t * btn, lv_anim_value_t val) { if(btn) { ink_act_value = val; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 0d2a9246512b..f3d2447181df 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -44,9 +44,11 @@ static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); static void lv_ddlist_refr_width(lv_obj_t* ddlist); +#if LV_USE_ANIMATION static void lv_ddlist_anim_ready_cb(lv_anim_t * a); static void lv_ddlist_anim_finish(lv_obj_t* ddlist); -static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int16_t height); +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height); +#endif /********************** * STATIC VARIABLES @@ -907,6 +909,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) } } +#if LV_USE_ANIMATION /** * Position the list and remove the selection highlight if it's closed. * Called at end of list animation. @@ -930,6 +933,7 @@ static void lv_ddlist_anim_finish(lv_obj_t* ddlist) ext->force_sel = 0; /*Turn off drawing of selection*/ if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } +#endif /** * Adjusts the ddlist's height and then positions the option within it's new height. @@ -937,7 +941,7 @@ static void lv_ddlist_anim_finish(lv_obj_t* ddlist) * @param ddlist Drop down list object * @param height New drop down list height */ -static void lv_ddlist_adjust_height(lv_obj_t * ddlist, int16_t height) +static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height) { lv_obj_set_height(ddlist, height); lv_ddlist_pos_current_option(ddlist); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 4a8d3111b75a..1fefa043fe52 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -90,7 +90,9 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) ext->align = LV_LABEL_ALIGN_LEFT; ext->dot_end = LV_LABEL_DOT_END_INV; ext->long_mode = LV_LABEL_LONG_EXPAND; +#if LV_USE_ANIMATION ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; +#endif ext->offset.x = 0; ext->offset.y = 0; #if LV_LABEL_TEXT_SEL @@ -343,6 +345,7 @@ void lv_label_set_body_draw(lv_obj_t * label, bool en) */ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) { +#if LV_USE_ANIMATION lv_label_ext_t * ext = lv_obj_get_ext_attr(label); if(ext->anim_speed == anim_speed) return; @@ -351,6 +354,7 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) if(ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_label_refr_text(label); } +#endif } void lv_label_set_text_sel_start( lv_obj_t * label, uint16_t index ) { @@ -437,8 +441,12 @@ bool lv_label_get_body_draw(const lv_obj_t * label) */ uint16_t lv_label_get_anim_speed(const lv_obj_t * label) { +#if LV_USE_ANIMATION lv_label_ext_t * ext = lv_obj_get_ext_attr(label); return ext->anim_speed; +#else + return 0; +#endif } /** diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 51affba352b3..33f9876956ea 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -68,9 +68,12 @@ typedef struct char tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ } dot; uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ - uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ lv_point_t offset; /*Text draw position offset*/ +#if LV_USE_ANIMATION + uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ +#endif + #if LV_LABEL_TEXT_SEL uint16_t txt_sel_start; /*Left-most selection character*/ uint16_t txt_sel_end; /*Right-most selection character*/ diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 3e5c8de0c08f..46a948975f3f 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -94,7 +94,9 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles_btn[LV_BTN_STATE_TGL_REL] = &lv_style_btn_tgl_rel; ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; +#if LV_USE_ANIMATION ext->anim_time = LV_LIST_DEF_ANIM_TIME; +#endif ext->single_mode = false; ext->size = 0; @@ -249,11 +251,11 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, * lv_list_ext_t.size * @return true: successfully deleted */ -bool lv_list_remove(const lv_obj_t * list, uint32_t index) +bool lv_list_remove(const lv_obj_t * list, uint16_t index) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); if(index >= ext->size) return false; - uint32_t count = 0; + uint16_t count = 0; lv_obj_t * e = lv_list_get_next_btn(list, NULL); while(e != NULL) { if(count == index) { @@ -318,7 +320,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) else if(s == LV_BTN_STATE_TGL_REL) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR); - lv_page_focus(list, ext->selected_btn, ext->anim_time); + lv_page_focus(list, ext->selected_btn, lv_list_get_anim_time(list) ); } } @@ -331,13 +333,13 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) */ void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) { +#if LV_USE_ANIMATION lv_list_ext_t * ext = lv_obj_get_ext_attr(list); -#if LV_USE_ANIMATION == 0 anim_time = 0; -#endif if(ext->anim_time == anim_time) return; ext->anim_time = anim_time; +#endif } /** @@ -542,7 +544,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn) * @param list pointer to a list object * @return the number of buttons in the list */ -uint32_t lv_list_get_size(const lv_obj_t * list) +uint16_t lv_list_get_size(const lv_obj_t * list) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); return ext->size; @@ -569,8 +571,12 @@ lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list) */ uint16_t lv_list_get_anim_time(const lv_obj_t * list) { +#if LV_USE_ANIMATION lv_list_ext_t * ext = lv_obj_get_ext_attr(list); return ext->anim_time; +#else + return 0; +#endif } /** @@ -622,8 +628,7 @@ void lv_list_up(const lv_obj_t * list) if(e_prev != NULL) { lv_coord_t new_y = lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev)); - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - if(ext->anim_time == 0) { + if(lv_list_get_anim_time(list) == 0) { lv_obj_set_y(scrl, new_y); } else { #if LV_USE_ANIMATION @@ -631,9 +636,9 @@ void lv_list_up(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; @@ -665,8 +670,7 @@ void lv_list_down(const lv_obj_t * list) while(e != NULL) { if(e->coords.y1 < list->coords.y1) { lv_coord_t new_y = -lv_obj_get_y(e); - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - if(ext->anim_time == 0) { + if(lv_list_get_anim_time(list) == 0) { lv_obj_set_y(scrl, new_y); } else { #if LV_USE_ANIMATION @@ -674,9 +678,9 @@ void lv_list_down(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_LIST_DEF_ANIM_TIME; a.playback = 0; @@ -684,7 +688,6 @@ void lv_list_down(const lv_obj_t * list) a.repeat = 0; a.repeat_pause = 0; lv_anim_create(&a); - #endif } break; diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 5d6c2985fc11..31797ddc170f 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -52,11 +52,15 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - uint16_t anim_time; /*Scroll animation time*/ const lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of the list element buttons*/ const lv_style_t * style_img; /*Style of the list element images on buttons*/ - uint32_t size; /*the number of items(buttons) in the list*/ - bool single_mode; /* whether single selected mode is enabled */ + uint16_t size; /*the number of items(buttons) in the list*/ +#if LV_USE_ANIMATION + uint16_t anim_time; /*Scroll animation time*/ +#endif + + uint8_t single_mode:1; /* whether single selected mode is enabled */ + #if LV_USE_GROUP lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ lv_obj_t * selected_btn; /* The button is currently being selected*/ @@ -116,7 +120,7 @@ lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, * lv_list_ext_t.size * @return true: successfully deleted */ -bool lv_list_remove(const lv_obj_t * list, uint32_t index); +bool lv_list_remove(const lv_obj_t * list, uint16_t index); /*===================== * Setter functions @@ -245,7 +249,7 @@ int32_t lv_list_get_btn_index(const lv_obj_t * list, const lv_obj_t * btn); * @param list pointer to a list object * @return the number of buttons in the list */ -uint32_t lv_list_get_size(const lv_obj_t * list); +uint16_t lv_list_get_size(const lv_obj_t * list); #if LV_USE_GROUP /** diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 2a5aa026eceb..c6f1c432db75 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -77,7 +77,9 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) ext->text = NULL; ext->btnm = NULL; +#if LV_USE_ANIMATION ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME; +#endif /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_mbox, lv_mbox_signal); @@ -182,12 +184,14 @@ void lv_mbox_set_text(lv_obj_t * mbox, const char * txt) */ void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) { +#if LV_USE_ANIMATION lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); -#if LV_USE_ANIMATION == 0 anim_time = 0; -#endif - ext->anim_time = anim_time; +#else + (void) mbox; + (void) anim_time; +#endif } /** @@ -198,9 +202,7 @@ void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) { #if LV_USE_ANIMATION - lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - - if(ext->anim_time != 0) { + if(lv_mbox_get_anim_time(mbox) != 0) { /*Add shrinking animations*/ lv_anim_t a; a.var = mbox; @@ -210,7 +212,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = -delay; - a.time = ext->anim_time; + a.time = lv_mbox_get_anim_time(mbox); a.playback = 0; a.playback_pause = 0; a.repeat = 0; @@ -356,8 +358,13 @@ const char * lv_mbox_get_active_btn_text(lv_obj_t * mbox) */ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox) { +#if LV_USE_ANIMATION lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); return ext->anim_time; +#else + (void) mbox; + return 0; +#endif } /** diff --git a/src/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h index b2c42e6e5c68..ed1a889646d7 100644 --- a/src/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -54,7 +54,9 @@ typedef struct /*New data for this type */ lv_obj_t * text; /*Text of the message box*/ lv_obj_t * btnm; /*Button matrix for the buttons*/ +#if LV_USE_ANIMATION uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/ +#endif } lv_mbox_ext_t; enum { diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 641e202618cd..0e33a6df9504 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -40,9 +40,11 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); -static void edge_flash_anim(void * page, int16_t v); -static void edge_flash_anim_end(lv_anim_t * a); static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event); +#if LV_USE_ANIMATION +static void edge_flash_anim(void * page, lv_anim_value_t v); +static void edge_flash_anim_end(lv_anim_t * a); +#endif /********************** * STATIC VARIABLES @@ -428,15 +430,15 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); -#if LV_USE_ANIMATION == 0 - anim_time = 0; -#else +#if LV_USE_ANIMATION /* Be sure there is no position changing animation in progress * because it can overide the current changes*/ lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_x); lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_y); lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_x); lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_y); +#else + anim_time = 0; #endif const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG); @@ -528,9 +530,9 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_x(scrl); a.end = a.start + dist; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_PAGE_SCROLL_ANIM_TIME; a.playback = 0; @@ -557,9 +559,9 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = a.start + dist; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = LV_PAGE_SCROLL_ANIM_TIME; a.playback = 0; @@ -1193,7 +1195,8 @@ static void lv_page_sb_refresh(lv_obj_t * page) } } -static void edge_flash_anim(void * page, int16_t v) +#if LV_USE_ANIMATION +static void edge_flash_anim(void * page, lv_anim_value_t v) { lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.state = v; @@ -1209,5 +1212,6 @@ static void edge_flash_anim_end(lv_anim_t * a) ext->edge_flash.right_ip = 0; lv_obj_invalidate(a->var); } +#endif #endif diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index adda367bb239..60b8536b1ca2 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -28,6 +28,7 @@ extern "C" { #include "lv_cont.h" #include "../lv_core/lv_indev.h" +#include "../lv_misc/lv_anim.h" /********************* * DEFINES @@ -78,7 +79,7 @@ typedef struct } sb; struct { - uint16_t state; /*Store the current size of the edge flash effect*/ + lv_anim_value_t state; /*Store the current size of the edge flash effect*/ const lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ uint8_t enabled : 1; /*1: Show a flash animation on the edge*/ uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index 5986c8c8ffdb..d89c37aace4c 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -127,7 +127,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) * @param preload pointer to a preload object * @param deg length of the arc */ -void lv_preload_set_arc_length(lv_obj_t * preload, int16_t deg) +void lv_preload_set_arc_length(lv_obj_t * preload, lv_anim_value_t deg) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); @@ -170,7 +170,6 @@ void lv_preload_set_style(lv_obj_t * preload, lv_preload_style_t type, const lv_ * */ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) { -#if LV_USE_ANIMATION lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); /*delete previous animation*/ @@ -250,8 +249,6 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) break; } } - -#endif // LV_USE_ANIMATION } void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir) { @@ -269,7 +266,7 @@ void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir) { * Get the arc length [degree] of the a pre loader * @param preload pointer to a pre loader object */ -uint16_t lv_preload_get_arc_length(const lv_obj_t * preload) +lv_anim_value_t lv_preload_get_arc_length(const lv_obj_t * preload) { lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); return ext->arc_length; @@ -328,7 +325,7 @@ lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload) { * @param ptr pointer to preloader * @param val the current desired value [0..360] */ -void lv_preload_spinner_anim(void * ptr, int16_t val) +void lv_preload_spinner_anim(void * ptr, lv_anim_value_t val) { lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 25b1b37b97e5..7d73eb373ab1 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -31,6 +31,7 @@ extern "C" { #endif #include "../lv_core/lv_obj.h" +#include "../lv_misc/lv_anim.h" #include "lv_arc.h" /********************* @@ -58,7 +59,7 @@ typedef struct { lv_arc_ext_t arc; /*Ext. of ancestor*/ /*New data for this type */ - uint16_t arc_length; /*Length of the spinning indicator in degree*/ + lv_anim_value_t arc_length; /*Length of the spinning indicator in degree*/ uint16_t time; /*Time of one round*/ lv_preload_type_t anim_type:1; /*Type of the arc animation*/ lv_preload_dir_t anim_dir:1; /*Animation Direction*/ @@ -92,7 +93,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy); * @param preload pointer to a preload object * @param deg length of the arc */ -void lv_preload_set_arc_length(lv_obj_t * preload, int16_t deg); +void lv_preload_set_arc_length(lv_obj_t * preload, lv_anim_value_t deg); /** * Set the spin time of the arc @@ -135,7 +136,7 @@ void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir); * Get the arc length [degree] of the a pre loader * @param preload pointer to a pre loader object */ -uint16_t lv_preload_get_arc_length(const lv_obj_t * preload); +lv_anim_value_t lv_preload_get_arc_length(const lv_obj_t * preload); /** * Get the spin time of the arc @@ -175,7 +176,7 @@ lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload); * @param type which style should be get * @return style pointer to the style * */ -void lv_preload_spinner_anim(void * ptr, int16_t val); +void lv_preload_spinner_anim(void * ptr, lv_anim_value_t val); /********************** * MACROS diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 7a4a1e178cb4..e82525672def 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -42,8 +42,7 @@ typedef struct lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ const lv_style_t * style_knob; /*Style of the knob*/ - int16_t - drag_value; /*Store a temporal value during press until release (Handled by the library)*/ + int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/ } lv_slider_ext_t; diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 3d44fabb1cfc..5468dd9dd9b1 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -202,6 +202,9 @@ void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time) #if LV_USE_ANIMATION lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); ext->anim_time = anim_time; +#else + (void) sw; + (void) anim_time; #endif } diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index 44801d3cb93f..1b4e73e25a25 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -107,7 +107,6 @@ bool lv_sw_toggle(lv_obj_t * sw, bool anim); */ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style); -#if LV_USE_ANIMATION /** * Set the animation time of the switch * @param sw pointer to a switch object @@ -115,7 +114,6 @@ void lv_sw_set_style(lv_obj_t * sw, lv_sw_style_t type, const lv_style_t * style * @return style pointer to a style */ void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time); -#endif /*===================== * Getter functions diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 16d7ee56e9bc..169c083387d5 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -46,9 +46,9 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param); static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); #if LV_USE_ANIMATION static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); -static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x); -#endif +static void pwd_char_hider_anim(lv_obj_t * ta, lv_anim_value_t x); static void pwd_char_hider_anim_ready(lv_anim_t * a); +#endif static void pwd_char_hider(lv_obj_t * ta); static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); @@ -165,10 +165,10 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) /*Create a cursor blinker animation*/ lv_anim_t a; a.var = new_ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; a.time = LV_TA_CURSOR_BLINK_TIME; a.act_time = 0; - a.ready_cb = NULL; + a.ready_cb = NULL; a.start = 1; a.end = 0; a.repeat = 1; @@ -250,10 +250,10 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; a.time = LV_TA_PWD_SHOW_TIME; a.act_time = 0; - a.ready_cb = pwd_char_hider_anim_ready; + a.ready_cb = pwd_char_hider_anim_ready; a.start = 0; a.end = 1; a.repeat = 0; @@ -576,10 +576,10 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; a.time = LV_TA_CURSOR_BLINK_TIME; a.act_time = 0; - a.ready_cb = NULL; + a.ready_cb = NULL; a.start = 1; a.end = 0; a.repeat = 1; @@ -1386,7 +1386,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * @param ta pointer to a text area * @param hide 1: hide the cursor, 0: show it */ -static void cursor_blink_anim(lv_obj_t * ta, uint8_t show) +static void cursor_blink_anim(lv_obj_t * ta, lv_anim_value_t show) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if(show != ext->cursor.state) { @@ -1411,15 +1411,12 @@ static void cursor_blink_anim(lv_obj_t * ta, uint8_t show) * @param ta unused * @param x unused */ -static void pwd_char_hider_anim(lv_obj_t * ta, int32_t x) +static void pwd_char_hider_anim(lv_obj_t * ta, lv_anim_value_t x) { (void)ta; (void)x; } -#endif - - /** * Call when an animation is ready to convert all characters to '*' * @param a pointer to the animation @@ -1429,6 +1426,7 @@ static void pwd_char_hider_anim_ready(lv_anim_t * a) lv_obj_t * ta = a->var; pwd_char_hider(ta); } +#endif /** * Hide all characters (convert them to '*') diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index fad7969ce37a..f40be85f310c 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -93,7 +93,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->indic = NULL; ext->btns = NULL; ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; +#if LV_USE_ANIMATION ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; +#endif ext->btns_hide = 0; /*The signal and design functions are not copied so set them here*/ @@ -158,7 +160,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->btns = lv_btnm_create(new_tabview, copy_ext->btns); ext->indic = lv_obj_create(ext->btns, copy_ext->indic); ext->content = lv_cont_create(new_tabview, copy_ext->content); +#if LV_USE_ANIMATION ext->anim_time = copy_ext->anim_time; +#endif ext->tab_name_ptr = lv_mem_alloc(sizeof(char *)); lv_mem_assert(ext->tab_name_ptr); @@ -371,7 +375,11 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if(ext->anim_time == 0 || anim_en == false) { + if( anim_en == false || +#if LV_USE_ANIMATION + ext->anim_time == 0 +#endif + ) { lv_obj_set_x(ext->content, cont_x); } else { #if LV_USE_ANIMATION @@ -379,9 +387,9 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) a.var = ext->content; a.start = lv_obj_get_x(ext->content); a.end = cont_x; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -410,7 +418,11 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if(ext->anim_time == 0 || anim_en == false) { + if( anim_en == false || +#if LV_USE_ANIMATION + ext->anim_time == 0 +#endif + ) { switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: @@ -431,18 +443,18 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) case LV_TABVIEW_BTNS_POS_BOTTOM: a.start = lv_obj_get_x(ext->indic); a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: a.start = lv_obj_get_y(ext->indic); a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; break; } - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -474,11 +486,13 @@ void lv_tabview_set_sliding(lv_obj_t * tabview, bool en) */ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) { +#if LV_USE_ANIMATION lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); -#if LV_USE_ANIMATION == 0 - anim_time = 0; -#endif ext->anim_time = anim_time; +#else + (void) tabview; + (void) anim_time; +#endif } /** @@ -621,8 +635,13 @@ bool lv_tabview_get_sliding(const lv_obj_t * tabview) */ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview) { +#if LV_USE_ANIMATION lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); return ext->anim_time; +#else + (void) tabview; + return 0; +#endif } /** diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index 508bc4851ba6..9482d7bff9d9 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -62,7 +62,9 @@ typedef struct lv_point_t point_last; uint16_t tab_cur; uint16_t tab_cnt; +#if LV_USE_ANIMATION uint16_t anim_time; +#endif uint8_t slide_enable : 1; /*1: enable horizontal sliding by touch pad*/ uint8_t draging : 1; uint8_t drag_hor : 1; diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index 055d72acb62d..bac4a475d35c 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -78,7 +78,9 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_tileview); /*Initialize the allocated 'ext' */ +#if LV_USE_ANIMATION ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME; +#endif ext->act_id.x = 0; ext->act_id.y = 0; ext->valid_pos = NULL; @@ -109,7 +111,9 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_tileview_ext_t * copy_ext = lv_obj_get_ext_attr(copy); ext->act_id.x = copy_ext->act_id.x; ext->act_id.y = copy_ext->act_id.y; +#if LV_USE_ANIMATION ext->anim_time = copy_ext->anim_time; +#endif /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_tileview); @@ -211,9 +215,9 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_anim_t a; a.var = scrl; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; a.act_time = 0; a.time = ext->anim_time; a.playback = 0; @@ -228,9 +232,9 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b } if(y_coord != y_act) { - a.start = y_act; - a.end = y_coord; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.start = y_act; + a.end = y_coord; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; lv_anim_create(&a); } #endif diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index 85ac9c086699..53f6e9d92960 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -37,7 +37,9 @@ typedef struct lv_page_ext_t page; /*New data for this type */ const lv_point_t * valid_pos; +#if LV_USE_ANIMATION uint16_t anim_time; +#endif lv_point_t act_id; uint8_t drag_top_en : 1; uint8_t drag_bottom_en : 1; From 3cc2043fd72b8da76e1d36e98031c3e362f7d4d3 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 09:32:13 -0700 Subject: [PATCH 437/590] fixed lv_ta.c anim type mismatch --- src/lv_objx/lv_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 169c083387d5..dddf8b219228 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -45,7 +45,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param); static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); #if LV_USE_ANIMATION -static void cursor_blink_anim(lv_obj_t * ta, uint8_t show); +static void cursor_blink_anim(lv_obj_t * ta, lv_anim_value_t show); static void pwd_char_hider_anim(lv_obj_t * ta, lv_anim_value_t x); static void pwd_char_hider_anim_ready(lv_anim_t * a); #endif From 9b38d455abc6b2a8cc0c7015471528a3cc927888 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 09:42:31 -0700 Subject: [PATCH 438/590] renamed indev_obj_focused to indev_obj_act. Improved related documentation/formatting --- src/lv_core/lv_indev.c | 81 ++++++++++++++++++++++-------------------- src/lv_core/lv_indev.h | 4 +-- src/lv_core/lv_obj.c | 4 +-- 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index f00282a3a21a..99508cad1432 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -48,7 +48,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc); **********************/ static lv_indev_t * indev_act; #if LV_USE_GROUP -static lv_obj_t * indev_obj_focused = NULL; +static lv_obj_t * indev_obj_act = NULL; #endif /********************** @@ -58,7 +58,7 @@ static lv_obj_t * indev_obj_focused = NULL; #if LV_USE_GROUP #define CHECK_INDEV_RESET(proc) \ if((proc).reset_query) { \ - indev_obj_focused = NULL; \ + indev_obj_act = NULL; \ return; \ } while(0) #else @@ -323,9 +323,14 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev) return indev->refr_task; } -lv_obj_t * lv_indev_get_obj_focused() { +/** + * Gets a pointer to the currently active object in indev proc functions. + * NULL if no object is currently being handled or if groups aren't used. + * @return pointer to currently focused object + */ +lv_obj_t * lv_indev_get_obj_act( void ) { #if LV_USE_GROUP - return indev_obj_focused; + return indev_obj_act; #else return NULL; #endif @@ -381,8 +386,8 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_t * g = i->group; if(g == NULL) return; - indev_obj_focused = lv_group_get_focused(g); - if(indev_obj_focused == NULL) return; + indev_obj_act = lv_group_get_focused(g); + if(indev_obj_act == NULL) return; /*Save the last key to compare it with the current latter on RELEASE*/ uint32_t prev_key = i->proc.types.keypad.last_key; @@ -406,15 +411,15 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send the ENTER as a normal KEY*/ lv_group_send_data(g, LV_KEY_ENTER); - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_PRESSED, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_PRESSED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); } else if(data->key == LV_KEY_ESC) { /*Send the ESC as a normal KEY*/ lv_group_send_data(g, LV_KEY_ESC); - lv_event_send(indev_obj_focused, LV_EVENT_CANCEL, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CANCEL, NULL); CHECK_INDEV_RESET(i->proc); } /*Move the focus on NEXT*/ @@ -444,9 +449,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.long_pr_sent = 1; if(data->key == LV_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); } } @@ -458,9 +463,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send LONG_PRESS_REP on ENTER*/ if(data->key == LV_KEY_ENTER) { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS_REP, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL); CHECK_INDEV_RESET(i->proc); } /*Move the focus on NEXT again*/ @@ -490,24 +495,24 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) data->key = prev_key; if(data->key == LV_KEY_ENTER) { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); if(i->proc.long_pr_sent == 0) { - lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); } - lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); } i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } - indev_obj_focused = NULL; + indev_obj_act = NULL; #else (void)data; /*Unused*/ (void)i; /*Unused*/ @@ -541,8 +546,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_t * g = i->group; if(g == NULL) return; - indev_obj_focused = lv_group_get_focused(g); - if(indev_obj_focused == NULL) return; + indev_obj_act = lv_group_get_focused(g); + if(indev_obj_act == NULL) return; /*Process the steps first. They are valid only with released button*/ if(data->state == LV_INDEV_STATE_REL) { @@ -567,20 +572,20 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Refresh the focused object. It might change due to lv_group_focus_prev/next*/ - indev_obj_focused = lv_group_get_focused(g); - if(indev_obj_focused == NULL) return; + indev_obj_act = lv_group_get_focused(g); + if(indev_obj_act == NULL) return; /*Button press happened*/ if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_REL) { bool editable = false; - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_PRESSED, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_PRESSED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); } } @@ -590,7 +595,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); /*On enter long press toggle edit mode.*/ if(editable) { @@ -603,9 +608,9 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } /*If not editable then just send a long press signal*/ else { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_LONG_PRESS, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_LONG_PRESSED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); CHECK_INDEV_RESET(i->proc); } i->proc.long_pr_sent = 1; @@ -616,36 +621,36 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) last_state == LV_INDEV_STATE_PR) { bool editable = false; - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_GET_EDITABLE, &editable); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); - if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); } /*An object is being edited and the button is released. */ else if(g->editing) { /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { - indev_obj_focused->signal_cb(indev_obj_focused, LV_SIGNAL_RELEASED, NULL); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_SHORT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); CHECK_INDEV_RESET(i->proc); - lv_event_send(indev_obj_focused, LV_EVENT_RELEASED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); CHECK_INDEV_RESET(i->proc); lv_group_send_data(g, LV_KEY_ENTER); @@ -660,7 +665,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; } - indev_obj_focused = NULL; + indev_obj_act = NULL; #else (void)data; /*Unused*/ (void)i; /*Unused*/ diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index 761eeb74bc6e..47477a4ecbe6 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -142,11 +142,11 @@ void lv_indev_wait_release(lv_indev_t * indev); lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); /** - * Gets a pointer to the currently handled object. + * Gets a pointer to the currently active object in indev proc functions. * NULL if no object is currently being handled or if groups aren't used. * @return pointer to currently focused object */ -lv_obj_t * lv_indev_get_obj_focused(); +lv_obj_t * lv_indev_get_obj_act( void ); /********************** * MACROS diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ef9c8a582feb..571a2256c18c 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -427,7 +427,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } #if LV_USE_GROUP - if(indev->group == group && obj == lv_indev_get_obj_focused() ) { + if(indev->group == group && obj == lv_indev_get_obj_act() ) { lv_indev_reset(indev); } #endif @@ -2230,7 +2230,7 @@ static void delete_children(lv_obj_t * obj) indev->proc.types.pointer.last_pressed = NULL; } #if LV_USE_GROUP - if(indev->group == group && obj == lv_indev_get_obj_focused() ) { + if(indev->group == group && obj == lv_indev_get_obj_act() ) { lv_indev_reset(indev); } #endif From 40576b5445fd176eda0d123b22438a0c7859aaea Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 09:52:18 -0700 Subject: [PATCH 439/590] indev.c/h: Replaced CHECK_INDEV_RESET macro with function --- src/lv_core/lv_indev.c | 143 +++++++++++++++++++++-------------------- src/lv_core/lv_indev.h | 2 +- 2 files changed, 75 insertions(+), 70 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 99508cad1432..0b39021f4dce 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -42,6 +42,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev); static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj); static void indev_drag(lv_indev_proc_t * state); static void indev_drag_throw(lv_indev_proc_t * proc); +static bool indev_reset_check(lv_indev_proc_t *proc); /********************** * STATIC VARIABLES @@ -54,16 +55,6 @@ static lv_obj_t * indev_obj_act = NULL; /********************** * MACROS **********************/ -/* Return if the lv_indev_proc_t proc reset_query is true, indicating that the object may have been deleted*/ -#if LV_USE_GROUP -#define CHECK_INDEV_RESET(proc) \ - if((proc).reset_query) { \ - indev_obj_act = NULL; \ - return; \ - } while(0) -#else -#define CHECK_INDEV_RESET(proc) if((proc).reset_query) return; while(0) -#endif /********************** * GLOBAL FUNCTIONS @@ -412,29 +403,29 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_send_data(g, LV_KEY_ENTER); indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } else if(data->key == LV_KEY_ESC) { /*Send the ESC as a normal KEY*/ lv_group_send_data(g, LV_KEY_ESC); lv_event_send(indev_obj_act, LV_EVENT_CANCEL, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Move the focus on NEXT*/ else if(data->key == LV_KEY_NEXT) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Move the focus on PREV*/ else if(data->key == LV_KEY_PREV) { lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Just send other keys to the object (e.g. 'A' or `LV_GROUP_KEY_RIGHT`)*/ else { @@ -450,9 +441,9 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->key == LV_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } } /*Long press repeated time has elapsed?*/ @@ -464,28 +455,28 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Send LONG_PRESS_REP on ENTER*/ if(data->key == LV_KEY_ENTER) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Move the focus on NEXT again*/ else if(data->key == LV_KEY_NEXT) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Move the focus on PREV again*/ else if(data->key == LV_KEY_PREV) { lv_group_set_editing( g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*Just send other keys again to the object (e.g. 'A' or `LV_GORUP_KEY_RIGHT)*/ else { lv_group_send_data(g, data->key); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } } } @@ -496,18 +487,18 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) if(data->key == LV_KEY_ENTER) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; if(i->proc.long_pr_sent == 0) { lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } i->proc.pr_timestamp = 0; i->proc.long_pr_sent = 0; @@ -583,10 +574,10 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) i->proc.pr_timestamp = lv_tick_get(); if(lv_group_get_editing(g) == true || editable == false) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } } /*Pressing*/ @@ -609,9 +600,9 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*If not editable then just send a long press signal*/ else { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } i->proc.long_pr_sent = 1; } @@ -626,32 +617,32 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /*The button was released on a non-editable object. Just send enter*/ if(editable == false) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; if(i->proc.long_pr_sent == 0) lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; } /*An object is being edited and the button is released. */ else if(g->editing) { /*Ignore long pressed enter release because it comes from mode switch*/ if(!i->proc.long_pr_sent || lv_ll_is_empty(&g->obj_ll)) { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); - CHECK_INDEV_RESET(i->proc); + if(indev_reset_check(&i->proc)) return; lv_group_send_data(g, LV_KEY_ENTER); } @@ -738,9 +729,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESS_LOST, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ @@ -775,9 +766,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the press*/ proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } } @@ -805,21 +796,21 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.act_obj != NULL) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSING, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSING, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; indev_drag(proc); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; /*If there is no drag then check for long press time*/ if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; /*Mark the signal sending to do not send it again*/ proc->long_pr_sent = 1; @@ -833,9 +824,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*Send a signal about the long press repeate if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) { pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; proc->longpr_rep_timestamp = lv_tick_get(); } } @@ -865,41 +856,41 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; if(proc->types.pointer.drag_in_prog == 0) { if(proc->long_pr_sent == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; /*Handle click focus*/ #if LV_USE_GROUP @@ -937,15 +928,15 @@ static void indev_proc_release(lv_indev_proc_t * proc) * a focus/defucus signal because of `click focus`*/ if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; proc->types.pointer.last_pressed = proc->types.pointer.act_obj; } - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; proc->types.pointer.act_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; @@ -955,7 +946,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) * In case of reset query ignore the remaining parts.*/ if(proc->types.pointer.last_obj != NULL && proc->reset_query == 0) { indev_drag_throw(proc); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } } @@ -1118,9 +1109,9 @@ static void indev_drag(lv_indev_proc_t * state) /*Send the drag begin signal on first move*/ if(state->types.pointer.drag_in_prog == 0) { drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act); - CHECK_INDEV_RESET(*state); + if(indev_reset_check(state)) return; lv_event_send(drag_obj, LV_EVENT_DRAG_BEGIN, NULL); - CHECK_INDEV_RESET(*state); + if(indev_reset_check(state)) return; } state->types.pointer.drag_in_prog = 1; @@ -1167,7 +1158,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); return; @@ -1207,9 +1198,9 @@ static void indev_drag_throw(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.x = 0; proc->types.pointer.drag_throw_vect.y = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } } /*If the types.pointer.vectors become 0 -> types.pointer.drag_in_prog = 0 and send a drag end @@ -1217,8 +1208,22 @@ static void indev_drag_throw(lv_indev_proc_t * proc) else { proc->types.pointer.drag_in_prog = 0; drag_obj->signal_cb(drag_obj, LV_SIGNAL_DRAG_END, indev_act); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; lv_event_send(drag_obj, LV_EVENT_DRAG_END, NULL); - CHECK_INDEV_RESET(*proc); + if(indev_reset_check(proc)) return; } } + +/** + * Checks if the reset_query flag has been set. If so, perform necessary global indev cleanup actions + * @param proc pointer to an input device 'proc' + * return true if indev query should be immediately truncated. + */ +static bool indev_reset_check(lv_indev_proc_t *proc) { +#if LV_USE_GROUP + if(proc->reset_query) { + indev_obj_act = NULL; + } +#endif + return proc->reset_query; +} diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index 47477a4ecbe6..b1527ea0e859 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -144,7 +144,7 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); /** * Gets a pointer to the currently active object in indev proc functions. * NULL if no object is currently being handled or if groups aren't used. - * @return pointer to currently focused object + * @return pointer to currently active object */ lv_obj_t * lv_indev_get_obj_act( void ); From cbb9c3f73b7fccd0402f61cd775f8139f789548c Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 10:04:36 -0700 Subject: [PATCH 440/590] Fixed syntax error in lv_bar.c when animations are disabled --- src/lv_objx/lv_bar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index a639219853b9..9f2ffc26d173 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -345,9 +345,9 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #endif lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); - if(ext->cur_value != ext->min_value || ext->sym || + if(ext->cur_value != ext->min_value || ext->sym #if LV_USE_ANIMATION - ext->anim_start != LV_BAR_ANIM_STATE_INV + || ext->anim_start != LV_BAR_ANIM_STATE_INV #endif ) { const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); From cd1ad6eb3a23966151a67d522c82e168db3ed5a5 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 18:31:47 -0700 Subject: [PATCH 441/590] Wrapped remaining animation and edge_flash references in #if LV_USE_ANIMATION to save memory/space --- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_mbox.c | 4 ++ src/lv_objx/lv_page.c | 95 +++++++++++++++++++++++++-------------- src/lv_objx/lv_page.h | 2 + src/lv_objx/lv_roller.c | 22 ++++++++- src/lv_objx/lv_slider.c | 22 +++++++-- src/lv_objx/lv_tabview.c | 8 ++-- src/lv_objx/lv_tileview.c | 10 +++++ 8 files changed, 121 insertions(+), 44 deletions(-) diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index f3d2447181df..020b9686ef47 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -933,7 +933,6 @@ static void lv_ddlist_anim_finish(lv_obj_t* ddlist) ext->force_sel = 0; /*Turn off drawing of selection*/ if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); } -#endif /** * Adjusts the ddlist's height and then positions the option within it's new height. @@ -946,6 +945,7 @@ static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height) lv_obj_set_height(ddlist, height); lv_ddlist_pos_current_option(ddlist); } +#endif /** * Set the position of list when it is closed to show the selected item diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index c6f1c432db75..f97f24a14816 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -36,7 +36,9 @@ **********************/ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param); static void mbox_realign(lv_obj_t * mbox); +#if LV_USE_ANIMATION static void lv_mbox_close_ready_cb(lv_anim_t * a); +#endif static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event); /********************** @@ -528,10 +530,12 @@ static void mbox_realign(lv_obj_t * mbox) } } +#if LV_USE_ANIMATION static void lv_mbox_close_ready_cb(lv_anim_t * a) { lv_obj_del(a->var); } +#endif static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) { diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 0e33a6df9504..2470c87f39a0 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -88,6 +88,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) ext->sb.ver_draw = 0; ext->sb.style = &lv_style_pretty; ext->sb.mode = LV_SB_MODE_AUTO; +#if LV_USE_ANIMATION ext->edge_flash.enabled = 0; ext->edge_flash.bottom_ip = 0; ext->edge_flash.top_ip = 0; @@ -95,6 +96,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) ext->edge_flash.right_ip = 0; ext->edge_flash.state = 0; ext->edge_flash.style = &lv_style_plain_color; +#endif ext->arrow_scroll = 0; ext->scroll_prop = 0; ext->scroll_prop_ip = 0; @@ -235,8 +237,13 @@ void lv_page_set_scroll_propagation(lv_obj_t * page, bool en) */ void lv_page_set_edge_flash(lv_obj_t * page, bool en) { +#if LV_USE_ANIMATION lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.enabled = en ? 1 : 0; +#else + (void) page; + (void) en; +#endif } /** @@ -260,7 +267,9 @@ void lv_page_set_style(lv_obj_t * page, lv_page_style_t type, const lv_style_t * lv_obj_refresh_ext_draw_pad(page); lv_obj_invalidate(page); break; +#if LV_USE_ANIMATION case LV_PAGE_STYLE_EDGE_FLASH: ext->edge_flash.style = style; break; +#endif } } @@ -320,8 +329,13 @@ bool lv_page_get_scroll_propagation(lv_obj_t * page) */ bool lv_page_get_edge_flash(lv_obj_t * page) { +#if LV_USE_ANIMATION lv_page_ext_t * ext = lv_obj_get_ext_attr(page); return ext->edge_flash.enabled == 0 ? false : true; +#else + (void) page; + return false; +#endif } /** @@ -367,7 +381,9 @@ const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type case LV_PAGE_STYLE_BG: style = lv_obj_get_style(page); break; case LV_PAGE_STYLE_SCRL: style = lv_obj_get_style(ext->scrl); break; case LV_PAGE_STYLE_SB: style = ext->sb.style; break; +#if LV_USE_ANIMATION case LV_PAGE_STYLE_EDGE_FLASH: style = ext->edge_flash.style; break; +#endif default: style = NULL; break; } @@ -661,41 +677,46 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo lv_draw_rect(&sb_area, mask, ext->sb.style, lv_obj_get_opa_scale(page)); } - lv_coord_t page_w = lv_obj_get_width(page); - lv_coord_t page_h = lv_obj_get_height(page); - lv_area_t flash_area; - - if(ext->edge_flash.top_ip) { - flash_area.x1 = page->coords.x1 - page_w; - flash_area.x2 = page->coords.x2 + page_w; - flash_area.y1 = page->coords.y1 - 3 * page_w + ext->edge_flash.state; - flash_area.y2 = page->coords.y1 + ext->edge_flash.state; - } else if(ext->edge_flash.bottom_ip) { - flash_area.x1 = page->coords.x1 - page_w; - flash_area.x2 = page->coords.x2 + page_w; - flash_area.y1 = page->coords.y2 - ext->edge_flash.state; - flash_area.y2 = page->coords.y2 + 3 * page_w - ext->edge_flash.state; - } else if(ext->edge_flash.right_ip) { - flash_area.x1 = page->coords.x2 - ext->edge_flash.state; - flash_area.x2 = page->coords.x2 + 3 * page_h - ext->edge_flash.state; - flash_area.y1 = page->coords.y1 - page_h; - flash_area.y2 = page->coords.y2 + page_h; - } else if(ext->edge_flash.left_ip) { - flash_area.x1 = page->coords.x1 - 3 * page_h + ext->edge_flash.state; - flash_area.x2 = page->coords.x1 + ext->edge_flash.state; - flash_area.y1 = page->coords.y1 - page_h; - flash_area.y2 = page->coords.y2 + page_h; - } +#if LV_USE_ANIMATION + { + lv_coord_t page_w = lv_obj_get_width(page); + lv_coord_t page_h = lv_obj_get_height(page); + + lv_area_t flash_area; + + if(ext->edge_flash.top_ip) { + flash_area.x1 = page->coords.x1 - page_w; + flash_area.x2 = page->coords.x2 + page_w; + flash_area.y1 = page->coords.y1 - 3 * page_w + ext->edge_flash.state; + flash_area.y2 = page->coords.y1 + ext->edge_flash.state; + } else if(ext->edge_flash.bottom_ip) { + flash_area.x1 = page->coords.x1 - page_w; + flash_area.x2 = page->coords.x2 + page_w; + flash_area.y1 = page->coords.y2 - ext->edge_flash.state; + flash_area.y2 = page->coords.y2 + 3 * page_w - ext->edge_flash.state; + } else if(ext->edge_flash.right_ip) { + flash_area.x1 = page->coords.x2 - ext->edge_flash.state; + flash_area.x2 = page->coords.x2 + 3 * page_h - ext->edge_flash.state; + flash_area.y1 = page->coords.y1 - page_h; + flash_area.y2 = page->coords.y2 + page_h; + } else if(ext->edge_flash.left_ip) { + flash_area.x1 = page->coords.x1 - 3 * page_h + ext->edge_flash.state; + flash_area.x2 = page->coords.x1 + ext->edge_flash.state; + flash_area.y1 = page->coords.y1 - page_h; + flash_area.y2 = page->coords.y2 + page_h; + } - if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip || - ext->edge_flash.bottom_ip) { - lv_style_t flash_style; - lv_style_copy(&flash_style, ext->edge_flash.style); - flash_style.body.radius = LV_RADIUS_CIRCLE; - uint32_t opa = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE; - flash_style.body.opa = opa; - lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page)); + if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip || + ext->edge_flash.bottom_ip) { + lv_style_t flash_style; + lv_style_copy(&flash_style, ext->edge_flash.style); + flash_style.body.radius = LV_RADIUS_CIRCLE; + uint32_t opa = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE; + flash_style.body.opa = opa; + lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page)); + } } +#endif } return true; @@ -939,21 +960,25 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi new_x = lv_area_get_width(&page_coords) - lv_area_get_width(&scrl_coords) - page_style->body.padding.right; /* Right align */ refr_x = true; +#if LV_USE_ANIMATION if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.right_ip = 1; } +#endif } else if(scrl_coords.x1 > page_coords.x1 + page_style->body.padding.left) { new_x = page_style->body.padding.left; /*Left align*/ refr_x = true; +#if LV_USE_ANIMATION if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.left_ip = 1; } +#endif } } @@ -978,21 +1003,25 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi new_y = lv_area_get_height(&page_coords) - lv_area_get_height(&scrl_coords) - page_style->body.padding.bottom; /* Bottom align */ refr_y = true; +#if LV_USE_ANIMATION if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.bottom_ip = 1; } +#endif } else if(scrl_coords.y1 > page_coords.y1 + page_style->body.padding.top) { new_y = page_style->body.padding.top; /*Top align*/ refr_y = true; +#if LV_USE_ANIMATION if(page_ext->edge_flash.enabled && page_ext->edge_flash.left_ip == 0 && page_ext->edge_flash.right_ip == 0 && page_ext->edge_flash.top_ip == 0 && page_ext->edge_flash.bottom_ip == 0) { lv_page_start_edge_flash(page); page_ext->edge_flash.top_ip = 1; } +#endif } } diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index 60b8536b1ca2..c81db161644d 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -77,6 +77,7 @@ typedef struct uint8_t ver_draw : 1; /*1: vertical scrollbar is visible now (Handled by the library)*/ lv_sb_mode_t mode : 3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/ } sb; +#if LV_USE_ANIMATION struct { lv_anim_value_t state; /*Store the current size of the edge flash effect*/ @@ -91,6 +92,7 @@ typedef struct uint8_t left_ip : 1; /*Used internally to show that left most position is reached (flash is In Progress)*/ } edge_flash; +#endif uint8_t arrow_scroll : 1; /*1: Enable scrolling with LV_KEY_LEFT/RIGHT/UP/DOWN*/ uint8_t scroll_prop : 1; /*1: Propagate the scrolling the the parent if the edge is reached*/ diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 9d098463a245..67c386cc315e 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -38,7 +38,9 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par static void refr_position(lv_obj_t * roller, bool anim_en); static void refr_height(lv_obj_t * roller); static void inf_normalize(void * roller_scrl); +#if LV_USE_ANIMATION static void scroll_anim_ready_cb(lv_anim_t * a); +#endif static void draw_bg(lv_obj_t * roller, const lv_area_t * mask); /********************** @@ -407,7 +409,9 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par lv_obj_get_height(roller) != lv_area_get_height(param)) { refr_height(roller); +#if LV_USE_ANIMATION lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); +#endif lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); } @@ -531,7 +535,9 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, } } else if(sign == LV_SIGNAL_PRESSED) { +#if LV_USE_ANIMATION lv_anim_del(roller_scrl, (lv_anim_exec_cb_t)lv_obj_set_y); +#endif } /*Position the scrollable according to the new selected option*/ @@ -614,7 +620,11 @@ static void refr_position(lv_obj_t * roller, bool anim_en) /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. * But without animations do it manually*/ - if(anim_en == false || ext->ddlist.anim_time == 0) { + if(anim_en == false +#if LV_USE_ANIMATION + || ext->ddlist.anim_time == 0 +#endif + ) { inf_normalize(roller_scrl); } @@ -623,7 +633,11 @@ static void refr_position(lv_obj_t * roller, bool anim_en) ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; lv_coord_t new_y = -line_y1 + (h - font_h) / 2; - if(ext->ddlist.anim_time == 0 || anim_en == false) { + if( anim_en == false +#if LV_USE_ANIMATION + || ext->ddlist.anim_time == 0 +#endif + ) { lv_obj_set_y(roller_scrl, new_y); } else { #if LV_USE_ANIMATION @@ -664,7 +678,9 @@ static void refr_height(lv_obj_t * roller) lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); +#if LV_USE_ANIMATION lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); +#endif lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); } @@ -699,9 +715,11 @@ static void inf_normalize(void * scrl) } } +#if LV_USE_ANIMATION static void scroll_anim_ready_cb(lv_anim_t * a) { inf_normalize(a->var); } +#endif #endif diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index c41b49d5d906..e2e7666cda2d 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -321,6 +321,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(slider_w >= slider_h) { lv_coord_t indic_w = lv_area_get_width(&area_indic); +#if LV_USE_ANIMATION if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_x = @@ -334,7 +335,10 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig * `anim_end`)*/ area_indic.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } else { + } + else +#endif + { area_indic.x2 = (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); } @@ -347,6 +351,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig } else { lv_coord_t indic_h = lv_area_get_height(&area_indic); +#if LV_USE_ANIMATION if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_y = @@ -360,7 +365,10 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig * `anim_end`)*/ area_indic.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); - } else { + } + else +#endif + { area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); } @@ -395,6 +403,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig knob_area.x1 = area_indic.x2 - slider_h / 2; knob_area.x2 = knob_area.x1 + slider_h - 1; } else { +#if LV_USE_ANIMATION if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t w = slider_w - slider_h - 1; lv_coord_t anim_start_x = @@ -408,7 +417,9 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig * `anim_end`)*/ knob_area.x1 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } else { + } else +#endif + { knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / (max_value - min_value); @@ -425,6 +436,7 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig knob_area.y1 = area_indic.y1 - slider_w / 2; knob_area.y2 = knob_area.y1 + slider_w - 1; } else { +#if LV_USE_ANIMATION if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t h = slider_h - slider_w - 1; lv_coord_t anim_start_x = @@ -438,7 +450,9 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig * `anim_end`)*/ knob_area.y2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } else { + } else +#endif + { knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / (max_value - min_value); diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index f40be85f310c..1899704946d7 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -375,9 +375,9 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if( anim_en == false || + if( anim_en == false #if LV_USE_ANIMATION - ext->anim_time == 0 + || ext->anim_time == 0 #endif ) { lv_obj_set_x(ext->content, cont_x); @@ -418,9 +418,9 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if( anim_en == false || + if( anim_en == false #if LV_USE_ANIMATION - ext->anim_time == 0 + || ext->anim_time == 0 #endif ) { switch(ext->btns_pos) { diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index bac4a475d35c..5e21031489f6 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -370,6 +370,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void ext->drag_ver = 1; } +#if LV_USE_ANIMATION if(ext->drag_hor) { ext->page.edge_flash.top_ip = 0; ext->page.edge_flash.bottom_ip = 0; @@ -379,6 +380,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void ext->page.edge_flash.right_ip = 0; ext->page.edge_flash.left_ip = 0; } +#endif lv_coord_t x = lv_obj_get_x(scrl); lv_coord_t y = lv_obj_get_y(scrl); @@ -387,12 +389,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->drag_top_en == 0) { if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) { +#if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.top_ip = 1; lv_page_start_edge_flash(tileview); } +#endif lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } @@ -400,12 +404,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) { if(y < -(ext->act_id.y * h)) { +#if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.bottom_ip = 1; lv_page_start_edge_flash(tileview); } +#endif } lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); @@ -413,12 +419,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->drag_left_en == 0) { if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) { +#if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.left_ip = 1; lv_page_start_edge_flash(tileview); } +#endif lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left); } @@ -426,12 +434,14 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) { if(x < -(ext->act_id.x * w)) { +#if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && ext->page.edge_flash.bottom_ip == 0) { ext->page.edge_flash.right_ip = 1; lv_page_start_edge_flash(tileview); } +#endif } lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.top); From 6212d0a507e85a9046693e83b71f733cac092140 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Mon, 20 May 2019 18:38:24 -0700 Subject: [PATCH 442/590] lv_style.c change int16_t to lv_anim_value_t in animation exec cb --- src/lv_core/lv_style.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 9e3f8ad38ca5..0b7c48a49094 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -8,6 +8,7 @@ *********************/ #include "lv_obj.h" #include "../lv_misc/lv_mem.h" +#include "../lv_misc/lv_anim.h" /********************* * DEFINES @@ -31,7 +32,7 @@ * STATIC PROTOTYPES **********************/ #if LV_USE_ANIMATION -static void style_animator(lv_style_anim_dsc_t * dsc, int16_t val); +static void style_animator(lv_style_anim_dsc_t * dsc, lv_anim_value_t val); static void style_animation_common_end_cb(lv_anim_t * a); #endif @@ -318,7 +319,7 @@ void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_styl * @param dsc the 'animated variable' set by lv_style_anim_create() * @param val the current state of the animation between 0 and LV_ANIM_RESOLUTION */ -static void style_animator(lv_style_anim_dsc_t * dsc, int16_t val) +static void style_animator(lv_style_anim_dsc_t * dsc, lv_anim_value_t val) { const lv_style_t * start = &dsc->style_start; const lv_style_t * end = &dsc->style_end; From 5652a163c50ecee0f7810a80bece19bf5ac335c8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 21 May 2019 15:49:50 +0200 Subject: [PATCH 443/590] indev: use indev_obj_act for pointers too --- src/lv_core/lv_indev.c | 128 ++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 66 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 0b39021f4dce..c017cdfcc7b7 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -48,9 +48,7 @@ static bool indev_reset_check(lv_indev_proc_t *proc); * STATIC VARIABLES **********************/ static lv_indev_t * indev_act; -#if LV_USE_GROUP static lv_obj_t * indev_obj_act = NULL; -#endif /********************** * MACROS @@ -94,9 +92,11 @@ void lv_indev_read_task(lv_task_t * task) /*The active object might deleted even in the read function*/ indev_proc_reset_query_handler(indev_act); + indev_obj_act = NULL; indev_act->proc.state = data.state; + if(indev_act->proc.state == LV_INDEV_STATE_PR) { indev_act->driver.disp->last_activity_time = lv_tick_get(); } @@ -115,6 +115,7 @@ void lv_indev_read_task(lv_task_t * task) /*End of indev processing, so no act indev*/ indev_act = NULL; + indev_obj_act = NULL; LV_LOG_TRACE("indev read task finished"); } @@ -315,16 +316,12 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev) } /** - * Gets a pointer to the currently active object in indev proc functions. - * NULL if no object is currently being handled or if groups aren't used. - * @return pointer to currently focused object + * Gets a pointer to the currently active object in the currently processed input device. + * @return pointer to currently active object or NULL if no active object */ -lv_obj_t * lv_indev_get_obj_act( void ) { -#if LV_USE_GROUP +lv_obj_t * lv_indev_get_obj_act(void) +{ return indev_obj_act; -#else - return NULL; -#endif } /********************** @@ -695,50 +692,50 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_proc_press(lv_indev_proc_t * proc) { - lv_obj_t * pr_obj = proc->types.pointer.act_obj; + lv_obj_t * indev_obj_act = proc->types.pointer.act_obj; if(proc->wait_until_release != 0) return; lv_disp_t * disp = indev_act->driver.disp; /*If there is no last object then search*/ - if(proc->types.pointer.act_obj == NULL) { - pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); + if(indev_obj_act == NULL) { + indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); + if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_top(disp)); + if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If there is last object but it is not dragged and not protected also search*/ else if(proc->types.pointer.drag_in_prog == 0 && - lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST) == - false) { /*Now types.pointer.act_obj != NULL*/ - pr_obj = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_layer_top(disp)); - if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_disp_get_scr_act(disp)); + lv_obj_is_protected(indev_obj_act, LV_PROTECT_PRESS_LOST) == false) { + indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_sys(disp)); + if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_layer_top(disp)); + if(indev_obj_act == NULL) indev_obj_act = indev_search_obj(proc, lv_disp_get_scr_act(disp)); } /*If a dragable or a protected object was the last then keep it*/ else { } /*If a new object was found reset some variables and send a pressed signal*/ - if(pr_obj != proc->types.pointer.act_obj) { + if(indev_obj_act != proc->types.pointer.act_obj) { proc->types.pointer.last_point.x = proc->types.pointer.act_point.x; proc->types.pointer.last_point.y = proc->types.pointer.act_point.y; /*If a new object found the previous was lost, so send a signal*/ if(proc->types.pointer.act_obj != NULL) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, - LV_SIGNAL_PRESS_LOST, indev_act); + /*Save the obj because in special cases `act_obj` can change in the signal function*/ + lv_obj_t * last_obj = proc->types.pointer.act_obj; + + last_obj->signal_cb(last_obj, LV_SIGNAL_PRESS_LOST, indev_act); if(indev_reset_check(proc)) return; - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESS_LOST, NULL); + lv_event_send(last_obj, LV_EVENT_PRESS_LOST, NULL); if(indev_reset_check(proc)) return; } - proc->types.pointer.act_obj = pr_obj; /*Save the pressed object*/ - proc->types.pointer.last_obj = - proc->types.pointer.act_obj; /*Refresh the types.pointer.last_obj*/ + proc->types.pointer.act_obj = indev_obj_act; /*Save the pressed object*/ + proc->types.pointer.last_obj = indev_obj_act; - if(proc->types.pointer.act_obj != NULL) { + if(indev_obj_act != NULL) { /* Save the time when the obj pressed. * It is necessary to count the long press time.*/ proc->pr_timestamp = lv_tick_get(); @@ -751,7 +748,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) proc->types.pointer.vect.y = 0; /*Search for 'top' attribute*/ - lv_obj_t * i = proc->types.pointer.act_obj; + lv_obj_t * i = indev_obj_act; lv_obj_t * last_top = NULL; while(i != NULL) { if(i->top) last_top = i; @@ -764,10 +761,10 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*Send a signal about the press*/ - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_PRESSED, - indev_act); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSED, indev_act); if(indev_reset_check(proc)) return; - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSED, NULL); + + lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); if(indev_reset_check(proc)) return; } } @@ -793,11 +790,10 @@ static void indev_proc_press(lv_indev_proc_t * proc) proc->types.pointer.drag_throw_vect.y += (proc->types.pointer.vect.y * 4) >> 3; /*If there is active object and it can be dragged run the drag*/ - if(proc->types.pointer.act_obj != NULL) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, - LV_SIGNAL_PRESSING, indev_act); + if(indev_obj_act != NULL) { + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_PRESSING, indev_act); if(indev_reset_check(proc)) return; - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_PRESSING, NULL); + lv_event_send(indev_obj_act, LV_EVENT_PRESSING, NULL); if(indev_reset_check(proc)) return; indev_drag(proc); @@ -807,9 +803,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 0) { /*Send a signal about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver.long_press_time) { - pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS, indev_act); if(indev_reset_check(proc)) return; - lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); if(indev_reset_check(proc)) return; /*Mark the signal sending to do not send it again*/ @@ -821,11 +817,11 @@ static void indev_proc_press(lv_indev_proc_t * proc) } /*Send long press repeated signal*/ if(proc->types.pointer.drag_in_prog == 0 && proc->long_pr_sent == 1) { - /*Send a signal about the long press repeate if enough time elapsed*/ + /*Send a signal about the long press repeat if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver.long_press_rep_time) { - pr_obj->signal_cb(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_LONG_PRESS_REP, indev_act); if(indev_reset_check(proc)) return; - lv_event_send(pr_obj, LV_EVENT_LONG_PRESSED_REPEAT, NULL); + lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(indev_reset_check(proc)) return; proc->longpr_rep_timestamp = lv_tick_get(); } @@ -846,47 +842,46 @@ static void indev_proc_release(lv_indev_proc_t * proc) proc->longpr_rep_timestamp = 0; proc->wait_until_release = 0; } + indev_obj_act = proc->types.pointer.act_obj; /*Forget the act obj and send a released signal */ - if(proc->types.pointer.act_obj) { + if(indev_obj_act) { /* If the object was protected against press lost then it possible that * the object is already not pressed but still it is the `act_obj`. * In this case send the `LV_SIGNAL_RELEASED/CLICKED` instead of `LV_SIGNAL_PRESS_LOST` if * the indev is ON the `types.pointer.act_obj` */ - if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_PRESS_LOST)) { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, - indev_act); + if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_PRESS_LOST)) { + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, indev_act); if(indev_reset_check(proc)) return; if(proc->types.pointer.drag_in_prog == 0) { if(proc->long_pr_sent == 0) { - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); if(indev_reset_check(proc)) return; } - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); if(indev_reset_check(proc)) return; } - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); if(indev_reset_check(proc)) return; } /* The simple case: `act_obj` was not protected against press lost. * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ else { - proc->types.pointer.act_obj->signal_cb(proc->types.pointer.act_obj, LV_SIGNAL_RELEASED, - indev_act); + indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, indev_act); if(indev_reset_check(proc)) return; if(proc->long_pr_sent == 0 && proc->types.pointer.drag_in_prog == 0) { - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_SHORT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_SHORT_CLICKED, NULL); if(indev_reset_check(proc)) return; } - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_CLICKED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_CLICKED, NULL); if(indev_reset_check(proc)) return; - lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); + lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); if(indev_reset_check(proc)) return; } @@ -894,26 +889,26 @@ static void indev_proc_release(lv_indev_proc_t * proc) /*Handle click focus*/ #if LV_USE_GROUP - lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj); + lv_group_t * g = lv_obj_get_group(indev_obj_act); /*Check, if the parent is in a group focus on it.*/ /*Respect the click focus protection*/ - if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) { - lv_obj_t * parent = proc->types.pointer.act_obj; + if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_CLICK_FOCUS) == false) { + lv_obj_t * parent = indev_obj_act; while(g == NULL) { parent = lv_obj_get_parent(parent); if(parent == NULL) break; - if(lv_obj_is_protected( - parent, - LV_PROTECT_CLICK_FOCUS)) { /*Ignore is the protected against click focus*/ + + /*Ignore is the protected against click focus*/ + if(lv_obj_is_protected(parent, LV_PROTECT_CLICK_FOCUS)) { parent = NULL; break; } g = lv_obj_get_group(parent); } - /* If a pareit is in a group make it focused. + /* If a parent is in a group make it focused. * `LV_EVENT_FOCUSED/DEFOCUSED` will be sent by `lv_group_focus_obj`*/ if(g && parent) { if(lv_group_get_click_focus(g)) { @@ -926,14 +921,14 @@ static void indev_proc_release(lv_indev_proc_t * proc) /* Send defocus to the lastly "active" object and foucus to the new one. * If the one of them is in group then it possible that `lv_group_focus_obj` alraedy sent * a focus/defucus signal because of `click focus`*/ - if(proc->types.pointer.last_pressed != proc->types.pointer.act_obj) { + if(proc->types.pointer.last_pressed != indev_obj_act) { lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL); if(indev_reset_check(proc)) return; lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL); if(indev_reset_check(proc)) return; - proc->types.pointer.last_pressed = proc->types.pointer.act_obj; + proc->types.pointer.last_pressed = indev_obj_act; } if(indev_reset_check(proc)) return; @@ -973,6 +968,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev) indev->proc.types.pointer.drag_throw_vect.x = 0; indev->proc.types.pointer.drag_throw_vect.y = 0; indev->proc.reset_query = 0; + indev_obj_act = NULL; } } /** @@ -1219,11 +1215,11 @@ static void indev_drag_throw(lv_indev_proc_t * proc) * @param proc pointer to an input device 'proc' * return true if indev query should be immediately truncated. */ -static bool indev_reset_check(lv_indev_proc_t *proc) { -#if LV_USE_GROUP +static bool indev_reset_check(lv_indev_proc_t *proc) +{ if(proc->reset_query) { indev_obj_act = NULL; } -#endif - return proc->reset_query; + + return proc->reset_query ? true : false; } From 5803fa621465b2600fcc90a53770fb336e1ef503 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 21 May 2019 15:56:27 +0200 Subject: [PATCH 444/590] indev: minor fix --- src/lv_core/lv_indev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index c017cdfcc7b7..ae406cf123fa 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -692,7 +692,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) */ static void indev_proc_press(lv_indev_proc_t * proc) { - lv_obj_t * indev_obj_act = proc->types.pointer.act_obj; + indev_obj_act = proc->types.pointer.act_obj; if(proc->wait_until_release != 0) return; From 0f1e2601551df51bf20a5d88cda332582ca0324d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 22 May 2019 06:34:14 +0200 Subject: [PATCH 445/590] LV_CHART_TYPE_AREA fixes --- src/lv_objx/lv_chart.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 7c4d40bf8cc3..b7a794a2060c 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -743,7 +743,6 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; - for(i = 1; i < ext->point_cnt; i++) { p1.x = p2.x; p1.y = p2.y; @@ -976,10 +975,9 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; style.body.main_color = ser->color; - p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; - p_prev = ser->start_point; + p_prev = start_point; y_tmp = (int32_t)((int32_t)ser->points[p_prev] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; @@ -989,7 +987,7 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) p1.y = p2.y; p_act = (start_point + i) % ext->point_cnt; - p2.x = ((w * p_act) / (ext->point_cnt - 1)) + x_ofs; + p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); @@ -999,12 +997,12 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) ser->points[p_act] != LV_CHART_POINT_DEF) { lv_point_t triangle_points[3]; triangle_points[0] = p1; - triangle_points[1].x = p2.x; - triangle_points[1].y = y_ofs + h; + triangle_points[1] = p2; triangle_points[2].x = p1.x; - triangle_points[2].y = y_ofs + h; + triangle_points[2].y = chart->coords.y2; lv_draw_triangle(triangle_points, mask, &style, opa_scale); - triangle_points[2] = p2; + triangle_points[2].x = p2.x; + triangle_points[0].y =chart->coords.y2; lv_draw_triangle(triangle_points, mask, &style, opa_scale); } p_prev = p_act; From a3e88e1ecdec6a38737f82c08f5d9561b75b99c4 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Thu, 23 May 2019 10:42:45 -0400 Subject: [PATCH 446/590] Update lv_btnm_set_one_toggle docs (#1079) --- src/lv_objx/lv_btnm.c | 3 +++ src/lv_objx/lv_btnm.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 6f284e92af2c..5ac4737044eb 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -401,6 +401,9 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width /** * Make the button matrix like a selector widget (only one button may be toggled at a time). + * + * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or `lv_btnm_set_btn_ctrl_all`. + * * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index 09b5bb687ff8..b02ab8417426 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -170,6 +170,9 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width /** * Make the button matrix like a selector widget (only one button may be toggled at a time). + * + * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or `lv_btnm_set_btn_ctrl_all`. + * * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled */ From 225c2f727c212a32586b59b546314006d592b00f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 24 May 2019 06:24:31 +0200 Subject: [PATCH 447/590] improve font template --- src/lv_fonts/lv_font_dejavu_20.c | 114 ++++++++++++++++------ src/lv_misc/lv_font.h | 2 - src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 20 ++-- 3 files changed, 94 insertions(+), 42 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index c7a77ca49901..a2e61b57e6fb 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -1,5 +1,5 @@ -#include "../lv_misc/lv_font.h" +#include "../lv_misc/lv_font_fmt/lv_font_fmt_txt.h" #if LV_USE_FONT_DEJAVU_20 != 0 /*Can be enabled in lv_conf.h*/ @@ -8,7 +8,7 @@ ***********************************************************************************/ /*Store the image of the letters (glyph)*/ -static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { +static const uint8_t gylph_bitmap[] = { /*Unicode: U+0020 ( ) , Width: 6 */ /*Unicode: U+0031 (1) , Width: 8 */ @@ -81,45 +81,99 @@ static const uint8_t lv_font_dejavu_20_glyph_bitmap[] = { /*4 rows*/ }; +static uint16_t kern_left_gylph_ids[] = +{ + 1, 2, 3 +}; + +static uint16_t kern_right_gylph_ids[] = +{ + 1, 2, 3 +}; +static uint8_t kern_pair_values[] = +{ + 15, 52, 73 +}; + +static lv_font_kern_pair_fmt_txt_t kern_pairs = +{ + .left_gylph_ids = kern_left_gylph_ids, + .right_gylph_ids = kern_right_gylph_ids, + .values = kern_pair_values, + .pair_cnt = 3, +}; + +static uint8_t kern_left_class_mapping[] = +{ + 1, 2, 1, 1, 1, 1, 1, 1 +}; + +static uint8_t kern_right_class_mapping[] = +{ + 1, 2, 3, 2, 2, 3, 3, 1 +}; + +static uint8_t kern_class_values = +{ + 32, 33, 22, 11, 55, 33, 22, 44 +}; + -static const lv_font_kern_t kern_0031[] = { - {.next_unicode = 0x0033, .space = LV_FONT_SET_WIDTH(8, 0), .space_sign = LV_FONT_KERN_POSITIVE}, - {.next_unicode = 0x0000} /*Trailing*/ +static lv_font_kern_classes_fmt_txt_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 2, + .right_class_cnt = 3, }; + +static uint16_t uniocde_list_1 = {0x234, 0x295, 0x456}; +static uint16_t glyph_id_ofs_list_1 = {232, 545, 1466}; + +static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; + + /*Store the glyph descriptions*/ -static const lv_font_glyph_dsc_built_in_t lv_font_dejavu_20_glyph_dsc[] = { - {.adv_w = LV_FONT_SET_WIDTH(6, 0), .box_w = 6, .box_h = 0, .ofs_x = 0, .ofs_y = 0, .bitmap_index = 0, }, /*Unicode: U+0020 ( )*/ - {.adv_w = LV_FONT_SET_WIDTH(8, 0), .box_w = 8, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 0, .kern_table = kern_0031}, /*Unicode: U+0031 (1)*/ - {.adv_w = LV_FONT_SET_WIDTH(9, 0), .box_w = 9, .box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 13}, /*Unicode: U+0033 (3)*/ - {.adv_w = LV_FONT_SET_WIDTH(12, 0), .box_w = 12,.box_h = 13,.ofs_x = 0, .ofs_y = 3, .bitmap_index = 39}, /*Unicode: U+0041 (A)*/ - {.adv_w = LV_FONT_SET_WIDTH(8, 0), .box_w = 8, .box_h = 10,.ofs_x = 0, .ofs_y = 6, .bitmap_index = 65}, /*Unicode: U+0061 (a)*/ +static const lv_font_cmap_fmt_txt_t cmaps[] = { + { .range_start = 0x280, .range_length = 124, .glyph_id_start = 223, .unicode_list = uniocde_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1}, + { .range_start = 0x20, .range_length = 112, .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL}, + { .range_start = 0x560, .range_length = 7654, .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, + }; -static const uint16_t lv_font_dejavu_20_unicode_list[] = { - 32, /*Unicode: U+0020 ( )*/ - 49, /*Unicode: U+0031 (1)*/ - 51, /*Unicode: U+0033 (3)*/ - 65, /*Unicode: U+0041 (A)*/ - 97, /*Unicode: U+0061 (a)*/ +static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 123, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 32, .adv_w = 234, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 55, .adv_w = 98, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, }; -static lv_font_dsc_built_in_t lv_font_dejavu_20_dsc = { - .glyph_cnt = 5, /*Number of glyphs in the font*/ - .glyph_bitmap = lv_font_dejavu_20_glyph_bitmap, /*Bitmap of glyphs*/ - .glyph_dsc = lv_font_dejavu_20_glyph_dsc, /*Description of glyphs*/ - .unicode_list = lv_font_dejavu_20_unicode_list, /*Every character in the font from 'unicode_first' to 'unicode_last'*/ - .bpp = 1, /*Bit per pixel*/ +static lv_font_dsc_fmt_txt_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 3, + .bpp = 4, + + .kern_dsc = kern_classes, + .kern_classes = 1, + /*or*/ + .kern_dsc = kern_pairs, + .kern_classes = 0, + + }; + lv_font_t lv_font_dejavu_20 = { - .unicode_first = 32, /*First Unicode letter in this font*/ - .unicode_last = 126, /*Last Unicode letter in this font*/ - .dsc = &lv_font_dejavu_20_dsc, - .get_glyph_bitmap = lv_font_get_glyph_bitmap_plain, /*Function pointer to get glyph's bitmap*/ - .get_glyph_dsc = lv_font_get_glyph_dsc_plain, /*Function pointer to get glyph's width*/ - .line_height = 20, /*Font height in pixels*/ - .next_page = NULL, /*Pointer to a font extension*/ + .unicode_first = 0x20, /*First Unicode letter in this font*/ + .unicode_last = 0x3F45, /*Last Unicode letter in this font*/ + .dsc = &font_dsc, + .get_glyph_bitmap = lv_font_get_bitmap_format_text_plain, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_format_text_plain, /*Function pointer to get glyph's data*/ + .line_height = 20, /*The maximum line height required by the font*/ + .base_line = 9, /*Baseline measured from the bottom of the line*/ }; #endif /*USE_LV_FONT_DEJAVU_20*/ diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 43a137c638bf..7022104b7f9c 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -66,8 +66,6 @@ typedef struct _lv_font_struct const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); /*Pointer to the font in a font pack (must have the same line height)*/ - struct _lv_font_struct * next_page; - uint8_t size; /*The original size (height)*/ uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ void * dsc; /*Store implementation specific data here*/ diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 0c3809f7d487..29ef130d8186 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -3,8 +3,8 @@ * */ -#ifndef LV_FONT_H -#define LV_FONT_H +#ifndef LV_FONT_FMT_TXT_H +#define LV_FONT_FMT_TXT_H #ifdef __cplusplus extern "C" { @@ -71,20 +71,20 @@ typedef struct { search a "value" in an "array" and returns the index of "value". Format 0 tiny - unicode_list == NULL && glyph_id_list == NULL + unicode_list == NULL && glyph_id_ofs_list == NULL glyph_id = glyph_id_start + rcp Format 0 full - unicode_list == NULL && glyph_id_list != NULL - glyph_id = glyph_id_start + glyph_id_list[rcp] + unicode_list == NULL && glyph_id_ofs_list != NULL + glyph_id = glyph_id_start + glyph_id_ofs_list[rcp] Sparse tiny - unicode_list != NULL && glyph_id_list == NULL + unicode_list != NULL && glyph_id_ofs_list == NULL glyph_id = glyph_id_start + search(unicode_list, rcp) Sparse full - unicode_list != NULL && glyph_id_list != NULL - glyph_id = glyph_id_start + glyph_id_list[search(unicode_list, rcp)] + unicode_list != NULL && glyph_id_ofs_list != NULL + glyph_id = glyph_id_start + glyph_id_ofs_list[search(unicode_list, rcp)] */ uint16_t * unicode_list; @@ -92,7 +92,7 @@ typedef struct { /* if unicode_list == NULL uint8_t * * else uint16_t * */ - const void * glyph_id_list; + const void * glyph_id_ofs_list; }lv_font_cmap_fmt_txt_t; /*A simple mapping of kern values from pairs*/ @@ -190,4 +190,4 @@ bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_gly } /* extern "C" */ #endif -#endif /*USE_FONT*/ +#endif /*LV_FONT_FMT_TXT_H*/ From d3d9fde2451d266aab9a4117e41eaa405116abf8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 24 May 2019 06:26:56 +0200 Subject: [PATCH 448/590] unify lv_obj_..._ext_click_area... API --- src/lv_core/lv_obj.c | 65 ++++++++++++++++++++++++++++++++++---------- src/lv_core/lv_obj.h | 41 ++++++++++------------------ 2 files changed, 65 insertions(+), 41 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 1990c0cb6b9a..c499786d8437 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1081,9 +1081,10 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h) } #endif -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** * Set the size of an extended clickable area + * If TINY mode is used, only the largest of the horizontal and vertical padding + * values are considered. * @param obj pointer to an object * @param left extended clickable are on the left [px] * @param right extended clickable are on the right [px] @@ -1092,12 +1093,16 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h) */ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom) { +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL obj->ext_click_pad.x1 = left; obj->ext_click_pad.x2 = right; obj->ext_click_pad.y1 = top; obj->ext_click_pad.y2 = bottom; -} +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + obj->ext_click_pad_hor = LV_MATH_MAX(left, right); + obj->ext_click_pad_ver = LV_MATH_MAX(top, bottom); #endif +} /*--------------------- * Appearance set @@ -1674,39 +1679,69 @@ bool lv_obj_get_auto_realign(lv_obj_t * obj) #endif } +/** + * Get the left padding of extended clickable area + * @param obj pointer to an object + * @return the extended left padding + */ +lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj) +{ #if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + return obj->ext_click_pad_hor; +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + return obj->ext_click_pad.x1; +#else + return 0; +#endif +} + /** - * Get the horizontal padding of extended clickable area + * Get the right padding of extended clickable area * @param obj pointer to an object - * @return the horizontal padding + * @return the extended right padding */ -uint8_t lv_obj_get_ext_click_pad_hor(const lv_obj_t * obj) +lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj) { +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY return obj->ext_click_pad_hor; +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + return obj->ext_click_pad.x2; +#else + return 0; +#endif } /** - * Get the vertical padding of extended clickable area + * Get the top padding of extended clickable area * @param obj pointer to an object - * @return the vertical padding + * @return the extended top padding */ -uint8_t lv_obj_get_ext_click_pad_ver(const lv_obj_t * obj) +lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj) { +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY return obj->ext_click_pad_ver; -} +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + return obj->ext_click_pad.y1; +#else + return 0; #endif +} -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** - * Get the horizontal padding of extended clickable area + * Get the bottom padding of extended clickable area * @param obj pointer to an object - * @return the horizontal padding + * @return the extended bottom padding */ -const lv_area_t * lv_obj_get_ext_click_pad(const lv_obj_t * obj) +lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj) { - return &obj->ext_click_pad; -} +#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY + return obj->ext_click_pad_ver +#elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL + return obj->ext_click_pad.y2; +#else + return 0; #endif +} /** * Get the extended size attribute of an object diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 83af1f1032c8..56b395e8f0b3 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -398,17 +398,6 @@ void lv_obj_realign(lv_obj_t * obj); */ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en); -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY -/** - * Set the size of an extended clickable area - * @param obj pointer to an object - * @param w extended width to both sides - * @param h extended height to both sides - */ -void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h); -#endif - -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** * Set the size of an extended clickable area * @param obj pointer to an object @@ -418,7 +407,6 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h); * @param bottom extended clickable are on the bottom [px] */ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right, lv_coord_t top, lv_coord_t bottom); -#endif /*--------------------- * Appearance set @@ -727,32 +715,33 @@ lv_coord_t lv_obj_get_height_fit(lv_obj_t * obj); */ bool lv_obj_get_auto_realign(lv_obj_t * obj); - -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY /** - * Get the horizontal padding of extended clickable area + * Get the left padding of extended clickable area * @param obj pointer to an object - * @return the horizontal padding + * @return the extended left padding */ -uint8_t lv_obj_get_ext_click_pad_hor(const lv_obj_t * obj); +lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj); /** - * Get the vertical padding of extended clickable area + * Get the right padding of extended clickable area * @param obj pointer to an object - * @return the vertical padding + * @return the extended right padding */ -uint8_t lv_obj_get_ext_click_pad_ver(const lv_obj_t * obj); +lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj); -#endif +/** + * Get the top padding of extended clickable area + * @param obj pointer to an object + * @return the extended top padding + */ +lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj); -#if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL /** - * Get the horizontal padding of extended clickable area + * Get the bottom padding of extended clickable area * @param obj pointer to an object - * @return the horizontal padding + * @return the extended bottom padding */ -const lv_area_t * lv_obj_get_ext_click_pad(const lv_obj_t * obj); -#endif +lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj); /** * Get the extended size attribute of an object From 5ef94e395d4af83783c8d04a7ca5f2d31d7adcb2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 24 May 2019 14:31:20 +0200 Subject: [PATCH 449/590] add font template --- src/lv_fonts/lv_font_template.c | 201 ++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 src/lv_fonts/lv_font_template.c diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c new file mode 100644 index 000000000000..9ce3c1bb6351 --- /dev/null +++ b/src/lv_fonts/lv_font_template.c @@ -0,0 +1,201 @@ + +#include "lvgl/lvgl.h" + +/*********************************************************************************** + * Size: 20 px + * Bpp: 1 (or 2/4/8/compressed) + * Fonts: + * DejaVuSans.ttf: U+0020 ( ) .. U+007e (~) range + * FoneAwesome.ttf: U+1e20 (?) .. U+1f22 (?), U+1f33 (?), U+1f66 (?) + **********************************************************************************/ + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static const uint8_t gylph_bitmap[] = { + /*Unicode: U+0031 (1) , Width: 8 */ + 0x38, //.+@@@... + 0xf8, //@@@@@... + 0x98, //@+.@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0x18, //...@@... + 0xff, //@@@@@@@@ + 0xff, //@@@@@@@@ + + /*Unicode: U+0033 (3) , Width: 9 */ + 0x7e, 0x00, //.%@@@@%.. + 0xff, 0x00, //@@@@@@@@+ + 0x83, 0x80, //@+....%@@ + 0x01, 0x80, //.......@@ + 0x03, 0x80, //......%@% + 0x3e, 0x00, //..@@@@@+. + 0x3f, 0x00, //..@@@@@%. + 0x03, 0x80, //.....+@@% + 0x01, 0x80, //.......@@ + 0x01, 0x80, //.......@@ + 0x83, 0x80, //%+...+@@% + 0xff, 0x00, //@@@@@@@@. + 0x7e, 0x00, //.%@@@@%.. + + /*Unicode: U+0041 (A) , Width: 12 */ + 0x06, 0x00, //.....@@..... + 0x06, 0x00, //....+@@+.... + 0x0f, 0x00, //....@@@@.... + 0x0f, 0x00, //....@@@@.... + 0x19, 0x80, //...%@++@%... + 0x19, 0x80, //...@@..@@... + 0x19, 0x80, //..+@%..%@+.. + 0x30, 0xc0, //..@@....@@.. + 0x3f, 0xc0, //..@@@@@@@@.. + 0x7f, 0xe0, //.%@@@@@@@@%. + 0x60, 0x60, //.@@......@@. + 0x60, 0x60, //+@%......%@+ + 0xc0, 0x30, //@@+......+@@ + + /*Unicode: U+0061 (a) , Width: 8 */ + 0x3c, //.+%@@@+. + 0x7e, //.@@@@@@. + 0x47, //.%...%@% + 0x03, //......@@ + 0x3f, //.+@@@@@@ + 0xff, //%@@@@@@@ + 0xc3, //@@+...@@ + 0xc7, //@@+..%@@ + 0xff, //%@@@@%@@ + 0x7b, //.%@@%.@@ +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 123, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 32, .adv_w = 234, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 55, .adv_w = 98, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1 = {0x234, 0x295, 0x456}; +static uint16_t glyph_id_ofs_list_1 = {232, 545, 1466}; + +static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; + + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_cmap_fmt_txt_t cmaps[] = { + { .range_start = 0x280, .range_length = 124, .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1}, + { .range_start = 0x20, .range_length = 112, .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL}, + { .range_start = 0x560, .range_length = 7654, .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, + +}; + +/*----------------- + * KERNING + *----------------*/ + +/*Left glyphs for kering*/ +static uint16_t kern_left_gylph_ids[] = +{ + 0x21, 0x42, 0x53 +}; + +/*Left glyphs for kering*/ +static uint16_t kern_right_gylph_ids[] = +{ + 0x41, 0x342, 0x333 +}; + +/*Kerning between the respective left and right glyphs*/ +static uint8_t kern_pair_values[] = +{ + 15, 52, 73 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_kern_pair_fmt_txt_t kern_pairs = +{ + .left_gylph_ids = kern_left_gylph_ids, + .right_gylph_ids = kern_right_gylph_ids, + .values = kern_pair_values, + .pair_cnt = 3, +}; + +/***** OR ******/ + +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = +{ + 1, 2, 1, 1, 1, 1, 1, 1 +}; + +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = +{ + 1, 2, 3, 2, 2, 3, 3, 1 +}; + +/*Kern values between classes*/ +static uint8_t kern_class_values = +{ + 32, 33, 22, 11, 55, 33, 22, 44 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_kern_classes_fmt_txt_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 2, + .right_class_cnt = 3, +}; + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_dsc_fmt_txt_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 3, + .bpp = 4, + + .kern_dsc = kern_classes, + .kern_classes = 1, + /*** OR ***/ + .kern_dsc = kern_pairs, + .kern_classes = 0, +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t font_name = { + .unicode_first = 0x20, /*First Unicode letter in this font*/ + .unicode_last = 0x3F45, /*Last Unicode letter in this font*/ + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_format_text_plain, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_format_text_plain, /*Function pointer to get glyph's data*/ + .line_height = 20, /*The maximum line height required by the font*/ + .base_line = 9, /*Baseline measured from the bottom of the line*/ +}; From 2c7cdea1eed1e78b73608665f9eb58376f937d42 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Sat, 25 May 2019 16:43:57 +0300 Subject: [PATCH 450/590] Replace * by [] to pass array argument As discussed on #935 https://github.com/littlevgl/lvgl/issues/935#issuecomment-481550697 --- src/lv_objx/lv_chart.h | 2 +- src/lv_objx/lv_line.c | 2 +- src/lv_objx/lv_line.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index c88961ebb86c..49cb6ecfd83c 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -200,7 +200,7 @@ void lv_chart_init_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * @param ser pointer to a data series on 'chart' * @param y_array array of 'lv_coord_t' points (with 'points count' elements ) */ -void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t * y_array); +void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y_array[]); /** * Shift all data right and set the most right data on a data line diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 7bc714db4149..4bac6bc0d364 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -106,7 +106,7 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) * so the array can NOT be a local variable which will be destroyed * @param point_num number of points in 'point_a' */ -void lv_line_set_points(lv_obj_t * line, const lv_point_t * point_a, uint16_t point_num) +void lv_line_set_points(lv_obj_t * line, const lv_point_t point_a[], uint16_t point_num) { lv_line_ext_t * ext = lv_obj_get_ext_attr(line); ext->point_array = point_a; diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index 35c44acf8617..3621731a515a 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -63,7 +63,7 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy); * so the array can NOT be a local variable which will be destroyed * @param point_num number of points in 'point_a' */ -void lv_line_set_points(lv_obj_t * line, const lv_point_t * point_a, uint16_t point_num); +void lv_line_set_points(lv_obj_t * line, const lv_point_t point_a[], uint16_t point_num); /** * Enable (or disable) the auto-size option. The size of the object will fit to its points. From b0fffaa55b52e517ddac4c66f7044dff24b0fffd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 16:27:36 +0200 Subject: [PATCH 451/590] LV_COLOR_TRANSP, LV_TA_CURSOR_BLINK_TIME and LV_TA_PWD_SHOW_TIME run time configurable --- lv_conf_template.h | 4 +- src/lv_conf_checker.h | 11 +- src/lv_draw/lv_draw_basic.c | 3 +- src/lv_hal/lv_hal_disp.c | 5 + src/lv_hal/lv_hal_disp.h | 4 + src/lv_objx/lv_ta.c | 225 +++++++++++++++++++++++++----------- src/lv_objx/lv_ta.h | 41 +++++-- 7 files changed, 207 insertions(+), 86 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 59b6e02d45c6..6678833d8138 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -424,8 +424,8 @@ typedef void * lv_obj_user_data_t; /*Text area (dependencies: lv_label, lv_page)*/ #define LV_USE_TA 1 #if LV_USE_TA != 0 -# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ -# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ +# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ +# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/ #endif /*Table (dependencies: lv_label)*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 5977ca8d8382..0ff048b1cb38 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -204,6 +204,8 @@ #define LV_IMG_CF_ALPHA 1 #endif +/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ + /*1: Add a `user_data` to drivers and objects*/ #ifndef LV_USE_USER_DATA #define LV_USE_USER_DATA 1 @@ -229,7 +231,6 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif - /* 1: Variable length array is supported*/ #ifndef LV_COMPILER_VLA_SUPPORTED #define LV_COMPILER_VLA_SUPPORTED 1 @@ -652,11 +653,11 @@ #define LV_USE_TA 1 #endif #if LV_USE_TA != 0 -#ifndef LV_TA_CURSOR_BLINK_TIME -# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +#ifndef LV_TA_DEF_CURSOR_BLINK_TIME +# define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ #endif -#ifndef LV_TA_PWD_SHOW_TIME -# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ +#ifndef LV_TA_DEF_PWD_SHOW_TIME +# define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/ #endif #endif diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 636160f981af..5f7b9d615532 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -462,7 +462,6 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint /*In the other cases every pixel need to be checked one-by-one*/ else { - lv_color_t chroma_key_color = LV_COLOR_TRANSP; lv_coord_t col; lv_color_t last_img_px = LV_COLOR_BLACK; lv_color_t recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa); @@ -493,7 +492,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint } /*Handle chroma key*/ - if(chroma_key && px_color.full == chroma_key_color.full) continue; + if(chroma_key && px_color.full == disp->driver.color_chroma_key.full) continue; /*Re-color the pixel if required*/ if(recolor_opa != LV_OPA_TRANSP) { diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 8add208cea45..327b5c5fc337 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -61,6 +61,7 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->ver_res = LV_VER_RES_MAX; driver->buffer = NULL; driver->rotated = 0; + driver->color_chroma_key = LV_COLOR_TRANSP; #if LV_ANTIALIAS driver->antialiasing = true; @@ -71,6 +72,10 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) driver->mem_fill_cb = NULL; #endif +#if LV_USE_USER_DATA + driver->user_data = NULL; +#endif + driver->set_px_cb = NULL; } diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index ba35b6c67db5..e67a28a4fb9a 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -99,6 +99,10 @@ typedef struct _disp_drv_t const lv_area_t * fill_area, lv_color_t color); #endif + /*On CHROMA_KEYED images this color will be transparent. + * `LV_COLOR_TRANSP` by default. (lv_conf.h)*/ + lv_color_t color_chroma_key; + #if LV_USE_USER_DATA lv_disp_drv_user_data_t user_data; #endif diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index dddf8b219228..0052028b53f3 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -22,12 +22,12 @@ *********************/ /*Test configuration*/ -#ifndef LV_TA_CURSOR_BLINK_TIME -#define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/ +#ifndef LV_TA_DEF_CURSOR_BLINK_TIME +#define LV_TA_DEF_CURSOR_BLINK_TIME 400 /*ms*/ #endif -#ifndef LV_TA_PWD_SHOW_TIME -#define LV_TA_PWD_SHOW_TIME 1500 /*ms*/ +#ifndef LV_TA_DEF_PWD_SHOW_TIME +#define LV_TA_DEF_PWD_SHOW_TIME 1500 /*ms*/ #endif #define LV_TA_DEF_WIDTH (2 * LV_DPI) @@ -102,9 +102,11 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->cursor.state = 1; ext->pwd_mode = 0; ext->pwd_tmp = NULL; + ext->pwd_show_time = LV_TA_DEF_PWD_SHOW_TIME; ext->accapted_chars = NULL; ext->max_length = 0; ext->cursor.style = NULL; + ext->cursor.blink_time = LV_TA_DEF_CURSOR_BLINK_TIME; ext->cursor.pos = 0; ext->cursor.type = LV_CURSOR_LINE; ext->cursor.valid_x = 0; @@ -113,6 +115,11 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = NULL; ext->placeholder = NULL; +#if LV_USE_ANIMATION + ext->pwd_show_time = 0; + ext->cursor.blink_time = 0; +#endif + lv_obj_set_signal_cb(new_ta, lv_ta_signal); lv_obj_set_signal_cb(lv_page_get_scrl(new_ta), lv_ta_scrollable_signal); lv_obj_set_design_cb(new_ta, lv_ta_design); @@ -162,21 +169,23 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) } #if LV_USE_ANIMATION - /*Create a cursor blinker animation*/ - lv_anim_t a; - a.var = new_ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; - a.time = LV_TA_CURSOR_BLINK_TIME; - a.act_time = 0; - a.ready_cb = NULL; - a.start = 1; - a.end = 0; - a.repeat = 1; - a.repeat_pause = 0; - a.playback = 1; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); + if(ext->cursor.blink_time) { + /*Create a cursor blinker animation*/ + lv_anim_t a; + a.var = new_ta; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.time = ext->cursor.blink_time; + a.act_time = 0; + a.ready_cb = NULL; + a.start = 1; + a.end = 0; + a.repeat = 1; + a.repeat_pause = 0; + a.playback = 1; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); + } #endif LV_LOG_INFO("text area created"); @@ -246,12 +255,12 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, (const char *)letter_buf); -#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 +#if LV_USE_ANIMATION /*Auto hide characters*/ lv_anim_t a; a.var = ta; a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; + a.time = ext->pwd_show_time; a.act_time = 0; a.ready_cb = pwd_char_hider_anim_ready; a.start = 0; @@ -262,6 +271,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) a.playback_pause = 0; a.path_cb = lv_anim_path_step; lv_anim_create(&a); + #else pwd_char_hider(ta); #endif @@ -326,22 +336,22 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt); -#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 - /*Auto hide characters*/ - lv_anim_t a; - a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; - a.act_time = 0; - a.ready_cb = pwd_char_hider_anim_ready; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); +#if LV_USE_ANIMATION + /*Auto hide characters*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.time = ext->pwd_show_time; + a.act_time = 0; + a.ready_cb = pwd_char_hider_anim_ready; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); #else pwd_char_hider(ta); #endif @@ -466,22 +476,22 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) if(ext->pwd_tmp == NULL) return; strcpy(ext->pwd_tmp, txt); -#if LV_USE_ANIMATION && LV_TA_PWD_SHOW_TIME > 0 - /*Auto hide characters*/ - lv_anim_t a; - a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; - a.time = LV_TA_PWD_SHOW_TIME; - a.act_time = 0; - a.ready_cb = pwd_char_hider_anim_ready; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); +#if LV_USE_ANIMATION + /*Auto hide characters*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.time = ext->pwd_show_time; + a.act_time = 0; + a.ready_cb = pwd_char_hider_anim_ready; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); #else pwd_char_hider(ta); #endif @@ -573,21 +583,23 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) ext->cursor.valid_x = cur_pos.x; #if LV_USE_ANIMATION - /*Reset cursor blink animation*/ - lv_anim_t a; - a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; - a.time = LV_TA_CURSOR_BLINK_TIME; - a.act_time = 0; - a.ready_cb = NULL; - a.start = 1; - a.end = 0; - a.repeat = 1; - a.repeat_pause = 0; - a.playback = 1; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); + if(ext->cursor.blink_time) { + /*Reset cursor blink animation*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.time = ext->cursor.blink_time; + a.act_time = 0; + a.ready_cb = NULL; + a.start = 1; + a.end = 0; + a.repeat = 1; + a.repeat_pause = 0; + a.playback = 1; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); + } #endif refr_cursor_area(ta); @@ -809,6 +821,60 @@ void lv_ta_set_text_sel(lv_obj_t * ta, bool en) #endif } +/** + * Set how long show the password before changing it to '*' + * @param ta pointer to Text area + * @param time show time in milliseconds. 0: hide immediately. + */ +void lv_ta_set_pwd_show_time(lv_obj_t * ta, uint16_t time) +{ +#if LV_USE_ANIMATION == 0 + time = 0; +#endif + + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->pwd_show_time = time; +} + +/** + * Set cursor blink animation time + * @param ta pointer to Text area + * @param time blink period. 0: disable blinking + */ +void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time) +{ +#if LV_USE_ANIMATION == 0 + time = 0; +#endif + + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->cursor.blink_time = time; + +#if LV_USE_ANIMATION + if(ext->cursor.blink_time) { + /*Reset cursor blink animation*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.time = ext->cursor.blink_time; + a.act_time = 0; + a.ready_cb = NULL; + a.start = 1; + a.end = 0; + a.repeat = 1; + a.repeat_pause = 0; + a.playback = 1; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); + } else { + ext->cursor.state = 1; + } +#else + ext->cursor.state = 1; +#endif +} + /*===================== * Getter functions *====================*/ @@ -989,6 +1055,29 @@ bool lv_ta_get_text_sel_en(lv_obj_t * ta) #endif } +/** + * Set how long show the password before changing it to '*' + * @param ta pointer to Text area + * @return show time in milliseconds. 0: hide immediately. + */ +uint16_t lv_ta_get_pwd_show_time(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + return ext->pwd_show_time; +} + +/** + * Set cursor blink animation time + * @param ta pointer to Text area + * @return time blink period. 0: disable blinking + */ +uint16_t lv_ta_get_cursor_blink_time(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + return ext->cursor.blink_time; +} + /*===================== * Other functions *====================*/ diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 41a5b45795a7..56d4963a4d6f 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -63,8 +63,7 @@ typedef struct char * pwd_tmp; /*Used to store the original text in password mode*/ const char * accapted_chars; /*Only these characters will be accepted. NULL: accept all*/ uint16_t max_length; /*The max. number of characters. 0: no limit*/ - uint8_t pwd_mode : 1; /*Replace characters with '*' */ - uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ + uint16_t pwd_show_time; /*Time to show characters in password mode before change them to '*' */ struct { const lv_style_t * style; /* Style of the cursor (NULL to use label's style)*/ @@ -72,6 +71,7 @@ typedef struct * (Used by the library)*/ uint16_t pos; /* The current cursor position * (0: before 1st letter; 1: before 2nd letter ...)*/ + uint16_t blink_time; /*Blink period*/ lv_area_t area; /* Cursor area relative to the Text Area*/ uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/ lv_cursor_type_t type : 4; /* Shape of the cursor*/ @@ -83,6 +83,8 @@ typedef struct uint8_t text_sel_in_prog : 1; /*User is in process of selecting */ uint8_t text_sel_en : 1; /*Text can be selected on this text area*/ #endif + uint8_t pwd_mode : 1; /*Replace characters with '*' */ + uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ } lv_ta_ext_t; enum { @@ -264,6 +266,20 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style */ void lv_ta_set_text_sel(lv_obj_t * ta, bool en); +/** + * Set how long show the password before changing it to '*' + * @param ta pointer to Text area + * @param time show time in milliseconds. 0: hide immediately. + */ +void lv_ta_set_pwd_show_time(lv_obj_t * ta, uint16_t time); + +/** + * Set cursor blink animation time + * @param ta pointer to Text area + * @param time blink period. 0: disable blinking + */ +void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time); + /*===================== * Getter functions *====================*/ @@ -296,13 +312,6 @@ lv_obj_t * lv_ta_get_label(const lv_obj_t * ta); */ uint16_t lv_ta_get_cursor_pos(const lv_obj_t * ta); -/** - * Get the current cursor visibility. - * @param ta pointer to a text area object - * @return true: the cursor is drawn, false: the cursor is hidden - */ -// bool lv_ta_get_cursor_show(const lv_obj_t * ta); - /** * Get the current cursor type. * @param ta pointer to a text area object @@ -390,6 +399,20 @@ bool lv_ta_text_is_selected(const lv_obj_t * ta); */ bool lv_ta_get_text_sel_en(lv_obj_t * ta); +/** + * Set how long show the password before changing it to '*' + * @param ta pointer to Text area + * @return show time in milliseconds. 0: hide immediately. + */ +uint16_t lv_ta_get_pwd_show_time(lv_obj_t * ta); + +/** + * Set cursor blink animation time + * @param ta pointer to Text area + * @return time blink period. 0: disable blinking + */ +uint16_t lv_ta_get_cursor_blink_time(lv_obj_t * ta); + /*===================== * Other functions *====================*/ From 01f990061f7c41f7076c7ff6a1d5cf2f482ac3e5 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 16:53:56 +0200 Subject: [PATCH 452/590] indev inactivity: check encoder diff too --- src/lv_core/lv_indev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index ae406cf123fa..aed2738b9b02 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -96,10 +96,13 @@ void lv_indev_read_task(lv_task_t * task) indev_act->proc.state = data.state; - + /*Save the last activity time*/ if(indev_act->proc.state == LV_INDEV_STATE_PR) { indev_act->driver.disp->last_activity_time = lv_tick_get(); + } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER && data->enc_diff) { + indev_act->driver.disp->last_activity_time = lv_tick_get(); } + if(indev_act->driver.type == LV_INDEV_TYPE_POINTER) { indev_pointer_proc(indev_act, &data); } else if(indev_act->driver.type == LV_INDEV_TYPE_KEYPAD) { From 6093053240711a3a37055952ebdc650f308b4c60 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 17:05:13 +0200 Subject: [PATCH 453/590] lv_style_anim_get_user_data_ptr: fix recusrive call --- src/lv_core/lv_style.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 3d121a717763..8fdf22a7a3e5 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -255,7 +255,7 @@ static inline lv_anim_user_data_t lv_style_anim_get_user_data(lv_anim_t * a) */ static inline lv_anim_user_data_t * lv_style_anim_get_user_data_ptr(lv_anim_t * a) { - return lv_style_anim_get_user_data_ptr(a); + return lv_anim_get_user_data_ptr(a); } /** From d2e28abb79d7511926c9a546a715dc20cdda0853 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 17:05:38 +0200 Subject: [PATCH 454/590] indev: fix typo --- src/lv_core/lv_indev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index aed2738b9b02..6dc7b789159f 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -99,7 +99,7 @@ void lv_indev_read_task(lv_task_t * task) /*Save the last activity time*/ if(indev_act->proc.state == LV_INDEV_STATE_PR) { indev_act->driver.disp->last_activity_time = lv_tick_get(); - } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER && data->enc_diff) { + } else if(indev_act->driver.type == LV_INDEV_TYPE_ENCODER && data.enc_diff) { indev_act->driver.disp->last_activity_time = lv_tick_get(); } From ceff78476b7dd438db0ce026b95a1fe8f936a0bb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 19:32:21 +0200 Subject: [PATCH 455/590] font: improve templates --- src/lv_fonts/lv_font_template.c | 75 ++++++----------------- src/lv_misc/lv_font.h | 38 ++++++++++++ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 18 +++++- 3 files changed, 72 insertions(+), 59 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 9ce3c1bb6351..4092009c5304 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -15,62 +15,25 @@ /*Store the image of the glyphs*/ static const uint8_t gylph_bitmap[] = { - /*Unicode: U+0031 (1) , Width: 8 */ - 0x38, //.+@@@... - 0xf8, //@@@@@... - 0x98, //@+.@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0x18, //...@@... - 0xff, //@@@@@@@@ - 0xff, //@@@@@@@@ - - /*Unicode: U+0033 (3) , Width: 9 */ - 0x7e, 0x00, //.%@@@@%.. - 0xff, 0x00, //@@@@@@@@+ - 0x83, 0x80, //@+....%@@ - 0x01, 0x80, //.......@@ - 0x03, 0x80, //......%@% - 0x3e, 0x00, //..@@@@@+. - 0x3f, 0x00, //..@@@@@%. - 0x03, 0x80, //.....+@@% - 0x01, 0x80, //.......@@ - 0x01, 0x80, //.......@@ - 0x83, 0x80, //%+...+@@% - 0xff, 0x00, //@@@@@@@@. - 0x7e, 0x00, //.%@@@@%.. - - /*Unicode: U+0041 (A) , Width: 12 */ - 0x06, 0x00, //.....@@..... - 0x06, 0x00, //....+@@+.... - 0x0f, 0x00, //....@@@@.... - 0x0f, 0x00, //....@@@@.... - 0x19, 0x80, //...%@++@%... - 0x19, 0x80, //...@@..@@... - 0x19, 0x80, //..+@%..%@+.. - 0x30, 0xc0, //..@@....@@.. - 0x3f, 0xc0, //..@@@@@@@@.. - 0x7f, 0xe0, //.%@@@@@@@@%. - 0x60, 0x60, //.@@......@@. - 0x60, 0x60, //+@%......%@+ - 0xc0, 0x30, //@@+......+@@ - - /*Unicode: U+0061 (a) , Width: 8 */ - 0x3c, //.+%@@@+. - 0x7e, //.@@@@@@. - 0x47, //.%...%@% - 0x03, //......@@ - 0x3f, //.+@@@@@@ - 0xff, //%@@@@@@@ - 0xc3, //@@+...@@ - 0xc7, //@@+..%@@ - 0xff, //%@@@@%@@ - 0x7b, //.%@@%.@@ + /*Unicode: U+0031 (1) */ + 0x38, 0xf8, 0x98, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x18, 0xff, 0xff, + + /*Unicode: U+0033 (3) */ + 0x7e, 0x00, 0xff, 0x00, 0x83, 0x80, 0x01, 0x80, + 0x03, 0x80, 0x3e, 0x00, 0x3f, 0x00, 0x03, 0x80, + 0x01, 0x80, 0x01, 0x80, 0x83, 0x80, 0xff, 0x00, + 0x7e, 0x00, + + /*Unicode: U+0041 (A) */ + 0x06, 0x00, 0x06, 0x00, 0x0f, 0x00, 0x0f, 0x00, + 0x19, 0x80, 0x19, 0x80, 0x19, 0x80, 0x30, 0xc0, + 0x3f, 0xc0, 0x7f, 0xe0, 0x60, 0x60, 0x60, 0x60, + 0xc0, 0x30, + + /*Unicode: U+0061 (a) */ + 0x3c, 0x7e, 0x47, 0x03, 0x3f, 0xff, 0xc3, 0xc7, + 0xff, 0x7b, }; diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 7022104b7f9c..14a07098a432 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -69,6 +69,44 @@ typedef struct _lv_font_struct uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ void * dsc; /*Store implementation specific data here*/ + + + +/* + - Font size: + not required for calculations + + - Ascent + - Descent + - typoAscent + - typoDescent + - typographic descent: + Better to skip them to avoid confusion. Only line height and baseline matter for rendering. + - typoLineGap + Will be overwritten by the style. + + - min Y (used to quick check line intersections with other objects) + - max Y + BBoxMinXofs and BBoxMaxXofs would be useful to handle + if the the lines first and last character is out of the object. + Y is not important becasue all glyphs will fit in line_height. + + - default advanceWidth + Not supported in text format. glyph->advacedWidth is always present + + - glyphIdFormat + Has foxed size on text format + + - advanceWidthFormat + Fix 8.4 format + + - Glyph BBox x/y bits length (signed value) + - Glyph BBox w/h bits length (unsigned) + Has fixed size + + - Glyph advanceWidth bits length (unsigned, may be FP4) + Fix 8.4 format + */ } lv_font_t; /********************** diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 29ef130d8186..a173f4565aae 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -140,20 +140,32 @@ typedef struct { * Array of `lv_font_cmap_fmt_txt_t` variables*/ const lv_font_cmap_fmt_txt_t * cmaps; - /* Sotore kerning values. + /* Store kerning values. * Can be `lv_font_kern_pair_fmt_txt_t * or `lv_font_kern_classes_fmt_txt_t *` * depending on `kern_classes` - * */ + */ const void * kern_dsc; + /*Scale kern values in 12.4 format*/ + uint16_t kern_scale; + /*Number of cmap tables*/ - uint16_t cmap_num :12; + uint16_t cmap_num :10; /*Bit per pixel: 1, 2, 4 or 8*/ uint16_t bpp :3; /*Type of `kern_dsc`*/ uint16_t kern_classes :1; + + /* + * storage format of the bitmap + * 0: plain + * 1: compressed: RLE with XOR pre-filter + * 2: reserved + * 3: reserved + */ + uint16_t bitmap_format :2; }lv_font_dsc_fmt_txt_t; /********************** From 1ed8207b5c18574e755083581ae8d82b0efb29b4 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 25 May 2019 19:46:04 +0200 Subject: [PATCH 456/590] font: add LV_FONT_X4_SET --- src/lv_fonts/lv_font_template.c | 9 +++++---- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 4092009c5304..6da3f643bb51 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -42,9 +42,9 @@ static const uint8_t gylph_bitmap[] = { *--------------------*/ static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 123, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, - {.bitmap_index = 32, .adv_w = 234, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 55, .adv_w = 98, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 0, .adv_w = LV_FONT_X4_SET(12, 3), .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 32, .adv_w = LV_FONT_X4_SET(8, 7), .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 55, .adv_w = LV_FONT_X4_SET(4, 11), .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, }; /*--------------------- @@ -113,7 +113,7 @@ static uint8_t kern_right_class_mapping[] = /*Kern values between classes*/ static uint8_t kern_class_values = { - 32, 33, 22, 11, 55, 33, 22, 44 + LV_FONT_X4_SET(2, 7), LV_FONT_X4_SET(-1, 3), LV_FONT_X4_SET(0, 13), LV_FONT_X4_SET(5, 7) }; @@ -140,6 +140,7 @@ static lv_font_dsc_fmt_txt_t font_dsc = { .cmap_num = 3, .bpp = 4, + .kerning_scale = 324, .kern_dsc = kern_classes, .kern_classes = 1, /*** OR ***/ diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index a173f4565aae..e8f49e65c92a 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -193,6 +193,9 @@ bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_gly /********************** * MACROS **********************/ +#define LV_FONT_X4_SET(_int, _fract) ((_int << 4) + _fract) +#define LV_FONT_X4_INT(_num) (_num >> 4) +#define LV_FONT_X4_FRACT(_num) (_num & 0xF) /********************** * ADD BUILT IN FONTS From 72347d4bc16a7d8be30e037287f923f63ef3d477 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 26 May 2019 19:31:01 +0200 Subject: [PATCH 457/590] remove LV_FONT_X4_SET --- src/lv_fonts/lv_font_dejavu_20.c | 2 +- src/lv_fonts/lv_font_template.c | 21 ++++++++++++--------- src/lv_misc/lv_font.h | 10 ++-------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 4 ++-- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 9 +++------ 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index a2e61b57e6fb..264df6dd8dfa 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -170,7 +170,7 @@ lv_font_t lv_font_dejavu_20 = { .unicode_first = 0x20, /*First Unicode letter in this font*/ .unicode_last = 0x3F45, /*Last Unicode letter in this font*/ .dsc = &font_dsc, - .get_glyph_bitmap = lv_font_get_bitmap_format_text_plain, /*Function pointer to get glyph's bitmap*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .get_glyph_dsc = lv_font_get_glyph_dsc_format_text_plain, /*Function pointer to get glyph's data*/ .line_height = 20, /*The maximum line height required by the font*/ .base_line = 9, /*Baseline measured from the bottom of the line*/ diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 6da3f643bb51..e04a6b6c38fd 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -42,9 +42,9 @@ static const uint8_t gylph_bitmap[] = { *--------------------*/ static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = LV_FONT_X4_SET(12, 3), .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, - {.bitmap_index = 32, .adv_w = LV_FONT_X4_SET(8, 7), .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 55, .adv_w = LV_FONT_X4_SET(4, 11), .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 0, .adv_w = 23, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 32, .adv_w = 44, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 55, .adv_w = 29, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, }; /*--------------------- @@ -81,10 +81,11 @@ static uint16_t kern_right_gylph_ids[] = 0x41, 0x342, 0x333 }; -/*Kerning between the respective left and right glyphs*/ +/* Kerning between the respective left and right glyphs + * 12.4 format. (rael_value * 16 is stored) */ static uint8_t kern_pair_values[] = { - 15, 52, 73 + 23, 33, 55 }; /*Collect the kern pair's data in one place*/ @@ -110,10 +111,11 @@ static uint8_t kern_right_class_mapping[] = 1, 2, 3, 2, 2, 3, 3, 1 }; -/*Kern values between classes*/ +/* Kern values between classes + * 12.4 format. (rael_value * 16 is stored)*/ static uint8_t kern_class_values = { - LV_FONT_X4_SET(2, 7), LV_FONT_X4_SET(-1, 3), LV_FONT_X4_SET(0, 13), LV_FONT_X4_SET(5, 7) + 44, 66, 24, 23, 56, 23 }; @@ -158,8 +160,9 @@ lv_font_t font_name = { .unicode_first = 0x20, /*First Unicode letter in this font*/ .unicode_last = 0x3F45, /*Last Unicode letter in this font*/ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ - .get_glyph_bitmap = lv_font_get_bitmap_format_text_plain, /*Function pointer to get glyph's bitmap*/ - .get_glyph_dsc = lv_font_get_glyph_dsc_format_text_plain, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt + , /*Function pointer to get glyph's data*/ .line_height = 20, /*The maximum line height required by the font*/ .base_line = 9, /*Baseline measured from the bottom of the line*/ }; diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 14a07098a432..7b34b603e93a 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -68,10 +68,10 @@ typedef struct _lv_font_struct /*Pointer to the font in a font pack (must have the same line height)*/ uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ + int8_t box_x_ofs_min; /*Smallest glyph box X offset*/ + int8_t box_x_ofs_max; /*Greatest glyph box X offset*/ void * dsc; /*Store implementation specific data here*/ - - /* - Font size: not required for calculations @@ -85,12 +85,6 @@ typedef struct _lv_font_struct - typoLineGap Will be overwritten by the style. - - min Y (used to quick check line intersections with other objects) - - max Y - BBoxMinXofs and BBoxMaxXofs would be useful to handle - if the the lines first and last character is out of the object. - Y is not important becasue all glyphs will fit in line_height. - - default advanceWidth Not supported in text format. glyph->advacedWidth is always present diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index a1266c457c00..b113111e84c2 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -47,7 +47,7 @@ static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ -const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uint32_t unicode_letter) +const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unicode_letter) { /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; @@ -82,7 +82,7 @@ const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uin * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) +bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) { /*Check the range*/ if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index e8f49e65c92a..0c584e1081d2 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -37,7 +37,7 @@ extern "C" { typedef struct { uint32_t bitmap_index : 20; /* Start index of the bitmap. A font can be max 1 MB. */ - uint32_t adv_w :12; /*The glyph needs this space. Draw the next glyph after this width. 8.4 format. */ + uint32_t adv_w :12; /*Draw the next glyph after this width. 12.4 format (real_value * 16 is stored). */ uint8_t box_w; /*Width of the glyph's bounding box*/ uint8_t box_h; /*Height of the glyph's bounding box*/ @@ -178,7 +178,7 @@ typedef struct { * @param unicode_letter an unicode letter which bitmap should be get * @return pointer to the bitmap or NULL if not found */ -const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uint32_t letter); +const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t letter); /** * Used as `get_glyph_dsc` callback in LittelvGL's native font format if the font is uncompressed. @@ -188,14 +188,11 @@ const uint8_t * lv_font_get_bitmap_format_text_plain(const lv_font_t * font, uin * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc_format_text_plain(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); +bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); /********************** * MACROS **********************/ -#define LV_FONT_X4_SET(_int, _fract) ((_int << 4) + _fract) -#define LV_FONT_X4_INT(_num) (_num >> 4) -#define LV_FONT_X4_FRACT(_num) (_num & 0xF) /********************** * ADD BUILT IN FONTS From f2afc18d6b5ecc9b702803d05d563247e0f9446c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 05:42:34 +0200 Subject: [PATCH 458/590] anim: combint var and exec_cb set into lv_anim_set_var_and_cb --- src/lv_misc/lv_anim.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 40e9eec8b6db..e194150f284d 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -96,7 +96,11 @@ void lv_anim_create(lv_anim_t * a) memcpy(new_anim, a, sizeof(lv_anim_t)); /*Set the start value*/ - if(new_anim->exec_cb != NULL) new_anim->exec_cb(new_anim->var, new_anim->start); + if(new_anim->exec_cb != NULL) { + /*Pass `new_anim` if `var` is not set*/ + if(a->var) new_anim->exec_cb(new_anim->var, new_anim->start); + else new_anim->exec_cb(new_anim, new_anim->start); + } /* Creating an animation changed the linked list. * It's important if it happens in a ready callback. (see `anim_task`)*/ @@ -385,7 +389,8 @@ static void anim_task(lv_task_t * param) } uint32_t elaps = lv_tick_elaps(last_task_run); - a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); + + a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll)); while(a != NULL) { /*It can be set by `lv_anim_del()` typically in `end_cb`. If set then an animation delete @@ -404,7 +409,15 @@ static void anim_task(lv_task_t * param) int32_t new_value; new_value = a->path_cb(a); - if(a->exec_cb != NULL) a->exec_cb(a->var, new_value); /*Apply the calculated value*/ + /*Apply the calculated value*/ + if(a->exec_cb != NULL) { + /*Pass `a` as first parameter if `var` is not set*/ + if(a->var) { + a->exec_cb(a->var, new_value); + } else { + a->exec_cb(a, new_value); + } + } /*If the time is elapsed the animation is ready*/ if(a->act_time >= a->time) { From d1e59483b4c0fac01ca708b6ce40e53cd78924ed Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 05:46:19 +0200 Subject: [PATCH 459/590] update lv_anim.h --- src/lv_misc/lv_anim.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 552b7ac145bf..a139956cf3c5 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -99,13 +99,17 @@ void lv_anim_core_init(void); void lv_anim_init(lv_anim_t * a); /** - * Set a variable to animate + * Set a function to execute by the aniamtion * @param a pointer to an initialized `lv_anim_t` variable * @param var pointer to a variable to animate + * @param exec_cb a function to execute. + * LittelvGL's built-in functions can be used. + * E.g. lv_obj_set_x */ -static inline void lv_anim_set_var(lv_anim_t * a, void * var) +static inline void lv_anim_set_var_and_cb(lv_anim_t * a, void * var, lv_anim_exec_cb_t exec_cb) { a->var = var; + a->exec_cb = exec_cb; } /** @@ -133,19 +137,7 @@ static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_a } /** - * Set a function to execute by the aniamtion - * @param a pointer to an initialized `lv_anim_t` variable - * @param exec_cb a function to execute. - * LittelvGL's built-in functions can be used. - * E.g. lv_obj_set_x - */ -static inline void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_cb_t exec_cb) -{ - a->exec_cb = exec_cb; -} - -/** - * The same as `lv_anim_set_exec_cb` but `lv_anim_custom_exec_cb_t` receives + * Similar to `lv_anim_set_var_and_cb` but `lv_anim_custom_exec_cb_t` receives * `lv_anim_t * ` as its first parameter instead of `void *`. * This function might be used when LittlevGL is binded to other languages because * it's more consistent to have `lv_anim_t *` as first parameter. @@ -154,6 +146,7 @@ static inline void lv_anim_set_exec_cb(lv_anim_t * a, lv_anim_exec_cb_t exec_cb) */ static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { + a->var = NULL; a->exec_cb = (lv_anim_exec_cb_t)exec_cb; } From b6a86f31d7cd0e7add31328f0bbfb2bf275a9978 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 05:47:59 +0200 Subject: [PATCH 460/590] update lv_anim.h --- src/lv_misc/lv_anim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index a139956cf3c5..38e0dc7e198e 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -99,7 +99,7 @@ void lv_anim_core_init(void); void lv_anim_init(lv_anim_t * a); /** - * Set a function to execute by the aniamtion + * Set a variable to animate function to execute on `var` * @param a pointer to an initialized `lv_anim_t` variable * @param var pointer to a variable to animate * @param exec_cb a function to execute. From eba910be40512079947069d2017115ab7149554f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 06:20:48 +0200 Subject: [PATCH 461/590] font: use signed types for kern values --- src/lv_fonts/lv_font_template.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index e04a6b6c38fd..fda2b4c973cc 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -82,10 +82,10 @@ static uint16_t kern_right_gylph_ids[] = }; /* Kerning between the respective left and right glyphs - * 12.4 format. (rael_value * 16 is stored) */ -static uint8_t kern_pair_values[] = + * 12.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = { - 23, 33, 55 + 23, -33, 55 }; /*Collect the kern pair's data in one place*/ @@ -112,10 +112,10 @@ static uint8_t kern_right_class_mapping[] = }; /* Kern values between classes - * 12.4 format. (rael_value * 16 is stored)*/ -static uint8_t kern_class_values = + * 12.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_class_values = { - 44, 66, 24, 23, 56, 23 + 44, -66, 24, -23, 56, 23 }; From 5ebed4f24ede51143995ad88229b4abc44c189b9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 15:10:15 +0200 Subject: [PATCH 462/590] anim: minor updates --- src/lv_misc/lv_anim.c | 15 ++------------- src/lv_misc/lv_anim.h | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index e194150f284d..70edb989af2e 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -96,11 +96,7 @@ void lv_anim_create(lv_anim_t * a) memcpy(new_anim, a, sizeof(lv_anim_t)); /*Set the start value*/ - if(new_anim->exec_cb != NULL) { - /*Pass `new_anim` if `var` is not set*/ - if(a->var) new_anim->exec_cb(new_anim->var, new_anim->start); - else new_anim->exec_cb(new_anim, new_anim->start); - } + if(new_anim->exec_cb) new_anim->exec_cb(new_anim->var, new_anim->start); /* Creating an animation changed the linked list. * It's important if it happens in a ready callback. (see `anim_task`)*/ @@ -410,14 +406,7 @@ static void anim_task(lv_task_t * param) new_value = a->path_cb(a); /*Apply the calculated value*/ - if(a->exec_cb != NULL) { - /*Pass `a` as first parameter if `var` is not set*/ - if(a->var) { - a->exec_cb(a->var, new_value); - } else { - a->exec_cb(a, new_value); - } - } + if(a->exec_cb) a->exec_cb(a->var, new_value); /*If the time is elapsed the animation is ready*/ if(a->act_time >= a->time) { diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 38e0dc7e198e..22528d3812c9 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -106,7 +106,7 @@ void lv_anim_init(lv_anim_t * a); * LittelvGL's built-in functions can be used. * E.g. lv_obj_set_x */ -static inline void lv_anim_set_var_and_cb(lv_anim_t * a, void * var, lv_anim_exec_cb_t exec_cb) +static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_cb_t exec_cb) { a->var = var; a->exec_cb = exec_cb; @@ -146,7 +146,7 @@ static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_a */ static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { - a->var = NULL; + a->var = a; a->exec_cb = (lv_anim_exec_cb_t)exec_cb; } From 0aeff32442784e2d3fe4c9a9bdd5a2cab4cea85b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 15:13:59 +0200 Subject: [PATCH 463/590] font: fix comment for kern format --- src/lv_fonts/lv_font_template.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index fda2b4c973cc..21d9db6e24fc 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -82,7 +82,7 @@ static uint16_t kern_right_gylph_ids[] = }; /* Kerning between the respective left and right glyphs - * 12.4 format which needs to scaled with `kern_scale`*/ + * 4.4 format which needs to scaled with `kern_scale`*/ static int8_t kern_pair_values[] = { 23, -33, 55 @@ -112,7 +112,7 @@ static uint8_t kern_right_class_mapping[] = }; /* Kern values between classes - * 12.4 format which needs to scaled with `kern_scale`*/ + * 4.4 format which needs to scaled with `kern_scale`*/ static int8_t kern_class_values = { 44, -66, 24, -23, 56, 23 From bf667f747b68a92f1f88c2c59d1e7861207a0f15 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 27 May 2019 15:26:09 +0200 Subject: [PATCH 464/590] font: remove box_x_ofs_min/max --- src/lv_misc/lv_font.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 7b34b603e93a..b774093193cf 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -68,8 +68,6 @@ typedef struct _lv_font_struct /*Pointer to the font in a font pack (must have the same line height)*/ uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ - int8_t box_x_ofs_min; /*Smallest glyph box X offset*/ - int8_t box_x_ofs_max; /*Greatest glyph box X offset*/ void * dsc; /*Store implementation specific data here*/ /* From 005a7954caaa9bf7e31dee6c4095577c91e0791a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 28 May 2019 07:57:22 +0200 Subject: [PATCH 465/590] font: remove unicode_first/last --- src/lv_misc/lv_font.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index b774093193cf..fd2f57356022 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -56,9 +56,6 @@ typedef struct /*Describe the properties of a font*/ typedef struct _lv_font_struct { - uint32_t unicode_first; - uint32_t unicode_last; - /*Get a glyph's descriptor from a font*/ bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter); From a5bbb5e6519cfb8046097e2b4207df68e31ee3f9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 28 May 2019 08:06:15 +0200 Subject: [PATCH 466/590] font: add cmap type --- src/lv_fonts/lv_font_template.c | 20 ++++++++++++-------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 11 +++++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 21d9db6e24fc..2ad51f29e531 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -2,11 +2,7 @@ #include "lvgl/lvgl.h" /*********************************************************************************** - * Size: 20 px - * Bpp: 1 (or 2/4/8/compressed) - * Fonts: - * DejaVuSans.ttf: U+0020 ( ) .. U+007e (~) range - * FoneAwesome.ttf: U+1e20 (?) .. U+1f22 (?), U+1f33 (?), U+1f66 (?) + * Copy/Paste the command line instruction **********************************************************************************/ /*----------------- @@ -59,9 +55,17 @@ static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; /*Collect the unicode lists and glyph_id offsets*/ static const lv_font_cmap_fmt_txt_t cmaps[] = { - { .range_start = 0x280, .range_length = 124, .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1}, - { .range_start = 0x20, .range_length = 112, .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL}, - { .range_start = 0x560, .range_length = 7654, .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, + { + .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, + .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1 + }, + { + .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, + .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 0c584e1081d2..c4a36ae38b8e 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -45,6 +45,15 @@ typedef struct uint8_t ofs_y; /*y offset of the bounding box. Measured from the top of the line*/ }lv_font_glyph_dsc_fmt_txt_t; + +typedef enum { + LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, + LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, +}lv_font_fmt_txt_cmap_type_t; + + /* Map codepoints to a `glyph_dsc`s * Several formats are supported to optimize memory usage * See https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md @@ -60,6 +69,8 @@ typedef struct { /* First glyph ID (array index of `glyph_dsc`) for this range */ uint16_t glyph_id_start; + lv_font_fmt_txt_cmap_type_t type; + /* According the specification there are 4 formats: https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md From 0acabe460cb78266849c6ca48c1714b6ff631d0b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 28 May 2019 08:46:43 +0200 Subject: [PATCH 467/590] font: add new types --- src/lv_fonts/lv_font_dejavu_20.c | 10 +- src/lv_fonts/lv_font_template.c | 106 +++++++++++----------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 53 +++++++---- 3 files changed, 91 insertions(+), 78 deletions(-) diff --git a/src/lv_fonts/lv_font_dejavu_20.c b/src/lv_fonts/lv_font_dejavu_20.c index 264df6dd8dfa..a9d582d4ad39 100644 --- a/src/lv_fonts/lv_font_dejavu_20.c +++ b/src/lv_fonts/lv_font_dejavu_20.c @@ -95,7 +95,7 @@ static uint8_t kern_pair_values[] = 15, 52, 73 }; -static lv_font_kern_pair_fmt_txt_t kern_pairs = +static lv_font_fmt_txt_kern_pair_t kern_pairs = { .left_gylph_ids = kern_left_gylph_ids, .right_gylph_ids = kern_right_gylph_ids, @@ -119,7 +119,7 @@ static uint8_t kern_class_values = }; -static lv_font_kern_classes_fmt_txt_t kern_classes = +static lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, .left_class_mapping = kern_left_class_mapping, @@ -136,20 +136,20 @@ static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; /*Store the glyph descriptions*/ -static const lv_font_cmap_fmt_txt_t cmaps[] = { +static const lv_font_fmt_txt_cmap_t cmaps[] = { { .range_start = 0x280, .range_length = 124, .glyph_id_start = 223, .unicode_list = uniocde_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1}, { .range_start = 0x20, .range_length = 112, .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL}, { .range_start = 0x560, .range_length = 7654, .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, }; -static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { {.bitmap_index = 0, .adv_w = 123, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, {.bitmap_index = 32, .adv_w = 234, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, {.bitmap_index = 55, .adv_w = 98, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, }; -static lv_font_dsc_fmt_txt_t font_dsc = { +static lv_font_fmt_txt_dsc_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 2ad51f29e531..3b2f057a1bfd 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -37,10 +37,11 @@ static const uint8_t gylph_bitmap[] = { * GLYPH DESCRIPTION *--------------------*/ -static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 23, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, - {.bitmap_index = 32, .adv_w = 44, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 55, .adv_w = 29, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = +{ + {.bitmap_index = 0, .adv_w = 23, .box_h = 13, .box_w = 9, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 32, .adv_w = 44, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 55, .adv_w = 29, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = 4}, }; /*--------------------- @@ -54,35 +55,32 @@ static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; /*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_cmap_fmt_txt_t cmaps[] = { - { - .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, - .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1 - }, - { - .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, - .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3}, - +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, + .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1 + }, + { + .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, + .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3 + }, }; /*----------------- * KERNING *----------------*/ -/*Left glyphs for kering*/ -static uint16_t kern_left_gylph_ids[] = -{ - 0x21, 0x42, 0x53 -}; - -/*Left glyphs for kering*/ -static uint16_t kern_right_gylph_ids[] = +/*Pair left and right glyphs for kerning*/ +static lv_font_fmt_txt_kern_pair_id_t kern_pair_gylph_ids[] = { - 0x41, 0x342, 0x333 + {.pair.left = 0x23, .pair.right = 0x283}, + {.pair.left = 0x43, .pair.right = 0x383}, + {.pair.left = 0x73, .pair.right = 0x583}, }; /* Kerning between the respective left and right glyphs @@ -93,10 +91,9 @@ static int8_t kern_pair_values[] = }; /*Collect the kern pair's data in one place*/ -static lv_font_kern_pair_fmt_txt_t kern_pairs = +static lv_font_fmt_txt_kern_pair_t kern_pairs = { - .left_gylph_ids = kern_left_gylph_ids, - .right_gylph_ids = kern_right_gylph_ids, + .glyph_ids = kern_pair_gylph_ids, .values = kern_pair_values, .pair_cnt = 3, }; @@ -106,52 +103,55 @@ static lv_font_kern_pair_fmt_txt_t kern_pairs = /*Map glyph_ids to kern left classes*/ static uint8_t kern_left_class_mapping[] = { - 1, 2, 1, 1, 1, 1, 1, 1 + 1, 2, 1, 1, 1, 1, 1, 1 }; /*Map glyph_ids to kern right classes*/ static uint8_t kern_right_class_mapping[] = { - 1, 2, 3, 2, 2, 3, 3, 1 + 1, 2, 3, 2, 2, 3, 3, 1 }; /* Kern values between classes * 4.4 format which needs to scaled with `kern_scale`*/ static int8_t kern_class_values = { - 44, -66, 24, -23, 56, 23 + 44, -66, 24, -23, 56, 23 }; - /*Collect the kern class' data in one place*/ -static lv_font_kern_classes_fmt_txt_t kern_classes = +static lv_font_fmt_txt_kern_classes_t kern_classes = { - .class_pair_values = kern_class_values, - .left_class_mapping = kern_left_class_mapping, - .right_class_mapping = kern_right_class_mapping, - .left_class_cnt = 2, - .right_class_cnt = 3, + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 2, + .right_class_cnt = 3, }; - /*-------------------- * ALL CUSTOM DATA *--------------------*/ /*Store all the custom data of the font*/ -static lv_font_dsc_fmt_txt_t font_dsc = { - .glyph_bitmap = gylph_bitmap, - .glyph_dsc = glyph_dsc, - .cmaps = cmaps, - .cmap_num = 3, - .bpp = 4, - - .kerning_scale = 324, - .kern_dsc = kern_classes, - .kern_classes = 1, - /*** OR ***/ - .kern_dsc = kern_pairs, - .kern_classes = 0, +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 3, + .bpp = 4, + .bitmap_format = LV_FONT_FMT_TXT_PLAIN, + + .kerning_scale = 324, + + .kern_dsc = kern_classes, + .kern_classes = 1, + /*** OR ***/ + .kern_dsc = kern_pairs, + .kern_classes = 0, + /*** OR ***/ + .kern_dsc = NULL, + .kern_classes = 0, }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index c4a36ae38b8e..7474c52412a9 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -43,7 +43,7 @@ typedef struct uint8_t box_h; /*Height of the glyph's bounding box*/ int8_t ofs_x; /*x offset of the bounding box*/ uint8_t ofs_y; /*y offset of the bounding box. Measured from the top of the line*/ -}lv_font_glyph_dsc_fmt_txt_t; +}lv_font_fmt_txt_glyph_dsc_t; typedef enum { @@ -100,31 +100,39 @@ typedef struct { uint16_t * unicode_list; - /* if unicode_list == NULL uint8_t * - * else uint16_t * + /* if(type == LV_FONT_FMT_TXT_CMAP_FORMAT0_...) it's `uint8_t *` + * if(type == LV_FONT_FMT_TXT_CMAP_SPARSE_...) it's `uint16_t *` */ const void * glyph_id_ofs_list; -}lv_font_cmap_fmt_txt_t; +}lv_font_fmt_txt_cmap_t; + +/*Describe glyph pairs for kerning*/ +typedef union { + struct { + uint16_t left; + uint16_t right; + }pair; + uint32_t both; +}lv_font_fmt_txt_kern_pair_id_t; /*A simple mapping of kern values from pairs*/ typedef struct { /*To get a kern value of two code points: - 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_cmap_built_in_t + 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t 2 for(i = 0; i < pair_cnt; i++) - if(left_gylph_ids[i] == glyph_id_left && - right_gylph_ids[i] == glyph_id_right) + if(gylph_ids[i].pair.left == glyph_id_left && + gylph_ids[i].pair.right == glyph_id_right) return values[i]; */ - uint16_t * left_gylph_ids; - uint16_t * right_gylph_ids; + lv_font_fmt_txt_kern_pair_id_t glyph_ids; uint8_t * values; uint16_t pair_cnt; -}lv_font_kern_pair_fmt_txt_t; +}lv_font_fmt_txt_kern_pair_t; /*More complex but more optimal class based kern value storage*/ typedef struct { /*To get a kern value of two code points: - 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_cmap_built_in_t + 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t 2 Get the class of the left and right glyphs as `left_class` and `right_class` for(i = 0; i < left_class_num; i++) if(left_class_mapping[i] == glyph_id_left) @@ -137,7 +145,15 @@ typedef struct { uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ uint8_t left_class_cnt; uint8_t right_class_cnt; -}lv_font_kern_classes_fmt_txt_t; +}lv_font_fmt_txt_kern_classes_t; + + +/*Bitmap formats*/ +typedef enum { + LV_FONT_FMT_TXT_PLAIN = 0, + LV_FONT_FMT_TXT_COMPRESSED = 1, +}lv_font_fmt_txt_bitmap_format_t; + /*Describe store additional data for fonts */ typedef struct { @@ -145,14 +161,14 @@ typedef struct { const uint8_t * glyph_bitmap; /*Describe the glyphs*/ - const lv_font_glyph_dsc_fmt_txt_t * glyph_dsc; + const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc; /* Map the glyphs to Unicode characters. * Array of `lv_font_cmap_fmt_txt_t` variables*/ - const lv_font_cmap_fmt_txt_t * cmaps; + const lv_font_fmt_txt_cmap_t * cmaps; /* Store kerning values. - * Can be `lv_font_kern_pair_fmt_txt_t * or `lv_font_kern_classes_fmt_txt_t *` + * Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *` * depending on `kern_classes` */ const void * kern_dsc; @@ -171,13 +187,10 @@ typedef struct { /* * storage format of the bitmap - * 0: plain - * 1: compressed: RLE with XOR pre-filter - * 2: reserved - * 3: reserved + * from `lv_font_fmt_txt_bitmap_format_t` */ uint16_t bitmap_format :2; -}lv_font_dsc_fmt_txt_t; +}lv_font_fmt_txt_dsc_t; /********************** * GLOBAL PROTOTYPES From d94075ac925634c47f3dd48f702804b23dd85261 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 28 May 2019 12:10:50 +0200 Subject: [PATCH 468/590] font: add unicode_list_length and glyph_id_ofs_list_length --- src/lv_fonts/lv_font_template.c | 15 +++++++++------ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 3b2f057a1bfd..6f8ac35ac228 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -58,16 +58,19 @@ static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; static const lv_font_fmt_txt_cmap_t cmaps[] = { { - .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, - .glyph_id_start = 223, .unicode_list = unicode_list_1, .glyph_id_ofs_list = glyph_id_ofs_list_1 + .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, + .glyph_id_start = 223, .glyph_id_ofs_list = glyph_id_ofs_list_1, .glyph_id_ofs_list = 23, + .unicode_list = unicode_list_1, .unicode_list_length = 8, }, { - .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 456, .unicode_list = NULL, .glyph_id_ofs_list = NULL + .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 456, .glyph_id_ofs_list = NULL, .glyph_id_ofs_list_length = 0, + .unicode_list = NULL, .unicode_list_length = 22, }, { - .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, - .glyph_id_start = 756, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_3 + .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, + .glyph_id_start = 756, .glyph_id_ofs_list = glyph_id_ofs_list_3, .glyph_id_ofs_list_length = 23, + .unicode_list = NULL, .unicode_list_length = 0, }, }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 7474c52412a9..d80b4a5a1511 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -99,11 +99,13 @@ typedef struct { */ uint16_t * unicode_list; + uint32_t unicode_list_length; /* if(type == LV_FONT_FMT_TXT_CMAP_FORMAT0_...) it's `uint8_t *` * if(type == LV_FONT_FMT_TXT_CMAP_SPARSE_...) it's `uint16_t *` */ const void * glyph_id_ofs_list; + uint32_t glyph_id_ofs_list_length; }lv_font_fmt_txt_cmap_t; /*Describe glyph pairs for kerning*/ From 7189a608667b6914b5630eabbf2a6d9d169b9d32 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 28 May 2019 12:53:19 +0200 Subject: [PATCH 469/590] font: use a common list length in the arrays of cmaps --- src/lv_fonts/lv_font_template.c | 24 ++++++++++++++--------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 10 ++++++---- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/lv_fonts/lv_font_template.c b/src/lv_fonts/lv_font_template.c index 6f8ac35ac228..d107156b4af4 100644 --- a/src/lv_fonts/lv_font_template.c +++ b/src/lv_fonts/lv_font_template.c @@ -58,19 +58,25 @@ static uint8_t glyph_id_ofs_list_3 = {32, 45, 66}; static const lv_font_fmt_txt_cmap_t cmaps[] = { { - .range_start = 0x280, .range_length = 124, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, - .glyph_id_start = 223, .glyph_id_ofs_list = glyph_id_ofs_list_1, .glyph_id_ofs_list = 23, - .unicode_list = unicode_list_1, .unicode_list_length = 8, + .range_start = 0x280, .range_length = 124, .glyph_id_start = 223, + .list_length = 8, + .glyph_id_ofs_list = glyph_id_ofs_list_1, + .unicode_list = unicode_list_1, + .type = LV_FONT_FMT_TXT_CMAP_SPARSE_FULL, }, { - .range_start = 0x20, .range_length = 112, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 456, .glyph_id_ofs_list = NULL, .glyph_id_ofs_list_length = 0, - .unicode_list = NULL, .unicode_list_length = 22, + .range_start = 0x20, .range_length = 112, .glyph_id_start = 456, + .list_length = 22, + .glyph_id_ofs_list = NULL, + .unicode_list = NULL, + .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, }, { - .range_start = 0x560, .range_length = 7654, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, - .glyph_id_start = 756, .glyph_id_ofs_list = glyph_id_ofs_list_3, .glyph_id_ofs_list_length = 23, - .unicode_list = NULL, .unicode_list_length = 0, + .range_start = 0x560, .range_length = 7654, .glyph_id_start = 756, + .list_length = 23, + .glyph_id_ofs_list = glyph_id_ofs_list_3, + .unicode_list = NULL, + .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, }, }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index d80b4a5a1511..b27e2246a3c1 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -69,8 +69,6 @@ typedef struct { /* First glyph ID (array index of `glyph_dsc`) for this range */ uint16_t glyph_id_start; - lv_font_fmt_txt_cmap_type_t type; - /* According the specification there are 4 formats: https://github.com/littlevgl/lv_font_conv/blob/master/doc/font_spec.md @@ -99,13 +97,17 @@ typedef struct { */ uint16_t * unicode_list; - uint32_t unicode_list_length; /* if(type == LV_FONT_FMT_TXT_CMAP_FORMAT0_...) it's `uint8_t *` * if(type == LV_FONT_FMT_TXT_CMAP_SPARSE_...) it's `uint16_t *` */ const void * glyph_id_ofs_list; - uint32_t glyph_id_ofs_list_length; + + /*Length of `unicode_list` and/or `glyph_id_ofs_list`*/ + uint16_t list_length; + + /*Type of this character map*/ + lv_font_fmt_txt_cmap_type_t type :2; }lv_font_fmt_txt_cmap_t; /*Describe glyph pairs for kerning*/ From 4cffb733570e53daf8f2d4231fffdb5f88157354 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 29 May 2019 06:40:19 +0200 Subject: [PATCH 470/590] font: start to inegrate --- lvgl.h | 3 + src/lv_draw/lv_draw_basic.c | 2 +- src/lv_fonts/lvgl_sample.c | 22 ++--- src/lv_misc/lv_font.c | 72 ++++---------- src/lv_misc/lv_font.h | 50 +--------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 111 ++++++++++++---------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 14 +-- 7 files changed, 102 insertions(+), 172 deletions(-) diff --git a/lvgl.h b/lvgl.h index efe05f59f2ea..9d099f80fd99 100644 --- a/lvgl.h +++ b/lvgl.h @@ -30,6 +30,9 @@ extern "C" { #include "src/lv_themes/lv_theme.h" +#include "src/lv_misc/lv_font.h" +#include "src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h" + #include "src/lv_objx/lv_btn.h" #include "src/lv_objx/lv_imgbtn.h" #include "src/lv_objx/lv_img.h" diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 3a0ec018343e..6992d48a5df8 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -247,7 +247,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv } lv_font_glyph_dsc_t g; - bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter); + bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0'); if(g_ret == false) return; lv_coord_t pos_x = pos_p->x + g.ofs_x; diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index b5b27a4cb779..454723e5c841 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -374,15 +374,15 @@ static const uint8_t gylph_bitmap[] = { /* U+7E "~" */ 0x7, 0x66, 0xdc, 0x20, 0x0 -} +}; /*--------------------- * GLYPH DESCRIPTION *--------------------*/ -static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} // id = 0 reserved, +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, // id = 0 reserved, {.bitmap_index = 0, .adv_w = 64, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, {.bitmap_index = 0, .adv_w = 67, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 3, .adv_w = 92, .box_h = 5, .box_w = 5, .ofs_x = 0, .ofs_y = 7}, @@ -478,7 +478,7 @@ static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { {.bitmap_index = 1036, .adv_w = 63, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, {.bitmap_index = 1040, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, {.bitmap_index = 1050, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3} -} +}; /*--------------------- @@ -495,7 +495,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL } -} +}; /*----------------- @@ -504,7 +504,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = /*Pair left and right glyphs for kerning*/ -static lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = +static const lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = { {.pair.left = 9, .pair.right = 43}, {.pair.left = 9, .pair.right = 55}, @@ -994,7 +994,7 @@ static lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = /* Kerning between the respective left and right glyphs * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +static const int8_t kern_pair_values[] = { -12, 5, 5, 6, 1, -4, 0, 1, 0, 1, -5, 1, -1, -1, -1, 0, @@ -1060,7 +1060,7 @@ static int8_t kern_pair_values[] = }; /*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = +static const lv_font_fmt_txt_kern_pair_t kern_pairs = { .glyph_ids = kern_pair_glyph_ids, .values = kern_pair_values, @@ -1073,17 +1073,17 @@ static lv_font_fmt_txt_kern_pair_t kern_pairs = *--------------------*/ /*Store all the custom data of the font*/ -static lv_font_dsc_fmt_txt_t font_dsc = { +static const lv_font_fmt_txt_dsc_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .cmap_num = 1, .bpp = 1, - .kerning_scale = 16, + .kern_scale = 16, //.kern_dsc = kern_classes, //.kern_classes = 1, - .kern_dsc = kern_pairs, + .kern_dsc = &kern_pairs, .kern_classes = 0, }; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index 1b09975005fb..e28648afb7fa 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -23,8 +23,6 @@ * STATIC PROTOTYPES **********************/ -static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); - /********************** * STATIC VARIABLES **********************/ @@ -49,39 +47,6 @@ void lv_font_init(void) lv_font_builtin_init(); } -/** - * Add a font to an other to extend the character set. - * @param child the font to add - * @param parent this font will be extended. Using it later will contain the characters from `child` - */ -void lv_font_add(lv_font_t * child, lv_font_t * parent) -{ - if(parent == NULL) return; - - while(parent->next_page != NULL) { - parent = parent->next_page; /*Got to the last page and add the new font there*/ - } - - parent->next_page = child; -} - -/** - * Remove a font from a character set. - * @param child the font to remove - * @param parent remove `child` from here - */ -void lv_font_remove(lv_font_t * child, lv_font_t * parent) -{ - if(parent == NULL) return; - if(child == NULL) return; - - while(parent->next_page != child) { - parent = parent->next_page; /*Got to the last page and add the new font there*/ - } - - parent->next_page = child->next_page; -} - /** * Return with the bitmap of a font. * @param font_p pointer to a font @@ -90,15 +55,7 @@ void lv_font_remove(lv_font_t * child, lv_font_t * parent) */ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t letter) { - const lv_font_t * font_i = font_p; - while(font_i != NULL) { - const uint8_t * bitmap = font_i->get_glyph_bitmap(font_i, letter); - if(bitmap) return bitmap; - - font_i = font_i->next_page; - } - - return NULL; + return font_p->get_glyph_bitmap(font_p, letter); } /** @@ -109,18 +66,25 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter) +bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, uint32_t letter_next) { - const lv_font_t * font_i = font_p; - bool ret; - while(font_i != NULL) { - ret = font_i->get_glyph_dsc(font_i, dsc_out, letter); - if(ret) return ret; - - font_i = font_i->next_page; - } + return font_p->get_glyph_dsc(font_p, dsc_out, letter, letter_next); +} - return false; +/** + * Get the width of a glyph with kerning + * @param font pointer to a font + * @param letter an UNICODE letter + * @param letter_next the next letter after `letter`. Used for kerning + * @return the width of the glyph + */ +uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next) +{ + lv_font_glyph_dsc_t g; + bool ret; + ret = lv_font_get_glyph_dsc(font, &g, letter, letter_next); + if(ret) return g.adv_w; + else return 0; } /********************** diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index fd2f57356022..d4307da681e1 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -57,7 +57,7 @@ typedef struct typedef struct _lv_font_struct { /*Get a glyph's descriptor from a font*/ - bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter); + bool (*get_glyph_dsc)(const struct _lv_font_struct *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); /*Get a glyph's bitmap from a font*/ const uint8_t * (*get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t); @@ -66,36 +66,6 @@ typedef struct _lv_font_struct uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ void * dsc; /*Store implementation specific data here*/ - -/* - - Font size: - not required for calculations - - - Ascent - - Descent - - typoAscent - - typoDescent - - typographic descent: - Better to skip them to avoid confusion. Only line height and baseline matter for rendering. - - typoLineGap - Will be overwritten by the style. - - - default advanceWidth - Not supported in text format. glyph->advacedWidth is always present - - - glyphIdFormat - Has foxed size on text format - - - advanceWidthFormat - Fix 8.4 format - - - Glyph BBox x/y bits length (signed value) - - Glyph BBox w/h bits length (unsigned) - Has fixed size - - - Glyph advanceWidth bits length (unsigned, may be FP4) - Fix 8.4 format - */ } lv_font_t; /********************** @@ -107,20 +77,6 @@ typedef struct _lv_font_struct */ void lv_font_init(void); -/** - * Add a font to an other to extend the character set. - * @param child the font to add - * @param parent this font will be extended. Using it later will contain the characters from `child` - */ -void lv_font_add(lv_font_t * child, lv_font_t * parent); - -/** - * Remove a font from a character set. - * @param child the font to remove - * @param parent remove `child` from here - */ -void lv_font_remove(lv_font_t * child, lv_font_t * parent); - /** * Return with the bitmap of a font. * @param font_p pointer to a font @@ -137,7 +93,7 @@ const uint8_t * lv_font_get_glyph_bitmap(const lv_font_t * font_p, uint32_t lett * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter); +bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, uint32_t letter_next); /** * Get the width of a glyph with kerning @@ -146,7 +102,7 @@ bool lv_font_get_glyph_dsc(const lv_font_t * font_p, lv_font_glyph_dsc_t * dsc_o * @param letter_next the next letter after `letter`. Used for kerning * @return the width of the glyph */ -uint8_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); +uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); /** * Get the line height of a font. All characters fit into this height diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index b113111e84c2..0ad7d2a9a730 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -7,9 +7,10 @@ * INCLUDES *********************/ -#include "lv_font.h" -#include "lv_log.h" -#include "lv_utils.h" +#include "../lv_font.h" +#include "../lv_log.h" +#include "../lv_utils.h" +#include "lv_font_fmt_txt.h" /********************* * DEFINES @@ -22,7 +23,7 @@ /********************** * STATIC PROTOTYPES **********************/ - +static lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter); static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** @@ -49,26 +50,10 @@ static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); */ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unicode_letter) { - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - - lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; + lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; + lv_font_fmt_txt_glyph_dsc_t * gdsc = get_glyph_dsc(font, unicode_letter); - /*No Unicode list -> Continuous font*/ - if(font_dsc->unicode_list == NULL) { - uint32_t index = (unicode_letter - font->unicode_first); - return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[index].bitmap_index]; - } - /*Has Unicode list -> Sparse font */ - else { - uint16_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, - sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); - if(pUnicode != NULL) { - uint32_t idx = (uint32_t)(pUnicode - font_dsc->unicode_list); - return &font_dsc->glyph_bitmap[font_dsc->glyph_dsc[idx].bitmap_index]; - } - } + if(gdsc) return &fdsc->glyph_bitmap[gdsc->bitmap_index]; /*If not returned earlier then the letter is not found in this font*/ return NULL; @@ -82,46 +67,68 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter) +bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) { - /*Check the range*/ - if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL; - - lv_font_dsc_built_in_t * font_dsc = (lv_font_dsc_built_in_t *) font->dsc; - int32_t index = -1; - /*No Unicode list -> Continuous font*/ - if(font_dsc->unicode_list == NULL) { - index = (unicode_letter - font->unicode_first); - } - /*Has Unicode list -> Sparse font */ - else { - uint16_t * pUnicode; - pUnicode = lv_utils_bsearch(&unicode_letter, font_dsc->unicode_list, font_dsc->glyph_cnt, - sizeof(font_dsc->unicode_list[0]), lv_font_codeCompare); - - if(pUnicode != NULL) { - index = (uint16_t)(pUnicode - font_dsc->unicode_list); + lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; + lv_font_fmt_txt_glyph_dsc_t * gdsc = get_glyph_dsc(font, unicode_letter); + + if(gdsc) { + /*Get kerning value*/ + uint32_t kvalue = 0; + uint32_t k; + if(fdsc->kern_classes == 0) { + const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; + for(k = 0; k < kdsc->pair_cnt; k++) { + if(kdsc->glyph_ids[k].pair.left == unicode_letter && + kdsc->glyph_ids[k].pair.right == unicode_letter_next) { + kvalue = kdsc->values[k]; + break; + } + } } - } - if(index > 0) { - dsc_out->adv_w = font_dsc->glyph_dsc[index].adv_w; - dsc_out->box_h = font_dsc->glyph_dsc[index].box_h; - dsc_out->box_w = font_dsc->glyph_dsc[index].box_w; - dsc_out->ofs_x = font_dsc->glyph_dsc[index].ofs_x; - dsc_out->ofs_y = font_dsc->glyph_dsc[index].ofs_y; - dsc_out->kern_table = font_dsc->glyph_dsc[index].kern_table; - dsc_out->bpp = font_dsc->bpp; + uint32_t adw_w = gdsc->adv_w + ((kvalue * fdsc->kern_scale) >> 4); + adw_w =(adw_w + (1 << 3)) >> 4; + + dsc_out->adv_w = adw_w; + dsc_out->box_h = gdsc->box_h; + dsc_out->box_w = gdsc->box_w; + dsc_out->ofs_x = gdsc->ofs_x; + dsc_out->ofs_y = gdsc->ofs_y; + dsc_out->bpp = fdsc->bpp; + return true; - } else { - return false; } + + return false; } /********************** * STATIC FUNCTIONS **********************/ +static lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter) +{ + lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; + + uint16_t i; + for(i = 0; i < fdsc->cmap_num; i++) { + + /*Relative code point*/ + uint32_t rcp = letter - fdsc->cmaps[i].range_start; + uint32_t glyph_id = 0; + if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY) { + glyph_id = fdsc->cmaps[i].glyph_id_start + rcp; + } + + if(glyph_id) return &fdsc->glyph_dsc[glyph_id]; + } + + return NULL; + +} + + /** Code Comparator. * * Compares the value of both input arguments. diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index b27e2246a3c1..83af9e37fb9a 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -16,7 +16,7 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../../lv_conf.h" +#include "../../../../lv_conf.h" #endif #include @@ -128,8 +128,8 @@ typedef struct { gylph_ids[i].pair.right == glyph_id_right) return values[i]; */ - lv_font_fmt_txt_kern_pair_id_t glyph_ids; - uint8_t * values; + const lv_font_fmt_txt_kern_pair_id_t * glyph_ids; + const uint8_t * values; uint16_t pair_cnt; }lv_font_fmt_txt_kern_pair_t; @@ -144,9 +144,9 @@ typedef struct { 3. value = class_pair_values[(left_class-1)*right_class_cnt + (righ_class-1)] */ - uint8_t * class_pair_values; /*left_class_num * right_class_num value*/ - uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ - uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + const uint8_t * class_pair_values; /*left_class_num * right_class_num value*/ + const uint8_t * left_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ + const uint8_t * right_class_mapping; /*Map the glyph_ids to classes: index -> glyph_id -> class_id*/ uint8_t left_class_cnt; uint8_t right_class_cnt; }lv_font_fmt_txt_kern_classes_t; @@ -216,7 +216,7 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t lett * @return true: descriptor is successfully loaded into `dsc_out`. * false: the letter was not found, no data is loaded to `dsc_out` */ -bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter); +bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next); /********************** * MACROS From f173875310b21b1f16c93f57247ab9e924940d25 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Thu, 30 May 2019 10:05:02 -0400 Subject: [PATCH 471/590] Fix bug related to allocation size in lv_img_decoder.c --- src/lv_draw/lv_img_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index 005320dd92c8..c6d6db7910b3 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -354,7 +354,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, } lv_img_decoder_built_in_data_t * user_data = dsc->user_data; - user_data->palette = lv_mem_alloc(sizeof(palette_size * sizeof(lv_color_t))); + user_data->palette = lv_mem_alloc(palette_size * sizeof(lv_color_t)); if(user_data->palette == NULL) { LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); #if LV_USE_FILESYSTEM From 56d7b986d4851889ee69382be511339acd738424 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 05:21:27 +0200 Subject: [PATCH 472/590] font: save the original generated font --- src/lv_fonts/lvgl_sample.c | 24 +++++++++++------------ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 22 +++++++-------------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index 454723e5c841..9820f26e32bf 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 16 px * Bpp: 1 - * Opts: --bpp 1 --size 16 --font ./Roboto-Regular.ttf -r 0x20-0x7F --format lvgl -o ./lvgl_sample.c + * Opts: --no-compress --no-prefilter --bpp 1 --size 16 --font ./Roboto-Regular.ttf -r 0x20-0x7F --format lvgl -o ./lvgl_sample.c ******************************************************************************/ /*----------------- @@ -374,15 +374,15 @@ static const uint8_t gylph_bitmap[] = { /* U+7E "~" */ 0x7, 0x66, 0xdc, 0x20, 0x0 -}; +} /*--------------------- * GLYPH DESCRIPTION *--------------------*/ -static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, // id = 0 reserved, +static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} // id = 0 reserved, {.bitmap_index = 0, .adv_w = 64, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, {.bitmap_index = 0, .adv_w = 67, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 3, .adv_w = 92, .box_h = 5, .box_w = 5, .ofs_x = 0, .ofs_y = 7}, @@ -478,7 +478,7 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { {.bitmap_index = 1036, .adv_w = 63, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, {.bitmap_index = 1040, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, {.bitmap_index = 1050, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3} -}; +} /*--------------------- @@ -495,7 +495,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL } -}; +} /*----------------- @@ -504,7 +504,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = /*Pair left and right glyphs for kerning*/ -static const lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = +static lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = { {.pair.left = 9, .pair.right = 43}, {.pair.left = 9, .pair.right = 55}, @@ -994,7 +994,7 @@ static const lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = /* Kerning between the respective left and right glyphs * 4.4 format which needs to scaled with `kern_scale`*/ -static const int8_t kern_pair_values[] = +static int8_t kern_pair_values[] = { -12, 5, 5, 6, 1, -4, 0, 1, 0, 1, -5, 1, -1, -1, -1, 0, @@ -1060,7 +1060,7 @@ static const int8_t kern_pair_values[] = }; /*Collect the kern pair's data in one place*/ -static const lv_font_fmt_txt_kern_pair_t kern_pairs = +static lv_font_fmt_txt_kern_pair_t kern_pairs = { .glyph_ids = kern_pair_glyph_ids, .values = kern_pair_values, @@ -1073,17 +1073,17 @@ static const lv_font_fmt_txt_kern_pair_t kern_pairs = *--------------------*/ /*Store all the custom data of the font*/ -static const lv_font_fmt_txt_dsc_t font_dsc = { +static lv_font_dsc_fmt_txt_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .cmap_num = 1, .bpp = 1, - .kern_scale = 16, + .kerning_scale = 16, //.kern_dsc = kern_classes, //.kern_classes = 1, - .kern_dsc = &kern_pairs, + .kern_dsc = kern_pairs, .kern_classes = 0, }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 83af9e37fb9a..22965aa8c127 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -110,27 +110,19 @@ typedef struct { lv_font_fmt_txt_cmap_type_t type :2; }lv_font_fmt_txt_cmap_t; -/*Describe glyph pairs for kerning*/ -typedef union { - struct { - uint16_t left; - uint16_t right; - }pair; - uint32_t both; -}lv_font_fmt_txt_kern_pair_id_t; - /*A simple mapping of kern values from pairs*/ typedef struct { /*To get a kern value of two code points: 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t - 2 for(i = 0; i < pair_cnt; i++) - if(gylph_ids[i].pair.left == glyph_id_left && - gylph_ids[i].pair.right == glyph_id_right) - return values[i]; + 2 for(i = 0; i < pair_cnt; i+2) + if(gylph_ids[i] == glyph_id_left && + gylph_ids[i+1] == glyph_id_right) + return values[i / 2]; */ - const lv_font_fmt_txt_kern_pair_id_t * glyph_ids; + const void * glyph_ids; const uint8_t * values; - uint16_t pair_cnt; + uint32_t pair_cnt :24; + uint32_t glyph_ids_size :2; /*1: `glyph_ids` is stored as `uint8_t`; 2: as `uint16_t`*/ }lv_font_fmt_txt_kern_pair_t; /*More complex but more optimal class based kern value storage*/ From 23e7e4e8e2cd2fc549a1880adb10d3694b7c26cf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 05:34:44 +0200 Subject: [PATCH 473/590] font: fix generated font file --- src/lv_fonts/lvgl_sample.c | 519 +--------------------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 24 +- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 4 +- 3 files changed, 35 insertions(+), 512 deletions(-) diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index 9820f26e32bf..8d0a0ce7de86 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -374,15 +374,14 @@ static const uint8_t gylph_bitmap[] = { /* U+7E "~" */ 0x7, 0x66, 0xdc, 0x20, 0x0 -} - +}; /*--------------------- * GLYPH DESCRIPTION *--------------------*/ -static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} // id = 0 reserved, +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, /* id = 0 reserved */ {.bitmap_index = 0, .adv_w = 64, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, {.bitmap_index = 0, .adv_w = 67, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, {.bitmap_index = 3, .adv_w = 92, .box_h = 5, .box_w = 5, .ofs_x = 0, .ofs_y = 7}, @@ -478,16 +477,12 @@ static lv_font_glyph_dsc_fmt_txt_t glyph_dsc[] = { {.bitmap_index = 1036, .adv_w = 63, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, {.bitmap_index = 1040, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, {.bitmap_index = 1050, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3} -} - +}; /*--------------------- * CHARACTER MAPPING *--------------------*/ - - - /*Collect the unicode lists and glyph_id offsets*/ static const lv_font_fmt_txt_cmap_t cmaps[] = { @@ -495,506 +490,23 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL } -} - +}; /*----------------- * KERNING *----------------*/ - /*Pair left and right glyphs for kerning*/ -static lv_font_fmt_txt_kern_pair_id_t kern_pair_glyph_ids[] = +static const uint8_t kern_pair_glyph_ids[] = { - {.pair.left = 9, .pair.right = 43}, - {.pair.left = 9, .pair.right = 55}, - {.pair.left = 9, .pair.right = 56}, - {.pair.left = 9, .pair.right = 58}, - {.pair.left = 17, .pair.right = 17}, - {.pair.left = 17, .pair.right = 18}, - {.pair.left = 17, .pair.right = 20}, - {.pair.left = 17, .pair.right = 21}, - {.pair.left = 17, .pair.right = 22}, - {.pair.left = 17, .pair.right = 23}, - {.pair.left = 17, .pair.right = 24}, - {.pair.left = 17, .pair.right = 26}, - {.pair.left = 18, .pair.right = 19}, - {.pair.left = 18, .pair.right = 20}, - {.pair.left = 18, .pair.right = 22}, - {.pair.left = 18, .pair.right = 24}, - {.pair.left = 19, .pair.right = 17}, - {.pair.left = 19, .pair.right = 18}, - {.pair.left = 19, .pair.right = 19}, - {.pair.left = 19, .pair.right = 22}, - {.pair.left = 19, .pair.right = 23}, - {.pair.left = 19, .pair.right = 24}, - {.pair.left = 19, .pair.right = 25}, - {.pair.left = 19, .pair.right = 26}, - {.pair.left = 20, .pair.right = 18}, - {.pair.left = 20, .pair.right = 19}, - {.pair.left = 20, .pair.right = 20}, - {.pair.left = 20, .pair.right = 21}, - {.pair.left = 20, .pair.right = 22}, - {.pair.left = 20, .pair.right = 23}, - {.pair.left = 20, .pair.right = 24}, - {.pair.left = 20, .pair.right = 25}, - {.pair.left = 20, .pair.right = 26}, - {.pair.left = 21, .pair.right = 17}, - {.pair.left = 21, .pair.right = 19}, - {.pair.left = 21, .pair.right = 21}, - {.pair.left = 21, .pair.right = 22}, - {.pair.left = 21, .pair.right = 23}, - {.pair.left = 21, .pair.right = 24}, - {.pair.left = 21, .pair.right = 25}, - {.pair.left = 22, .pair.right = 18}, - {.pair.left = 22, .pair.right = 19}, - {.pair.left = 22, .pair.right = 20}, - {.pair.left = 22, .pair.right = 21}, - {.pair.left = 22, .pair.right = 22}, - {.pair.left = 22, .pair.right = 23}, - {.pair.left = 22, .pair.right = 24}, - {.pair.left = 22, .pair.right = 25}, - {.pair.left = 22, .pair.right = 26}, - {.pair.left = 23, .pair.right = 17}, - {.pair.left = 23, .pair.right = 18}, - {.pair.left = 23, .pair.right = 19}, - {.pair.left = 23, .pair.right = 21}, - {.pair.left = 23, .pair.right = 22}, - {.pair.left = 23, .pair.right = 23}, - {.pair.left = 23, .pair.right = 24}, - {.pair.left = 23, .pair.right = 25}, - {.pair.left = 24, .pair.right = 18}, - {.pair.left = 24, .pair.right = 21}, - {.pair.left = 24, .pair.right = 22}, - {.pair.left = 24, .pair.right = 23}, - {.pair.left = 24, .pair.right = 24}, - {.pair.left = 24, .pair.right = 25}, - {.pair.left = 24, .pair.right = 26}, - {.pair.left = 25, .pair.right = 17}, - {.pair.left = 25, .pair.right = 18}, - {.pair.left = 25, .pair.right = 20}, - {.pair.left = 25, .pair.right = 21}, - {.pair.left = 25, .pair.right = 22}, - {.pair.left = 25, .pair.right = 23}, - {.pair.left = 26, .pair.right = 17}, - {.pair.left = 26, .pair.right = 18}, - {.pair.left = 26, .pair.right = 19}, - {.pair.left = 26, .pair.right = 21}, - {.pair.left = 26, .pair.right = 22}, - {.pair.left = 26, .pair.right = 23}, - {.pair.left = 26, .pair.right = 24}, - {.pair.left = 26, .pair.right = 26}, - {.pair.left = 34, .pair.right = 36}, - {.pair.left = 34, .pair.right = 40}, - {.pair.left = 34, .pair.right = 48}, - {.pair.left = 34, .pair.right = 50}, - {.pair.left = 34, .pair.right = 53}, - {.pair.left = 34, .pair.right = 54}, - {.pair.left = 34, .pair.right = 55}, - {.pair.left = 34, .pair.right = 56}, - {.pair.left = 34, .pair.right = 58}, - {.pair.left = 34, .pair.right = 66}, - {.pair.left = 34, .pair.right = 68}, - {.pair.left = 34, .pair.right = 69}, - {.pair.left = 34, .pair.right = 70}, - {.pair.left = 34, .pair.right = 72}, - {.pair.left = 34, .pair.right = 80}, - {.pair.left = 34, .pair.right = 82}, - {.pair.left = 34, .pair.right = 84}, - {.pair.left = 34, .pair.right = 85}, - {.pair.left = 34, .pair.right = 86}, - {.pair.left = 34, .pair.right = 87}, - {.pair.left = 34, .pair.right = 88}, - {.pair.left = 34, .pair.right = 91}, - {.pair.left = 35, .pair.right = 58}, - {.pair.left = 35, .pair.right = 66}, - {.pair.left = 35, .pair.right = 74}, - {.pair.left = 35, .pair.right = 77}, - {.pair.left = 35, .pair.right = 80}, - {.pair.left = 35, .pair.right = 83}, - {.pair.left = 35, .pair.right = 86}, - {.pair.left = 35, .pair.right = 90}, - {.pair.left = 36, .pair.right = 36}, - {.pair.left = 36, .pair.right = 40}, - {.pair.left = 36, .pair.right = 48}, - {.pair.left = 36, .pair.right = 50}, - {.pair.left = 36, .pair.right = 74}, - {.pair.left = 36, .pair.right = 83}, - {.pair.left = 36, .pair.right = 86}, - {.pair.left = 36, .pair.right = 90}, - {.pair.left = 36, .pair.right = 91}, - {.pair.left = 37, .pair.right = 55}, - {.pair.left = 37, .pair.right = 56}, - {.pair.left = 37, .pair.right = 66}, - {.pair.left = 37, .pair.right = 70}, - {.pair.left = 37, .pair.right = 80}, - {.pair.left = 37, .pair.right = 86}, - {.pair.left = 38, .pair.right = 55}, - {.pair.left = 38, .pair.right = 56}, - {.pair.left = 38, .pair.right = 58}, - {.pair.left = 38, .pair.right = 67}, - {.pair.left = 38, .pair.right = 68}, - {.pair.left = 38, .pair.right = 69}, - {.pair.left = 38, .pair.right = 70}, - {.pair.left = 38, .pair.right = 71}, - {.pair.left = 38, .pair.right = 72}, - {.pair.left = 38, .pair.right = 74}, - {.pair.left = 38, .pair.right = 75}, - {.pair.left = 38, .pair.right = 76}, - {.pair.left = 38, .pair.right = 77}, - {.pair.left = 38, .pair.right = 78}, - {.pair.left = 38, .pair.right = 79}, - {.pair.left = 38, .pair.right = 80}, - {.pair.left = 38, .pair.right = 81}, - {.pair.left = 38, .pair.right = 82}, - {.pair.left = 38, .pair.right = 83}, - {.pair.left = 38, .pair.right = 85}, - {.pair.left = 38, .pair.right = 86}, - {.pair.left = 38, .pair.right = 87}, - {.pair.left = 38, .pair.right = 88}, - {.pair.left = 38, .pair.right = 89}, - {.pair.left = 38, .pair.right = 90}, - {.pair.left = 38, .pair.right = 91}, - {.pair.left = 39, .pair.right = 13}, - {.pair.left = 39, .pair.right = 15}, - {.pair.left = 39, .pair.right = 34}, - {.pair.left = 39, .pair.right = 66}, - {.pair.left = 39, .pair.right = 70}, - {.pair.left = 39, .pair.right = 74}, - {.pair.left = 39, .pair.right = 77}, - {.pair.left = 39, .pair.right = 80}, - {.pair.left = 39, .pair.right = 83}, - {.pair.left = 39, .pair.right = 86}, - {.pair.left = 39, .pair.right = 90}, - {.pair.left = 40, .pair.right = 66}, - {.pair.left = 40, .pair.right = 70}, - {.pair.left = 40, .pair.right = 79}, - {.pair.left = 40, .pair.right = 80}, - {.pair.left = 40, .pair.right = 83}, - {.pair.left = 40, .pair.right = 86}, - {.pair.left = 40, .pair.right = 90}, - {.pair.left = 41, .pair.right = 66}, - {.pair.left = 41, .pair.right = 70}, - {.pair.left = 41, .pair.right = 80}, - {.pair.left = 41, .pair.right = 86}, - {.pair.left = 41, .pair.right = 90}, - {.pair.left = 42, .pair.right = 66}, - {.pair.left = 42, .pair.right = 68}, - {.pair.left = 42, .pair.right = 69}, - {.pair.left = 42, .pair.right = 71}, - {.pair.left = 42, .pair.right = 72}, - {.pair.left = 42, .pair.right = 78}, - {.pair.left = 42, .pair.right = 79}, - {.pair.left = 42, .pair.right = 80}, - {.pair.left = 42, .pair.right = 81}, - {.pair.left = 42, .pair.right = 83}, - {.pair.left = 42, .pair.right = 84}, - {.pair.left = 42, .pair.right = 85}, - {.pair.left = 42, .pair.right = 86}, - {.pair.left = 42, .pair.right = 87}, - {.pair.left = 42, .pair.right = 88}, - {.pair.left = 42, .pair.right = 90}, - {.pair.left = 43, .pair.right = 66}, - {.pair.left = 43, .pair.right = 80}, - {.pair.left = 44, .pair.right = 36}, - {.pair.left = 44, .pair.right = 40}, - {.pair.left = 44, .pair.right = 48}, - {.pair.left = 44, .pair.right = 50}, - {.pair.left = 44, .pair.right = 66}, - {.pair.left = 44, .pair.right = 70}, - {.pair.left = 44, .pair.right = 74}, - {.pair.left = 44, .pair.right = 80}, - {.pair.left = 44, .pair.right = 83}, - {.pair.left = 44, .pair.right = 86}, - {.pair.left = 44, .pair.right = 88}, - {.pair.left = 44, .pair.right = 90}, - {.pair.left = 45, .pair.right = 34}, - {.pair.left = 45, .pair.right = 36}, - {.pair.left = 45, .pair.right = 40}, - {.pair.left = 45, .pair.right = 48}, - {.pair.left = 45, .pair.right = 50}, - {.pair.left = 45, .pair.right = 53}, - {.pair.left = 45, .pair.right = 54}, - {.pair.left = 45, .pair.right = 55}, - {.pair.left = 45, .pair.right = 56}, - {.pair.left = 45, .pair.right = 58}, - {.pair.left = 45, .pair.right = 75}, - {.pair.left = 45, .pair.right = 86}, - {.pair.left = 45, .pair.right = 88}, - {.pair.left = 45, .pair.right = 90}, - {.pair.left = 46, .pair.right = 66}, - {.pair.left = 46, .pair.right = 70}, - {.pair.left = 46, .pair.right = 75}, - {.pair.left = 46, .pair.right = 79}, - {.pair.left = 46, .pair.right = 80}, - {.pair.left = 46, .pair.right = 86}, - {.pair.left = 46, .pair.right = 90}, - {.pair.left = 47, .pair.right = 70}, - {.pair.left = 47, .pair.right = 80}, - {.pair.left = 47, .pair.right = 90}, - {.pair.left = 48, .pair.right = 34}, - {.pair.left = 48, .pair.right = 53}, - {.pair.left = 48, .pair.right = 55}, - {.pair.left = 48, .pair.right = 56}, - {.pair.left = 48, .pair.right = 57}, - {.pair.left = 48, .pair.right = 58}, - {.pair.left = 48, .pair.right = 68}, - {.pair.left = 48, .pair.right = 69}, - {.pair.left = 48, .pair.right = 70}, - {.pair.left = 48, .pair.right = 71}, - {.pair.left = 48, .pair.right = 72}, - {.pair.left = 48, .pair.right = 75}, - {.pair.left = 48, .pair.right = 80}, - {.pair.left = 48, .pair.right = 81}, - {.pair.left = 48, .pair.right = 82}, - {.pair.left = 48, .pair.right = 84}, - {.pair.left = 48, .pair.right = 85}, - {.pair.left = 48, .pair.right = 86}, - {.pair.left = 48, .pair.right = 89}, - {.pair.left = 48, .pair.right = 90}, - {.pair.left = 48, .pair.right = 91}, - {.pair.left = 49, .pair.right = 13}, - {.pair.left = 49, .pair.right = 15}, - {.pair.left = 49, .pair.right = 34}, - {.pair.left = 49, .pair.right = 38}, - {.pair.left = 49, .pair.right = 41}, - {.pair.left = 49, .pair.right = 42}, - {.pair.left = 49, .pair.right = 66}, - {.pair.left = 49, .pair.right = 70}, - {.pair.left = 49, .pair.right = 73}, - {.pair.left = 49, .pair.right = 74}, - {.pair.left = 49, .pair.right = 77}, - {.pair.left = 49, .pair.right = 79}, - {.pair.left = 49, .pair.right = 80}, - {.pair.left = 49, .pair.right = 83}, - {.pair.left = 49, .pair.right = 84}, - {.pair.left = 49, .pair.right = 85}, - {.pair.left = 49, .pair.right = 90}, - {.pair.left = 50, .pair.right = 34}, - {.pair.left = 50, .pair.right = 53}, - {.pair.left = 50, .pair.right = 54}, - {.pair.left = 50, .pair.right = 55}, - {.pair.left = 50, .pair.right = 56}, - {.pair.left = 50, .pair.right = 57}, - {.pair.left = 50, .pair.right = 58}, - {.pair.left = 50, .pair.right = 66}, - {.pair.left = 50, .pair.right = 86}, - {.pair.left = 51, .pair.right = 36}, - {.pair.left = 51, .pair.right = 40}, - {.pair.left = 51, .pair.right = 48}, - {.pair.left = 51, .pair.right = 50}, - {.pair.left = 51, .pair.right = 53}, - {.pair.left = 51, .pair.right = 54}, - {.pair.left = 51, .pair.right = 55}, - {.pair.left = 51, .pair.right = 56}, - {.pair.left = 51, .pair.right = 58}, - {.pair.left = 51, .pair.right = 66}, - {.pair.left = 51, .pair.right = 70}, - {.pair.left = 51, .pair.right = 80}, - {.pair.left = 51, .pair.right = 86}, - {.pair.left = 51, .pair.right = 90}, - {.pair.left = 52, .pair.right = 66}, - {.pair.left = 52, .pair.right = 70}, - {.pair.left = 52, .pair.right = 75}, - {.pair.left = 52, .pair.right = 78}, - {.pair.left = 52, .pair.right = 79}, - {.pair.left = 52, .pair.right = 80}, - {.pair.left = 52, .pair.right = 81}, - {.pair.left = 52, .pair.right = 82}, - {.pair.left = 52, .pair.right = 86}, - {.pair.left = 52, .pair.right = 88}, - {.pair.left = 52, .pair.right = 90}, - {.pair.left = 53, .pair.right = 13}, - {.pair.left = 53, .pair.right = 14}, - {.pair.left = 53, .pair.right = 15}, - {.pair.left = 53, .pair.right = 27}, - {.pair.left = 53, .pair.right = 28}, - {.pair.left = 53, .pair.right = 34}, - {.pair.left = 53, .pair.right = 36}, - {.pair.left = 53, .pair.right = 40}, - {.pair.left = 53, .pair.right = 48}, - {.pair.left = 53, .pair.right = 50}, - {.pair.left = 53, .pair.right = 52}, - {.pair.left = 53, .pair.right = 53}, - {.pair.left = 53, .pair.right = 55}, - {.pair.left = 53, .pair.right = 56}, - {.pair.left = 53, .pair.right = 57}, - {.pair.left = 53, .pair.right = 58}, - {.pair.left = 53, .pair.right = 66}, - {.pair.left = 53, .pair.right = 70}, - {.pair.left = 53, .pair.right = 74}, - {.pair.left = 53, .pair.right = 78}, - {.pair.left = 53, .pair.right = 80}, - {.pair.left = 53, .pair.right = 83}, - {.pair.left = 53, .pair.right = 84}, - {.pair.left = 53, .pair.right = 86}, - {.pair.left = 53, .pair.right = 88}, - {.pair.left = 53, .pair.right = 90}, - {.pair.left = 53, .pair.right = 91}, - {.pair.left = 54, .pair.right = 34}, - {.pair.left = 54, .pair.right = 69}, - {.pair.left = 54, .pair.right = 71}, - {.pair.left = 54, .pair.right = 72}, - {.pair.left = 54, .pair.right = 78}, - {.pair.left = 54, .pair.right = 79}, - {.pair.left = 54, .pair.right = 81}, - {.pair.left = 54, .pair.right = 83}, - {.pair.left = 54, .pair.right = 84}, - {.pair.left = 54, .pair.right = 85}, - {.pair.left = 54, .pair.right = 89}, - {.pair.left = 54, .pair.right = 91}, - {.pair.left = 55, .pair.right = 10}, - {.pair.left = 55, .pair.right = 13}, - {.pair.left = 55, .pair.right = 14}, - {.pair.left = 55, .pair.right = 15}, - {.pair.left = 55, .pair.right = 27}, - {.pair.left = 55, .pair.right = 28}, - {.pair.left = 55, .pair.right = 34}, - {.pair.left = 55, .pair.right = 36}, - {.pair.left = 55, .pair.right = 40}, - {.pair.left = 55, .pair.right = 48}, - {.pair.left = 55, .pair.right = 50}, - {.pair.left = 55, .pair.right = 62}, - {.pair.left = 55, .pair.right = 66}, - {.pair.left = 55, .pair.right = 70}, - {.pair.left = 55, .pair.right = 80}, - {.pair.left = 55, .pair.right = 83}, - {.pair.left = 55, .pair.right = 86}, - {.pair.left = 55, .pair.right = 90}, - {.pair.left = 55, .pair.right = 94}, - {.pair.left = 56, .pair.right = 10}, - {.pair.left = 56, .pair.right = 13}, - {.pair.left = 56, .pair.right = 14}, - {.pair.left = 56, .pair.right = 15}, - {.pair.left = 56, .pair.right = 27}, - {.pair.left = 56, .pair.right = 28}, - {.pair.left = 56, .pair.right = 34}, - {.pair.left = 56, .pair.right = 36}, - {.pair.left = 56, .pair.right = 40}, - {.pair.left = 56, .pair.right = 48}, - {.pair.left = 56, .pair.right = 50}, - {.pair.left = 56, .pair.right = 53}, - {.pair.left = 56, .pair.right = 62}, - {.pair.left = 56, .pair.right = 66}, - {.pair.left = 56, .pair.right = 70}, - {.pair.left = 56, .pair.right = 80}, - {.pair.left = 56, .pair.right = 83}, - {.pair.left = 56, .pair.right = 86}, - {.pair.left = 56, .pair.right = 90}, - {.pair.left = 56, .pair.right = 94}, - {.pair.left = 57, .pair.right = 36}, - {.pair.left = 57, .pair.right = 40}, - {.pair.left = 57, .pair.right = 48}, - {.pair.left = 57, .pair.right = 50}, - {.pair.left = 57, .pair.right = 70}, - {.pair.left = 57, .pair.right = 86}, - {.pair.left = 57, .pair.right = 90}, - {.pair.left = 58, .pair.right = 10}, - {.pair.left = 58, .pair.right = 13}, - {.pair.left = 58, .pair.right = 14}, - {.pair.left = 58, .pair.right = 15}, - {.pair.left = 58, .pair.right = 27}, - {.pair.left = 58, .pair.right = 28}, - {.pair.left = 58, .pair.right = 34}, - {.pair.left = 58, .pair.right = 36}, - {.pair.left = 58, .pair.right = 40}, - {.pair.left = 58, .pair.right = 48}, - {.pair.left = 58, .pair.right = 50}, - {.pair.left = 58, .pair.right = 53}, - {.pair.left = 58, .pair.right = 55}, - {.pair.left = 58, .pair.right = 56}, - {.pair.left = 58, .pair.right = 57}, - {.pair.left = 58, .pair.right = 58}, - {.pair.left = 58, .pair.right = 62}, - {.pair.left = 58, .pair.right = 66}, - {.pair.left = 58, .pair.right = 70}, - {.pair.left = 58, .pair.right = 80}, - {.pair.left = 58, .pair.right = 82}, - {.pair.left = 58, .pair.right = 85}, - {.pair.left = 58, .pair.right = 86}, - {.pair.left = 58, .pair.right = 87}, - {.pair.left = 58, .pair.right = 94}, - {.pair.left = 59, .pair.right = 34}, - {.pair.left = 59, .pair.right = 36}, - {.pair.left = 59, .pair.right = 40}, - {.pair.left = 59, .pair.right = 48}, - {.pair.left = 59, .pair.right = 50}, - {.pair.left = 59, .pair.right = 66}, - {.pair.left = 59, .pair.right = 70}, - {.pair.left = 59, .pair.right = 74}, - {.pair.left = 59, .pair.right = 80}, - {.pair.left = 59, .pair.right = 86}, - {.pair.left = 59, .pair.right = 88}, - {.pair.left = 59, .pair.right = 90}, - {.pair.left = 60, .pair.right = 43}, - {.pair.left = 67, .pair.right = 87}, - {.pair.left = 67, .pair.right = 88}, - {.pair.left = 67, .pair.right = 90}, - {.pair.left = 70, .pair.right = 90}, - {.pair.left = 71, .pair.right = 3}, - {.pair.left = 71, .pair.right = 8}, - {.pair.left = 71, .pair.right = 10}, - {.pair.left = 71, .pair.right = 62}, - {.pair.left = 71, .pair.right = 72}, - {.pair.left = 71, .pair.right = 94}, - {.pair.left = 76, .pair.right = 70}, - {.pair.left = 80, .pair.right = 87}, - {.pair.left = 80, .pair.right = 88}, - {.pair.left = 80, .pair.right = 89}, - {.pair.left = 80, .pair.right = 90}, - {.pair.left = 81, .pair.right = 88}, - {.pair.left = 83, .pair.right = 13}, - {.pair.left = 83, .pair.right = 15}, - {.pair.left = 83, .pair.right = 68}, - {.pair.left = 83, .pair.right = 69}, - {.pair.left = 83, .pair.right = 70}, - {.pair.left = 83, .pair.right = 71}, - {.pair.left = 83, .pair.right = 76}, - {.pair.left = 83, .pair.right = 80}, - {.pair.left = 83, .pair.right = 82}, - {.pair.left = 83, .pair.right = 85}, - {.pair.left = 83, .pair.right = 86}, - {.pair.left = 83, .pair.right = 87}, - {.pair.left = 83, .pair.right = 88}, - {.pair.left = 83, .pair.right = 89}, - {.pair.left = 83, .pair.right = 90}, - {.pair.left = 83, .pair.right = 91}, - {.pair.left = 87, .pair.right = 13}, - {.pair.left = 87, .pair.right = 15}, - {.pair.left = 87, .pair.right = 66}, - {.pair.left = 87, .pair.right = 68}, - {.pair.left = 87, .pair.right = 69}, - {.pair.left = 87, .pair.right = 70}, - {.pair.left = 87, .pair.right = 80}, - {.pair.left = 87, .pair.right = 82}, - {.pair.left = 88, .pair.right = 13}, - {.pair.left = 88, .pair.right = 15}, - {.pair.left = 88, .pair.right = 68}, - {.pair.left = 88, .pair.right = 69}, - {.pair.left = 88, .pair.right = 70}, - {.pair.left = 88, .pair.right = 82}, - {.pair.left = 89, .pair.right = 68}, - {.pair.left = 89, .pair.right = 69}, - {.pair.left = 89, .pair.right = 70}, - {.pair.left = 89, .pair.right = 80}, - {.pair.left = 89, .pair.right = 82}, - {.pair.left = 90, .pair.right = 13}, - {.pair.left = 90, .pair.right = 15}, - {.pair.left = 90, .pair.right = 68}, - {.pair.left = 90, .pair.right = 69}, - {.pair.left = 90, .pair.right = 70}, - {.pair.left = 90, .pair.right = 80}, - {.pair.left = 90, .pair.right = 82}, - {.pair.left = 91, .pair.right = 68}, - {.pair.left = 91, .pair.right = 69}, - {.pair.left = 91, .pair.right = 70}, - {.pair.left = 91, .pair.right = 80}, - {.pair.left = 92, .pair.right = 43} + 9, 43, + 9, 55, + 9, 56, }; /* Kerning between the respective left and right glyphs * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +static const int8_t kern_pair_values[] = { -12, 5, 5, 6, 1, -4, 0, 1, 0, 1, -5, 1, -1, -1, -1, 0, @@ -1065,29 +577,28 @@ static lv_font_fmt_txt_kern_pair_t kern_pairs = .glyph_ids = kern_pair_glyph_ids, .values = kern_pair_values, .pair_cnt = 484, + .glyph_ids_size = 1, }; - /*-------------------- * ALL CUSTOM DATA *--------------------*/ /*Store all the custom data of the font*/ -static lv_font_dsc_fmt_txt_t font_dsc = { +static lv_font_fmt_txt_dsc_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .cmap_num = 1, .bpp = 1, - .kerning_scale = 16, - //.kern_dsc = kern_classes, + .kern_scale = 16, + //.kern_dsc = &kern_classes, //.kern_classes = 1, - .kern_dsc = kern_pairs, + .kern_dsc = &kern_pairs, .kern_classes = 0, }; - /*----------------- * PUBLIC FONT *----------------*/ diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index 0ad7d2a9a730..0c58a9f7d733 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -78,17 +78,29 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * uint32_t k; if(fdsc->kern_classes == 0) { const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; - for(k = 0; k < kdsc->pair_cnt; k++) { - if(kdsc->glyph_ids[k].pair.left == unicode_letter && - kdsc->glyph_ids[k].pair.right == unicode_letter_next) { - kvalue = kdsc->values[k]; - break; + if(kdsc->glyph_ids_size == 1) { + const uint8_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == unicode_letter && + g_ids[k+1] == unicode_letter_next) { + kvalue = kdsc->values[k >> 1]; + break; + } + } + } else { + const uint16_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == unicode_letter && + g_ids[k+1] == unicode_letter_next) { + kvalue = kdsc->values[k >> 1]; + break; + } } } } uint32_t adw_w = gdsc->adv_w + ((kvalue * fdsc->kern_scale) >> 4); - adw_w =(adw_w + (1 << 3)) >> 4; + adw_w = (adw_w + (1 << 3)) >> 4; dsc_out->adv_w = adw_w; dsc_out->box_h = gdsc->box_h; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index 22965aa8c127..b86f76d8724a 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -114,13 +114,13 @@ typedef struct { typedef struct { /*To get a kern value of two code points: 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t - 2 for(i = 0; i < pair_cnt; i+2) + 2 for(i = 0; i < pair_cnt * 2; i+2) if(gylph_ids[i] == glyph_id_left && gylph_ids[i+1] == glyph_id_right) return values[i / 2]; */ const void * glyph_ids; - const uint8_t * values; + const int8_t * values; uint32_t pair_cnt :24; uint32_t glyph_ids_size :2; /*1: `glyph_ids` is stored as `uint8_t`; 2: as `uint16_t`*/ }lv_font_fmt_txt_kern_pair_t; From 7884636b7c1181b47e910e3aa735a9798a30015f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 07:40:00 +0200 Subject: [PATCH 474/590] add triange optimization option --- src/lv_draw/lv_draw_triangle.c | 53 ++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index d786566df978..2784819597af 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -12,7 +12,13 @@ /********************* * DEFINES *********************/ - +/* Draw the tall rectangles from vertical lines + * and from the flat triangles from horizontal lines + * to minimize the number of lines. + * It's still not perfect because some pixels on the edges are overdrawn. + * (Looks fine LV_OPA_COVER) + */ +#define FLAT_TALL_OPTIMIZED 0 /********************** * TYPEDEFS **********************/ @@ -24,7 +30,9 @@ /********************** * STATIC VARIABLES **********************/ +#if FLAT_TALL_OPTIMIZED void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); +#endif void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); static void point_swap(lv_point_t * p1, lv_point_t * p2); @@ -47,6 +55,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l lv_opa_t opa_scale) { + opa_scale = LV_OPA_50; /*Return is the triangle is degenerated*/ if(points[0].x == points[1].x && points[0].y == points[1].y) return; if(points[1].x == points[2].x && points[1].y == points[2].y) return; @@ -59,37 +68,32 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; +#if FLAT_TALL_OPTIMIZED == 0 + tri_draw_tall(points, mask, style, opa); +#else /*Is the triangle flat or tall?*/ lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x); lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x); lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y); - - static lv_color_t c = LV_COLOR_BLACK; - c.full += 0xAA234; - lv_style_t style_tmp; - lv_style_copy(&style_tmp, style); -// style_tmp.body.main_color = c; - - /* If smaller in x then it's tall. * Draw from horizontal lines*/ if(x_max - x_min < y_max - y_min) { - style_tmp.body.main_color = LV_COLOR_RED; - tri_draw_tall(points, mask, &style_tmp, opa); + tri_draw_tall(points, mask, style, opa); } /*Else flat so draw from vertical lines*/ else { - style_tmp.body.main_color = LV_COLOR_BLUE; - tri_draw_flat(points, mask, &style_tmp, opa); + tri_draw_flat(points, mask, style, opa); } +#endif } /********************** * STATIC FUNCTIONS **********************/ +#if FLAT_TALL_OPTIMIZED void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { /*Return if the points are out of the mask*/ @@ -162,9 +166,9 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s /* Get the area of a line. * Adjust it a little bit to perfectly match (no redrawn pixels) with the adjacent triangles*/ draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); - draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - 1; - draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2) - 1; - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; + draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - (FLAT_TALL_OPTIMIZED == 0 ? 1 : 0); + draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); lv_draw_fill(&draw_area, mask, style->body.main_color, opa); @@ -178,8 +182,9 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s dy1 = LV_MATH_ABS(tri[1].y - tri[2].y); sy1 = tri[1].y < tri[2].y ? 1 : -1; err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; - } else if(edge1.x == tri[2].x && edge1.y == tri[2].y) + } else if(edge1.x == tri[2].x && edge1.y == tri[2].y) { return; + } err_tmp1 = err1; if(err_tmp1 > -dx1) { err1 -= dy1; @@ -194,7 +199,7 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s /*Calc. the next point of edge2*/ y2_tmp = edge2.y; do { - if(edge2.x == tri[2].x && edge2.y == tri[2].y) return; + if(edge2.x == tri[2].x && edge2.y == tri[2].y) return; err_tmp2 = err2; if(err_tmp2 > -dx2) { err2 -= dy2; @@ -207,7 +212,7 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s } while(edge2.y == y2_tmp); } } - +#endif void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { @@ -266,7 +271,7 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - (FLAT_TALL_OPTIMIZED == 0 ? 1 : 0); lv_draw_fill(&draw_area, mask, style->body.main_color, opa); @@ -280,8 +285,9 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s dy1 = LV_MATH_ABS(tri[1].y - tri[2].y); sy1 = tri[1].y < tri[2].y ? 1 : -1; err1 = (dx1 > dy1 ? dx1 : -dy1) / 2; - } else if(edge1.y == tri[2].y && edge1.x == tri[2].x) + } else if(edge1.y == tri[2].y && edge1.x == tri[2].x) { return; + } err_tmp1 = err1; if(err_tmp1 > -dx1) { err1 -= dy1; @@ -296,7 +302,10 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s /*Calc. the next point of edge2*/ x2_tmp = edge2.x; do { - if(edge2.y == tri[2].y && edge2.x == tri[2].x) return; + if(edge2.y == tri[2].y && edge2.x == tri[2].x) { + return; + } + err_tmp2 = err2; if(err_tmp2 > -dx2) { err2 -= dy2; From cf124e60ada7c312dab08be74af502031f4ae0c9 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 07:51:18 +0200 Subject: [PATCH 475/590] use optimized triangle drawing if no opacity --- src/lv_draw/lv_draw_triangle.c | 56 ++++++++++++++++------------------ 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 2784819597af..0f2ed54a6db4 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -12,13 +12,7 @@ /********************* * DEFINES *********************/ -/* Draw the tall rectangles from vertical lines - * and from the flat triangles from horizontal lines - * to minimize the number of lines. - * It's still not perfect because some pixels on the edges are overdrawn. - * (Looks fine LV_OPA_COVER) - */ -#define FLAT_TALL_OPTIMIZED 0 + /********************** * TYPEDEFS **********************/ @@ -26,15 +20,14 @@ /********************** * STATIC PROTOTYPES **********************/ +void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); +void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); +static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * STATIC VARIABLES **********************/ -#if FLAT_TALL_OPTIMIZED -void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); -#endif -void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa); -static void point_swap(lv_point_t * p1, lv_point_t * p2); +static uint8_t corr_value; /********************** * MACROS @@ -54,8 +47,6 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { - - opa_scale = LV_OPA_50; /*Return is the triangle is degenerated*/ if(points[0].x == points[1].x && points[0].y == points[1].y) return; if(points[1].x == points[2].x && points[1].y == points[2].y) return; @@ -68,32 +59,40 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; -#if FLAT_TALL_OPTIMIZED == 0 - tri_draw_tall(points, mask, style, opa); -#else /*Is the triangle flat or tall?*/ lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x); lv_coord_t x_max = LV_MATH_MAX(LV_MATH_MAX(points[0].x, points[1].x), points[2].x); lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y); - /* If smaller in x then it's tall. - * Draw from horizontal lines*/ - if(x_max - x_min < y_max - y_min) { + if(opa < LV_OPA_MAX) { + /*Simply draw the triangles with opacity */ + corr_value = 1; tri_draw_tall(points, mask, style, opa); + } else { + /* Draw the tall rectangles from vertical lines + * and from the flat triangles from horizontal lines + * to minimize the number of lines. + * Some pixels are overdrawn on the common edges of the triangles + * so use it only if the triangle has no opacity*/ + + corr_value = 0; + + /* Draw from horizontal lines*/ + if(x_max - x_min < y_max - y_min) { + tri_draw_tall(points, mask, style, opa); + } + /*Else flat so draw from vertical lines*/ + else { + tri_draw_flat(points, mask, style, opa); + } } - /*Else flat so draw from vertical lines*/ - else { - tri_draw_flat(points, mask, style, opa); - } -#endif } /********************** * STATIC FUNCTIONS **********************/ -#if FLAT_TALL_OPTIMIZED void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { /*Return if the points are out of the mask*/ @@ -166,7 +165,7 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s /* Get the area of a line. * Adjust it a little bit to perfectly match (no redrawn pixels) with the adjacent triangles*/ draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); - draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - (FLAT_TALL_OPTIMIZED == 0 ? 1 : 0); + draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - corr_value; draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); @@ -212,7 +211,6 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s } while(edge2.y == y2_tmp); } } -#endif void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { @@ -271,7 +269,7 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - (FLAT_TALL_OPTIMIZED == 0 ? 1 : 0); + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - corr_value; lv_draw_fill(&draw_area, mask, style->body.main_color, opa); From cd8bfa49e24258b3dae24fe5121e3389db698951 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 08:48:36 +0200 Subject: [PATCH 476/590] ta: fix cursor bilnk and password show time --- src/lv_objx/lv_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 0052028b53f3..a687575a465a 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -115,7 +115,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->label = NULL; ext->placeholder = NULL; -#if LV_USE_ANIMATION +#if LV_USE_ANIMATION == 0 ext->pwd_show_time = 0; ext->cursor.blink_time = 0; #endif From 2dfaef466804e0af3c525b503d0897338521ba18 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 16:42:14 +0200 Subject: [PATCH 477/590] font: add LV_ATTRIBUTE_LARGE_CONST for bitmap --- src/lv_fonts/lvgl_sample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index 8d0a0ce7de86..b68751d20f13 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -11,7 +11,7 @@ *----------------*/ /*Store the image of the glyphs*/ -static const uint8_t gylph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { /* U+20 " " */ /* U+21 "!" */ From df4aecc4c26f3c995e128aa276a8ae8450a68659 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 18:52:19 +0200 Subject: [PATCH 478/590] font: update sample font --- src/lv_fonts/lvgl_sample.c | 5662 +++++++++++++++++++-- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 4 +- 2 files changed, 5331 insertions(+), 335 deletions(-) diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index b68751d20f13..b155186bdf1d 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 16 px * Bpp: 1 - * Opts: --no-compress --no-prefilter --bpp 1 --size 16 --font ./Roboto-Regular.ttf -r 0x20-0x7F --format lvgl -o ./lvgl_sample.c + * Opts: --font Roboto-Regular.woff --size 16 --bpp 1 -o ./lvgl_sample.c --format lvgl -r 0x20-0x2000 ******************************************************************************/ /*----------------- @@ -11,147 +11,149 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { +static const uint8_t gylph_bitmap[] = { /* U+20 " " */ /* U+21 "!" */ - 0xd0, 0xff, 0xfc, + 0x30, 0x7f, 0xff, 0x0, /* U+22 "\"" */ - 0x42, 0xde, 0xf0, 0x0, + 0xaa, 0xaa, /* U+23 "#" */ - 0x24, 0x9, 0x2, 0x61, 0xfe, 0x32, 0x4, 0x81, + 0x24, 0x9, 0x2, 0x61, 0xfe, 0x12, 0x4, 0x81, 0x21, 0xfe, 0x19, 0x2, 0x40, 0x90, 0x0, /* U+24 "$" */ - 0x10, 0x10, 0x7c, 0xc6, 0xc2, 0x2, 0x6, 0x3c, - 0x70, 0x40, 0xc2, 0x46, 0x7c, 0x18, 0x10, 0x0, + 0x8, 0x4, 0xf, 0x8c, 0x64, 0x10, 0x8, 0xc, + 0x3c, 0x38, 0x30, 0x18, 0x44, 0x63, 0xe0, 0x60, + 0x20, 0x0, /* U+25 "%" */ - 0x0, 0x0, 0x1c, 0x13, 0x21, 0xa2, 0xb, 0x20, + 0x0, 0x0, 0x1c, 0x13, 0x21, 0xa2, 0x9, 0x20, 0x5c, 0x4, 0x3, 0x20, 0x49, 0x4, 0x90, 0x48, 0x87, 0x80, 0x0, 0x0, /* U+26 "&" */ - 0x0, 0xf, 0xe6, 0x31, 0xe, 0x46, 0x9b, 0x23, - 0x80, 0xe0, 0x34, 0x8, 0x82, 0x20, 0xf8, 0x8, + 0x0, 0xf, 0xa6, 0x39, 0xe, 0x47, 0x9b, 0x23, + 0x80, 0x70, 0x36, 0x8, 0x82, 0x20, 0xf8, 0x0, 0x0, /* U+27 "'" */ - 0x9, 0x30, + 0x55, /* U+28 "(" */ 0x0, 0x88, 0xc4, 0x63, 0x18, 0xc6, 0x31, 0x84, - 0x30, 0x86, 0x10, + 0x20, 0x86, 0x10, /* U+29 ")" */ - 0x6, 0x10, 0x43, 0x18, 0x42, 0x10, 0x84, 0x63, - 0x11, 0x98, 0x0, + 0x2, 0x18, 0x43, 0x8, 0x42, 0x10, 0x84, 0x23, + 0x11, 0x88, 0x0, /* U+2A "*" */ - 0x28, 0x70, 0xe3, 0xe1, 0x0, 0x0, + 0x0, 0x98, 0xa1, 0xcf, 0xc2, 0x4, 0x0, /* U+2B "+" */ 0x8, 0x4, 0x2, 0x1, 0x7, 0xf0, 0x40, 0x20, 0x10, 0x0, 0x0, /* U+2C "," */ - 0x49, 0x20, + 0x19, 0x24, /* U+2D "-" */ - 0xf8, 0x0, + 0xf0, 0x0, /* U+2E "." */ - 0xc0, + 0x30, /* U+2F "/" */ - 0xc0, 0x81, 0x3, 0x2, 0x6, 0x4, 0x8, 0x18, + 0xc0, 0x81, 0x3, 0x2, 0x4, 0x4, 0x8, 0x18, 0x10, 0x20, 0x20, 0x0, /* U+30 "0" */ 0x0, 0x1f, 0x8, 0x8c, 0x64, 0x12, 0x9, 0x4, - 0x82, 0x41, 0x31, 0x98, 0xc7, 0xc0, 0x80, + 0x82, 0x41, 0x31, 0x98, 0xc7, 0xc0, 0x0, /* U+31 "1" */ - 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xde, 0x0, + 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x1f, 0xce, 0x0, /* U+32 "2" */ - 0xfe, 0x40, 0x60, 0x30, 0x18, 0xc, 0x4, 0x6, - 0xc6, 0xc6, 0x7c, 0x10, + 0x7f, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0x8, + 0x6, 0x43, 0x31, 0x8f, 0x81, 0x0, /* U+33 "3" */ - 0x0, 0x1f, 0x18, 0xcc, 0x60, 0x10, 0x18, 0x78, - 0xc, 0x3, 0x21, 0x98, 0xc7, 0xc0, 0x80, + 0x0, 0x3e, 0x62, 0x43, 0x3, 0x3, 0x1e, 0x6, + 0x3, 0x43, 0x63, 0x3e, 0x0, /* U+34 "4" */ - 0x6, 0x3, 0x1, 0x8f, 0xe6, 0x61, 0x30, 0xd8, - 0x2c, 0xe, 0x7, 0x1, 0x80, 0x0, + 0x2, 0x1, 0x1, 0x8f, 0xf4, 0x21, 0x10, 0xc8, + 0x24, 0xe, 0x7, 0x1, 0x80, 0x0, /* U+35 "5" */ - 0x0, 0x7c, 0x46, 0xc6, 0x2, 0x6, 0xc6, 0x7c, + 0x0, 0x3c, 0x46, 0xc2, 0x2, 0x2, 0x6, 0x7c, 0x40, 0x40, 0x40, 0x7e, 0x0, /* U+36 "6" */ 0x0, 0x3c, 0x66, 0xc2, 0xc2, 0xc2, 0xc6, 0xfc, - 0xc0, 0xc0, 0x40, 0x7c, 0x0, + 0xc0, 0x40, 0x60, 0x3c, 0x0, /* U+37 "7" */ - 0x18, 0xc, 0x6, 0x3, 0x0, 0x80, 0x40, 0x30, - 0x8, 0x2, 0x1, 0x9f, 0xc0, 0x0, + 0x30, 0x8, 0x6, 0x1, 0x0, 0xc0, 0x20, 0x10, + 0x4, 0x2, 0x1, 0x9f, 0xc0, 0x0, /* U+38 "8" */ 0x0, 0x1f, 0x18, 0xc8, 0x24, 0x13, 0x18, 0xf8, - 0x7c, 0x63, 0x31, 0x98, 0xc7, 0xc0, 0x80, + 0x6c, 0x63, 0x31, 0x98, 0xc7, 0xc0, 0x0, /* U+39 "9" */ - 0x0, 0x3c, 0x6, 0x3, 0x3, 0x3f, 0x63, 0x43, - 0x43, 0x43, 0x63, 0x3e, 0x0, + 0x38, 0xc, 0x2, 0x3, 0x3f, 0x63, 0x43, 0x43, + 0x43, 0x62, 0x3e, 0x8, /* U+3A ":" */ - 0xc0, 0x3, 0x0, + 0x30, 0x0, 0xc0, /* U+3B ";" */ - 0x49, 0x20, 0x0, 0xc, 0x0, + 0x19, 0x24, 0x0, 0x1, 0x80, /* U+3C "<" */ - 0x0, 0x4, 0x7b, 0x86, 0x7, 0x3, 0x81, + 0x0, 0xc, 0x73, 0x6, 0x7, 0x81, 0x80, /* U+3D "=" */ - 0xfe, 0x0, 0x3, 0xef, 0xe0, + 0xfe, 0x0, 0x7, 0xef, 0xc0, /* U+3E ">" */ - 0x1, 0x81, 0xc0, 0xe0, 0xe7, 0x38, 0x40, + 0x1, 0x81, 0xe0, 0x60, 0xe7, 0x38, 0x0, /* U+3F "?" */ - 0x10, 0x20, 0x0, 0x81, 0x81, 0x3, 0x3, 0x6, - 0x8d, 0xf0, 0x80, + 0x0, 0x20, 0x0, 0x1, 0x3, 0x2, 0x6, 0x6, + 0xd, 0x1b, 0xe0, 0x0, /* U+40 "@" */ - 0x0, 0x0, 0x73, 0x3, 0x0, 0x8, 0x0, 0x47, - 0x71, 0x33, 0x24, 0xcc, 0x93, 0x32, 0x4c, 0x45, - 0x11, 0x26, 0x6c, 0x88, 0x62, 0x30, 0x18, 0x60, - 0xc0, 0x7c, 0x0, 0x0, + 0x1, 0x0, 0x73, 0x3, 0x0, 0x8, 0x0, 0x47, + 0x71, 0x33, 0x24, 0xcc, 0x93, 0x33, 0x44, 0x45, + 0x11, 0x6, 0x2c, 0x88, 0x62, 0x30, 0x18, 0x60, + 0xc0, 0x7e, 0x0, 0x0, /* U+41 "A" */ - 0x40, 0xd0, 0x26, 0x18, 0xfe, 0x31, 0xc, 0xc1, - 0x20, 0x68, 0x1e, 0x3, 0x0, 0xc0, 0x0, + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, /* U+42 "B" */ - 0xfe, 0x61, 0xb0, 0x58, 0x2c, 0x17, 0xf3, 0xf9, + 0xfc, 0x63, 0xb0, 0xd8, 0x2c, 0x37, 0xf3, 0xf9, 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, /* U+43 "C" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x90, 0x4, + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, 0x0, /* U+44 "D" */ - 0xfc, 0x63, 0xb0, 0x58, 0x3c, 0x1e, 0xf, 0x7, - 0x83, 0xc1, 0x61, 0xbf, 0x80, 0x0, + 0xfc, 0x63, 0x30, 0xd8, 0x2c, 0x16, 0xf, 0x7, + 0x82, 0xc3, 0x61, 0x3f, 0x0, 0x0, /* U+45 "E" */ - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, /* U+46 "F" */ @@ -159,85 +161,84 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0xc0, 0xc0, 0xfe, 0x0, /* U+47 "G" */ - 0x0, 0x7, 0xc3, 0x19, 0x83, 0x60, 0xd8, 0xf6, - 0x39, 0x80, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, + 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, 0x0, /* U+48 "H" */ - 0xc1, 0xe0, 0xf0, 0x78, 0x3c, 0x1f, 0xff, 0x7, - 0x83, 0xc1, 0xe0, 0xf0, 0x60, 0x0, + 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, + 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, /* U+49 "I" */ - 0xdb, 0x6d, 0xb6, 0xdb, 0x0, + 0xff, 0xff, 0xfc, /* U+4A "J" */ - 0x0, 0x3c, 0x66, 0x42, 0x2, 0x2, 0x2, 0x2, - 0x2, 0x2, 0x2, 0x2, 0x0, + 0x0, 0x3c, 0x66, 0x42, 0x3, 0x3, 0x3, 0x3, + 0x3, 0x3, 0x3, 0x3, 0x0, /* U+4B "K" */ - 0xc1, 0xe1, 0xb1, 0x99, 0x8d, 0x87, 0xc3, 0x61, - 0x90, 0xc4, 0x63, 0x30, 0xc0, 0x0, + 0xc1, 0xe1, 0xb1, 0x98, 0x8c, 0xc7, 0xc3, 0x41, + 0xb0, 0xcc, 0x63, 0x30, 0xc0, 0x0, /* U+4C "L" */ 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x0, /* U+4D "M" */ - 0xc6, 0x3c, 0x63, 0xce, 0x3c, 0xb3, 0xc9, 0x3d, - 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0xfe, 0x7, 0xe0, + 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, + 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, 0x70, 0x0, /* U+4E "N" */ - 0xc1, 0xe1, 0xf0, 0xf8, 0xfc, 0x5e, 0x6f, 0x67, - 0xa3, 0xf1, 0xf0, 0xf0, 0x60, 0x0, + 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, + 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, /* U+4F "O" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0x81, - 0x90, 0x32, 0x6, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, 0x80, 0x40, /* U+50 "P" */ - 0xc0, 0x60, 0x30, 0x18, 0xc, 0x7, 0xf3, 0xd, + 0xc0, 0x60, 0x30, 0x18, 0xf, 0x87, 0xfb, 0xd, 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, /* U+51 "Q" */ - 0x0, 0x0, 0x8, 0x7f, 0x18, 0xc6, 0xc, 0xc1, - 0x90, 0x32, 0x6, 0x40, 0xcc, 0x19, 0x83, 0x18, + 0x0, 0x80, 0x30, 0x7c, 0x18, 0xc6, 0x8, 0xc1, + 0x90, 0x32, 0x2, 0x40, 0xcc, 0x19, 0x83, 0x18, 0xc1, 0xf0, 0x8, 0x0, /* U+52 "R" */ - 0xc1, 0x60, 0xb0, 0x58, 0x6c, 0x37, 0xf3, 0xd, - 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, + 0xc1, 0x61, 0xb0, 0x98, 0xcc, 0xc7, 0xf3, 0xd, + 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, /* U+53 "S" */ - 0x0, 0x7, 0x83, 0x19, 0x86, 0x1, 0x80, 0xe0, - 0xe0, 0xe0, 0x20, 0x18, 0x62, 0x18, 0xfc, 0x0, - 0x0, + 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, + 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x0, /* U+54 "T" */ 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x0, /* U+55 "U" */ - 0x0, 0x1f, 0x18, 0xd8, 0x3c, 0x1e, 0xf, 0x7, - 0x83, 0xc1, 0xe0, 0xf0, 0x78, 0x30, 0x0, + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, /* U+56 "V" */ - 0xc, 0x3, 0x1, 0xe0, 0x68, 0x12, 0xc, 0xc3, - 0x10, 0x86, 0x61, 0x90, 0x2c, 0xc, 0x0, + 0xc, 0x3, 0x0, 0xe0, 0x68, 0x12, 0xc, 0xc3, + 0x10, 0x86, 0x61, 0x98, 0x24, 0xc, 0x0, /* U+57 "W" */ - 0x18, 0x60, 0x61, 0x83, 0x86, 0xe, 0x3c, 0x2c, - 0xf0, 0x92, 0x46, 0x59, 0x19, 0xe6, 0x67, 0x19, - 0xc, 0x64, 0x30, 0x80, 0x0, + 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, + 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, + 0xc, 0x24, 0x30, 0xc0, 0x0, /* U+58 "X" */ 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x3, 0x0, - 0xc0, 0x78, 0x33, 0xc, 0x46, 0x18, 0x0, + 0xc0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, /* U+59 "Y" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x81, - 0xa0, 0xcc, 0x31, 0x18, 0x66, 0x8, 0x0, + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, /* U+5A "Z" */ 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, @@ -247,14 +248,14 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0xe, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, /* U+5C "\\" */ - 0x4, 0x18, 0x30, 0x41, 0x82, 0x4, 0x18, 0x20, + 0x4, 0x18, 0x20, 0x41, 0x82, 0x4, 0x18, 0x20, 0xc1, 0x2, 0x0, 0x0, /* U+5D "]" */ 0xe, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x6e, /* U+5E "^" */ - 0x0, 0x99, 0xa1, 0x43, 0x86, 0x0, 0x0, + 0x0, 0x89, 0xa1, 0x43, 0x86, 0x0, 0x0, /* U+5F "_" */ 0x0, 0xfe, @@ -263,76 +264,75 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x2, 0x60, /* U+61 "a" */ - 0x0, 0x3b, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x63, + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, 0x3e, 0x8, /* U+62 "b" */ - 0x0, 0xbc, 0xc6, 0xc2, 0xc2, 0xc2, 0xc2, 0xc6, - 0xfc, 0xd8, 0xc0, 0xc0, 0xc0, 0x0, + 0x0, 0xfc, 0xc6, 0xc2, 0xc2, 0xc2, 0xc2, 0xc6, + 0xfc, 0xd8, 0xc0, 0xc0, 0xc0, /* U+63 "c" */ - 0x0, 0x3c, 0x62, 0x62, 0x40, 0x40, 0x40, 0x62, + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, 0x3e, 0x8, /* U+64 "d" */ - 0x0, 0x3d, 0x63, 0x63, 0x43, 0x43, 0x63, 0x63, - 0x3f, 0x1b, 0x3, 0x3, 0x3, 0x0, + 0x0, 0x3f, 0x63, 0x63, 0x43, 0x43, 0x43, 0x63, + 0x3f, 0x1b, 0x3, 0x3, 0x3, /* U+65 "e" */ - 0x0, 0x3e, 0x60, 0x60, 0x40, 0x7f, 0x63, 0x62, + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, 0x3e, 0x8, /* U+66 "f" */ - 0x20, 0x82, 0x8, 0x20, 0x82, 0x3c, 0x70, 0x82, - 0xe, 0x0, + 0x20, 0x82, 0x8, 0x20, 0x82, 0x1e, 0x70, 0x83, + 0x7, 0x0, /* U+67 "g" */ - 0x0, 0x3e, 0x3, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x63, 0x63, 0x3f, 0x18, + 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, + 0x43, 0x43, 0x63, 0x3f, 0x18, /* U+68 "h" */ 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0xd9, - 0x83, 0x6, 0x0, 0x0, + 0x83, 0x6, 0x0, /* U+69 "i" */ - 0xff, 0xff, 0x3, 0x0, + 0xff, 0xff, 0xc, /* U+6A "j" */ - 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, 0x3, - 0x0, + 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, /* U+6B "k" */ - 0xc6, 0xcc, 0xc8, 0xd8, 0xf0, 0xd8, 0xc8, 0xcc, - 0xc0, 0xc0, 0xc0, 0xc0, 0x0, + 0xc6, 0xcc, 0xc8, 0xd0, 0xf0, 0xf0, 0xd8, 0xcc, + 0xc0, 0xc0, 0xc0, 0xc0, /* U+6C "l" */ - 0xff, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, /* U+6D "m" */ 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3f, 0xde, 0x18, 0xc0, + 0x63, 0xc6, 0x3f, 0xfe, 0x18, 0xc0, /* U+6E "n" */ 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, /* U+6F "o" */ - 0x0, 0x1f, 0x18, 0xcc, 0x64, 0x12, 0x9, 0x4, + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, 0xc6, 0x3e, 0x4, 0x0, /* U+70 "p" */ - 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc2, + 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc2, 0xc2, 0xc2, 0xc6, 0xfc, 0x18, /* U+71 "q" */ 0x0, 0x3, 0x3, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x63, 0x63, 0x3f, 0x18, + 0x43, 0x43, 0x63, 0x3f, 0x18, /* U+72 "r" */ 0xc6, 0x31, 0x8c, 0x63, 0x1e, 0x10, /* U+73 "s" */ - 0x0, 0x3c, 0x62, 0x43, 0x6, 0x3c, 0x60, 0x62, - 0x3e, 0x8, + 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, + 0x3e, 0x18, /* U+74 "t" */ 0x1, 0xc8, 0x42, 0x10, 0x84, 0xf3, 0x88, 0x40, @@ -342,262 +342,5258 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { 0x0, /* U+76 "v" */ - 0x18, 0x18, 0x1c, 0x34, 0x24, 0x66, 0x62, 0x42, + 0x18, 0x18, 0x38, 0x2c, 0x24, 0x64, 0x46, 0x42, 0x0, /* U+77 "w" */ - 0x10, 0x83, 0x8c, 0x39, 0xc2, 0x94, 0x29, 0x66, - 0xf6, 0x46, 0x24, 0x62, 0x0, 0x0, + 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, + 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, /* U+78 "x" */ 0x42, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x24, 0x66, 0x0, /* U+79 "y" */ - 0x0, 0x70, 0x10, 0x18, 0x18, 0x18, 0x3c, 0x3c, - 0x24, 0x66, 0x66, 0x42, 0x0, + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, /* U+7A "z" */ - 0x7e, 0x60, 0x30, 0x10, 0x18, 0xc, 0x6, 0x7e, + 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, 0x0, /* U+7B "{" */ 0x8, 0x63, 0xc, 0x30, 0xc2, 0x18, 0x60, 0xc3, - 0xc, 0x30, 0xc1, 0x80, + 0xc, 0x30, 0x41, 0x80, /* U+7C "|" */ 0x3f, 0xff, 0xff, 0xf0, /* U+7D "}" */ - 0x3, 0x8, 0x42, 0x10, 0xc3, 0x31, 0x8, 0x42, + 0x83, 0x8, 0x42, 0x10, 0xc3, 0x31, 0x8, 0x42, 0x33, 0x0, /* U+7E "~" */ - 0x7, 0x66, 0xdc, 0x20, 0x0 -}; + 0x86, 0x66, 0x9c, 0x20, 0x0, -/*--------------------- - * GLYPH DESCRIPTION - *--------------------*/ + /* U+A0 " " */ -static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, /* id = 0 reserved */ - {.bitmap_index = 0, .adv_w = 64, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 0, .adv_w = 67, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3, .adv_w = 92, .box_h = 5, .box_w = 5, .ofs_x = 0, .ofs_y = 7}, - {.bitmap_index = 7, .adv_w = 160, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 22, .adv_w = 149, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -2}, - {.bitmap_index = 38, .adv_w = 187, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 58, .adv_w = 160, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 75, .adv_w = 56, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = 7}, - {.bitmap_index = 77, .adv_w = 85, .box_h = 17, .box_w = 5, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 88, .adv_w = 86, .box_h = 17, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 99, .adv_w = 111, .box_h = 6, .box_w = 7, .ofs_x = 0, .ofs_y = 3}, - {.bitmap_index = 105, .adv_w = 145, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 116, .adv_w = 57, .box_h = 4, .box_w = 3, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 118, .adv_w = 115, .box_h = 2, .box_w = 5, .ofs_x = 1, .ofs_y = 4}, - {.bitmap_index = 120, .adv_w = 69, .box_h = 2, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 121, .adv_w = 106, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 133, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 148, .adv_w = 144, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 156, .adv_w = 144, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 168, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 183, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 197, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 210, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 223, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 237, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 252, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 265, .adv_w = 65, .box_h = 9, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 268, .adv_w = 66, .box_h = 11, .box_w = 3, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 273, .adv_w = 130, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 280, .adv_w = 144, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 285, .adv_w = 134, .box_h = 8, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 292, .adv_w = 122, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 303, .adv_w = 229, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 331, .adv_w = 162, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 346, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 360, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 377, .adv_w = 173, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 391, .adv_w = 140, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 403, .adv_w = 140, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 415, .adv_w = 173, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 432, .adv_w = 180, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 446, .adv_w = 72, .box_h = 12, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 451, .adv_w = 140, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 464, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 478, .adv_w = 140, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 490, .adv_w = 221, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 508, .adv_w = 180, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 522, .adv_w = 175, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 540, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 554, .adv_w = 178, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 574, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 588, .adv_w = 157, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 605, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 620, .adv_w = 173, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 635, .adv_w = 162, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 650, .adv_w = 220, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 671, .adv_w = 162, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 686, .adv_w = 162, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 701, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 715, .adv_w = 69, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 723, .adv_w = 106, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 735, .adv_w = 69, .box_h = 16, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 743, .adv_w = 107, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 750, .adv_w = 116, .box_h = 2, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 752, .adv_w = 80, .box_h = 3, .box_w = 4, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 754, .adv_w = 141, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 764, .adv_w = 146, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 778, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 788, .adv_w = 146, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 802, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 812, .adv_w = 78, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 822, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 835, .adv_w = 146, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 847, .adv_w = 65, .box_h = 13, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 851, .adv_w = 66, .box_h = 17, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 860, .adv_w = 131, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 873, .adv_w = 65, .box_h = 13, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 877, .adv_w = 224, .box_h = 9, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 891, .adv_w = 146, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 899, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 911, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 924, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 937, .adv_w = 90, .box_h = 9, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 943, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 953, .adv_w = 82, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 961, .adv_w = 146, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 970, .adv_w = 129, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 979, .adv_w = 194, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 993, .adv_w = 129, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1002, .adv_w = 129, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1015, .adv_w = 129, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1024, .adv_w = 87, .box_h = 16, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1036, .adv_w = 63, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 1040, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1050, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3} -}; + /* U+A1 "¡" */ + 0xff, 0xff, 0xc, -/*--------------------- - * CHARACTER MAPPING - *--------------------*/ + /* U+A2 "¢" */ + 0x8, 0x8, 0x3e, 0x23, 0x61, 0x40, 0x40, 0x40, + 0x63, 0x3e, 0x1c, 0x8, 0x0, -/*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_fmt_txt_cmap_t cmaps[] = -{ - { - .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL - } -}; + /* U+A3 "£" */ + 0x7f, 0x90, 0xc, 0x6, 0x3, 0x3, 0xe0, 0x80, + 0x40, 0x20, 0x18, 0x87, 0xc0, 0x0, -/*----------------- - * KERNING - *----------------*/ + /* U+A4 "¤" */ + 0x0, 0xd, 0xe9, 0xe7, 0x10, 0x66, 0x4, 0x80, + 0x98, 0x13, 0x2, 0x30, 0xcf, 0xf8, 0x19, 0x0, -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = -{ - 9, 43, - 9, 55, - 9, 56, -}; + /* U+A5 "¥" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x1f, 0xc1, + 0xe0, 0xc8, 0x33, 0x18, 0x44, 0x18, 0x0, -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static const int8_t kern_pair_values[] = -{ - -12, 5, 5, 6, 1, -4, 0, 1, - 0, 1, -5, 1, -1, -1, -1, 0, - -2, -2, 1, -2, -2, -3, -2, 0, - -2, 0, 1, 2, 1, 0, -3, 1, - 0, 0, -4, 4, 2, 0, -10, 2, - 0, -3, 1, 2, 1, 0, 0, 1, - -3, 0, -5, -3, 3, 1, 0, -5, - 1, 5, -20, -4, -5, 5, -3, -1, - 0, -3, 1, 3, 1, 0, 0, -5, - -1, 1, 0, 0, -6, 1, -5, -5, - -5, -5, -19, -6, -18, -12, -20, 1, - -2, -3, -3, -2, -3, -2, 0, -8, - -3, -10, -8, 3, -20, 1, 0, 0, - 1, 0, 1, 1, -1, -1, -1, -1, - -1, -1, -1, 1, -1, -5, -3, 0, - 1, 1, 1, 2, 2, 2, -1, -5, - -5, -5, -5, -4, -1, -1, -1, -1, - -2, -2, -5, -2, -4, -2, -5, -4, - -7, -6, 1, -6, 1, -38, -38, -15, - -9, -5, -1, -1, -5, -7, -6, -6, - 0, 1, 0, 0, 0, 0, 0, -1, - -1, -1, -1, 0, -1, -1, -2, -1, - -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, 0, -1, -1, -1, -7, -7, - -8, -7, -1, -7, -1, -7, -1, -6, - -10, -10, 5, -5, -6, -6, -6, -19, - -6, -23, -14, -22, 0, -4, -11, -14, - -1, -1, -1, -1, -1, -1, 0, -1, - -1, 0, -5, -7, -6, -3, -6, -7, - 0, 0, 0, 0, 0, -1, 0, 0, - 1, 0, 1, 0, -1, 1, -2, -42, - -42, -14, -1, -1, -1, -3, -3, 0, - -1, -1, -1, -3, 0, -1, 4, 4, - 4, -8, -2, -7, -5, 3, -9, 0, - 0, -1, -1, -2, -1, -5, -2, -5, - -4, -12, 0, -2, -2, -1, 0, 0, - 0, -1, -1, -1, 0, 0, 0, 0, - 1, 1, -20, -20, -20, -19, -19, -20, - -6, -7, -7, -7, -4, 4, 4, 4, - 3, 4, -20, -20, -1, -17, -20, -17, - -19, -17, -12, -12, -15, -6, -2, 0, - -1, -1, -1, -1, -1, -1, 0, -2, - -2, 5, -22, -9, -22, -8, -8, -19, - -5, -5, -6, -5, 4, -12, -11, -12, - -8, -7, -3, 5, 4, -15, -5, -15, - -5, -6, -14, -3, -3, -4, -3, 4, - 3, -8, -8, -8, -5, -5, -1, 4, - -6, -6, -6, -6, -7, -5, -8, 5, - -23, -13, -23, -11, -11, -21, -7, -7, - -7, -7, 4, 5, 4, 3, 5, 5, - -16, -17, -17, -16, -6, -10, -5, 5, - 3, -6, -6, -7, -6, 0, -5, -1, - -5, -5, -7, -7, -5, -3, -2, -3, - -3, 4, 4, 5, 5, -6, 5, -5, - -4, -2, -5, -4, -2, -16, -16, -5, - -4, -5, 4, 0, -5, -4, 4, 0, - 5, 4, 2, 5, 1, -15, -15, -4, - -3, -3, -3, -4, -3, -12, -11, -2, - -2, -3, -2, -5, -5, -5, -5, -5, - -17, -16, -4, -4, -4, -4, -5, -4, - -4, -4, -4, -5 -}; + /* U+A6 "¦" */ + 0x3f, 0xfc, 0x3f, 0xf0, -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = -{ - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 484, - .glyph_ids_size = 1, -}; + /* U+A7 "§" */ + 0x1e, 0x39, 0x90, 0x68, 0x30, 0x30, 0xf9, 0xc6, + 0x83, 0x41, 0xb7, 0x8f, 0xc, 0x6, 0x1b, 0x8, + 0xfc, 0x0, -/*-------------------- - * ALL CUSTOM DATA - *--------------------*/ + /* U+A8 "¨" */ + 0x1, 0x30, 0x0, -/*Store all the custom data of the font*/ -static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, - .glyph_dsc = glyph_dsc, - .cmaps = cmaps, - .cmap_num = 1, - .bpp = 1, + /* U+A9 "©" */ + 0x0, 0x0, 0xf8, 0x30, 0x42, 0x62, 0x49, 0x24, + 0x81, 0x58, 0x14, 0x81, 0x49, 0x94, 0xf2, 0x20, + 0x41, 0x98, 0x0, 0x0, + + /* U+AA "ª" */ + 0x23, 0xec, 0x9e, 0x9, 0xe0, 0x0, + + /* U+AB "«" */ + 0x12, 0x24, 0x6c, 0x48, 0x24, 0x36, 0x0, + + /* U+AC "¬" */ + 0x0, 0x8, 0x17, 0xe0, 0x0, + + /* U+AD "­" */ + 0xf0, 0x0, + + /* U+AE "®" */ + 0x0, 0x0, 0xf8, 0x30, 0x42, 0x82, 0x48, 0xa4, + 0x99, 0x4f, 0x14, 0x91, 0x49, 0x84, 0xf2, 0x20, + 0x41, 0x98, 0x0, 0x0, + + /* U+AF "¯" */ + 0x7c, 0x0, + + /* U+B0 "°" */ + 0xf, 0x9f, 0x0, + + /* U+B1 "±" */ + 0x7f, 0x0, 0x8, 0x8, 0x8, 0x7e, 0x7f, 0x8, + 0x8, 0x8, + + /* U+B2 "²" */ + 0x79, 0x83, 0x6, 0x9, 0xe0, 0x0, + + /* U+B3 "³" */ + 0x71, 0x20, 0x8c, 0x9, 0xe0, 0x0, + + /* U+B4 "´" */ + 0xc, 0x60, + + /* U+B5 "µ" */ + 0x1, 0x83, 0x6, 0xf, 0xf8, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1e, 0x30, 0x0, + + /* U+B6 "¶" */ + 0x6, 0xc, 0x18, 0x33, 0xef, 0xdf, 0xbf, 0x7e, + 0xfc, 0xf8, 0x0, + + /* U+B7 "·" */ + 0x30, + + /* U+B8 "¸" */ + 0x6, 0x26, + + /* U+B9 "¹" */ + 0x11, 0x11, 0x17, 0x0, + + /* U+BA "º" */ + 0x10, 0xf9, 0x12, 0x24, 0x47, 0x80, 0x0, + + /* U+BB "»" */ + 0x48, 0x24, 0x36, 0x12, 0x24, 0x6c, 0x0, + + /* U+BC "¼" */ + 0x0, 0x61, 0x1e, 0x11, 0x60, 0x9e, 0xc, 0xe1, + 0x46, 0x12, 0x1, 0x20, 0x11, 0x7, 0x8, 0x30, + 0x0, 0x0, + + /* U+BD "½" */ + 0x1, 0xe1, 0x18, 0x10, 0xc0, 0x86, 0xd, 0x21, + 0x5e, 0x12, 0x1, 0x20, 0x11, 0x7, 0x8, 0x30, + 0x0, 0x0, + + /* U+BE "¾" */ + 0x0, 0x60, 0x9e, 0x9, 0x60, 0x5e, 0x6, 0xe7, + 0xa6, 0x49, 0x1, 0x90, 0x38, 0x80, 0x84, 0x78, + 0x0, 0x0, + + /* U+BF "¿" */ + 0x3c, 0xcd, 0x1a, 0x6, 0x4, 0x4, 0xc, 0x0, + 0x0, 0x60, 0x0, + + /* U+C0 "À" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, + 0x0, 0x80, 0x30, 0x0, + + /* U+C1 "Á" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x4, + 0x0, 0xc0, 0xc, 0x0, + + /* U+C2 "Â" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xa0, 0xc, 0x0, + + /* U+C3 "Ã" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x1, 0xf0, 0x12, 0x0, + + /* U+C4 "Ä" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x1, 0x30, 0x0, 0x0, + + /* U+C5 "Å" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0x40, 0x14, 0x2, 0x80, 0x20, + + /* U+C6 "Æ" */ + 0x60, 0x7f, 0x30, 0x40, 0x30, 0x40, 0x1f, 0xc0, + 0x8, 0x40, 0xc, 0x7c, 0x4, 0x7c, 0x6, 0xc0, + 0x3, 0xc0, 0x1, 0xc0, 0x1, 0xfe, 0x0, 0x0, + + /* U+C7 "Ç" */ + 0x0, 0x1, 0x80, 0x20, 0x18, 0x1f, 0xc, 0x66, + 0x9, 0x82, 0x60, 0x10, 0x4, 0x1, 0x80, 0x60, + 0x8c, 0x61, 0xf0, 0x10, + + /* U+C8 "È" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x10, 0x30, + + /* U+C9 "É" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0xc, + + /* U+CA "Ê" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x28, 0x18, + + /* U+CB "Ë" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x26, 0x0, + + /* U+CC "Ì" */ + 0x33, 0x33, 0x33, 0x33, 0x33, 0x30, 0x2, 0x60, + + /* U+CD "Í" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc0, 0xc, 0x60, + + /* U+CE "Î" */ + 0x61, 0x86, 0x18, 0x61, 0x86, 0x18, 0x61, 0x86, + 0x0, 0x1, 0x43, 0x0, + + /* U+CF "Ï" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, + 0x0, 0x1, 0x30, 0x0, + + /* U+D0 "Ð" */ + 0x3e, 0x8, 0xc2, 0x18, 0x83, 0x20, 0xfe, 0x36, + 0xc, 0x83, 0x20, 0x88, 0x63, 0xf0, 0x0, + + /* U+D1 "Ñ" */ + 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, + 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0x3e, + 0x4, 0x80, + + /* U+D2 "Ò" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x60, 0x8, 0x3, 0x0, + + /* U+D3 "Ó" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0xc, 0x0, 0xc0, + + /* U+D4 "Ô" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0xc0, 0x14, 0x1, 0x80, + + /* U+D5 "Õ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x60, 0x3e, 0x2, 0x40, + + /* U+D6 "Ö" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0x26, 0x0, 0x0, + + /* U+D7 "×" */ + 0x0, 0x42, 0x26, 0x1c, 0x18, 0x34, 0x62, 0x40, + + /* U+D8 "Ø" */ + 0x0, 0x7, 0xe0, 0xc6, 0x38, 0x66, 0x8c, 0xc9, + 0x91, 0x12, 0x12, 0x63, 0xcc, 0x38, 0xc6, 0xf, + 0xc0, 0x44, + + /* U+D9 "Ù" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x80, + 0xc0, + + /* U+DA "Ú" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xc0, + 0x30, + + /* U+DB "Û" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xa0, + 0x30, + + /* U+DC "Ü" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0x30, + 0x0, + + /* U+DD "Ý" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0xc, + 0x1, 0x80, + + /* U+DE "Þ" */ + 0xc0, 0xc0, 0xf0, 0xfe, 0xc2, 0xc3, 0xc3, 0xc6, + 0xfc, 0xc0, 0xc0, 0x0, + + /* U+DF "ß" */ + 0x0, 0xde, 0xc3, 0xc3, 0xc3, 0xc6, 0xcc, 0xc8, + 0xc8, 0xc4, 0xc4, 0xcc, 0x78, 0x0, + + /* U+E0 "à" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x8, 0x18, + + /* U+E1 "á" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0xc, 0x6, + + /* U+E2 "â" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x14, 0xc, + + /* U+E3 "ã" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3e, 0x12, + + /* U+E4 "ä" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x26, 0x0, + + /* U+E5 "å" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x8, 0x14, 0x14, 0x8, + + /* U+E6 "æ" */ + 0x0, 0x3, 0xe7, 0x91, 0xc0, 0x86, 0x6, 0x20, + 0x1f, 0xfc, 0x8, 0x68, 0x63, 0x7f, 0xf0, 0xc2, + 0x0, + + /* U+E7 "ç" */ + 0x0, 0x18, 0x8, 0x18, 0x3c, 0x62, 0x40, 0x40, + 0x40, 0x40, 0x63, 0x3e, 0x8, + + /* U+E8 "è" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x8, 0x18, + + /* U+E9 "é" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0xc, 0x6, + + /* U+EA "ê" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x14, 0xc, + + /* U+EB "ë" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x26, 0x0, + + /* U+EC "ì" */ + 0x33, 0x33, 0x33, 0x33, 0x0, 0x26, + + /* U+ED "í" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0x0, 0xc6, + + /* U+EE "î" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x5, + 0xc, + + /* U+EF "ï" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x4, + 0xc0, + + /* U+F0 "ð" */ + 0x0, 0x3c, 0x46, 0xc2, 0x82, 0xc2, 0xc2, 0x7e, + 0x16, 0x26, 0x1c, 0x1c, 0x70, 0x0, + + /* U+F1 "ñ" */ + 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, + 0x1, 0xf1, 0x20, + + /* U+F2 "ò" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x1, 0x80, + + /* U+F3 "ó" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x80, 0x60, + + /* U+F4 "ô" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x2, 0x80, 0xc0, + + /* U+F5 "õ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x7, 0xc1, 0x20, + + /* U+F6 "ö" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x4, 0xc0, 0x0, + + /* U+F7 "÷" */ + 0x8, 0x4, 0x0, 0x0, 0x7, 0xf0, 0x0, 0x0, + 0x10, 0x0, 0x0, + + /* U+F8 "ø" */ + 0x0, 0x10, 0xf, 0x8e, 0x67, 0x12, 0x49, 0x24, + 0x8a, 0x67, 0x1f, 0x2, 0x80, 0x0, + + /* U+F9 "ù" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x0, 0x83, 0x0, + + /* U+FA "ú" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x0, 0xc0, 0xc0, + + /* U+FB "û" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x1, 0x41, 0x80, + + /* U+FC "ü" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x2, 0x60, 0x0, + + /* U+FD "ý" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x18, 0xc, + + /* U+FE "þ" */ + 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc2, + 0xc2, 0xc2, 0xc6, 0xfc, 0xd8, 0xc0, 0xc0, 0xc0, + + /* U+FF "ÿ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x26, 0x0, + + /* U+100 "Ā" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x1, 0xf0, 0x0, 0x0, + + /* U+101 "ā" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3e, 0x0, + + /* U+102 "Ă" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, + 0x1, 0xe0, 0x20, 0x0, + + /* U+103 "ă" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3c, 0x20, + + /* U+104 "Ą" */ + 0x0, 0x0, 0x18, 0x6, 0x0, 0x4c, 0xc, 0x81, + 0x98, 0x21, 0xfc, 0x31, 0x86, 0x20, 0x4c, 0x9, + 0x1, 0xa0, 0x1c, 0x3, 0x0, 0x0, + + /* U+105 "ą" */ + 0x0, 0x7, 0x4, 0x2, 0x3f, 0x67, 0x43, 0x63, + 0x3f, 0x3, 0x62, 0x3e, 0x8, + + /* U+106 "Ć" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, + 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0x60, 0xc, + + /* U+107 "ć" */ + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, + 0x3e, 0x8, 0x0, 0x18, 0xc, + + /* U+108 "Ĉ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, + 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0xa0, 0x18, + + /* U+109 "ĉ" */ + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, + 0x3e, 0x8, 0x0, 0x28, 0x18, + + /* U+10A "Ċ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, + 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0xc0, 0x0, + + /* U+10B "ċ" */ + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, + 0x3e, 0x8, 0x0, 0x18, 0x0, + + /* U+10C "Č" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, + 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0xe0, 0x6c, + + /* U+10D "č" */ + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, + 0x3e, 0x8, 0x0, 0x1c, 0x36, + + /* U+10E "Ď" */ + 0xfc, 0x63, 0x30, 0xd8, 0x2c, 0x16, 0xf, 0x7, + 0x82, 0xc3, 0x61, 0x3f, 0x0, 0x0, 0x1, 0xc1, + 0xb0, + + /* U+10F "ď" */ + 0x0, 0x7, 0xe1, 0x8c, 0x31, 0x84, 0x30, 0x86, + 0x10, 0xc3, 0x18, 0x3f, 0x3, 0x60, 0xd, 0x1, + 0xa0, 0x36, + + /* U+110 "Đ" */ + 0x3e, 0x8, 0xc2, 0x18, 0x83, 0x20, 0xfe, 0x36, + 0xc, 0x83, 0x20, 0x88, 0x63, 0xf0, 0x0, + + /* U+111 "đ" */ + 0x0, 0xf, 0xc6, 0x31, 0x8c, 0x43, 0x10, 0xc4, + 0x31, 0x8c, 0x3f, 0x6, 0xc0, 0x30, 0x3e, 0x3, + 0x0, + + /* U+112 "Ē" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x7c, 0x0, + + /* U+113 "ē" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x3e, 0x0, + + /* U+114 "Ĕ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x78, 0x40, + + /* U+115 "ĕ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x3c, 0x20, + + /* U+116 "Ė" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0x0, + + /* U+117 "ė" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x18, 0x0, + + /* U+118 "Ę" */ + 0x0, 0x6, 0x4, 0x4, 0xff, 0xc0, 0xc0, 0xc0, + 0xc0, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, + + /* U+119 "ę" */ + 0x0, 0xc, 0x8, 0xc, 0x3e, 0x63, 0x60, 0x40, + 0x7f, 0x43, 0x63, 0x3e, 0x8, + + /* U+11A "Ě" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x38, 0x6c, + + /* U+11B "ě" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x1c, 0x36, + + /* U+11C "Ĝ" */ + 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, + 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0xa0, 0x18, + + /* U+11D "ĝ" */ + 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, + 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x14, 0xc, + + /* U+11E "Ğ" */ + 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, + 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, + 0x0, 0x1, 0xe0, 0x40, + + /* U+11F "ğ" */ + 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, + 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x3c, 0x20, + + /* U+120 "Ġ" */ + 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, + 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, + 0x0, 0x0, 0xc0, 0x0, + + /* U+121 "ġ" */ + 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, + 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x18, 0x0, + + /* U+122 "Ģ" */ + 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x7, 0xe3, + 0xc, 0x83, 0x60, 0xd8, 0xf4, 0x39, 0x80, 0x60, + 0x18, 0x33, 0x18, 0x7c, 0x4, 0x0, + + /* U+123 "ģ" */ + 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, + 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x18, 0x18, + 0x8, 0x0, + + /* U+124 "Ĥ" */ + 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, + 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, 0x0, + 0x5, 0x0, 0xc0, + + /* U+125 "ĥ" */ + 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0xd9, + 0x83, 0x6, 0x0, 0xa, 0xc, 0x0, + + /* U+126 "Ħ" */ + 0x60, 0x46, 0x4, 0x60, 0x46, 0x4, 0x60, 0x47, + 0xfc, 0x60, 0xc6, 0x4, 0xff, 0xe6, 0xc, 0x60, + 0x40, 0x0, + + /* U+127 "ħ" */ + 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, 0x7e, + 0x64, 0x60, 0xf8, 0x60, + + /* U+128 "Ĩ" */ + 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, + 0x30, 0x60, 0x0, 0xf, 0x89, 0x0, + + /* U+129 "ĩ" */ + 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x0, + 0x1, 0xf1, 0x20, + + /* U+12A "Ī" */ + 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, + 0x30, 0x60, 0x0, 0xf, 0x80, 0x0, + + /* U+12B "ī" */ + 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x0, + 0x1, 0xf0, 0x0, + + /* U+12C "Ĭ" */ + 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x0, + 0x7a, 0x0, + + /* U+12D "ĭ" */ + 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x0, 0x3d, 0x0, + + /* U+12E "Į" */ + 0x1e, 0x26, 0xdb, 0x6d, 0xb6, 0xd8, + + /* U+12F "į" */ + 0x7, 0x42, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, + + /* U+130 "İ" */ + 0xff, 0xff, 0xfc, 0x30, + + /* U+131 "ı" */ + 0xff, 0xff, 0x0, + + /* U+132 "IJ" */ + 0x0, 0x18, 0xf3, 0x33, 0x64, 0x2c, 0x7, 0x80, + 0xf0, 0x1e, 0x3, 0xc0, 0x78, 0xf, 0x1, 0xe0, + 0x30, 0x0, + + /* U+133 "ij" */ + 0x0, 0x60, 0xc3, 0xcf, 0x3c, 0xf3, 0xcf, 0x3c, + 0xf3, 0x0, 0xc, 0xc0, + + /* U+134 "Ĵ" */ + 0x0, 0xf, 0x6, 0x61, 0x8, 0x3, 0x0, 0xc0, + 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x0, + 0x1, 0x40, 0x30, + + /* U+135 "ĵ" */ + 0x1, 0x83, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, + 0xc, 0x0, 0x5, 0xc, + + /* U+136 "Ķ" */ + 0x0, 0x8, 0x6, 0x3, 0xc, 0x1e, 0x1b, 0x19, + 0x88, 0xcc, 0x7c, 0x34, 0x1b, 0xc, 0xc6, 0x33, + 0xc, 0x0, + + /* U+137 "ķ" */ + 0x0, 0x20, 0x30, 0x30, 0xc6, 0xcc, 0xc8, 0xd0, + 0xf0, 0xf0, 0xd8, 0xcc, 0xc0, 0xc0, 0xc0, 0xc0, + + /* U+138 "ĸ" */ + 0xc6, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc4, + 0x0, + + /* U+139 "Ĺ" */ + 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0x80, 0xc0, 0x60, + + /* U+13A "ĺ" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc, 0x60, + + /* U+13B "Ļ" */ + 0x0, 0x10, 0x18, 0x18, 0x0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x0, + + /* U+13C "ļ" */ + 0x9, 0xb0, 0xdb, 0x6d, 0xb6, 0xdb, 0x60, + + /* U+13D "Ľ" */ + 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc8, 0xc8, 0xcc, 0x0, + + /* U+13E "ľ" */ + 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xc6, 0xb5, 0xb0, + + /* U+13F "Ŀ" */ + 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, 0xc0, + 0xc0, 0xc0, 0xc0, 0x0, + + /* U+140 "ŀ" */ + 0xcc, 0xcc, 0xcf, 0xcc, 0xcc, 0xcc, + + /* U+141 "Ł" */ + 0x7f, 0x30, 0x18, 0xc, 0x6, 0x7, 0x1, 0xe0, + 0xc0, 0x60, 0x30, 0x18, 0x0, 0x0, + + /* U+142 "ł" */ + 0x63, 0x18, 0xc6, 0x71, 0xcc, 0x63, 0x18, 0xc0, + + /* U+143 "Ń" */ + 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, + 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0xc, + 0x1, 0x80, + + /* U+144 "ń" */ + 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, + 0x0, 0x60, 0x60, + + /* U+145 "Ņ" */ + 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x30, 0x6c, + 0x1b, 0xe, 0xc6, 0xb1, 0x2c, 0xcb, 0x62, 0xd0, + 0xbc, 0x2e, 0xb, 0x2, 0x0, 0x0, + + /* U+146 "ņ" */ + 0x0, 0x40, 0xc1, 0x80, 0x18, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1e, 0x3f, 0xc3, 0x0, + + /* U+147 "Ň" */ + 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, + 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0x1c, + 0xd, 0x80, + + /* U+148 "ň" */ + 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, + 0x0, 0xe3, 0x60, + + /* U+149 "ʼn" */ + 0x31, 0x98, 0xcc, 0x66, 0x33, 0x19, 0x8c, 0xc6, + 0x7e, 0x6, 0x20, 0x10, 0xc, 0x0, + + /* U+14A "Ŋ" */ + 0x0, 0x1, 0x80, 0x60, 0x3c, 0x1e, 0x1f, 0xf, + 0x8f, 0xc5, 0xe6, 0xf6, 0x7a, 0x3f, 0x1f, 0xf, + 0x6, 0x0, + + /* U+14B "ŋ" */ + 0x0, 0x18, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1f, 0xe1, 0x80, + + /* U+14C "Ō" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0x0, 0x7, 0xc0, 0x0, + + /* U+14D "ō" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x7, 0xc0, 0x0, + + /* U+14E "Ŏ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0xe0, 0x3c, 0x4, 0x0, + + /* U+14F "ŏ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x7, 0x82, 0x0, + + /* U+150 "Ő" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0xe0, 0x1a, 0x1, 0x60, + + /* U+151 "ő" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x3, 0x40, 0xb0, + + /* U+152 "Œ" */ + 0x0, 0x0, 0x3f, 0xf8, 0xc6, 0x3, 0x8, 0x4, + 0x10, 0x8, 0x20, 0x10, 0x7e, 0x20, 0xc0, 0x41, + 0x0, 0xc2, 0x0, 0x84, 0x1, 0xff, 0xe0, 0x40, + 0x0, + + /* U+153 "œ" */ + 0x0, 0x0, 0xf9, 0xe6, 0x38, 0x18, 0x60, 0x41, + 0x81, 0x7, 0xf4, 0x18, 0xd8, 0xe3, 0x3e, 0xf8, + 0x20, 0x80, + + /* U+154 "Ŕ" */ + 0xc1, 0x61, 0xb0, 0x98, 0xcc, 0xc7, 0xf3, 0xd, + 0x86, 0xc3, 0x61, 0xbf, 0x82, 0x1, 0x80, 0x60, + + /* U+155 "ŕ" */ + 0xc6, 0x31, 0x8c, 0x63, 0x1e, 0x10, 0x18, 0x60, + + /* U+156 "Ŗ" */ + 0x0, 0x8, 0x6, 0x3, 0x0, 0x6, 0xb, 0xd, + 0x84, 0xc6, 0x66, 0x3f, 0x98, 0x6c, 0x36, 0x1b, + 0xd, 0xfc, 0x0, 0x0, + + /* U+157 "ŗ" */ + 0x1, 0x6, 0x18, 0x1, 0x86, 0x18, 0x61, 0x86, + 0x18, 0x78, 0x20, + + /* U+158 "Ř" */ + 0xc1, 0x61, 0xb0, 0x98, 0xcc, 0xc7, 0xf3, 0xd, + 0x86, 0xc3, 0x61, 0xbf, 0x82, 0x3, 0x83, 0x60, + + /* U+159 "ř" */ + 0xc6, 0x31, 0x8c, 0x63, 0x1e, 0x10, 0x1d, 0xb0, + + /* U+15A "Ś" */ + 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, + 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0xc0, 0x60, + 0x18, + + /* U+15B "ś" */ + 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, + 0x3e, 0x18, 0x0, 0xc, 0x6, + + /* U+15C "Ŝ" */ + 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, + 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x40, 0xa0, + 0x30, + + /* U+15D "ŝ" */ + 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, + 0x3e, 0x18, 0x0, 0x14, 0xc, + + /* U+15E "Ş" */ + 0x0, 0x6, 0x1, 0x1, 0x83, 0xe3, 0x9, 0x6, + 0x3, 0x3, 0x7, 0xe, 0xc, 0x6, 0x1b, 0x8, + 0xfc, 0x0, + + /* U+15F "ş" */ + 0x0, 0xc, 0x4, 0xc, 0x3c, 0x62, 0x42, 0x6, + 0x3c, 0x60, 0x62, 0x3e, 0x18, + + /* U+160 "Š" */ + 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, + 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x80, 0xe0, + 0xd8, + + /* U+161 "š" */ + 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, + 0x3e, 0x18, 0x0, 0x1c, 0x36, + + /* U+162 "Ţ" */ + 0x0, 0x3, 0x0, 0x40, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, + 0x3, 0xf, 0xf8, 0x0, + + /* U+163 "ţ" */ + 0x0, 0x60, 0x86, 0x38, 0x82, 0x8, 0x20, 0x82, + 0x3c, 0x70, 0x82, 0x0, + + /* U+164 "Ť" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x20, 0x1c, + 0xd, 0x80, + + /* U+165 "ť" */ + 0x0, 0x70, 0x81, 0x2, 0x4, 0x8, 0x10, 0xf0, + 0xe0, 0x81, 0x20, 0x40, 0xc0, + + /* U+166 "Ŧ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x1, + 0xe0, 0x78, 0xc, 0x3, 0xf, 0xf8, 0x0, + + /* U+167 "ŧ" */ + 0x0, 0x71, 0x4, 0x10, 0xc7, 0xc4, 0x78, 0xe1, + 0x4, + + /* U+168 "Ũ" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xf0, + 0x48, + + /* U+169 "ũ" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x3, 0xe2, 0x40, + + /* U+16A "Ū" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xf0, + 0x0, + + /* U+16B "ū" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x3, 0xe0, 0x0, + + /* U+16C "Ŭ" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xe0, + 0x80, + + /* U+16D "ŭ" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x3, 0xc4, 0x0, + + /* U+16E "Ů" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x40, + 0x50, 0x28, 0x8, 0x0, + + /* U+16F "ů" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x41, 0x42, 0x82, 0x0, + + /* U+170 "Ű" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xd0, + 0x2c, + + /* U+171 "ű" */ + 0x0, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, + 0xc6, 0x0, 0x0, 0x34, 0x16, + + /* U+172 "Ų" */ + 0xc, 0x4, 0x2, 0x7, 0xc6, 0x36, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x8, + 0x0, + + /* U+173 "ų" */ + 0x0, 0x1c, 0x20, 0x27, 0xf8, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1e, 0x30, 0x0, + + /* U+174 "Ŵ" */ + 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, + 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, + 0xc, 0x24, 0x30, 0xc0, 0x0, 0x2, 0x80, 0x6, + 0x0, + + /* U+175 "ŵ" */ + 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, + 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0xa, + 0x0, 0x60, + + /* U+176 "Ŷ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x14, + 0x3, 0x0, + + /* U+177 "ŷ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x28, 0x18, + + /* U+178 "Ÿ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x13, + 0x0, 0x0, + + /* U+179 "Ź" */ + 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, + 0xc, 0x2, 0x1, 0x9f, 0xe1, 0x0, 0xc0, 0x30, + + /* U+17A "ź" */ + 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, + 0x0, 0x0, 0x18, 0xc, + + /* U+17B "Ż" */ + 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, + 0xc, 0x2, 0x1, 0x9f, 0xe0, 0x0, 0xc0, 0x0, + + /* U+17C "ż" */ + 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, + 0x0, 0x0, 0x18, 0x0, + + /* U+17D "Ž" */ + 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, + 0xc, 0x2, 0x1, 0x9f, 0xe1, 0x1, 0xc1, 0xb0, + + /* U+17E "ž" */ + 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, + 0x0, 0x0, 0x1c, 0x36, + + /* U+17F "ſ" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc7, 0x0, + + /* U+192 "ƒ" */ + 0x0, 0xe0, 0x40, 0x81, 0x2, 0x4, 0x8, 0x10, + 0x20, 0x41, 0xe3, 0x82, 0x6, 0x6, 0x0, + + /* U+1A0 "Ơ" */ + 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, + 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, + 0xc1, 0xf6, 0x4, 0x20, 0x0, + + /* U+1A1 "ơ" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, + + /* U+1AF "Ư" */ + 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, + 0xcc, 0x12, 0x0, 0x20, + + /* U+1B0 "ư" */ + 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, + + /* U+1F0 "ǰ" */ + 0x1, 0x83, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, + 0xc, 0x0, 0x3, 0x9b, + + /* U+1FA "Ǻ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x5, + 0x0, 0x60, 0x0, 0x0, 0x80, + + /* U+1FB "ǻ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x1c, 0x14, 0xc, 0x0, 0x4, + + /* U+1FC "Ǽ" */ + 0x60, 0x7f, 0x30, 0x40, 0x30, 0x40, 0x1f, 0xc0, + 0x8, 0x40, 0xc, 0x7c, 0x4, 0x7c, 0x6, 0xc0, + 0x3, 0xc0, 0x1, 0xc0, 0x1, 0xfe, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xc0, 0x0, 0x60, + + /* U+1FD "ǽ" */ + 0x0, 0x3, 0xe7, 0x91, 0xc0, 0x86, 0x6, 0x20, + 0x1f, 0xfc, 0x8, 0x68, 0x63, 0x7f, 0xf0, 0xc2, + 0x0, 0x0, 0x6, 0x0, 0x18, 0x0, + + /* U+1FE "Ǿ" */ + 0x0, 0x7, 0xe0, 0xc6, 0x38, 0x66, 0x8c, 0xc9, + 0x91, 0x12, 0x12, 0x63, 0xcc, 0x38, 0xc6, 0xf, + 0xc0, 0x44, 0x0, 0x1, 0x80, 0x18, + + /* U+1FF "ǿ" */ + 0x0, 0x10, 0xf, 0x8e, 0x67, 0x12, 0x49, 0x24, + 0x8a, 0x67, 0x1f, 0x2, 0x80, 0x1, 0x80, 0x60, + + /* U+218 "Ș" */ + 0x0, 0x4, 0x3, 0x1, 0x80, 0x1, 0xf1, 0x84, + 0x83, 0x1, 0x81, 0x83, 0x87, 0x6, 0x3, 0xd, + 0x84, 0x7e, 0x0, 0x0, + + /* U+219 "ș" */ + 0x0, 0x10, 0x18, 0x18, 0x0, 0x3c, 0x62, 0x42, + 0x6, 0x3c, 0x60, 0x62, 0x3e, 0x18, + + /* U+21A "Ț" */ + 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, + 0x3, 0x0, 0xc3, 0xfe, 0x0, 0x0, + + /* U+21B "ț" */ + 0x0, 0x86, 0x30, 0x1c, 0x84, 0x21, 0x8, 0x4f, + 0x38, 0x84, + + /* U+237 "ȷ" */ + 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, + + /* U+259 "ə" */ + 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, + 0x7e, 0x18, + + /* U+2BC "ʼ" */ + 0x9, 0x30, + + /* U+2C6 "ˆ" */ + 0x1, 0x43, 0x0, + + /* U+2C7 "ˇ" */ + 0x3, 0xb6, + + /* U+2C9 "ˉ" */ + 0x7c, 0x0, + + /* U+2D8 "˘" */ + 0x7, 0xa0, + + /* U+2D9 "˙" */ + 0x30, + + /* U+2DA "˚" */ + 0x22, 0x94, 0x40, + + /* U+2DB "˛" */ + 0x6, 0xc4, 0x0, + + /* U+2DC "˜" */ + 0x0, 0xf8, 0x90, + + /* U+2DD "˝" */ + 0x0, 0xd0, 0xb0, + + /* U+2F3 "˳" */ + 0x1a, 0x80, + + /* U+300 "̀" */ + 0x9, 0x0, + + /* U+301 "́" */ + 0x11, 0x0, + + /* U+303 "̃" */ + 0x0, 0xf8, 0x90, + + /* U+309 "̉" */ + 0x6, 0x24, + + /* U+30F "̏" */ + 0x0, 0xb5, 0x80, + + /* U+323 "̣" */ + 0x48, + + /* U+384 "΄" */ + 0x9, 0x20, + + /* U+385 "΅" */ + 0x0, 0x46, 0x18, 0x8, 0x0, + + /* U+386 "Ά" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0xb0, 0x10, + 0x2, 0x0, + + /* U+387 "·" */ + 0x30, + + /* U+388 "Έ" */ + 0x1f, 0xe3, 0x0, 0x60, 0xc, 0x1, 0x80, 0x3f, + 0x86, 0x0, 0xc0, 0x18, 0x3, 0x1, 0x7f, 0x20, + 0x4, 0x0, + + /* U+389 "Ή" */ + 0x30, 0x23, 0x2, 0x30, 0x23, 0x2, 0x30, 0x23, + 0xfe, 0x30, 0x63, 0x2, 0x30, 0x23, 0x2, 0x70, + 0x24, 0x0, 0x40, 0x0, + + /* U+38A "Ί" */ + 0x33, 0x33, 0x33, 0x33, 0x33, 0x74, 0x40, + + /* U+38C "Ό" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0x2f, + 0x84, 0x40, 0x80, 0x0, + + /* U+38E "Ύ" */ + 0x3, 0x0, 0x30, 0x3, 0x0, 0x30, 0x3, 0x0, + 0x70, 0x5, 0x80, 0xc8, 0x8, 0xc1, 0x84, 0x50, + 0x64, 0x0, 0x40, 0x0, + + /* U+38F "Ώ" */ + 0x7b, 0xcc, 0xc2, 0x19, 0x82, 0x60, 0x90, 0x34, + 0xd, 0x83, 0x60, 0x88, 0x67, 0xf1, 0x10, 0x40, + 0x0, + + /* U+390 "ΐ" */ + 0x0, 0xe, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, + 0x8, 0x0, 0x0, 0x46, 0x18, 0x8, 0x0, + + /* U+391 "Α" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, + + /* U+392 "Β" */ + 0xfc, 0x63, 0xb0, 0xd8, 0x2c, 0x37, 0xf3, 0xf9, + 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, + + /* U+393 "Γ" */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, + + /* U+394 "Δ" */ + 0xff, 0xec, 0x9, 0x83, 0x10, 0x63, 0x8, 0x23, + 0x4, 0x40, 0xd8, 0xb, 0x1, 0xc0, 0x18, 0x0, + 0x0, + + /* U+395 "Ε" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, + + /* U+396 "Ζ" */ + 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, + 0xc, 0x2, 0x1, 0x9f, 0xe0, 0x0, + + /* U+397 "Η" */ + 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, + 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, + + /* U+398 "Θ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x34, + 0xed, 0x3, 0x40, 0xd8, 0x32, 0x18, 0x7c, 0x4, + 0x0, + + /* U+399 "Ι" */ + 0xff, 0xff, 0xfc, + + /* U+39A "Κ" */ + 0xc1, 0xe1, 0xb1, 0x98, 0x8c, 0xc7, 0xc3, 0x41, + 0xb0, 0xcc, 0x63, 0x30, 0xc0, 0x0, + + /* U+39B "Λ" */ + 0x40, 0xcc, 0x11, 0x82, 0x10, 0xc3, 0x10, 0x66, + 0x4, 0xc0, 0xd0, 0x1e, 0x1, 0xc0, 0x30, 0x0, + 0x0, + + /* U+39C "Μ" */ + 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, + 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, + 0x70, 0x0, + + /* U+39D "Ν" */ + 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, + 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, + + /* U+39E "Ξ" */ + 0x7f, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf0, 0xf8, + 0x0, 0x0, 0x0, 0x1f, 0xc0, 0x0, + + /* U+39F "Ο" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, + + /* U+3A0 "Π" */ + 0xc1, 0xb0, 0x6c, 0x1b, 0x6, 0xc1, 0xb0, 0x6c, + 0x1b, 0x6, 0xc1, 0xb0, 0x6f, 0xf8, 0x0, + + /* U+3A1 "Ρ" */ + 0xc0, 0x60, 0x30, 0x18, 0xf, 0x87, 0xfb, 0xd, + 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, + + /* U+3A3 "Σ" */ + 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x60, 0x20, + 0x30, 0x30, 0x30, 0x1f, 0xc0, 0x0, + + /* U+3A4 "Τ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x0, + + /* U+3A5 "Υ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, + + /* U+3A6 "Φ" */ + 0x6, 0x1, 0xe0, 0xff, 0x33, 0x24, 0x66, 0x8c, + 0xd1, 0x9b, 0x33, 0x36, 0xc3, 0xe0, 0x18, 0x0, + 0x0, + + /* U+3A7 "Χ" */ + 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x3, 0x0, + 0xc0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, + + /* U+3A8 "Ψ" */ + 0x4, 0x0, 0x80, 0x10, 0xf, 0x83, 0x58, 0xc9, + 0x91, 0x12, 0x22, 0x44, 0x48, 0x89, 0x11, 0x0, + 0x0, + + /* U+3A9 "Ω" */ + 0x7b, 0xcc, 0xc2, 0x19, 0x82, 0x60, 0x90, 0x34, + 0xd, 0x83, 0x60, 0x88, 0x63, 0xf0, 0x10, + + /* U+3AA "Ϊ" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, + 0x0, 0x1, 0x30, 0x0, + + /* U+3AB "Ϋ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x13, + 0x0, 0x0, + + /* U+3AC "ά" */ + 0x0, 0x1e, 0xd8, 0xc8, 0x64, 0x32, 0x19, 0xc, + 0xc6, 0x3f, 0xc, 0x0, 0x0, 0x80, 0x40, 0x20, + + /* U+3AD "έ" */ + 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, + 0x7e, 0x18, 0x0, 0x8, 0x8, 0x8, + + /* U+3AE "ή" */ + 0x0, 0xc, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1f, 0xe1, 0x80, 0x2, 0x4, 0x8, + + /* U+3AF "ί" */ + 0x7, 0x44, 0x44, 0x44, 0x40, 0x4, 0x44, + + /* U+3B0 "ΰ" */ + 0x0, 0x3c, 0x26, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x62, 0x0, 0x0, 0x46, 0x18, 0x8, 0x0, + + /* U+3B1 "α" */ + 0x0, 0x1e, 0xd8, 0xc8, 0x64, 0x32, 0x19, 0xc, + 0xc6, 0x3f, 0xc, 0x0, + + /* U+3B2 "β" */ + 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc3, 0xc2, + 0xce, 0xdc, 0xc6, 0xc2, 0x46, 0x7c, 0x0, + + /* U+3B3 "γ" */ + 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x34, + 0x24, 0x66, 0x62, 0x42, 0x0, + + /* U+3B4 "δ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0x46, 0x1e, 0x1c, 0x8, 0x4, 0x1, 0xe0, 0x0, + + /* U+3B5 "ε" */ + 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, + 0x7e, 0x18, + + /* U+3B6 "ζ" */ + 0x4, 0x2, 0x6, 0x1e, 0x30, 0x20, 0x20, 0x20, + 0x30, 0x10, 0x18, 0xc, 0x6, 0x7e, 0x0, + + /* U+3B7 "η" */ + 0x0, 0xc, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1f, 0xe1, 0x80, + + /* U+3B8 "θ" */ + 0x0, 0xf, 0x8, 0x8c, 0x66, 0x12, 0x9, 0xfc, + 0xc6, 0x41, 0x31, 0x88, 0xc7, 0xc0, 0x80, + + /* U+3B9 "ι" */ + 0x7, 0x44, 0x44, 0x44, 0x40, + + /* U+3BA "κ" */ + 0xc6, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc4, + 0x0, + + /* U+3BB "λ" */ + 0x0, 0x61, 0x90, 0xcc, 0x42, 0x61, 0xa0, 0xf0, + 0x38, 0x18, 0xc, 0x4, 0x6, 0x6, 0x0, + + /* U+3BC "μ" */ + 0x1, 0x83, 0x6, 0xf, 0xf8, 0xf1, 0xe3, 0xc7, + 0x8f, 0x1e, 0x30, 0x0, + + /* U+3BD "ν" */ + 0x18, 0x18, 0x38, 0x2c, 0x24, 0x64, 0x46, 0x42, + 0x0, + + /* U+3BE "ξ" */ + 0x0, 0x4, 0x2, 0x2, 0x1c, 0x60, 0x60, 0x40, + 0x40, 0x20, 0x1c, 0x30, 0x60, 0x60, 0x3e, 0x4, + + /* U+3BF "ο" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, + + /* U+3C0 "π" */ + 0x0, 0x8, 0x62, 0x30, 0x8c, 0x23, 0x8, 0xc2, + 0x30, 0x8c, 0x7f, 0x80, 0x0, + + /* U+3C1 "ρ" */ + 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc2, + 0xc2, 0xc2, 0x46, 0x7c, 0x10, + + /* U+3C2 "ς" */ + 0x4, 0x2, 0x2, 0x1e, 0x30, 0x60, 0x40, 0x40, + 0x40, 0x63, 0x3e, 0x8, + + /* U+3C3 "σ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc4, 0x3f, 0x80, 0x0, + + /* U+3C4 "τ" */ + 0x0, 0xe, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x7f, 0x0, + + /* U+3C5 "υ" */ + 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, + 0x0, + + /* U+3C6 "φ" */ + 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x69, + 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x93, 0x13, + 0xc0, 0x0, + + /* U+3C7 "χ" */ + 0x42, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x24, 0x66, + 0x0, + + /* U+3C8 "ψ" */ + 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x6b, + 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x11, 0x22, + 0x60, 0x0, + + /* U+3C9 "ω" */ + 0x0, 0x1, 0xef, 0x9, 0xcc, 0xc4, 0x64, 0x21, + 0x21, 0x9, 0x88, 0x4c, 0x6, 0x20, 0x30, 0x0, + 0x0, + + /* U+3CA "ϊ" */ + 0x0, 0x71, 0x4, 0x10, 0x41, 0x4, 0x10, 0x0, + 0x13, 0x0, + + /* U+3CB "ϋ" */ + 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, + 0x0, 0x2, 0x60, 0x0, + + /* U+3CC "ό" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x0, 0x80, 0x40, 0x20, + + /* U+3CD "ύ" */ + 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, + 0x0, 0x0, 0x81, 0x2, 0x0, + + /* U+3CE "ώ" */ + 0x0, 0x1, 0xef, 0x9, 0xcc, 0xc4, 0x64, 0x21, + 0x21, 0x9, 0x88, 0x4c, 0x6, 0x20, 0x30, 0x0, + 0x0, 0x0, 0x2, 0x0, 0x10, 0x0, 0x80, + + /* U+3D1 "ϑ" */ + 0x0, 0x1e, 0x18, 0x8c, 0x64, 0x32, 0x19, 0x3e, + 0x36, 0x13, 0x9, 0x84, 0xc3, 0xc0, 0x0, + + /* U+3D2 "ϒ" */ + 0x4, 0x1, 0x0, 0x40, 0x10, 0xc, 0x3, 0x80, + 0xe0, 0x68, 0x13, 0xc, 0x46, 0x1c, 0x0, + + /* U+3D6 "ϖ" */ + 0x0, 0x1, 0xce, 0x9, 0xd8, 0xcc, 0x44, 0x23, + 0x21, 0x19, 0x88, 0xcc, 0x4, 0x7f, 0xf0, 0x0, + 0x0, + + /* U+400 "Ѐ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x10, 0x30, + + /* U+401 "Ё" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x26, 0x0, + + /* U+402 "Ђ" */ + 0x0, 0x0, 0x9c, 0x8, 0x60, 0x82, 0x8, 0x20, + 0x82, 0xc, 0xe0, 0xf8, 0x8, 0x0, 0x80, 0x8, + 0xf, 0xf8, 0x0, 0x0, + + /* U+403 "Ѓ" */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0xc, + + /* U+404 "Є" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x7, + 0xe1, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, + 0x0, + + /* U+405 "Ѕ" */ + 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, + 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x0, + + /* U+406 "І" */ + 0xff, 0xff, 0xfc, + + /* U+407 "Ї" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, + 0x0, 0x1, 0x30, 0x0, + + /* U+408 "Ј" */ + 0x0, 0x3c, 0x66, 0x42, 0x3, 0x3, 0x3, 0x3, + 0x3, 0x3, 0x3, 0x3, 0x0, + + /* U+409 "Љ" */ + 0xe0, 0xfe, 0x18, 0x61, 0x8c, 0x30, 0x42, 0x18, + 0x21, 0xc, 0x10, 0x86, 0x18, 0x43, 0xf8, 0x21, + 0x80, 0x10, 0xc0, 0x8, 0x60, 0x7, 0xf0, 0x0, + 0x0, 0x0, + + /* U+40A "Њ" */ + 0xc1, 0xfc, 0xc1, 0x86, 0xc1, 0x82, 0xc1, 0x83, + 0xc1, 0x82, 0xff, 0xfe, 0xc1, 0xf8, 0xc1, 0x80, + 0xc1, 0x80, 0xc1, 0x80, 0xc1, 0x80, 0x0, 0x0, + + /* U+40B "Ћ" */ + 0x8, 0x30, 0x83, 0x8, 0x30, 0x83, 0x8, 0x30, + 0xc6, 0xf, 0xc0, 0x80, 0x8, 0x0, 0x80, 0x7f, + 0x80, 0x0, + + /* U+40C "Ќ" */ + 0xc1, 0xe1, 0xb1, 0x98, 0x8c, 0xc7, 0xc3, 0x41, + 0xb0, 0xcc, 0x63, 0x30, 0xc0, 0x1, 0x80, 0x60, + + /* U+40D "Ѝ" */ + 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, + 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, 0x0, 0x40, + 0x60, + + /* U+40E "Ў" */ + 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, + 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, + 0x0, 0x1, 0xe0, 0x40, + + /* U+40F "Џ" */ + 0x8, 0x6, 0x3, 0x1f, 0xfc, 0x1e, 0xf, 0x7, + 0x83, 0xc1, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0xc, + 0x0, + + /* U+410 "А" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, + + /* U+411 "Б" */ + 0xfe, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x7b, 0xf1, + 0x80, 0xc0, 0x60, 0x3f, 0x80, 0x0, + + /* U+412 "В" */ + 0xfc, 0x63, 0xb0, 0xd8, 0x2c, 0x37, 0xf3, 0xf9, + 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, + + /* U+413 "Г" */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, + + /* U+414 "Д" */ + 0x40, 0x2c, 0x3, 0xc0, 0x3f, 0xff, 0x60, 0xc3, + 0x4, 0x10, 0x41, 0x4, 0x10, 0x41, 0x84, 0x18, + 0x41, 0x84, 0x18, 0x41, 0xfc, 0x0, 0x0, + + /* U+415 "Е" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, + + /* U+416 "Ж" */ + 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, + 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, + 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, + + /* U+417 "З" */ + 0x0, 0x1f, 0x18, 0xc8, 0x30, 0x18, 0x8, 0x38, + 0xe, 0x1, 0x20, 0xd8, 0x47, 0xe0, 0x0, + + /* U+418 "И" */ + 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, + 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, + + /* U+419 "Й" */ + 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, + 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, 0x1, 0xe0, + 0x80, + + /* U+41A "К" */ + 0xc1, 0xb0, 0xcc, 0x63, 0x10, 0xcc, 0x3e, 0xd, + 0x83, 0x30, 0xc6, 0x30, 0x8c, 0x30, 0x0, + + /* U+41B "Л" */ + 0xc0, 0xd8, 0x33, 0xc, 0xc3, 0x10, 0xc4, 0x31, + 0xc, 0x43, 0x10, 0xc4, 0x31, 0xfc, 0x0, + + /* U+41C "М" */ + 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, + 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, + 0x70, 0x0, + + /* U+41D "Н" */ + 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, + 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, + + /* U+41E "О" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, + + /* U+41F "П" */ + 0xc1, 0xb0, 0x6c, 0x1b, 0x6, 0xc1, 0xb0, 0x6c, + 0x1b, 0x6, 0xc1, 0xb0, 0x6f, 0xf8, 0x0, + + /* U+420 "Р" */ + 0xc0, 0x60, 0x30, 0x18, 0xf, 0x87, 0xfb, 0xd, + 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, + + /* U+421 "С" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, + 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, + 0x0, + + /* U+422 "Т" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x0, + + /* U+423 "У" */ + 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, + 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, + 0x0, + + /* U+424 "Ф" */ + 0x0, 0x0, 0x60, 0x1f, 0x83, 0x6e, 0x66, 0x24, + 0x63, 0x46, 0x34, 0x63, 0x66, 0x22, 0x66, 0x1f, + 0xc0, 0x60, 0x2, 0x0, + + /* U+425 "Х" */ + 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x3, 0x0, + 0xc0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, + + /* U+426 "Ц" */ + 0x0, 0x40, 0x8, 0x1, 0x7f, 0xec, 0x19, 0x83, + 0x30, 0x66, 0xc, 0xc1, 0x98, 0x33, 0x6, 0x60, + 0xcc, 0x19, 0x83, 0x0, 0x0, + + /* U+427 "Ч" */ + 0x1, 0x80, 0xc0, 0x60, 0x31, 0xdb, 0xff, 0x7, + 0x83, 0xc1, 0xe0, 0xf0, 0x60, 0x0, + + /* U+428 "Ш" */ + 0xff, 0xfe, 0x10, 0xf0, 0x87, 0x84, 0x3c, 0x21, + 0xe1, 0xf, 0x8, 0x78, 0x43, 0xc2, 0x1e, 0x10, + 0xf0, 0x86, 0x0, 0x0, + + /* U+429 "Щ" */ + 0x0, 0x4, 0x0, 0x30, 0x0, 0xff, 0xff, 0xc2, + 0x1b, 0x8, 0x6c, 0x21, 0xb0, 0x86, 0xc2, 0x1b, + 0x8, 0x6c, 0x21, 0xb0, 0x86, 0xc2, 0x1b, 0x8, + 0x60, 0x0, 0x0, + + /* U+42A "Ъ" */ + 0x1f, 0xc1, 0x86, 0x18, 0x21, 0x82, 0x18, 0x21, + 0x8e, 0x1f, 0x81, 0x80, 0x18, 0x1, 0x80, 0xf8, + 0x0, 0x0, + + /* U+42B "Ы" */ + 0xfe, 0x2c, 0x32, 0xc1, 0x2c, 0x12, 0xc1, 0x2c, + 0x72, 0xfc, 0x2c, 0x2, 0xc0, 0x2c, 0x2, 0xc0, + 0x20, 0x0, + + /* U+42C "Ь" */ + 0xfe, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x7b, 0xf1, + 0x80, 0xc0, 0x60, 0x30, 0x0, 0x0, + + /* U+42D "Э" */ + 0x0, 0x1f, 0x18, 0xd8, 0x20, 0x18, 0xc, 0x7e, + 0x3, 0x1, 0xe0, 0xd0, 0xcf, 0xc0, 0x80, + + /* U+42E "Ю" */ + 0x0, 0x6, 0x1e, 0x31, 0x8d, 0x98, 0x2c, 0x81, + 0x64, 0xf, 0xe0, 0x79, 0x3, 0xc8, 0x1e, 0x60, + 0xb3, 0xd, 0x8f, 0xc0, 0x0, 0x0, + + /* U+42F "Я" */ + 0x61, 0x90, 0xcc, 0x62, 0x31, 0xf9, 0xfd, 0x86, + 0xc3, 0x61, 0xb0, 0xcf, 0xe0, 0x0, + + /* U+430 "а" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, + + /* U+431 "б" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x84, + 0xe6, 0x5e, 0x10, 0xe, 0x1, 0xc0, 0x30, 0x0, + + /* U+432 "в" */ + 0xfc, 0xc6, 0xc2, 0xc6, 0xfc, 0xc6, 0xc6, 0xfc, + 0x0, + + /* U+433 "г" */ + 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0x0, + + /* U+434 "д" */ + 0x0, 0x30, 0x2c, 0xb, 0xfe, 0x63, 0x8, 0x43, + 0x10, 0xc4, 0x11, 0x4, 0x41, 0xf0, 0x0, + + /* U+435 "е" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, + + /* U+436 "ж" */ + 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1f, 0x83, + 0x6c, 0x26, 0x46, 0x66, 0x0, 0x0, + + /* U+437 "з" */ + 0x0, 0x3c, 0x66, 0x42, 0x6, 0x1c, 0x6, 0x42, + 0x7e, 0x18, + + /* U+438 "и" */ + 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, + 0x0, + + /* U+439 "й" */ + 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, + 0x0, 0x0, 0x78, 0x40, + + /* U+43A "к" */ + 0xc6, 0xcc, 0xc8, 0xd8, 0xf0, 0xd8, 0xcc, 0xc4, + 0x0, + + /* U+43B "л" */ + 0xc1, 0x30, 0x88, 0x44, 0x23, 0x11, 0x88, 0xc4, + 0x7e, 0x0, 0x0, + + /* U+43C "м" */ + 0xcc, 0xf3, 0x3d, 0xef, 0x4b, 0xf2, 0xf8, 0x7e, + 0x1f, 0x87, 0x0, 0x0, + + /* U+43D "н" */ + 0xc3, 0x87, 0xe, 0x3f, 0xf8, 0x70, 0xe1, 0x0, + + /* U+43E "о" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, + + /* U+43F "п" */ + 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xfe, + 0x0, + + /* U+440 "р" */ + 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc2, + 0xc2, 0xc2, 0xc6, 0xfc, 0x18, + + /* U+441 "с" */ + 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, + 0x3e, 0x8, + + /* U+442 "т" */ + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, + 0x0, + + /* U+443 "у" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, + + /* U+444 "ф" */ + 0x0, 0x0, 0x80, 0x10, 0x2, 0x3, 0xfc, 0xcc, + 0x91, 0x1a, 0x23, 0x44, 0x68, 0x8d, 0x91, 0x1f, + 0xe1, 0x70, 0x8, 0x1, 0x0, 0x20, + + /* U+445 "х" */ + 0x42, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x24, 0x66, + 0x0, + + /* U+446 "ц" */ + 0x0, 0x0, 0x80, 0x5f, 0xec, 0x66, 0x13, 0x9, + 0x84, 0xc2, 0x61, 0x30, 0x80, 0x0, + + /* U+447 "ч" */ + 0x2, 0x2, 0x2, 0x3e, 0x62, 0x42, 0x42, 0x42, + 0x0, + + /* U+448 "ш" */ + 0xff, 0xf8, 0x8f, 0x11, 0xe2, 0x3c, 0x47, 0x88, + 0xf1, 0x1e, 0x23, 0x0, 0x0, + + /* U+449 "щ" */ + 0x0, 0x0, 0x3, 0x0, 0x3f, 0xff, 0xc4, 0x6c, + 0x46, 0xc4, 0x6c, 0x46, 0xc4, 0x6c, 0x46, 0xc4, + 0x60, 0x0, + + /* U+44A "ъ" */ + 0x1f, 0x4, 0x61, 0x8, 0x42, 0x1f, 0x87, 0x81, + 0x3, 0xc0, 0x0, 0x0, + + /* U+44B "ы" */ + 0xfc, 0x71, 0x9c, 0x67, 0x19, 0xfc, 0x7c, 0x1c, + 0x7, 0x1, 0x0, 0x0, + + /* U+44C "ь" */ + 0xfd, 0x8f, 0x1e, 0x3f, 0xde, 0x30, 0x60, 0x0, + + /* U+44D "э" */ + 0x0, 0x3c, 0x66, 0x42, 0x3, 0x1f, 0x3, 0x42, + 0x3e, 0x18, + + /* U+44E "ю" */ + 0x0, 0xc, 0x7c, 0xcc, 0x6c, 0x82, 0xc8, 0x2f, + 0x82, 0xc8, 0x2c, 0xc6, 0xc7, 0xc0, 0x10, + + /* U+44F "я" */ + 0x43, 0x63, 0x23, 0x3f, 0x73, 0x43, 0x43, 0x3f, + 0x0, + + /* U+450 "ѐ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x8, 0x18, + + /* U+451 "ё" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x26, 0x0, + + /* U+452 "ђ" */ + 0x0, 0x1, 0x80, 0x60, 0x33, 0x19, 0x8c, 0xc6, + 0x63, 0x31, 0x98, 0xcc, 0x67, 0xe3, 0x63, 0xc1, + 0xe0, 0x60, + + /* U+453 "ѓ" */ + 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0x0, 0x3, + 0x6, + + /* U+454 "є" */ + 0x0, 0x3e, 0x23, 0x61, 0x60, 0x78, 0x40, 0x63, + 0x3e, 0x8, + + /* U+455 "ѕ" */ + 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, + 0x3e, 0x18, + + /* U+456 "і" */ + 0xff, 0xff, 0xc, + + /* U+457 "ї" */ + 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x4, + 0xc0, + + /* U+458 "ј" */ + 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, + + /* U+459 "љ" */ + 0xc3, 0xf1, 0x8c, 0x62, 0x30, 0x8c, 0xc6, 0x33, + 0xf0, 0xcc, 0x3, 0x30, 0xf, 0xc0, 0x0, 0x0, + + /* U+45A "њ" */ + 0xc3, 0xe6, 0x11, 0xb0, 0x85, 0x84, 0x6f, 0xfe, + 0x63, 0x3, 0x8, 0x18, 0x40, 0x0, 0x0, + + /* U+45B "ћ" */ + 0x31, 0x98, 0xcc, 0x66, 0x33, 0x19, 0x8c, 0xc6, + 0x7e, 0x36, 0x3e, 0x1f, 0x6, 0x0, + + /* U+45C "ќ" */ + 0xc6, 0xcc, 0xc8, 0xd8, 0xf0, 0xd8, 0xcc, 0xc4, + 0x0, 0x0, 0x30, 0x18, + + /* U+45D "ѝ" */ + 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, + 0x0, 0x0, 0x10, 0x30, + + /* U+45E "ў" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x3c, 0x20, + + /* U+45F "џ" */ + 0x10, 0x10, 0x10, 0xfe, 0xc6, 0xc2, 0xc2, 0xc2, + 0xc2, 0xc2, 0xc2, 0x0, + + /* U+460 "Ѡ" */ + 0x0, 0x7, 0x9e, 0x47, 0x3c, 0x63, 0xc6, 0x3c, + 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, + 0x3c, 0x63, 0x0, 0x0, + + /* U+461 "ѡ" */ + 0x0, 0xf, 0x73, 0x33, 0x46, 0x28, 0xc5, 0x18, + 0xa3, 0x14, 0x62, 0x8c, 0x40, 0x0, + + /* U+462 "Ѣ" */ + 0x3f, 0x86, 0x18, 0xc1, 0x18, 0x23, 0x4, 0x67, + 0x8f, 0xc1, 0x80, 0x30, 0xf, 0x80, 0xc0, 0x0, + 0x0, + + /* U+463 "ѣ" */ + 0x3f, 0x18, 0xcc, 0x66, 0x33, 0x39, 0xf0, 0xc0, + 0x60, 0x7c, 0x3e, 0xc, 0x6, 0x0, 0x0, + + /* U+464 "Ѥ" */ + 0x0, 0x6, 0x1e, 0x31, 0x89, 0x98, 0x6c, 0x81, + 0x64, 0x3, 0xfe, 0x1f, 0xf0, 0xc8, 0x6, 0x40, + 0xb3, 0xd, 0x8f, 0xc0, 0x8, 0x0, + + /* U+465 "ѥ" */ + 0x0, 0x18, 0xf3, 0x33, 0x6c, 0x2d, 0x81, 0xfe, + 0x36, 0x6, 0x42, 0xcf, 0x80, 0x60, + + /* U+466 "Ѧ" */ + 0xcc, 0xd3, 0x26, 0xd8, 0xfe, 0x3f, 0xc, 0xc1, + 0x20, 0x48, 0x1e, 0x3, 0x0, 0xc0, 0x0, + + /* U+467 "ѧ" */ + 0xd9, 0x2d, 0x9f, 0x87, 0xc2, 0x41, 0xa0, 0x70, + 0x30, 0x0, 0x0, + + /* U+468 "Ѩ" */ + 0x49, 0x9a, 0x6c, 0x93, 0x64, 0xff, 0xe7, 0xfe, + 0x23, 0x31, 0x9, 0x88, 0x68, 0x41, 0xc2, 0xe, + 0x10, 0x60, 0x0, 0x0, + + /* U+469 "ѩ" */ + 0xd2, 0x7b, 0x4b, 0xff, 0x7f, 0xcc, 0xd9, 0x8b, + 0x31, 0xc6, 0x18, 0x0, 0x0, + + /* U+46A "Ѫ" */ + 0xc6, 0x3c, 0x63, 0xc6, 0x2c, 0x62, 0xc6, 0x67, + 0xfc, 0xf, 0x0, 0x90, 0x19, 0x83, 0x8, 0x3f, + 0xc0, 0x0, + + /* U+46B "ѫ" */ + 0xcc, 0xf3, 0x3c, 0xc9, 0xbe, 0x3f, 0x5, 0x83, + 0x20, 0xfc, 0x0, 0x0, + + /* U+46C "Ѭ" */ + 0xc4, 0x63, 0xc4, 0x63, 0xc4, 0x63, 0xc4, 0x63, + 0xc6, 0x63, 0xff, 0xfe, 0xc0, 0xf0, 0xc0, 0xd8, + 0xc1, 0x88, 0xc1, 0xc, 0xc3, 0xfc, 0x0, 0x0, + + /* U+46D "ѭ" */ + 0xcc, 0xcb, 0x33, 0x2c, 0xcc, 0xb3, 0xbe, 0xff, + 0xe3, 0x5, 0x8c, 0x32, 0x30, 0xfc, 0x0, 0x0, + + /* U+46E "Ѯ" */ + 0x0, 0x60, 0x40, 0x40, 0x7c, 0x6, 0x2, 0x2, + 0x6, 0x3c, 0xc, 0x6, 0x2, 0x6, 0x7c, 0x0, + 0x0, 0x18, 0x34, 0x0, + + /* U+46F "ѯ" */ + 0x0, 0xc1, 0x2, 0x7, 0xc0, 0xc1, 0x86, 0x3c, + 0xc, 0x1b, 0xe0, 0x0, 0x4, 0x14, 0x0, + + /* U+470 "Ѱ" */ + 0x4, 0x0, 0x80, 0x10, 0xf, 0x83, 0x58, 0xc9, + 0x91, 0x12, 0x22, 0x44, 0x48, 0x89, 0x11, 0x0, + 0x0, + + /* U+471 "ѱ" */ + 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x6b, + 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x11, 0x22, + 0x60, 0x0, + + /* U+472 "Ѳ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x37, + 0xfd, 0x3, 0x40, 0xd8, 0x33, 0x18, 0x7c, 0x4, + 0x0, + + /* U+473 "ѳ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x26, 0x13, 0xf9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, + + /* U+474 "Ѵ" */ + 0xc, 0x3, 0x1, 0xc0, 0x58, 0x12, 0xc, 0x82, + 0x30, 0x84, 0x61, 0x10, 0x6c, 0xc, 0x0, + + /* U+475 "ѵ" */ + 0x18, 0xc, 0xe, 0x5, 0x82, 0x43, 0x21, 0x18, + 0x86, 0x1, 0x0, + + /* U+476 "Ѷ" */ + 0xc, 0x3, 0x1, 0xc0, 0x58, 0x12, 0xc, 0x82, + 0x30, 0x84, 0x61, 0x10, 0x6c, 0xc, 0x0, 0x2c, + 0x16, 0x0, + + /* U+477 "ѷ" */ + 0x18, 0xc, 0xe, 0x5, 0x82, 0x43, 0x21, 0x18, + 0x86, 0x1, 0x0, 0xb, 0xb, 0x0, + + /* U+478 "Ѹ" */ + 0x0, 0x0, 0x0, 0x1, 0x80, 0x0, 0x18, 0x0, + 0x1, 0x1, 0xf0, 0x30, 0x63, 0x6, 0x18, 0x31, + 0xc3, 0x6, 0x2c, 0x60, 0xc4, 0x88, 0x9, 0x91, + 0x1, 0x23, 0x30, 0x64, 0x26, 0xc, 0x0, 0x63, + 0x0, 0x7, 0xc0, 0x0, 0x20, 0x0, + + /* U+479 "ѹ" */ + 0x0, 0x0, 0x0, 0x18, 0x0, 0x6, 0x0, 0x1, + 0x3, 0xe0, 0xc3, 0x18, 0x61, 0x84, 0x70, 0x82, + 0x2c, 0x41, 0x12, 0x20, 0x99, 0x18, 0xc8, 0xc7, + 0xc4, 0x20, 0x80, 0x0, + + /* U+47A "Ѻ" */ + 0x0, 0x1, 0x1, 0xf0, 0xf6, 0x60, 0x98, 0x34, + 0xd, 0x3, 0x40, 0xd0, 0x36, 0xc, 0x96, 0x1f, + 0x3, 0x0, 0x0, + + /* U+47B "ѻ" */ + 0x8, 0x1f, 0x1f, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0xe, 0x0, 0x0, + + /* U+47C "Ѽ" */ + 0x0, 0x7, 0x9e, 0x47, 0x2c, 0x63, 0xc6, 0x3c, + 0x63, 0xc6, 0x3c, 0x3, 0xc0, 0x3c, 0x3, 0x40, + 0x36, 0x6, 0x2, 0x0, 0x20, 0xb, 0x80, 0x40, + + /* U+47D "ѽ" */ + 0x0, 0x3, 0xdc, 0x66, 0x66, 0x62, 0x46, 0x24, + 0x22, 0x40, 0x26, 0x2, 0x30, 0x60, 0x20, 0x2, + 0x0, 0x9c, 0x6, 0x0, + + /* U+47E "Ѿ" */ + 0x0, 0x7, 0x9e, 0x47, 0x3c, 0x63, 0xc6, 0x3c, + 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, + 0x3c, 0x63, 0x0, 0x0, 0x20, 0x1f, 0x80, + + /* U+47F "ѿ" */ + 0x0, 0xf, 0x73, 0x33, 0x46, 0x28, 0xc5, 0x18, + 0xa3, 0x14, 0x62, 0x8c, 0x40, 0x0, 0x0, 0x6, + 0x0, 0x0, + + /* U+480 "Ҁ" */ + 0x4, 0x1, 0x0, 0x40, 0x70, 0x30, 0x18, 0x6, + 0x1, 0x0, 0x40, 0x10, 0x6, 0x1, 0x82, 0x31, + 0x87, 0xc0, 0x40, + + /* U+481 "ҁ" */ + 0x8, 0x8, 0x8, 0x38, 0x20, 0x60, 0x40, 0x40, + 0x40, 0x63, 0x3e, 0x8, + + /* U+482 "҂" */ + 0x20, 0xc, 0x1, 0xc0, 0x60, 0x68, 0x1, 0x20, + 0x70, 0x38, 0x1b, 0x0, 0x40, 0x0, + + /* U+483 "҃" */ + 0x40, 0xf8, 0x10, + + /* U+484 "҄" */ + 0x62, 0x38, 0x0, + + /* U+485 "҅" */ + 0x9, 0x0, + + /* U+486 "҆" */ + 0x9, 0x0, + + /* U+488 "҈" */ + 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0x30, 0x1c, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe0, 0xa, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x1c, + 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, + + /* U+489 "҉" */ + 0x0, 0x0, 0x2, 0x0, 0x4, 0x1, 0x80, 0x81, + 0x81, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0xe0, + 0xc, 0x0, 0x0, 0x0, 0x0, 0x80, 0x81, 0x1, + 0x80, 0x20, 0x0, 0x40, 0x0, 0x0, + + /* U+48A "Ҋ" */ + 0x0, 0x0, 0x18, 0x1, 0x0, 0x2c, 0x1d, 0xc3, + 0x38, 0x67, 0x8c, 0xd9, 0x99, 0x33, 0x36, 0x63, + 0xcc, 0x39, 0x87, 0x30, 0x60, 0x0, 0x0, 0x7, + 0x80, 0x80, 0x0, + + /* U+48B "ҋ" */ + 0x0, 0x1, 0x80, 0x40, 0x2c, 0x37, 0x13, 0x89, + 0xe4, 0xda, 0x67, 0x33, 0x98, 0xc0, 0x0, 0x1, + 0xe0, 0x80, + + /* U+48C "Ҍ" */ + 0x3f, 0x86, 0x18, 0xc1, 0x18, 0x23, 0x4, 0x67, + 0x8f, 0xc1, 0x80, 0x30, 0xf, 0x80, 0xc0, 0x0, + 0x0, + + /* U+48D "ҍ" */ + 0x3f, 0x18, 0xcc, 0x66, 0x33, 0x39, 0xf0, 0xc0, + 0x60, 0x30, 0x18, 0x1f, 0x6, 0x3, 0x0, + + /* U+48E "Ҏ" */ + 0xc0, 0x60, 0x30, 0x18, 0xf, 0x97, 0xfb, 0x1d, + 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, + + /* U+48F "ҏ" */ + 0x0, 0xc0, 0xc0, 0xc0, 0xfe, 0xce, 0xce, 0xc2, + 0xc2, 0xc2, 0xc6, 0xfc, 0x18, + + /* U+490 "Ґ" */ + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x2, 0x2, 0x2, + + /* U+491 "ґ" */ + 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0xc, 0x30, + 0x80, + + /* U+492 "Ғ" */ + 0x60, 0x30, 0x18, 0xc, 0x6, 0x7, 0xc3, 0xe0, + 0xc0, 0x60, 0x30, 0x1f, 0xc0, 0x0, + + /* U+493 "ғ" */ + 0x30, 0x30, 0x30, 0x30, 0x7c, 0x30, 0x30, 0x3e, + 0x0, + + /* U+494 "Ҕ" */ + 0x0, 0xe, 0x2, 0xc3, 0xc3, 0xc3, 0xc3, 0xc2, + 0xfc, 0xf0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, + + /* U+495 "ҕ" */ + 0x0, 0x30, 0x36, 0x2c, 0x58, 0xb3, 0x7c, 0xc1, + 0x83, 0xe0, 0x0, + + /* U+496 "Җ" */ + 0x0, 0x2, 0x0, 0x2, 0x0, 0x2, 0x41, 0xe, + 0x61, 0xc, 0x31, 0x18, 0x31, 0x30, 0x19, 0x30, + 0xf, 0xe0, 0xf, 0xe0, 0x19, 0x30, 0x31, 0x10, + 0x21, 0x18, 0x61, 0xc, 0x0, 0x0, + + /* U+497 "җ" */ + 0x0, 0x10, 0x0, 0x80, 0x4, 0x8c, 0x66, 0x66, + 0x1b, 0x20, 0x5b, 0x3, 0xf0, 0x36, 0xc1, 0x32, + 0x19, 0x98, 0x0, 0x0, + + /* U+498 "Ҙ" */ + 0x8, 0x4, 0x2, 0x1, 0x3, 0xe3, 0x19, 0x6, + 0x3, 0x1, 0x7, 0x1, 0xc0, 0x24, 0x1b, 0x8, + 0xfc, 0x0, + + /* U+499 "ҙ" */ + 0x8, 0x8, 0x8, 0x8, 0x3c, 0x66, 0x42, 0x6, + 0x1c, 0x6, 0x42, 0x7e, 0x18, + + /* U+49A "Қ" */ + 0x0, 0x80, 0x20, 0xb, 0x6, 0xc3, 0x31, 0x8c, + 0x43, 0x30, 0xf8, 0x36, 0xc, 0xc3, 0x18, 0xc2, + 0x30, 0xc0, 0x0, + + /* U+49B "қ" */ + 0x1, 0x0, 0x80, 0x58, 0xec, 0xc6, 0x43, 0x61, + 0xe0, 0xd8, 0x66, 0x31, 0x0, 0x0, + + /* U+49C "Ҝ" */ + 0xc1, 0xe1, 0xb0, 0xda, 0xcd, 0x47, 0xe3, 0xf1, + 0xa8, 0xc6, 0x61, 0xb0, 0xc0, 0x0, + + /* U+49D "ҝ" */ + 0xc3, 0xc6, 0xf4, 0xfc, 0xf8, 0xfc, 0xc4, 0xc6, + 0x0, + + /* U+49E "Ҟ" */ + 0x20, 0xc4, 0x30, 0x84, 0x11, 0x82, 0x60, 0x78, + 0xb, 0x1, 0x30, 0x7b, 0x1f, 0x30, 0x82, 0x0, + 0x0, + + /* U+49F "ҟ" */ + 0x31, 0x8c, 0xc3, 0x20, 0xd8, 0x3c, 0xf, 0x3, + 0x60, 0xcc, 0x30, 0xc, 0x7, 0x80, 0xc0, + + /* U+4A0 "Ҡ" */ + 0xc, 0x18, 0x30, 0xc0, 0xc6, 0x3, 0x30, 0xc, + 0x80, 0x3e, 0x0, 0xd8, 0x3, 0x30, 0xc, 0x60, + 0x31, 0x87, 0xc3, 0x0, 0x0, + + /* U+4A1 "ҡ" */ + 0x8, 0x61, 0x18, 0x26, 0x5, 0x80, 0xf0, 0x12, + 0x2, 0x63, 0xc6, 0x0, 0x0, + + /* U+4A2 "Ң" */ + 0x0, 0x40, 0x8, 0x1, 0x60, 0x6c, 0x9, 0x81, + 0x30, 0x26, 0x4, 0xff, 0x98, 0x33, 0x2, 0x60, + 0x4c, 0x9, 0x81, 0x0, 0x0, + + /* U+4A3 "ң" */ + 0x1, 0x0, 0x80, 0x58, 0x6c, 0x26, 0x13, 0x19, + 0xfc, 0xc2, 0x61, 0x30, 0x80, 0x0, + + /* U+4A4 "Ҥ" */ + 0xc0, 0x81, 0x81, 0x3, 0x2, 0x6, 0x4, 0xc, + 0x8, 0x1f, 0xf0, 0x30, 0x60, 0x60, 0x40, 0xc0, + 0x81, 0x81, 0x3, 0x3, 0xf0, 0x0, 0x0, + + /* U+4A5 "ҥ" */ + 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xfe, 0x31, 0x8c, + 0x63, 0x1f, 0x0, 0x0, + + /* U+4A6 "Ҧ" */ + 0x0, 0x0, 0x0, 0x30, 0x0, 0x36, 0xc, 0x2c, + 0x18, 0x78, 0x30, 0xf0, 0x61, 0x60, 0xc6, 0xc1, + 0xf9, 0x83, 0x83, 0x6, 0x6, 0xc, 0xc, 0x18, + 0x1f, 0xf0, 0x0, 0x0, 0x0, + + /* U+4A7 "ҧ" */ + 0x0, 0x0, 0x3, 0x0, 0xd, 0x8c, 0x2c, 0x61, + 0x63, 0xb, 0x18, 0xd8, 0xf8, 0xc6, 0x6, 0x30, + 0x3f, 0x80, 0x0, 0x0, + + /* U+4A8 "Ҩ" */ + 0x0, 0x1, 0xfe, 0x33, 0xc2, 0x24, 0x66, 0x66, + 0x42, 0x44, 0x24, 0x42, 0x44, 0x26, 0x42, 0x26, + 0x63, 0x3c, 0x0, 0x0, + + /* U+4A9 "ҩ" */ + 0x0, 0x7, 0xe3, 0x71, 0xb4, 0x49, 0x92, 0x64, + 0x99, 0xb6, 0x27, 0x0, 0x80, + + /* U+4AA "Ҫ" */ + 0x4, 0x1, 0x0, 0x40, 0x10, 0x1f, 0xc, 0x66, + 0x9, 0x82, 0x60, 0x10, 0x4, 0x1, 0x80, 0x60, + 0x8c, 0x61, 0xf0, 0x10, + + /* U+4AB "ҫ" */ + 0x8, 0x8, 0x8, 0x8, 0x3c, 0x62, 0x40, 0x40, + 0x40, 0x40, 0x63, 0x3e, 0x8, + + /* U+4AC "Ҭ" */ + 0x4, 0x1, 0x0, 0x40, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, + 0x3f, 0xe0, 0x0, + + /* U+4AD "ҭ" */ + 0x4, 0x4, 0x4, 0x1c, 0x18, 0x18, 0x18, 0x18, + 0x18, 0x18, 0x7e, 0x0, + + /* U+4AE "Ү" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, + + /* U+4AF "ү" */ + 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x34, + 0x24, 0x66, 0x62, 0x42, 0x0, + + /* U+4B0 "Ұ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0x3e, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, + + /* U+4B1 "ұ" */ + 0x0, 0x18, 0x18, 0x18, 0x3e, 0x18, 0x1c, 0x34, + 0x24, 0x66, 0x62, 0x42, 0x0, + + /* U+4B2 "Ҳ" */ + 0x0, 0x40, 0x8, 0x1, 0x30, 0x66, 0x18, 0x66, + 0x4, 0x80, 0xf0, 0xc, 0x1, 0x80, 0x78, 0x19, + 0x82, 0x10, 0xc3, 0x0, 0x0, + + /* U+4B3 "ҳ" */ + 0x1, 0x0, 0x80, 0x48, 0x66, 0x61, 0xe0, 0x60, + 0x30, 0x3c, 0x12, 0x19, 0x80, 0x0, + + /* U+4B4 "Ҵ" */ + 0x0, 0x8, 0x0, 0x20, 0x0, 0x87, 0xfe, 0x18, + 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, 0x30, + 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, 0x31, 0xfc, + 0xc0, 0x0, 0x0, + + /* U+4B5 "ҵ" */ + 0x0, 0x0, 0x8, 0x1, 0x1f, 0xe3, 0x8, 0x61, + 0xc, 0x21, 0x84, 0x30, 0x86, 0x13, 0xf2, 0x0, + 0x0, + + /* U+4B6 "Ҷ" */ + 0x0, 0x40, 0x8, 0x1, 0x0, 0xe0, 0x18, 0x3, + 0x0, 0x60, 0xec, 0x7f, 0x98, 0x33, 0x6, 0x60, + 0xcc, 0x19, 0x83, 0x0, 0x0, + + /* U+4B7 "ҷ" */ + 0x1, 0x0, 0x80, 0x40, 0x60, 0x30, 0x10, 0xf8, + 0xc4, 0x42, 0x21, 0x10, 0x80, 0x0, + + /* U+4B8 "Ҹ" */ + 0x1, 0x80, 0xc2, 0x61, 0x31, 0xdb, 0xff, 0x27, + 0x93, 0xc1, 0xe0, 0xf0, 0x60, 0x0, + + /* U+4B9 "ҹ" */ + 0x6, 0xc, 0x5b, 0xfd, 0x7a, 0xe1, 0xc3, 0x0, + + /* U+4BA "Һ" */ + 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x1b, 0xf9, + 0x80, 0xc0, 0x60, 0x30, 0x0, 0x0, + + /* U+4BB "һ" */ + 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0xd9, + 0x83, 0x6, 0x0, + + /* U+4BC "Ҽ" */ + 0x0, 0x0, 0x7e, 0xc, 0x1, 0x80, 0x18, 0x1, + 0x80, 0x1f, 0xe7, 0xfe, 0x58, 0x21, 0x82, 0xc, + 0x60, 0x7c, 0x1, 0x0, + + /* U+4BD "ҽ" */ + 0x0, 0x3, 0xe1, 0x88, 0x40, 0x10, 0xf, 0xf7, + 0xd, 0x62, 0xf, 0x80, 0x80, + + /* U+4BE "Ҿ" */ + 0x1, 0x0, 0x10, 0x1, 0x0, 0x10, 0x7, 0xe0, + 0xc0, 0x18, 0x1, 0x80, 0x18, 0x1, 0xfe, 0x7f, + 0xe5, 0x82, 0x18, 0x20, 0xc6, 0x7, 0xc0, 0x10, + + /* U+4BF "ҿ" */ + 0x2, 0x0, 0x80, 0x20, 0x8, 0xf, 0x86, 0x21, + 0x0, 0x40, 0x3f, 0xdc, 0x35, 0x88, 0x3e, 0x2, + 0x0, + + /* U+4C0 "Ӏ" */ + 0xff, 0xff, 0xfc, + + /* U+4C1 "Ӂ" */ + 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, + 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, + 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, 0x0, + 0x0, 0xf0, 0x1, 0x0, 0x0, + + /* U+4C2 "ӂ" */ + 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1f, 0x83, + 0x6c, 0x26, 0x46, 0x66, 0x0, 0x0, 0x0, 0xf, + 0x0, 0x80, + + /* U+4C3 "Ӄ" */ + 0x0, 0x3, 0x0, 0xd8, 0x2c, 0x1e, 0xf, 0x5, + 0x86, 0xfe, 0x7c, 0x32, 0x19, 0x8c, 0x66, 0x18, + 0x0, + + /* U+4C4 "ӄ" */ + 0x8, 0x4, 0xc2, 0xc2, 0xc6, 0xcc, 0xf8, 0xd8, + 0xc8, 0xc4, 0x0, + + /* U+4C5 "Ӆ" */ + 0x0, 0x0, 0x6, 0x0, 0x20, 0x2, 0xc0, 0xe6, + 0xc, 0x30, 0xc3, 0xc, 0x10, 0xc1, 0xc, 0x10, + 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x1f, 0xc0, 0x0, + + /* U+4C6 "ӆ" */ + 0x0, 0x0, 0x60, 0x8, 0x2, 0xc1, 0x98, 0x42, + 0x10, 0x84, 0x31, 0xc, 0x43, 0x10, 0xfc, 0x0, + 0x0, + + /* U+4C7 "Ӈ" */ + 0x0, 0x1, 0x80, 0x60, 0x3c, 0x1e, 0xf, 0x7, + 0x83, 0xc1, 0xff, 0xf0, 0x78, 0x3c, 0x1e, 0xf, + 0x6, 0x0, + + /* U+4C8 "ӈ" */ + 0x0, 0x18, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xff, + 0x8f, 0x1e, 0x30, 0x0, + + /* U+4C9 "Ӊ" */ + 0x0, 0x0, 0x18, 0x1, 0x0, 0x2c, 0xd, 0x81, + 0x30, 0x26, 0x4, 0xc0, 0x9f, 0xf3, 0x6, 0x60, + 0x4c, 0x9, 0x81, 0x30, 0x20, 0x0, + + /* U+4CA "ӊ" */ + 0x0, 0x1, 0x80, 0x40, 0x2c, 0x36, 0x13, 0x9, + 0x8c, 0xfe, 0x61, 0x30, 0x98, 0x40, 0x0, + + /* U+4CB "Ӌ" */ + 0x2, 0x1, 0x0, 0x80, 0x70, 0x18, 0xc, 0x6, + 0x3b, 0x7f, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0xc, + 0x0, + + /* U+4CC "ӌ" */ + 0x4, 0x4, 0x4, 0x6, 0x2, 0x2, 0x3e, 0x62, + 0x42, 0x42, 0x42, 0x0, + + /* U+4CD "Ӎ" */ + 0x0, 0x0, 0x0, 0x60, 0x0, 0x80, 0x2, 0xc6, + 0x3b, 0x18, 0xcc, 0xf3, 0x32, 0x4c, 0xc9, 0x33, + 0x66, 0xcd, 0xb, 0x3c, 0x3c, 0xe0, 0x73, 0x81, + 0xce, 0x7, 0x0, 0x0, + + /* U+4CE "ӎ" */ + 0x0, 0x0, 0x6, 0x0, 0x20, 0x2, 0xcc, 0xec, + 0xcc, 0xde, 0xcd, 0x2c, 0xf2, 0xce, 0x1c, 0xe1, + 0xce, 0x1c, 0x0, 0x0, + + /* U+4CF "ӏ" */ + 0xff, 0xff, 0xfc, + + /* U+4D0 "Ӑ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, + 0x1, 0xe0, 0x20, 0x0, + + /* U+4D1 "ӑ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3c, 0x20, + + /* U+4D2 "Ӓ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x1, 0x30, 0x0, 0x0, + + /* U+4D3 "ӓ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x26, 0x0, + + /* U+4D4 "Ӕ" */ + 0x60, 0x7f, 0x30, 0x40, 0x30, 0x40, 0x1f, 0xc0, + 0x8, 0x40, 0xc, 0x7c, 0x4, 0x7c, 0x6, 0xc0, + 0x3, 0xc0, 0x1, 0xc0, 0x1, 0xfe, 0x0, 0x0, + + /* U+4D5 "ӕ" */ + 0x0, 0x3, 0xe7, 0x91, 0xc0, 0x86, 0x6, 0x20, + 0x1f, 0xfc, 0x8, 0x68, 0x63, 0x7f, 0xf0, 0xc2, + 0x0, + + /* U+4D6 "Ӗ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x78, 0x40, + + /* U+4D7 "ӗ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x3c, 0x20, + + /* U+4D8 "Ә" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x44, 0xc, 0x81, + 0x9f, 0xf0, 0x2, 0x0, 0xc0, 0x18, 0x6, 0x1f, + 0x80, 0x0, + + /* U+4D9 "ә" */ + 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, + 0x7e, 0x18, + + /* U+4DA "Ӛ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x44, 0xc, 0x81, + 0x9f, 0xf0, 0x2, 0x0, 0xc0, 0x18, 0x6, 0x1f, + 0x80, 0x0, 0x26, 0x0, 0x0, + + /* U+4DB "ӛ" */ + 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, + 0x7e, 0x18, 0x0, 0x26, 0x0, + + /* U+4DC "Ӝ" */ + 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, + 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, + 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, 0x0, + 0x0, 0x98, 0x0, 0x0, 0x0, + + /* U+4DD "ӝ" */ + 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1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0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x4, 0xc0, 0x0, + + /* U+4E8 "Ө" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x37, + 0xfd, 0x3, 0x40, 0xd8, 0x33, 0x18, 0x7c, 0x4, + 0x0, + + /* U+4E9 "ө" */ + 0x0, 0x1f, 0x18, 0xcc, 0x26, 0x13, 0xf9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, + + /* U+4EA "Ӫ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x37, + 0xfd, 0x3, 0x40, 0xd8, 0x33, 0x18, 0x7c, 0x4, + 0x4, 0xc0, 0x0, + + /* U+4EB "ӫ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x26, 0x13, 0xf9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x4, 0xc0, 0x0, + + /* U+4EC "Ӭ" */ + 0x0, 0x1f, 0x18, 0xd8, 0x20, 0x18, 0xc, 0x7e, + 0x3, 0x1, 0xe0, 0xd0, 0xcf, 0xc0, 0x80, 0x0, + 0x98, 0x0, + + /* U+4ED "ӭ" */ + 0x0, 0x3c, 0x66, 0x42, 0x3, 0x1f, 0x3, 0x42, + 0x3e, 0x18, 0x0, 0x26, 0x0, + + /* U+4EE "Ӯ" */ + 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, + 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, + 0x0, 0x3, 0xe0, 0x0, + + /* U+4EF "ӯ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x7c, 0x0, + + /* U+4F0 "Ӱ" */ + 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, + 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, + 0x0, 0x1, 0x30, 0x0, + + /* U+4F1 "ӱ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x26, 0x0, + + /* U+4F2 "Ӳ" */ + 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, + 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, + 0x0, 0x1, 0xa0, 0x2c, + + /* U+4F3 "ӳ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x34, 0x16, + + /* U+4F4 "Ӵ" */ + 0x1, 0x80, 0xc0, 0x60, 0x31, 0xdb, 0xff, 0x7, + 0x83, 0xc1, 0xe0, 0xf0, 0x60, 0x0, 0x1, 0x30, + 0x0, + + /* U+4F5 "ӵ" */ + 0x2, 0x2, 0x2, 0x3e, 0x62, 0x42, 0x42, 0x42, + 0x0, 0x0, 0x26, 0x0, + + /* U+4F6 "Ӷ" */ + 0x20, 0x20, 0x20, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, + + /* U+4F7 "ӷ" */ + 0x20, 0x82, 0x38, 0xc3, 0xc, 0x30, 0xc3, 0xf, + 0x80, + + /* U+4F8 "Ӹ" */ + 0xfe, 0x78, 0x6f, 0x5, 0xe0, 0xbc, 0x17, 0x9e, + 0xff, 0x1e, 0x3, 0xc0, 0x78, 0xf, 0x1, 0x80, + 0x0, 0x0, 0x13, 0x0, 0x0, + + /* U+4F9 "ӹ" */ + 0xfc, 0xf1, 0xbc, 0x6f, 0x1b, 0xfc, 0xfc, 0x3c, + 0xf, 0x3, 0x0, 0x0, 0x1, 0x30, 0x0, + + /* U+4FA "Ӻ" */ + 0x0, 0xc, 0x1, 0x80, 0x60, 0x38, 0xc, 0x3, + 0x0, 0xc0, 0x30, 0xc, 0xf, 0x80, 0xc0, 0x30, + 0xc, 0x3, 0xf8, 0x0, + + /* U+4FB "ӻ" */ + 0x0, 0x30, 0x18, 0x18, 0x38, 0x30, 0x30, 0x30, + 0xf8, 0x30, 0x30, 0x3e, 0x0, + + /* U+4FC "Ӽ" */ + 0x0, 0x0, 0x60, 0xc, 0x3, 0x60, 0xd8, 0x63, + 0x30, 0x48, 0x1e, 0x3, 0x0, 0xc0, 0x78, 0x33, + 0x8, 0x46, 0x18, 0x0, + + /* U+4FD "ӽ" */ + 0x0, 0x6, 0x3, 0x3, 0x43, 0x66, 0x3c, 0x18, + 0x18, 0x3c, 0x24, 0x66, 0x0, + + /* U+4FE "Ӿ" */ + 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x7, 0x81, + 0xe0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, + + /* U+4FF "ӿ" */ + 0x42, 0x66, 0x3c, 0x3c, 0x3c, 0x3c, 0x24, 0x66, + 0x0, + + /* U+500 "Ԁ" */ + 0x3f, 0xb0, 0xd0, 0x68, 0x34, 0x1b, 0x8c, 0x7e, + 0x3, 0x1, 0x80, 0xc0, 0x60, 0x0, + + /* U+501 "ԁ" */ + 0x0, 0x3f, 0x63, 0x63, 0x43, 0x43, 0x43, 0x63, + 0x3f, 0x1b, 0x3, 0x3, 0x3, + + /* U+502 "Ԃ" */ + 0x1f, 0xe3, 0xd, 0x90, 0x66, 0x83, 0x34, 0x19, + 0xb8, 0xc8, 0x7e, 0x0, 0x30, 0x1, 0x80, 0xc, + 0x0, 0x60, 0x0, 0x0, + + /* U+503 "ԃ" */ + 0x0, 0x1, 0xef, 0x18, 0xcc, 0x86, 0x34, 0x31, + 0xa1, 0x8d, 0xc, 0x6c, 0x63, 0x3f, 0x0, 0xd8, + 0x0, 0xc0, 0x6, 0x0, 0x30, 0x0, 0x0, + + /* U+504 "Ԅ" */ + 0x0, 0x0, 0x3c, 0x2, 0x60, 0x22, 0x6, 0x30, + 0x63, 0x3c, 0x30, 0x42, 0x6, 0x0, 0x20, 0x6, + 0xf, 0xc0, 0x0, 0x0, + + /* U+505 "ԅ" */ + 0x0, 0x1, 0xe0, 0xc8, 0x33, 0x78, 0xde, 0x30, + 0xc8, 0x30, 0x78, 0x0, 0x0, + + /* U+506 "Ԇ" */ + 0x0, 0x2, 0x3, 0x7, 0x7, 0x6, 0x6, 0xc, + 0x78, 0xc, 0x6, 0x6, 0x4, 0x7c, 0x0, + + /* U+507 "ԇ" */ + 0x0, 0x2, 0x3, 0x7, 0x6, 0x4, 0x3c, 0x3c, + 0x4, 0x4, 0x7c, 0x0, + + /* U+508 "Ԉ" */ + 0x0, 0x0, 0xc0, 0xf0, 0xc1, 0x30, 0x86, 0x31, + 0xc, 0x62, 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x18, + 0xc0, 0x31, 0x80, 0x63, 0x0, 0xfe, 0x0, 0x0, + 0x0, + + /* U+509 "ԉ" */ + 0x0, 0x3, 0xf, 0x18, 0x4c, 0x66, 0x23, 0x31, + 0x19, 0x88, 0xcc, 0x46, 0x62, 0x3f, 0x0, 0x0, + 0x0, + + /* U+50A "Ԋ" */ + 0x0, 0x3, 0x3, 0xcc, 0x9, 0xb0, 0x63, 0xc1, + 0x8f, 0x6, 0x3f, 0xf8, 0xf0, 0x63, 0xc1, 0x83, + 0x6, 0xc, 0x18, 0x30, 0x60, 0x0, 0x0, + + /* U+50B "ԋ" */ + 0x0, 0xc, 0x3c, 0xc2, 0x6c, 0x22, 0xc6, 0x3f, + 0xe3, 0xc2, 0x2c, 0x22, 0xc2, 0x0, 0x0, + + /* U+50C "Ԍ" */ + 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x90, 0x24, + 0x19, 0x0, 0x60, 0x18, 0x3, 0x0, 0x7c, 0x4, + 0x0, + + /* U+50D "ԍ" */ + 0x0, 0x1e, 0x22, 0x63, 0x42, 0x40, 0x40, 0x60, + 0x3c, 0x8, + + /* U+50E "Ԏ" */ + 0x0, 0x0, 0xf0, 0x33, 0x6, 0x20, 0xc4, 0x18, + 0x83, 0x10, 0x62, 0xc, 0x1, 0x80, 0x30, 0x7f, + 0xc0, 0x0, + + /* U+50F "ԏ" */ + 0x0, 0x3, 0xc0, 0x98, 0x62, 0x18, 0x86, 0x21, + 0x88, 0x60, 0x7e, 0x0, 0x0, + + /* U+510 "Ԑ" */ + 0x0, 0x1f, 0x18, 0xd8, 0x3c, 0x2, 0x0, 0xf0, + 0xe0, 0x40, 0x60, 0x10, 0x6f, 0xe0, 0x80, + + /* U+511 "ԑ" */ + 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, + 0x7e, 0x18, + + /* U+512 "Ԓ" */ + 0x0, 0x0, 0x6, 0x0, 0x30, 0x3, 0xc0, 0xf6, + 0xc, 0x30, 0xc3, 0xc, 0x10, 0xc1, 0xc, 0x10, + 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x1f, 0xc0, 0x0, + + /* U+513 "ԓ" */ + 0x0, 0x0, 0x60, 0xc, 0x3, 0xc1, 0xd8, 0x42, + 0x10, 0x84, 0x31, 0xc, 0x43, 0x10, 0xfc, 0x0, + 0x0, + + /* U+1E00 "Ḁ" */ + 0x0, 0x1, 0x80, 0x28, 0x0, 0xc, 0x4, 0x81, + 0x98, 0x21, 0xfc, 0x31, 0x86, 0x20, 0x4c, 0x9, + 0x1, 0xa0, 0x1c, 0x3, 0x0, 0x0, + + /* U+1E01 "ḁ" */ + 0x0, 0x18, 0x14, 0x0, 0x3f, 0x67, 0x43, 0x63, + 0x3f, 0x3, 0x62, 0x3e, 0x8, + + /* U+1E3E "Ḿ" */ + 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, + 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, + 0x70, 0x0, 0x6, 0x0, 0x30, + + /* U+1E3F "ḿ" */ + 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, + 0x63, 0xc6, 0x3f, 0xfe, 0x18, 0xc0, 0x0, 0x6, + 0x0, 0x30, + + /* U+1E80 "Ẁ" */ + 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, + 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, + 0xc, 0x24, 0x30, 0xc0, 0x40, 0x2, 0x0, 0x18, + 0x0, + + /* U+1E81 "ẁ" */ + 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, + 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x4, + 0x0, 0xc0, + + /* U+1E82 "Ẃ" */ + 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, + 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, + 0xc, 0x24, 0x30, 0xc0, 0x80, 0x3, 0x0, 0x6, + 0x0, + + /* U+1E83 "ẃ" */ + 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, + 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x6, + 0x0, 0x30, + + /* U+1E84 "Ẅ" */ + 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, + 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, + 0xc, 0x24, 0x30, 0xc0, 0x0, 0x4, 0xc0, 0x0, + 0x0, + + /* U+1E85 "ẅ" */ + 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, + 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x9, + 0x80, 0x0, + + /* U+1EA0 "Ạ" */ + 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, + 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, + 0x0, 0xe0, 0x18, 0x0, 0x0, + + /* U+1EA1 "ạ" */ + 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, + 0x3, 0x62, 0x3e, 0x8, + + /* U+1EA2 "Ả" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0x0, 0xc, 0x0, 0x80, 0x20, + + /* U+1EA3 "ả" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0xc, 0x4, 0x8, + + /* U+1EA4 "Ấ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xb0, 0xd, 0x0, 0x10, 0x0, + + /* U+1EA5 "ấ" */ + 0x0, 0xf, 0xc6, 0x71, 0xc, 0x63, 0xf, 0xc0, + 0x31, 0x88, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, + 0x0, 0x20, 0x0, + + /* U+1EA6 "Ầ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xb0, 0x48, 0x18, 0x0, + + /* U+1EA7 "ầ" */ + 0x0, 0xf, 0xcc, 0xe4, 0x33, 0x18, 0xfc, 0x6, + 0x62, 0x1f, 0x2, 0x0, 0x1, 0x62, 0x43, 0x0, + + /* U+1EA8 "Ẩ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xb0, 0xd, 0x0, 0x10, 0x4, + + /* U+1EA9 "ẩ" */ + 0x0, 0x1f, 0x99, 0xc8, 0x66, 0x31, 0xf8, 0xc, + 0xc4, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, + 0x4, + + /* U+1EAA "Ẫ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xb0, 0x8, 0x0, 0x80, 0x40, + + /* U+1EAB "ẫ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x16, 0x8, 0x4, 0x10, + + /* U+1EAC "Ậ" */ + 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, + 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, + 0x0, 0xe0, 0x18, 0x0, 0x0, 0x50, 0x6, 0x0, + + /* U+1EAD "ậ" */ + 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, + 0x3, 0x62, 0x3e, 0x8, 0x0, 0x14, 0xc, + + /* U+1EAE "Ắ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0x0, 0x3c, 0x0, 0x0, 0x30, 0x0, 0x0, + + /* U+1EAF "ắ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3c, 0x0, 0xc, 0x0, + + /* U+1EB0 "Ằ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0xc0, 0x26, 0x1, 0x0, 0x40, + + /* U+1EB1 "ằ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x18, 0x26, 0x8, 0x10, + + /* U+1EB2 "Ẳ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, + 0x1, 0xe0, 0x0, 0x1, 0x80, 0x30, + + /* U+1EB3 "ẳ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x3c, 0x0, 0xc, 0xc, + + /* U+1EB4 "Ẵ" */ + 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, + 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, + 0x0, 0x0, 0x34, 0x0, 0x0, 0xb0, 0x0, 0x0, + + /* U+1EB5 "ẵ" */ + 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, + 0x3e, 0x8, 0x0, 0x34, 0x0, 0x2c, 0x0, + + /* U+1EB6 "Ặ" */ + 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, + 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, + 0x0, 0xe0, 0x18, 0x1, 0x0, 0xf0, 0x10, 0x0, + + /* U+1EB7 "ặ" */ + 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, + 0x3, 0x62, 0x3e, 0x8, 0x0, 0x3c, 0x20, + + /* U+1EB8 "Ẹ" */ + 0x8, 0x8, 0x0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, + 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, + + /* U+1EB9 "ẹ" */ + 0x8, 0x8, 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, + 0x43, 0x63, 0x3e, 0x8, + + /* U+1EBA "Ẻ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0x8, 0x10, + + /* U+1EBB "ẻ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0xc, 0x4, 0x8, + + /* U+1EBC "Ẽ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x7c, 0x24, + + /* U+1EBD "ẽ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x3e, 0x12, + + /* U+1EBE "Ế" */ + 0xff, 0x60, 0x30, 0x18, 0xc, 0x7, 0xf3, 0x1, + 0x80, 0xc0, 0x60, 0x3f, 0x8c, 0x82, 0xc0, 0xd0, + 0x4, 0x0, + + /* U+1EBF "ế" */ + 0x0, 0xf, 0x86, 0x31, 0x80, 0x40, 0x1f, 0xc4, + 0x31, 0x8c, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, + 0x0, 0x20, 0x0, + + /* U+1EC0 "Ề" */ + 0x3f, 0xcc, 0x3, 0x0, 0xc0, 0x30, 0xf, 0xe3, + 0x0, 0xc0, 0x30, 0xc, 0x3, 0xf8, 0x66, 0xb, + 0x9, 0x6, 0x0, + + /* U+1EC1 "ề" */ + 0x0, 0xf, 0x8c, 0x66, 0x2, 0x1, 0xfc, 0x86, + 0x63, 0x1f, 0x2, 0x0, 0x1, 0x62, 0x43, 0x0, + + /* U+1EC2 "Ể" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x44, 0x2c, 0x1a, 0x1, 0x2, + + /* U+1EC3 "ể" */ + 0x0, 0x1f, 0x18, 0xcc, 0x4, 0x3, 0xf9, 0xc, + 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, + 0x4, + + /* U+1EC4 "Ễ" */ + 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, + 0xc0, 0xc0, 0xfe, 0x44, 0x2c, 0x10, 0x8, 0x20, + + /* U+1EC5 "ễ" */ + 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, + 0x3e, 0x8, 0x0, 0x16, 0x8, 0x4, 0x10, + + /* U+1EC6 "Ệ" */ + 0x8, 0x8, 0x0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, + 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, 0x0, + 0x28, 0x18, + + /* U+1EC7 "ệ" */ + 0x8, 0x8, 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, + 0x43, 0x63, 0x3e, 0x8, 0x0, 0x14, 0xc, + + /* U+1EC8 "Ỉ" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc0, 0x6, 0x24, + + /* U+1EC9 "ỉ" */ + 0xcc, 0xcc, 0xcc, 0xcc, 0x0, 0x62, 0x40, + + /* U+1ECA "Ị" */ + 0x48, 0x6d, 0xb6, 0xdb, 0x6d, 0x80, + + /* U+1ECB "ị" */ + 0x48, 0x6d, 0xb6, 0xdb, 0x1, 0x80, + + /* U+1ECC "Ọ" */ + 0x4, 0x0, 0x80, 0x0, 0xf, 0x83, 0x18, 0xc1, + 0x98, 0x33, 0x6, 0x40, 0x48, 0x9, 0x83, 0x30, + 0x63, 0x18, 0x3e, 0x1, 0x0, + + /* U+1ECD "ọ" */ + 0x8, 0x4, 0x0, 0x7, 0xc6, 0x33, 0x9, 0x4, + 0x82, 0x41, 0x31, 0x8f, 0x81, 0x0, + + /* U+1ECE "Ỏ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0x0, 0x1, 0x80, 0x10, 0x4, 0x0, + + /* U+1ECF "ỏ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x80, 0x40, 0x40, + + /* U+1ED0 "Ố" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0xc0, 0x16, 0x1, 0xa0, 0x2, 0x0, 0x0, + + /* U+1ED1 "ố" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, + 0x0, 0x20, 0x0, + + /* U+1ED2 "Ồ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0xc0, 0x16, 0x9, 0x3, 0x0, + + /* U+1ED3 "ồ" */ + 0x0, 0x7, 0xc3, 0x18, 0xc2, 0x20, 0x88, 0x22, + 0x8, 0xc6, 0x1f, 0x1, 0x0, 0x0, 0x2c, 0x24, + 0x18, 0x0, + + /* U+1ED4 "Ổ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0x16, 0x1, 0xa0, 0x2, 0x0, 0x80, + + /* U+1ED5 "ổ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, + 0x4, + + /* U+1ED6 "Ỗ" */ + 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, + 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, + 0x80, 0x40, 0x16, 0x1, 0x0, 0x10, 0x8, 0x0, + + /* U+1ED7 "ỗ" */ + 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, + 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0x80, 0x20, + 0x40, + + /* U+1ED8 "Ộ" */ + 0x4, 0x0, 0x80, 0x0, 0xf, 0x83, 0x18, 0xc1, + 0x98, 0x33, 0x6, 0x40, 0x48, 0x9, 0x83, 0x30, + 0x63, 0x18, 0x3e, 0x3, 0x0, 0x50, 0x6, 0x0, + + /* U+1ED9 "ộ" */ + 0x8, 0x4, 0x0, 0x7, 0xc6, 0x33, 0x9, 0x4, + 0x82, 0x41, 0x31, 0x8f, 0x81, 0x0, 0x0, 0xa0, + 0x30, + + /* U+1EDA "Ớ" */ + 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, + 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, + 0xc1, 0xf6, 0x4, 0x20, 0x60, 0x3, 0x0, + + /* U+1EDB "ớ" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x30, 0x6, + 0x0, + + /* U+1EDC "Ờ" */ + 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, + 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, + 0xc1, 0xf6, 0x6, 0x20, 0x40, 0xc, 0x0, + + /* U+1EDD "ờ" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x20, 0x18, + 0x0, + + /* U+1EDE "Ở" */ + 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, + 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, + 0xc1, 0xf6, 0x4, 0x20, 0x0, 0x6, 0x0, 0x20, + 0x4, 0x0, + + /* U+1EDF "ở" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x30, 0x4, + 0x2, 0x0, + + /* U+1EE0 "Ỡ" */ + 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, + 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, + 0xc1, 0xf6, 0x4, 0x21, 0xf0, 0x9, 0x0, + + /* U+1EE1 "ỡ" */ + 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, + 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0xf8, 0x12, + 0x0, + + /* U+1EE2 "Ợ" */ + 0x4, 0x0, 0x40, 0x0, 0x1, 0xf0, 0x31, 0x86, + 0x8, 0x60, 0xc4, 0xc, 0x40, 0xc4, 0xc, 0x40, + 0xc6, 0xc, 0x21, 0xc1, 0xf6, 0x4, 0x20, 0x0, + + /* U+1EE3 "ợ" */ + 0x8, 0x2, 0x0, 0x0, 0xf8, 0x63, 0x18, 0x44, + 0x11, 0x4, 0x41, 0x18, 0xc3, 0xf8, 0x22, 0x0, + 0x0, + + /* U+1EE4 "Ụ" */ + 0x8, 0x4, 0x0, 0x7, 0xc6, 0x36, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x8, + 0x0, + + /* U+1EE5 "ụ" */ + 0x10, 0x20, 0x3, 0xfc, 0x78, 0xf1, 0xe3, 0xc7, + 0x8f, 0x18, 0x0, + + /* U+1EE6 "Ủ" */ + 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, + 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x0, + 0x30, 0x8, 0x8, 0x0, + + /* U+1EE7 "ủ" */ + 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, + 0x0, 0x0, 0xc0, 0x82, 0x0, + + /* U+1EE8 "Ứ" */ + 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, + 0xcc, 0x12, 0x0, 0x20, 0x0, 0xc, 0x0, 0x60, + + /* U+1EE9 "ứ" */ + 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x60, 0xc, + 0x0, + + /* U+1EEA "Ừ" */ + 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, + 0xcc, 0x12, 0x0, 0x20, 0x0, 0x8, 0x1, 0x80, + + /* U+1EEB "ừ" */ + 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x40, 0x30, + 0x0, + + /* U+1EEC "Ử" */ + 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, + 0xcc, 0x12, 0x0, 0x20, 0x0, 0xc, 0x0, 0x40, + 0x8, 0x0, + + /* U+1EED "ử" */ + 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x60, 0x8, + 0x4, 0x0, + + /* U+1EEE "Ữ" */ + 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, + 0xcc, 0x12, 0x0, 0x20, 0x0, 0x3e, 0x1, 0x20, + + /* U+1EEF "ữ" */ + 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc7, 0x80, 0x20, 0x1, 0xf0, 0x24, + 0x0, + + /* U+1EF0 "Ự" */ + 0x8, 0x0, 0x80, 0x0, 0x3, 0xe0, 0x63, 0xc, + 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x10, 0xc1, + 0xc, 0x18, 0xc1, 0xcc, 0x12, 0x0, 0x20, + + /* U+1EF1 "ự" */ + 0x10, 0x4, 0x0, 0x1, 0xf8, 0xc6, 0x31, 0x8c, + 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x78, 0x2, 0x0, + 0x0, + + /* U+1EF2 "Ỳ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x8, + 0x6, 0x0, + + /* U+1EF3 "ỳ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x10, 0x30, + + /* U+1EF4 "Ỵ" */ + 0x8, 0x2, 0x0, 0x0, 0x30, 0xc, 0x3, 0x0, + 0xc0, 0x30, 0x1c, 0x5, 0x83, 0x20, 0x8c, 0x61, + 0x10, 0x60, 0x0, + + /* U+1EF5 "ỵ" */ + 0x4, 0x64, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, + + /* U+1EF6 "Ỷ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x0, + 0x3, 0x0, 0x40, 0x20, + + /* U+1EF7 "ỷ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0xc, 0x4, + 0x8, + + /* U+1EF8 "Ỹ" */ + 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, + 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x3e, + 0x4, 0x80, + + /* U+1EF9 "ỹ" */ + 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, + 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x7c, 0x24, + + /* U+1F4D "Ὅ" */ + 0x0, 0x0, 0xf8, 0x18, 0xc3, 0x6, 0x30, 0x63, + 0x6, 0x20, 0x22, 0x2, 0x30, 0x63, 0x6, 0x18, + 0xc0, 0xf8, 0xa2, 0xf, 0x0, 0x10, 0x0, + + /* U+2000 " " */ + +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 63, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 66, .box_h = 13, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4, .adv_w = 82, .box_h = 4, .box_w = 4, .ofs_x = 1, .ofs_y = 8}, + {.bitmap_index = 6, .adv_w = 159, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 21, .adv_w = 144, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 39, .adv_w = 188, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 59, .adv_w = 159, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 76, .adv_w = 45, .box_h = 4, .box_w = 2, .ofs_x = 0, .ofs_y = 8}, + {.bitmap_index = 77, .adv_w = 88, .box_h = 17, .box_w = 5, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 88, .adv_w = 89, .box_h = 17, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 99, .adv_w = 110, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 106, .adv_w = 145, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 117, .adv_w = 50, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 119, .adv_w = 71, .box_h = 2, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 121, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 122, .adv_w = 106, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 134, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 149, .adv_w = 144, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 157, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 171, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 184, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 198, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 211, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 224, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 238, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 253, .adv_w = 144, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 265, .adv_w = 62, .box_h = 10, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 268, .adv_w = 54, .box_h = 12, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 273, .adv_w = 130, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 280, .adv_w = 141, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 285, .adv_w = 134, .box_h = 8, .box_w = 7, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 292, .adv_w = 121, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 304, .adv_w = 230, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 332, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 349, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 363, .adv_w = 167, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 380, .adv_w = 168, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 394, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 406, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 418, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 435, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 450, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 453, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 466, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 480, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 492, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 510, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 525, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 543, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 557, .adv_w = 176, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 577, .adv_w = 158, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 591, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 606, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 621, .adv_w = 166, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 636, .adv_w = 163, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 651, .adv_w = 227, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 672, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 687, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 702, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 716, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 724, .adv_w = 105, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 736, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 744, .adv_w = 107, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 751, .adv_w = 116, .box_h = 2, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 753, .adv_w = 79, .box_h = 3, .box_w = 4, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 755, .adv_w = 139, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 765, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 778, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 788, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 801, .adv_w = 136, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 811, .adv_w = 89, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 821, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 834, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 845, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 848, .adv_w = 61, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 856, .adv_w = 130, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 868, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 871, .adv_w = 224, .box_h = 9, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 885, .adv_w = 141, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 893, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 905, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 918, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 931, .adv_w = 87, .box_h = 9, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 937, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 947, .adv_w = 84, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 955, .adv_w = 141, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 964, .adv_w = 124, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 973, .adv_w = 192, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 987, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 996, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1009, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1018, .adv_w = 87, .box_h = 16, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1030, .adv_w = 62, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 1034, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1044, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 1049, .adv_w = 63, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1049, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 1052, .adv_w = 140, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1065, .adv_w = 149, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1079, .adv_w = 183, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1095, .adv_w = 155, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1110, .adv_w = 61, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 1114, .adv_w = 157, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1132, .adv_w = 107, .box_h = 3, .box_w = 6, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 1135, .adv_w = 201, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1155, .adv_w = 114, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = 5}, + {.bitmap_index = 1161, .adv_w = 120, .box_h = 7, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1168, .adv_w = 142, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 1173, .adv_w = 71, .box_h = 2, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 1175, .adv_w = 201, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1195, .adv_w = 117, .box_h = 2, .box_w = 7, .ofs_x = 0, .ofs_y = 10}, + {.bitmap_index = 1197, .adv_w = 96, .box_h = 5, .box_w = 4, .ofs_x = 1, .ofs_y = 7}, + {.bitmap_index = 1200, .adv_w = 137, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1210, .adv_w = 94, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 1216, .adv_w = 94, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 1222, .adv_w = 80, .box_h = 3, .box_w = 4, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 1224, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 1236, .adv_w = 125, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1247, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 4}, + {.bitmap_index = 1248, .adv_w = 63, .box_h = 4, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1250, .adv_w = 87, .box_h = 7, .box_w = 4, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 1254, .adv_w = 116, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 1261, .adv_w = 120, .box_h = 7, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1268, .adv_w = 188, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1286, .adv_w = 199, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1304, .adv_w = 199, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1322, .adv_w = 121, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1333, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1353, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1373, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1393, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1413, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1433, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1455, .adv_w = 239, .box_h = 12, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1479, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1499, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1514, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1529, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1544, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1559, .adv_w = 70, .box_h = 15, .box_w = 4, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1567, .adv_w = 70, .box_h = 15, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1575, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1587, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 1599, .adv_w = 172, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1614, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1632, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1653, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1674, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1695, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1716, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1737, .adv_w = 137, .box_h = 8, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1745, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1763, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1780, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1797, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1814, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1831, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1849, .adv_w = 151, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1861, .adv_w = 152, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1875, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1888, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1901, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1914, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1927, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1940, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1954, .adv_w = 216, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1971, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1984, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1997, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2010, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2023, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2036, .adv_w = 63, .box_h = 12, .box_w = 4, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 2042, .adv_w = 63, .box_h = 12, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2048, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 2057, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 2066, .adv_w = 150, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2080, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2091, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2106, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2121, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2136, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2151, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2166, .adv_w = 146, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 2177, .adv_w = 145, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2191, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2203, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2215, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2227, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2239, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2255, .adv_w = 148, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 2271, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2287, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2307, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2320, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2340, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2353, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2375, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2388, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2408, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2421, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2441, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2454, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2474, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2487, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2507, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2520, .adv_w = 168, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2537, .adv_w = 163, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2555, .adv_w = 172, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2570, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2587, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2602, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2615, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2630, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2643, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2658, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2671, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 2687, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2700, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2715, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2728, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2748, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2764, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2784, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2800, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2820, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2836, .adv_w = 174, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 2858, .adv_w = 144, .box_h = 18, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2876, .adv_w = 183, .box_h = 15, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2895, .adv_w = 141, .box_h = 15, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2909, .adv_w = 179, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2927, .adv_w = 145, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2939, .adv_w = 70, .box_h = 15, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, + {.bitmap_index = 2953, .adv_w = 63, .box_h = 12, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, + {.bitmap_index = 2964, .adv_w = 70, .box_h = 15, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, + {.bitmap_index = 2978, .adv_w = 63, .box_h = 12, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, + {.bitmap_index = 2989, .adv_w = 70, .box_h = 15, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2999, .adv_w = 63, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3007, .adv_w = 70, .box_h = 16, .box_w = 3, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3013, .adv_w = 62, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 3021, .adv_w = 70, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3025, .adv_w = 63, .box_h = 9, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3028, .adv_w = 211, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3046, .adv_w = 123, .box_h = 16, .box_w = 6, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3058, .adv_w = 141, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3077, .adv_w = 64, .box_h = 16, .box_w = 6, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 3089, .adv_w = 161, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3107, .adv_w = 130, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3123, .adv_w = 142, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3132, .adv_w = 138, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3146, .adv_w = 62, .box_h = 15, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3154, .adv_w = 138, .box_h = 17, .box_w = 8, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 3171, .adv_w = 62, .box_h = 17, .box_w = 3, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 3178, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3190, .adv_w = 81, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3198, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3210, .adv_w = 90, .box_h = 12, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3216, .adv_w = 138, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3230, .adv_w = 69, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3238, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3256, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3267, .adv_w = 183, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 3289, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 3302, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3320, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3331, .adv_w = 141, .box_h = 12, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 3345, .adv_w = 177, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3363, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3375, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3397, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3412, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3433, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3448, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3469, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3484, .adv_w = 244, .box_h = 13, .box_w = 15, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3509, .adv_w = 233, .box_h = 10, .box_w = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3527, .adv_w = 158, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3543, .adv_w = 87, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3551, .adv_w = 158, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 3571, .adv_w = 87, .box_h = 14, .box_w = 6, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 3582, .adv_w = 158, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3598, .adv_w = 87, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3606, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3623, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3636, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3653, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3666, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3684, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3697, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3714, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3727, .adv_w = 153, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3747, .adv_w = 84, .box_h = 15, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3759, .adv_w = 153, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3777, .adv_w = 89, .box_h = 14, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3790, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3805, .adv_w = 84, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 3814, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3831, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3843, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3860, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3872, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3889, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3901, .adv_w = 166, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3921, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3934, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3951, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3964, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 3981, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3993, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4018, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4036, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4054, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 4070, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4088, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4104, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4116, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4132, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4144, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4160, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4172, .adv_w = 64, .box_h = 13, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4179, .adv_w = 87, .box_h = 17, .box_w = 7, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 4194, .adv_w = 176, .box_h = 14, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4215, .adv_w = 146, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4229, .adv_w = 178, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4249, .adv_w = 158, .box_h = 11, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4263, .adv_w = 64, .box_h = 16, .box_w = 6, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 4275, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4296, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4310, .adv_w = 239, .box_h = 15, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 4340, .adv_w = 216, .box_h = 13, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4362, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4384, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4400, .adv_w = 152, .box_h = 17, .box_w = 9, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 4420, .adv_w = 132, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 4434, .adv_w = 153, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 4456, .adv_w = 84, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 4466, .adv_w = 64, .box_h = 13, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 4473, .adv_w = 135, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4483, .adv_w = 51, .box_h = 4, .box_w = 3, .ofs_x = 0, .ofs_y = 8}, + {.bitmap_index = 4485, .adv_w = 121, .box_h = 3, .box_w = 6, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 4488, .adv_w = 114, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 4490, .adv_w = 117, .box_h = 2, .box_w = 7, .ofs_x = 0, .ofs_y = 10}, + {.bitmap_index = 4492, .adv_w = 109, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 4494, .adv_w = 62, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 4495, .adv_w = 86, .box_h = 4, .box_w = 5, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 4498, .adv_w = 69, .box_h = 5, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 4501, .adv_w = 121, .box_h = 3, .box_w = 7, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 4504, .adv_w = 96, .box_h = 3, .box_w = 7, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 4507, .adv_w = 75, .box_h = 4, .box_w = 3, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 4509, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -6, .ofs_y = 9}, + {.bitmap_index = 4511, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -5, .ofs_y = 9}, + {.bitmap_index = 4513, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 9}, + {.bitmap_index = 4516, .adv_w = 0, .box_h = 4, .box_w = 4, .ofs_x = -6, .ofs_y = 9}, + {.bitmap_index = 4518, .adv_w = 0, .box_h = 3, .box_w = 6, .ofs_x = -8, .ofs_y = 9}, + {.bitmap_index = 4521, .adv_w = 62, .box_h = 2, .box_w = 3, .ofs_x = -6, .ofs_y = -3}, + {.bitmap_index = 4522, .adv_w = 66, .box_h = 4, .box_w = 3, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 4524, .adv_w = 129, .box_h = 5, .box_w = 8, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 4529, .adv_w = 167, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4547, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 4}, + {.bitmap_index = 4548, .adv_w = 158, .box_h = 13, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 4566, .adv_w = 195, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4586, .adv_w = 82, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4593, .adv_w = 179, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4613, .adv_w = 166, .box_h = 13, .box_w = 12, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 4633, .adv_w = 173, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4650, .adv_w = 83, .box_h = 15, .box_w = 8, .ofs_x = -2, .ofs_y = -1}, + {.bitmap_index = 4665, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4682, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4696, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4708, .adv_w = 181, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4725, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4737, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4751, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4766, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4783, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4786, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4800, .adv_w = 168, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4817, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4835, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4850, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4864, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4882, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4897, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4911, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4925, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4940, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4955, .adv_w = 183, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4972, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4987, .adv_w = 177, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5004, .adv_w = 170, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5019, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 5031, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5049, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5065, .adv_w = 138, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5079, .adv_w = 145, .box_h = 17, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 5094, .adv_w = 83, .box_h = 14, .box_w = 4, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5101, .adv_w = 140, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5116, .adv_w = 145, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5128, .adv_w = 152, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 5143, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5156, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5172, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5182, .adv_w = 133, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 5197, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 5209, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5224, .adv_w = 83, .box_h = 10, .box_w = 4, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5229, .adv_w = 142, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5238, .adv_w = 142, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5253, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 5265, .adv_w = 124, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5274, .adv_w = 126, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5290, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5302, .adv_w = 153, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5315, .adv_w = 145, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 5328, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 5340, .adv_w = 145, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5352, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5362, .adv_w = 140, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5371, .adv_w = 180, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5389, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5398, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5416, .adv_w = 211, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5433, .adv_w = 83, .box_h = 13, .box_w = 6, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 5443, .adv_w = 140, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5455, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5471, .adv_w = 140, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5484, .adv_w = 211, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5507, .adv_w = 148, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5522, .adv_w = 136, .box_h = 12, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 5537, .adv_w = 201, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5554, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5569, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5584, .adv_w = 192, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5604, .adv_w = 142, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5619, .adv_w = 173, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5636, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5651, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5654, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 5666, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5679, .adv_w = 275, .box_h = 12, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5705, .adv_w = 277, .box_h = 12, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5729, .adv_w = 208, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5747, .adv_w = 161, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5763, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5780, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5800, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 5817, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5834, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5848, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5862, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5874, .adv_w = 193, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 5897, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5909, .adv_w = 232, .box_h = 12, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5932, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5947, .adv_w = 183, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5961, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5978, .adv_w = 165, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5993, .adv_w = 181, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6008, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6026, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6041, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6059, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6074, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6088, .adv_w = 167, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6105, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6120, .adv_w = 161, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6137, .adv_w = 198, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6157, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6172, .adv_w = 187, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 6193, .adv_w = 175, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6207, .adv_w = 241, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6227, .adv_w = 248, .box_h = 15, .box_w = 14, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 6254, .adv_w = 194, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6272, .adv_w = 221, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6290, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6304, .adv_w = 173, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6319, .adv_w = 229, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6341, .adv_w = 163, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6355, .adv_w = 139, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6365, .adv_w = 142, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6381, .adv_w = 146, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6390, .adv_w = 107, .box_h = 9, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6397, .adv_w = 155, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 6412, .adv_w = 136, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6422, .adv_w = 196, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6436, .adv_w = 130, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6446, .adv_w = 148, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6455, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6467, .adv_w = 138, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6476, .adv_w = 148, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6487, .adv_w = 190, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6499, .adv_w = 148, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6507, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6519, .adv_w = 148, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6528, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 6541, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6551, .adv_w = 123, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6560, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 6573, .adv_w = 186, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 6595, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6604, .adv_w = 152, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 6618, .adv_w = 139, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6627, .adv_w = 207, .box_h = 9, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6640, .adv_w = 212, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 6658, .adv_w = 159, .box_h = 9, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6670, .adv_w = 199, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6682, .adv_w = 139, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6690, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6700, .adv_w = 209, .box_h = 10, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6715, .adv_w = 141, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6724, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6737, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6750, .adv_w = 141, .box_h = 16, .box_w = 9, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 6768, .adv_w = 107, .box_h = 12, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6777, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6787, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6797, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6800, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 6809, .adv_w = 61, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 6817, .adv_w = 217, .box_h = 9, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6833, .adv_w = 221, .box_h = 9, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6848, .adv_w = 145, .box_h = 12, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 6862, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6874, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6886, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 6902, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 6914, .adv_w = 225, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6934, .adv_w = 197, .box_h = 10, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6948, .adv_w = 161, .box_h = 12, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 6965, .adv_w = 139, .box_h = 13, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 6980, .adv_w = 230, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7002, .adv_w = 191, .box_h = 10, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7016, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7031, .adv_w = 137, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7042, .adv_w = 226, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7062, .adv_w = 194, .box_h = 9, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7075, .adv_w = 218, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7093, .adv_w = 188, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7105, .adv_w = 289, .box_h = 12, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7129, .adv_w = 250, .box_h = 9, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7145, .adv_w = 133, .box_h = 20, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7165, .adv_w = 123, .box_h = 17, .box_w = 7, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7180, .adv_w = 177, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7197, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7215, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 7232, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 7244, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7259, .adv_w = 128, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7270, .adv_w = 161, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7288, .adv_w = 128, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7302, .adv_w = 297, .box_h = 16, .box_w = 19, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7340, .adv_w = 267, .box_h = 13, .box_w = 17, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7368, .adv_w = 174, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7387, .adv_w = 145, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 7400, .adv_w = 224, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7424, .adv_w = 197, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 7444, .adv_w = 225, .box_h = 15, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7467, .adv_w = 198, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7485, .adv_w = 166, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7504, .adv_w = 137, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7516, .adv_w = 160, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7530, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 9}, + {.bitmap_index = 7533, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 10}, + {.bitmap_index = 7536, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -6, .ofs_y = 10}, + {.bitmap_index = 7538, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -5, .ofs_y = 10}, + {.bitmap_index = 7540, .adv_w = 0, .box_h = 15, .box_w = 16, .ofs_x = -11, .ofs_y = -3}, + {.bitmap_index = 7570, .adv_w = 0, .box_h = 16, .box_w = 15, .ofs_x = -11, .ofs_y = -4}, + {.bitmap_index = 7600, .adv_w = 183, .box_h = 19, .box_w = 11, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 7627, .adv_w = 148, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 7645, .adv_w = 161, .box_h = 12, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 7662, .adv_w = 139, .box_h = 13, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 7677, .adv_w = 163, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7691, .adv_w = 145, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 7704, .adv_w = 141, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7718, .adv_w = 114, .box_h = 11, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7727, .adv_w = 142, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7741, .adv_w = 107, .box_h = 9, .box_w = 8, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 7750, .adv_w = 155, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 7765, .adv_w = 129, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 7776, .adv_w = 232, .box_h = 15, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7806, .adv_w = 196, .box_h = 12, .box_w = 13, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7826, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7844, .adv_w = 130, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7857, .adv_w = 165, .box_h = 15, .box_w = 10, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 7876, .adv_w = 138, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 7890, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7904, .adv_w = 144, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7913, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7930, .adv_w = 132, .box_h = 12, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 7945, .adv_w = 210, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7966, .adv_w = 177, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7979, .adv_w = 183, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8000, .adv_w = 148, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8014, .adv_w = 250, .box_h = 12, .box_w = 15, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8037, .adv_w = 183, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8049, .adv_w = 262, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8078, .adv_w = 223, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8098, .adv_w = 190, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8118, .adv_w = 154, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8131, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8151, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8164, .adv_w = 153, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8183, .adv_w = 123, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8195, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8210, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8223, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8238, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8251, .adv_w = 161, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8272, .adv_w = 127, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8286, .adv_w = 230, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8313, .adv_w = 172, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8330, .adv_w = 175, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8351, .adv_w = 139, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8365, .adv_w = 174, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8379, .adv_w = 141, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8387, .adv_w = 174, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8401, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8412, .adv_w = 198, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8432, .adv_w = 152, .box_h = 10, .box_w = 10, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 8445, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8469, .adv_w = 152, .box_h = 13, .box_w = 10, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 8486, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8489, .adv_w = 232, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8518, .adv_w = 196, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8536, .adv_w = 161, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8553, .adv_w = 139, .box_h = 11, .box_w = 8, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 8564, .adv_w = 181, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8588, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 8605, .adv_w = 182, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8623, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8635, .adv_w = 183, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8657, .adv_w = 148, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8672, .adv_w = 175, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 8689, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8701, .adv_w = 224, .box_h = 16, .box_w = 14, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8729, .adv_w = 190, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 8749, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8752, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8772, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8785, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8805, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8818, .adv_w = 239, .box_h = 12, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 8842, .adv_w = 216, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8859, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8874, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8887, .adv_w = 177, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8905, .adv_w = 135, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8915, .adv_w = 177, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8936, .adv_w = 135, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8949, .adv_w = 232, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8978, .adv_w = 196, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8996, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9014, .adv_w = 130, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9027, .adv_w = 149, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9042, .adv_w = 149, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9057, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9074, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9086, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9103, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9115, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9136, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9151, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9168, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9180, .adv_w = 174, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9199, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9214, .adv_w = 173, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9232, .adv_w = 138, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9245, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9265, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9281, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9301, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9317, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9337, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9353, .adv_w = 175, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9370, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9382, .adv_w = 142, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 9397, .adv_w = 107, .box_h = 12, .box_w = 6, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 9406, .adv_w = 221, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9427, .adv_w = 199, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9442, .adv_w = 151, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9462, .adv_w = 105, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9475, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9495, .adv_w = 127, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9508, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9523, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9532, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9546, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9559, .adv_w = 211, .box_h = 12, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9579, .adv_w = 221, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9602, .adv_w = 203, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9622, .adv_w = 165, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9635, .adv_w = 137, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 9650, .adv_w = 129, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 9662, .adv_w = 248, .box_h = 13, .box_w = 15, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9687, .adv_w = 207, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9704, .adv_w = 255, .box_h = 13, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9727, .adv_w = 212, .box_h = 10, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9742, .adv_w = 159, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9759, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9769, .adv_w = 182, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9787, .adv_w = 164, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9800, .adv_w = 173, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9815, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9825, .adv_w = 181, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9849, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9866, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9888, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 9901, .adv_w = 224, .box_h = 14, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9922, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9940, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9965, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9983, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10008, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10026, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10051, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10069, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10090, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10102, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10124, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10138, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10160, .adv_w = 139, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10179, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10200, .adv_w = 139, .box_h = 14, .box_w = 9, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 10216, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10238, .adv_w = 139, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10255, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10277, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10292, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10316, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10331, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10355, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10370, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10392, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10406, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10428, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10443, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10467, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10482, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10506, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10521, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 10536, .adv_w = 136, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10548, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10564, .adv_w = 136, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10578, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10593, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10606, .adv_w = 146, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10624, .adv_w = 136, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10643, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, + {.bitmap_index = 10662, .adv_w = 136, .box_h = 14, .box_w = 9, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 10678, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10694, .adv_w = 136, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10711, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10727, .adv_w = 136, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10742, .adv_w = 146, .box_h = 18, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 10760, .adv_w = 136, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10775, .adv_w = 70, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10783, .adv_w = 63, .box_h = 13, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10790, .adv_w = 70, .box_h = 15, .box_w = 3, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 10796, .adv_w = 62, .box_h = 15, .box_w = 3, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 10802, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10823, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10837, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10861, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10877, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10901, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10920, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10942, .adv_w = 146, .box_h = 14, .box_w = 10, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 10960, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10984, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11001, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11025, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11042, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 11066, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 11083, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11106, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11123, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11146, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11163, .adv_w = 176, .box_h = 17, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11189, .adv_w = 146, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11207, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11230, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 11247, .adv_w = 176, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 11271, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 11288, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 11305, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 11316, .adv_w = 166, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11336, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11349, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11373, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11390, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11414, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11431, .adv_w = 178, .box_h = 17, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11457, .adv_w = 158, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11475, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11499, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 11516, .adv_w = 178, .box_h = 15, .box_w = 12, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 11539, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 11556, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11574, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 11590, .adv_w = 154, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 11609, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 11622, .adv_w = 154, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11642, .adv_w = 121, .box_h = 17, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 11659, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11677, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 11693, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = -1, .ofs_y = -1}, + {.bitmap_index = 11716, .adv_w = 131, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} +}; + + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_2 = { + 0x0, 0xe, 0xf, 0x1d, 0x1e, 0x5e, 0x68, 0x69, + 0x6a, 0x6b, 0x6c, 0x6d, 0x86, 0x87, 0x88, 0x89, + 0xa5, 0xc7, 0x12a, 0x134, 0x135, 0x137, 0x146, 0x147, + 0x148, 0x149, 0x14a, 0x14b, 0x161, 0x16e, 0x16f, 0x171, + 0x177, 0x17d, 0x191, 0x1f2, 0x1f3, 0x1f4, 0x1f5, 0x1f6, + 0x1f7, 0x1f8, 0x1fa +}; + +static uint8_t glyph_id_ofs_list_5 = { + 0, 1, 0, 0, 0, 2 +} + +static uint16_t unicode_list_8 = { + 0x0, 0x1, 0x3e, 0x3f, 0x80, 0x81, 0x82, 0x83, + 0x84, 0x85 +}; + +static uint16_t unicode_list_10 = { + 0x0, 0xb3 +}; + + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 160, .range_length = 224, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 96, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 402, .range_length = 507, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 320, .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL + }, + { + .range_start = 910, .range_length = 20, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 363, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 931, .range_length = 44, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 383, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 977, .range_length = 6, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, + .glyph_id_start = 427, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_5 + }, + { + .range_start = 1024, .range_length = 135, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 430, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 1160, .range_length = 140, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 565, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 7680, .range_length = 134, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 705, .unicode_list = unicode_list_8, .glyph_id_ofs_list = NULL + }, + { + .range_start = 7840, .range_length = 90, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 715, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 8013, .range_length = 180, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 805, .unicode_list = unicode_list_10, .glyph_id_ofs_list = NULL + } +}; + + +/*----------------- + * KERNING + *----------------*/ + + +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = +{ + 0, 1, 0, 2, 0, 0, 0, 0, + 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 7, 8, 9, 10, 11, + 0, 12, 12, 13, 14, 15, 12, 12, + 9, 16, 17, 18, 0, 19, 13, 20, + 21, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 27, 28, 0, 29, 30, + 0, 31, 0, 0, 32, 0, 31, 31, + 33, 27, 0, 34, 0, 35, 0, 36, + 37, 38, 36, 39, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 6, 6, 6, 6, 6, 6, 0, 8, + 10, 10, 10, 10, 12, 12, 12, 12, + 9, 12, 9, 9, 9, 9, 9, 0, + 0, 13, 13, 13, 13, 23, 0, 0, + 26, 26, 26, 26, 26, 26, 0, 28, + 29, 29, 29, 29, 0, 0, 0, 0, + 0, 31, 33, 33, 33, 33, 33, 0, + 0, 0, 0, 0, 0, 36, 27, 36, + 6, 26, 6, 26, 6, 26, 8, 28, + 8, 28, 8, 28, 8, 28, 9, 0, + 9, 0, 10, 29, 10, 29, 10, 29, + 10, 29, 10, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 31, 0, 0, + 12, 0, 12, 0, 12, 0, 12, 0, + 12, 0, 0, 0, 13, 0, 14, 0, + 0, 15, 0, 15, 0, 15, 0, 15, + 0, 0, 0, 12, 31, 12, 31, 12, + 31, 31, 0, 0, 9, 33, 9, 33, + 9, 33, 0, 0, 0, 34, 0, 34, + 0, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 19, 0, 19, 0, 19, 0, + 13, 0, 13, 0, 13, 0, 13, 0, + 13, 0, 13, 0, 21, 0, 23, 36, + 23, 24, 39, 24, 39, 24, 39, 0, + 0, 0, 0, 0, 0, 0, 6, 26, + 0, 0, 0, 0, 0, 0, 19, 0, + 0, 29, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 10, + 12, 12, 9, 23, 0, 0, 6, 7, + 41, 6, 10, 24, 12, 9, 12, 14, + 6, 12, 12, 42, 9, 0, 16, 43, + 19, 23, 44, 22, 45, 0, 12, 23, + 0, 0, 31, 0, 0, 46, 0, 36, + 47, 0, 48, 31, 0, 49, 0, 50, + 0, 36, 51, 33, 0, 52, 53, 54, + 55, 56, 57, 0, 58, 59, 0, 0, + 33, 0, 0, 0, 0, 0, 10, 10, + 60, 41, 0, 0, 12, 12, 13, 61, + 61, 62, 14, 0, 63, 12, 6, 64, + 7, 41, 65, 10, 22, 66, 12, 0, + 14, 12, 12, 12, 9, 0, 16, 8, + 19, 63, 0, 22, 12, 0, 12, 67, + 61, 0, 61, 68, 69, 70, 26, 71, + 72, 73, 74, 29, 38, 28, 0, 0, + 75, 0, 0, 0, 33, 0, 27, 28, + 76, 36, 27, 38, 77, 0, 0, 78, + 79, 0, 79, 27, 80, 0, 29, 29, + 0, 73, 81, 0, 0, 0, 0, 79, + 79, 0, 0, 0, 36, 0, 0, 0, + 61, 79, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 33, 20, 36, 20, 36, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 41, 73, 41, + 0, 0, 0, 22, 38, 0, 0, 14, + 0, 14, 0, 14, 0, 14, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 8, + 28, 19, 0, 23, 36, 23, 0, 22, + 38, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 0, 12, 22, 38, + 0, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 12, 0, 12, 6, 26, 6, + 26, 0, 0, 10, 29, 0, 29, 0, + 29, 22, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 33, 0, 0, 0, + 33, 0, 27, 63, 36, 63, 36, 63, + 36, 0, 0, 41, 73, 0, 0, 0, + 73, 22, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 6, 26, 12, 31, 21, 0, 21, + 0, 21, 0, 6, 26, 6, 26, 6, + 26, 6, 26, 6, 26, 6, 26, 6, + 26, 6, 26, 6, 26, 6, 26, 6, + 26, 6, 26, 10, 29, 10, 29, 10, + 29, 10, 29, 10, 29, 10, 29, 10, + 29, 10, 29, 12, 0, 12, 0, 9, + 33, 9, 33, 9, 33, 9, 33, 9, + 33, 9, 33, 9, 33, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 13, + 0, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 23, 36, 23, + 36, 23, 36, 23, 36, 9, 0 +}; + +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = +{ + 0, 1, 0, 2, 0, 0, 0, 3, + 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 11, 0, 12, 0, 0, 0, + 12, 0, 0, 13, 0, 0, 0, 0, + 12, 0, 12, 0, 14, 15, 16, 17, + 18, 19, 20, 21, 0, 0, 22, 0, + 0, 0, 23, 0, 24, 24, 24, 25, + 24, 0, 0, 0, 0, 0, 26, 26, + 27, 26, 24, 28, 29, 30, 31, 32, + 33, 34, 32, 35, 0, 0, 36, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 38, 0, 0, 0, 0, + 11, 11, 11, 11, 11, 11, 39, 12, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 12, 12, 12, 12, 12, 0, + 12, 16, 16, 16, 16, 20, 0, 0, + 23, 23, 23, 23, 23, 23, 40, 24, + 24, 24, 24, 24, 0, 0, 0, 0, + 0, 26, 27, 27, 27, 27, 27, 0, + 41, 31, 31, 31, 31, 32, 0, 32, + 11, 23, 11, 23, 11, 23, 12, 24, + 12, 24, 12, 24, 12, 24, 0, 24, + 0, 0, 0, 24, 0, 24, 0, 24, + 0, 24, 0, 24, 12, 24, 12, 24, + 12, 24, 12, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 0, 26, 0, + 26, 26, 0, 0, 12, 27, 12, 27, + 12, 27, 12, 24, 0, 0, 0, 0, + 0, 0, 14, 29, 14, 29, 14, 29, + 14, 29, 15, 0, 15, 0, 0, 0, + 16, 31, 16, 31, 16, 31, 16, 31, + 16, 31, 16, 31, 18, 0, 20, 32, + 20, 21, 35, 21, 35, 21, 35, 0, + 0, 12, 24, 42, 31, 0, 11, 23, + 0, 0, 12, 0, 14, 29, 15, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 12, 20, 0, 0, 11, 0, + 0, 11, 0, 21, 0, 12, 0, 0, + 11, 0, 0, 43, 12, 0, 0, 44, + 0, 20, 45, 19, 46, 0, 0, 20, + 24, 0, 26, 0, 31, 24, 47, 32, + 0, 48, 49, 26, 50, 51, 0, 52, + 0, 32, 53, 27, 54, 55, 56, 24, + 57, 31, 58, 0, 59, 60, 0, 31, + 27, 31, 0, 0, 0, 0, 0, 0, + 15, 0, 12, 0, 0, 0, 13, 61, + 0, 15, 0, 0, 62, 0, 11, 0, + 0, 0, 63, 0, 19, 0, 0, 0, + 0, 61, 0, 0, 12, 0, 0, 12, + 15, 62, 0, 19, 0, 64, 0, 0, + 0, 0, 65, 66, 0, 0, 23, 67, + 68, 26, 69, 24, 34, 70, 26, 26, + 26, 71, 26, 26, 27, 26, 26, 24, + 72, 32, 24, 34, 26, 73, 26, 26, + 74, 75, 26, 76, 26, 77, 24, 24, + 0, 26, 24, 29, 0, 0, 0, 71, + 26, 0, 26, 26, 32, 78, 12, 79, + 0, 0, 0, 0, 11, 0, 0, 0, + 80, 0, 0, 0, 0, 0, 0, 0, + 12, 27, 17, 32, 17, 32, 12, 24, + 12, 81, 12, 24, 12, 82, 12, 24, + 0, 0, 0, 0, 0, 0, 0, 0, + 26, 0, 0, 0, 83, 0, 84, 0, + 0, 0, 0, 19, 34, 0, 0, 0, + 26, 0, 78, 0, 0, 15, 85, 0, + 26, 0, 26, 0, 68, 12, 24, 12, + 24, 15, 0, 20, 32, 20, 0, 19, + 34, 15, 0, 64, 73, 86, 87, 0, + 0, 88, 89, 0, 0, 0, 19, 34, + 0, 0, 61, 71, 0, 26, 0, 26, + 64, 73, 0, 26, 0, 11, 23, 11, + 23, 0, 0, 0, 24, 90, 24, 0, + 24, 19, 34, 0, 0, 0, 0, 0, + 26, 0, 26, 12, 27, 12, 24, 12, + 27, 0, 0, 62, 32, 62, 32, 62, + 32, 64, 73, 0, 26, 0, 26, 0, + 26, 19, 34, 0, 0, 91, 24, 24, + 24, 92, 93, 94, 95, 61, 0, 0, + 96, 12, 24, 97, 98, 99, 0, 61, + 71, 11, 23, 0, 26, 18, 0, 18, + 0, 18, 0, 11, 23, 11, 23, 11, + 23, 11, 23, 11, 23, 11, 23, 11, + 23, 11, 23, 11, 23, 11, 23, 11, + 23, 11, 23, 0, 24, 0, 24, 0, + 24, 0, 24, 0, 24, 0, 24, 0, + 24, 0, 24, 0, 0, 0, 0, 12, + 27, 12, 27, 12, 27, 12, 27, 12, + 27, 12, 27, 12, 27, 12, 24, 12, + 24, 12, 24, 12, 27, 12, 24, 16, + 31, 16, 31, 0, 31, 0, 31, 0, + 31, 0, 31, 0, 31, 20, 32, 20, + 32, 20, 32, 20, 32, 12, 0 +}; + +/*Kern values between classes*/ +static uint8_t kern_class_values = +{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -5, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -13, 0, 0, 0, + 0, 0, 0, 0, 0, -15, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -6, -7, 0, -2, -8, 0, -10, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 2, + 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,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 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -8, 0, 0, + 0, 0, -4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -3, 0, + -3, -3, 0, 0, 0, -3, -5, -8, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -3, -9, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -5, 0, 0, 0, 0, -9, -12, + 0, 0, 0, 0, 0, -10, 0, -6, + -7, 0, 0, -12, 0, -7, 0, 0, + -3, 0, 0, -6, 0, -6, 0, 0, + -7, -2, 0, -42, 0, 0, 0, 0, + 0, 0, 0, 0, 2, -8, 0, 0, + -34, -7, -22, -18, 0, -30, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -5, -17, -11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -40, 0, 0, 0, 0, -17, + 0, -25, 0, 0, 0, 0, 0, -4, + 0, -3, 0, -1, -2, 0, 0, -2, + 0, 0, 2, 0, 2, 0, 0, 0, + 0, 0, 0, -12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -4, 0, 0, -3, -2, 0, 0, 0, + 0, -7, 0, -11, 0, 0, 0, 0, + 0, -7, 0, -5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -5, 0, + -3, -2, 0, -4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -10, 0, -2, 0, 0, -6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -5, 0, + 0, 0, 0, -27, -29, 0, 0, 0, + -10, -3, -30, -2, 2, 0, 2, 2, + 0, 2, 0, 0, -14, -12, 0, -14, + -12, -9, -14, 0, -12, -9, -7, -10, + -7, 0, -41, -27, -22, -14, -12, 0, + 0, 0, -10, 0, 0, -16, 0, 0, + -19, 0, 0, -15, -19, -12, -12, -19, + -18, -20, -7, 0, -11, 0, 2, 0, + -3, -12, -17, -16, -16, -10, -16, 0, + -16, -16, -17, -16, -16, 0, -13, -5, + -16, -13, -10, 0, -16, -13, -18, -3, + -19, 0, -14, 0, -10, -17, 2, -14, + -2, 0, 0, 0, 3, 0, -28, -5, + 0, 0, 0, -9, -2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, -6, + -5, 0, 0, -6, -4, 0, 0, -3, + -1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2, + 0, -15, -7, 0, 0, 0, -5, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, 2, -4, -4, 0, 0, -4, -3, + 0, 0, -2, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -6, 0, 0, + 0, 0, -3, 0, 0, 0, 0, 2, + 0, 0, 0, 0, 0, 0, -3, 0, + 0, -3, 0, 0, 0, -3, -4, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 0, 0, + -2, 0, 2, 0, 0, 0, -3, -4, + -3, -3, -2, 2, 0, 2, 0, 0, + 0, -3, 0, 0, 0, 2, -5, -6, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -5, 0, -6, -5, -7, + -3, 0, 2, 0, 2, 0, 0, 0, + -5, -2, 0, 0, -4, 3, -6, -26, + -6, 0, 0, 0, -12, -4, -12, -2, + 2, -12, 2, 2, 2, 2, 0, 2, + -9, -8, -3, -5, -8, -5, -7, -3, + -5, -2, 0, -3, -4, 2, -10, -6, + -12, -8, -8, 0, 0, 0, -6, 0, + -3, -7, 2, -3, -5, 0, 0, -3, + -9, -8, -3, -7, -5, -7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -49, -52, 0, + 0, 0, -24, -8, 0, -6, 1, 0, + 1, 1, 0, 1, 0, 0, -26, -23, + 0, -26, -23, -18, -27, 0, -23, -18, + -14, -19, -15, 0, -72, -48, -40, -27, + -23, 0, 0, 0, -20, 0, 0, -30, + 0, 0, -35, 0, 0, -28, -35, -23, + -23, -34, -32, -37, -14, 0, -22, 0, + 1, 0, -8, -23, -32, -30, -30, -19, + -30, 0, -30, -30, -31, -30, -30, 0, + -24, -10, -29, -24, -19, 0, -30, -24, + -34, -8, -34, 0, -26, 0, -20, -31, + 1, -26, -5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -8, 0, 0, 0, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,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, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_kern_classes_fmt_txt_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 81, + .right_class_cnt = 99, +}; + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 11, + .bpp = 1, + + .kern_scale = 16, + .kern_dsc = &kern_classes, + .kern_classes = 1, + //.kern_dsc = &kern_pairs, + //.kern_classes = 0, +}; - .kern_scale = 16, - //.kern_dsc = &kern_classes, - //.kern_classes = 1, - .kern_dsc = &kern_pairs, - .kern_classes = 0, -}; /*----------------- * PUBLIC FONT diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index 0c58a9f7d733..a326d5e38bec 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -23,7 +23,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter); +static const lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter); static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** @@ -119,7 +119,7 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * * STATIC FUNCTIONS **********************/ -static lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter) +static const lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter) { lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; From a94866a115957c2965334c79eba611c826ef011b Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 31 May 2019 18:52:32 +0200 Subject: [PATCH 479/590] font: update sample font --- src/lv_fonts/lvgl_sample.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index b155186bdf1d..82be8ecf9346 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -4265,7 +4265,7 @@ static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { * CHARACTER MAPPING *--------------------*/ -static uint16_t unicode_list_2 = { +static uint16_t unicode_list_2[] = { 0x0, 0xe, 0xf, 0x1d, 0x1e, 0x5e, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x86, 0x87, 0x88, 0x89, 0xa5, 0xc7, 0x12a, 0x134, 0x135, 0x137, 0x146, 0x147, @@ -4274,16 +4274,16 @@ static uint16_t unicode_list_2 = { 0x1f7, 0x1f8, 0x1fa }; -static uint8_t glyph_id_ofs_list_5 = { +static uint8_t glyph_id_ofs_list_5[] = { 0, 1, 0, 0, 0, 2 -} +}; -static uint16_t unicode_list_8 = { +static uint16_t unicode_list_8[] = { 0x0, 0x1, 0x3e, 0x3f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85 }; -static uint16_t unicode_list_10 = { +static uint16_t unicode_list_10[] = { 0x0, 0xb3 }; @@ -4556,7 +4556,7 @@ static uint8_t kern_right_class_mapping[] = }; /*Kern values between classes*/ -static uint8_t kern_class_values = +static uint8_t kern_class_values[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, @@ -5565,7 +5565,7 @@ static uint8_t kern_class_values = /*Collect the kern class' data in one place*/ -static lv_font_kern_classes_fmt_txt_t kern_classes = +static lv_font_fmt_txt_kern_classes_t kern_classes = { .class_pair_values = kern_class_values, .left_class_mapping = kern_left_class_mapping, From 30419b3881cdb2530b3d997226f97af7d721b796 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 1 Jun 2019 21:46:05 +0200 Subject: [PATCH 480/590] letter_draw: support bitmap stream --- src/lv_draw/lv_draw_basic.c | 22 +- src/lv_fonts/lvgl_sample.c | 8937 ++++++++------------- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 127 +- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 5 +- src/lv_objx/lv_label.c | 78 +- 5 files changed, 3711 insertions(+), 5458 deletions(-) diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 6992d48a5df8..3dd91938f05e 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -277,6 +277,10 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv default: return; /*Invalid bpp. Can't render the letter*/ } + if(letter == 0xf817) { + char x = 1; + } + const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter); if(map_p == NULL) return; @@ -292,13 +296,10 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv lv_coord_t vdb_width = lv_area_get_width(&vdb->area); lv_color_t * vdb_buf_tmp = vdb->buf_act; lv_coord_t col, row; - uint8_t col_bit; - uint8_t col_byte_cnt; uint8_t width_byte_scr = g.box_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/ if(g.box_w & 0x7) width_byte_scr++; - uint8_t width_byte_bpp = (g.box_w * g.bpp) >> 3; /*Letter width in byte. Real width in the font*/ - if((g.box_w * g.bpp) & 0x7) width_byte_bpp++; + uint8_t width_bit = g.box_w * g.bpp; /*Letter width in bits*/ /* Calculate the col/row start/end on the map*/ lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x; @@ -313,13 +314,15 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv vdb_buf_tmp += (row_start * vdb_width) + col_start; /*Move on the map too*/ - map_p += (row_start * width_byte_bpp) + ((col_start * g.bpp) >> 3); + uint32_t bit_ofs = (row_start * width_bit) + (col_start * g.bpp); + map_p += bit_ofs>> 3; uint8_t letter_px; lv_opa_t px_opa; + uint16_t col_bit; + col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */ + for(row = row_start; row < row_end; row++) { - col_byte_cnt = 0; - col_bit = (col_start * g.bpp) % 8; bitmask = bitmask_init >> col_bit; for(col = col_start; col < col_end; col++) { letter_px = (*map_p & bitmask) >> (8 - col_bit - g.bpp); @@ -355,13 +358,14 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv bitmask = bitmask >> g.bpp; } else { col_bit = 0; - col_byte_cnt++; bitmask = bitmask_init; map_p++; } } + col_bit += ((g.box_w - col_end) + col_start) * g.bpp; - map_p += (width_byte_bpp)-col_byte_cnt; + map_p += (col_bit >> 3); + col_bit = col_bit & 0x7; vdb_buf_tmp += vdb_width - (col_end - col_start); /*Next row in VDB*/ } } diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c index 82be8ecf9346..5805daa75e60 100644 --- a/src/lv_fonts/lvgl_sample.c +++ b/src/lv_fonts/lvgl_sample.c @@ -1,9 +1,9 @@ #include "lvgl/lvgl.h" /******************************************************************************* - * Size: 16 px - * Bpp: 1 - * Opts: --font Roboto-Regular.woff --size 16 --bpp 1 -o ./lvgl_sample.c --format lvgl -r 0x20-0x2000 + * Size: 40 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 40 --font ./Roboto-Regular.ttf -r 0x20-0x7f --format lvgl -o ./lvgl_sample.c ******************************************************************************/ /*----------------- @@ -11,5567 +11,3772 @@ *----------------*/ /*Store the image of the glyphs*/ -static const uint8_t gylph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { /* U+20 " " */ /* U+21 "!" */ - 0x30, 0x7f, 0xff, 0x0, + 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, + 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xaa, + 0xa1, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, + 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, + 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, + 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, + 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, + 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0x47, 0x77, + 0x10, /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xe1, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xf8, 0x0, 0xaf, 0xff, + 0xc1, 0x0, 0x0, 0x3, 0xff, 0xff, 0x30, 0x1, + 0xef, 0xff, 0xe8, 0x43, 0x49, 0xff, 0xff, 0xb0, + 0x0, 0x2, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd1, 0x0, 0x0, 0x1, 0xaf, 0xff, 0xff, 0xff, + 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x27, 0xac, + 0xdc, 0xa7, 0x10, 0x0, 0x0, /* U+34 "4" */ - 0x2, 0x1, 0x1, 0x8f, 0xf4, 0x21, 0x10, 0xc8, - 0x24, 0xe, 0x7, 0x1, 0x80, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f, 0xff, + 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0x70, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6f, 0xff, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6, 0xff, 0xf7, 0x0, 0x0, 0x47, + 0x77, 0x77, 0x77, 0x77, 0x77, 0xaf, 0xff, 0xb7, + 0x77, 0x29, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x9f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x62, 0xff, + 0xfd, 0x99, 0x99, 0x99, 0x9c, 0xff, 0xfc, 0x99, + 0x93, 0x8, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x6f, + 0xff, 0x70, 0x0, 0x0, 0xd, 0xff, 0xb0, 0x0, + 0x0, 0x6, 0xff, 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0x0, + 0x0, 0xd, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x4, 0xff, 0xf5, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xfe, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xe, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4, 0xff, 0xf7, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0x40, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, + 0xff, 0xe2, 0x19, 0x99, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x9a, 0xff, 0xfb, 0x1f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0x7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x75, /* U+38 "8" */ - 0x0, 0x1f, 0x18, 0xc8, 0x24, 0x13, 0x18, 0xf8, - 0x6c, 0x63, 0x31, 0x98, 0xc7, 0xc0, 0x0, + 0x0, 0x0, 0x0, 0x14, 0x56, 0x53, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x6, 0xcf, 0xff, 0xff, 0xff, + 0xa3, 0x0, 0x0, 0x0, 0x2c, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf9, 0x0, 0x0, 0x2e, 0xff, 0xff, + 0xea, 0x9b, 0xff, 0xff, 0xfa, 0x0, 0xd, 0xff, + 0xfe, 0x40, 0x0, 0x0, 0x8f, 0xff, 0xf6, 0x6, + 0xff, 0xfe, 0x10, 0x0, 0x0, 0x0, 0x7f, 0xff, + 0xe0, 0xbf, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, + 0xdf, 0xff, 0x3e, 0xff, 0x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x29, 0xff, 0xff, 0xff, 0x50, + 0x0, 0x0, 0x0, 0x0, 0x1, 0x8e, 0xff, 0xf5, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xef, + 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x63, /* U+3D "=" */ - 0xfe, 0x0, 0x7, 0xef, 0xc0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0x2, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xe, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, + 0xee, 0xe3, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf4, 0xf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0x4, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x41, /* U+3E ">" */ - 0x1, 0x81, 0xe0, 0x60, 0xe7, 0x38, 0x0, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x5e, 0x81, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x5f, 0xff, 0xa2, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x5f, 0xff, 0xff, 0xb4, 0x0, + 0x0, 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0x0, 0x0, 0x4f, 0xff, 0xf1, 0xcf, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xf7, + 0xc, 0xff, 0xfa, 0xaa, 0xaa, 0xaa, 0xac, 0xff, + 0xff, 0xf8, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xc4, 0x0, 0xc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x0, 0x0, + 0xcf, 0xff, 0x55, 0x55, 0x55, 0x57, 0xcf, 0xff, + 0xc1, 0x0, 0xc, 0xff, 0xf0, 0x0, 0x0, 0x0, + 0x0, 0x5f, 0xff, 0xc0, 0x0, 0xcf, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, 0xc, + 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, + 0xfc, 0x0, 0xcf, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xe, 0xff, 0xe0, 0xc, 0xff, 0xf0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0x0, 0xcf, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, + 0xc0, 0xc, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, + 0xa, 0xff, 0xf8, 0x0, 0xcf, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x1a, 0xff, 0xff, 0x20, 0xc, 0xff, + 0xf9, 0x99, 0x99, 0x9a, 0xcf, 0xff, 0xff, 0x60, + 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x60, 0x0, 0xc, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xe8, 0x10, 0x0, 0x0, 0x67, 0x77, + 0x77, 0x77, 0x76, 0x64, 0x20, 0x0, 0x0, 0x0, + 0x0, /* U+43 "C" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 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, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, + 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xdf, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xd, 0xff, 0xf0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf9, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x90, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf0, 0x57, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x0, /* U+47 "G" */ - 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, - 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, - 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3, 0x46, 0x65, 0x30, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0xef, + 0xff, 0xff, 0xff, 0xc6, 0x0, 0x0, 0x0, 0x0, + 0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, + 0x0, 0x0, 0x2, 0xdf, 0xff, 0xfe, 0xb9, 0xab, + 0xef, 0xff, 0xff, 0x80, 0x0, 0x1d, 0xff, 0xfe, + 0x50, 0x0, 0x0, 0x3, 0xaf, 0xff, 0xf7, 0x0, + 0xbf, 0xff, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x6, + 0xff, 0xfc, 0x4, 0xff, 0xfe, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x1, 0xff, 0xfc, 0xc, 0xff, 0xf5, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, 0xfc, + 0x1f, 0xff, 0xe0, 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, 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x87, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0xff, 0xfd, 0xbf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xbf, 0xff, 0xa9, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xff, 0xfd, + 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, + 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfd, 0x47, 0x77, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x77, 0x75, /* U+49 "I" */ - 0xff, 0xff, 0xfc, + 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, + 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, + 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, + 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, + 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, + 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, + 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, + 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, + 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x17, 0x77, + 0x40, /* U+4A "J" */ - 0x0, 0x3c, 0x66, 0x42, 0x3, 0x3, 0x3, 0x3, - 0x3, 0x3, 0x3, 0x3, 0x0, + 0x0, 0x0, 0x0, 0x24, 0x55, 0x41, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x7d, 0xff, 0xff, 0xff, 0xc5, + 0x0, 0x0, 0x0, 0x2d, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xa0, 0x0, 0x1, 0xdf, 0xff, 0xfc, 0xaa, + 0xdf, 0xff, 0xfb, 0x0, 0x9, 0xff, 0xfd, 0x20, + 0x0, 0x5, 0xff, 0xff, 0x70, 0xf, 0xff, 0xf1, + 0x0, 0x0, 0x0, 0x4f, 0xff, 0xe0, 0x4f, 0xff, + 0x90, 0x0, 0x0, 0x0, 0xb, 0xff, 0xf4, 0x6f, + 0xff, 0x60, 0x0, 0x0, 0x0, 0x6, 0xff, 0xf8, + 0x5c, 0xcc, 0x30, 0x0, 0x0, 0x0, 0x3, 0xff, + 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x2, 0xff, 0xfa,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x8f, + 0xff, 0xb0, 0x0, 0xcf, 0xff, 0x10, 0x0, 0x0, + 0x0, 0x0, 0xa, 0xff, 0xf5, 0x0, 0xcf, 0xff, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xfb, + 0x0, 0xcf, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xfd, 0x0, 0xcf, 0xff, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0x0, 0xcf, + 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xfd, 0x0, 0xcf, 0xff, 0x10, 0x0, 0x0, 0x0, + 0x0, 0x4, 0xff, 0xfa, 0x0, 0xcf, 0xff, 0x10, + 0x0, 0x0, 0x0, 0x0, 0xc, 0xff, 0xf6, 0x0, + 0xcf, 0xff, 0x10, 0x0, 0x0, 0x0, 0x2, 0xcf, + 0xff, 0xe0, 0x0, 0xcf, 0xff, 0xa9, 0x99, 0x99, + 0x9a, 0xdf, 0xff, 0xff, 0x40, 0x0, 0xcf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x0, + 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd7, 0x10, 0x0, 0x0, 0x56, 0x66, 0x66, 0x66, + 0x66, 0x65, 0x41, 0x0, 0x0, 0x0, 0x0, /* U+53 "S" */ - 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, - 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x35, 0x65, 0x41, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x4a, 0xff, 0xff, + 0xff, 0xfe, 0x81, 0x0, 0x0, 0x0, 0x2, 0xbf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0x0, 0x0, + 0x3, 0xef, 0xff, 0xfe, 0xb9, 0xac, 0xff, 0xff,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0, 0x0, 0xff, 0xfd, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x29, 0x99, 0x99, 0x99, + 0x99, 0xff, 0xfe, 0x99, 0x99, 0x99, 0x99, 0x91, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf3, 0x4f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, + 0x17, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x71, /* U+55 "U" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x14, 0x56, 0x53, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xdf, + 0xff, 0xff, 0xff, 0xc6, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x4e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0x40, 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, 0xda, + 0x9a, 0xdf, 0xff, 0xff, 0x70, 0x0, 0x0, 0x4f, + 0xff, 0xfb, 0x20, 0x0, 0x0, 0x2b, 0xff, 0xff, + 0x60, 0x0, 0xe, 0xff, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xff, 0xff, 0x10, 0x6, 0xff, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf8, + 0x0, 0xbf, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2f, 0xff, 0xd0, 0xf, 0xff, 0xf0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, 0x10, + 0xff, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xa, 0xff, 0xf3, 0x1f, 0xff, 0xb0, 0x0, 0x0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, 0x0, 0x0, + 0x0, 0xdf, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xe1, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, + 0xff, 0xfb, 0x0, 0x8, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0xff, 0xff, 0x50, 0xe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x70, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x70, 0x6, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x30, /* U+5B "[" */ - 0xe, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, + 0x1, 0x11, 0x11, 0x11, 0x3, 0xff, 0xff, 0xff, + 0xf5, 0x3f, 0xff, 0xff, 0xff, 0x53, 0xff, 0xff, + 0xff, 0xf4, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, + 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, + 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, + 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, + 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, + 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, + 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, + 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, + 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, + 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, + 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, + 0xff, 0xfa, 0x0, 0x0,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0xd0, 0x2, 0xff, 0xf4, 0x0, 0x0, 0x3f, 0xff, + 0x30, 0x8f, 0xfe, 0x0, 0x0, 0x0, 0xcf, 0xf9, + 0xe, 0xff, 0x70, 0x0, 0x0, 0x6, 0xff, 0xf5, + 0xff, 0xf1, 0x0, 0x0, 0x0, 0xf, 0xff, 0xcf, + 0xfa, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xff, 0xff, + 0x40, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0xd0, + 0x0, 0x0, 0x0, 0x0, 0xc, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x5f, 0xff, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x77, 0x50, 0x0, 0x0, + 0x0, /* U+5F "_" */ - 0x0, 0xfe, + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf1, 0xef, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x10, /* U+60 "`" */ - 0x2, 0x60, + 0x0, 0x0, 0x6, 0x88, 0x30, 0x0, 0x8, 0xff, + 0xd0, 0x0, 0x7, 0xff, 0xf3, 0x0, 0x6, 0xff, + 0xf9, 0x0, 0x6, 0xff, 0xfd, 0x0, 0x2, 0xaa, + 0xaa, 0x30, 0x0, /* U+61 "a" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, + 0x0, 0x0, 0x15, 0x65, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4c, 0xff, 0xff, 0xfd, 0x60, 0x4, + 0xff, 0xfa, 0x5, 0xff, 0xff, 0xff, 0xff, 0xfa, + 0x7, 0xff, 0xf7, 0x2f, 0xff, 0xff, 0xed, 0xff, + 0xff, 0xb9, 0xff, 0xf4, 0x8f, 0xff, 0xd3, 0x0, + 0x2, 0x9f, 0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, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0x22, 0x22, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x67, 0x76, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0x67, 0x77, /* U+6A "j" */ - 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, + 0x16, 0x87, 0x51, 0x0, 0x0, 0x3f, 0xff, 0xff, + 0x90, 0x0, 0x2f, 0xff, 0xff, 0xfb, 0x0, 0xb, + 0xac, 0xff, 0xff, 0x60, 0x0, 0x0, 0x7f, 0xff, + 0xd0, 0x0, 0x0, 0xe, 0xff, 0xf1, 0x0, 0x0, + 0xb, 0xff, 0xf2, 0x0, 0x0, 0xa, 0xff, 0xf3, + 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, + 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, + 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, + 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, + 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, + 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, + 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, + 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, + 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, + 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, + 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, + 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, + 0x0,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ff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, + 0xef, 0xff, 0xef, 0xff, 0x67, 0x77, /* U+6D "m" */ - 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3f, 0xfe, 0x18, 0xc0, + 0x3f, 0xff, 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, + 0xf6, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, + 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, + 0x60, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf2, 0x3f, + 0xff, 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xf6, + 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, 0xff, + 0xfa, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, + 0x0, 0x0, 0x0, 0xa, 0xff, 0xf2, 0x3f, 0xff, + 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xf6, 0x0, + 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, 0xff, 0xfa, + 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, 0x0, + 0x0, 0x0, 0xa, 0xff, 0xf2, 0x3f, 0xff, 0xa0, + 0x0, 0x0, 0x0, 0x7, 0xff, 0xf6, 0x0, 0x0, + 0x0, 0x0, 0xaf, 0xff, 0x23, 0xff, 0xfa, 0x0, + 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, 0x0, 0x0,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0, /* U+7E "~" */ - 0x86, 0x66, 0x9c, 0x20, 0x0, - - /* U+A0 " " */ - - /* U+A1 "¡" */ - 0xff, 0xff, 0xc, - - /* U+A2 "¢" */ - 0x8, 0x8, 0x3e, 0x23, 0x61, 0x40, 0x40, 0x40, - 0x63, 0x3e, 0x1c, 0x8, 0x0, - - /* U+A3 "£" */ - 0x7f, 0x90, 0xc, 0x6, 0x3, 0x3, 0xe0, 0x80, - 0x40, 0x20, 0x18, 0x87, 0xc0, 0x0, - - /* U+A4 "¤" */ - 0x0, 0xd, 0xe9, 0xe7, 0x10, 0x66, 0x4, 0x80, - 0x98, 0x13, 0x2, 0x30, 0xcf, 0xf8, 0x19, 0x0, - - /* U+A5 "¥" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x1f, 0xc1, - 0xe0, 0xc8, 0x33, 0x18, 0x44, 0x18, 0x0, - - /* U+A6 "¦" */ - 0x3f, 0xfc, 0x3f, 0xf0, - - /* U+A7 "§" */ - 0x1e, 0x39, 0x90, 0x68, 0x30, 0x30, 0xf9, 0xc6, - 0x83, 0x41, 0xb7, 0x8f, 0xc, 0x6, 0x1b, 0x8, - 0xfc, 0x0, - - /* U+A8 "¨" */ - 0x1, 0x30, 0x0, - - /* U+A9 "©" */ - 0x0, 0x0, 0xf8, 0x30, 0x42, 0x62, 0x49, 0x24, - 0x81, 0x58, 0x14, 0x81, 0x49, 0x94, 0xf2, 0x20, - 0x41, 0x98, 0x0, 0x0, - - /* U+AA "ª" */ - 0x23, 0xec, 0x9e, 0x9, 0xe0, 0x0, - - /* U+AB "«" */ - 0x12, 0x24, 0x6c, 0x48, 0x24, 0x36, 0x0, - - /* U+AC "¬" */ - 0x0, 0x8, 0x17, 0xe0, 0x0, - - /* U+AD "­" */ - 0xf0, 0x0, - - /* U+AE "®" */ - 0x0, 0x0, 0xf8, 0x30, 0x42, 0x82, 0x48, 0xa4, - 0x99, 0x4f, 0x14, 0x91, 0x49, 0x84, 0xf2, 0x20, - 0x41, 0x98, 0x0, 0x0, - - /* U+AF "¯" */ - 0x7c, 0x0, - - /* U+B0 "°" */ - 0xf, 0x9f, 0x0, - - /* U+B1 "±" */ - 0x7f, 0x0, 0x8, 0x8, 0x8, 0x7e, 0x7f, 0x8, - 0x8, 0x8, - - /* U+B2 "²" */ - 0x79, 0x83, 0x6, 0x9, 0xe0, 0x0, - - /* U+B3 "³" */ - 0x71, 0x20, 0x8c, 0x9, 0xe0, 0x0, - - /* U+B4 "´" */ - 0xc, 0x60, - - /* U+B5 "µ" */ - 0x1, 0x83, 0x6, 0xf, 0xf8, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1e, 0x30, 0x0, - - /* U+B6 "¶" */ - 0x6, 0xc, 0x18, 0x33, 0xef, 0xdf, 0xbf, 0x7e, - 0xfc, 0xf8, 0x0, - - /* U+B7 "·" */ - 0x30, - - /* U+B8 "¸" */ - 0x6, 0x26, - - /* U+B9 "¹" */ - 0x11, 0x11, 0x17, 0x0, - - /* U+BA "º" */ - 0x10, 0xf9, 0x12, 0x24, 0x47, 0x80, 0x0, - - /* U+BB "»" */ - 0x48, 0x24, 0x36, 0x12, 0x24, 0x6c, 0x0, - - /* U+BC "¼" */ - 0x0, 0x61, 0x1e, 0x11, 0x60, 0x9e, 0xc, 0xe1, - 0x46, 0x12, 0x1, 0x20, 0x11, 0x7, 0x8, 0x30, - 0x0, 0x0, - - /* U+BD "½" */ - 0x1, 0xe1, 0x18, 0x10, 0xc0, 0x86, 0xd, 0x21, - 0x5e, 0x12, 0x1, 0x20, 0x11, 0x7, 0x8, 0x30, - 0x0, 0x0, - - /* U+BE "¾" */ - 0x0, 0x60, 0x9e, 0x9, 0x60, 0x5e, 0x6, 0xe7, - 0xa6, 0x49, 0x1, 0x90, 0x38, 0x80, 0x84, 0x78, - 0x0, 0x0, - - /* U+BF "¿" */ - 0x3c, 0xcd, 0x1a, 0x6, 0x4, 0x4, 0xc, 0x0, - 0x0, 0x60, 0x0, - - /* U+C0 "À" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, - 0x0, 0x80, 0x30, 0x0, - - /* U+C1 "Á" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x4, - 0x0, 0xc0, 0xc, 0x0, - - /* U+C2 "Â" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xa0, 0xc, 0x0, - - /* U+C3 "Ã" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x1, 0xf0, 0x12, 0x0, - - /* U+C4 "Ä" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x1, 0x30, 0x0, 0x0, - - /* U+C5 "Å" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0x40, 0x14, 0x2, 0x80, 0x20, - - /* U+C6 "Æ" */ - 0x60, 0x7f, 0x30, 0x40, 0x30, 0x40, 0x1f, 0xc0, - 0x8, 0x40, 0xc, 0x7c, 0x4, 0x7c, 0x6, 0xc0, - 0x3, 0xc0, 0x1, 0xc0, 0x1, 0xfe, 0x0, 0x0, - - /* U+C7 "Ç" */ - 0x0, 0x1, 0x80, 0x20, 0x18, 0x1f, 0xc, 0x66, - 0x9, 0x82, 0x60, 0x10, 0x4, 0x1, 0x80, 0x60, - 0x8c, 0x61, 0xf0, 0x10, - - /* U+C8 "È" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x10, 0x30, - - /* U+C9 "É" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0xc, - - /* U+CA "Ê" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x28, 0x18, - - /* U+CB "Ë" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x26, 0x0, - - /* U+CC "Ì" */ - 0x33, 0x33, 0x33, 0x33, 0x33, 0x30, 0x2, 0x60, - - /* U+CD "Í" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc0, 0xc, 0x60, - - /* U+CE "Î" */ - 0x61, 0x86, 0x18, 0x61, 0x86, 0x18, 0x61, 0x86, - 0x0, 0x1, 0x43, 0x0, - - /* U+CF "Ï" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, - 0x0, 0x1, 0x30, 0x0, - - /* U+D0 "Ð" */ - 0x3e, 0x8, 0xc2, 0x18, 0x83, 0x20, 0xfe, 0x36, - 0xc, 0x83, 0x20, 0x88, 0x63, 0xf0, 0x0, - - /* U+D1 "Ñ" */ - 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, - 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0x3e, - 0x4, 0x80, - - /* U+D2 "Ò" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x60, 0x8, 0x3, 0x0, - - /* U+D3 "Ó" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0xc, 0x0, 0xc0, - - /* U+D4 "Ô" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0xc0, 0x14, 0x1, 0x80, - - /* U+D5 "Õ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x60, 0x3e, 0x2, 0x40, - - /* U+D6 "Ö" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0x26, 0x0, 0x0, - - /* U+D7 "×" */ - 0x0, 0x42, 0x26, 0x1c, 0x18, 0x34, 0x62, 0x40, - - /* U+D8 "Ø" */ - 0x0, 0x7, 0xe0, 0xc6, 0x38, 0x66, 0x8c, 0xc9, - 0x91, 0x12, 0x12, 0x63, 0xcc, 0x38, 0xc6, 0xf, - 0xc0, 0x44, - - /* U+D9 "Ù" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x80, - 0xc0, - - /* U+DA "Ú" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xc0, - 0x30, - - /* U+DB "Û" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xa0, - 0x30, - - /* U+DC "Ü" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0x30, - 0x0, - - /* U+DD "Ý" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0xc, - 0x1, 0x80, - - /* U+DE "Þ" */ - 0xc0, 0xc0, 0xf0, 0xfe, 0xc2, 0xc3, 0xc3, 0xc6, - 0xfc, 0xc0, 0xc0, 0x0, - - /* U+DF "ß" */ - 0x0, 0xde, 0xc3, 0xc3, 0xc3, 0xc6, 0xcc, 0xc8, - 0xc8, 0xc4, 0xc4, 0xcc, 0x78, 0x0, - - /* U+E0 "à" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x8, 0x18, - - /* U+E1 "á" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0xc, 0x6, - - /* U+E2 "â" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x14, 0xc, - - /* U+E3 "ã" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x3e, 0x12, - - /* U+E4 "ä" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x26, 0x0, - - /* U+E5 "å" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x8, 0x14, 0x14, 0x8, - - /* U+E6 "æ" */ - 0x0, 0x3, 0xe7, 0x91, 0xc0, 0x86, 0x6, 0x20, - 0x1f, 0xfc, 0x8, 0x68, 0x63, 0x7f, 0xf0, 0xc2, - 0x0, - - /* U+E7 "ç" */ - 0x0, 0x18, 0x8, 0x18, 0x3c, 0x62, 0x40, 0x40, - 0x40, 0x40, 0x63, 0x3e, 0x8, - - /* U+E8 "è" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x8, 0x18, - - /* U+E9 "é" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0xc, 0x6, - - /* U+EA "ê" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x14, 0xc, - - /* U+EB "ë" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x26, 0x0, - - /* U+EC "ì" */ - 0x33, 0x33, 0x33, 0x33, 0x0, 0x26, - - /* U+ED "í" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0x0, 0xc6, - - /* U+EE "î" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x5, - 0xc, - - /* U+EF "ï" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x4, - 0xc0, - - /* U+F0 "ð" */ - 0x0, 0x3c, 0x46, 0xc2, 0x82, 0xc2, 0xc2, 0x7e, - 0x16, 0x26, 0x1c, 0x1c, 0x70, 0x0, - - /* U+F1 "ñ" */ - 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, - 0x1, 0xf1, 0x20, - - /* U+F2 "ò" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x1, 0x80, - - /* U+F3 "ó" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x80, 0x60, - - /* U+F4 "ô" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x2, 0x80, 0xc0, - - /* U+F5 "õ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x7, 0xc1, 0x20, - - /* U+F6 "ö" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x4, 0xc0, 0x0, - - /* U+F7 "÷" */ - 0x8, 0x4, 0x0, 0x0, 0x7, 0xf0, 0x0, 0x0, - 0x10, 0x0, 0x0, - - /* U+F8 "ø" */ - 0x0, 0x10, 0xf, 0x8e, 0x67, 0x12, 0x49, 0x24, - 0x8a, 0x67, 0x1f, 0x2, 0x80, 0x0, - - /* U+F9 "ù" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x0, 0x83, 0x0, - - /* U+FA "ú" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x0, 0xc0, 0xc0, - - /* U+FB "û" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x1, 0x41, 0x80, - - /* U+FC "ü" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x2, 0x60, 0x0, - - /* U+FD "ý" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x18, 0xc, - - /* U+FE "þ" */ - 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc6, 0xfc, 0xd8, 0xc0, 0xc0, 0xc0, - - /* U+FF "ÿ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x26, 0x0, - - /* U+100 "Ā" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x1, 0xf0, 0x0, 0x0, - - /* U+101 "ā" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x3e, 0x0, - - /* U+102 "Ă" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, - 0x1, 0xe0, 0x20, 0x0, - - /* U+103 "ă" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x3c, 0x20, - - /* U+104 "Ą" */ - 0x0, 0x0, 0x18, 0x6, 0x0, 0x4c, 0xc, 0x81, - 0x98, 0x21, 0xfc, 0x31, 0x86, 0x20, 0x4c, 0x9, - 0x1, 0xa0, 0x1c, 0x3, 0x0, 0x0, - - /* U+105 "ą" */ - 0x0, 0x7, 0x4, 0x2, 0x3f, 0x67, 0x43, 0x63, - 0x3f, 0x3, 0x62, 0x3e, 0x8, - - /* U+106 "Ć" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, - 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0x60, 0xc, - - /* U+107 "ć" */ - 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, - 0x3e, 0x8, 0x0, 0x18, 0xc, - - /* U+108 "Ĉ" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, - 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0xa0, 0x18, - - /* U+109 "ĉ" */ - 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, - 0x3e, 0x8, 0x0, 0x28, 0x18, - - /* U+10A "Ċ" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, - 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0xc0, 0x0, - - /* U+10B "ċ" */ - 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, - 0x3e, 0x8, 0x0, 0x18, 0x0, - - /* U+10C "Č" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, - 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0xe0, 0x6c, - - /* U+10D "č" */ - 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, - 0x3e, 0x8, 0x0, 0x1c, 0x36, - - /* U+10E "Ď" */ - 0xfc, 0x63, 0x30, 0xd8, 0x2c, 0x16, 0xf, 0x7, - 0x82, 0xc3, 0x61, 0x3f, 0x0, 0x0, 0x1, 0xc1, - 0xb0, - - /* U+10F "ď" */ - 0x0, 0x7, 0xe1, 0x8c, 0x31, 0x84, 0x30, 0x86, - 0x10, 0xc3, 0x18, 0x3f, 0x3, 0x60, 0xd, 0x1, - 0xa0, 0x36, - - /* U+110 "Đ" */ - 0x3e, 0x8, 0xc2, 0x18, 0x83, 0x20, 0xfe, 0x36, - 0xc, 0x83, 0x20, 0x88, 0x63, 0xf0, 0x0, - - /* U+111 "đ" */ - 0x0, 0xf, 0xc6, 0x31, 0x8c, 0x43, 0x10, 0xc4, - 0x31, 0x8c, 0x3f, 0x6, 0xc0, 0x30, 0x3e, 0x3, - 0x0, - - /* U+112 "Ē" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x7c, 0x0, - - /* U+113 "ē" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x3e, 0x0, - - /* U+114 "Ĕ" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x78, 0x40, - - /* U+115 "ĕ" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x3c, 0x20, - - /* U+116 "Ė" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0x0, - - /* U+117 "ė" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x18, 0x0, - - /* U+118 "Ę" */ - 0x0, 0x6, 0x4, 0x4, 0xff, 0xc0, 0xc0, 0xc0, - 0xc0, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, - - /* U+119 "ę" */ - 0x0, 0xc, 0x8, 0xc, 0x3e, 0x63, 0x60, 0x40, - 0x7f, 0x43, 0x63, 0x3e, 0x8, - - /* U+11A "Ě" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x38, 0x6c, - - /* U+11B "ě" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x1c, 0x36, - - /* U+11C "Ĝ" */ - 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, - 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0xa0, 0x18, - - /* U+11D "ĝ" */ - 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x14, 0xc, - - /* U+11E "Ğ" */ - 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, - 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, - 0x0, 0x1, 0xe0, 0x40, - - /* U+11F "ğ" */ - 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x3c, 0x20, - - /* U+120 "Ġ" */ - 0x0, 0x7, 0xe3, 0xc, 0x83, 0x60, 0xd8, 0xf4, - 0x39, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, - 0x0, 0x0, 0xc0, 0x0, - - /* U+121 "ġ" */ - 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x18, 0x0, - - /* U+122 "Ģ" */ - 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x7, 0xe3, - 0xc, 0x83, 0x60, 0xd8, 0xf4, 0x39, 0x80, 0x60, - 0x18, 0x33, 0x18, 0x7c, 0x4, 0x0, - - /* U+123 "ģ" */ - 0x0, 0x3e, 0x2, 0x3, 0x3f, 0x63, 0x63, 0x43, - 0x43, 0x43, 0x63, 0x3f, 0x18, 0x0, 0x18, 0x18, - 0x8, 0x0, - - /* U+124 "Ĥ" */ - 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, - 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, 0x0, - 0x5, 0x0, 0xc0, - - /* U+125 "ĥ" */ - 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0xd9, - 0x83, 0x6, 0x0, 0xa, 0xc, 0x0, - - /* U+126 "Ħ" */ - 0x60, 0x46, 0x4, 0x60, 0x46, 0x4, 0x60, 0x47, - 0xfc, 0x60, 0xc6, 0x4, 0xff, 0xe6, 0xc, 0x60, - 0x40, 0x0, - - /* U+127 "ħ" */ - 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x63, 0x7e, - 0x64, 0x60, 0xf8, 0x60, - - /* U+128 "Ĩ" */ - 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, - 0x30, 0x60, 0x0, 0xf, 0x89, 0x0, - - /* U+129 "ĩ" */ - 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x0, - 0x1, 0xf1, 0x20, - - /* U+12A "Ī" */ - 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, - 0x30, 0x60, 0x0, 0xf, 0x80, 0x0, - - /* U+12B "ī" */ - 0x18, 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x0, - 0x1, 0xf0, 0x0, - - /* U+12C "Ĭ" */ - 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x18, 0x0, - 0x7a, 0x0, - - /* U+12D "ĭ" */ - 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x0, 0x3d, 0x0, - - /* U+12E "Į" */ - 0x1e, 0x26, 0xdb, 0x6d, 0xb6, 0xd8, - - /* U+12F "į" */ - 0x7, 0x42, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, - - /* U+130 "İ" */ - 0xff, 0xff, 0xfc, 0x30, - - /* U+131 "ı" */ - 0xff, 0xff, 0x0, - - /* U+132 "IJ" */ - 0x0, 0x18, 0xf3, 0x33, 0x64, 0x2c, 0x7, 0x80, - 0xf0, 0x1e, 0x3, 0xc0, 0x78, 0xf, 0x1, 0xe0, - 0x30, 0x0, - - /* U+133 "ij" */ - 0x0, 0x60, 0xc3, 0xcf, 0x3c, 0xf3, 0xcf, 0x3c, - 0xf3, 0x0, 0xc, 0xc0, - - /* U+134 "Ĵ" */ - 0x0, 0xf, 0x6, 0x61, 0x8, 0x3, 0x0, 0xc0, - 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x0, - 0x1, 0x40, 0x30, - - /* U+135 "ĵ" */ - 0x1, 0x83, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, - 0xc, 0x0, 0x5, 0xc, - - /* U+136 "Ķ" */ - 0x0, 0x8, 0x6, 0x3, 0xc, 0x1e, 0x1b, 0x19, - 0x88, 0xcc, 0x7c, 0x34, 0x1b, 0xc, 0xc6, 0x33, - 0xc, 0x0, - - /* U+137 "ķ" */ - 0x0, 0x20, 0x30, 0x30, 0xc6, 0xcc, 0xc8, 0xd0, - 0xf0, 0xf0, 0xd8, 0xcc, 0xc0, 0xc0, 0xc0, 0xc0, - - /* U+138 "ĸ" */ - 0xc6, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc4, - 0x0, - - /* U+139 "Ĺ" */ - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0x80, 0xc0, 0x60, - - /* U+13A "ĺ" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc, 0x60, - - /* U+13B "Ļ" */ - 0x0, 0x10, 0x18, 0x18, 0x0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0x0, - - /* U+13C "ļ" */ - 0x9, 0xb0, 0xdb, 0x6d, 0xb6, 0xdb, 0x60, - - /* U+13D "Ľ" */ - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc8, 0xc8, 0xcc, 0x0, - - /* U+13E "ľ" */ - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xc6, 0xb5, 0xb0, - - /* U+13F "Ŀ" */ - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, 0xc0, - 0xc0, 0xc0, 0xc0, 0x0, - - /* U+140 "ŀ" */ - 0xcc, 0xcc, 0xcf, 0xcc, 0xcc, 0xcc, - - /* U+141 "Ł" */ - 0x7f, 0x30, 0x18, 0xc, 0x6, 0x7, 0x1, 0xe0, - 0xc0, 0x60, 0x30, 0x18, 0x0, 0x0, - - /* U+142 "ł" */ - 0x63, 0x18, 0xc6, 0x71, 0xcc, 0x63, 0x18, 0xc0, - - /* U+143 "Ń" */ - 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, - 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0xc, - 0x1, 0x80, - - /* U+144 "ń" */ - 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, - 0x0, 0x60, 0x60, - - /* U+145 "Ņ" */ - 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x30, 0x6c, - 0x1b, 0xe, 0xc6, 0xb1, 0x2c, 0xcb, 0x62, 0xd0, - 0xbc, 0x2e, 0xb, 0x2, 0x0, 0x0, - - /* U+146 "ņ" */ - 0x0, 0x40, 0xc1, 0x80, 0x18, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1e, 0x3f, 0xc3, 0x0, - - /* U+147 "Ň" */ - 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, - 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, 0x1c, - 0xd, 0x80, - - /* U+148 "ň" */ - 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0x18, - 0x0, 0xe3, 0x60, - - /* U+149 "ʼn" */ - 0x31, 0x98, 0xcc, 0x66, 0x33, 0x19, 0x8c, 0xc6, - 0x7e, 0x6, 0x20, 0x10, 0xc, 0x0, - - /* U+14A "Ŋ" */ - 0x0, 0x1, 0x80, 0x60, 0x3c, 0x1e, 0x1f, 0xf, - 0x8f, 0xc5, 0xe6, 0xf6, 0x7a, 0x3f, 0x1f, 0xf, - 0x6, 0x0, - - /* U+14B "ŋ" */ - 0x0, 0x18, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1f, 0xe1, 0x80, - - /* U+14C "Ō" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0x0, 0x7, 0xc0, 0x0, - - /* U+14D "ō" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x7, 0xc0, 0x0, - - /* U+14E "Ŏ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0xe0, 0x3c, 0x4, 0x0, - - /* U+14F "ŏ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x7, 0x82, 0x0, - - /* U+150 "Ő" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0xe0, 0x1a, 0x1, 0x60, - - /* U+151 "ő" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x3, 0x40, 0xb0, - - /* U+152 "Œ" */ - 0x0, 0x0, 0x3f, 0xf8, 0xc6, 0x3, 0x8, 0x4, - 0x10, 0x8, 0x20, 0x10, 0x7e, 0x20, 0xc0, 0x41, - 0x0, 0xc2, 0x0, 0x84, 0x1, 0xff, 0xe0, 0x40, - 0x0, - - /* U+153 "œ" */ - 0x0, 0x0, 0xf9, 0xe6, 0x38, 0x18, 0x60, 0x41, - 0x81, 0x7, 0xf4, 0x18, 0xd8, 0xe3, 0x3e, 0xf8, - 0x20, 0x80, - - /* U+154 "Ŕ" */ - 0xc1, 0x61, 0xb0, 0x98, 0xcc, 0xc7, 0xf3, 0xd, - 0x86, 0xc3, 0x61, 0xbf, 0x82, 0x1, 0x80, 0x60, - - /* U+155 "ŕ" */ - 0xc6, 0x31, 0x8c, 0x63, 0x1e, 0x10, 0x18, 0x60, - - /* U+156 "Ŗ" */ - 0x0, 0x8, 0x6, 0x3, 0x0, 0x6, 0xb, 0xd, - 0x84, 0xc6, 0x66, 0x3f, 0x98, 0x6c, 0x36, 0x1b, - 0xd, 0xfc, 0x0, 0x0, - - /* U+157 "ŗ" */ - 0x1, 0x6, 0x18, 0x1, 0x86, 0x18, 0x61, 0x86, - 0x18, 0x78, 0x20, - - /* U+158 "Ř" */ - 0xc1, 0x61, 0xb0, 0x98, 0xcc, 0xc7, 0xf3, 0xd, - 0x86, 0xc3, 0x61, 0xbf, 0x82, 0x3, 0x83, 0x60, - - /* U+159 "ř" */ - 0xc6, 0x31, 0x8c, 0x63, 0x1e, 0x10, 0x1d, 0xb0, - - /* U+15A "Ś" */ - 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, - 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0xc0, 0x60, - 0x18, - - /* U+15B "ś" */ - 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, - 0x3e, 0x18, 0x0, 0xc, 0x6, - - /* U+15C "Ŝ" */ - 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, - 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x40, 0xa0, - 0x30, - - /* U+15D "ŝ" */ - 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, - 0x3e, 0x18, 0x0, 0x14, 0xc, - - /* U+15E "Ş" */ - 0x0, 0x6, 0x1, 0x1, 0x83, 0xe3, 0x9, 0x6, - 0x3, 0x3, 0x7, 0xe, 0xc, 0x6, 0x1b, 0x8, - 0xfc, 0x0, - - /* U+15F "ş" */ - 0x0, 0xc, 0x4, 0xc, 0x3c, 0x62, 0x42, 0x6, - 0x3c, 0x60, 0x62, 0x3e, 0x18, - - /* U+160 "Š" */ - 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, - 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x80, 0xe0, - 0xd8, - - /* U+161 "š" */ - 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, - 0x3e, 0x18, 0x0, 0x1c, 0x36, - - /* U+162 "Ţ" */ - 0x0, 0x3, 0x0, 0x40, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, - 0x3, 0xf, 0xf8, 0x0, - - /* U+163 "ţ" */ - 0x0, 0x60, 0x86, 0x38, 0x82, 0x8, 0x20, 0x82, - 0x3c, 0x70, 0x82, 0x0, - - /* U+164 "Ť" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x20, 0x1c, - 0xd, 0x80, - - /* U+165 "ť" */ - 0x0, 0x70, 0x81, 0x2, 0x4, 0x8, 0x10, 0xf0, - 0xe0, 0x81, 0x20, 0x40, 0xc0, - - /* U+166 "Ŧ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x1, - 0xe0, 0x78, 0xc, 0x3, 0xf, 0xf8, 0x0, - - /* U+167 "ŧ" */ - 0x0, 0x71, 0x4, 0x10, 0xc7, 0xc4, 0x78, 0xe1, - 0x4, - - /* U+168 "Ũ" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xf0, - 0x48, - - /* U+169 "ũ" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x3, 0xe2, 0x40, - - /* U+16A "Ū" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xf0, - 0x0, - - /* U+16B "ū" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x3, 0xe0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x7d, 0xff, 0xfd, 0x60, 0x0, 0x5d, + 0xf5, 0x0, 0x0, 0x0, 0x4, 0xef, 0xff, 0xff, + 0xff, 0xa0, 0x6, 0xff, 0xa0, 0x0, 0x0, 0x7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x2f, 0xff, + 0x50, 0x0, 0x2c, 0xff, 0xff, 0xb4, 0x13, 0xcf, + 0xff, 0x10, 0xbf, 0xff, 0xc9, 0xbf, 0xff, 0xff, + 0x50, 0x0, 0x0, 0xdf, 0xf6, 0x1, 0xef, 0xff, + 0xff, 0xff, 0xfd, 0x20, 0x0, 0x0, 0x5, 0xff, + 0x90, 0x2, 0xdf, 0xff, 0xff, 0xf8, 0x0, 0x0, + 0x0, 0x0, 0x1b, 0x95, 0x0, 0x0, 0x59, 0xa9, + 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 +}; - /* U+16C "Ŭ" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x1, 0xe0, - 0x80, - /* U+16D "ŭ" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x3, 0xc4, 0x0, +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ - /* U+16E "Ů" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x40, - 0x50, 0x28, 0x8, 0x0, +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 159, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 168, .box_h = 29, .box_w = 5, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 73, .adv_w = 229, .box_h = 11, .box_w = 11, .ofs_x = 2, .ofs_y = 18}, + {.bitmap_index = 134, .adv_w = 399, .box_h = 29, .box_w = 23, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 468, .adv_w = 373, .box_h = 39, .box_w = 19, .ofs_x = 2, .ofs_y = -5}, + {.bitmap_index = 839, .adv_w = 468, .box_h = 30, .box_w = 26, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 1229, .adv_w = 399, .box_h = 30, .box_w = 24, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1589, .adv_w = 139, .box_h = 11, .box_w = 5, .ofs_x = 2, .ofs_y = 18}, + {.bitmap_index = 1617, .adv_w = 212, .box_h = 42, .box_w = 12, .ofs_x = 2, .ofs_y = -10}, + {.bitmap_index = 1869, .adv_w = 215, .box_h = 42, .box_w = 11, .ofs_x = 0, .ofs_y = -10}, + {.bitmap_index = 2100, .adv_w = 276, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = 7}, + {.bitmap_index = 2213, .adv_w = 363, .box_h = 22, .box_w = 21, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 2444, .adv_w = 142, .box_h = 10, .box_w = 5, .ofs_x = 2, .ofs_y = -5}, + {.bitmap_index = 2469, .adv_w = 288, .box_h = 4, .box_w = 12, .ofs_x = 3, .ofs_y = 10}, + {.bitmap_index = 2493, .adv_w = 171, .box_h = 4, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 2501, .adv_w = 266, .box_h = 32, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2757, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 3042, .adv_w = 360, .box_h = 29, .box_w = 11, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 3202, .adv_w = 360, .box_h = 29, .box_w = 19, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 3478, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 3763, .adv_w = 360, .box_h = 29, .box_w = 21, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4068, .adv_w = 360, .box_h = 30, .box_w = 18, .ofs_x = 3, .ofs_y = -1}, + {.bitmap_index = 4338, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 4623, .adv_w = 360, .box_h = 29, .box_w = 20, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4913, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 5198, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5483, .adv_w = 162, .box_h = 21, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 5525, .adv_w = 164, .box_h = 26, .box_w = 5, .ofs_x = 3, .ofs_y = -5}, + {.bitmap_index = 5590, .adv_w = 325, .box_h = 18, .box_w = 17, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 5743, .adv_w = 360, .box_h = 13, .box_w = 18, .ofs_x = 2, .ofs_y = 7}, + {.bitmap_index = 5860, .adv_w = 335, .box_h = 19, .box_w = 18, .ofs_x = 2, .ofs_y = 1}, + {.bitmap_index = 6031, .adv_w = 304, .box_h = 29, .box_w = 17, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6278, .adv_w = 573, .box_h = 37, .box_w = 32, .ofs_x = 2, .ofs_y = -9}, + {.bitmap_index = 6870, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7233, .adv_w = 405, .box_h = 29, .box_w = 21, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 7538, .adv_w = 405, .box_h = 30, .box_w = 22, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 7868, .adv_w = 433, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 8187, .adv_w = 351, .box_h = 29, .box_w = 18, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 8448, .adv_w = 351, .box_h = 29, .box_w = 19, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 8724, .adv_w = 433, .box_h = 30, .box_w = 22, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 9054, .adv_w = 450, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 9373, .adv_w = 180, .box_h = 29, .box_w = 5, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 9446, .adv_w = 351, .box_h = 30, .box_w = 18, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9716, .adv_w = 405, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 10035, .adv_w = 351, .box_h = 29, .box_w = 18, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 10296, .adv_w = 552, .box_h = 29, .box_w = 29, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 10717, .adv_w = 450, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 11036, .adv_w = 436, .box_h = 30, .box_w = 24, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 11396, .adv_w = 405, .box_h = 29, .box_w = 21, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 11701, .adv_w = 446, .box_h = 32, .box_w = 25, .ofs_x = 2, .ofs_y = -3}, + {.bitmap_index = 12101, .adv_w = 405, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 12420, .adv_w = 391, .box_h = 30, .box_w = 21, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 12735, .adv_w = 383, .box_h = 29, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 13083, .adv_w = 433, .box_h = 30, .box_w = 23, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 13428, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 13791, .adv_w = 551, .box_h = 29, .box_w = 34, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14284, .adv_w = 405, .box_h = 29, .box_w = 24, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 14632, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14995, .adv_w = 383, .box_h = 29, .box_w = 22, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 15314, .adv_w = 173, .box_h = 40, .box_w = 9, .ofs_x = 2, .ofs_y = -7}, + {.bitmap_index = 15494, .adv_w = 264, .box_h = 32, .box_w = 17, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 15766, .adv_w = 173, .box_h = 40, .box_w = 8, .ofs_x = 0, .ofs_y = -7}, + {.bitmap_index = 15926, .adv_w = 268, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = 14}, + {.bitmap_index = 16039, .adv_w = 291, .box_h = 3, .box_w = 19, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 16068, .adv_w = 200, .box_h = 6, .box_w = 9, .ofs_x = 1, .ofs_y = 24}, + {.bitmap_index = 16095, .adv_w = 352, .box_h = 23, .box_w = 18, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 16302, .adv_w = 364, .box_h = 32, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 16606, .adv_w = 335, .box_h = 23, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 16825, .adv_w = 364, .box_h = 32, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 17129, .adv_w = 335, .box_h = 23, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 17348, .adv_w = 195, .box_h = 31, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 17565, .adv_w = 364, .box_h = 31, .box_w = 18, .ofs_x = 2, .ofs_y = -9}, + {.bitmap_index = 17844, .adv_w = 364, .box_h = 31, .box_w = 18, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 18123, .adv_w = 161, .box_h = 31, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 18185, .adv_w = 166, .box_h = 40, .box_w = 10, .ofs_x = -2, .ofs_y = -9}, + {.bitmap_index = 18385, .adv_w = 328, .box_h = 31, .box_w = 19, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 18680, .adv_w = 161, .box_h = 31, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, + {.bitmap_index = 18742, .adv_w = 559, .box_h = 22, .box_w = 31, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 19083, .adv_w = 364, .box_h = 22, .box_w = 18, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 19281, .adv_w = 364, .box_h = 23, .box_w = 20, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 19511, .adv_w = 364, .box_h = 31, .box_w = 19, .ofs_x = 2, .ofs_y = -9}, + {.bitmap_index = 19806, .adv_w = 364, .box_h = 31, .box_w = 19, .ofs_x = 1, .ofs_y = -9}, + {.bitmap_index = 20101, .adv_w = 224, .box_h = 22, .box_w = 12, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 20233, .adv_w = 335, .box_h = 23, .box_w = 17, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 20429, .adv_w = 204, .box_h = 28, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 20597, .adv_w = 364, .box_h = 23, .box_w = 18, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 20804, .adv_w = 322, .box_h = 22, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 21024, .adv_w = 484, .box_h = 22, .box_w = 30, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 21354, .adv_w = 322, .box_h = 22, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 21574, .adv_w = 322, .box_h = 31, .box_w = 20, .ofs_x = 0, .ofs_y = -9}, + {.bitmap_index = 21884, .adv_w = 322, .box_h = 22, .box_w = 18, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 22082, .adv_w = 218, .box_h = 40, .box_w = 13, .ofs_x = 1, .ofs_y = -8}, + {.bitmap_index = 22342, .adv_w = 158, .box_h = 35, .box_w = 5, .ofs_x = 2, .ofs_y = -6}, + {.bitmap_index = 22430, .adv_w = 218, .box_h = 40, .box_w = 13, .ofs_x = 0, .ofs_y = -8}, + {.bitmap_index = 22690, .adv_w = 435, .box_h = 9, .box_w = 23, .ofs_x = 2, .ofs_y = 7} +}; - /* U+16F "ů" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x41, 0x42, 0x82, 0x0, - /* U+170 "Ű" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0xd0, - 0x2c, +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ - /* U+171 "ű" */ - 0x0, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, - 0xc6, 0x0, 0x0, 0x34, 0x16, - /* U+172 "Ų" */ - 0xc, 0x4, 0x2, 0x7, 0xc6, 0x36, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x8, - 0x0, - /* U+173 "ų" */ - 0x0, 0x1c, 0x20, 0x27, 0xf8, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1e, 0x30, 0x0, +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL + } +}; - /* U+174 "Ŵ" */ - 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, - 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, - 0xc, 0x24, 0x30, 0xc0, 0x0, 0x2, 0x80, 0x6, - 0x0, - /* U+175 "ŵ" */ - 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, - 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0xa, - 0x0, 0x60, +/*----------------- + * KERNING + *----------------*/ - /* U+176 "Ŷ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x14, - 0x3, 0x0, - /* U+177 "ŷ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x28, 0x18, +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 9, 43, + 9, 55, + 9, 56, + 9, 58, + 17, 17, + 17, 18, + 17, 20, + 17, 21, + 17, 22, + 17, 23, + 17, 24, + 17, 26, + 18, 19, + 18, 20, + 18, 22, + 18, 24, + 19, 17, + 19, 18, + 19, 19, + 19, 22, + 19, 23, + 19, 24, + 19, 25, + 19, 26, + 20, 18, + 20, 19, + 20, 20, + 20, 21, + 20, 22, + 20, 23, + 20, 24, + 20, 25, + 20, 26, + 21, 17, + 21, 19, + 21, 21, + 21, 22, + 21, 23, + 21, 24, + 21, 25, + 22, 18, + 22, 19, + 22, 20, + 22, 21, + 22, 22, + 22, 23, + 22, 24, + 22, 25, + 22, 26, + 23, 17, + 23, 18, + 23, 19, + 23, 21, + 23, 22, + 23, 23, + 23, 24, + 23, 25, + 24, 18, + 24, 21, + 24, 22, + 24, 23, + 24, 24, + 24, 25, + 24, 26, + 25, 17, + 25, 18, + 25, 20, + 25, 21, + 25, 22, + 25, 23, + 26, 17, + 26, 18, + 26, 19, + 26, 21, + 26, 22, + 26, 23, + 26, 24, + 26, 26, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 66, + 34, 68, + 34, 69, + 34, 70, + 34, 72, + 34, 80, + 34, 82, + 34, 84, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 91, + 35, 58, + 35, 66, + 35, 74, + 35, 77, + 35, 80, + 35, 83, + 35, 86, + 35, 90, + 36, 36, + 36, 40, + 36, 48, + 36, 50, + 36, 74, + 36, 83, + 36, 86, + 36, 90, + 36, 91, + 37, 55, + 37, 56, + 37, 66, + 37, 70, + 37, 80, + 37, 86, + 38, 55, + 38, 56, + 38, 58, + 38, 67, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 74, + 38, 75, + 38, 76, + 38, 77, + 38, 78, + 38, 79, + 38, 80, + 38, 81, + 38, 82, + 38, 83, + 38, 85, + 38, 86, + 38, 87, + 38, 88, + 38, 89, + 38, 90, + 38, 91, + 39, 13, + 39, 15, + 39, 34, + 39, 66, + 39, 70, + 39, 74, + 39, 77, + 39, 80, + 39, 83, + 39, 86, + 39, 90, + 40, 66, + 40, 70, + 40, 79, + 40, 80, + 40, 83, + 40, 86, + 40, 90, + 41, 66, + 41, 70, + 41, 80, + 41, 86, + 41, 90, + 42, 66, + 42, 68, + 42, 69, + 42, 71, + 42, 72, + 42, 78, + 42, 79, + 42, 80, + 42, 81, + 42, 83, + 42, 84, + 42, 85, + 42, 86, + 42, 87, + 42, 88, + 42, 90, + 43, 66, + 43, 80, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 66, + 44, 70, + 44, 74, + 44, 80, + 44, 83, + 44, 86, + 44, 88, + 44, 90, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 75, + 45, 86, + 45, 88, + 45, 90, + 46, 66, + 46, 70, + 46, 75, + 46, 79, + 46, 80, + 46, 86, + 46, 90, + 47, 70, + 47, 80, + 47, 90, + 48, 34, + 48, 53, + 48, 55, + 48, 56, + 48, 57, + 48, 58, + 48, 68, + 48, 69, + 48, 70, + 48, 71, + 48, 72, + 48, 75, + 48, 80, + 48, 81, + 48, 82, + 48, 84, + 48, 85, + 48, 86, + 48, 89, + 48, 90, + 48, 91, + 49, 13, + 49, 15, + 49, 34, + 49, 38, + 49, 41, + 49, 42, + 49, 66, + 49, 70, + 49, 73, + 49, 74, + 49, 77, + 49, 79, + 49, 80, + 49, 83, + 49, 84, + 49, 85, + 49, 90, + 50, 34, + 50, 53, + 50, 54, + 50, 55, + 50, 56, + 50, 57, + 50, 58, + 50, 66, + 50, 86, + 51, 36, + 51, 40, + 51, 48, + 51, 50, + 51, 53, + 51, 54, + 51, 55, + 51, 56, + 51, 58, + 51, 66, + 51, 70, + 51, 80, + 51, 86, + 51, 90, + 52, 66, + 52, 70, + 52, 75, + 52, 78, + 52, 79, + 52, 80, + 52, 81, + 52, 82, + 52, 86, + 52, 88, + 52, 90, + 53, 13, + 53, 14, + 53, 15, + 53, 27, + 53, 28, + 53, 34, + 53, 36, + 53, 40, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 57, + 53, 58, + 53, 66, + 53, 70, + 53, 74, + 53, 78, + 53, 80, + 53, 83, + 53, 84, + 53, 86, + 53, 88, + 53, 90, + 53, 91, + 54, 34, + 54, 69, + 54, 71, + 54, 72, + 54, 78, + 54, 79, + 54, 81, + 54, 83, + 54, 84, + 54, 85, + 54, 89, + 54, 91, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 27, + 55, 28, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 70, + 55, 80, + 55, 83, + 55, 86, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 27, + 56, 28, + 56, 34, + 56, 36, + 56, 40, + 56, 48, + 56, 50, + 56, 53, + 56, 62, + 56, 66, + 56, 70, + 56, 80, + 56, 83, + 56, 86, + 56, 90, + 56, 94, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 70, + 57, 86, + 57, 90, + 58, 10, + 58, 13, + 58, 14, + 58, 15, + 58, 27, + 58, 28, + 58, 34, + 58, 36, + 58, 40, + 58, 48, + 58, 50, + 58, 53, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 70, + 58, 80, + 58, 82, + 58, 85, + 58, 86, + 58, 87, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 66, + 59, 70, + 59, 74, + 59, 80, + 59, 86, + 59, 88, + 59, 90, + 60, 43, + 67, 87, + 67, 88, + 67, 90, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 72, + 71, 94, + 76, 70, + 80, 87, + 80, 88, + 80, 89, + 80, 90, + 81, 88, + 83, 13, + 83, 15, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 76, + 83, 80, + 83, 82, + 83, 85, + 83, 86, + 83, 87, + 83, 88, + 83, 89, + 83, 90, + 83, 91, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 88, 68, + 88, 69, + 88, 70, + 88, 82, + 89, 68, + 89, 69, + 89, 70, + 89, 80, + 89, 82, + 90, 13, + 90, 15, + 90, 68, + 90, 69, + 90, 70, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 80, + 92, 43 +}; - /* U+178 "Ÿ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x13, - 0x0, 0x0, - - /* U+179 "Ź" */ - 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, - 0xc, 0x2, 0x1, 0x9f, 0xe1, 0x0, 0xc0, 0x30, - - /* U+17A "ź" */ - 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, - 0x0, 0x0, 0x18, 0xc, - - /* U+17B "Ż" */ - 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, - 0xc, 0x2, 0x1, 0x9f, 0xe0, 0x0, 0xc0, 0x0, - - /* U+17C "ż" */ - 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, - 0x0, 0x0, 0x18, 0x0, - - /* U+17D "Ž" */ - 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, - 0xc, 0x2, 0x1, 0x9f, 0xe1, 0x1, 0xc1, 0xb0, - - /* U+17E "ž" */ - 0x7e, 0x60, 0x20, 0x10, 0x18, 0xc, 0x4, 0x7e, - 0x0, 0x0, 0x1c, 0x36, - - /* U+17F "ſ" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc7, 0x0, - - /* U+192 "ƒ" */ - 0x0, 0xe0, 0x40, 0x81, 0x2, 0x4, 0x8, 0x10, - 0x20, 0x41, 0xe3, 0x82, 0x6, 0x6, 0x0, - - /* U+1A0 "Ơ" */ - 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, - 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, - 0xc1, 0xf6, 0x4, 0x20, 0x0, - - /* U+1A1 "ơ" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, - - /* U+1AF "Ư" */ - 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, - 0xcc, 0x12, 0x0, 0x20, - - /* U+1B0 "ư" */ - 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, - - /* U+1F0 "ǰ" */ - 0x1, 0x83, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, - 0xc, 0x0, 0x3, 0x9b, - - /* U+1FA "Ǻ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x5, - 0x0, 0x60, 0x0, 0x0, 0x80, - - /* U+1FB "ǻ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x1c, 0x14, 0xc, 0x0, 0x4, - - /* U+1FC "Ǽ" */ - 0x60, 0x7f, 0x30, 0x40, 0x30, 0x40, 0x1f, 0xc0, - 0x8, 0x40, 0xc, 0x7c, 0x4, 0x7c, 0x6, 0xc0, - 0x3, 0xc0, 0x1, 0xc0, 0x1, 0xfe, 0x0, 0x0, - 0x0, 0x0, 0x0, 0xc0, 0x0, 0x60, - - /* U+1FD "ǽ" */ - 0x0, 0x3, 0xe7, 0x91, 0xc0, 0x86, 0x6, 0x20, - 0x1f, 0xfc, 0x8, 0x68, 0x63, 0x7f, 0xf0, 0xc2, - 0x0, 0x0, 0x6, 0x0, 0x18, 0x0, - - /* U+1FE "Ǿ" */ - 0x0, 0x7, 0xe0, 0xc6, 0x38, 0x66, 0x8c, 0xc9, - 0x91, 0x12, 0x12, 0x63, 0xcc, 0x38, 0xc6, 0xf, - 0xc0, 0x44, 0x0, 0x1, 0x80, 0x18, - - /* U+1FF "ǿ" */ - 0x0, 0x10, 0xf, 0x8e, 0x67, 0x12, 0x49, 0x24, - 0x8a, 0x67, 0x1f, 0x2, 0x80, 0x1, 0x80, 0x60, - - /* U+218 "Ș" */ - 0x0, 0x4, 0x3, 0x1, 0x80, 0x1, 0xf1, 0x84, - 0x83, 0x1, 0x81, 0x83, 0x87, 0x6, 0x3, 0xd, - 0x84, 0x7e, 0x0, 0x0, - - /* U+219 "ș" */ - 0x0, 0x10, 0x18, 0x18, 0x0, 0x3c, 0x62, 0x42, - 0x6, 0x3c, 0x60, 0x62, 0x3e, 0x18, - - /* U+21A "Ț" */ - 0x0, 0x2, 0x0, 0xc0, 0x30, 0x0, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, - 0x3, 0x0, 0xc3, 0xfe, 0x0, 0x0, - - /* U+21B "ț" */ - 0x0, 0x86, 0x30, 0x1c, 0x84, 0x21, 0x8, 0x4f, - 0x38, 0x84, - - /* U+237 "ȷ" */ - 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, - - /* U+259 "ə" */ - 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, - 0x7e, 0x18, - - /* U+2BC "ʼ" */ - 0x9, 0x30, - - /* U+2C6 "ˆ" */ - 0x1, 0x43, 0x0, - - /* U+2C7 "ˇ" */ - 0x3, 0xb6, - - /* U+2C9 "ˉ" */ - 0x7c, 0x0, - - /* U+2D8 "˘" */ - 0x7, 0xa0, - - /* U+2D9 "˙" */ - 0x30, - - /* U+2DA "˚" */ - 0x22, 0x94, 0x40, - - /* U+2DB "˛" */ - 0x6, 0xc4, 0x0, - - /* U+2DC "˜" */ - 0x0, 0xf8, 0x90, - - /* U+2DD "˝" */ - 0x0, 0xd0, 0xb0, - - /* U+2F3 "˳" */ - 0x1a, 0x80, - - /* U+300 "̀" */ - 0x9, 0x0, - - /* U+301 "́" */ - 0x11, 0x0, - - /* U+303 "̃" */ - 0x0, 0xf8, 0x90, - - /* U+309 "̉" */ - 0x6, 0x24, - - /* U+30F "̏" */ - 0x0, 0xb5, 0x80, - - /* U+323 "̣" */ - 0x48, - - /* U+384 "΄" */ - 0x9, 0x20, - - /* U+385 "΅" */ - 0x0, 0x46, 0x18, 0x8, 0x0, - - /* U+386 "Ά" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0xb0, 0x10, - 0x2, 0x0, - - /* U+387 "·" */ - 0x30, - - /* U+388 "Έ" */ - 0x1f, 0xe3, 0x0, 0x60, 0xc, 0x1, 0x80, 0x3f, - 0x86, 0x0, 0xc0, 0x18, 0x3, 0x1, 0x7f, 0x20, - 0x4, 0x0, - - /* U+389 "Ή" */ - 0x30, 0x23, 0x2, 0x30, 0x23, 0x2, 0x30, 0x23, - 0xfe, 0x30, 0x63, 0x2, 0x30, 0x23, 0x2, 0x70, - 0x24, 0x0, 0x40, 0x0, - - /* U+38A "Ί" */ - 0x33, 0x33, 0x33, 0x33, 0x33, 0x74, 0x40, - - /* U+38C "Ό" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0x2f, - 0x84, 0x40, 0x80, 0x0, - - /* U+38E "Ύ" */ - 0x3, 0x0, 0x30, 0x3, 0x0, 0x30, 0x3, 0x0, - 0x70, 0x5, 0x80, 0xc8, 0x8, 0xc1, 0x84, 0x50, - 0x64, 0x0, 0x40, 0x0, - - /* U+38F "Ώ" */ - 0x7b, 0xcc, 0xc2, 0x19, 0x82, 0x60, 0x90, 0x34, - 0xd, 0x83, 0x60, 0x88, 0x67, 0xf1, 0x10, 0x40, - 0x0, - - /* U+390 "ΐ" */ - 0x0, 0xe, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, - 0x8, 0x0, 0x0, 0x46, 0x18, 0x8, 0x0, - - /* U+391 "Α" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, - - /* U+392 "Β" */ - 0xfc, 0x63, 0xb0, 0xd8, 0x2c, 0x37, 0xf3, 0xf9, - 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, - - /* U+393 "Γ" */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, - - /* U+394 "Δ" */ - 0xff, 0xec, 0x9, 0x83, 0x10, 0x63, 0x8, 0x23, - 0x4, 0x40, 0xd8, 0xb, 0x1, 0xc0, 0x18, 0x0, - 0x0, - - /* U+395 "Ε" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, - - /* U+396 "Ζ" */ - 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x40, 0x30, - 0xc, 0x2, 0x1, 0x9f, 0xe0, 0x0, - - /* U+397 "Η" */ - 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, - 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, - - /* U+398 "Θ" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x34, - 0xed, 0x3, 0x40, 0xd8, 0x32, 0x18, 0x7c, 0x4, - 0x0, - - /* U+399 "Ι" */ - 0xff, 0xff, 0xfc, - - /* U+39A "Κ" */ - 0xc1, 0xe1, 0xb1, 0x98, 0x8c, 0xc7, 0xc3, 0x41, - 0xb0, 0xcc, 0x63, 0x30, 0xc0, 0x0, - - /* U+39B "Λ" */ - 0x40, 0xcc, 0x11, 0x82, 0x10, 0xc3, 0x10, 0x66, - 0x4, 0xc0, 0xd0, 0x1e, 0x1, 0xc0, 0x30, 0x0, - 0x0, - - /* U+39C "Μ" */ - 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, - 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, - 0x70, 0x0, - - /* U+39D "Ν" */ - 0xc1, 0xb0, 0x6c, 0x3b, 0x1a, 0xc4, 0xb3, 0x2d, - 0x8b, 0x42, 0xf0, 0xb8, 0x2c, 0x8, 0x0, - - /* U+39E "Ξ" */ - 0x7f, 0x0, 0x0, 0x0, 0x0, 0x1, 0xf0, 0xf8, - 0x0, 0x0, 0x0, 0x1f, 0xc0, 0x0, - - /* U+39F "Ο" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, - - /* U+3A0 "Π" */ - 0xc1, 0xb0, 0x6c, 0x1b, 0x6, 0xc1, 0xb0, 0x6c, - 0x1b, 0x6, 0xc1, 0xb0, 0x6f, 0xf8, 0x0, - - /* U+3A1 "Ρ" */ - 0xc0, 0x60, 0x30, 0x18, 0xf, 0x87, 0xfb, 0xd, - 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, - - /* U+3A3 "Σ" */ - 0x7f, 0xb0, 0x8, 0x6, 0x1, 0x80, 0x60, 0x20, - 0x30, 0x30, 0x30, 0x1f, 0xc0, 0x0, - - /* U+3A4 "Τ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x0, - - /* U+3A5 "Υ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, - - /* U+3A6 "Φ" */ - 0x6, 0x1, 0xe0, 0xff, 0x33, 0x24, 0x66, 0x8c, - 0xd1, 0x9b, 0x33, 0x36, 0xc3, 0xe0, 0x18, 0x0, - 0x0, - - /* U+3A7 "Χ" */ - 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x3, 0x0, - 0xc0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, - - /* U+3A8 "Ψ" */ - 0x4, 0x0, 0x80, 0x10, 0xf, 0x83, 0x58, 0xc9, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x89, 0x11, 0x0, - 0x0, - - /* U+3A9 "Ω" */ - 0x7b, 0xcc, 0xc2, 0x19, 0x82, 0x60, 0x90, 0x34, - 0xd, 0x83, 0x60, 0x88, 0x63, 0xf0, 0x10, - - /* U+3AA "Ϊ" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, - 0x0, 0x1, 0x30, 0x0, - - /* U+3AB "Ϋ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x13, - 0x0, 0x0, - - /* U+3AC "ά" */ - 0x0, 0x1e, 0xd8, 0xc8, 0x64, 0x32, 0x19, 0xc, - 0xc6, 0x3f, 0xc, 0x0, 0x0, 0x80, 0x40, 0x20, - - /* U+3AD "έ" */ - 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, - 0x7e, 0x18, 0x0, 0x8, 0x8, 0x8, - - /* U+3AE "ή" */ - 0x0, 0xc, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1f, 0xe1, 0x80, 0x2, 0x4, 0x8, - - /* U+3AF "ί" */ - 0x7, 0x44, 0x44, 0x44, 0x40, 0x4, 0x44, - - /* U+3B0 "ΰ" */ - 0x0, 0x3c, 0x26, 0x63, 0x63, 0x63, 0x63, 0x63, - 0x62, 0x0, 0x0, 0x46, 0x18, 0x8, 0x0, - - /* U+3B1 "α" */ - 0x0, 0x1e, 0xd8, 0xc8, 0x64, 0x32, 0x19, 0xc, - 0xc6, 0x3f, 0xc, 0x0, - - /* U+3B2 "β" */ - 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc3, 0xc2, - 0xce, 0xdc, 0xc6, 0xc2, 0x46, 0x7c, 0x0, - - /* U+3B3 "γ" */ - 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x34, - 0x24, 0x66, 0x62, 0x42, 0x0, - - /* U+3B4 "δ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0x46, 0x1e, 0x1c, 0x8, 0x4, 0x1, 0xe0, 0x0, - - /* U+3B5 "ε" */ - 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, - 0x7e, 0x18, - - /* U+3B6 "ζ" */ - 0x4, 0x2, 0x6, 0x1e, 0x30, 0x20, 0x20, 0x20, - 0x30, 0x10, 0x18, 0xc, 0x6, 0x7e, 0x0, - - /* U+3B7 "η" */ - 0x0, 0xc, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1f, 0xe1, 0x80, - - /* U+3B8 "θ" */ - 0x0, 0xf, 0x8, 0x8c, 0x66, 0x12, 0x9, 0xfc, - 0xc6, 0x41, 0x31, 0x88, 0xc7, 0xc0, 0x80, - - /* U+3B9 "ι" */ - 0x7, 0x44, 0x44, 0x44, 0x40, - - /* U+3BA "κ" */ - 0xc6, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc4, - 0x0, - - /* U+3BB "λ" */ - 0x0, 0x61, 0x90, 0xcc, 0x42, 0x61, 0xa0, 0xf0, - 0x38, 0x18, 0xc, 0x4, 0x6, 0x6, 0x0, - - /* U+3BC "μ" */ - 0x1, 0x83, 0x6, 0xf, 0xf8, 0xf1, 0xe3, 0xc7, - 0x8f, 0x1e, 0x30, 0x0, - - /* U+3BD "ν" */ - 0x18, 0x18, 0x38, 0x2c, 0x24, 0x64, 0x46, 0x42, - 0x0, - - /* U+3BE "ξ" */ - 0x0, 0x4, 0x2, 0x2, 0x1c, 0x60, 0x60, 0x40, - 0x40, 0x20, 0x1c, 0x30, 0x60, 0x60, 0x3e, 0x4, - - /* U+3BF "ο" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, - - /* U+3C0 "π" */ - 0x0, 0x8, 0x62, 0x30, 0x8c, 0x23, 0x8, 0xc2, - 0x30, 0x8c, 0x7f, 0x80, 0x0, - - /* U+3C1 "ρ" */ - 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc2, 0xc2, - 0xc2, 0xc2, 0x46, 0x7c, 0x10, - - /* U+3C2 "ς" */ - 0x4, 0x2, 0x2, 0x1e, 0x30, 0x60, 0x40, 0x40, - 0x40, 0x63, 0x3e, 0x8, - - /* U+3C3 "σ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc4, 0x3f, 0x80, 0x0, - - /* U+3C4 "τ" */ - 0x0, 0xe, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, - 0x7f, 0x0, - - /* U+3C5 "υ" */ - 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, - 0x0, - - /* U+3C6 "φ" */ - 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x69, - 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x93, 0x13, - 0xc0, 0x0, - - /* U+3C7 "χ" */ - 0x42, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x24, 0x66, - 0x0, - - /* U+3C8 "ψ" */ - 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x6b, - 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x11, 0x22, - 0x60, 0x0, - - /* U+3C9 "ω" */ - 0x0, 0x1, 0xef, 0x9, 0xcc, 0xc4, 0x64, 0x21, - 0x21, 0x9, 0x88, 0x4c, 0x6, 0x20, 0x30, 0x0, - 0x0, - - /* U+3CA "ϊ" */ - 0x0, 0x71, 0x4, 0x10, 0x41, 0x4, 0x10, 0x0, - 0x13, 0x0, - - /* U+3CB "ϋ" */ - 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, - 0x0, 0x2, 0x60, 0x0, - - /* U+3CC "ό" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x0, 0x80, 0x40, 0x20, - - /* U+3CD "ύ" */ - 0x0, 0xf1, 0x36, 0x3c, 0x78, 0xf1, 0xe3, 0xc4, - 0x0, 0x0, 0x81, 0x2, 0x0, - - /* U+3CE "ώ" */ - 0x0, 0x1, 0xef, 0x9, 0xcc, 0xc4, 0x64, 0x21, - 0x21, 0x9, 0x88, 0x4c, 0x6, 0x20, 0x30, 0x0, - 0x0, 0x0, 0x2, 0x0, 0x10, 0x0, 0x80, - - /* U+3D1 "ϑ" */ - 0x0, 0x1e, 0x18, 0x8c, 0x64, 0x32, 0x19, 0x3e, - 0x36, 0x13, 0x9, 0x84, 0xc3, 0xc0, 0x0, - - /* U+3D2 "ϒ" */ - 0x4, 0x1, 0x0, 0x40, 0x10, 0xc, 0x3, 0x80, - 0xe0, 0x68, 0x13, 0xc, 0x46, 0x1c, 0x0, - - /* U+3D6 "ϖ" */ - 0x0, 0x1, 0xce, 0x9, 0xd8, 0xcc, 0x44, 0x23, - 0x21, 0x19, 0x88, 0xcc, 0x4, 0x7f, 0xf0, 0x0, - 0x0, - - /* U+400 "Ѐ" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x10, 0x30, - - /* U+401 "Ё" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x26, 0x0, - - /* U+402 "Ђ" */ - 0x0, 0x0, 0x9c, 0x8, 0x60, 0x82, 0x8, 0x20, - 0x82, 0xc, 0xe0, 0xf8, 0x8, 0x0, 0x80, 0x8, - 0xf, 0xf8, 0x0, 0x0, - - /* U+403 "Ѓ" */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0xc, - - /* U+404 "Є" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x7, - 0xe1, 0x80, 0x60, 0x18, 0x33, 0x18, 0x7c, 0x4, - 0x0, - - /* U+405 "Ѕ" */ - 0x0, 0x1f, 0x18, 0x48, 0x30, 0x18, 0x18, 0x38, - 0x70, 0x60, 0x30, 0xd8, 0x47, 0xe0, 0x0, - - /* U+406 "І" */ - 0xff, 0xff, 0xfc, - - /* U+407 "Ї" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x30, 0xc3, - 0x0, 0x1, 0x30, 0x0, - - /* U+408 "Ј" */ - 0x0, 0x3c, 0x66, 0x42, 0x3, 0x3, 0x3, 0x3, - 0x3, 0x3, 0x3, 0x3, 0x0, - - /* U+409 "Љ" */ - 0xe0, 0xfe, 0x18, 0x61, 0x8c, 0x30, 0x42, 0x18, - 0x21, 0xc, 0x10, 0x86, 0x18, 0x43, 0xf8, 0x21, - 0x80, 0x10, 0xc0, 0x8, 0x60, 0x7, 0xf0, 0x0, - 0x0, 0x0, - - /* U+40A "Њ" */ - 0xc1, 0xfc, 0xc1, 0x86, 0xc1, 0x82, 0xc1, 0x83, - 0xc1, 0x82, 0xff, 0xfe, 0xc1, 0xf8, 0xc1, 0x80, - 0xc1, 0x80, 0xc1, 0x80, 0xc1, 0x80, 0x0, 0x0, - - /* U+40B "Ћ" */ - 0x8, 0x30, 0x83, 0x8, 0x30, 0x83, 0x8, 0x30, - 0xc6, 0xf, 0xc0, 0x80, 0x8, 0x0, 0x80, 0x7f, - 0x80, 0x0, - - /* U+40C "Ќ" */ - 0xc1, 0xe1, 0xb1, 0x98, 0x8c, 0xc7, 0xc3, 0x41, - 0xb0, 0xcc, 0x63, 0x30, 0xc0, 0x1, 0x80, 0x60, - - /* U+40D "Ѝ" */ - 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, - 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, 0x0, 0x40, - 0x60, - - /* U+40E "Ў" */ - 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, - 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, - 0x0, 0x1, 0xe0, 0x40, - - /* U+40F "Џ" */ - 0x8, 0x6, 0x3, 0x1f, 0xfc, 0x1e, 0xf, 0x7, - 0x83, 0xc1, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0xc, - 0x0, - - /* U+410 "А" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, - - /* U+411 "Б" */ - 0xfe, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x7b, 0xf1, - 0x80, 0xc0, 0x60, 0x3f, 0x80, 0x0, - - /* U+412 "В" */ - 0xfc, 0x63, 0xb0, 0xd8, 0x2c, 0x37, 0xf3, 0xf9, - 0x86, 0xc3, 0x61, 0xbf, 0x80, 0x0, - - /* U+413 "Г" */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, - - /* U+414 "Д" */ - 0x40, 0x2c, 0x3, 0xc0, 0x3f, 0xff, 0x60, 0xc3, - 0x4, 0x10, 0x41, 0x4, 0x10, 0x41, 0x84, 0x18, - 0x41, 0x84, 0x18, 0x41, 0xfc, 0x0, 0x0, - - /* U+415 "Е" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, - - /* U+416 "Ж" */ - 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, - 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, - 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, - - /* U+417 "З" */ - 0x0, 0x1f, 0x18, 0xc8, 0x30, 0x18, 0x8, 0x38, - 0xe, 0x1, 0x20, 0xd8, 0x47, 0xe0, 0x0, - - /* U+418 "И" */ - 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, - 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, - - /* U+419 "Й" */ - 0xc1, 0xf0, 0xf8, 0x7e, 0x3d, 0x9e, 0x4f, 0x37, - 0x8f, 0xc3, 0xe1, 0xf0, 0x60, 0x0, 0x1, 0xe0, - 0x80, - - /* U+41A "К" */ - 0xc1, 0xb0, 0xcc, 0x63, 0x10, 0xcc, 0x3e, 0xd, - 0x83, 0x30, 0xc6, 0x30, 0x8c, 0x30, 0x0, - - /* U+41B "Л" */ - 0xc0, 0xd8, 0x33, 0xc, 0xc3, 0x10, 0xc4, 0x31, - 0xc, 0x43, 0x10, 0xc4, 0x31, 0xfc, 0x0, - - /* U+41C "М" */ - 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, - 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, - 0x70, 0x0, - - /* U+41D "Н" */ - 0xc0, 0xb0, 0x2c, 0xb, 0x2, 0xc0, 0xbf, 0xec, - 0x1b, 0x2, 0xc0, 0xb0, 0x2c, 0x8, 0x0, - - /* U+41E "О" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, - - /* U+41F "П" */ - 0xc1, 0xb0, 0x6c, 0x1b, 0x6, 0xc1, 0xb0, 0x6c, - 0x1b, 0x6, 0xc1, 0xb0, 0x6f, 0xf8, 0x0, - - /* U+420 "Р" */ - 0xc0, 0x60, 0x30, 0x18, 0xf, 0x87, 0xfb, 0xd, - 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, - - /* U+421 "С" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x98, 0x4, - 0x1, 0x0, 0x60, 0x18, 0x23, 0x18, 0x7c, 0x4, - 0x0, - - /* U+422 "Т" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0xf, 0xf8, 0x0, - - /* U+423 "У" */ - 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, - 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, - 0x0, - - /* U+424 "Ф" */ - 0x0, 0x0, 0x60, 0x1f, 0x83, 0x6e, 0x66, 0x24, - 0x63, 0x46, 0x34, 0x63, 0x66, 0x22, 0x66, 0x1f, - 0xc0, 0x60, 0x2, 0x0, - - /* U+425 "Х" */ - 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x3, 0x0, - 0xc0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, - - /* U+426 "Ц" */ - 0x0, 0x40, 0x8, 0x1, 0x7f, 0xec, 0x19, 0x83, - 0x30, 0x66, 0xc, 0xc1, 0x98, 0x33, 0x6, 0x60, - 0xcc, 0x19, 0x83, 0x0, 0x0, - - /* U+427 "Ч" */ - 0x1, 0x80, 0xc0, 0x60, 0x31, 0xdb, 0xff, 0x7, - 0x83, 0xc1, 0xe0, 0xf0, 0x60, 0x0, - - /* U+428 "Ш" */ - 0xff, 0xfe, 0x10, 0xf0, 0x87, 0x84, 0x3c, 0x21, - 0xe1, 0xf, 0x8, 0x78, 0x43, 0xc2, 0x1e, 0x10, - 0xf0, 0x86, 0x0, 0x0, - - /* U+429 "Щ" */ - 0x0, 0x4, 0x0, 0x30, 0x0, 0xff, 0xff, 0xc2, - 0x1b, 0x8, 0x6c, 0x21, 0xb0, 0x86, 0xc2, 0x1b, - 0x8, 0x6c, 0x21, 0xb0, 0x86, 0xc2, 0x1b, 0x8, - 0x60, 0x0, 0x0, - - /* U+42A "Ъ" */ - 0x1f, 0xc1, 0x86, 0x18, 0x21, 0x82, 0x18, 0x21, - 0x8e, 0x1f, 0x81, 0x80, 0x18, 0x1, 0x80, 0xf8, - 0x0, 0x0, - - /* U+42B "Ы" */ - 0xfe, 0x2c, 0x32, 0xc1, 0x2c, 0x12, 0xc1, 0x2c, - 0x72, 0xfc, 0x2c, 0x2, 0xc0, 0x2c, 0x2, 0xc0, - 0x20, 0x0, - - /* U+42C "Ь" */ - 0xfe, 0x61, 0xb0, 0x58, 0x2c, 0x16, 0x7b, 0xf1, - 0x80, 0xc0, 0x60, 0x30, 0x0, 0x0, - - /* U+42D "Э" */ - 0x0, 0x1f, 0x18, 0xd8, 0x20, 0x18, 0xc, 0x7e, - 0x3, 0x1, 0xe0, 0xd0, 0xcf, 0xc0, 0x80, - - /* U+42E "Ю" */ - 0x0, 0x6, 0x1e, 0x31, 0x8d, 0x98, 0x2c, 0x81, - 0x64, 0xf, 0xe0, 0x79, 0x3, 0xc8, 0x1e, 0x60, - 0xb3, 0xd, 0x8f, 0xc0, 0x0, 0x0, - - /* U+42F "Я" */ - 0x61, 0x90, 0xcc, 0x62, 0x31, 0xf9, 0xfd, 0x86, - 0xc3, 0x61, 0xb0, 0xcf, 0xe0, 0x0, - - /* U+430 "а" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, - - /* U+431 "б" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x84, - 0xe6, 0x5e, 0x10, 0xe, 0x1, 0xc0, 0x30, 0x0, - - /* U+432 "в" */ - 0xfc, 0xc6, 0xc2, 0xc6, 0xfc, 0xc6, 0xc6, 0xfc, - 0x0, - - /* U+433 "г" */ - 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0x0, - - /* U+434 "д" */ - 0x0, 0x30, 0x2c, 0xb, 0xfe, 0x63, 0x8, 0x43, - 0x10, 0xc4, 0x11, 0x4, 0x41, 0xf0, 0x0, - - /* U+435 "е" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, - - /* U+436 "ж" */ - 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1f, 0x83, - 0x6c, 0x26, 0x46, 0x66, 0x0, 0x0, - - /* U+437 "з" */ - 0x0, 0x3c, 0x66, 0x42, 0x6, 0x1c, 0x6, 0x42, - 0x7e, 0x18, - - /* U+438 "и" */ - 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, - 0x0, - - /* U+439 "й" */ - 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, - 0x0, 0x0, 0x78, 0x40, - - /* U+43A "к" */ - 0xc6, 0xcc, 0xc8, 0xd8, 0xf0, 0xd8, 0xcc, 0xc4, - 0x0, - - /* U+43B "л" */ - 0xc1, 0x30, 0x88, 0x44, 0x23, 0x11, 0x88, 0xc4, - 0x7e, 0x0, 0x0, - - /* U+43C "м" */ - 0xcc, 0xf3, 0x3d, 0xef, 0x4b, 0xf2, 0xf8, 0x7e, - 0x1f, 0x87, 0x0, 0x0, - - /* U+43D "н" */ - 0xc3, 0x87, 0xe, 0x3f, 0xf8, 0x70, 0xe1, 0x0, - - /* U+43E "о" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, - - /* U+43F "п" */ - 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xfe, - 0x0, - - /* U+440 "р" */ - 0x0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc2, - 0xc2, 0xc2, 0xc6, 0xfc, 0x18, - - /* U+441 "с" */ - 0x0, 0x3c, 0x62, 0x40, 0x40, 0x40, 0x40, 0x63, - 0x3e, 0x8, - - /* U+442 "т" */ - 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, - 0x0, - - /* U+443 "у" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, - - /* U+444 "ф" */ - 0x0, 0x0, 0x80, 0x10, 0x2, 0x3, 0xfc, 0xcc, - 0x91, 0x1a, 0x23, 0x44, 0x68, 0x8d, 0x91, 0x1f, - 0xe1, 0x70, 0x8, 0x1, 0x0, 0x20, - - /* U+445 "х" */ - 0x42, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x24, 0x66, - 0x0, - - /* U+446 "ц" */ - 0x0, 0x0, 0x80, 0x5f, 0xec, 0x66, 0x13, 0x9, - 0x84, 0xc2, 0x61, 0x30, 0x80, 0x0, - - /* U+447 "ч" */ - 0x2, 0x2, 0x2, 0x3e, 0x62, 0x42, 0x42, 0x42, - 0x0, - - /* U+448 "ш" */ - 0xff, 0xf8, 0x8f, 0x11, 0xe2, 0x3c, 0x47, 0x88, - 0xf1, 0x1e, 0x23, 0x0, 0x0, - - /* U+449 "щ" */ - 0x0, 0x0, 0x3, 0x0, 0x3f, 0xff, 0xc4, 0x6c, - 0x46, 0xc4, 0x6c, 0x46, 0xc4, 0x6c, 0x46, 0xc4, - 0x60, 0x0, - - /* U+44A "ъ" */ - 0x1f, 0x4, 0x61, 0x8, 0x42, 0x1f, 0x87, 0x81, - 0x3, 0xc0, 0x0, 0x0, - - /* U+44B "ы" */ - 0xfc, 0x71, 0x9c, 0x67, 0x19, 0xfc, 0x7c, 0x1c, - 0x7, 0x1, 0x0, 0x0, - - /* U+44C "ь" */ - 0xfd, 0x8f, 0x1e, 0x3f, 0xde, 0x30, 0x60, 0x0, - - /* U+44D "э" */ - 0x0, 0x3c, 0x66, 0x42, 0x3, 0x1f, 0x3, 0x42, - 0x3e, 0x18, - - /* U+44E "ю" */ - 0x0, 0xc, 0x7c, 0xcc, 0x6c, 0x82, 0xc8, 0x2f, - 0x82, 0xc8, 0x2c, 0xc6, 0xc7, 0xc0, 0x10, - - /* U+44F "я" */ - 0x43, 0x63, 0x23, 0x3f, 0x73, 0x43, 0x43, 0x3f, - 0x0, - - /* U+450 "ѐ" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x8, 0x18, - - /* U+451 "ё" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x26, 0x0, - - /* U+452 "ђ" */ - 0x0, 0x1, 0x80, 0x60, 0x33, 0x19, 0x8c, 0xc6, - 0x63, 0x31, 0x98, 0xcc, 0x67, 0xe3, 0x63, 0xc1, - 0xe0, 0x60, - - /* U+453 "ѓ" */ - 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0x0, 0x3, - 0x6, - - /* U+454 "є" */ - 0x0, 0x3e, 0x23, 0x61, 0x60, 0x78, 0x40, 0x63, - 0x3e, 0x8, - - /* U+455 "ѕ" */ - 0x0, 0x3c, 0x62, 0x42, 0x6, 0x3c, 0x60, 0x62, - 0x3e, 0x18, - - /* U+456 "і" */ - 0xff, 0xff, 0xc, - - /* U+457 "ї" */ - 0x30, 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x0, 0x4, - 0xc0, - - /* U+458 "ј" */ - 0x6, 0x33, 0x33, 0x33, 0x33, 0x33, 0x0, 0x30, - - /* U+459 "љ" */ - 0xc3, 0xf1, 0x8c, 0x62, 0x30, 0x8c, 0xc6, 0x33, - 0xf0, 0xcc, 0x3, 0x30, 0xf, 0xc0, 0x0, 0x0, - - /* U+45A "њ" */ - 0xc3, 0xe6, 0x11, 0xb0, 0x85, 0x84, 0x6f, 0xfe, - 0x63, 0x3, 0x8, 0x18, 0x40, 0x0, 0x0, - - /* U+45B "ћ" */ - 0x31, 0x98, 0xcc, 0x66, 0x33, 0x19, 0x8c, 0xc6, - 0x7e, 0x36, 0x3e, 0x1f, 0x6, 0x0, - - /* U+45C "ќ" */ - 0xc6, 0xcc, 0xc8, 0xd8, 0xf0, 0xd8, 0xcc, 0xc4, - 0x0, 0x0, 0x30, 0x18, - - /* U+45D "ѝ" */ - 0xc2, 0xe2, 0xe2, 0xf2, 0xda, 0xce, 0xce, 0xc6, - 0x0, 0x0, 0x10, 0x30, - - /* U+45E "ў" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x3c, 0x20, - - /* U+45F "џ" */ - 0x10, 0x10, 0x10, 0xfe, 0xc6, 0xc2, 0xc2, 0xc2, - 0xc2, 0xc2, 0xc2, 0x0, - - /* U+460 "Ѡ" */ - 0x0, 0x7, 0x9e, 0x47, 0x3c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, - 0x3c, 0x63, 0x0, 0x0, - - /* U+461 "ѡ" */ - 0x0, 0xf, 0x73, 0x33, 0x46, 0x28, 0xc5, 0x18, - 0xa3, 0x14, 0x62, 0x8c, 0x40, 0x0, - - /* U+462 "Ѣ" */ - 0x3f, 0x86, 0x18, 0xc1, 0x18, 0x23, 0x4, 0x67, - 0x8f, 0xc1, 0x80, 0x30, 0xf, 0x80, 0xc0, 0x0, - 0x0, - - /* U+463 "ѣ" */ - 0x3f, 0x18, 0xcc, 0x66, 0x33, 0x39, 0xf0, 0xc0, - 0x60, 0x7c, 0x3e, 0xc, 0x6, 0x0, 0x0, - - /* U+464 "Ѥ" */ - 0x0, 0x6, 0x1e, 0x31, 0x89, 0x98, 0x6c, 0x81, - 0x64, 0x3, 0xfe, 0x1f, 0xf0, 0xc8, 0x6, 0x40, - 0xb3, 0xd, 0x8f, 0xc0, 0x8, 0x0, - - /* U+465 "ѥ" */ - 0x0, 0x18, 0xf3, 0x33, 0x6c, 0x2d, 0x81, 0xfe, - 0x36, 0x6, 0x42, 0xcf, 0x80, 0x60, - - /* U+466 "Ѧ" */ - 0xcc, 0xd3, 0x26, 0xd8, 0xfe, 0x3f, 0xc, 0xc1, - 0x20, 0x48, 0x1e, 0x3, 0x0, 0xc0, 0x0, - - /* U+467 "ѧ" */ - 0xd9, 0x2d, 0x9f, 0x87, 0xc2, 0x41, 0xa0, 0x70, - 0x30, 0x0, 0x0, - - /* U+468 "Ѩ" */ - 0x49, 0x9a, 0x6c, 0x93, 0x64, 0xff, 0xe7, 0xfe, - 0x23, 0x31, 0x9, 0x88, 0x68, 0x41, 0xc2, 0xe, - 0x10, 0x60, 0x0, 0x0, - - /* U+469 "ѩ" */ - 0xd2, 0x7b, 0x4b, 0xff, 0x7f, 0xcc, 0xd9, 0x8b, - 0x31, 0xc6, 0x18, 0x0, 0x0, - - /* U+46A "Ѫ" */ - 0xc6, 0x3c, 0x63, 0xc6, 0x2c, 0x62, 0xc6, 0x67, - 0xfc, 0xf, 0x0, 0x90, 0x19, 0x83, 0x8, 0x3f, - 0xc0, 0x0, - - /* U+46B "ѫ" */ - 0xcc, 0xf3, 0x3c, 0xc9, 0xbe, 0x3f, 0x5, 0x83, - 0x20, 0xfc, 0x0, 0x0, - - /* U+46C "Ѭ" */ - 0xc4, 0x63, 0xc4, 0x63, 0xc4, 0x63, 0xc4, 0x63, - 0xc6, 0x63, 0xff, 0xfe, 0xc0, 0xf0, 0xc0, 0xd8, - 0xc1, 0x88, 0xc1, 0xc, 0xc3, 0xfc, 0x0, 0x0, - - /* U+46D "ѭ" */ - 0xcc, 0xcb, 0x33, 0x2c, 0xcc, 0xb3, 0xbe, 0xff, - 0xe3, 0x5, 0x8c, 0x32, 0x30, 0xfc, 0x0, 0x0, - - /* U+46E "Ѯ" */ - 0x0, 0x60, 0x40, 0x40, 0x7c, 0x6, 0x2, 0x2, - 0x6, 0x3c, 0xc, 0x6, 0x2, 0x6, 0x7c, 0x0, - 0x0, 0x18, 0x34, 0x0, - - /* U+46F "ѯ" */ - 0x0, 0xc1, 0x2, 0x7, 0xc0, 0xc1, 0x86, 0x3c, - 0xc, 0x1b, 0xe0, 0x0, 0x4, 0x14, 0x0, - - /* U+470 "Ѱ" */ - 0x4, 0x0, 0x80, 0x10, 0xf, 0x83, 0x58, 0xc9, - 0x91, 0x12, 0x22, 0x44, 0x48, 0x89, 0x11, 0x0, - 0x0, - - /* U+471 "ѱ" */ - 0x4, 0x0, 0x80, 0x10, 0x2, 0x1, 0xf0, 0x6b, - 0x99, 0x12, 0x22, 0x44, 0x68, 0x89, 0x11, 0x22, - 0x60, 0x0, - - /* U+472 "Ѳ" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0xd0, 0x37, - 0xfd, 0x3, 0x40, 0xd8, 0x33, 0x18, 0x7c, 0x4, - 0x0, - - /* U+473 "ѳ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x26, 0x13, 0xf9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, - - /* U+474 "Ѵ" */ - 0xc, 0x3, 0x1, 0xc0, 0x58, 0x12, 0xc, 0x82, - 0x30, 0x84, 0x61, 0x10, 0x6c, 0xc, 0x0, - - /* U+475 "ѵ" */ - 0x18, 0xc, 0xe, 0x5, 0x82, 0x43, 0x21, 0x18, - 0x86, 0x1, 0x0, - - /* U+476 "Ѷ" */ - 0xc, 0x3, 0x1, 0xc0, 0x58, 0x12, 0xc, 0x82, - 0x30, 0x84, 0x61, 0x10, 0x6c, 0xc, 0x0, 0x2c, - 0x16, 0x0, - - /* U+477 "ѷ" */ - 0x18, 0xc, 0xe, 0x5, 0x82, 0x43, 0x21, 0x18, - 0x86, 0x1, 0x0, 0xb, 0xb, 0x0, - - /* U+478 "Ѹ" */ - 0x0, 0x0, 0x0, 0x1, 0x80, 0x0, 0x18, 0x0, - 0x1, 0x1, 0xf0, 0x30, 0x63, 0x6, 0x18, 0x31, - 0xc3, 0x6, 0x2c, 0x60, 0xc4, 0x88, 0x9, 0x91, - 0x1, 0x23, 0x30, 0x64, 0x26, 0xc, 0x0, 0x63, - 0x0, 0x7, 0xc0, 0x0, 0x20, 0x0, - - /* U+479 "ѹ" */ - 0x0, 0x0, 0x0, 0x18, 0x0, 0x6, 0x0, 0x1, - 0x3, 0xe0, 0xc3, 0x18, 0x61, 0x84, 0x70, 0x82, - 0x2c, 0x41, 0x12, 0x20, 0x99, 0x18, 0xc8, 0xc7, - 0xc4, 0x20, 0x80, 0x0, - - /* U+47A "Ѻ" */ - 0x0, 0x1, 0x1, 0xf0, 0xf6, 0x60, 0x98, 0x34, - 0xd, 0x3, 0x40, 0xd0, 0x36, 0xc, 0x96, 0x1f, - 0x3, 0x0, 0x0, - - /* U+47B "ѻ" */ - 0x8, 0x1f, 0x1f, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0xe, 0x0, 0x0, - - /* U+47C "Ѽ" */ - 0x0, 0x7, 0x9e, 0x47, 0x2c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3c, 0x3, 0xc0, 0x3c, 0x3, 0x40, - 0x36, 0x6, 0x2, 0x0, 0x20, 0xb, 0x80, 0x40, - - /* U+47D "ѽ" */ - 0x0, 0x3, 0xdc, 0x66, 0x66, 0x62, 0x46, 0x24, - 0x22, 0x40, 0x26, 0x2, 0x30, 0x60, 0x20, 0x2, - 0x0, 0x9c, 0x6, 0x0, - - /* U+47E "Ѿ" */ - 0x0, 0x7, 0x9e, 0x47, 0x3c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, - 0x3c, 0x63, 0x0, 0x0, 0x20, 0x1f, 0x80, - - /* U+47F "ѿ" */ - 0x0, 0xf, 0x73, 0x33, 0x46, 0x28, 0xc5, 0x18, - 0xa3, 0x14, 0x62, 0x8c, 0x40, 0x0, 0x0, 0x6, - 0x0, 0x0, - - /* U+480 "Ҁ" */ - 0x4, 0x1, 0x0, 0x40, 0x70, 0x30, 0x18, 0x6, - 0x1, 0x0, 0x40, 0x10, 0x6, 0x1, 0x82, 0x31, - 0x87, 0xc0, 0x40, - - /* U+481 "ҁ" */ - 0x8, 0x8, 0x8, 0x38, 0x20, 0x60, 0x40, 0x40, - 0x40, 0x63, 0x3e, 0x8, - - /* U+482 "҂" */ - 0x20, 0xc, 0x1, 0xc0, 0x60, 0x68, 0x1, 0x20, - 0x70, 0x38, 0x1b, 0x0, 0x40, 0x0, - - /* U+483 "҃" */ - 0x40, 0xf8, 0x10, - - /* U+484 "҄" */ - 0x62, 0x38, 0x0, - - /* U+485 "҅" */ - 0x9, 0x0, - - /* U+486 "҆" */ - 0x9, 0x0, - - /* U+488 "҈" */ - 0x0, 0x0, 0x3, 0x80, 0x0, 0x0, 0x30, 0x1c, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe0, 0xa, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x1c, - 0x0, 0x0, 0x2, 0x80, 0x0, 0x0, - - /* U+489 "҉" */ - 0x0, 0x0, 0x2, 0x0, 0x4, 0x1, 0x80, 0x81, - 0x81, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0xe0, - 0xc, 0x0, 0x0, 0x0, 0x0, 0x80, 0x81, 0x1, - 0x80, 0x20, 0x0, 0x40, 0x0, 0x0, - - /* U+48A "Ҋ" */ - 0x0, 0x0, 0x18, 0x1, 0x0, 0x2c, 0x1d, 0xc3, - 0x38, 0x67, 0x8c, 0xd9, 0x99, 0x33, 0x36, 0x63, - 0xcc, 0x39, 0x87, 0x30, 0x60, 0x0, 0x0, 0x7, - 0x80, 0x80, 0x0, - - /* U+48B "ҋ" */ - 0x0, 0x1, 0x80, 0x40, 0x2c, 0x37, 0x13, 0x89, - 0xe4, 0xda, 0x67, 0x33, 0x98, 0xc0, 0x0, 0x1, - 0xe0, 0x80, - - /* U+48C "Ҍ" */ - 0x3f, 0x86, 0x18, 0xc1, 0x18, 0x23, 0x4, 0x67, - 0x8f, 0xc1, 0x80, 0x30, 0xf, 0x80, 0xc0, 0x0, - 0x0, - - /* U+48D "ҍ" */ - 0x3f, 0x18, 0xcc, 0x66, 0x33, 0x39, 0xf0, 0xc0, - 0x60, 0x30, 0x18, 0x1f, 0x6, 0x3, 0x0, - - /* U+48E "Ҏ" */ - 0xc0, 0x60, 0x30, 0x18, 0xf, 0x97, 0xfb, 0x1d, - 0x82, 0xc1, 0x61, 0xbf, 0x80, 0x0, - - /* U+48F "ҏ" */ - 0x0, 0xc0, 0xc0, 0xc0, 0xfe, 0xce, 0xce, 0xc2, - 0xc2, 0xc2, 0xc6, 0xfc, 0x18, - - /* U+490 "Ґ" */ - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x2, 0x2, 0x2, - - /* U+491 "ґ" */ - 0xc3, 0xc, 0x30, 0xc3, 0xc, 0x3e, 0xc, 0x30, - 0x80, - - /* U+492 "Ғ" */ - 0x60, 0x30, 0x18, 0xc, 0x6, 0x7, 0xc3, 0xe0, - 0xc0, 0x60, 0x30, 0x1f, 0xc0, 0x0, - - /* U+493 "ғ" */ - 0x30, 0x30, 0x30, 0x30, 0x7c, 0x30, 0x30, 0x3e, - 0x0, - - /* U+494 "Ҕ" */ - 0x0, 0xe, 0x2, 0xc3, 0xc3, 0xc3, 0xc3, 0xc2, - 0xfc, 0xf0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, - - /* U+495 "ҕ" */ - 0x0, 0x30, 0x36, 0x2c, 0x58, 0xb3, 0x7c, 0xc1, - 0x83, 0xe0, 0x0, - - /* U+496 "Җ" */ - 0x0, 0x2, 0x0, 0x2, 0x0, 0x2, 0x41, 0xe, - 0x61, 0xc, 0x31, 0x18, 0x31, 0x30, 0x19, 0x30, - 0xf, 0xe0, 0xf, 0xe0, 0x19, 0x30, 0x31, 0x10, - 0x21, 0x18, 0x61, 0xc, 0x0, 0x0, - - /* U+497 "җ" */ - 0x0, 0x10, 0x0, 0x80, 0x4, 0x8c, 0x66, 0x66, - 0x1b, 0x20, 0x5b, 0x3, 0xf0, 0x36, 0xc1, 0x32, - 0x19, 0x98, 0x0, 0x0, - - /* U+498 "Ҙ" */ - 0x8, 0x4, 0x2, 0x1, 0x3, 0xe3, 0x19, 0x6, - 0x3, 0x1, 0x7, 0x1, 0xc0, 0x24, 0x1b, 0x8, - 0xfc, 0x0, - - /* U+499 "ҙ" */ - 0x8, 0x8, 0x8, 0x8, 0x3c, 0x66, 0x42, 0x6, - 0x1c, 0x6, 0x42, 0x7e, 0x18, - - /* U+49A "Қ" */ - 0x0, 0x80, 0x20, 0xb, 0x6, 0xc3, 0x31, 0x8c, - 0x43, 0x30, 0xf8, 0x36, 0xc, 0xc3, 0x18, 0xc2, - 0x30, 0xc0, 0x0, - - /* U+49B "қ" */ - 0x1, 0x0, 0x80, 0x58, 0xec, 0xc6, 0x43, 0x61, - 0xe0, 0xd8, 0x66, 0x31, 0x0, 0x0, - - /* U+49C "Ҝ" */ - 0xc1, 0xe1, 0xb0, 0xda, 0xcd, 0x47, 0xe3, 0xf1, - 0xa8, 0xc6, 0x61, 0xb0, 0xc0, 0x0, - - /* U+49D "ҝ" */ - 0xc3, 0xc6, 0xf4, 0xfc, 0xf8, 0xfc, 0xc4, 0xc6, - 0x0, - - /* U+49E "Ҟ" */ - 0x20, 0xc4, 0x30, 0x84, 0x11, 0x82, 0x60, 0x78, - 0xb, 0x1, 0x30, 0x7b, 0x1f, 0x30, 0x82, 0x0, - 0x0, - - /* U+49F "ҟ" */ - 0x31, 0x8c, 0xc3, 0x20, 0xd8, 0x3c, 0xf, 0x3, - 0x60, 0xcc, 0x30, 0xc, 0x7, 0x80, 0xc0, - - /* U+4A0 "Ҡ" */ - 0xc, 0x18, 0x30, 0xc0, 0xc6, 0x3, 0x30, 0xc, - 0x80, 0x3e, 0x0, 0xd8, 0x3, 0x30, 0xc, 0x60, - 0x31, 0x87, 0xc3, 0x0, 0x0, - - /* U+4A1 "ҡ" */ - 0x8, 0x61, 0x18, 0x26, 0x5, 0x80, 0xf0, 0x12, - 0x2, 0x63, 0xc6, 0x0, 0x0, - - /* U+4A2 "Ң" */ - 0x0, 0x40, 0x8, 0x1, 0x60, 0x6c, 0x9, 0x81, - 0x30, 0x26, 0x4, 0xff, 0x98, 0x33, 0x2, 0x60, - 0x4c, 0x9, 0x81, 0x0, 0x0, - - /* U+4A3 "ң" */ - 0x1, 0x0, 0x80, 0x58, 0x6c, 0x26, 0x13, 0x19, - 0xfc, 0xc2, 0x61, 0x30, 0x80, 0x0, - - /* U+4A4 "Ҥ" */ - 0xc0, 0x81, 0x81, 0x3, 0x2, 0x6, 0x4, 0xc, - 0x8, 0x1f, 0xf0, 0x30, 0x60, 0x60, 0x40, 0xc0, - 0x81, 0x81, 0x3, 0x3, 0xf0, 0x0, 0x0, - - /* U+4A5 "ҥ" */ - 0xc6, 0x31, 0x8c, 0x63, 0x18, 0xfe, 0x31, 0x8c, - 0x63, 0x1f, 0x0, 0x0, - - /* U+4A6 "Ҧ" */ - 0x0, 0x0, 0x0, 0x30, 0x0, 0x36, 0xc, 0x2c, - 0x18, 0x78, 0x30, 0xf0, 0x61, 0x60, 0xc6, 0xc1, - 0xf9, 0x83, 0x83, 0x6, 0x6, 0xc, 0xc, 0x18, - 0x1f, 0xf0, 0x0, 0x0, 0x0, - - /* U+4A7 "ҧ" */ - 0x0, 0x0, 0x3, 0x0, 0xd, 0x8c, 0x2c, 0x61, - 0x63, 0xb, 0x18, 0xd8, 0xf8, 0xc6, 0x6, 0x30, - 0x3f, 0x80, 0x0, 0x0, - - /* U+4A8 "Ҩ" */ - 0x0, 0x1, 0xfe, 0x33, 0xc2, 0x24, 0x66, 0x66, - 0x42, 0x44, 0x24, 0x42, 0x44, 0x26, 0x42, 0x26, - 0x63, 0x3c, 0x0, 0x0, - - /* U+4A9 "ҩ" */ - 0x0, 0x7, 0xe3, 0x71, 0xb4, 0x49, 0x92, 0x64, - 0x99, 0xb6, 0x27, 0x0, 0x80, - - /* U+4AA "Ҫ" */ - 0x4, 0x1, 0x0, 0x40, 0x10, 0x1f, 0xc, 0x66, - 0x9, 0x82, 0x60, 0x10, 0x4, 0x1, 0x80, 0x60, - 0x8c, 0x61, 0xf0, 0x10, - - /* U+4AB "ҫ" */ - 0x8, 0x8, 0x8, 0x8, 0x3c, 0x62, 0x40, 0x40, - 0x40, 0x40, 0x63, 0x3e, 0x8, - - /* U+4AC "Ҭ" */ - 0x4, 0x1, 0x0, 0x40, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, - 0x3f, 0xe0, 0x0, - - /* U+4AD "ҭ" */ - 0x4, 0x4, 0x4, 0x1c, 0x18, 0x18, 0x18, 0x18, - 0x18, 0x18, 0x7e, 0x0, - - /* U+4AE "Ү" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, - - /* U+4AF "ү" */ - 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1c, 0x34, - 0x24, 0x66, 0x62, 0x42, 0x0, - - /* U+4B0 "Ұ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0x3e, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, - - /* U+4B1 "ұ" */ - 0x0, 0x18, 0x18, 0x18, 0x3e, 0x18, 0x1c, 0x34, - 0x24, 0x66, 0x62, 0x42, 0x0, - - /* U+4B2 "Ҳ" */ - 0x0, 0x40, 0x8, 0x1, 0x30, 0x66, 0x18, 0x66, - 0x4, 0x80, 0xf0, 0xc, 0x1, 0x80, 0x78, 0x19, - 0x82, 0x10, 0xc3, 0x0, 0x0, - - /* U+4B3 "ҳ" */ - 0x1, 0x0, 0x80, 0x48, 0x66, 0x61, 0xe0, 0x60, - 0x30, 0x3c, 0x12, 0x19, 0x80, 0x0, - - /* U+4B4 "Ҵ" */ - 0x0, 0x8, 0x0, 0x20, 0x0, 0x87, 0xfe, 0x18, - 0x30, 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, 0x30, - 0x60, 0xc1, 0x83, 0x6, 0xc, 0x18, 0x31, 0xfc, - 0xc0, 0x0, 0x0, - - /* U+4B5 "ҵ" */ - 0x0, 0x0, 0x8, 0x1, 0x1f, 0xe3, 0x8, 0x61, - 0xc, 0x21, 0x84, 0x30, 0x86, 0x13, 0xf2, 0x0, - 0x0, - - /* U+4B6 "Ҷ" */ - 0x0, 0x40, 0x8, 0x1, 0x0, 0xe0, 0x18, 0x3, - 0x0, 0x60, 0xec, 0x7f, 0x98, 0x33, 0x6, 0x60, - 0xcc, 0x19, 0x83, 0x0, 0x0, - - /* U+4B7 "ҷ" */ - 0x1, 0x0, 0x80, 0x40, 0x60, 0x30, 0x10, 0xf8, - 0xc4, 0x42, 0x21, 0x10, 0x80, 0x0, - - /* U+4B8 "Ҹ" */ - 0x1, 0x80, 0xc2, 0x61, 0x31, 0xdb, 0xff, 0x27, - 0x93, 0xc1, 0xe0, 0xf0, 0x60, 0x0, - - /* U+4B9 "ҹ" */ - 0x6, 0xc, 0x5b, 0xfd, 0x7a, 0xe1, 0xc3, 0x0, - - /* U+4BA "Һ" */ - 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x1b, 0xf9, - 0x80, 0xc0, 0x60, 0x30, 0x0, 0x0, - - /* U+4BB "һ" */ - 0xc7, 0x8f, 0x1e, 0x3c, 0x78, 0xf1, 0xfe, 0xd9, - 0x83, 0x6, 0x0, - - /* U+4BC "Ҽ" */ - 0x0, 0x0, 0x7e, 0xc, 0x1, 0x80, 0x18, 0x1, - 0x80, 0x1f, 0xe7, 0xfe, 0x58, 0x21, 0x82, 0xc, - 0x60, 0x7c, 0x1, 0x0, - - /* U+4BD "ҽ" */ - 0x0, 0x3, 0xe1, 0x88, 0x40, 0x10, 0xf, 0xf7, - 0xd, 0x62, 0xf, 0x80, 0x80, - - /* U+4BE "Ҿ" */ - 0x1, 0x0, 0x10, 0x1, 0x0, 0x10, 0x7, 0xe0, - 0xc0, 0x18, 0x1, 0x80, 0x18, 0x1, 0xfe, 0x7f, - 0xe5, 0x82, 0x18, 0x20, 0xc6, 0x7, 0xc0, 0x10, - - /* U+4BF "ҿ" */ - 0x2, 0x0, 0x80, 0x20, 0x8, 0xf, 0x86, 0x21, - 0x0, 0x40, 0x3f, 0xdc, 0x35, 0x88, 0x3e, 0x2, - 0x0, - - /* U+4C0 "Ӏ" */ - 0xff, 0xff, 0xfc, - - /* U+4C1 "Ӂ" */ - 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, - 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, - 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, 0x0, - 0x0, 0xf0, 0x1, 0x0, 0x0, - - /* U+4C2 "ӂ" */ - 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1f, 0x83, - 0x6c, 0x26, 0x46, 0x66, 0x0, 0x0, 0x0, 0xf, - 0x0, 0x80, - - /* U+4C3 "Ӄ" */ - 0x0, 0x3, 0x0, 0xd8, 0x2c, 0x1e, 0xf, 0x5, - 0x86, 0xfe, 0x7c, 0x32, 0x19, 0x8c, 0x66, 0x18, - 0x0, - - /* U+4C4 "ӄ" */ - 0x8, 0x4, 0xc2, 0xc2, 0xc6, 0xcc, 0xf8, 0xd8, - 0xc8, 0xc4, 0x0, - - /* U+4C5 "Ӆ" */ - 0x0, 0x0, 0x6, 0x0, 0x20, 0x2, 0xc0, 0xe6, - 0xc, 0x30, 0xc3, 0xc, 0x10, 0xc1, 0xc, 0x10, - 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x1f, 0xc0, 0x0, - - /* U+4C6 "ӆ" */ - 0x0, 0x0, 0x60, 0x8, 0x2, 0xc1, 0x98, 0x42, - 0x10, 0x84, 0x31, 0xc, 0x43, 0x10, 0xfc, 0x0, - 0x0, - - /* U+4C7 "Ӈ" */ - 0x0, 0x1, 0x80, 0x60, 0x3c, 0x1e, 0xf, 0x7, - 0x83, 0xc1, 0xff, 0xf0, 0x78, 0x3c, 0x1e, 0xf, - 0x6, 0x0, - - /* U+4C8 "ӈ" */ - 0x0, 0x18, 0x18, 0x3c, 0x78, 0xf1, 0xe3, 0xff, - 0x8f, 0x1e, 0x30, 0x0, - - /* U+4C9 "Ӊ" */ - 0x0, 0x0, 0x18, 0x1, 0x0, 0x2c, 0xd, 0x81, - 0x30, 0x26, 0x4, 0xc0, 0x9f, 0xf3, 0x6, 0x60, - 0x4c, 0x9, 0x81, 0x30, 0x20, 0x0, - - /* U+4CA "ӊ" */ - 0x0, 0x1, 0x80, 0x40, 0x2c, 0x36, 0x13, 0x9, - 0x8c, 0xfe, 0x61, 0x30, 0x98, 0x40, 0x0, - - /* U+4CB "Ӌ" */ - 0x2, 0x1, 0x0, 0x80, 0x70, 0x18, 0xc, 0x6, - 0x3b, 0x7f, 0xe0, 0xf0, 0x78, 0x3c, 0x1e, 0xc, - 0x0, - - /* U+4CC "ӌ" */ - 0x4, 0x4, 0x4, 0x6, 0x2, 0x2, 0x3e, 0x62, - 0x42, 0x42, 0x42, 0x0, - - /* U+4CD "Ӎ" */ - 0x0, 0x0, 0x0, 0x60, 0x0, 0x80, 0x2, 0xc6, - 0x3b, 0x18, 0xcc, 0xf3, 0x32, 0x4c, 0xc9, 0x33, - 0x66, 0xcd, 0xb, 0x3c, 0x3c, 0xe0, 0x73, 0x81, - 0xce, 0x7, 0x0, 0x0, - - /* U+4CE "ӎ" */ - 0x0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x3c, 0x20, - - /* U+4D8 "Ә" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x44, 0xc, 0x81, - 0x9f, 0xf0, 0x2, 0x0, 0xc0, 0x18, 0x6, 0x1f, - 0x80, 0x0, - - /* U+4D9 "ә" */ - 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, - 0x7e, 0x18, - - /* U+4DA "Ӛ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x44, 0xc, 0x81, - 0x9f, 0xf0, 0x2, 0x0, 0xc0, 0x18, 0x6, 0x1f, - 0x80, 0x0, 0x26, 0x0, 0x0, - - /* U+4DB "ӛ" */ - 0x0, 0x3c, 0x66, 0x43, 0x7f, 0x7f, 0x3, 0x2, - 0x7e, 0x18, 0x0, 0x26, 0x0, - - /* U+4DC "Ӝ" */ - 0x41, 0xc, 0xc2, 0x10, 0xc4, 0x61, 0x89, 0x81, - 0x93, 0x1, 0xfc, 0x3, 0xf8, 0xc, 0x98, 0x31, - 0x10, 0x42, 0x31, 0x84, 0x30, 0x0, 0x0, 0x0, - 0x0, 0x98, 0x0, 0x0, 0x0, - - /* U+4DD "ӝ" */ - 0x46, 0x36, 0x66, 0x36, 0x41, 0x6c, 0x1f, 0x83, - 0x6c, 0x26, 0x46, 0x66, 0x0, 0x0, 0x0, 0x9, - 0x80, 0x0, - - /* U+4DE "Ӟ" */ - 0x0, 0x1f, 0x18, 0xc8, 0x30, 0x18, 0x8, 0x38, - 0xe, 0x1, 0x20, 0xd8, 0x47, 0xe0, 0x0, 0x0, - 0x98, 0x0, - - /* U+4DF "ӟ" */ - 0x0, 0x3c, 0x66, 0x42, 0x6, 0x1c, 0x6, 0x42, - 0x7e, 0x18, 0x0, 0x26, 0x0, - - /* U+4E0 "Ӡ" */ - 0x0, 0x1f, 0x18, 0xc8, 0x20, 0x10, 0x18, 0x38, - 0x38, 0xc, 0x2, 0x0, 0x8f, 0xe0, 0x0, - - /* U+4E1 "ӡ" */ - 0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0xc0, 0x0, - - /* U+4EB "ӫ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x26, 0x13, 0xf9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x4, 0xc0, 0x0, - - /* U+4EC "Ӭ" */ - 0x0, 0x1f, 0x18, 0xd8, 0x20, 0x18, 0xc, 0x7e, - 0x3, 0x1, 0xe0, 0xd0, 0xcf, 0xc0, 0x80, 0x0, - 0x98, 0x0, - - /* U+4ED "ӭ" */ - 0x0, 0x3c, 0x66, 0x42, 0x3, 0x1f, 0x3, 0x42, - 0x3e, 0x18, 0x0, 0x26, 0x0, - - /* U+4EE "Ӯ" */ - 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, - 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, - 0x0, 0x3, 0xe0, 0x0, - - /* U+4EF "ӯ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x7c, 0x0, - - /* U+4F0 "Ӱ" */ - 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, - 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, - 0x0, 0x1, 0x30, 0x0, - - /* U+4F1 "ӱ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x26, 0x0, - - /* U+4F2 "Ӳ" */ - 0x0, 0xe, 0x0, 0x80, 0x30, 0xc, 0x3, 0x81, - 0xe0, 0x4c, 0x33, 0xc, 0x46, 0x19, 0x86, 0x0, - 0x0, 0x1, 0xa0, 0x2c, - - /* U+4F3 "ӳ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x34, 0x16, - - /* U+4F4 "Ӵ" */ - 0x1, 0x80, 0xc0, 0x60, 0x31, 0xdb, 0xff, 0x7, - 0x83, 0xc1, 0xe0, 0xf0, 0x60, 0x0, 0x1, 0x30, - 0x0, - - /* U+4F5 "ӵ" */ - 0x2, 0x2, 0x2, 0x3e, 0x62, 0x42, 0x42, 0x42, - 0x0, 0x0, 0x26, 0x0, - - /* U+4F6 "Ӷ" */ - 0x20, 0x20, 0x20, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, - 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, - - /* U+4F7 "ӷ" */ - 0x20, 0x82, 0x38, 0xc3, 0xc, 0x30, 0xc3, 0xf, - 0x80, - - /* U+4F8 "Ӹ" */ - 0xfe, 0x78, 0x6f, 0x5, 0xe0, 0xbc, 0x17, 0x9e, - 0xff, 0x1e, 0x3, 0xc0, 0x78, 0xf, 0x1, 0x80, - 0x0, 0x0, 0x13, 0x0, 0x0, - - /* U+4F9 "ӹ" */ - 0xfc, 0xf1, 0xbc, 0x6f, 0x1b, 0xfc, 0xfc, 0x3c, - 0xf, 0x3, 0x0, 0x0, 0x1, 0x30, 0x0, - - /* U+4FA "Ӻ" */ - 0x0, 0xc, 0x1, 0x80, 0x60, 0x38, 0xc, 0x3, - 0x0, 0xc0, 0x30, 0xc, 0xf, 0x80, 0xc0, 0x30, - 0xc, 0x3, 0xf8, 0x0, - - /* U+4FB "ӻ" */ - 0x0, 0x30, 0x18, 0x18, 0x38, 0x30, 0x30, 0x30, - 0xf8, 0x30, 0x30, 0x3e, 0x0, - - /* U+4FC "Ӽ" */ - 0x0, 0x0, 0x60, 0xc, 0x3, 0x60, 0xd8, 0x63, - 0x30, 0x48, 0x1e, 0x3, 0x0, 0xc0, 0x78, 0x33, - 0x8, 0x46, 0x18, 0x0, - - /* U+4FD "ӽ" */ - 0x0, 0x6, 0x3, 0x3, 0x43, 0x66, 0x3c, 0x18, - 0x18, 0x3c, 0x24, 0x66, 0x0, - - /* U+4FE "Ӿ" */ - 0x60, 0x98, 0x63, 0x30, 0x48, 0x1e, 0x7, 0x81, - 0xe0, 0x78, 0x33, 0x8, 0x46, 0x18, 0x0, - - /* U+4FF "ӿ" */ - 0x42, 0x66, 0x3c, 0x3c, 0x3c, 0x3c, 0x24, 0x66, - 0x0, - - /* U+500 "Ԁ" */ - 0x3f, 0xb0, 0xd0, 0x68, 0x34, 0x1b, 0x8c, 0x7e, - 0x3, 0x1, 0x80, 0xc0, 0x60, 0x0, - - /* U+501 "ԁ" */ - 0x0, 0x3f, 0x63, 0x63, 0x43, 0x43, 0x43, 0x63, - 0x3f, 0x1b, 0x3, 0x3, 0x3, - - /* U+502 "Ԃ" */ - 0x1f, 0xe3, 0xd, 0x90, 0x66, 0x83, 0x34, 0x19, - 0xb8, 0xc8, 0x7e, 0x0, 0x30, 0x1, 0x80, 0xc, - 0x0, 0x60, 0x0, 0x0, - - /* U+503 "ԃ" */ - 0x0, 0x1, 0xef, 0x18, 0xcc, 0x86, 0x34, 0x31, - 0xa1, 0x8d, 0xc, 0x6c, 0x63, 0x3f, 0x0, 0xd8, - 0x0, 0xc0, 0x6, 0x0, 0x30, 0x0, 0x0, - - /* U+504 "Ԅ" */ - 0x0, 0x0, 0x3c, 0x2, 0x60, 0x22, 0x6, 0x30, - 0x63, 0x3c, 0x30, 0x42, 0x6, 0x0, 0x20, 0x6, - 0xf, 0xc0, 0x0, 0x0, - - /* U+505 "ԅ" */ - 0x0, 0x1, 0xe0, 0xc8, 0x33, 0x78, 0xde, 0x30, - 0xc8, 0x30, 0x78, 0x0, 0x0, - - /* U+506 "Ԇ" */ - 0x0, 0x2, 0x3, 0x7, 0x7, 0x6, 0x6, 0xc, - 0x78, 0xc, 0x6, 0x6, 0x4, 0x7c, 0x0, - - /* U+507 "ԇ" */ - 0x0, 0x2, 0x3, 0x7, 0x6, 0x4, 0x3c, 0x3c, - 0x4, 0x4, 0x7c, 0x0, - - /* U+508 "Ԉ" */ - 0x0, 0x0, 0xc0, 0xf0, 0xc1, 0x30, 0x86, 0x31, - 0xc, 0x62, 0x18, 0xc6, 0x31, 0x8c, 0x63, 0x18, - 0xc0, 0x31, 0x80, 0x63, 0x0, 0xfe, 0x0, 0x0, - 0x0, - - /* U+509 "ԉ" */ - 0x0, 0x3, 0xf, 0x18, 0x4c, 0x66, 0x23, 0x31, - 0x19, 0x88, 0xcc, 0x46, 0x62, 0x3f, 0x0, 0x0, - 0x0, - - /* U+50A "Ԋ" */ - 0x0, 0x3, 0x3, 0xcc, 0x9, 0xb0, 0x63, 0xc1, - 0x8f, 0x6, 0x3f, 0xf8, 0xf0, 0x63, 0xc1, 0x83, - 0x6, 0xc, 0x18, 0x30, 0x60, 0x0, 0x0, - - /* U+50B "ԋ" */ - 0x0, 0xc, 0x3c, 0xc2, 0x6c, 0x22, 0xc6, 0x3f, - 0xe3, 0xc2, 0x2c, 0x22, 0xc2, 0x0, 0x0, - - /* U+50C "Ԍ" */ - 0x0, 0x7, 0xc3, 0x19, 0x82, 0x60, 0x90, 0x24, - 0x19, 0x0, 0x60, 0x18, 0x3, 0x0, 0x7c, 0x4, - 0x0, - - /* U+50D "ԍ" */ - 0x0, 0x1e, 0x22, 0x63, 0x42, 0x40, 0x40, 0x60, - 0x3c, 0x8, - - /* U+50E "Ԏ" */ - 0x0, 0x0, 0xf0, 0x33, 0x6, 0x20, 0xc4, 0x18, - 0x83, 0x10, 0x62, 0xc, 0x1, 0x80, 0x30, 0x7f, - 0xc0, 0x0, - - /* U+50F "ԏ" */ - 0x0, 0x3, 0xc0, 0x98, 0x62, 0x18, 0x86, 0x21, - 0x88, 0x60, 0x7e, 0x0, 0x0, - - /* U+510 "Ԑ" */ - 0x0, 0x1f, 0x18, 0xd8, 0x3c, 0x2, 0x0, 0xf0, - 0xe0, 0x40, 0x60, 0x10, 0x6f, 0xe0, 0x80, - - /* U+511 "ԑ" */ - 0x0, 0x3e, 0x63, 0x40, 0x60, 0x3c, 0x60, 0x63, - 0x7e, 0x18, - - /* U+512 "Ԓ" */ - 0x0, 0x0, 0x6, 0x0, 0x30, 0x3, 0xc0, 0xf6, - 0xc, 0x30, 0xc3, 0xc, 0x10, 0xc1, 0xc, 0x10, - 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x1f, 0xc0, 0x0, - - /* U+513 "ԓ" */ - 0x0, 0x0, 0x60, 0xc, 0x3, 0xc1, 0xd8, 0x42, - 0x10, 0x84, 0x31, 0xc, 0x43, 0x10, 0xfc, 0x0, - 0x0, - - /* U+1E00 "Ḁ" */ - 0x0, 0x1, 0x80, 0x28, 0x0, 0xc, 0x4, 0x81, - 0x98, 0x21, 0xfc, 0x31, 0x86, 0x20, 0x4c, 0x9, - 0x1, 0xa0, 0x1c, 0x3, 0x0, 0x0, - - /* U+1E01 "ḁ" */ - 0x0, 0x18, 0x14, 0x0, 0x3f, 0x67, 0x43, 0x63, - 0x3f, 0x3, 0x62, 0x3e, 0x8, - - /* U+1E3E "Ḿ" */ - 0xc6, 0x3c, 0x63, 0xcf, 0x3c, 0x93, 0xc9, 0x3d, - 0x9b, 0xd0, 0xbf, 0xf, 0xe0, 0x7e, 0x7, 0xe0, - 0x70, 0x0, 0x6, 0x0, 0x30, - - /* U+1E3F "ḿ" */ - 0xc6, 0x3c, 0x63, 0xc6, 0x3c, 0x63, 0xc6, 0x3c, - 0x63, 0xc6, 0x3f, 0xfe, 0x18, 0xc0, 0x0, 0x6, - 0x0, 0x30, - - /* U+1E80 "Ẁ" */ - 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, - 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, - 0xc, 0x24, 0x30, 0xc0, 0x40, 0x2, 0x0, 0x18, - 0x0, - - /* U+1E81 "ẁ" */ - 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, - 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x4, - 0x0, 0xc0, - - /* U+1E82 "Ẃ" */ - 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, - 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, - 0xc, 0x24, 0x30, 0xc0, 0x80, 0x3, 0x0, 0x6, - 0x0, - - /* U+1E83 "ẃ" */ - 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, - 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x6, - 0x0, 0x30, - - /* U+1E84 "Ẅ" */ - 0x18, 0x20, 0x61, 0x81, 0x87, 0xf, 0x14, 0x34, - 0xd0, 0x92, 0x42, 0x69, 0x99, 0xa6, 0x63, 0x89, - 0xc, 0x24, 0x30, 0xc0, 0x0, 0x4, 0xc0, 0x0, - 0x0, - - /* U+1E85 "ẅ" */ - 0x10, 0x83, 0xc, 0x39, 0xc2, 0x94, 0x69, 0x66, - 0xe6, 0x46, 0x24, 0x62, 0x0, 0x0, 0x0, 0x9, - 0x80, 0x0, - - /* U+1EA0 "Ạ" */ - 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, - 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, - 0x0, 0xe0, 0x18, 0x0, 0x0, - - /* U+1EA1 "ạ" */ - 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, - 0x3, 0x62, 0x3e, 0x8, - - /* U+1EA2 "Ả" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0x0, 0xc, 0x0, 0x80, 0x20, - - /* U+1EA3 "ả" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0xc, 0x4, 0x8, - - /* U+1EA4 "Ấ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xb0, 0xd, 0x0, 0x10, 0x0, - - /* U+1EA5 "ấ" */ - 0x0, 0xf, 0xc6, 0x71, 0xc, 0x63, 0xf, 0xc0, - 0x31, 0x88, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, - 0x0, 0x20, 0x0, - - /* U+1EA6 "Ầ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xb0, 0x48, 0x18, 0x0, - - /* U+1EA7 "ầ" */ - 0x0, 0xf, 0xcc, 0xe4, 0x33, 0x18, 0xfc, 0x6, - 0x62, 0x1f, 0x2, 0x0, 0x1, 0x62, 0x43, 0x0, - - /* U+1EA8 "Ẩ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xb0, 0xd, 0x0, 0x10, 0x4, - - /* U+1EA9 "ẩ" */ - 0x0, 0x1f, 0x99, 0xc8, 0x66, 0x31, 0xf8, 0xc, - 0xc4, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, - 0x4, - - /* U+1EAA "Ẫ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xb0, 0x8, 0x0, 0x80, 0x40, - - /* U+1EAB "ẫ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x16, 0x8, 0x4, 0x10, - - /* U+1EAC "Ậ" */ - 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, - 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, - 0x0, 0xe0, 0x18, 0x0, 0x0, 0x50, 0x6, 0x0, - - /* U+1EAD "ậ" */ - 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, - 0x3, 0x62, 0x3e, 0x8, 0x0, 0x14, 0xc, - - /* U+1EAE "Ắ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0x0, 0x3c, 0x0, 0x0, 0x30, 0x0, 0x0, - - /* U+1EAF "ắ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x3c, 0x0, 0xc, 0x0, - - /* U+1EB0 "Ằ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0xc0, 0x26, 0x1, 0x0, 0x40, - - /* U+1EB1 "ằ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x18, 0x26, 0x8, 0x10, - - /* U+1EB2 "Ẳ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x2, - 0x1, 0xe0, 0x0, 0x1, 0x80, 0x30, - - /* U+1EB3 "ẳ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x3c, 0x0, 0xc, 0xc, - - /* U+1EB4 "Ẵ" */ - 0xc0, 0x48, 0x19, 0x82, 0x1f, 0xc3, 0x18, 0x62, - 0x4, 0xc0, 0x90, 0x1a, 0x1, 0xc0, 0x30, 0x0, - 0x0, 0x0, 0x34, 0x0, 0x0, 0xb0, 0x0, 0x0, - - /* U+1EB5 "ẵ" */ - 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, 0x3, 0x62, - 0x3e, 0x8, 0x0, 0x34, 0x0, 0x2c, 0x0, - - /* U+1EB6 "Ặ" */ - 0x4, 0x0, 0x80, 0x0, 0x60, 0x24, 0xc, 0xc1, - 0xf, 0xe1, 0x8c, 0x31, 0x2, 0x60, 0x48, 0xd, - 0x0, 0xe0, 0x18, 0x1, 0x0, 0xf0, 0x10, 0x0, - - /* U+1EB7 "ặ" */ - 0x8, 0x8, 0x0, 0x3f, 0x67, 0x43, 0x63, 0x3f, - 0x3, 0x62, 0x3e, 0x8, 0x0, 0x3c, 0x20, - - /* U+1EB8 "Ẹ" */ - 0x8, 0x8, 0x0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, - - /* U+1EB9 "ẹ" */ - 0x8, 0x8, 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, - 0x43, 0x63, 0x3e, 0x8, - - /* U+1EBA "Ẻ" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x18, 0x8, 0x10, - - /* U+1EBB "ẻ" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0xc, 0x4, 0x8, - - /* U+1EBC "Ẽ" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x7c, 0x24, - - /* U+1EBD "ẽ" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x3e, 0x12, - - /* U+1EBE "Ế" */ - 0xff, 0x60, 0x30, 0x18, 0xc, 0x7, 0xf3, 0x1, - 0x80, 0xc0, 0x60, 0x3f, 0x8c, 0x82, 0xc0, 0xd0, - 0x4, 0x0, - - /* U+1EBF "ế" */ - 0x0, 0xf, 0x86, 0x31, 0x80, 0x40, 0x1f, 0xc4, - 0x31, 0x8c, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, - 0x0, 0x20, 0x0, - - /* U+1EC0 "Ề" */ - 0x3f, 0xcc, 0x3, 0x0, 0xc0, 0x30, 0xf, 0xe3, - 0x0, 0xc0, 0x30, 0xc, 0x3, 0xf8, 0x66, 0xb, - 0x9, 0x6, 0x0, - - /* U+1EC1 "ề" */ - 0x0, 0xf, 0x8c, 0x66, 0x2, 0x1, 0xfc, 0x86, - 0x63, 0x1f, 0x2, 0x0, 0x1, 0x62, 0x43, 0x0, - - /* U+1EC2 "Ể" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x44, 0x2c, 0x1a, 0x1, 0x2, - - /* U+1EC3 "ể" */ - 0x0, 0x1f, 0x18, 0xcc, 0x4, 0x3, 0xf9, 0xc, - 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, - 0x4, - - /* U+1EC4 "Ễ" */ - 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc0, 0xc0, - 0xc0, 0xc0, 0xfe, 0x44, 0x2c, 0x10, 0x8, 0x20, - - /* U+1EC5 "ễ" */ - 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, 0x43, 0x63, - 0x3e, 0x8, 0x0, 0x16, 0x8, 0x4, 0x10, - - /* U+1EC6 "Ệ" */ - 0x8, 0x8, 0x0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, - 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, 0x0, - 0x28, 0x18, - - /* U+1EC7 "ệ" */ - 0x8, 0x8, 0x0, 0x3e, 0x63, 0x60, 0x40, 0x7f, - 0x43, 0x63, 0x3e, 0x8, 0x0, 0x14, 0xc, - - /* U+1EC8 "Ỉ" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc0, 0x6, 0x24, - - /* U+1EC9 "ỉ" */ - 0xcc, 0xcc, 0xcc, 0xcc, 0x0, 0x62, 0x40, - - /* U+1ECA "Ị" */ - 0x48, 0x6d, 0xb6, 0xdb, 0x6d, 0x80, - - /* U+1ECB "ị" */ - 0x48, 0x6d, 0xb6, 0xdb, 0x1, 0x80, - - /* U+1ECC "Ọ" */ - 0x4, 0x0, 0x80, 0x0, 0xf, 0x83, 0x18, 0xc1, - 0x98, 0x33, 0x6, 0x40, 0x48, 0x9, 0x83, 0x30, - 0x63, 0x18, 0x3e, 0x1, 0x0, - - /* U+1ECD "ọ" */ - 0x8, 0x4, 0x0, 0x7, 0xc6, 0x33, 0x9, 0x4, - 0x82, 0x41, 0x31, 0x8f, 0x81, 0x0, - - /* U+1ECE "Ỏ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0x0, 0x1, 0x80, 0x10, 0x4, 0x0, - - /* U+1ECF "ỏ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x1, 0x80, 0x40, 0x40, - - /* U+1ED0 "Ố" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0xc0, 0x16, 0x1, 0xa0, 0x2, 0x0, 0x0, - - /* U+1ED1 "ố" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3e, 0x2, 0x0, 0x0, 0x58, 0xd, - 0x0, 0x20, 0x0, - - /* U+1ED2 "Ồ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0xc0, 0x16, 0x9, 0x3, 0x0, - - /* U+1ED3 "ồ" */ - 0x0, 0x7, 0xc3, 0x18, 0xc2, 0x20, 0x88, 0x22, - 0x8, 0xc6, 0x1f, 0x1, 0x0, 0x0, 0x2c, 0x24, - 0x18, 0x0, - - /* U+1ED4 "Ổ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0x16, 0x1, 0xa0, 0x2, 0x0, 0x80, - - /* U+1ED5 "ổ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0xd0, 0x4, - 0x4, - - /* U+1ED6 "Ỗ" */ - 0x0, 0x3, 0xe0, 0xc6, 0x30, 0x66, 0xc, 0xc1, - 0x90, 0x12, 0x2, 0x60, 0xcc, 0x18, 0xc6, 0xf, - 0x80, 0x40, 0x16, 0x1, 0x0, 0x10, 0x8, 0x0, - - /* U+1ED7 "ỗ" */ - 0x0, 0x1f, 0x18, 0xcc, 0x24, 0x12, 0x9, 0x4, - 0xc6, 0x3e, 0x4, 0x0, 0x2, 0xc0, 0x80, 0x20, - 0x40, - - /* U+1ED8 "Ộ" */ - 0x4, 0x0, 0x80, 0x0, 0xf, 0x83, 0x18, 0xc1, - 0x98, 0x33, 0x6, 0x40, 0x48, 0x9, 0x83, 0x30, - 0x63, 0x18, 0x3e, 0x3, 0x0, 0x50, 0x6, 0x0, - - /* U+1ED9 "ộ" */ - 0x8, 0x4, 0x0, 0x7, 0xc6, 0x33, 0x9, 0x4, - 0x82, 0x41, 0x31, 0x8f, 0x81, 0x0, 0x0, 0xa0, - 0x30, - - /* U+1EDA "Ớ" */ - 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, - 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, - 0xc1, 0xf6, 0x4, 0x20, 0x60, 0x3, 0x0, - - /* U+1EDB "ớ" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x30, 0x6, - 0x0, - - /* U+1EDC "Ờ" */ - 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, - 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, - 0xc1, 0xf6, 0x6, 0x20, 0x40, 0xc, 0x0, - - /* U+1EDD "ờ" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x20, 0x18, - 0x0, - - /* U+1EDE "Ở" */ - 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, - 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, - 0xc1, 0xf6, 0x4, 0x20, 0x0, 0x6, 0x0, 0x20, - 0x4, 0x0, - - /* U+1EDF "ở" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0x30, 0x4, - 0x2, 0x0, - - /* U+1EE0 "Ỡ" */ - 0x0, 0x1, 0xf0, 0x31, 0x86, 0x8, 0x60, 0xc4, - 0xc, 0x40, 0xc4, 0xc, 0x40, 0xc6, 0xc, 0x21, - 0xc1, 0xf6, 0x4, 0x21, 0xf0, 0x9, 0x0, - - /* U+1EE1 "ỡ" */ - 0x0, 0xf, 0x86, 0x31, 0x84, 0x41, 0x10, 0x44, - 0x11, 0x8c, 0x3f, 0x82, 0x20, 0x0, 0xf8, 0x12, - 0x0, - - /* U+1EE2 "Ợ" */ - 0x4, 0x0, 0x40, 0x0, 0x1, 0xf0, 0x31, 0x86, - 0x8, 0x60, 0xc4, 0xc, 0x40, 0xc4, 0xc, 0x40, - 0xc6, 0xc, 0x21, 0xc1, 0xf6, 0x4, 0x20, 0x0, - - /* U+1EE3 "ợ" */ - 0x8, 0x2, 0x0, 0x0, 0xf8, 0x63, 0x18, 0x44, - 0x11, 0x4, 0x41, 0x18, 0xc3, 0xf8, 0x22, 0x0, - 0x0, - - /* U+1EE4 "Ụ" */ - 0x8, 0x4, 0x0, 0x7, 0xc6, 0x36, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x2c, 0x16, 0x8, - 0x0, - - /* U+1EE5 "ụ" */ - 0x10, 0x20, 0x3, 0xfc, 0x78, 0xf1, 0xe3, 0xc7, - 0x8f, 0x18, 0x0, - - /* U+1EE6 "Ủ" */ - 0x0, 0x1f, 0x18, 0xd8, 0x2c, 0x16, 0xb, 0x5, - 0x82, 0xc1, 0x60, 0xb0, 0x58, 0x20, 0x0, 0x0, - 0x30, 0x8, 0x8, 0x0, - - /* U+1EE7 "ủ" */ - 0x0, 0xff, 0x1e, 0x3c, 0x78, 0xf1, 0xe3, 0xc6, - 0x0, 0x0, 0xc0, 0x82, 0x0, - - /* U+1EE8 "Ứ" */ - 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, - 0xcc, 0x12, 0x0, 0x20, 0x0, 0xc, 0x0, 0x60, - - /* U+1EE9 "ứ" */ - 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x60, 0xc, - 0x0, - - /* U+1EEA "Ừ" */ - 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, - 0xcc, 0x12, 0x0, 0x20, 0x0, 0x8, 0x1, 0x80, - - /* U+1EEB "ừ" */ - 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x40, 0x30, - 0x0, - - /* U+1EEC "Ử" */ - 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, - 0xcc, 0x12, 0x0, 0x20, 0x0, 0xc, 0x0, 0x40, - 0x8, 0x0, - - /* U+1EED "ử" */ - 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc7, 0x80, 0x20, 0x0, 0x60, 0x8, - 0x4, 0x0, - - /* U+1EEE "Ữ" */ - 0x0, 0x3, 0xe0, 0x63, 0xc, 0x10, 0xc1, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x18, 0xc1, - 0xcc, 0x12, 0x0, 0x20, 0x0, 0x3e, 0x1, 0x20, - - /* U+1EEF "ữ" */ - 0x0, 0x1f, 0x8c, 0x63, 0x18, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc7, 0x80, 0x20, 0x1, 0xf0, 0x24, - 0x0, - - /* U+1EF0 "Ự" */ - 0x8, 0x0, 0x80, 0x0, 0x3, 0xe0, 0x63, 0xc, - 0x10, 0xc1, 0xc, 0x10, 0xc1, 0xc, 0x10, 0xc1, - 0xc, 0x18, 0xc1, 0xcc, 0x12, 0x0, 0x20, - - /* U+1EF1 "ự" */ - 0x10, 0x4, 0x0, 0x1, 0xf8, 0xc6, 0x31, 0x8c, - 0x63, 0x18, 0xc6, 0x31, 0x8c, 0x78, 0x2, 0x0, - 0x0, - - /* U+1EF2 "Ỳ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x8, - 0x6, 0x0, - - /* U+1EF3 "ỳ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x10, 0x30, - - /* U+1EF4 "Ỵ" */ - 0x8, 0x2, 0x0, 0x0, 0x30, 0xc, 0x3, 0x0, - 0xc0, 0x30, 0x1c, 0x5, 0x83, 0x20, 0x8c, 0x61, - 0x10, 0x60, 0x0, - - /* U+1EF5 "ỵ" */ - 0x4, 0x64, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, - - /* U+1EF6 "Ỷ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x0, - 0x3, 0x0, 0x40, 0x20, - - /* U+1EF7 "ỷ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0xc, 0x4, - 0x8, - - /* U+1EF8 "Ỹ" */ - 0xc, 0x3, 0x0, 0xc0, 0x30, 0xc, 0x7, 0x1, - 0x60, 0xc8, 0x23, 0x18, 0x44, 0x18, 0x0, 0x3e, - 0x4, 0x80, - - /* U+1EF9 "ỹ" */ - 0x0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x38, 0x2c, - 0x24, 0x64, 0x46, 0x42, 0x0, 0x0, 0x7c, 0x24, - - /* U+1F4D "Ὅ" */ - 0x0, 0x0, 0xf8, 0x18, 0xc3, 0x6, 0x30, 0x63, - 0x6, 0x20, 0x22, 0x2, 0x30, 0x63, 0x6, 0x18, - 0xc0, 0xf8, 0xa2, 0xf, 0x0, 0x10, 0x0, - - /* U+2000 " " */ - -}; - - -/*--------------------- - * GLYPH DESCRIPTION - *--------------------*/ - -static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, - {.bitmap_index = 0, .adv_w = 63, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 0, .adv_w = 66, .box_h = 13, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 4, .adv_w = 82, .box_h = 4, .box_w = 4, .ofs_x = 1, .ofs_y = 8}, - {.bitmap_index = 6, .adv_w = 159, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 21, .adv_w = 144, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 39, .adv_w = 188, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 59, .adv_w = 159, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 76, .adv_w = 45, .box_h = 4, .box_w = 2, .ofs_x = 0, .ofs_y = 8}, - {.bitmap_index = 77, .adv_w = 88, .box_h = 17, .box_w = 5, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 88, .adv_w = 89, .box_h = 17, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 99, .adv_w = 110, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 4}, - {.bitmap_index = 106, .adv_w = 145, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 117, .adv_w = 50, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 119, .adv_w = 71, .box_h = 2, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, - {.bitmap_index = 121, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 122, .adv_w = 106, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 134, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 149, .adv_w = 144, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 157, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 171, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 184, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 198, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 211, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 224, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 238, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 253, .adv_w = 144, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 265, .adv_w = 62, .box_h = 10, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 268, .adv_w = 54, .box_h = 12, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 273, .adv_w = 130, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 280, .adv_w = 141, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 285, .adv_w = 134, .box_h = 8, .box_w = 7, .ofs_x = 1, .ofs_y = 1}, - {.bitmap_index = 292, .adv_w = 121, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 304, .adv_w = 230, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 332, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 349, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 363, .adv_w = 167, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 380, .adv_w = 168, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 394, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 406, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 418, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 435, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 450, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 453, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 466, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 480, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 492, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 510, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 525, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 543, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 557, .adv_w = 176, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 577, .adv_w = 158, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 591, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 606, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 621, .adv_w = 166, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 636, .adv_w = 163, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 651, .adv_w = 227, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 672, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 687, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 702, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 716, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 724, .adv_w = 105, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 736, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 744, .adv_w = 107, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 751, .adv_w = 116, .box_h = 2, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 753, .adv_w = 79, .box_h = 3, .box_w = 4, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 755, .adv_w = 139, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 765, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 778, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 788, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 801, .adv_w = 136, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 811, .adv_w = 89, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 821, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 834, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 845, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 848, .adv_w = 61, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 856, .adv_w = 130, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 868, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 871, .adv_w = 224, .box_h = 9, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 885, .adv_w = 141, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 893, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 905, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 918, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 931, .adv_w = 87, .box_h = 9, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 937, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 947, .adv_w = 84, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 955, .adv_w = 141, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 964, .adv_w = 124, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 973, .adv_w = 192, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 987, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 996, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1009, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1018, .adv_w = 87, .box_h = 16, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1030, .adv_w = 62, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 1034, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1044, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 1049, .adv_w = 63, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1049, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 1052, .adv_w = 140, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 1065, .adv_w = 149, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1079, .adv_w = 183, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1095, .adv_w = 155, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1110, .adv_w = 61, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 1114, .adv_w = 157, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1132, .adv_w = 107, .box_h = 3, .box_w = 6, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 1135, .adv_w = 201, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1155, .adv_w = 114, .box_h = 7, .box_w = 6, .ofs_x = 1, .ofs_y = 5}, - {.bitmap_index = 1161, .adv_w = 120, .box_h = 7, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 1168, .adv_w = 142, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 2}, - {.bitmap_index = 1173, .adv_w = 71, .box_h = 2, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, - {.bitmap_index = 1175, .adv_w = 201, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1195, .adv_w = 117, .box_h = 2, .box_w = 7, .ofs_x = 0, .ofs_y = 10}, - {.bitmap_index = 1197, .adv_w = 96, .box_h = 5, .box_w = 4, .ofs_x = 1, .ofs_y = 7}, - {.bitmap_index = 1200, .adv_w = 137, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1210, .adv_w = 94, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 1216, .adv_w = 94, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 1222, .adv_w = 80, .box_h = 3, .box_w = 4, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 1224, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 1236, .adv_w = 125, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1247, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 4}, - {.bitmap_index = 1248, .adv_w = 63, .box_h = 4, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1250, .adv_w = 87, .box_h = 7, .box_w = 4, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 1254, .adv_w = 116, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 1261, .adv_w = 120, .box_h = 7, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 1268, .adv_w = 188, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1286, .adv_w = 199, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1304, .adv_w = 199, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1322, .adv_w = 121, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1333, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1353, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1373, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1393, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1413, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1433, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1455, .adv_w = 239, .box_h = 12, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 1479, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1499, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1514, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1529, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1544, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1559, .adv_w = 70, .box_h = 15, .box_w = 4, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 1567, .adv_w = 70, .box_h = 15, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1575, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1587, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 1599, .adv_w = 172, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1614, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1632, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1653, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1674, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1695, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1716, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1737, .adv_w = 137, .box_h = 8, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 1745, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1763, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1780, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1797, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1814, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1831, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1849, .adv_w = 151, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1861, .adv_w = 152, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1875, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1888, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1901, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1914, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1927, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1940, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1954, .adv_w = 216, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1971, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 1984, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1997, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2010, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2023, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2036, .adv_w = 63, .box_h = 12, .box_w = 4, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 2042, .adv_w = 63, .box_h = 12, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2048, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 2057, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 2066, .adv_w = 150, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2080, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2091, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2106, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2121, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2136, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2151, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2166, .adv_w = 146, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 2177, .adv_w = 145, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 2191, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2203, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2215, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2227, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2239, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2255, .adv_w = 148, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 2271, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2287, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2307, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2320, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2340, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2353, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2375, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2388, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2408, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2421, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2441, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2454, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2474, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2487, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2507, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2520, .adv_w = 168, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2537, .adv_w = 163, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2555, .adv_w = 172, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2570, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2587, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2602, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2615, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2630, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2643, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2658, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2671, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 2687, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2700, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2715, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2728, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2748, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2764, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2784, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2800, .adv_w = 174, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2820, .adv_w = 144, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2836, .adv_w = 174, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 2858, .adv_w = 144, .box_h = 18, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 2876, .adv_w = 183, .box_h = 15, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2895, .adv_w = 141, .box_h = 15, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2909, .adv_w = 179, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2927, .adv_w = 145, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2939, .adv_w = 70, .box_h = 15, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, - {.bitmap_index = 2953, .adv_w = 63, .box_h = 12, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, - {.bitmap_index = 2964, .adv_w = 70, .box_h = 15, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, - {.bitmap_index = 2978, .adv_w = 63, .box_h = 12, .box_w = 7, .ofs_x = -2, .ofs_y = 0}, - {.bitmap_index = 2989, .adv_w = 70, .box_h = 15, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2999, .adv_w = 63, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3007, .adv_w = 70, .box_h = 16, .box_w = 3, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3013, .adv_w = 62, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 3021, .adv_w = 70, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3025, .adv_w = 63, .box_h = 9, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3028, .adv_w = 211, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3046, .adv_w = 123, .box_h = 16, .box_w = 6, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3058, .adv_w = 141, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3077, .adv_w = 64, .box_h = 16, .box_w = 6, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 3089, .adv_w = 161, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3107, .adv_w = 130, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3123, .adv_w = 142, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3132, .adv_w = 138, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3146, .adv_w = 62, .box_h = 15, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3154, .adv_w = 138, .box_h = 17, .box_w = 8, .ofs_x = 1, .ofs_y = -5}, - {.bitmap_index = 3171, .adv_w = 62, .box_h = 17, .box_w = 3, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 3178, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3190, .adv_w = 81, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3198, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3210, .adv_w = 90, .box_h = 12, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3216, .adv_w = 138, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3230, .adv_w = 69, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3238, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3256, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3267, .adv_w = 183, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = -5}, - {.bitmap_index = 3289, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -5}, - {.bitmap_index = 3302, .adv_w = 183, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3320, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3331, .adv_w = 141, .box_h = 12, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 3345, .adv_w = 177, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3363, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3375, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3397, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3412, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3433, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3448, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3469, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3484, .adv_w = 244, .box_h = 13, .box_w = 15, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3509, .adv_w = 233, .box_h = 10, .box_w = 14, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3527, .adv_w = 158, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3543, .adv_w = 87, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3551, .adv_w = 158, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -5}, - {.bitmap_index = 3571, .adv_w = 87, .box_h = 14, .box_w = 6, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 3582, .adv_w = 158, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3598, .adv_w = 87, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 3606, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3623, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3636, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3653, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3666, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3684, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3697, .adv_w = 152, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3714, .adv_w = 132, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3727, .adv_w = 153, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3747, .adv_w = 84, .box_h = 15, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3759, .adv_w = 153, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3777, .adv_w = 89, .box_h = 14, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3790, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3805, .adv_w = 84, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 3814, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3831, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3843, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3860, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3872, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3889, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3901, .adv_w = 166, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3921, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3934, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3951, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3964, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 3981, .adv_w = 141, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 3993, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4018, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4036, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4054, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 4070, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4088, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4104, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4116, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4132, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4144, .adv_w = 153, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4160, .adv_w = 127, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4172, .adv_w = 64, .box_h = 13, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4179, .adv_w = 87, .box_h = 17, .box_w = 7, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 4194, .adv_w = 176, .box_h = 14, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4215, .adv_w = 146, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4229, .adv_w = 178, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 4249, .adv_w = 158, .box_h = 11, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 4263, .adv_w = 64, .box_h = 16, .box_w = 6, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 4275, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4296, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4310, .adv_w = 239, .box_h = 15, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 4340, .adv_w = 216, .box_h = 13, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4362, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4384, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 4400, .adv_w = 152, .box_h = 17, .box_w = 9, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 4420, .adv_w = 132, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 4434, .adv_w = 153, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 4456, .adv_w = 84, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 4466, .adv_w = 64, .box_h = 13, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 4473, .adv_w = 135, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4483, .adv_w = 51, .box_h = 4, .box_w = 3, .ofs_x = 0, .ofs_y = 8}, - {.bitmap_index = 4485, .adv_w = 121, .box_h = 3, .box_w = 6, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 4488, .adv_w = 114, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 4490, .adv_w = 117, .box_h = 2, .box_w = 7, .ofs_x = 0, .ofs_y = 10}, - {.bitmap_index = 4492, .adv_w = 109, .box_h = 3, .box_w = 5, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 4494, .adv_w = 62, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 4495, .adv_w = 86, .box_h = 4, .box_w = 5, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 4498, .adv_w = 69, .box_h = 5, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 4501, .adv_w = 121, .box_h = 3, .box_w = 7, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 4504, .adv_w = 96, .box_h = 3, .box_w = 7, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 4507, .adv_w = 75, .box_h = 4, .box_w = 3, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 4509, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -6, .ofs_y = 9}, - {.bitmap_index = 4511, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -5, .ofs_y = 9}, - {.bitmap_index = 4513, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 9}, - {.bitmap_index = 4516, .adv_w = 0, .box_h = 4, .box_w = 4, .ofs_x = -6, .ofs_y = 9}, - {.bitmap_index = 4518, .adv_w = 0, .box_h = 3, .box_w = 6, .ofs_x = -8, .ofs_y = 9}, - {.bitmap_index = 4521, .adv_w = 62, .box_h = 2, .box_w = 3, .ofs_x = -6, .ofs_y = -3}, - {.bitmap_index = 4522, .adv_w = 66, .box_h = 4, .box_w = 3, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 4524, .adv_w = 129, .box_h = 5, .box_w = 8, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 4529, .adv_w = 167, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4547, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = 4}, - {.bitmap_index = 4548, .adv_w = 158, .box_h = 13, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 4566, .adv_w = 195, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4586, .adv_w = 82, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4593, .adv_w = 179, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4613, .adv_w = 166, .box_h = 13, .box_w = 12, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 4633, .adv_w = 173, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4650, .adv_w = 83, .box_h = 15, .box_w = 8, .ofs_x = -2, .ofs_y = -1}, - {.bitmap_index = 4665, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4682, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4696, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4708, .adv_w = 181, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4725, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4737, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4751, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4766, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4783, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4786, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4800, .adv_w = 168, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4817, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4835, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4850, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4864, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4882, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4897, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4911, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4925, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4940, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4955, .adv_w = 183, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4972, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4987, .adv_w = 177, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5004, .adv_w = 170, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5019, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 5031, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5049, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5065, .adv_w = 138, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5079, .adv_w = 145, .box_h = 17, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 5094, .adv_w = 83, .box_h = 14, .box_w = 4, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5101, .adv_w = 140, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5116, .adv_w = 145, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5128, .adv_w = 152, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 5143, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 5156, .adv_w = 145, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5172, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5182, .adv_w = 133, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 5197, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 5209, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5224, .adv_w = 83, .box_h = 10, .box_w = 4, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5229, .adv_w = 142, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5238, .adv_w = 142, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5253, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 5265, .adv_w = 124, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5274, .adv_w = 126, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 5290, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5302, .adv_w = 153, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5315, .adv_w = 145, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 5328, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 5340, .adv_w = 145, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5352, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5362, .adv_w = 140, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5371, .adv_w = 180, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 5389, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5398, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 5416, .adv_w = 211, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5433, .adv_w = 83, .box_h = 13, .box_w = 6, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 5443, .adv_w = 140, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5455, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5471, .adv_w = 140, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5484, .adv_w = 211, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5507, .adv_w = 148, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5522, .adv_w = 136, .box_h = 12, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 5537, .adv_w = 201, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5554, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5569, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5584, .adv_w = 192, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5604, .adv_w = 142, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5619, .adv_w = 173, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5636, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5651, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5654, .adv_w = 70, .box_h = 15, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 5666, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5679, .adv_w = 275, .box_h = 12, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5705, .adv_w = 277, .box_h = 12, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5729, .adv_w = 208, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5747, .adv_w = 161, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5763, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5780, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5800, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 5817, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5834, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5848, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5862, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5874, .adv_w = 193, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 5897, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5909, .adv_w = 232, .box_h = 12, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5932, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 5947, .adv_w = 183, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5961, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5978, .adv_w = 165, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5993, .adv_w = 181, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6008, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6026, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6041, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6059, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6074, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6088, .adv_w = 167, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6105, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6120, .adv_w = 161, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6137, .adv_w = 198, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6157, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6172, .adv_w = 187, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 6193, .adv_w = 175, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6207, .adv_w = 241, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6227, .adv_w = 248, .box_h = 15, .box_w = 14, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 6254, .adv_w = 194, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6272, .adv_w = 221, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6290, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6304, .adv_w = 173, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 6319, .adv_w = 229, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 6341, .adv_w = 163, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6355, .adv_w = 139, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6365, .adv_w = 142, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6381, .adv_w = 146, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6390, .adv_w = 107, .box_h = 9, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6397, .adv_w = 155, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 6412, .adv_w = 136, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6422, .adv_w = 196, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6436, .adv_w = 130, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6446, .adv_w = 148, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6455, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6467, .adv_w = 138, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6476, .adv_w = 148, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6487, .adv_w = 190, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6499, .adv_w = 148, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6507, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6519, .adv_w = 148, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6528, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 6541, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6551, .adv_w = 123, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6560, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 6573, .adv_w = 186, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 6595, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6604, .adv_w = 152, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 6618, .adv_w = 139, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6627, .adv_w = 207, .box_h = 9, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6640, .adv_w = 212, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 6658, .adv_w = 159, .box_h = 9, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6670, .adv_w = 199, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6682, .adv_w = 139, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6690, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6700, .adv_w = 209, .box_h = 10, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 6715, .adv_w = 141, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6724, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6737, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6750, .adv_w = 141, .box_h = 16, .box_w = 9, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 6768, .adv_w = 107, .box_h = 12, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6777, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6787, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6797, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6800, .adv_w = 63, .box_h = 12, .box_w = 6, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 6809, .adv_w = 61, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 6817, .adv_w = 217, .box_h = 9, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6833, .adv_w = 221, .box_h = 9, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6848, .adv_w = 145, .box_h = 12, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 6862, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6874, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6886, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 6902, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 6914, .adv_w = 225, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 6934, .adv_w = 197, .box_h = 10, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 6948, .adv_w = 161, .box_h = 12, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 6965, .adv_w = 139, .box_h = 13, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 6980, .adv_w = 230, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7002, .adv_w = 191, .box_h = 10, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7016, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7031, .adv_w = 137, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7042, .adv_w = 226, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7062, .adv_w = 194, .box_h = 9, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7075, .adv_w = 218, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7093, .adv_w = 188, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7105, .adv_w = 289, .box_h = 12, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7129, .adv_w = 250, .box_h = 9, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7145, .adv_w = 133, .box_h = 20, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7165, .adv_w = 123, .box_h = 17, .box_w = 7, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7180, .adv_w = 177, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7197, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7215, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 7232, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 7244, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7259, .adv_w = 128, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7270, .adv_w = 161, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7288, .adv_w = 128, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7302, .adv_w = 297, .box_h = 16, .box_w = 19, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7340, .adv_w = 267, .box_h = 13, .box_w = 17, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7368, .adv_w = 174, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7387, .adv_w = 145, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 7400, .adv_w = 224, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7424, .adv_w = 197, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 7444, .adv_w = 225, .box_h = 15, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7467, .adv_w = 198, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7485, .adv_w = 166, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 7504, .adv_w = 137, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 7516, .adv_w = 160, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7530, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 9}, - {.bitmap_index = 7533, .adv_w = 0, .box_h = 3, .box_w = 7, .ofs_x = -8, .ofs_y = 10}, - {.bitmap_index = 7536, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -6, .ofs_y = 10}, - {.bitmap_index = 7538, .adv_w = 0, .box_h = 3, .box_w = 3, .ofs_x = -5, .ofs_y = 10}, - {.bitmap_index = 7540, .adv_w = 0, .box_h = 15, .box_w = 16, .ofs_x = -11, .ofs_y = -3}, - {.bitmap_index = 7570, .adv_w = 0, .box_h = 16, .box_w = 15, .ofs_x = -11, .ofs_y = -4}, - {.bitmap_index = 7600, .adv_w = 183, .box_h = 19, .box_w = 11, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 7627, .adv_w = 148, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 7645, .adv_w = 161, .box_h = 12, .box_w = 11, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 7662, .adv_w = 139, .box_h = 13, .box_w = 9, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 7677, .adv_w = 163, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7691, .adv_w = 145, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 7704, .adv_w = 141, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7718, .adv_w = 114, .box_h = 11, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7727, .adv_w = 142, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7741, .adv_w = 107, .box_h = 9, .box_w = 8, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 7750, .adv_w = 155, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 7765, .adv_w = 129, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 7776, .adv_w = 232, .box_h = 15, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 7806, .adv_w = 196, .box_h = 12, .box_w = 13, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 7826, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7844, .adv_w = 130, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 7857, .adv_w = 165, .box_h = 15, .box_w = 10, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 7876, .adv_w = 138, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 7890, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7904, .adv_w = 144, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 7913, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7930, .adv_w = 132, .box_h = 12, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 7945, .adv_w = 210, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7966, .adv_w = 177, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7979, .adv_w = 183, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8000, .adv_w = 148, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8014, .adv_w = 250, .box_h = 12, .box_w = 15, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8037, .adv_w = 183, .box_h = 9, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8049, .adv_w = 262, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8078, .adv_w = 223, .box_h = 12, .box_w = 13, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8098, .adv_w = 190, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8118, .adv_w = 154, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8131, .adv_w = 167, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8151, .adv_w = 134, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8164, .adv_w = 153, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8183, .adv_w = 123, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8195, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8210, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8223, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8238, .adv_w = 128, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8251, .adv_w = 161, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8272, .adv_w = 127, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8286, .adv_w = 230, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8313, .adv_w = 172, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8330, .adv_w = 175, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8351, .adv_w = 139, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8365, .adv_w = 174, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8379, .adv_w = 141, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8387, .adv_w = 174, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8401, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8412, .adv_w = 198, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8432, .adv_w = 152, .box_h = 10, .box_w = 10, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 8445, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8469, .adv_w = 152, .box_h = 13, .box_w = 10, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 8486, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8489, .adv_w = 232, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8518, .adv_w = 196, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8536, .adv_w = 161, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8553, .adv_w = 139, .box_h = 11, .box_w = 8, .ofs_x = 1, .ofs_y = -2}, - {.bitmap_index = 8564, .adv_w = 181, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8588, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 8605, .adv_w = 182, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8623, .adv_w = 145, .box_h = 13, .box_w = 7, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8635, .adv_w = 183, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8657, .adv_w = 148, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8672, .adv_w = 175, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 8689, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 8701, .adv_w = 224, .box_h = 16, .box_w = 14, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8729, .adv_w = 190, .box_h = 13, .box_w = 12, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 8749, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8752, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8772, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8785, .adv_w = 167, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8805, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8818, .adv_w = 239, .box_h = 12, .box_w = 16, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 8842, .adv_w = 216, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8859, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 8874, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8887, .adv_w = 177, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8905, .adv_w = 135, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8915, .adv_w = 177, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8936, .adv_w = 135, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8949, .adv_w = 232, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8978, .adv_w = 196, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8996, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9014, .adv_w = 130, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9027, .adv_w = 149, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9042, .adv_w = 149, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9057, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9074, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9086, .adv_w = 183, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9103, .adv_w = 148, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9115, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9136, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9151, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9168, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9180, .adv_w = 174, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9199, .adv_w = 146, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9214, .adv_w = 173, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 9232, .adv_w = 138, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9245, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9265, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9281, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9301, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9317, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9337, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9353, .adv_w = 175, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9370, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9382, .adv_w = 142, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 9397, .adv_w = 107, .box_h = 12, .box_w = 6, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 9406, .adv_w = 221, .box_h = 15, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9427, .adv_w = 199, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9442, .adv_w = 151, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9462, .adv_w = 105, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9475, .adv_w = 161, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9495, .adv_w = 127, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9508, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9523, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9532, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9546, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9559, .adv_w = 211, .box_h = 12, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9579, .adv_w = 221, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9602, .adv_w = 203, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9622, .adv_w = 165, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9635, .adv_w = 137, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 9650, .adv_w = 129, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 9662, .adv_w = 248, .box_h = 13, .box_w = 15, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9687, .adv_w = 207, .box_h = 10, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9704, .adv_w = 255, .box_h = 13, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 9727, .adv_w = 212, .box_h = 10, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 9742, .adv_w = 159, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9759, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9769, .adv_w = 182, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9787, .adv_w = 164, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9800, .adv_w = 173, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 9815, .adv_w = 138, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 9825, .adv_w = 181, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9849, .adv_w = 148, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9866, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9888, .adv_w = 139, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 9901, .adv_w = 224, .box_h = 14, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9922, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 9940, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9965, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9983, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10008, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10026, .adv_w = 227, .box_h = 14, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10051, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10069, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10090, .adv_w = 139, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10102, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10124, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10138, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10160, .adv_w = 139, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10179, .adv_w = 167, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10200, .adv_w = 139, .box_h = 14, .box_w = 9, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 10216, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10238, .adv_w = 139, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10255, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10277, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10292, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10316, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10331, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10355, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10370, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10392, .adv_w = 139, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10406, .adv_w = 167, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10428, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10443, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10467, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10482, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10506, .adv_w = 139, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10521, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 10536, .adv_w = 136, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10548, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10564, .adv_w = 136, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10578, .adv_w = 146, .box_h = 15, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10593, .adv_w = 136, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10606, .adv_w = 146, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10624, .adv_w = 136, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10643, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = -1, .ofs_y = 0}, - {.bitmap_index = 10662, .adv_w = 136, .box_h = 14, .box_w = 9, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 10678, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10694, .adv_w = 136, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10711, .adv_w = 146, .box_h = 16, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10727, .adv_w = 136, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10742, .adv_w = 146, .box_h = 18, .box_w = 8, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 10760, .adv_w = 136, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10775, .adv_w = 70, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10783, .adv_w = 63, .box_h = 13, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 10790, .adv_w = 70, .box_h = 15, .box_w = 3, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 10796, .adv_w = 62, .box_h = 15, .box_w = 3, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 10802, .adv_w = 176, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10823, .adv_w = 146, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10837, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10861, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10877, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10901, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10920, .adv_w = 176, .box_h = 16, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10942, .adv_w = 146, .box_h = 14, .box_w = 10, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 10960, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 10984, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11001, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11025, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11042, .adv_w = 176, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 11066, .adv_w = 146, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 11083, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11106, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11123, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11146, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11163, .adv_w = 176, .box_h = 17, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11189, .adv_w = 146, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11207, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11230, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 11247, .adv_w = 176, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 11271, .adv_w = 146, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 11288, .adv_w = 166, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 11305, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 11316, .adv_w = 166, .box_h = 17, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11336, .adv_w = 141, .box_h = 14, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11349, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11373, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11390, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11414, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11431, .adv_w = 178, .box_h = 17, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11457, .adv_w = 158, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11475, .adv_w = 178, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11499, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 11516, .adv_w = 178, .box_h = 15, .box_w = 12, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 11539, .adv_w = 158, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 11556, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 11574, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 11590, .adv_w = 154, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 11609, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 11622, .adv_w = 154, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 11642, .adv_w = 121, .box_h = 17, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 11659, .adv_w = 154, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 11677, .adv_w = 121, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 11693, .adv_w = 176, .box_h = 15, .box_w = 12, .ofs_x = -1, .ofs_y = -1}, - {.bitmap_index = 11716, .adv_w = 131, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} -}; - - -/*--------------------- - * CHARACTER MAPPING - *--------------------*/ - -static uint16_t unicode_list_2[] = { - 0x0, 0xe, 0xf, 0x1d, 0x1e, 0x5e, 0x68, 0x69, - 0x6a, 0x6b, 0x6c, 0x6d, 0x86, 0x87, 0x88, 0x89, - 0xa5, 0xc7, 0x12a, 0x134, 0x135, 0x137, 0x146, 0x147, - 0x148, 0x149, 0x14a, 0x14b, 0x161, 0x16e, 0x16f, 0x171, - 0x177, 0x17d, 0x191, 0x1f2, 0x1f3, 0x1f4, 0x1f5, 0x1f6, - 0x1f7, 0x1f8, 0x1fa -}; - -static uint8_t glyph_id_ofs_list_5[] = { - 0, 1, 0, 0, 0, 2 -}; - -static uint16_t unicode_list_8[] = { - 0x0, 0x1, 0x3e, 0x3f, 0x80, 0x81, 0x82, 0x83, - 0x84, 0x85 -}; - -static uint16_t unicode_list_10[] = { - 0x0, 0xb3 -}; - - -/*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_fmt_txt_cmap_t cmaps[] = -{ - { - .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 160, .range_length = 224, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 96, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 402, .range_length = 507, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, - .glyph_id_start = 320, .unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL - }, - { - .range_start = 910, .range_length = 20, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 363, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 931, .range_length = 44, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 383, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 977, .range_length = 6, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL, - .glyph_id_start = 427, .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_5 - }, - { - .range_start = 1024, .range_length = 135, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 430, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 1160, .range_length = 140, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 565, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 7680, .range_length = 134, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, - .glyph_id_start = 705, .unicode_list = unicode_list_8, .glyph_id_ofs_list = NULL - }, - { - .range_start = 7840, .range_length = 90, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 715, .unicode_list = NULL, .glyph_id_ofs_list = NULL - }, - { - .range_start = 8013, .range_length = 180, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, - .glyph_id_start = 805, .unicode_list = unicode_list_10, .glyph_id_ofs_list = NULL - } -}; - - -/*----------------- - * KERNING - *----------------*/ - - -/*Map glyph_ids to kern left classes*/ -static uint8_t kern_left_class_mapping[] = -{ - 0, 1, 0, 2, 0, 0, 0, 0, - 2, 3, 0, 0, 0, 4, 0, 4, - 5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 6, 7, 8, 9, 10, 11, - 0, 12, 12, 13, 14, 15, 12, 12, - 9, 16, 17, 18, 0, 19, 13, 20, - 21, 22, 23, 24, 25, 0, 0, 0, - 0, 0, 26, 27, 28, 0, 29, 30, - 0, 31, 0, 0, 32, 0, 31, 31, - 33, 27, 0, 34, 0, 35, 0, 36, - 37, 38, 36, 39, 40, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 6, 6, 6, 6, 6, 6, 0, 8, - 10, 10, 10, 10, 12, 12, 12, 12, - 9, 12, 9, 9, 9, 9, 9, 0, - 0, 13, 13, 13, 13, 23, 0, 0, - 26, 26, 26, 26, 26, 26, 0, 28, - 29, 29, 29, 29, 0, 0, 0, 0, - 0, 31, 33, 33, 33, 33, 33, 0, - 0, 0, 0, 0, 0, 36, 27, 36, - 6, 26, 6, 26, 6, 26, 8, 28, - 8, 28, 8, 28, 8, 28, 9, 0, - 9, 0, 10, 29, 10, 29, 10, 29, - 10, 29, 10, 29, 0, 0, 0, 0, - 0, 0, 0, 0, 12, 31, 0, 0, - 12, 0, 12, 0, 12, 0, 12, 0, - 12, 0, 0, 0, 13, 0, 14, 0, - 0, 15, 0, 15, 0, 15, 0, 15, - 0, 0, 0, 12, 31, 12, 31, 12, - 31, 31, 0, 0, 9, 33, 9, 33, - 9, 33, 0, 0, 0, 34, 0, 34, - 0, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 19, 0, 19, 0, 19, 0, - 13, 0, 13, 0, 13, 0, 13, 0, - 13, 0, 13, 0, 21, 0, 23, 36, - 23, 24, 39, 24, 39, 24, 39, 0, - 0, 0, 0, 0, 0, 0, 6, 26, - 0, 0, 0, 0, 0, 0, 19, 0, - 0, 29, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 6, 0, 10, - 12, 12, 9, 23, 0, 0, 6, 7, - 41, 6, 10, 24, 12, 9, 12, 14, - 6, 12, 12, 42, 9, 0, 16, 43, - 19, 23, 44, 22, 45, 0, 12, 23, - 0, 0, 31, 0, 0, 46, 0, 36, - 47, 0, 48, 31, 0, 49, 0, 50, - 0, 36, 51, 33, 0, 52, 53, 54, - 55, 56, 57, 0, 58, 59, 0, 0, - 33, 0, 0, 0, 0, 0, 10, 10, - 60, 41, 0, 0, 12, 12, 13, 61, - 61, 62, 14, 0, 63, 12, 6, 64, - 7, 41, 65, 10, 22, 66, 12, 0, - 14, 12, 12, 12, 9, 0, 16, 8, - 19, 63, 0, 22, 12, 0, 12, 67, - 61, 0, 61, 68, 69, 70, 26, 71, - 72, 73, 74, 29, 38, 28, 0, 0, - 75, 0, 0, 0, 33, 0, 27, 28, - 76, 36, 27, 38, 77, 0, 0, 78, - 79, 0, 79, 27, 80, 0, 29, 29, - 0, 73, 81, 0, 0, 0, 0, 79, - 79, 0, 0, 0, 36, 0, 0, 0, - 61, 79, 0, 0, 6, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 33, 20, 36, 20, 36, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 28, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 27, 41, 73, 41, - 0, 0, 0, 22, 38, 0, 0, 14, - 0, 14, 0, 14, 0, 14, 0, 12, - 0, 0, 0, 0, 0, 0, 0, 8, - 28, 19, 0, 23, 36, 23, 0, 22, - 38, 0, 0, 0, 0, 0, 0, 0, - 31, 0, 0, 0, 0, 12, 22, 38, - 0, 0, 0, 0, 0, 0, 12, 0, - 0, 0, 12, 0, 12, 6, 26, 6, - 26, 0, 0, 10, 29, 0, 29, 0, - 29, 22, 38, 0, 0, 0, 0, 0, - 0, 0, 0, 9, 33, 0, 0, 0, - 33, 0, 27, 63, 36, 63, 36, 63, - 36, 0, 0, 41, 73, 0, 0, 0, - 73, 22, 38, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 26, 12, 31, 21, 0, 21, - 0, 21, 0, 6, 26, 6, 26, 6, - 26, 6, 26, 6, 26, 6, 26, 6, - 26, 6, 26, 6, 26, 6, 26, 6, - 26, 6, 26, 10, 29, 10, 29, 10, - 29, 10, 29, 10, 29, 10, 29, 10, - 29, 10, 29, 12, 0, 12, 0, 9, - 33, 9, 33, 9, 33, 9, 33, 9, - 33, 9, 33, 9, 33, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 13, - 0, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 23, 36, 23, - 36, 23, 36, 23, 36, 9, 0 -}; - -/*Map glyph_ids to kern right classes*/ -static uint8_t kern_right_class_mapping[] = +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = { - 0, 1, 0, 2, 0, 0, 0, 3, - 2, 0, 4, 5, 0, 6, 7, 6, - 8, 0, 0, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 0, 0, 0, 0, - 10, 0, 11, 0, 12, 0, 0, 0, - 12, 0, 0, 13, 0, 0, 0, 0, - 12, 0, 12, 0, 14, 15, 16, 17, - 18, 19, 20, 21, 0, 0, 22, 0, - 0, 0, 23, 0, 24, 24, 24, 25, - 24, 0, 0, 0, 0, 0, 26, 26, - 27, 26, 24, 28, 29, 30, 31, 32, - 33, 34, 32, 35, 0, 0, 36, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 7, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 38, 0, 0, 0, 0, - 11, 11, 11, 11, 11, 11, 39, 12, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 12, 12, 12, 12, 12, 0, - 12, 16, 16, 16, 16, 20, 0, 0, - 23, 23, 23, 23, 23, 23, 40, 24, - 24, 24, 24, 24, 0, 0, 0, 0, - 0, 26, 27, 27, 27, 27, 27, 0, - 41, 31, 31, 31, 31, 32, 0, 32, - 11, 23, 11, 23, 11, 23, 12, 24, - 12, 24, 12, 24, 12, 24, 0, 24, - 0, 0, 0, 24, 0, 24, 0, 24, - 0, 24, 0, 24, 12, 24, 12, 24, - 12, 24, 12, 24, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 26, 0, 26, 0, - 26, 26, 0, 0, 12, 27, 12, 27, - 12, 27, 12, 24, 0, 0, 0, 0, - 0, 0, 14, 29, 14, 29, 14, 29, - 14, 29, 15, 0, 15, 0, 0, 0, - 16, 31, 16, 31, 16, 31, 16, 31, - 16, 31, 16, 31, 18, 0, 20, 32, - 20, 21, 35, 21, 35, 21, 35, 0, - 0, 12, 24, 42, 31, 0, 11, 23, - 0, 0, 12, 0, 14, 29, 15, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 0, - 0, 0, 12, 20, 0, 0, 11, 0, - 0, 11, 0, 21, 0, 12, 0, 0, - 11, 0, 0, 43, 12, 0, 0, 44, - 0, 20, 45, 19, 46, 0, 0, 20, - 24, 0, 26, 0, 31, 24, 47, 32, - 0, 48, 49, 26, 50, 51, 0, 52, - 0, 32, 53, 27, 54, 55, 56, 24, - 57, 31, 58, 0, 59, 60, 0, 31, - 27, 31, 0, 0, 0, 0, 0, 0, - 15, 0, 12, 0, 0, 0, 13, 61, - 0, 15, 0, 0, 62, 0, 11, 0, - 0, 0, 63, 0, 19, 0, 0, 0, - 0, 61, 0, 0, 12, 0, 0, 12, - 15, 62, 0, 19, 0, 64, 0, 0, - 0, 0, 65, 66, 0, 0, 23, 67, - 68, 26, 69, 24, 34, 70, 26, 26, - 26, 71, 26, 26, 27, 26, 26, 24, - 72, 32, 24, 34, 26, 73, 26, 26, - 74, 75, 26, 76, 26, 77, 24, 24, - 0, 26, 24, 29, 0, 0, 0, 71, - 26, 0, 26, 26, 32, 78, 12, 79, - 0, 0, 0, 0, 11, 0, 0, 0, - 80, 0, 0, 0, 0, 0, 0, 0, - 12, 27, 17, 32, 17, 32, 12, 24, - 12, 81, 12, 24, 12, 82, 12, 24, - 0, 0, 0, 0, 0, 0, 0, 0, - 26, 0, 0, 0, 83, 0, 84, 0, - 0, 0, 0, 19, 34, 0, 0, 0, - 26, 0, 78, 0, 0, 15, 85, 0, - 26, 0, 26, 0, 68, 12, 24, 12, - 24, 15, 0, 20, 32, 20, 0, 19, - 34, 15, 0, 64, 73, 86, 87, 0, - 0, 88, 89, 0, 0, 0, 19, 34, - 0, 0, 61, 71, 0, 26, 0, 26, - 64, 73, 0, 26, 0, 11, 23, 11, - 23, 0, 0, 0, 24, 90, 24, 0, - 24, 19, 34, 0, 0, 0, 0, 0, - 26, 0, 26, 12, 27, 12, 24, 12, - 27, 0, 0, 62, 32, 62, 32, 62, - 32, 64, 73, 0, 26, 0, 26, 0, - 26, 19, 34, 0, 0, 91, 24, 24, - 24, 92, 93, 94, 95, 61, 0, 0, - 96, 12, 24, 97, 98, 99, 0, 61, - 71, 11, 23, 0, 26, 18, 0, 18, - 0, 18, 0, 11, 23, 11, 23, 11, - 23, 11, 23, 11, 23, 11, 23, 11, - 23, 11, 23, 11, 23, 11, 23, 11, - 23, 11, 23, 0, 24, 0, 24, 0, - 24, 0, 24, 0, 24, 0, 24, 0, - 24, 0, 24, 0, 0, 0, 0, 12, - 27, 12, 27, 12, 27, 12, 27, 12, - 27, 12, 27, 12, 27, 12, 24, 12, - 24, 12, 24, 12, 27, 12, 24, 16, - 31, 16, 31, 0, 31, 0, 31, 0, - 31, 0, 31, 0, 31, 20, 32, 20, - 32, 20, 32, 20, 32, 12, 0 + -29, 13, 12, 14, 1, -11, -1, 2, + -1, 1, -13, 2, -2, -2, -2, -1, + -5, -5, 3, -4, -5, -7, -6, 1, + -6, -1, 2, 5, 1, -1, -9, 2, + 0, 1, -10, 11, 5, 1, -26, 6, + -1, -7, 2, 5, 2, -1, -1, 2, + -8, 1, -12, -7, 7, 3, 1, -12, + 3, 11, -51, -10, -12, 12, -7, -2, + 0, -7, 3, 6, 3, 0, 1, -12, + -3, 2, -1, 1, -15, 2, -12, -12, + -13, -12, -47, -14, -46, -31, -51, 2, + -6, -8, -7, -5, -7, -5, 1, -20, + -7, -26, -21, 8, -51, 3, -1, -1, + 2, 1, 2, 1, -2, -2, -3, -2, + -4, -2, -2, 3, -3, -13, -8, -1, + 1, 1, 1, 5, 5, 6, -3, -12, + -13, -12, -12, -11, -3, -2, -2, -3, + -6, -6, -12, -4, -11, -5, -14, -11, + -17, -14, 2, -15, 2, -96, -96, -38, + -22, -14, -2, -3, -14, -17, -14, -16, + 0, 1, 0, 0, 1, 0, 0, -2, + -3, -3, -3, -1, -2, -2, -6, -4, + -2, -2, -2, -4, -1, -2, -2, -3, + -2, -2, -1, -2, -3, -3, -17, -19, + -20, -19, -3, -17, -3, -17, -2, -15, + -25, -25, 12, -13, -15, -16, -15, -49, + -16, -58, -34, -55, -1, -9, -27, -34, + -2, -3, -2, -2, -3, -2, -1, -3, + -3, -1, -13, -17, -14, -7, -14, -18, + 1, -1, 1, 0, 1, -3, 1, 0, + 2, 0, 1, 1, -4, 2, -5, -105, + -105, -34, -2, -2, -2, -7, -8, -1, + -2, -2, -2, -8, -1, -4, 9, 10, + 9, -21, -4, -18, -12, 8, -22, 0, + -1, -3, -3, -4, -3, -13, -4, -12, + -9, -31, -1, -5, -5, -2, -1, 0, + -1, -3, -2, -2, -1, -1, 0, -1, + 2, 2, -51, -50, -51, -48, -49, -51, + -16, -17, -18, -17, -10, 10, 10, 10, + 7, 10, -50, -51, -2, -42, -51, -42, + -48, -42, -30, -31, -38, -14, -5, -1, + -2, -2, -2, -2, -2, -4, 0, -5, + -6, 13, -56, -23, -55, -20, -20, -48, + -13, -13, -14, -13, 11, -30, -28, -30, + -19, -18, -7, 12, 10, -37, -13, -37, + -14, -14, -34, -9, -9, -10, -9, 9, + 8, -21, -20, -20, -13, -12, -3, 9, + -15, -15, -16, -15, -17, -14, -20, 13, + -58, -33, -58, -28, -27, -52, -17, -17, + -19, -17, 11, 11, 11, 8, 12, 12, + -40, -42, -42, -39, -14, -25, -12, 12, + 8, -15, -16, -17, -16, -1, -13, -3, + -14, -12, -17, -17, -12, -7, -5, -7, + -8, 9, 10, 13, 12, -15, 12, -13, + -9, -6, -13, -9, -5, -41, -41, -12, + -11, -12, 10, 0, -12, -11, 11, 0, + 11, 11, 6, 11, 3, -38, -37, -9, + -8, -8, -8, -10, -8, -29, -28, -6, + -6, -7, -6, -13, -12, -13, -13, -12, + -43, -40, -10, -10, -10, -10, -12, -10, + -9, -10, -10, -13 }; -/*Kern values between classes*/ -static uint8_t kern_class_values[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -13, 0, 0, 0, - 0, 0, 0, 0, 0, -15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -6, -7, 0, -2, -8, 0, -10, - 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 2, - 0, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0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- 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -8, 0, 0, - 0, 0, -4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -3, 0, - -3, -3, 0, 0, 0, -3, -5, -8, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -7, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -3, -9, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -5, 0, 0, 0, 0, -9, -12, - 0, 0, 0, 0, 0, -10, 0, -6, - -7, 0, 0, -12, 0, -7, 0, 0, - -3, 0, 0, -6, 0, -6, 0, 0, - -7, -2, 0, -42, 0, 0, 0, 0, - 0, 0, 0, 0, 2, -8, 0, 0, - -34, -7, -22, -18, 0, -30, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - -5, -17, -11, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -40, 0, 0, 0, 0, -17, - 0, -25, 0, 0, 0, 0, 0, -4, - 0, -3, 0, -1, -2, 0, 0, -2, - 0, 0, 2, 0, 2, 0, 0, 0, - 0, 0, 0, -12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - -4, 0, 0, -3, -2, 0, 0, 0, - 0, -7, 0, -11, 0, 0, 0, 0, - 0, -7, 0, -5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -4, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -5, 0, - -3, -2, 0, -4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -10, 0, -2, 0, 0, -6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -5, 0, - 0, 0, 0, -27, -29, 0, 0, 0, - -10, -3, -30, -2, 2, 0, 2, 2, - 0, 2, 0, 0, -14, -12, 0, -14, - -12, -9, -14, 0, -12, -9, -7, -10, - -7, 0, -41, -27, -22, -14, -12, 0, - 0, 0, -10, 0, 0, -16, 0, 0, - -19, 0, 0, -15, -19, -12, -12, -19, - -18, -20, -7, 0, -11, 0, 2, 0, - -3, -12, -17, -16, -16, -10, -16, 0, - -16, -16, -17, -16, -16, 0, -13, -5, - -16, -13, -10, 0, -16, -13, -18, -3, - -19, 0, -14, 0, -10, -17, 2, -14, - -2, 0, 0, 0, 3, 0, -28, -5, - 0, 0, 0, -9, -2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, -6, - -5, 0, 0, -6, -4, 0, 0, -3, - -1, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - -5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, - 0, -15, -7, 0, 0, 0, -5, 0, - 0, 0, 2, 0, 0, 0, 0, 0, - 0, 2, -4, -4, 0, 0, -4, -3, - 0, 0, -2, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -6, 0, 0, - 0, 0, -3, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 0, 0, -3, 0, - 0, -3, 0, 0, 0, -3, -4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 0, 0, - -2, 0, 2, 0, 0, 0, -3, -4, - -3, -3, -2, 2, 0, 2, 0, 0, - 0, -3, 0, 0, 0, 2, -5, -6, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -5, 0, -6, -5, -7, - -3, 0, 2, 0, 2, 0, 0, 0, - -5, -2, 0, 0, -4, 3, -6, -26, - -6, 0, 0, 0, -12, -4, -12, -2, - 2, -12, 2, 2, 2, 2, 0, 2, - -9, -8, -3, -5, -8, -5, -7,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0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -2, 0, 0, -2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -49, -52, 0, - 0, 0, -24, -8, 0, -6, 1, 0, - 1, 1, 0, 1, 0, 0, -26, -23, - 0, -26, -23, -18, -27, 0, -23, -18, - -14, -19, -15, 0, -72, -48, -40, -27, - -23, 0, 0, 0, -20, 0, 0, -30, - 0, 0, -35, 0, 0, -28, -35, -23, - -23, -34, -32, -37, -14, 0, -22, 0, - 1, 0, -8, -23, -32, -30, -30, -19, - -30, 0, -30, -30, -31, -30, -30, 0, - -24, -10, -29, -24, -19, 0, -30, -24, - -34, -8, -34, 0, -26, 0, -20, -31, - 1, -26, -5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -3, 0, 0, 0,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 0, 0, 0, 0, -50, - -15, 0, 0, 0, -11, -3, 0, 0, - 2, 0, 0, 0, 0, 2, 0, 0, - -14, -8, 0, -13, -8, 0, -6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -8, 0, 0, 0, 0, -7, 0, - -10, 0, 2, 0, 0, -4, -10, -5, - -9, 0, -3, 0, -4, 0, -6, -4, - 0, 0, -6, 0, -4, -4, 0, 0, - -3, 0, -5, 0, -8, 0, 0, 0, - 0, -4, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -3, 0, -3, 0, -2, - -3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -2, 0, -3, -3, 0, 0, - 0, 0, 0, 0, -6, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -6, -3, 0, 0, 0, 0, 0, - -3, 0, -2, 0, 0, -3, -6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, -3, 0, 0, -4, 0, - -4, 0, 0, -4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 3, -4, - -4, 0, 0, 0, 2, 0, 2, 0, - -4, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -4, -4, 0, - -4, -3, 0, -4, 0, -4, 0, 0, - -4, 0, -2, 0, 0, 0, 0, 0, - 0, 0, 0, -2, 0, 0, 0, 0, - 0, -2, 0, -1, 0, -1, -2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0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0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -9, -5, 0, 0, 0, 0, 0, - -6, 0, 0, -5, 0, 0, -22, 0, - -12, 0, 0, 0, 0, 0, -2, 0, - -2, 0, 0, -22, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -1, 0, -2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -2, 0, -2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -5, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0 -}; - - -/*Collect the kern class' data in one place*/ -static lv_font_fmt_txt_kern_classes_t kern_classes = +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = { - .class_pair_values = kern_class_values, - .left_class_mapping = kern_left_class_mapping, - .right_class_mapping = kern_right_class_mapping, - .left_class_cnt = 81, - .right_class_cnt = 99, + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 484, + .glyph_ids_size = 0 }; @@ -5584,14 +3789,14 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .glyph_bitmap = gylph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, - .cmap_num = 11, - .bpp = 1, + .cmap_num = 1, + .bpp = 4, .kern_scale = 16, - .kern_dsc = &kern_classes, - .kern_classes = 1, - //.kern_dsc = &kern_pairs, - //.kern_classes = 0, + //.kern_dsc = &kern_classes, + //.kern_classes = 1, + .kern_dsc = &kern_pairs, + .kern_classes = 0, }; @@ -5604,6 +3809,6 @@ lv_font_t lvgl_sample = { .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ - .line_height = 19, /*The maximum line height required by the font*/ - .base_line = 4, /*Baseline measured from the bottom of the line*/ + .line_height = 47, /*The maximum line height required by the font*/ + .base_line = 10, /*Baseline measured from the bottom of the line*/ }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index a326d5e38bec..9e49c7859376 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -23,7 +23,8 @@ /********************** * STATIC PROTOTYPES **********************/ -static const lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter); +static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter); +static uint32_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right); static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** @@ -51,7 +52,10 @@ static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unicode_letter) { lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; - lv_font_fmt_txt_glyph_dsc_t * gdsc = get_glyph_dsc(font, unicode_letter); + uint32_t gid = get_glyph_dsc_id(font, unicode_letter); + if(!gid) return false; + + const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid]; if(gdsc) return &fdsc->glyph_bitmap[gdsc->bitmap_index]; @@ -70,57 +74,41 @@ const uint8_t * lv_font_get_bitmap_fmt_txt(const lv_font_t * font, uint32_t unic bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) { lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; - lv_font_fmt_txt_glyph_dsc_t * gdsc = get_glyph_dsc(font, unicode_letter); - - if(gdsc) { - /*Get kerning value*/ - uint32_t kvalue = 0; - uint32_t k; - if(fdsc->kern_classes == 0) { - const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; - if(kdsc->glyph_ids_size == 1) { - const uint8_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == unicode_letter && - g_ids[k+1] == unicode_letter_next) { - kvalue = kdsc->values[k >> 1]; - break; - } - } - } else { - const uint16_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == unicode_letter && - g_ids[k+1] == unicode_letter_next) { - kvalue = kdsc->values[k >> 1]; - break; - } - } - } + uint32_t gid = get_glyph_dsc_id(font, unicode_letter); + if(!gid) return false; + + uint32_t kvalue = 0; + if(fdsc->kern_dsc) { + uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next); + if(gid_next) { + kvalue = get_kern_value(font, gid, gid_next); } + } - uint32_t adw_w = gdsc->adv_w + ((kvalue * fdsc->kern_scale) >> 4); - adw_w = (adw_w + (1 << 3)) >> 4; + /*Put together a glyph dsc*/ + const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid]; - dsc_out->adv_w = adw_w; - dsc_out->box_h = gdsc->box_h; - dsc_out->box_w = gdsc->box_w; - dsc_out->ofs_x = gdsc->ofs_x; - dsc_out->ofs_y = gdsc->ofs_y; - dsc_out->bpp = fdsc->bpp; + uint32_t adw_w = gdsc->adv_w + ((kvalue * fdsc->kern_scale) >> 4); + adw_w = (adw_w + (1 << 3)) >> 4; - return true; - } + dsc_out->adv_w = adw_w; + dsc_out->box_h = gdsc->box_h; + dsc_out->box_w = gdsc->box_w; + dsc_out->ofs_x = gdsc->ofs_x; + dsc_out->ofs_y = gdsc->ofs_y; + dsc_out->bpp = fdsc->bpp; - return false; + return true; } /********************** * STATIC FUNCTIONS **********************/ -static const lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font, uint32_t letter) +static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) { + if(letter == '\0') return 0; + lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; uint16_t i; @@ -128,16 +116,69 @@ static const lv_font_fmt_txt_glyph_dsc_t * get_glyph_dsc(const lv_font_t * font /*Relative code point*/ uint32_t rcp = letter - fdsc->cmaps[i].range_start; + if(rcp > fdsc->cmaps[i].range_length) continue; uint32_t glyph_id = 0; if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY) { glyph_id = fdsc->cmaps[i].glyph_id_start + rcp; } + else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) { + const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; + glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[rcp]; + } + else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) { + const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; + glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[rcp]; + } - if(glyph_id) return &fdsc->glyph_dsc[glyph_id]; + return glyph_id; } - return NULL; + return 0; + +} + +static uint32_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right) +{ + lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; + uint32_t value = 0; + uint32_t k; + if(fdsc->kern_classes == 0) { + /*Kern pairs*/ + const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; + if(kdsc->glyph_ids_size == 1) { + const uint8_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == gid_left && + g_ids[k+1] == gid_right) { + value = kdsc->values[k >> 1]; + break; + } + } + } else { + const uint16_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == gid_left && + g_ids[k+1] == gid_right) { + value = kdsc->values[k >> 1]; + break; + } + } + } + } else { + /*Kern classes*/ + const lv_font_fmt_txt_kern_classes_t * kdsc = fdsc->kern_dsc; + uint8_t left_class = kdsc->left_class_mapping[gid_left]; + uint8_t right_class = kdsc->left_class_mapping[gid_right]; + + /* If class = 0, kerning not exist for that glyph + * else got the value form `class_pair_values` 2D array*/ + if(left_class > 0 && right_class > 0) { + value = kdsc->class_pair_values[(left_class-1)* kdsc->right_class_cnt + (right_class-1)]; + } + + } + return value; } diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index b86f76d8724a..d29bdf908957 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -130,9 +130,8 @@ typedef struct { /*To get a kern value of two code points: 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t 2 Get the class of the left and right glyphs as `left_class` and `right_class` - for(i = 0; i < left_class_num; i++) - if(left_class_mapping[i] == glyph_id_left) - return i; + left_class = left_class_mapping[glyph_id_left]; + right_class = right_class_mapping[glyph_id_right]; 3. value = class_pair_values[(left_class-1)*right_class_cnt + (righ_class-1)] */ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index c3a8df774641..8d7c7461f727 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -578,28 +578,30 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) uint32_t letter; uint32_t letter_next; - while(i <= new_line_start - 1) { - /* Get the current letter. - * Be careful 'i' already points to the next character*/ - letter = lv_txt_encoded_next(txt, &i); - - /*Get the next letter too for kerning*/ - letter_next = lv_txt_encoded_next(&txt[i], NULL); - - /*Handle the recolor command*/ - if((flag & LV_TXT_FLAG_RECOLOR) != 0) { - if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { - continue; /*Skip the letter is it is part of a command*/ + if(new_line_start > 0) { + while(i <= new_line_start - 1) { + /* Get the current letter. + * Be careful 'i' already points to the next character*/ + letter = lv_txt_encoded_next(txt, &i); + + /*Get the next letter too for kerning*/ + letter_next = lv_txt_encoded_next(&txt[i], NULL); + + /*Handle the recolor command*/ + if((flag & LV_TXT_FLAG_RECOLOR) != 0) { + if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { + continue; /*Skip the letter is it is part of a command*/ + } } - } - x += lv_font_get_glyph_width(font, letter, letter_next); - if(pos->x < x) { - i = i_current; - break; + x += lv_font_get_glyph_width(font, letter, letter_next); + if(pos->x < x) { + i = i_current; + break; + } + x += style->text.letter_space; + i_current = i; } - x += style->text.letter_space; - i_current = i; } return lv_encoded_get_char_id(txt, i); @@ -692,28 +694,30 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) uint32_t letter; uint32_t letter_next; - while(i <= new_line_start - 1) { - /* Get the current letter - * Be careful 'i' already points to the next character */ - letter = lv_txt_encoded_next(txt, &i); + if(new_line_start > 0) { + while(i <= new_line_start - 1) { + /* Get the current letter + * Be careful 'i' already points to the next character */ + letter = lv_txt_encoded_next(txt, &i); - /*Get the next letter for kerning*/ - letter_next = lv_txt_encoded_next(&txt[i], NULL); + /*Get the next letter for kerning*/ + letter_next = lv_txt_encoded_next(&txt[i], NULL); - /*Handle the recolor command*/ - if((flag & LV_TXT_FLAG_RECOLOR) != 0) { - if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { - continue; /*Skip the letter is it is part of a command*/ + /*Handle the recolor command*/ + if((flag & LV_TXT_FLAG_RECOLOR) != 0) { + if(lv_txt_is_cmd(&cmd_state, txt[i]) != false) { + continue; /*Skip the letter is it is part of a command*/ + } } + last_x = x; + x += lv_font_get_glyph_width(font, letter, letter_next); + if(pos->x < x) { + i = i_current; + break; + } + x += style->text.letter_space; + i_current = i; } - last_x = x; - x += lv_font_get_glyph_width(font, letter, letter_next); - if(pos->x < x) { - i = i_current; - break; - } - x += style->text.letter_space; - i_current = i; } int32_t max_diff = lv_font_get_glyph_width(font, letter, letter_next) + style->text.letter_space + 1; From ca01b558f70d2fa106f976c1d4564e26a57b1fb5 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 1 Jun 2019 21:37:04 -0400 Subject: [PATCH 481/590] Add lv_obj_adjust_coords() API for finding the object's "client area" --- src/lv_core/lv_obj.c | 19 +++++++++++++++++++ src/lv_core/lv_obj.h | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index c499786d8437..3906bafa70ce 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1592,6 +1592,25 @@ void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p) lv_area_copy(cords_p, &obj->coords); } +/** + * Adjust the coordinates retrieved from lv_obj_get_coords() according + * to the object's style. + */ +void lv_obj_adjust_coords(const lv_obj_t *obj, lv_area_t * cords_p) +{ + const lv_style_t *style = lv_obj_get_style(obj); + if(style->body.border.part & LV_BORDER_LEFT) + cords_p->x1 += style->body.border.width; + + if(style->body.border.part & LV_BORDER_RIGHT) + cords_p->x2 -= style->body.border.width; + if(style->body.border.part & LV_BORDER_TOP) + cords_p->y1 += style->body.border.width; + if(style->body.border.part & LV_BORDER_BOTTOM) + cords_p->y2 -= style->body.border.width; +} + + /** * Get the x coordinate of object * @param obj pointer to an object diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 56b395e8f0b3..03ffa19786be 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -666,6 +666,12 @@ uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj); */ void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p); +/** + * Adjust the coordinates retrieved from lv_obj_get_coords() according + * to the object's style. + */ +void lv_obj_adjust_coords(const lv_obj_t *obj, lv_area_t * cords_p); + /** * Get the x coordinate of object * @param obj pointer to an object From 4075a7adfc71f9c2b52e2fbbf7c83f5442eeefc7 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sat, 1 Jun 2019 21:37:25 -0400 Subject: [PATCH 482/590] Roller: do not draw rectangle highlight on borders --- src/lv_objx/lv_roller.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 67c386cc315e..a48e810922a7 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -328,8 +328,12 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/ rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; - rect_area.x1 = roller->coords.x1; - rect_area.x2 = roller->coords.x2; + lv_area_t roller_coords; + lv_obj_get_coords(roller, &roller_coords); + lv_obj_adjust_coords(roller, &roller_coords); + + rect_area.x1 = roller_coords.x1; + rect_area.x2 = roller_coords.x2; lv_draw_rect(&rect_area, mask, ext->ddlist.sel_style, opa_scale); } From ff65ecd102d614cafc5a784c2b16c781f2240a34 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 2 Jun 2019 11:56:57 +0200 Subject: [PATCH 483/590] add a default font --- scripts/built_in_font/FontAwesome.ttf | Bin 0 -> 165548 bytes scripts/built_in_font/Roboto-Regular.woff | Bin 0 -> 61736 bytes scripts/built_in_font/built_in_font_gen.py | 44 + src/lv_core/lv_obj.c | 1 - src/lv_draw/lv_draw_basic.c | 8 +- src/lv_fonts/lv_font_builtin.c | 45 - src/lv_fonts/lv_font_builtin.h | 125 - src/lv_fonts/lv_font_roboto_18.c | 2504 +++++++++++++ src/lv_fonts/lvgl_sample.c | 3814 -------------------- src/lv_misc/lv_font.c | 8 - src/lv_misc/lv_font.h | 14 - src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 106 +- src/lv_misc/lv_symbol_def.h | 109 +- 13 files changed, 2665 insertions(+), 4113 deletions(-) create mode 100644 scripts/built_in_font/FontAwesome.ttf create mode 100644 scripts/built_in_font/Roboto-Regular.woff create mode 100644 scripts/built_in_font/built_in_font_gen.py delete mode 100644 src/lv_fonts/lv_font_builtin.c delete mode 100644 src/lv_fonts/lv_font_builtin.h create mode 100644 src/lv_fonts/lv_font_roboto_18.c delete mode 100644 src/lv_fonts/lvgl_sample.c diff --git a/scripts/built_in_font/FontAwesome.ttf b/scripts/built_in_font/FontAwesome.ttf new file mode 100644 index 0000000000000000000000000000000000000000..35acda2fa1196aad98c2adf4378a7611dd713aa3 GIT binary patch literal 165548 zcmd4434D~*)jxjkv&@#+*JQHIB(r2Agk&ZO5W=u;0Z~v85Ce*$fTDsRbs2>!AXP+E zv})s8XszXKwXa&S)7IKescosX*7l99R$G?_w7v?NC%^Bx&rC7|(E7f=|L^lpa-Zk9 z`?>d?d+s^so_oVMW6Z|VOlEVZPMtq{)pOIHX3~v25n48F@|3AkA5-983xDXec_W** zHg8HX#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os{kqf&djzr{g8Dc|XZwpSBh=lsMR!rT?A#c|Y-uGOyfSa|Ed+5t1q;6tOwfE*KV#M%VnIk8+19jM9Gq9T zntL5WSJ5E2j#O)ch<4mSst3Vahx64fNUu}qCYmJHe*v20{}sAT1}UD~f8p|9fO)Hv zA@$cVZ~ukTV&#j6|AaqP7w%@bQy*k|_1xiB@IOr--u@%S7kxT6|DR^LezRH{pn_D+ z_81*5c1pkRUxG~iV!t#DDxmUcOb-;O&~E{o$Hx?Qu^jO&wx^trU7ebfFNegw)=zR6 zV&M&sWgwCVFB+T$ivC}N^uL7;Px7C6Ci##2zr*vdXh~v99^Q-#GM}0XopU1I{&(En zn(kBfR<*t_8!)OMlb)FqP)LO*aSUNJkSvGCzAI3i4cp3M@ zhy5wzbUjOSoP{2&OE(_~of}FxHQ!m?YeIplhV-CebHDqMfH-KEDH>FxZ|yjw1UisB zTPG%XH2ZSj(%OL2_^{SZ|AgOKJ#@cZK23gLED}KRv5g@eJia+>KJ!51!OLT+P^v?| zk1#jq{B-QmrfHFza}GtL6Ju{TyXk-&Zv+(I!a~y}8eSDTkYfr}L)D5@WfD>gP29u& zetXUg<&4I|X{FKms7Z^xbgE9LSeo3cBg?sK(V3cO+x z0Rp}H9ISh7eu#$6KQFD*$@snLUtcw2;19-{C!EIbY=U{dT;zm;6v yPNz?Hk~VN)lGb-%lHz#&2SA#+;md@Hv>d?r4N}u*-!BSq`h?;Mr~80{^4|a;rz2hf literal 0 HcmV?d00001 diff --git a/scripts/built_in_font/built_in_font_gen.py b/scripts/built_in_font/built_in_font_gen.py new file mode 100644 index 000000000000..896152048184 --- /dev/null +++ b/scripts/built_in_font/built_in_font_gen.py @@ -0,0 +1,44 @@ +import argparse +import os +import sys + +parser = argparse.ArgumentParser(description='Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv') +parser.add_argument('-s', '--size', + type=int, + metavar = 'px', + nargs='?', + help='Size of the font in px') +parser.add_argument('-bpp', + type=int, + metavar = '1,2,4', + nargs='?', + help='Bit per pixel') +parser.add_argument('-r', '--range', + nargs='+', + metavar = 'start-end', + default=['0x20-0x7F'], + help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F 0x200 324') +parser.add_argument('-o', '--output', + nargs='?', + metavar='file', + help='Output file name. E.g. my_font_20.c') +parser.add_argument('--compressed', action='store_true', + help='Compress the bitmaps') + +args = parser.parse_args() + +if args.compressed == False: + compr = "--no-compress --no-prefilter" +else: + compr = "" + +r_str = "" +for r in args.range: + r_str = r_str + "-r " + r + " "; + +#Built in symbols +syms = "-r 61441 -r 61448 -r 61451 -r 61452 -r 61453 -r 61457 -r 61459 -r 61460 -r 61461 -r 61465 -r 61468 -r 61473 -r 61478 -r 61479 -r 61480 -r 61502 -r 61504 -r 61512 -r 61515 -r 61516 -r 61517 -r 61521 -r 61522 -r 61523 -r 61524 -r 61543 -r 61544 -r 61553 -r 61556 -r 61559 -r 61560 -r 61561 -r 61563 -r 61587 -r 61589 -r 61636 -r 61637 -r 61639 -r 61671 -r 61683 -r 61724 -r 61732 -r 61787 -r 61931 -r 62016 -r 62017 -r 62018 -r 62019 -r 62020 -r 62099" + +#Run the command +cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff {} --font FontAwesome.ttf {} --format lvgl -o {}".format(compr, args.bpp, args.size, r_str, syms, args.output) +os.system(cmd) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index c499786d8437..50cad5cc4f46 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -88,7 +88,6 @@ void lv_init(void) lv_fs_init(); #endif - lv_font_init(); #if LV_USE_ANIMATION lv_anim_core_init(); #endif diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 3dd91938f05e..6f30cd1f298e 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -250,8 +250,8 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0'); if(g_ret == false) return; - lv_coord_t pos_x = pos_p->x + g.ofs_x; - lv_coord_t pos_y = pos_p->y + g.ofs_y; + lv_coord_t pos_x = pos_p->x; + lv_coord_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y; const uint8_t * bpp_opa_table; uint8_t bitmask_init; @@ -277,10 +277,6 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv default: return; /*Invalid bpp. Can't render the letter*/ } - if(letter == 0xf817) { - char x = 1; - } - const uint8_t * map_p = lv_font_get_glyph_bitmap(font_p, letter); if(map_p == NULL) return; diff --git a/src/lv_fonts/lv_font_builtin.c b/src/lv_fonts/lv_font_builtin.c deleted file mode 100644 index 6ca42f2adf73..000000000000 --- a/src/lv_fonts/lv_font_builtin.c +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file lv_font_built_in.c - * - */ - -/********************* - * INCLUDES - *********************/ -#include "lv_font_builtin.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * STATIC PROTOTYPES - **********************/ - -/********************** - * STATIC VARIABLES - **********************/ - -/********************** - * MACROS - **********************/ - -/********************** - * GLOBAL FUNCTIONS - **********************/ - -/** - * Initialize the built-in fonts - */ -void lv_font_builtin_init(void) -{ - -} - -/********************** - * STATIC FUNCTIONS - **********************/ diff --git a/src/lv_fonts/lv_font_builtin.h b/src/lv_fonts/lv_font_builtin.h deleted file mode 100644 index 65b1e1943609..000000000000 --- a/src/lv_fonts/lv_font_builtin.h +++ /dev/null @@ -1,125 +0,0 @@ -/** - * @file lv_font_builtin.h - * - */ - -#ifndef LV_FONT_BUILTIN_H -#define LV_FONT_BUILTIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/********************* - * INCLUDES - *********************/ -#ifdef LV_CONF_INCLUDE_SIMPLE -#include "lv_conf.h" -#else -#include "../../../lv_conf.h" -#endif - -#include "../lv_misc/lv_font.h" - -/********************* - * DEFINES - *********************/ - -/********************** - * TYPEDEFS - **********************/ - -/********************** - * GLOBAL PROTOTYPES - **********************/ - -/** - * Initialize the built-in fonts - */ -void lv_font_builtin_init(void); - -/********************** - * MACROS - **********************/ - -/********************** - * FONT DECLARATIONS - **********************/ - -/*10 px */ -#if LV_USE_FONT_DEJAVU_10 -LV_FONT_DECLARE(lv_font_dejavu_10) -#endif - -#if LV_USE_FONT_DEJAVU_10_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup) -#endif - -#if LV_USE_FONT_DEJAVU_10_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic) -#endif - -#if LV_USE_FONT_SYMBOL_10 -LV_FONT_DECLARE(lv_font_symbol_10) -#endif - -/*20 px */ -#if LV_USE_FONT_DEJAVU_20 -LV_FONT_DECLARE(lv_font_dejavu_20) -#endif - -#if LV_USE_FONT_DEJAVU_20_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup) -#endif - -#if LV_USE_FONT_DEJAVU_20_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic) -#endif - -#if LV_USE_FONT_SYMBOL_20 -LV_FONT_DECLARE(lv_font_symbol_20) -#endif - -/*30 px */ -#if LV_USE_FONT_DEJAVU_30 -LV_FONT_DECLARE(lv_font_dejavu_30) -#endif - -#if LV_USE_FONT_DEJAVU_30_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup) -#endif - -#if LV_USE_FONT_DEJAVU_30_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic) -#endif - -#if LV_USE_FONT_SYMBOL_30 -LV_FONT_DECLARE(lv_font_symbol_30) -#endif - -/*40 px */ -#if LV_USE_FONT_DEJAVU_40 -LV_FONT_DECLARE(lv_font_dejavu_40) -#endif - -#if LV_USE_FONT_DEJAVU_40_LATIN_SUP -LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup) -#endif - -#if LV_USE_FONT_DEJAVU_40_CYRILLIC -LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic) -#endif - -#if LV_USE_FONT_SYMBOL_40 -LV_FONT_DECLARE(lv_font_symbol_40) -#endif - -#if LV_USE_FONT_MONOSPACE_8 -LV_FONT_DECLARE(lv_font_monospace_8) -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*LV_FONT_BUILTIN_H*/ diff --git a/src/lv_fonts/lv_font_roboto_18.c b/src/lv_fonts/lv_font_roboto_18.c new file mode 100644 index 000000000000..b9c3ef1438cd --- /dev/null +++ b/src/lv_fonts/lv_font_roboto_18.c @@ -0,0 +1,2504 @@ +#include "lvgl/lvgl.h" + +/******************************************************************************* + * Size: 18 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 18 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441 -r 61448 -r 61451 -r 61452 -r 61453 -r 61457 -r 61459 -r 61460 -r 61461 -r 61465 -r 61468 -r 61473 -r 61478 -r 61479 -r 61480 -r 61502 -r 61504 -r 61512 -r 61515 -r 61516 -r 61517 -r 61521 -r 61522 -r 61523 -r 61524 -r 61543 -r 61544 -r 61553 -r 61556 -r 61559 -r 61560 -r 61561 -r 61563 -r 61587 -r 61589 -r 61636 -r 61637 -r 61639 -r 61671 -r 61683 -r 61724 -r 61732 -r 61787 -r 61931 -r 62016 -r 62017 -r 62018 -r 62019 -r 62020 -r 62099 --format lvgl -o lv_font_roboto_18.c + ******************************************************************************/ + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x0, 0x7, 0xf3, 0x4b, 0x10, 0x0, 0x26, 0x6, + 0xf0, 0x7f, 0x17, 0xf1, 0x7f, 0x17, 0x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0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xad, 0xdd, 0xb0, + 0x4d, 0xdd, 0xdd, 0xdd, 0xdd, 0xda, 0xff, 0xff, + 0xf2, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf2, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xcf, 0xff, 0xe0, 0x6f, 0xff, 0xff, 0xff, 0xff, + 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x8b, 0xbb, 0x90, 0x3b, 0xbb, 0xbb, + 0xbb, 0xbb, 0xb8, 0xff, 0xff, 0xf2, 0x9f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x9f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xf1, + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x2, 0x22, + 0x10, 0x1, 0x22, 0x22, 0x22, 0x22, 0x20, + + /* U+F00C "" */ + 0x0, 0x0, 0x8, 0xb1, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x9f, 0xfd, 0x10, 0x0, 0x0, 0x0, + 0x0, 0x9, 0xff, 0xff, 0xd1, 0x0, 0x0, 0x0, + 0x0, 0x9f, 0xff, 0xff, 0xfd, 0x10, 0x0, 0x0, + 0x9, 0xff, 0xff, 0xff, 0xff, 0xd1, 0x0, 0x0, + 0x8f, 0xff, 0xfc, 0x8f, 0xff, 0xfd, 0x10, 0x0, + 0xaf, 0xff, 0xc1, 0x8, 0xff, 0xff, 0xd1, 0x0, + 0xb, 0xfd, 0x10, 0x0, 0x8f, 0xff, 0xfd, 0x10, + 0x0, 0x61, 0x0, 0x0, 0x8, 0xff, 0xff, 0xd1, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xfb, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff, 0xf6, + 0x0, 0x0, 0x0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 0x80, 0x9f, 0xb5, 0xff, 0xff, 0xff, + 0xff, 0xd4, 0xdf, 0x40, 0x8f, 0xd4, 0xdf, 0xff, + 0xff, 0xb5, 0xff, 0x50, 0x0, 0x6f, 0xe4, 0xbf, + 0xff, 0x87, 0xff, 0x40, 0x0, 0x0, 0x3e, 0xf6, + 0x8f, 0x69, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x2d, + 0xf8, 0x2c, 0xfe, 0xff, 0x20, 0x0, 0x0, 0x0, + 0xb, 0xff, 0xf7, 0x6f, 0xf2, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xc5, 0x5, 0xdd, 0x10, 0x0, + + /* U+F019 "" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xf8, + 0xcb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xaf, + 0xad, 0xbf, 0xff, 0xff, 0xff, 0x74, 0xaf, 0xff, + 0xff, 0xfb, 0xef, 0xff, 0xff, 0x41, 0x60, 0x8f, + 0xff, 0xff, 0x90, 0x22, 0x22, 0x11, 0xdf, 0x90, + 0x22, 0x22, 0x20, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0x90, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0x90, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, 0xaf, 0xff, + 0xff, 0xff, 0xff, 0x60, 0x0, 0x0, 0x2, 0x44, + 0xbf, 0xff, 0x74, 0x40, 0x0, 0x0, 0x0, 0x0, + 0x9, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x9f, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x9, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x9f, 0xff, 0x40, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2, 0x66, 0x60, 0x0, 0x0, 0x0, + + /* U+F01C "" */ + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xdd, 0xdf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xfc, 0x0, 0x5, 0xff, 0xff, 0xf6, + 0xff, 0xcc, 0xc4, 0x0, 0x0, 0xbc, 0xce, 0xf6, + 0xcf, 0x40, 0x0, 0x0, 0x0, 0x0, 0xd, 0xf3, + 0x6f, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xd0, + 0xe, 0xf2, 0x0, 0x0, 0x0, 0x0, 0xbf, 0x60, + 0x8, 0xf8, 0x0, 0x0, 0x0, 0x2, 0xfe, 0x0, + 0x2, 0xfe, 0x11, 0x11, 0x11, 0x19, 0xf8, 0x0, + 0x0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x0, + 0x0, 0x2d, 0xdd, 0xdd, 0xdd, 0xdd, 0x80, 0x0, + + /* U+F021 "" */ + 0x0, 0x0, 0x0, 0x24, 0x31, 0x0, 0x0, 0x0, + 0x72, 0x1, 0x8e, 0xff, 0xff, 0xb4, 0x0, 0x0, + 0xfe, 0x6e, 0xff, 0xff, 0xff, 0xff, 0x80, 0x0, + 0xff, 0xff, 0xfd, 0x74, 0x6a, 0xff, 0xf8, 0x0, + 0xff, 0xff, 0x80, 0x0, 0x0, 0x2d, 0xff, 0x40, + 0xff, 0xff, 0xe2, 0x0, 0x0, 0x2, 0xff, 0xb0, + 0xff, 0xff, 0xfa, 0x0, 0x0, 0x0, 0x8f, 0xf1, + 0x12, 0x22, 0x20, 0x0, 0x0, 0x0, 0x2, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x34, 0x20, 0x0, 0x0, 0x0, 0x44, 0x44, 0x40, + 0xaf, 0xf1, 0x0, 0x0, 0x3, 0xff, 0xff, 0xf6, + 0x5f, 0xfa, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xf6, + 0xc, 0xff, 0x90, 0x0, 0x0, 0x4f, 0xff, 0xf6, + 0x2, 0xef, 0xfe, 0x97, 0x8c, 0xff, 0xff, 0xf6, + 0x0, 0x2d, 0xff, 0xff, 0xff, 0xff, 0x67, 0xf6, + 0x0, 0x0, 0x6c, 0xff, 0xfe, 0x92, 0x0, 0x51, + 0x0, 0x0, 0x0, 0x1, 0x10, 0x0, 0x0, 0x0, + + /* U+F026 "" */ + 0x0, 0x0, 0x0, 0x55, 0x0, 0x0, 0x5, 0xfb, + 0x0, 0x0, 0x5f, 0xfb, 0x12, 0x26, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, + 0xef, 0xff, 0xff, 0xfb, 0x0, 0x3, 0xff, 0xfb, + 0x0, 0x0, 0x3f, 0xfb, 0x0, 0x0, 0x4, 0xfb, + 0x0, 0x0, 0x0, 0x34, + + /* U+F027 "" */ + 0x0, 0x0, 0x0, 0x55, 0x0, 0x0, 0x0, 0x0, + 0x5, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x5f, 0xfb, + 0x0, 0x0, 0x12, 0x26, 0xff, 0xfb, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xfb, 0xb, 0x90, 0xff, 0xff, + 0xff, 0xfb, 0x3, 0xf5, 0xff, 0xff, 0xff, 0xfb, + 0x0, 0xc8, 0xff, 0xff, 0xff, 0xfb, 0x5, 0xf4, + 0xef, 0xff, 0xff, 0xfb, 0x9, 0x70, 0x0, 0x3, + 0xff, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xfb, + 0x0, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x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0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xe7, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, + 0xff, 0xfe, 0x50, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xc3, 0x0, 0xf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x20, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0xf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xa2, 0x0, 0xf, 0xff, 0xff, 0xff, 0xfb, 0x30, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xd5, 0x0, 0x0, + 0x0, 0xf, 0xff, 0xfe, 0x60, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xf, 0xa1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F04C "" */ + 0x24, 0x44, 0x44, 0x0, 0x2, 0x44, 0x44, 0x40, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0x50, 0xf, 0xff, 0xff, 0xf5, + 0x12, 0x22, 0x22, 0x0, 0x1, 0x22, 0x22, 0x20, + + /* U+F04D "" */ + 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, + + /* U+F051 "" */ + 0x10, 0x0, 0x0, 0x0, 0x33, 0xe, 0x20, 0x0, + 0x0, 0x4f, 0xf4, 0xfe, 0x30, 0x0, 0x4, 0xff, + 0x4f, 0xfe, 0x30, 0x0, 0x4f, 0xf4, 0xff, 0xfe, + 0x30, 0x4, 0xff, 0x4f, 0xff, 0xfe, 0x30, 0x4f, + 0xf4, 0xff, 0xff, 0xfe, 0x24, 0xff, 0x4f, 0xff, + 0xff, 0xfe, 0x7f, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x4f, 0xff, 0xff, 0xfd, 0x6f, 0xf4, 0xff, + 0xff, 0xfd, 0x14, 0xff, 0x4f, 0xff, 0xfd, 0x10, + 0x4f, 0xf4, 0xff, 0xfd, 0x10, 0x4, 0xff, 0x4f, + 0xfd, 0x10, 0x0, 0x4f, 0xf4, 0xfd, 0x10, 0x0, + 0x4, 0xff, 0x4d, 0x10, 0x0, 0x0, 0x3f, 0xf3, + 0x0, 0x0, 0x0, 0x0, 0x11, 0x0, + + /* U+F052 "" */ + 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd4, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xad, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd3, + 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, + 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x0, + 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, + 0x0, 0x1, 0xdf, 0xff, 0xff, 0xf6, 0x0, 0x0, + 0x0, 0x0, 0x1d, 0xff, 0xff, 0x60, 0x0, 0x0, + 0x0, 0x0, 0x1, 0xdf, 0xf6, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1c, 0x60, 0x0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0, 0xaf, 0x30, 0x0, 0x0, 0x0, + 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, + + /* U+F067 "" */ + 0x0, 0x0, 0xa, 0xff, 0xc0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xdf, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xd, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xdf, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xd, 0xff, 0xf0, 0x0, 0x0, 0xa, 0xdd, 0xdd, + 0xff, 0xff, 0xdd, 0xdd, 0xb0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf2, 0xcf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0, 0xdf, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xbf, 0xfe, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, + 0x0, + + /* U+F068 "" */ + 0xad, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdb, 0xf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, + + /* U+F071 "" */ + 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x41, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0x5f, 0xff, 0xff, 0xf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, + 0xff, 0xf7, 0x0, 0x0, 0x0, 0xdf, 0xb0, 0x0, + 0x1e, 0xff, 0xff, 0xb0, 0x0, 0x0, 0x0, 0xdf, + 0xb0, 0x0, 0x3, 0xff, 0xfd, 0x3, 0xff, 0xff, + 0xff, 0xff, 0xb0, 0x0, 0x0, 0x5f, 0xe2, 0x2e, + 0xff, 0xff, 0xff, 0xff, 0xb0, 0x0, 0x0, 0x5, + 0x30, 0x49, 0x99, 0x99, 0x99, 0x99, 0x60, 0x0, + + /* U+F07B "" */ + 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, + 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, + 0xff, 0xe9, 0x99, 0x99, 0x98, 0x40, 0xdf, 0xff, + 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x4, 0xef, + 0xff, 0xfd, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x22, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F093 "" */ + 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0xe, 0xff, 0xff, 0xff, 0xff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 0x6a, 0xc0, 0xcf, 0xff, 0x10, 0x0, 0x8, + 0xff, 0xf6, 0x0, 0x0, 0x4f, 0xff, 0xc0, 0x0, + 0x0, 0xff, 0xff, 0x10, 0x0, 0x1, 0x22, 0x20, + 0x0, + + /* U+F0F3 "" */ + 0x0, 0x0, 0x0, 0x1, 0x77, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x1d, 0xaf, 0xe1, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x7a, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd1, 0x2e, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe2, 0x3, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x0, 0x8f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, + 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x0, + 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, + 0x0, 0x0, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x70, 0x0, 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x40, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x30, 0x0, 0x0, 0x2, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x20, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x9f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0xd, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, + 0x0, 0x0, 0x1, 0x9e, 0xff, 0xe9, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xee, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x0,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x6e, 0xff, 0xff, 0xff, + 0xff, 0xf5, 0x0, 0x0, 0x6, 0xef, 0xff, 0xff, + 0xff, 0xd0, 0x0, 0x0, 0x0, 0x6e, 0xff, 0xff, + 0xff, 0x50, 0x0, 0x0, 0x0, 0x6, 0xef, 0xff, + 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6e, 0xff, + 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xef, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c, + 0x0, + + /* U+F15B "" */ + 0x69, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x81, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0x8b, 0xbb, 0x80, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbf, 0xfd, 0x10, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbf, 0xd1, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbd, 0x10, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0x81, 0x0, 0x0, + 0x36, 0x66, 0x66, 0x66, 0x60, 0x0, 0x0, 0x0, + + /* U+F1EB "" */ + 0x0, 0x0, 0x0, 0x0, 0x4, 0xa0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, + 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x6, 0x83, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4, 0xea, 0x43, 0x6d, 0xb0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, + 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x2, 0x13, + 0xcf, 0xff, 0xff, 0x80, 0x30, 0x0, 0x0, 0x0, + 0x3, 0xfe, 0x50, 0x25, 0x64, 0x1, 0xaf, 0xb0, + 0x0, 0x0, 0x0, 0x9f, 0xff, 0xe8, 0x64, 0x6a, + 0xff, 0xff, 0x30, 0x0, 0x3, 0x70, 0x7f, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0x21, 0x80, 0x3, 0xff, + 0xb1, 0x18, 0xdf, 0xff, 0xff, 0xb5, 0x5, 0xef, + 0xb0, 0x3e, 0xff, 0xf8, 0x10, 0x13, 0x42, 0x0, + 0x4b, 0xff, 0xfa, 0x0, 0x1c, 0xff, 0xff, 0xc9, + 0x77, 0x8a, 0xef, 0xff, 0xf7, 0x0, 0x0, 0x5, + 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x0, + 0x0, 0x0, 0x0, 0x48, 0xdf, 0xff, 0xfe, 0xb6, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F240 "" */ + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, + 0xf4, 0x26, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x61, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x6f, 0x80, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x2, 0xf2, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x2, 0xf2, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x2, 0xf2, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x4b, 0xf1, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x6f, 0x60, + 0xf4, 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x41, 0x6d, 0x0, 0xf9, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xbc, 0x0, + 0x5d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xc3, 0x0, + + /* U+F241 "" */ + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, + 0xf4, 0x26, 0x66, 0x66, 0x66, 0x66, 0x66, 0x62, + 0x0, 0x0, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x6f, 0x80, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0x0, 0x0, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x2, 0xf2, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0x0, 0x0, 0x2, 0xf2, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x2, 0xf2, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0x0, 0x0, 0x4b, 0xf1, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x6f, 0x60, + 0xf4, 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x41, + 0x0, 0x0, 0x6d, 0x0, 0xf9, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xbc, 0x0, + 0x5d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xc3, 0x0, + + /* U+F242 "" */ + 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, + 0xf4, 0x26, 0x66, 0x66, 0x66, 0x63, 0x0, 0x0, + 0x0, 0x0, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x6f, 0x80, + 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, + 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x2, 0xf2, + 0xf4, 0x6f, 0xff, 0x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66, 0x66, 0x66, 0x66, 0x66, 0xbc, 0x0, + 0x5d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xc3, 0x0, + + /* U+F293 "" */ + 0x0, 0x0, 0x46, 0x87, 0x51, 0x0, 0x0, 0x0, + 0x4e, 0xff, 0xff, 0xff, 0x90, 0x0, 0x4, 0xff, + 0xff, 0x4e, 0xff, 0xfa, 0x0, 0xd, 0xff, 0xff, + 0x22, 0xef, 0xff, 0x40, 0x4f, 0xff, 0xff, 0x20, + 0x2e, 0xff, 0xb0, 0x8f, 0xf8, 0xff, 0x27, 0x22, + 0xef, 0xf0, 0xbf, 0xe1, 0x3f, 0x28, 0xa0, 0x7f, + 0xf2, 0xdf, 0xfd, 0x13, 0x15, 0x5, 0xff, 0xf4, + 0xef, 0xff, 0xd1, 0x0, 0x5f, 0xff, 0xf5, 0xef, + 0xff, 0xf9, 0x1, 0xff, 0xff, 0xf5, 0xef, 0xff, + 0xc0, 0x0, 0x3f, 0xff, 0xf5, 0xdf, 0xfb, 0x5, + 0x16, 0x13, 0xff, 0xf4, 0xbf, 0xd0, 0x5f, 0x28, + 0xb0, 0x7f, 0xf1, 0x7f, 0xfa, 0xff, 0x26, 0x14, + 0xff, 0xe0, 0x3f, 0xff, 0xff, 0x20, 0x4f, 0xff, + 0xa0, 0xc, 0xff, 0xff, 0x24, 0xff, 0xff, 0x30, + 0x2, 0xff, 0xff, 0x6f, 0xff, 0xf8, 0x0, 0x0, + 0x2c, 0xff, 0xff, 0xfe, 0x70, 0x0, 0x0, 0x0, + 0x24, 0x65, 0x30, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 71, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 74, .box_h = 14, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 21, .adv_w = 92, .box_h = 5, .box_w = 4, .ofs_x = 1, .ofs_y = 9}, + {.bitmap_index = 31, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 103, .adv_w = 162, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 188, .adv_w = 211, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 279, .adv_w = 179, .box_h = 14, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 363, .adv_w = 50, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 371, .adv_w = 98, .box_h = 20, .box_w = 5, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 421, .adv_w = 100, .box_h = 20, .box_w = 5, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 471, .adv_w = 124, .box_h = 8, .box_w = 8, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 503, .adv_w = 163, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 553, .adv_w = 57, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 561, .adv_w = 79, .box_h = 3, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 569, .adv_w = 76, .box_h = 3, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 574, .adv_w = 119, .box_h = 15, .box_w = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 627, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 690, .adv_w = 162, .box_h = 13, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 729, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 794, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 857, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 922, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 985, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1048, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1113, .adv_w = 162, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1183, .adv_w = 162, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1242, .adv_w = 70, .box_h = 11, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1259, .adv_w = 61, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1285, .adv_w = 146, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1321, .adv_w = 158, .box_h = 6, .box_w = 8, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 1345, .adv_w = 150, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 1381, .adv_w = 136, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1437, .adv_w = 259, .box_h = 17, .box_w = 15, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 1565, .adv_w = 188, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1643, .adv_w = 179, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1708, .adv_w = 187, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1778, .adv_w = 189, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1843, .adv_w = 164, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1902, .adv_w = 159, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1961, .adv_w = 196, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2031, .adv_w = 205, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2103, .adv_w = 78, .box_h = 13, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2123, .adv_w = 159, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2186, .adv_w = 181, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2258, .adv_w = 155, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2317, .adv_w = 251, .box_h = 13, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2408, .adv_w = 205, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2480, .adv_w = 198, .box_h = 14, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2557, .adv_w = 182, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2622, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2718, .adv_w = 177, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2783, .adv_w = 171, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2853, .adv_w = 172, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2925, .adv_w = 187, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2995, .adv_w = 183, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3073, .adv_w = 256, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3177, .adv_w = 181, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3249, .adv_w = 173, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3321, .adv_w = 172, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3393, .adv_w = 76, .box_h = 18, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 3429, .adv_w = 118, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3489, .adv_w = 76, .box_h = 18, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 3525, .adv_w = 120, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 6}, + {.bitmap_index = 3550, .adv_w = 130, .box_h = 2, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 3559, .adv_w = 89, .box_h = 4, .box_w = 5, .ofs_x = 0, .ofs_y = 10}, + {.bitmap_index = 3569, .adv_w = 157, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3619, .adv_w = 162, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3687, .adv_w = 151, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3737, .adv_w = 162, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3805, .adv_w = 153, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3855, .adv_w = 100, .box_h = 14, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3904, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3967, .adv_w = 159, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4023, .adv_w = 70, .box_h = 13, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4043, .adv_w = 69, .box_h = 17, .box_w = 5, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 4086, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4149, .adv_w = 70, .box_h = 14, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4163, .adv_w = 252, .box_h = 10, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4233, .adv_w = 159, .box_h = 10, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4273, .adv_w = 164, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4328, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 4391, .adv_w = 164, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 4454, .adv_w = 97, .box_h = 10, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4479, .adv_w = 149, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4529, .adv_w = 94, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4568, .adv_w = 159, .box_h = 11, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4612, .adv_w = 140, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4657, .adv_w = 216, .box_h = 10, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4727, .adv_w = 143, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4772, .adv_w = 136, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 4835, .adv_w = 143, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4880, .adv_w = 97, .box_h = 18, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 4934, .adv_w = 70, .box_h = 16, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 4950, .adv_w = 97, .box_h = 18, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5004, .adv_w = 196, .box_h = 5, .box_w = 11, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 5032, .adv_w = 247, .box_h = 18, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 5176, .adv_w = 309, .box_h = 18, .box_w = 20, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 5356, .adv_w = 288, .box_h = 15, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5491, .adv_w = 288, .box_h = 13, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5595, .adv_w = 226, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5680, .adv_w = 247, .box_h = 18, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5824, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5960, .adv_w = 226, .box_h = 17, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6088, .adv_w = 267, .box_h = 13, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6199, .adv_w = 267, .box_h = 16, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6335, .adv_w = 247, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6439, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6575, .adv_w = 123, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6627, .adv_w = 185, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6705, .adv_w = 267, .box_h = 15, .box_w = 17, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6833, .adv_w = 309, .box_h = 17, .box_w = 20, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7003, .adv_w = 247, .box_h = 16, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7131, .adv_w = 165, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7225, .adv_w = 226, .box_h = 17, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7353, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7489, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7625, .adv_w = 165, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7719, .adv_w = 247, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7823, .adv_w = 206, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 7917, .adv_w = 206, .box_h = 17, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8019, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8132, .adv_w = 226, .box_h = 4, .box_w = 15, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 8162, .adv_w = 288, .box_h = 18, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8324, .adv_w = 288, .box_h = 17, .box_w = 18, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8477, .adv_w = 288, .box_h = 11, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8576, .adv_w = 288, .box_h = 12, .box_w = 18, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 8684, .adv_w = 309, .box_h = 12, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8804, .adv_w = 267, .box_h = 15, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8932, .adv_w = 267, .box_h = 17, .box_w = 17, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 9077, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9190, .adv_w = 288, .box_h = 15, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 9325, .adv_w = 288, .box_h = 19, .box_w = 18, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 9496, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 9632, .adv_w = 144, .box_h = 18, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 9713, .adv_w = 288, .box_h = 19, .box_w = 18, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 9884, .adv_w = 309, .box_h = 12, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10004, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10117, .adv_w = 247, .box_h = 19, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 10269, .adv_w = 329, .box_h = 15, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10427, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10583, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10739, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10895, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11051, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11207, .adv_w = 247, .box_h = 19, .box_w = 14, .ofs_x = 1, .ofs_y = -3} +}; + + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1[] = { + 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, + 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, + 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, + 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, + 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, + 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, + 0x243, 0x292 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL + }, + { + .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL + } +}; + + +/*----------------- + * KERNING + *----------------*/ + + +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 1, 53, + 3, 3, + 3, 8, + 3, 34, + 3, 66, + 3, 68, + 3, 69, + 3, 70, + 3, 72, + 3, 78, + 3, 79, + 3, 80, + 3, 81, + 3, 82, + 3, 84, + 3, 88, + 8, 3, + 8, 8, + 8, 34, + 8, 66, + 8, 68, + 8, 69, + 8, 70, + 8, 72, + 8, 78, + 8, 79, + 8, 80, + 8, 81, + 8, 82, + 8, 84, + 8, 88, + 9, 55, + 9, 56, + 9, 58, + 13, 3, + 13, 8, + 15, 3, + 15, 8, + 16, 16, + 34, 3, + 34, 8, + 34, 32, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 80, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 90, + 34, 91, + 35, 53, + 35, 55, + 35, 58, + 36, 10, + 36, 53, + 36, 62, + 36, 94, + 37, 13, + 37, 15, + 37, 34, + 37, 53, + 37, 55, + 37, 57, + 37, 58, + 37, 59, + 38, 53, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 80, + 38, 82, + 38, 86, + 38, 87, + 38, 88, + 38, 90, + 39, 13, + 39, 15, + 39, 34, + 39, 43, + 39, 53, + 39, 66, + 39, 68, + 39, 69, + 39, 70, + 39, 72, + 39, 80, + 39, 82, + 39, 83, + 39, 86, + 39, 87, + 39, 90, + 41, 34, + 41, 53, + 41, 57, + 41, 58, + 42, 34, + 42, 53, + 42, 57, + 42, 58, + 43, 34, + 44, 14, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 68, + 44, 69, + 44, 70, + 44, 72, + 44, 78, + 44, 79, + 44, 80, + 44, 81, + 44, 82, + 44, 86, + 44, 87, + 44, 88, + 44, 90, + 45, 3, + 45, 8, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 86, + 45, 87, + 45, 88, + 45, 90, + 46, 34, + 46, 53, + 46, 57, + 46, 58, + 47, 34, + 47, 53, + 47, 57, + 47, 58, + 48, 13, + 48, 15, + 48, 34, + 48, 53, + 48, 55, + 48, 57, + 48, 58, + 48, 59, + 49, 13, + 49, 15, + 49, 34, + 49, 43, + 49, 57, + 49, 59, + 49, 66, + 49, 68, + 49, 69, + 49, 70, + 49, 72, + 49, 80, + 49, 82, + 49, 85, + 49, 87, + 49, 90, + 50, 53, + 50, 55, + 50, 56, + 50, 58, + 51, 53, + 51, 55, + 51, 58, + 53, 1, + 53, 13, + 53, 14, + 53, 15, + 53, 34, + 53, 36, + 53, 40, + 53, 43, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 58, + 53, 66, + 53, 68, + 53, 69, + 53, 70, + 53, 72, + 53, 78, + 53, 79, + 53, 80, + 53, 81, + 53, 82, + 53, 83, + 53, 84, + 53, 86, + 53, 87, + 53, 88, + 53, 89, + 53, 90, + 53, 91, + 54, 34, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 68, + 55, 69, + 55, 70, + 55, 72, + 55, 80, + 55, 82, + 55, 83, + 55, 86, + 55, 87, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 34, + 56, 53, + 56, 62, + 56, 66, + 56, 68, + 56, 69, + 56, 70, + 56, 72, + 56, 80, + 56, 82, + 56, 83, + 56, 86, + 56, 94, + 57, 14, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 55, + 57, 68, + 57, 69, + 57, 70, + 57, 72, + 57, 80, + 57, 82, + 57, 86, + 57, 87, + 57, 90, + 58, 7, + 58, 10, + 58, 11, + 58, 13, + 58, 14, + 58, 15, + 58, 34, + 58, 36, + 58, 40, + 58, 43, + 58, 48, + 58, 50, + 58, 52, + 58, 53, + 58, 54, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 68, + 58, 69, + 58, 70, + 58, 71, + 58, 72, + 58, 78, + 58, 79, + 58, 80, + 58, 81, + 58, 82, + 58, 83, + 58, 84, + 58, 85, + 58, 86, + 58, 87, + 58, 89, + 58, 90, + 58, 91, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 68, + 59, 69, + 59, 70, + 59, 72, + 59, 80, + 59, 82, + 59, 86, + 59, 87, + 59, 88, + 59, 90, + 60, 43, + 60, 54, + 66, 3, + 66, 8, + 66, 87, + 66, 90, + 67, 3, + 67, 8, + 67, 87, + 67, 89, + 67, 90, + 67, 91, + 68, 3, + 68, 8, + 70, 3, + 70, 8, + 70, 87, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 68, + 71, 69, + 71, 70, + 71, 72, + 71, 82, + 71, 94, + 73, 3, + 73, 8, + 76, 68, + 76, 69, + 76, 70, + 76, 72, + 76, 82, + 78, 3, + 78, 8, + 79, 3, + 79, 8, + 80, 3, + 80, 8, + 80, 87, + 80, 89, + 80, 90, + 80, 91, + 81, 3, + 81, 8, + 81, 87, + 81, 89, + 81, 90, + 81, 91, + 83, 3, + 83, 8, + 83, 13, + 83, 15, + 83, 66, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 72, + 83, 80, + 83, 82, + 83, 85, + 83, 87, + 83, 88, + 83, 90, + 85, 80, + 87, 3, + 87, 8, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 71, + 87, 72, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 89, 68, + 89, 69, + 89, 70, + 89, 72, + 89, 80, + 89, 82, + 90, 3, + 90, 8, + 90, 13, + 90, 15, + 90, 66, + 90, 68, + 90, 69, + 90, 70, + 90, 71, + 90, 72, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 72, + 91, 80, + 91, 82, + 92, 43, + 92, 54 +}; + +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = +{ + -6, -15, -15, -17, -7, -8, -8, -8, + -8, -3, -3, -9, -3, -8, -11, 2, + -15, -15, -17, -7, -8, -8, -8, -8, + -3, -3, -9, -3, -8, -11, 2, 3, + 3, 3, -24, -24, -24, -24, -31, -17, + -17, -9, -2, -2, -2, -2, -18, -2, + -12, -10, -13, -2, -2, -2, -7, -5, + -7, 2, -4, -3, -8, -4, -4, -2, + -2, -14, -14, -3, -4, -3, -3, -6, + -3, 3, -3, -3, -3, -3, -3, -3, + -3, -2, -4, -3, -4, -33, -33, -24, + -37, 3, -5, -3, -3, -3, -3, -3, + -3, -4, -3, -3, -3, 3, -4, 2, + -4, 3, -4, 2, -4, -3, -9, -4, + -4, -4, -4, -4, -4, -4, -4, -3, + -3, -4, -3, -4, -3, -6, -9, -6, + -47, -47, 3, -9, -9, -9, -9, -39, + -8, -25, -20, -34, -6, -19, -13, -19, + 3, -4, 2, -4, 3, -4, 2, -4, + -14, -14, -3, -4, -3, -3, -6, -3, + -46, -46, -19, -28, -4, -4, -2, -2, + -2, -2, -2, -2, -2, 2, 2, 2, + -6, -4, -3, -5, -11, -3, -7, -6, + -31, -33, -31, -11, -4, -4, -34, -4, + -4, -2, 2, 2, 2, 2, -16, -14, + -14, -14, -14, -15, -15, -14, -15, -14, + -11, -16, -13, -10, -8, -11, -10, -8, + -3, 3, -32, -5, -32, -11, -2, -2, + -2, -2, 2, -6, -6, -6, -6, -6, + -6, -6, -4, -4, -2, -2, 3, 2, + -17, -8, -17, -6, 2, 2, -5, -4, + -4, -4, -4, -4, -4, -3, -3, 2, + -6, -4, -4, -4, -4, 2, -4, -4, + -4, -4, -3, -4, -3, -4, -4, -4, + 3, -7, -30, -7, -30, -13, -4, -4, + -13, -4, -4, -2, 2, -13, 3, 2, + 2, 3, 3, -10, -9, -9, -9, -3, + -9, -6, -6, -9, -6, -9, -6, -8, + -3, -5, -3, -3, -3, -4, 3, 2, + -4, -4, -4, -4, -3, -3, -3, -3, + -3, -3, -3, -4, -4, -4, -3, -3, + -9, -9, -2, -2, -4, -4, -2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, + 2, 2, 3, 3, -3, -3, -3, -3, + -3, 3, -15, -15, -3, -3, -3, -3, + -3, -15, -15, -15, -15, -19, -19, -2, + -3, -2, -2, -4, -4, -2, -2, -2, + -2, 2, 2, -17, -17, -6, -3, -3, + -3, 2, -3, -3, -3, 7, 3, 2, + 3, -3, 2, 2, -15, -15, -2, -2, + -2, -2, 2, -2, -2, -2, -17, -17, + -3, -3, -3, -3, -3, -3, 2, 2, + -15, -15, -2, -2, -2, -2, 2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, + -3, -3 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = +{ + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 434, + .glyph_ids_size = 0 +}; + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 2, + .bpp = 4, + + .kern_scale = 16, + //.kern_dsc = &kern_classes, + //.kern_classes = 1, + .kern_dsc = &kern_pairs, + .kern_classes = 0, +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_roboto_18 = { + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .line_height = 21, /*The maximum line height required by the font*/ + .base_line = 4, /*Baseline measured from the bottom of the line*/ +}; diff --git a/src/lv_fonts/lvgl_sample.c b/src/lv_fonts/lvgl_sample.c deleted file mode 100644 index 5805daa75e60..000000000000 --- a/src/lv_fonts/lvgl_sample.c +++ /dev/null @@ -1,3814 +0,0 @@ -#include "lvgl/lvgl.h" - -/******************************************************************************* - * Size: 40 px - * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 40 --font ./Roboto-Regular.ttf -r 0x20-0x7f --format lvgl -o ./lvgl_sample.c - ******************************************************************************/ - -/*----------------- - * BITMAPS - *----------------*/ - -/*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { - /* U+20 " " */ - - /* U+21 "!" */ - 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, - 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xaa, - 0xa1, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, - 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, - 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, - 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0xaf, - 0xff, 0x3a, 0xff, 0xf3, 0xaf, 0xff, 0x3a, 0xff, - 0xf3, 0xaf, 0xff, 0x3a, 0xff, 0xf3, 0x47, 0x77, - 0x10, - - /* U+22 "\"" */ - 0x6b, 0x50, 0x0, 0x5b, 0x60, 0x8, 0xfd, 0x0, - 0x8, 0xfe, 0x0, 0x8f, 0xf4, 0x0, 0x8f, 0xf4, - 0x8, 0xff, 0xa0, 0x8, 0xff, 0xa0, 0x8f, 0xff, - 0x10, 0x8f, 0xff, 0x18, 0xff, 0xf5, 0x8, 0xff, - 0xf5, 0x8f, 0xff, 0x50, 0x8f, 0xff, 0x58, 0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40, 0x2, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x40, 0x0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x77, 0x77, - 0x77, 0x77, 0x77, 0x77, 0x77, 0x20, - - /* U+36 "6" */ - 0x0, 0x0, 0x0, 0x1, 0x45, 0x54, 0x10, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x3b, 0xff, 0xff, 0xff, - 0xc4, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, - 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x8f, 0xff, - 0xfd, 0xaa, 0xdf, 0xff, 0xf9, 0x0, 0x0, 0x5f, - 0xff, 0xf5, 0x0, 0x0, 0x5f, 0xff, 0xf5, 0x0, - 0xe, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x5f, 0xff, - 0xd0, 0x6, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, - 0xcf, 0xff, 0x30, 0xbf, 0xff, 0x20, 0x0, 0x0, - 0x0, 0x6, 0xff, 0xf7, 0xf, 0xff, 0xd0, 0x0, - 0x0, 0x0, 0x0, 0x3f, 0xff, 0xa2, 0xff, 0xfa, - 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, 0xfb, 0x3f, - 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, - 0xc4, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x2, - 0xff, 0xfa, 0x5f, 0xff, 0x80, 0x0, 0x0, 0x0, - 0x0, 0x6f, 0xff, 0x85, 0xff, 0xfa, 0x0, 0x0, - 0x0, 0x0, 0xc, 0xff, 0xf4, 0x5f, 0xff, 0xf5, - 0x0, 0x0, 0x0, 0x6, 0xff, 0xfe, 0x5, 0xff, - 0xff, 0xf9, 0x20, 0x0, 0x18, 0xff, 0xff, 0x60, - 0x5f, 0xff, 0xdf, 0xff, 0xec, 0xdf, 0xff, 0xff, - 0xb0, 0x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- 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x7, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, - 0x77, 0x75, - - /* U+38 "8" */ - 0x0, 0x0, 0x0, 0x14, 0x56, 0x53, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x6, 0xcf, 0xff, 0xff, 0xff, - 0xa3, 0x0, 0x0, 0x0, 0x2c, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf9, 0x0, 0x0, 0x2e, 0xff, 0xff, - 0xea, 0x9b, 0xff, 0xff, 0xfa, 0x0, 0xd, 0xff, - 0xfe, 0x40, 0x0, 0x0, 0x8f, 0xff, 0xf6, 0x6, - 0xff, 0xfe, 0x10, 0x0, 0x0, 0x0, 0x7f, 0xff, - 0xe0, 0xbf, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, - 0xdf, 0xff, 0x3e, 0xff, 0xf0, 0x0, 0x0, 0x0, - 0x0, 0x7, 0xff, 0xf6, 0xff, 0xfe, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x5f, 0xff, 0x7f, 0xff, 0xe0, - 0x0, 0x0, 0x0, 0x0, 0x5, 0xff, 0xf7, 0xcf, - 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, - 0x46, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0xe, - 0xff, 0xe0, 0xd, 0xff, 0xf4, 0x0, 0x0, 0x0, - 0xa, 0xff, 0xf6, 0x0, 0x2e, 0xff, 0xf8, 0x10, - 0x0, 0x3b, 0xff, 0xf9, 0x0, 0x0, 0x2c, 0xff, - 0xff, 0xdc, 0xef, 0xff, 0xf7, 0x0, 0x0, 0x0, - 0x5, 0xef, 0xff, 0xff, 0xff, 0xb2, 0x0, 0x0, - 0x0, 0x3, 0xcf, 0xff, 0xff, 0xff, 0xff, 0x80, - 0x0, 0x0, 0x4,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, 0x0, 0x7f, 0xff, 0xf7, - 0xc, 0xff, 0xfa, 0xaa, 0xaa, 0xaa, 0xac, 0xff, - 0xff, 0xf8, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xc4, 0x0, 0xc, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x0, 0x0, - 0xcf, 0xff, 0x55, 0x55, 0x55, 0x57, 0xcf, 0xff, - 0xc1, 0x0, 0xc, 0xff, 0xf0, 0x0, 0x0, 0x0, - 0x0, 0x5f, 0xff, 0xc0, 0x0, 0xcf, 0xff, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, 0xc, - 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, - 0xfc, 0x0, 0xcf, 0xff, 0x0, 0x0, 0x0, 0x0, - 0x0, 0xe, 0xff, 0xe0, 0xc, 0xff, 0xf0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0x0, 0xcf, - 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, - 0xc0, 0xc, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, - 0xa, 0xff, 0xf8, 0x0, 0xcf, 0xff, 0x0, 0x0, - 0x0, 0x0, 0x1a, 0xff, 0xff, 0x20, 0xc, 0xff, - 0xf9, 0x99, 0x99, 0x9a, 0xcf, 0xff, 0xff, 0x60, - 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x60, 0x0, 0xc, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xe8, 0x10, 0x0, 0x0, 0x67, 0x77, - 0x77, 0x77, 0x76, 0x64, 0x20, 0x0, 0x0, 0x0, - 0x0, - - /* U+43 "C" */ - 0x0, 0x0, 0x0, 0x0, 0x13, 0x56, 0x43, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5c, 0xff, - 0xff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0xff, 0xff, - 0xff, 0xf0, 0x57, 0x77, 0x77, 0x77, 0x77, 0x77, - 0x77, 0x77, 0x77, 0x0, - - /* U+47 "G" */ - 0x0, 0x0, 0x0, 0x0, 0x3, 0x46, 0x65, 0x30, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0xef, - 0xff, 0xff, 0xff, 0xc6, 0x0, 0x0, 0x0, 0x0, - 0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, - 0x0, 0x0, 0x2, 0xdf, 0xff, 0xfe, 0xb9, 0xab, - 0xef, 0xff, 0xff, 0x80, 0x0, 0x1d, 0xff, 0xfe, - 0x50, 0x0, 0x0, 0x3, 0xaf, 0xff, 0xf7, 0x0, - 0xbf, 0xff, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x6, - 0xff, 0xfc, 0x4, 0xff, 0xfe, 0x10, 0x0, 0x0, - 0x0, 0x0, 0x1, 0xff, 0xfc, 0xc, 0xff, 0xf5, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, 0xfc, - 0x1f, 0xff, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x1, 0xff, 0xfc, 0x5f, 0xff, 0x90, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x1, 0xff, 0xfc, 0x7f, 0xff, - 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xff, - 0xfc, 0x9f, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x1, 0xff, 0xfc, 0xaf, 0xff, 0x30, 0x0, - 0x0, 0x6, 0xcc, 0xcc, 0xcd, 0xff, 0xfc, 0xaf, - 0xff, 0x30, 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0xaf, 0xff, 0x30, 0x0, 0x0, 0x8, - 0xff, 0xff, 0xff, 0xff, 0xfc, 0xaf, 0xff, 0x30, - 0x0, 0x0, 0x1, 0x33, 0x33, 0x33, 0x33, 0x32,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ff, 0xfd, 0xbf, - 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, - 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0xff, 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xff, 0xfd, 0xbf, 0xff, - 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, - 0xfd, 0xbf, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0xff, 0xfd, 0x47, 0x77, 0x10, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x77, 0x75, - - /* U+49 "I" */ - 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, - 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, - 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, - 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, - 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, - 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, - 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x4f, - 0xff, 0x94, 0xff, 0xf9, 0x4f, 0xff, 0x94, 0xff, - 0xf9, 0x4f, 0xff, 0x94, 0xff, 0xf9, 0x17, 0x77, - 0x40, - - /* U+4A "J" */ - 0x0, 0x0, 0x0, 0x24, 0x55, 0x41, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x7d, 0xff, 0xff, 0xff, 0xc5, - 0x0, 0x0, 0x0, 0x2d, 0xff, 0xff, 0xff, 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, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff, 0xfb, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0xdf, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xe1, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, - 0xff, 0xfb, 0x0, 0x8, 0x99, 0x99, 0x99, 0x99, - 0x99, 0x99, 0x99, 0xff, 0xff, 0x50, 0xe, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x70, 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x70, 0x6, 0x77, 0x77, 0x77, - 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x30, - - /* U+5B "[" */ - 0x1, 0x11, 0x11, 0x11, 0x3, 0xff, 0xff, 0xff, - 0xf5, 0x3f, 0xff, 0xff, 0xff, 0x53, 0xff, 0xff, - 0xff, 0xf4, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, - 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, - 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, - 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, 0xa0, - 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, 0xff, - 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, 0x3f, - 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, - 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, 0x0, - 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, 0xfa, - 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x3, 0xff, - 0xfa, 0x0, 0x0, 0x3f,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 0xff, 0x70, 0x0, 0x0, 0x6, 0xff, 0xf5, - 0xff, 0xf1, 0x0, 0x0, 0x0, 0xf, 0xff, 0xcf, - 0xfa, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xff, 0xff, - 0x40, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0xd0, - 0x0, 0x0, 0x0, 0x0, 0xc, 0xff, 0xf7, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x5f, 0xff, 0x10, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x77, 0x50, 0x0, 0x0, - 0x0, - - /* U+5F "_" */ - 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf1, 0xef, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x10, - - /* U+60 "`" */ - 0x0, 0x0, 0x6, 0x88, 0x30, 0x0, 0x8, 0xff, - 0xd0, 0x0, 0x7, 0xff, 0xf3, 0x0, 0x6, 0xff, - 0xf9, 0x0, 0x6, 0xff, 0xfd, 0x0, 0x2, 0xaa, - 0xaa, 0x30, 0x0, - - /* U+61 "a" */ - 0x0, 0x0, 0x15, 0x65, 0x20, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x4c, 0xff, 0xff, 0xfd, 0x60, 0x4, - 0xff, 0xfa, 0x5, 0xff, 0xff, 0xff, 0xff, 0xfa, - 0x7, 0xff, 0xf7, 0x2f, 0xff, 0xff, 0xed, 0xff, - 0xff, 0xb9, 0xff, 0xf4, 0x8f, 0xff, 0xd3, 0x0, - 0x2, 0x9f, 0xff, 0xff, 0xf3, 0xcf, 0xff, 0x30, - 0x0, 0x0, 0x3, 0xef, 0xff, 0xf3, 0xef, 0xff, - 0x0, 0x0, 0x0, 0x0, 0x2f, 0xff, 0xf3, 0xdf, - 0xff, 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf3, - 0xbf, 0xff, 0x60, 0x0, 0x0, 0x0, 0xa, 0xff, - 0xf3, 0x5f, 0xff, 0xf4, 0x0, 0x0, 0x0, 0xa, - 0xff, 0xf3, 0xb, 0xff, 0xff, 0xb6, 0x43, 0x33, - 0x3b, 0xff, 0xf3, 0x0, 0x9f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf3, 0x0, 0x3, 0xaf, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, - 0x24, 0x56, 0x66, 0x6c, 0xff, 0xf3, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf3, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf3, - 0x9, 0xbb, 0x90, 0x0, 0x0, 0x0, 0xc, 0xff, - 0xf1, 0xb, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x2f, - 0xff, 0xe0, 0x6, 0xff, 0xfd, 0x20, 0x0, 0x2, - 0xdf, 0xff, 0x90, 0x0, 0xbf, 0xff, 0xfb, 0x98, - 0xbf, 0xff, 0xff, 0x10, 0x0, 0xb, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xe3, 0x0, 0x0, 0x0, 0x6d, - 0xff, 0xff, 0xff, 0xfa, 0x10, 0x0, 0x0, 0x0, - 0x0, 0x26, 0x78, 0x74, 0x10, 0x0, 0x0, - - /* U+62 "b" */ - 0x0, 0x0, 0x0, 0x0, 0x24, 0x65, 0x30, 0x0, - 0x0, 0x3, 0xff, 0xd0, 0x4, 0xcf, 0xff, 0xff, - 0xe6, 0x0, 0x0, 0x3f, 0xff, 0x17, 0xff, 0xff, - 0xff, 0xff, 0xfb, 0x0, 0x3, 0xff, 0xf9, 0xff, - 0xfd, 0xbc, 0xff, 0xff, 0xfa, 0x0, 0x3f, 0xff, - 0xff, 0xb2, 0x0, 0x1, 0x8f, 0xff, 0xf5, 0x3, - 0xff, 0xff, 0xa0, 0x0, 0x0, 0x0, 0x7f,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ff, 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xa0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x17, 0x77, - 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+69 "i" */ - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0x22, 0x22, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x67, 0x76, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0x67, 0x77, - - /* U+6A "j" */ - 0x16, 0x87, 0x51, 0x0, 0x0, 0x3f, 0xff, 0xff, - 0x90, 0x0, 0x2f, 0xff, 0xff, 0xfb, 0x0, 0xb, - 0xac, 0xff, 0xff, 0x60, 0x0, 0x0, 0x7f, 0xff, - 0xd0, 0x0, 0x0, 0xe, 0xff, 0xf1, 0x0, 0x0, - 0xb, 0xff, 0xf2, 0x0, 0x0, 0xa, 0xff, 0xf3, - 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, - 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, 0xf3, 0x0, - 0x0, 0x9, 0xff, 0xf3, 0x0, 0x0, 0x9, 0xff, - 0xf3, 0x0, 0x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, - 0xff, 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x3, 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x3f, 0xff, 0xa0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x3, 0xff, 0xfa, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x17, 0x77, 0x40, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+6C "l" */ - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0xff, - 0xef, 0xff, 0xef, 0xff, 0x67, 0x77, - - /* U+6D "m" */ - 0x3f, 0xff, 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, - 0xf6, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, - 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, - 0x60, 0x0, 0x0, 0x0, 0xa, 0xff, 0xf2, 0x3f, - 0xff, 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xf6, - 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, 0xff, - 0xfa, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0x60, - 0x0, 0x0, 0x0, 0xa, 0xff, 0xf2, 0x3f, 0xff, - 0xa0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xf6, 0x0, - 0x0, 0x0, 0x0, 0xaf, 0xff, 0x23, 0xff, 0xfa, - 0x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, 0xff, 0x30, 0x0, 0x0, 0x0, 0x9, 0xff, - 0xf3, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0x30, - 0x0, 0x0, 0x0, 0xc, 0xff, 0xf1, 0x0, 0x0, - 0x0, 0x0, 0xef, 0xff, 0x0, 0x0, 0x0, 0x0, - 0x3f, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x9, 0xff, - 0xf4, 0x0, 0x0, 0x0, 0x5, 0xff, 0xfc, 0x0, - 0x0, 0x0, 0x29, 0xff, 0xfe, 0x10, 0x0, 0x0, - 0x6, 0xff, 0xfb, 0x10, 0x0, 0x0, 0x0, 0xf, - 0xb4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, - - /* U+7E "~" */ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x7d, 0xff, 0xfd, 0x60, 0x0, 0x5d, - 0xf5, 0x0, 0x0, 0x0, 0x4, 0xef, 0xff, 0xff, - 0xff, 0xa0, 0x6, 0xff, 0xa0, 0x0, 0x0, 0x7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x70, 0x2f, 0xff, - 0x50, 0x0, 0x2c, 0xff, 0xff, 0xb4, 0x13, 0xcf, - 0xff, 0x10, 0xbf, 0xff, 0xc9, 0xbf, 0xff, 0xff, - 0x50, 0x0, 0x0, 0xdf, 0xf6, 0x1, 0xef, 0xff, - 0xff, 0xff, 0xfd, 0x20, 0x0, 0x0, 0x5, 0xff, - 0x90, 0x2, 0xdf, 0xff, 0xff, 0xf8, 0x0, 0x0, - 0x0, 0x0, 0x1b, 0x95, 0x0, 0x0, 0x59, 0xa9, - 0x61, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 -}; - - -/*--------------------- - * GLYPH DESCRIPTION - *--------------------*/ - -static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, - {.bitmap_index = 0, .adv_w = 159, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 0, .adv_w = 168, .box_h = 29, .box_w = 5, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 73, .adv_w = 229, .box_h = 11, .box_w = 11, .ofs_x = 2, .ofs_y = 18}, - {.bitmap_index = 134, .adv_w = 399, .box_h = 29, .box_w = 23, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 468, .adv_w = 373, .box_h = 39, .box_w = 19, .ofs_x = 2, .ofs_y = -5}, - {.bitmap_index = 839, .adv_w = 468, .box_h = 30, .box_w = 26, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 1229, .adv_w = 399, .box_h = 30, .box_w = 24, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1589, .adv_w = 139, .box_h = 11, .box_w = 5, .ofs_x = 2, .ofs_y = 18}, - {.bitmap_index = 1617, .adv_w = 212, .box_h = 42, .box_w = 12, .ofs_x = 2, .ofs_y = -10}, - {.bitmap_index = 1869, .adv_w = 215, .box_h = 42, .box_w = 11, .ofs_x = 0, .ofs_y = -10}, - {.bitmap_index = 2100, .adv_w = 276, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = 7}, - {.bitmap_index = 2213, .adv_w = 363, .box_h = 22, .box_w = 21, .ofs_x = 1, .ofs_y = 2}, - {.bitmap_index = 2444, .adv_w = 142, .box_h = 10, .box_w = 5, .ofs_x = 2, .ofs_y = -5}, - {.bitmap_index = 2469, .adv_w = 288, .box_h = 4, .box_w = 12, .ofs_x = 3, .ofs_y = 10}, - {.bitmap_index = 2493, .adv_w = 171, .box_h = 4, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 2501, .adv_w = 266, .box_h = 32, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 2757, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 3042, .adv_w = 360, .box_h = 29, .box_w = 11, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 3202, .adv_w = 360, .box_h = 29, .box_w = 19, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 3478, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 3763, .adv_w = 360, .box_h = 29, .box_w = 21, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4068, .adv_w = 360, .box_h = 30, .box_w = 18, .ofs_x = 3, .ofs_y = -1}, - {.bitmap_index = 4338, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 4623, .adv_w = 360, .box_h = 29, .box_w = 20, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4913, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 5198, .adv_w = 360, .box_h = 30, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5483, .adv_w = 162, .box_h = 21, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 5525, .adv_w = 164, .box_h = 26, .box_w = 5, .ofs_x = 3, .ofs_y = -5}, - {.bitmap_index = 5590, .adv_w = 325, .box_h = 18, .box_w = 17, .ofs_x = 1, .ofs_y = 2}, - {.bitmap_index = 5743, .adv_w = 360, .box_h = 13, .box_w = 18, .ofs_x = 2, .ofs_y = 7}, - {.bitmap_index = 5860, .adv_w = 335, .box_h = 19, .box_w = 18, .ofs_x = 2, .ofs_y = 1}, - {.bitmap_index = 6031, .adv_w = 304, .box_h = 29, .box_w = 17, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 6278, .adv_w = 573, .box_h = 37, .box_w = 32, .ofs_x = 2, .ofs_y = -9}, - {.bitmap_index = 6870, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7233, .adv_w = 405, .box_h = 29, .box_w = 21, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 7538, .adv_w = 405, .box_h = 30, .box_w = 22, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 7868, .adv_w = 433, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 8187, .adv_w = 351, .box_h = 29, .box_w = 18, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 8448, .adv_w = 351, .box_h = 29, .box_w = 19, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 8724, .adv_w = 433, .box_h = 30, .box_w = 22, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 9054, .adv_w = 450, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 9373, .adv_w = 180, .box_h = 29, .box_w = 5, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 9446, .adv_w = 351, .box_h = 30, .box_w = 18, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 9716, .adv_w = 405, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 10035, .adv_w = 351, .box_h = 29, .box_w = 18, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 10296, .adv_w = 552, .box_h = 29, .box_w = 29, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 10717, .adv_w = 450, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 11036, .adv_w = 436, .box_h = 30, .box_w = 24, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 11396, .adv_w = 405, .box_h = 29, .box_w = 21, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 11701, .adv_w = 446, .box_h = 32, .box_w = 25, .ofs_x = 2, .ofs_y = -3}, - {.bitmap_index = 12101, .adv_w = 405, .box_h = 29, .box_w = 22, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 12420, .adv_w = 391, .box_h = 30, .box_w = 21, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 12735, .adv_w = 383, .box_h = 29, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 13083, .adv_w = 433, .box_h = 30, .box_w = 23, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 13428, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 13791, .adv_w = 551, .box_h = 29, .box_w = 34, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 14284, .adv_w = 405, .box_h = 29, .box_w = 24, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 14632, .adv_w = 405, .box_h = 29, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 14995, .adv_w = 383, .box_h = 29, .box_w = 22, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 15314, .adv_w = 173, .box_h = 40, .box_w = 9, .ofs_x = 2, .ofs_y = -7}, - {.bitmap_index = 15494, .adv_w = 264, .box_h = 32, .box_w = 17, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 15766, .adv_w = 173, .box_h = 40, .box_w = 8, .ofs_x = 0, .ofs_y = -7}, - {.bitmap_index = 15926, .adv_w = 268, .box_h = 15, .box_w = 15, .ofs_x = 1, .ofs_y = 14}, - {.bitmap_index = 16039, .adv_w = 291, .box_h = 3, .box_w = 19, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 16068, .adv_w = 200, .box_h = 6, .box_w = 9, .ofs_x = 1, .ofs_y = 24}, - {.bitmap_index = 16095, .adv_w = 352, .box_h = 23, .box_w = 18, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 16302, .adv_w = 364, .box_h = 32, .box_w = 19, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 16606, .adv_w = 335, .box_h = 23, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 16825, .adv_w = 364, .box_h = 32, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 17129, .adv_w = 335, .box_h = 23, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 17348, .adv_w = 195, .box_h = 31, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 17565, .adv_w = 364, .box_h = 31, .box_w = 18, .ofs_x = 2, .ofs_y = -9}, - {.bitmap_index = 17844, .adv_w = 364, .box_h = 31, .box_w = 18, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 18123, .adv_w = 161, .box_h = 31, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 18185, .adv_w = 166, .box_h = 40, .box_w = 10, .ofs_x = -2, .ofs_y = -9}, - {.bitmap_index = 18385, .adv_w = 328, .box_h = 31, .box_w = 19, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 18680, .adv_w = 161, .box_h = 31, .box_w = 4, .ofs_x = 3, .ofs_y = 0}, - {.bitmap_index = 18742, .adv_w = 559, .box_h = 22, .box_w = 31, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 19083, .adv_w = 364, .box_h = 22, .box_w = 18, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 19281, .adv_w = 364, .box_h = 23, .box_w = 20, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 19511, .adv_w = 364, .box_h = 31, .box_w = 19, .ofs_x = 2, .ofs_y = -9}, - {.bitmap_index = 19806, .adv_w = 364, .box_h = 31, .box_w = 19, .ofs_x = 1, .ofs_y = -9}, - {.bitmap_index = 20101, .adv_w = 224, .box_h = 22, .box_w = 12, .ofs_x = 2, .ofs_y = 0}, - {.bitmap_index = 20233, .adv_w = 335, .box_h = 23, .box_w = 17, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 20429, .adv_w = 204, .box_h = 28, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 20597, .adv_w = 364, .box_h = 23, .box_w = 18, .ofs_x = 2, .ofs_y = -1}, - {.bitmap_index = 20804, .adv_w = 322, .box_h = 22, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 21024, .adv_w = 484, .box_h = 22, .box_w = 30, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 21354, .adv_w = 322, .box_h = 22, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 21574, .adv_w = 322, .box_h = 31, .box_w = 20, .ofs_x = 0, .ofs_y = -9}, - {.bitmap_index = 21884, .adv_w = 322, .box_h = 22, .box_w = 18, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 22082, .adv_w = 218, .box_h = 40, .box_w = 13, .ofs_x = 1, .ofs_y = -8}, - {.bitmap_index = 22342, .adv_w = 158, .box_h = 35, .box_w = 5, .ofs_x = 2, .ofs_y = -6}, - {.bitmap_index = 22430, .adv_w = 218, .box_h = 40, .box_w = 13, .ofs_x = 0, .ofs_y = -8}, - {.bitmap_index = 22690, .adv_w = 435, .box_h = 9, .box_w = 23, .ofs_x = 2, .ofs_y = 7} -}; - - -/*--------------------- - * CHARACTER MAPPING - *--------------------*/ - - - -/*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_fmt_txt_cmap_t cmaps[] = -{ - { - .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL - } -}; - - -/*----------------- - * KERNING - *----------------*/ - - -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = -{ - 9, 43, - 9, 55, - 9, 56, - 9, 58, - 17, 17, - 17, 18, - 17, 20, - 17, 21, - 17, 22, - 17, 23, - 17, 24, - 17, 26, - 18, 19, - 18, 20, - 18, 22, - 18, 24, - 19, 17, - 19, 18, - 19, 19, - 19, 22, - 19, 23, - 19, 24, - 19, 25, - 19, 26, - 20, 18, - 20, 19, - 20, 20, - 20, 21, - 20, 22, - 20, 23, - 20, 24, - 20, 25, - 20, 26, - 21, 17, - 21, 19, - 21, 21, - 21, 22, - 21, 23, - 21, 24, - 21, 25, - 22, 18, - 22, 19, - 22, 20, - 22, 21, - 22, 22, - 22, 23, - 22, 24, - 22, 25, - 22, 26, - 23, 17, - 23, 18, - 23, 19, - 23, 21, - 23, 22, - 23, 23, - 23, 24, - 23, 25, - 24, 18, - 24, 21, - 24, 22, - 24, 23, - 24, 24, - 24, 25, - 24, 26, - 25, 17, - 25, 18, - 25, 20, - 25, 21, - 25, 22, - 25, 23, - 26, 17, - 26, 18, - 26, 19, - 26, 21, - 26, 22, - 26, 23, - 26, 24, - 26, 26, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 66, - 34, 68, - 34, 69, - 34, 70, - 34, 72, - 34, 80, - 34, 82, - 34, 84, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 91, - 35, 58, - 35, 66, - 35, 74, - 35, 77, - 35, 80, - 35, 83, - 35, 86, - 35, 90, - 36, 36, - 36, 40, - 36, 48, - 36, 50, - 36, 74, - 36, 83, - 36, 86, - 36, 90, - 36, 91, - 37, 55, - 37, 56, - 37, 66, - 37, 70, - 37, 80, - 37, 86, - 38, 55, - 38, 56, - 38, 58, - 38, 67, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 74, - 38, 75, - 38, 76, - 38, 77, - 38, 78, - 38, 79, - 38, 80, - 38, 81, - 38, 82, - 38, 83, - 38, 85, - 38, 86, - 38, 87, - 38, 88, - 38, 89, - 38, 90, - 38, 91, - 39, 13, - 39, 15, - 39, 34, - 39, 66, - 39, 70, - 39, 74, - 39, 77, - 39, 80, - 39, 83, - 39, 86, - 39, 90, - 40, 66, - 40, 70, - 40, 79, - 40, 80, - 40, 83, - 40, 86, - 40, 90, - 41, 66, - 41, 70, - 41, 80, - 41, 86, - 41, 90, - 42, 66, - 42, 68, - 42, 69, - 42, 71, - 42, 72, - 42, 78, - 42, 79, - 42, 80, - 42, 81, - 42, 83, - 42, 84, - 42, 85, - 42, 86, - 42, 87, - 42, 88, - 42, 90, - 43, 66, - 43, 80, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 66, - 44, 70, - 44, 74, - 44, 80, - 44, 83, - 44, 86, - 44, 88, - 44, 90, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 75, - 45, 86, - 45, 88, - 45, 90, - 46, 66, - 46, 70, - 46, 75, - 46, 79, - 46, 80, - 46, 86, - 46, 90, - 47, 70, - 47, 80, - 47, 90, - 48, 34, - 48, 53, - 48, 55, - 48, 56, - 48, 57, - 48, 58, - 48, 68, - 48, 69, - 48, 70, - 48, 71, - 48, 72, - 48, 75, - 48, 80, - 48, 81, - 48, 82, - 48, 84, - 48, 85, - 48, 86, - 48, 89, - 48, 90, - 48, 91, - 49, 13, - 49, 15, - 49, 34, - 49, 38, - 49, 41, - 49, 42, - 49, 66, - 49, 70, - 49, 73, - 49, 74, - 49, 77, - 49, 79, - 49, 80, - 49, 83, - 49, 84, - 49, 85, - 49, 90, - 50, 34, - 50, 53, - 50, 54, - 50, 55, - 50, 56, - 50, 57, - 50, 58, - 50, 66, - 50, 86, - 51, 36, - 51, 40, - 51, 48, - 51, 50, - 51, 53, - 51, 54, - 51, 55, - 51, 56, - 51, 58, - 51, 66, - 51, 70, - 51, 80, - 51, 86, - 51, 90, - 52, 66, - 52, 70, - 52, 75, - 52, 78, - 52, 79, - 52, 80, - 52, 81, - 52, 82, - 52, 86, - 52, 88, - 52, 90, - 53, 13, - 53, 14, - 53, 15, - 53, 27, - 53, 28, - 53, 34, - 53, 36, - 53, 40, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 57, - 53, 58, - 53, 66, - 53, 70, - 53, 74, - 53, 78, - 53, 80, - 53, 83, - 53, 84, - 53, 86, - 53, 88, - 53, 90, - 53, 91, - 54, 34, - 54, 69, - 54, 71, - 54, 72, - 54, 78, - 54, 79, - 54, 81, - 54, 83, - 54, 84, - 54, 85, - 54, 89, - 54, 91, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 27, - 55, 28, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 70, - 55, 80, - 55, 83, - 55, 86, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 27, - 56, 28, - 56, 34, - 56, 36, - 56, 40, - 56, 48, - 56, 50, - 56, 53, - 56, 62, - 56, 66, - 56, 70, - 56, 80, - 56, 83, - 56, 86, - 56, 90, - 56, 94, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 70, - 57, 86, - 57, 90, - 58, 10, - 58, 13, - 58, 14, - 58, 15, - 58, 27, - 58, 28, - 58, 34, - 58, 36, - 58, 40, - 58, 48, - 58, 50, - 58, 53, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 70, - 58, 80, - 58, 82, - 58, 85, - 58, 86, - 58, 87, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 66, - 59, 70, - 59, 74, - 59, 80, - 59, 86, - 59, 88, - 59, 90, - 60, 43, - 67, 87, - 67, 88, - 67, 90, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 72, - 71, 94, - 76, 70, - 80, 87, - 80, 88, - 80, 89, - 80, 90, - 81, 88, - 83, 13, - 83, 15, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 76, - 83, 80, - 83, 82, - 83, 85, - 83, 86, - 83, 87, - 83, 88, - 83, 89, - 83, 90, - 83, 91, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 88, 68, - 88, 69, - 88, 70, - 88, 82, - 89, 68, - 89, 69, - 89, 70, - 89, 80, - 89, 82, - 90, 13, - 90, 15, - 90, 68, - 90, 69, - 90, 70, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 80, - 92, 43 -}; - -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = -{ - -29, 13, 12, 14, 1, -11, -1, 2, - -1, 1, -13, 2, -2, -2, -2, -1, - -5, -5, 3, -4, -5, -7, -6, 1, - -6, -1, 2, 5, 1, -1, -9, 2, - 0, 1, -10, 11, 5, 1, -26, 6, - -1, -7, 2, 5, 2, -1, -1, 2, - -8, 1, -12, -7, 7, 3, 1, -12, - 3, 11, -51, -10, -12, 12, -7, -2, - 0, -7, 3, 6, 3, 0, 1, -12, - -3, 2, -1, 1, -15, 2, -12, -12, - -13, -12, -47, -14, -46, -31, -51, 2, - -6, -8, -7, -5, -7, -5, 1, -20, - -7, -26, -21, 8, -51, 3, -1, -1, - 2, 1, 2, 1, -2, -2, -3, -2, - -4, -2, -2, 3, -3, -13, -8, -1, - 1, 1, 1, 5, 5, 6, -3, -12, - -13, -12, -12, -11, -3, -2, -2, -3, - -6, -6, -12, -4, -11, -5, -14, -11, - -17, -14, 2, -15, 2, -96, -96, -38, - -22, -14, -2, -3, -14, -17, -14, -16, - 0, 1, 0, 0, 1, 0, 0, -2, - -3, -3, -3, -1, -2, -2, -6, -4, - -2, -2, -2, -4, -1, -2, -2, -3, - -2, -2, -1, -2, -3, -3, -17, -19, - -20, -19, -3, -17, -3, -17, -2, -15, - -25, -25, 12, -13, -15, -16, -15, -49, - -16, -58, -34, -55, -1, -9, -27, -34, - -2, -3, -2, -2, -3, -2, -1, -3, - -3, -1, -13, -17, -14, -7, -14, -18, - 1, -1, 1, 0, 1, -3, 1, 0, - 2, 0, 1, 1, -4, 2, -5, -105, - -105, -34, -2, -2, -2, -7, -8, -1, - -2, -2, -2, -8, -1, -4, 9, 10, - 9, -21, -4, -18, -12, 8, -22, 0, - -1, -3, -3, -4, -3, -13, -4, -12, - -9, -31, -1, -5, -5, -2, -1, 0, - -1, -3, -2, -2, -1, -1, 0, -1, - 2, 2, -51, -50, -51, -48, -49, -51, - -16, -17, -18, -17, -10, 10, 10, 10, - 7, 10, -50, -51, -2, -42, -51, -42, - -48, -42, -30, -31, -38, -14, -5, -1, - -2, -2, -2, -2, -2, -4, 0, -5, - -6, 13, -56, -23, -55, -20, -20, -48, - -13, -13, -14, -13, 11, -30, -28, -30, - -19, -18, -7, 12, 10, -37, -13, -37, - -14, -14, -34, -9, -9, -10, -9, 9, - 8, -21, -20, -20, -13, -12, -3, 9, - -15, -15, -16, -15, -17, -14, -20, 13, - -58, -33, -58, -28, -27, -52, -17, -17, - -19, -17, 11, 11, 11, 8, 12, 12, - -40, -42, -42, -39, -14, -25, -12, 12, - 8, -15, -16, -17, -16, -1, -13, -3, - -14, -12, -17, -17, -12, -7, -5, -7, - -8, 9, 10, 13, 12, -15, 12, -13, - -9, -6, -13, -9, -5, -41, -41, -12, - -11, -12, 10, 0, -12, -11, 11, 0, - 11, 11, 6, 11, 3, -38, -37, -9, - -8, -8, -8, -10, -8, -29, -28, -6, - -6, -7, -6, -13, -12, -13, -13, -12, - -43, -40, -10, -10, -10, -10, -12, -10, - -9, -10, -10, -13 -}; - -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = -{ - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 484, - .glyph_ids_size = 0 -}; - - -/*-------------------- - * ALL CUSTOM DATA - *--------------------*/ - -/*Store all the custom data of the font*/ -static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, - .glyph_dsc = glyph_dsc, - .cmaps = cmaps, - .cmap_num = 1, - .bpp = 4, - - .kern_scale = 16, - //.kern_dsc = &kern_classes, - //.kern_classes = 1, - .kern_dsc = &kern_pairs, - .kern_classes = 0, -}; - - -/*----------------- - * PUBLIC FONT - *----------------*/ - -/*Initialize a public general font descriptor*/ -lv_font_t lvgl_sample = { - .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ - .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ - .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ - .line_height = 47, /*The maximum line height required by the font*/ - .base_line = 10, /*Baseline measured from the bottom of the line*/ -}; diff --git a/src/lv_misc/lv_font.c b/src/lv_misc/lv_font.c index e28648afb7fa..d7452ab837bd 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_misc/lv_font.c @@ -39,14 +39,6 @@ * GLOBAL FUNCTIONS **********************/ -/** - * Initialize the font module - */ -void lv_font_init(void) -{ - lv_font_builtin_init(); -} - /** * Return with the bitmap of a font. * @param font_p pointer to a font diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index d4307da681e1..0996b9112ae8 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -72,11 +72,6 @@ typedef struct _lv_font_struct * GLOBAL PROTOTYPES **********************/ -/** - * Initialize the font module - */ -void lv_font_init(void); - /** * Return with the bitmap of a font. * @param font_p pointer to a font @@ -120,15 +115,6 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; -#define LV_FONT_SET_WIDTH(_integer, _fract) ((_integer << LV_FONT_WIDTH_FRACT_DIGIT) + _fract) -#define LV_FONT_GET_WIDTH_INT(_w) (_w >> LV_FONT_WIDTH_FRACT_DIGIT) -#define LV_FONT_GET_WIDTH_FRACT(_w) (_w & ((1 << LV_FONT_WIDTH_FRACT_DIGIT) -1)) - -/********************** - * ADD BUILT IN FONTS - **********************/ -#include "../lv_fonts/lv_font_builtin.h" - /*Declare the custom (user defined) fonts*/ #ifdef LV_FONT_CUSTOM_DECLARE LV_FONT_CUSTOM_DECLARE diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index 9e49c7859376..55e95a459680 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -24,7 +24,7 @@ * STATIC PROTOTYPES **********************/ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter); -static uint32_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right); +static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right); static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** @@ -77,7 +77,7 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * uint32_t gid = get_glyph_dsc_id(font, unicode_letter); if(!gid) return false; - uint32_t kvalue = 0; + int8_t kvalue = 0; if(fdsc->kern_dsc) { uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next); if(gid_next) { @@ -88,7 +88,7 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * /*Put together a glyph dsc*/ const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid]; - uint32_t adw_w = gdsc->adv_w + ((kvalue * fdsc->kern_scale) >> 4); + uint32_t adw_w = gdsc->adv_w + ((int32_t)((int32_t)kvalue * fdsc->kern_scale) >> 4); adw_w = (adw_w + (1 << 3)) >> 4; dsc_out->adv_w = adw_w; @@ -122,12 +122,26 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) glyph_id = fdsc->cmaps[i].glyph_id_start + rcp; } else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) { - const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; - glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[rcp]; + const uint8_t * gid_ofs_8 = fdsc->cmaps[i].glyph_id_ofs_list; + glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_8[rcp]; } - else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL) { + else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) { + uint32_t u; + for(u = 0; u < 50 /*fdsc->cmaps[i].list_length*/; u++) { + if(fdsc->cmaps[i].unicode_list[u] == rcp) { + glyph_id = fdsc->cmaps[i].glyph_id_start + u; + } + } + } + else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) { const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; - glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[rcp]; + uint32_t u; + for(u = 0; u < 50 /*fdsc->cmaps[i].list_length*/; u++) { + if(fdsc->cmaps[i].unicode_list[u] == rcp) { + glyph_id = fdsc->cmaps[i].glyph_id_start + u; + } + glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[u]; + } } return glyph_id; @@ -137,48 +151,48 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) } -static uint32_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right) +static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right) { lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; - uint32_t value = 0; - uint32_t k; - if(fdsc->kern_classes == 0) { - /*Kern pairs*/ - const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; - if(kdsc->glyph_ids_size == 1) { - const uint8_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == gid_left && - g_ids[k+1] == gid_right) { - value = kdsc->values[k >> 1]; - break; - } - } - } else { - const uint16_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == gid_left && - g_ids[k+1] == gid_right) { - value = kdsc->values[k >> 1]; - break; - } - } - } - } else { - /*Kern classes*/ - const lv_font_fmt_txt_kern_classes_t * kdsc = fdsc->kern_dsc; - uint8_t left_class = kdsc->left_class_mapping[gid_left]; - uint8_t right_class = kdsc->left_class_mapping[gid_right]; - - /* If class = 0, kerning not exist for that glyph - * else got the value form `class_pair_values` 2D array*/ - if(left_class > 0 && right_class > 0) { - value = kdsc->class_pair_values[(left_class-1)* kdsc->right_class_cnt + (right_class-1)]; - } - - } - return value; + int8_t value = 0; + uint32_t k; + if(fdsc->kern_classes == 0) { + /*Kern pairs*/ + const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; + if(kdsc->glyph_ids_size == 1) { + const uint8_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == gid_left && + g_ids[k+1] == gid_right) { + value = kdsc->values[k >> 1]; + break; + } + } + } else { + const uint16_t * g_ids = kdsc->glyph_ids; + for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { + if(g_ids[k] == gid_left && + g_ids[k+1] == gid_right) { + value = kdsc->values[k >> 1]; + break; + } + } + } + } else { + /*Kern classes*/ + const lv_font_fmt_txt_kern_classes_t * kdsc = fdsc->kern_dsc; + uint8_t left_class = kdsc->left_class_mapping[gid_left]; + uint8_t right_class = kdsc->left_class_mapping[gid_right]; + + /* If class = 0, kerning not exist for that glyph + * else got the value form `class_pair_values` 2D array*/ + if(left_class > 0 && right_class > 0) { + value = kdsc->class_pair_values[(left_class-1)* kdsc->right_class_cnt + (right_class-1)]; + } + + } + return value; } diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index 4c79f8405251..aa66a1903d3d 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -12,60 +12,61 @@ extern "C" { #endif -#define LV_SYMBOL_GLYPH_FIRST 0xF800 -#define LV_SYMBOL_AUDIO "\xEF\xA0\x80" -#define LV_SYMBOL_VIDEO "\xEF\xA0\x81" -#define LV_SYMBOL_LIST "\xEF\xA0\x82" -#define LV_SYMBOL_OK "\xEF\xA0\x83" -#define LV_SYMBOL_CLOSE "\xEF\xA0\x84" -#define LV_SYMBOL_POWER "\xEF\xA0\x85" -#define LV_SYMBOL_SETTINGS "\xEF\xA0\x86" -#define LV_SYMBOL_TRASH "\xEF\xA0\x87" -#define LV_SYMBOL_HOME "\xEF\xA0\x88" -#define LV_SYMBOL_DOWNLOAD "\xEF\xA0\x89" -#define LV_SYMBOL_DRIVE "\xEF\xA0\x8A" -#define LV_SYMBOL_REFRESH "\xEF\xA0\x8B" -#define LV_SYMBOL_MUTE "\xEF\xA0\x8C" -#define LV_SYMBOL_VOLUME_MID "\xEF\xA0\x8D" -#define LV_SYMBOL_VOLUME_MAX "\xEF\xA0\x8E" -#define LV_SYMBOL_IMAGE "\xEF\xA0\x8F" -#define LV_SYMBOL_EDIT "\xEF\xA0\x90" -#define LV_SYMBOL_PREV "\xEF\xA0\x91" -#define LV_SYMBOL_PLAY "\xEF\xA0\x92" -#define LV_SYMBOL_PAUSE "\xEF\xA0\x93" -#define LV_SYMBOL_STOP "\xEF\xA0\x94" -#define LV_SYMBOL_NEXT "\xEF\xA0\x95" -#define LV_SYMBOL_EJECT "\xEF\xA0\x96" -#define LV_SYMBOL_LEFT "\xEF\xA0\x97" -#define LV_SYMBOL_RIGHT "\xEF\xA0\x98" -#define LV_SYMBOL_PLUS "\xEF\xA0\x99" -#define LV_SYMBOL_MINUS "\xEF\xA0\x9A" -#define LV_SYMBOL_WARNING "\xEF\xA0\x9B" -#define LV_SYMBOL_SHUFFLE "\xEF\xA0\x9C" -#define LV_SYMBOL_UP "\xEF\xA0\x9D" -#define LV_SYMBOL_DOWN "\xEF\xA0\x9E" -#define LV_SYMBOL_LOOP "\xEF\xA0\x9F" -#define LV_SYMBOL_DIRECTORY "\xEF\xA0\xA0" -#define LV_SYMBOL_UPLOAD "\xEF\xA0\xA1" -#define LV_SYMBOL_CALL "\xEF\xA0\xA2" -#define LV_SYMBOL_CUT "\xEF\xA0\xA3" -#define LV_SYMBOL_COPY "\xEF\xA0\xA4" -#define LV_SYMBOL_SAVE "\xEF\xA0\xA5" -#define LV_SYMBOL_CHARGE "\xEF\xA0\xA6" -#define LV_SYMBOL_BELL "\xEF\xA0\xA7" -#define LV_SYMBOL_KEYBOARD "\xEF\xA0\xA8" -#define LV_SYMBOL_GPS "\xEF\xA0\xA9" -#define LV_SYMBOL_FILE "\xEF\xA0\xAA" -#define LV_SYMBOL_WIFI "\xEF\xA0\xAB" -#define LV_SYMBOL_BATTERY_FULL "\xEF\xA0\xAC" -#define LV_SYMBOL_BATTERY_3 "\xEF\xA0\xAD" -#define LV_SYMBOL_BATTERY_2 "\xEF\xA0\xAE" -#define LV_SYMBOL_BATTERY_1 "\xEF\xA0\xAF" -#define LV_SYMBOL_BATTERY_EMPTY "\xEF\xA0\xB0" -#define LV_SYMBOL_BLUETOOTH "\xEF\xA0\xB1" -#define LV_SYMBOL_GLYPH_LAST 0xF831 - -/*Invalid symbol at (U+F831). If written before a string then `lv_img` will show it as a label*/ +#define LV_SYMBOL_AUDIO "\xef\x80\x81" +#define LV_SYMBOL_VIDEO "\xef\x80\x88" +#define LV_SYMBOL_LIST "\xef\x80\x8b" +#define LV_SYMBOL_OK "\xef\x80\x8c" +#define LV_SYMBOL_CLOSE "\xef\x80\x8d" +#define LV_SYMBOL_POWER "\xef\x80\x91" +#define LV_SYMBOL_SETTINGS "\xef\x80\x93" +#define LV_SYMBOL_TRASH "\xef\x80\x94" +#define LV_SYMBOL_HOME "\xef\x80\x95" +#define LV_SYMBOL_DOWNLOAD "\xef\x80\x99" +#define LV_SYMBOL_DRIVE "\xef\x80\x9c" +#define LV_SYMBOL_REFRESH "\xef\x80\xa1" +#define LV_SYMBOL_MUTE "\xef\x80\xa6" + + + +#define LV_SYMBOL_VOLUME_MID "\xef\x80\xa7" +#define LV_SYMBOL_VOLUME_MAX "\xef\x80\xa8" +#define LV_SYMBOL_IMAGE "\xef\x80\xbe" +#define LV_SYMBOL_EDIT "\xef\x81\x80" +#define LV_SYMBOL_PREV "\xef\x81\x88" +#define LV_SYMBOL_PLAY "\xef\x81\x8b" +#define LV_SYMBOL_PAUSE "\xef\x81\x8c" +#define LV_SYMBOL_STOP "\xef\x81\x8d" +#define LV_SYMBOL_NEXT "\xef\x81\x91" +#define LV_SYMBOL_EJECT "\xef\x81\x92" +#define LV_SYMBOL_LEFT "\xef\x81\x93" +#define LV_SYMBOL_RIGHT "\xef\x81\x94" +#define LV_SYMBOL_PLUS "\xef\x81\xa7" +#define LV_SYMBOL_MINUS "\xef\x81\xa8" +#define LV_SYMBOL_WARNING "\xef\x81\xb1" +#define LV_SYMBOL_SHUFFLE "\xef\x81\xb4" +#define LV_SYMBOL_UP "\xef\x81\xb7" +#define LV_SYMBOL_DOWN "\xef\x81\xb8" +#define LV_SYMBOL_LOOP "\xef\x81\xb9" +#define LV_SYMBOL_DIRECTORY "\xef\x81\xbb" +#define LV_SYMBOL_UPLOAD "\xef\x82\x93" +#define LV_SYMBOL_CALL "\xef\x82\x95" +#define LV_SYMBOL_CUT "\xef\x83\x84" +#define LV_SYMBOL_COPY "\xef\x83\x85" +#define LV_SYMBOL_SAVE "\xef\x83\x87" +#define LV_SYMBOL_CHARGE "\xef\x83\xa7" +#define LV_SYMBOL_BELL "\xef\x83\xb3" +#define LV_SYMBOL_KEYBOARD "\xef\x84\x9c" +#define LV_SYMBOL_GPS "\xef\x84\xa4" +#define LV_SYMBOL_FILE "\xef\x85\x9b" +#define LV_SYMBOL_WIFI "\xef\x87\xab" +#define LV_SYMBOL_BATTERY_FULL "\xef\x89\x80" +#define LV_SYMBOL_BATTERY_3 "\xef\x89\x81" +#define LV_SYMBOL_BATTERY_2 "\xef\x89\x82" +#define LV_SYMBOL_BATTERY_1 "\xef\x89\x83" +#define LV_SYMBOL_BATTERY_EMPTY "\xef\x89\x84" +#define LV_SYMBOL_BLUETOOTH "\xef\x8a\x93" + +/*Invalid symbol at (U+F8FF). If written before a string then `lv_img` will show it as a label*/ #define LV_SYMBOL_DUMMY "\xEF\xA3\xBF" /* From 366698bba393c6e5db97c4d08a7a875e2feaff08 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 2 Jun 2019 14:18:21 +0200 Subject: [PATCH 484/590] font: add user data --- lv_conf_template.h | 3 +++ src/lv_core/lv_refr.c | 3 +-- src/lv_misc/lv_font.h | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 6678833d8138..96ca4b499dca 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -259,6 +259,9 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i #define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/ +/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_font_user_data_t; + /*================= * Text settings *=================*/ diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 700e59b2b8bb..9948551bac08 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -167,8 +167,7 @@ void lv_disp_refr_task(lv_task_t * task) /* With true double buffering the flushing should be only the address change of the * current frame buffer. Wait until the address change is ready and copy the changed * content to the other frame buffer (new active VDB) to keep the buffers synchronized*/ - while(vdb->flushing) - ; + while(vdb->flushing); uint8_t * buf_act = (uint8_t *)vdb->buf_act; uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 0996b9112ae8..6787b3e397ee 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -66,6 +66,9 @@ typedef struct _lv_font_struct uint8_t line_height; /*The real line height where any text fits*/ uint8_t base_line; /*Base line measured from the top of the line_height*/ void * dsc; /*Store implementation specific data here*/ +#if LV_USE_USER_DATA + lv_font_user_data_t user_data; +#endif } lv_font_t; /********************** From 33bb0d8004684be16378acf507f3e43067231e34 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 2 Jun 2019 20:35:33 +0200 Subject: [PATCH 485/590] calnvas: create draw function which uses lv_draw_... function --- src/lv_core/lv_refr.c | 29 ++- src/lv_core/lv_refr.h | 11 +- src/lv_draw/lv_draw.h | 1 + src/lv_draw/lv_draw_triangle.c | 31 ++- src/lv_draw/lv_draw_triangle.h | 14 +- src/lv_misc/lv_color.h | 1 + src/lv_objx/lv_canvas.c | 414 ++++++++++++++++----------------- src/lv_objx/lv_canvas.h | 107 +++------ 8 files changed, 322 insertions(+), 286 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 700e59b2b8bb..83d996e7dde9 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -69,14 +69,19 @@ void lv_refr_init(void) * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process * (e.g. progress bar) this function can be called when the screen should be updated. + * @param disp pointer to display to refresh. NULL to refresh all displays. */ -void lv_refr_now(void) +void lv_refr_now(lv_disp_t * disp) { - lv_disp_t * d; - d = lv_disp_get_next(NULL); - while(d) { - lv_disp_refr_task(d->refr_task); - d = lv_disp_get_next(d); + if(disp) { + lv_disp_refr_task(disp->refr_task); + } else { + lv_disp_t * d; + d = lv_disp_get_next(NULL); + while(d) { + lv_disp_refr_task(d->refr_task); + d = lv_disp_get_next(d); + } } } @@ -138,6 +143,18 @@ lv_disp_t * lv_refr_get_disp_refreshing(void) return disp_refr; } +/** + * Set the display which is being refreshed. + * It shouldn1t be used directly by the user. + * It can be used to trick the drawing functions about there is an active display. + * @param the display being refreshed + */ +void lv_refr_set_disp_refreshing(lv_disp_t * disp) +{ + disp_refr = disp; +} + + /** * Called periodically to handle the refreshing * @param task pointer to the task itself diff --git a/src/lv_core/lv_refr.h b/src/lv_core/lv_refr.h index ed74a0ea8391..8c0ed03edaf2 100644 --- a/src/lv_core/lv_refr.h +++ b/src/lv_core/lv_refr.h @@ -50,8 +50,9 @@ void lv_refr_init(void); * Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process * can prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process * (e.g. progress bar) this function can be called when the screen should be updated. + * @param disp pointer to display to refresh. NULL to refresh all displays. */ -void lv_refr_now(void); +void lv_refr_now(lv_disp_t * disp); /** * Invalidate an area on display to redraw it @@ -67,6 +68,14 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p); */ lv_disp_t * lv_refr_get_disp_refreshing(void); +/** + * Set the display which is being refreshed. + * It shouldn1t be used directly by the user. + * It can be used to trick the drawing functions about there is an active display. + * @param the display being refreshed + */ +void lv_refr_set_disp_refreshing(lv_disp_t * disp); + /** * Called periodically to handle the refreshing * @param task pointer to the task itself diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index 8d3d281a74f0..c6088a3e2c7f 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -89,6 +89,7 @@ void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ #include "lv_draw_img.h" #include "lv_draw_line.h" #include "lv_draw_triangle.h" +#include "lv_draw_arc.h" #ifdef __cplusplus } /* extern "C" */ diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 0f2ed54a6db4..96bdef37fc38 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -42,7 +42,7 @@ static uint8_t corr_value; * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask * @param style style for of the triangle - * @param opa_scale scale down all opacities by the factor + * @param opa_scale scale down all opacities by the factor (0..255) */ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) @@ -89,10 +89,39 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l } } +/** + * Draw a polygon from triangles. Only convex polygons are supported + * @param points an array of points + * @param point_cnt number of points + * @param mask polygon will be drawn only in this mask + * @param style style of the polygon + * @param opa_scale scale down all opacities by the factor (0..255) + */ +void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) +{ + if(point_cnt < 3) return; + if(points == NULL) return; + + uint32_t i; + lv_point_t tri[3]; + tri[0].x = points[0].x; + tri[0].y = points[0].y; + for(i = 0; i < point_cnt - 1; i++) { + tri[1].x = points[i].x; + tri[1].y = points[i].y; + tri[2].x = points[i+1].x; + tri[2].y = points[i+1].y; + lv_draw_triangle(tri, mask, style, opa_scale); + } + +} + /********************** * STATIC FUNCTIONS **********************/ + void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { /*Return if the points are out of the mask*/ diff --git a/src/lv_draw/lv_draw_triangle.h b/src/lv_draw/lv_draw_triangle.h index 35bd9b0ed66f..e9ba0bf335cf 100644 --- a/src/lv_draw/lv_draw_triangle.h +++ b/src/lv_draw/lv_draw_triangle.h @@ -32,11 +32,23 @@ extern "C" { * @param points pointer to an array with 3 points * @param mask the triangle will be drawn only in this mask * @param style style for of the triangle - * @param opa_scale scale down all opacities by the factor + * @param opa_scale scale down all opacities by the factor (0..255) */ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); +/** + * Draw a polygon from triangles. Only convex polygons are supported + * @param points an array of points + * @param point_cnt number of points + * @param mask polygon will be drawn only in this mask + * @param style style of the polygon + * @param opa_scale scale down all opacities by the factor (0..255) + */ +void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); + + /********************** * MACROS **********************/ diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index e611facb109d..9b0ded93be8d 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -40,6 +40,7 @@ extern "C" { #define LV_COLOR_WHITE LV_COLOR_MAKE(0xFF, 0xFF, 0xFF) #define LV_COLOR_SILVER LV_COLOR_MAKE(0xC0, 0xC0, 0xC0) #define LV_COLOR_GRAY LV_COLOR_MAKE(0x80, 0x80, 0x80) +#define LV_COLOR_LIGHT_GRAY LV_COLOR_MAKE(0xC0, 0xC0, 0xC0) #define LV_COLOR_BLACK LV_COLOR_MAKE(0x00, 0x00, 0x00) #define LV_COLOR_RED LV_COLOR_MAKE(0xFF, 0x00, 0x00) #define LV_COLOR_MAROON LV_COLOR_MAKE(0x80, 0x00, 0x00) diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 4d7c0565b70e..cd1796861b34 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -9,7 +9,9 @@ #include #include "lv_canvas.h" #include "../lv_misc/lv_math.h" -#include "../lv_draw/lv_draw_img.h" +#include "../lv_draw/lv_draw.h" +#include "../lv_core/lv_refr.h" + #if LV_USE_CANVAS != 0 /********************* @@ -232,79 +234,6 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l } } -/** - * Multiply a buffer with the canvas - * @param canvas pointer to a canvas object - * @param to_copy buffer to copy (multiply). LV_IMG_CF_TRUE_COLOR_ALPHA is not supported - * @param w width of the buffer to copy - * @param h height of the buffer to copy - * @param x left side of the destination position - * @param y top side of the destination position - */ -void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, - lv_coord_t y) -{ - lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); - if(x + w >= ext->dsc.header.w || y + h >= ext->dsc.header.h) { - LV_LOG_WARN("lv_canvas_mult_buf: x or y out of the canvas"); - return; - } - - if(ext->dsc.header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { - LV_LOG_WARN("lv_canvas_mult_buf: LV_IMG_CF_TRUE_COLOR_ALPHA is not supported"); - return; - } - - uint32_t px_size = lv_img_color_format_get_px_size(ext->dsc.header.cf) >> 3; - uint32_t px = ext->dsc.header.w * y * px_size + x * px_size; - lv_color_t * copy_buf_color = (lv_color_t *)to_copy; - lv_color_t * canvas_buf_color = (lv_color_t *)&ext->dsc.data[px]; - - lv_coord_t i; - lv_coord_t j; - for(i = 0; i < h; i++) { - for(j = 0; j < w; j++) { -#if LV_COLOR_DEPTH == 32 - canvas_buf_color[j].ch.red = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 8; - canvas_buf_color[j].ch.green = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> - 8; - canvas_buf_color[j].ch.blue = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 8; -#elif LV_COLOR_DEPTH == 16 - - canvas_buf_color[j].ch.red = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 5; - canvas_buf_color[j].ch.blue = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 5; -#if LV_COLOR_16_SWAP == 0 - canvas_buf_color[j].ch.green = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> - 6; -#else - uint8_t green_canvas = (canvas_buf_color[j].ch.green_h << 3) + (canvas_buf_color[j].ch.green_l); - uint8_t green_buf = (copy_buf_color[j].ch.green_h << 3) + (copy_buf_color[j].ch.green_l); - uint8_t green_res = (uint16_t)((uint16_t)green_canvas * green_buf) >> 6; - canvas_buf_color[j].ch.green_h = (green_res >> 3) & 0x07; - canvas_buf_color[j].ch.green_l = green_res & 0x07; -#endif /*LV_COLOR_16_SWAP*/ - -#elif LV_COLOR_DEPTH == 8 - canvas_buf_color[j].ch.red = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.red * copy_buf_color[j].ch.red) >> 3; - canvas_buf_color[j].ch.green = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.green * copy_buf_color[j].ch.green) >> - 3; - canvas_buf_color[j].ch.blue = - (uint16_t)((uint16_t)canvas_buf_color[j].ch.blue * copy_buf_color[j].ch.blue) >> 2; -#endif - } - copy_buf_color += w; - canvas_buf_color += ext->dsc.header.w; - } -} - /** * Rotate and image and store the result on a canvas. * @param canvas pointer to a canvas object @@ -488,193 +417,262 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c } /** - * Draw circle function of the canvas - * @param canvas pointer to a canvas object - * @param x0 x coordinate of the circle - * @param y0 y coordinate of the circle - * @param radius radius of the circle - * @param color border color of the circle + * Fill the canvas with color + * @param canvas pointer to a canvas + * @param color the background color */ -void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, - lv_color_t color) +void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color) { - int x = radius; - int y = 0; - int err = 0; - - while(x >= y) { - lv_canvas_set_px(canvas, x0 + x, y0 + y, color); - lv_canvas_set_px(canvas, x0 + y, y0 + x, color); - lv_canvas_set_px(canvas, x0 - y, y0 + x, color); - lv_canvas_set_px(canvas, x0 - x, y0 + y, color); - lv_canvas_set_px(canvas, x0 - x, y0 - y, color); - lv_canvas_set_px(canvas, x0 - y, y0 - x, color); - lv_canvas_set_px(canvas, x0 + y, y0 - x, color); - lv_canvas_set_px(canvas, x0 + x, y0 - y, color); - - if(err <= 0) { - y += 1; - err += 2 * y + 1; - } + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); - if(err > 0) { - x -= 1; - err -= 2 * x + 1; + uint32_t x = dsc->header.w * dsc->header.h; + uint32_t y; + for(y = 0; y < dsc->header.h; y++) { + for(x = 0; x < dsc->header.w; x++) { + lv_img_buf_set_px_color(dsc, x, y, color); } } + } /** - * Draw line function of the canvas + * Draw a rectangle on the canvas * @param canvas pointer to a canvas object - * @param point1 start point of the line - * @param point2 end point of the line - * @param color color of the line - * - * NOTE: The lv_canvas_draw_line function originates from https://github.com/jb55/bresenham-line.c. + * @param x left coordinate of the rectangle + * @param y top coordinate of the rectangle + * @param w width of the rectangle + * @param h height of the rectangle + * @param style style of the rectangle (`body` properties are used except `padding`) */ -void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2, lv_color_t color) +void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, const lv_style_t * style) { - lv_coord_t x0, y0, x1, y1; + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); - x0 = point1.x; - y0 = point1.y; - x1 = point2.x; - y1 = point2.y; + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; - int dx = abs(x1 - x0), sx = x0 < x1 ? 1 : -1; - int dy = abs(y1 - y0), sy = y0 < y1 ? 1 : -1; - int err = (dx > dy ? dx : -dy) / 2, e2; + lv_area_t coords; + coords.x1 = x; + coords.y1 = y; + coords.x2 = x + w - 1; + coords.y2 = y + h - 1; - for(;;) { - lv_canvas_set_px(canvas, x0, y0, color); + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); - if(x0 == x1 && y0 == y1) break; - e2 = err; - if(e2 > -dx) { - err -= dy; - x0 += sx; - } - if(e2 < dy) { - err += dx; - y0 += sy; - } - } -} + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); -/** - * Draw triangle function of the canvas - * @param canvas pointer to a canvas object - * @param points edge points of the triangle - * @param color line color of the triangle - */ -void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) -{ - lv_canvas_draw_polygon(canvas, points, 3, color); + lv_disp_drv_init(&disp.driver); + + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; + + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); + + lv_draw_rect(&coords, &mask, style, LV_OPA_COVER); + + lv_refr_set_disp_refreshing(refr_ori); } /** - * Draw rectangle function of the canvas + * Draw a text on the canvas. * @param canvas pointer to a canvas object - * @param points edge points of the rectangle - * @param color line color of the rectangle + * @param x left coordinate of the text + * @param y top coordinate of the text + * @param max_w max width of the text. The text will be wrapped to fit into this size + * @param style style of the text (`text` properties are used) + * @param txt text to display + * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`) */ -void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color) +void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, const char * txt, lv_label_align_t align) { - lv_canvas_draw_polygon(canvas, points, 4, color); + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); + + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; + + lv_area_t coords; + coords.x1 = x; + coords.y1 = y; + coords.x2 = x + max_w - 1; + coords.y2 = dsc->header.h - 1; + + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); + + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); + + lv_disp_drv_init(&disp.driver); + + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; + + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); + + lv_txt_flag_t flag; + switch(align) { + case LV_LABEL_ALIGN_LEFT: + flag = LV_TXT_FLAG_NONE; + break; + case LV_LABEL_ALIGN_RIGHT: + flag = LV_TXT_FLAG_RIGHT; + break; + case LV_LABEL_ALIGN_CENTER: + flag = LV_TXT_FLAG_CENTER; + break; + default: + flag = LV_TXT_FLAG_NONE; + break; + } + + lv_draw_label(&coords, &mask, style, LV_OPA_COVER, txt, flag, NULL, LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF); + + lv_refr_set_disp_refreshing(refr_ori); } /** - * Draw polygon function of the canvas + * Draw a line on the canvas * @param canvas pointer to a canvas object - * @param points edge points of the polygon - * @param size edge count of the polygon - * @param color line color of the polygon + * @param points point of the line + * @param point_cnt number of points + * @param style style of the line (`line` properties are used) */ -void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color) +void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style) { - uint8_t i; + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); + + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; + + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); + + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); + + lv_disp_drv_init(&disp.driver); + + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; - for(i = 0; i < (size - 1); i++) { - lv_canvas_draw_line(canvas, points[i], points[i + 1], color); + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); + + uint32_t i; + for(i = 0; i < point_cnt - 1; i++) { + lv_draw_line(&points[i], &points[i + 1], &mask, style, LV_OPA_COVER); } - lv_canvas_draw_line(canvas, points[size - 1], points[0], color); + lv_refr_set_disp_refreshing(refr_ori); } /** - * Fill polygon function of the canvas + * Draw a polygon on the canvas * @param canvas pointer to a canvas object - * @param points edge points of the polygon - * @param size edge count of the polygon - * @param boundary_color line color of the polygon - * @param fill_color fill color of the polygon + * @param points point of the polygon + * @param point_cnt number of points + * @param style style of the polygon (`body.main_color` and `body.opa` is used) */ -void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, - lv_color_t boundary_color, lv_color_t fill_color) +void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style) { - uint32_t x = 0, y = 0; - uint8_t i; + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); - for(i = 0; i < size; i++) { - x += points[i].x; - y += points[i].y; - } + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; - x = x / size; - y = y / size; + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); - lv_canvas_boundary_fill4(canvas, (lv_coord_t)x, (lv_coord_t)y, boundary_color, fill_color); -} + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); -/** - * Boundary fill function of the canvas - * @param canvas pointer to a canvas object - * @param x x coordinate of the start position (seed) - * @param y y coordinate of the start position (seed) - * @param boundary_color edge/boundary color of the area - * @param fill_color fill color of the area - */ -void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, - lv_color_t boundary_color, lv_color_t fill_color) -{ - lv_color_t c; + lv_disp_drv_init(&disp.driver); - c = lv_canvas_get_px(canvas, x, y); + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; - if(c.full != boundary_color.full && c.full != fill_color.full) { - lv_canvas_set_px(canvas, x, y, fill_color); + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); - lv_canvas_boundary_fill4(canvas, x + 1, y, boundary_color, fill_color); - lv_canvas_boundary_fill4(canvas, x, y + 1, boundary_color, fill_color); - lv_canvas_boundary_fill4(canvas, x - 1, y, boundary_color, fill_color); - lv_canvas_boundary_fill4(canvas, x, y - 1, boundary_color, fill_color); - } + lv_draw_polygon(points, point_cnt, &mask, style, LV_OPA_COVER); + + lv_refr_set_disp_refreshing(refr_ori); } + /** - * Flood fill function of the canvas + * Draw an arc on the canvas * @param canvas pointer to a canvas object - * @param x x coordinate of the start position (seed) - * @param y y coordinate of the start position (seed) - * @param fill_color fill color of the area - * @param bg_color background color of the area + * @param x origo x of the arc + * @param y origo y of the arc + * @param r radius of the arc + * @param start_angle start angle in degrees + * @param end_angle end angle in degrees + * @param style style of the polygon (`body.main_color` and `body.opa` is used) */ -void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t fill_color, - lv_color_t bg_color) +void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, const lv_style_t * style) { - lv_color_t c; + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); - c = lv_canvas_get_px(canvas, x, y); + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; - if(c.full == bg_color.full) { - lv_canvas_set_px(canvas, x, y, fill_color); + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); - lv_canvas_flood_fill(canvas, x + 1, y, fill_color, bg_color); - lv_canvas_flood_fill(canvas, x, y + 1, fill_color, bg_color); - lv_canvas_flood_fill(canvas, x - 1, y, fill_color, bg_color); - lv_canvas_flood_fill(canvas, x, y - 1, fill_color, bg_color); - } + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); + + lv_disp_drv_init(&disp.driver); + + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; + + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); + + lv_draw_arc(x, y, r, &mask, start_angle, end_angle, style, LV_OPA_COVER); + + lv_refr_set_disp_refreshing(refr_ori); } /********************** diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 959e3d8a46fa..550ce64f52f6 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -139,18 +139,6 @@ const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y); -/** - * Multiply a buffer with the canvas - * @param canvas pointer to a canvas object - * @param to_copy buffer to copy (multiply). LV_IMG_CF_TRUE_COLOR_ALPHA is not supported - * @param w width of the buffer to copy - * @param h height of the buffer to copy - * @param x left side of the destination position - * @param y top side of the destination position - */ -void lv_canvas_mult_buf(lv_obj_t * canvas, void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, - lv_coord_t y); - /** * Rotate and image and store the result on a canvas. * @param canvas pointer to a canvas object @@ -168,83 +156,64 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); /** - * Draw circle function of the canvas - * @param canvas pointer to a canvas object - * @param x0 x coordinate of the circle - * @param y0 y coordinate of the circle - * @param radius radius of the circle - * @param color border color of the circle - */ -void lv_canvas_draw_circle(lv_obj_t * canvas, lv_coord_t x0, lv_coord_t y0, lv_coord_t radius, - lv_color_t color); - -/** - * Draw line function of the canvas - * @param canvas pointer to a canvas object - * @param point1 start point of the line - * @param point2 end point of the line - * @param color color of the line - * - * NOTE: The lv_canvas_draw_line function originates from https://github.com/jb55/bresenham-line.c. + * Fill the canvas with color + * @param canvas pointer to a canvas + * @param color the background color */ -void lv_canvas_draw_line(lv_obj_t * canvas, lv_point_t point1, lv_point_t point2, lv_color_t color); +void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color); /** - * Draw triangle function of the canvas + * Draw a rectangle on the canvas * @param canvas pointer to a canvas object - * @param points edge points of the triangle - * @param color line color of the triangle + * @param x left coordinate of the rectangle + * @param y top coordinate of the rectangle + * @param w width of the rectangle + * @param h height of the rectangle + * @param style style of the rectangle (`body` properties are used except `padding`) */ -void lv_canvas_draw_triangle(lv_obj_t * canvas, lv_point_t * points, lv_color_t color); +void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, const lv_style_t * style); /** - * Draw rectangle function of the canvas + * Draw a text on the canvas. * @param canvas pointer to a canvas object - * @param points edge points of the rectangle - * @param color line color of the rectangle + * @param x left coordinate of the text + * @param y top coordinate of the text + * @param max_w max width of the text. The text will be wrapped to fit into this size + * @param style style of the text (`text` properties are used) + * @param txt text to display + * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`) */ -void lv_canvas_draw_rect(lv_obj_t * canvas, lv_point_t * points, lv_color_t color); +void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, const char * txt, lv_label_align_t align); /** - * Draw polygon function of the canvas + * Draw a line on the canvas * @param canvas pointer to a canvas object - * @param points edge points of the polygon - * @param size edge count of the polygon - * @param color line color of the polygon + * @param points point of the line + * @param point_cnt number of points + * @param style style of the line (`line` properties are used) */ -void lv_canvas_draw_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, lv_color_t color); +void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style); /** - * Fill polygon function of the canvas + * Draw a polygon on the canvas * @param canvas pointer to a canvas object - * @param points edge points of the polygon - * @param size edge count of the polygon - * @param boundary_color line color of the polygon - * @param fill_color fill color of the polygon + * @param points point of the polygon + * @param point_cnt number of points + * @param style style of the polygon (`body.main_color` and `body.opa` is used) */ -void lv_canvas_fill_polygon(lv_obj_t * canvas, lv_point_t * points, size_t size, - lv_color_t boundary_color, lv_color_t fill_color); -/** - * Boundary fill function of the canvas - * @param canvas pointer to a canvas object - * @param x x coordinate of the start position (seed) - * @param y y coordinate of the start position (seed) - * @param boundary_color edge/boundary color of the area - * @param fill_color fill color of the area - */ -void lv_canvas_boundary_fill4(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, - lv_color_t boundary_color, lv_color_t fill_color); +void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style); /** - * Flood fill function of the canvas + * Draw an arc on the canvas * @param canvas pointer to a canvas object - * @param x x coordinate of the start position (seed) - * @param y y coordinate of the start position (seed) - * @param fill_color fill color of the area - * @param bg_color background color of the area - */ -void lv_canvas_flood_fill(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t fill_color, - lv_color_t bg_color); + * @param x origo x of the arc + * @param y origo y of the arc + * @param r radius of the arc + * @param start_angle start angle in degrees + * @param end_angle end angle in degrees + * @param style style of the polygon (`body.main_color` and `body.opa` is used) + */ +void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, const lv_style_t * style); /********************** * MACROS From b0de5b9c0d20bf4c874877dc0e1da8cc3d9b8066 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 2 Jun 2019 23:27:27 +0200 Subject: [PATCH 486/590] update built in font converter --- scripts/built_in_font/built_in_font_gen.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/built_in_font/built_in_font_gen.py b/scripts/built_in_font/built_in_font_gen.py index 896152048184..260c5871734b 100644 --- a/scripts/built_in_font/built_in_font_gen.py +++ b/scripts/built_in_font/built_in_font_gen.py @@ -8,7 +8,7 @@ metavar = 'px', nargs='?', help='Size of the font in px') -parser.add_argument('-bpp', +parser.add_argument('--bpp', type=int, metavar = '1,2,4', nargs='?', @@ -16,8 +16,13 @@ parser.add_argument('-r', '--range', nargs='+', metavar = 'start-end', - default=['0x20-0x7F'], - help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F 0x200 324') + default='0x20-0x7F', + help='Ranges and/or characters to include. Default is 0x20-7F (ASCII). E.g. -r 0x20-0x7F, 0x200, 324') +parser.add_argument('--font', + metavar = 'file', + nargs='?', + default='Roboto-Regular.woff', + help='A TTF or WOFF file') parser.add_argument('-o', '--output', nargs='?', metavar='file', @@ -31,14 +36,10 @@ compr = "--no-compress --no-prefilter" else: compr = "" - -r_str = "" -for r in args.range: - r_str = r_str + "-r " + r + " "; #Built in symbols -syms = "-r 61441 -r 61448 -r 61451 -r 61452 -r 61453 -r 61457 -r 61459 -r 61460 -r 61461 -r 61465 -r 61468 -r 61473 -r 61478 -r 61479 -r 61480 -r 61502 -r 61504 -r 61512 -r 61515 -r 61516 -r 61517 -r 61521 -r 61522 -r 61523 -r 61524 -r 61543 -r 61544 -r 61553 -r 61556 -r 61559 -r 61560 -r 61561 -r 61563 -r 61587 -r 61589 -r 61636 -r 61637 -r 61639 -r 61671 -r 61683 -r 61724 -r 61732 -r 61787 -r 61931 -r 62016 -r 62017 -r 62018 -r 62019 -r 62020 -r 62099" +syms = "61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099" #Run the command -cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff {} --font FontAwesome.ttf {} --format lvgl -o {}".format(compr, args.bpp, args.size, r_str, syms, args.output) +cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff -r {} --font FontAwesome.ttf -r {} --format lvgl -o {}".format(compr, args.bpp, args.size, args.range, syms, args.output) os.system(cmd) From e8c14961df672b2cb0d57e670e116f14626e8ff6 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 3 Jun 2019 00:55:59 +0200 Subject: [PATCH 487/590] font: use .list_length property --- src/lv_fonts/lv_font_roboto_18.c | 6 +++--- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lv_fonts/lv_font_roboto_18.c b/src/lv_fonts/lv_font_roboto_18.c index b9c3ef1438cd..dac586d76a3f 100644 --- a/src/lv_fonts/lv_font_roboto_18.c +++ b/src/lv_fonts/lv_font_roboto_18.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 18 px * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 18 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441 -r 61448 -r 61451 -r 61452 -r 61453 -r 61457 -r 61459 -r 61460 -r 61461 -r 61465 -r 61468 -r 61473 -r 61478 -r 61479 -r 61480 -r 61502 -r 61504 -r 61512 -r 61515 -r 61516 -r 61517 -r 61521 -r 61522 -r 61523 -r 61524 -r 61543 -r 61544 -r 61553 -r 61556 -r 61559 -r 61560 -r 61561 -r 61563 -r 61587 -r 61589 -r 61636 -r 61637 -r 61639 -r 61671 -r 61683 -r 61724 -r 61732 -r 61787 -r 61931 -r 62016 -r 62017 -r 62018 -r 62019 -r 62020 -r 62099 --format lvgl -o lv_font_roboto_18.c + * Opts: --no-compress --no-prefilter --bpp 4 --size 18 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_18.c ******************************************************************************/ /*----------------- @@ -1946,11 +1946,11 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = { { .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 }, { .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, - .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 } }; diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index 55e95a459680..a6ffcb70285d 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -127,7 +127,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) } else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) { uint32_t u; - for(u = 0; u < 50 /*fdsc->cmaps[i].list_length*/; u++) { + for(u = 0; u < fdsc->cmaps[i].list_length; u++) { if(fdsc->cmaps[i].unicode_list[u] == rcp) { glyph_id = fdsc->cmaps[i].glyph_id_start + u; } From e01577845ab4446e5be1c7a6cc0bc82e09857326 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 4 Jun 2019 15:20:22 +0200 Subject: [PATCH 488/590] draw tri: fix pixel overwrite with oapcity (from #1091) --- src/lv_draw/lv_draw_triangle.c | 45 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 96bdef37fc38..02147095bd5c 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -27,7 +27,6 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * STATIC VARIABLES **********************/ -static uint8_t corr_value; /********************** * MACROS @@ -47,6 +46,7 @@ static uint8_t corr_value; void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { + /*Return is the triangle is degenerated*/ if(points[0].x == points[1].x && points[0].y == points[1].y) return; if(points[1].x == points[2].x && points[1].y == points[2].y) return; @@ -65,27 +65,19 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l lv_coord_t y_min = LV_MATH_MIN(LV_MATH_MIN(points[0].y, points[1].y), points[2].y); lv_coord_t y_max = LV_MATH_MAX(LV_MATH_MAX(points[0].y, points[1].y), points[2].y); - if(opa < LV_OPA_MAX) { - /*Simply draw the triangles with opacity */ - corr_value = 1; + /* Draw the tall rectangles from vertical lines + * and from the flat triangles from horizontal lines + * to minimize the number of lines. + * Some pixels are overdrawn on the common edges of the triangles + * so use it only if the triangle has no opacity*/ + + /* Draw from horizontal lines*/ + if(x_max - x_min < y_max - y_min) { tri_draw_tall(points, mask, style, opa); - } else { - /* Draw the tall rectangles from vertical lines - * and from the flat triangles from horizontal lines - * to minimize the number of lines. - * Some pixels are overdrawn on the common edges of the triangles - * so use it only if the triangle has no opacity*/ - - corr_value = 0; - - /* Draw from horizontal lines*/ - if(x_max - x_min < y_max - y_min) { - tri_draw_tall(points, mask, style, opa); - } - /*Else flat so draw from vertical lines*/ - else { - tri_draw_flat(points, mask, style, opa); - } + } + /*Else flat so draw from vertical lines*/ + else { + tri_draw_flat(points, mask, style, opa); } } @@ -114,7 +106,6 @@ void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_are tri[2].y = points[i+1].y; lv_draw_triangle(tri, mask, style, opa_scale); } - } /********************** @@ -193,10 +184,10 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s /* Get the area of a line. * Adjust it a little bit to perfectly match (no redrawn pixels) with the adjacent triangles*/ - draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); - draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2) - corr_value; - draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2); + draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2) + 1; + draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); + draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2) - 1; + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; lv_draw_fill(&draw_area, mask, style->body.main_color, opa); @@ -298,7 +289,7 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2); draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2); - draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - corr_value; + draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2) - 1; lv_draw_fill(&draw_area, mask, style->body.main_color, opa); From c54d2d2fd74718da55f418acdec26920efeedde8 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 5 Jun 2019 12:25:49 +0200 Subject: [PATCH 489/590] add built in fonts --- src/lv_core/lv_style.c | 2 +- src/lv_draw/lv_draw_basic.c | 2 +- src/lv_fonts/lv_font_roboto_12.c | 1771 +++++++++ src/lv_fonts/lv_font_roboto_16.c | 2233 +++++++++++ src/lv_fonts/lv_font_roboto_18.c | 2504 ------------ src/lv_fonts/lv_font_roboto_22.c | 3144 +++++++++++++++ src/lv_fonts/lv_font_roboto_28.c | 4294 +++++++++++++++++++++ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h | 2 +- 8 files changed, 11445 insertions(+), 2507 deletions(-) create mode 100644 src/lv_fonts/lv_font_roboto_12.c create mode 100644 src/lv_fonts/lv_font_roboto_16.c delete mode 100644 src/lv_fonts/lv_font_roboto_18.c create mode 100644 src/lv_fonts/lv_font_roboto_22.c create mode 100644 src/lv_fonts/lv_font_roboto_28.c diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 0b7c48a49094..2dfbd7039147 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -94,7 +94,7 @@ void lv_style_init(void) lv_style_scr.text.color = lv_color_make(0x30, 0x30, 0x30); lv_style_scr.text.sel_color = lv_color_make(0x55, 0x96, 0xd8); lv_style_scr.text.font = LV_FONT_DEFAULT; - lv_style_scr.text.letter_space = 2; + lv_style_scr.text.letter_space = 0; lv_style_scr.text.line_space = 2; lv_style_scr.image.opa = LV_OPA_COVER; diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 6f30cd1f298e..8ab7a90d69dc 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -250,7 +250,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv bool g_ret = lv_font_get_glyph_dsc(font_p, &g, letter, '\0'); if(g_ret == false) return; - lv_coord_t pos_x = pos_p->x; + lv_coord_t pos_x = pos_p->x + g.ofs_x; lv_coord_t pos_y = pos_p->y + (font_p->line_height - font_p->base_line) - g.box_h - g.ofs_y; const uint8_t * bpp_opa_table; diff --git a/src/lv_fonts/lv_font_roboto_12.c b/src/lv_fonts/lv_font_roboto_12.c new file mode 100644 index 000000000000..8e0d15aac3d5 --- /dev/null +++ b/src/lv_fonts/lv_font_roboto_12.c @@ -0,0 +1,1771 @@ +#include "lvgl/lvgl.h" + +/******************************************************************************* + * Size: 12 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 12 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_12.c + ******************************************************************************/ + +#ifndef LV_FONT_ROBOTO_12 +#define LV_FONT_ROBOTO_12 1 +#endif + +#if LV_FONT_ROBOTO_12 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x8, 0x0, 0xf1, 0xf, 0x10, 0xf1, 0xf, 0x0, + 0xf0, 0x9, 0x0, 0x10, 0xe, 0x10, 0x0, + + /* U+22 "\"" */ + 0x39, 0x93, 0x39, 0x92, 0x26, 0x80, + + /* U+23 "#" */ + 0x0, 0x6, 0x5, 0x10, 0x3, 0xa0, 0xc0, 0x1, + 0x67, 0x1d, 0x11, 0xbe, 0xcc, 0xeb, 0x0, 0xc0, + 0x67, 0x1, 0x3d, 0x3a, 0x61, 0x5b, 0xd9, 0xe9, + 0x40, 0x57, 0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4, 0x0, 0xd3, + 0x0, 0xf1, 0x3, 0xd0, 0x9, 0x60, 0x4b, 0x0, + 0x61, 0x0, + + /* U+2A "*" */ + 0x0, 0x70, 0x0, 0xd, 0x0, 0x9c, 0xea, 0xc0, + 0x5f, 0x80, 0x1d, 0x2d, 0x10, 0x20, 0x20, + + /* U+2B "+" */ + 0x0, 0x0, 0x0, 0x0, 0x2, 0xe0, 0x0, 0x0, + 0x2e, 0x0, 0x5, 0x9a, 0xf9, 0x92, 0x37, 0x8f, + 0x77, 0x20, 0x2, 0xe0, 0x0, 0x0, 0x2e, 0x0, + 0x0, 0x0, 0x20, 0x0, + + /* U+2C "," */ + 0x13, 0x4c, 0x79, 0x61, + + /* U+2D "-" */ + 0x1, 0x10, 0xad, 0xd1, + + /* U+2E "." */ + 0x2, 0x1, 0xf1, 0x0, 0x0, + + /* U+2F "/" */ + 0x0, 0x3, 0x40, 0x0, 0xb3, 0x0, 0x1c, 0x0, + 0x7, 0x60, 0x0, 0xd1, 0x0, 0x4a, 0x0, 0xa, + 0x40, 0x0, 0xd0, 0x0, 0x68, 0x0, 0x8, 0x20, + 0x0, + + /* U+30 "0" */ + 0x0, 0x79, 0x60, 0x0, 0xb9, 0x4c, 0x70, 0x2e, + 0x0, 0x3e, 0x4, 0xc0, 0x1, 0xf0, 0x5c, 0x0, + 0xf, 0x14, 0xc0, 0x0, 0xf0, 0x3d, 0x0, 0x1f, + 0x0, 0xe3, 0x7, 0xb0, 0x5, 0xed, 0xd2, 0x0, + 0x0, 0x10, 0x0, + + /* U+31 "1" */ + 0x0, 0x52, 0x9e, 0xf4, 0x61, 0xc4, 0x0, 0xc4, + 0x0, 0xc4, 0x0, 0xc4, 0x0, 0xc4, 0x0, 0xc4, + 0x0, 0xc4, + + /* U+32 "2" */ + 0x1, 0x89, 0x60, 0x1, 0xe7, 0x4c, 0x90, 0x5b, + 0x0, 0x3d, 0x0, 0x0, 0x5, 0xb0, 0x0, 0x1, + 0xd3, 0x0, 0x0, 0x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/* U+38 "8" */ + 0x1, 0x79, 0x60, 0x0, 0xc9, 0x4c, 0x80, 0x1f, + 0x0, 0x4d, 0x0, 0xe3, 0x7, 0xa0, 0x4, 0xfe, + 0xe1, 0x0, 0xe5, 0x18, 0xa0, 0x4c, 0x0, 0xf, + 0x2, 0xe1, 0x4, 0xe0, 0x7, 0xec, 0xd4, 0x0, + 0x0, 0x10, 0x0, + + /* U+39 "9" */ + 0x1, 0x89, 0x40, 0xd, 0x85, 0xd4, 0x4c, 0x0, + 0x5c, 0x5b, 0x0, 0x2e, 0x2e, 0x10, 0x6e, 0x8, + 0xec, 0xbd, 0x0, 0x0, 0x6a, 0x0, 0x4, 0xe2, + 0x3, 0xeb, 0x30, + + /* U+3A ":" */ + 0x2, 0x1, 0xf1, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x20, 0x1f, 0x10, 0x0, + + /* U+3B ";" */ + 0x2, 0x1, 0xf1, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x30, 0x4c, 0x7, 0x90, 0x61, 0x0, + + /* U+3C "<" */ + 0x0, 0x0, 0x11, 0x0, 0x2a, 0xe2, 0x3b, 0xd6, + 0x0, 0x7e, 0x60, 0x0, 0x2, 0x9e, 0x91, 0x0, + 0x1, 0x82, + + /* U+3D "=" */ + 0x1b, 0xbb, 0xb8, 0x3, 0x33, 0x32, 0x4, 0x44, + 0x43, 0x1a, 0xaa, 0xa8, + + /* U+3E ">" */ + 0x12, 0x0, 0x0, 0x2e, 0xa3, 0x0, 0x0, 0x5b, + 0xc5, 0x0, 0x5, 0xda, 0x19, 0xea, 0x30, 0x28, + 0x10, 0x0, + + /* U+3F "?" */ + 0x4, 0x98, 0x20, 0x4e, 0x58, 0xe0, 0x34, 0x0, + 0xe2, 0x0, 0x3, 0xe0, 0x0, 0x2e, 0x50, 0x0, + 0xb7, 0x0, 0x0, 0x82, 0x0, 0x0, 0x10, 0x0, + 0x0, 0xd3, 0x0, 0x0, 0x0, 0x0, + + /* U+40 "@" */ + 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0x76, 0xad, 0x20, + 0xf, 0x10, 0x7, 0xb0, 0xf, 0x10, 0x1, 0xf0, + 0xf, 0x10, 0x0, 0xf2, 0xf, 0x10, 0x0, 0xf1, + 0xf, 0x10, 0x4, 0xe0, 0xf, 0x10, 0x3d, 0x60, + 0xf, 0xff, 0xd6, 0x0, + + /* U+45 "E" */ + 0x8, 0x88, 0x88, 0x30, 0xf7, 0x66, 0x62, 0xf, + 0x10, 0x0, 0x0, 0xf1, 0x0, 0x0, 0xf, 0xdd, + 0xdb, 0x0, 0xf2, 0x11, 0x0, 0xf, 0x10, 0x0, + 0x0, 0xf1, 0x0, 0x0, 0xf, 0xee, 0xee, 0x50, + + /* U+46 "F" */ + 0x8, 0x88, 0x88, 0x20, 0xf7, 0x66, 0x61, 0xf, + 0x10, 0x0, 0x0, 0xf1, 0x0, 0x0, 0xf, 0xbb, + 0xb7, 0x0, 0xf5, 0x33, 0x20, 0xf, 0x10, 0x0, + 0x0, 0xf1, 0x0, 0x0, 0xf, 0x10, 0x0, 0x0, + + /* U+47 "G" */ + 0x0, 0x49, 0x95, 0x0, 0x6, 0xe6, 0x5b, 0xa0, + 0xe, 0x30, 0x0, 0xf2, 0x2f, 0x0, 0x0, 0x0, + 0x4d, 0x0, 0x34, 0x41, 0x3e, 0x0, 0x8a, 0xf4, + 0xf, 0x10, 0x0, 0xd4, 0x9, 0xb0, 0x0, 0xe4, + 0x0, 0xae, 0xde, 0x90, 0x0, 0x0, 0x10, 0x0, + + /* U+48 "H" */ + 0x8, 0x0, 0x0, 0x44, 0xf, 0x10, 0x0, 0x98, + 0xf, 0x10, 0x0, 0x98, 0xf, 0x10, 0x0, 0x98, + 0xf, 0xdd, 0xdd, 0xf8, 0xf, 0x21, 0x11, 0x98, + 0xf, 0x10, 0x0, 0x98, 0xf, 0x10, 0x0, 0x98, + 0xf, 0x10, 0x0, 0x98, + + /* U+49 "I" */ + 0x71, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, 0xe3, +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, 0x0, 0xd8, + + /* U+4F "O" */ + 0x0, 0x39, 0x95, 0x0, 0x5, 0xe7, 0x6d, 0x90, + 0xe, 0x40, 0x1, 0xe2, 0x2e, 0x0, 0x0, 0xa6, + 0x4d, 0x0, 0x0, 0x98, 0x3d, 0x0, 0x0, 0x97, + 0x1f, 0x10, 0x0, 0xc5, 0xa, 0xa0, 0x6, 0xd0, + 0x1, 0xae, 0xec, 0x30, 0x0, 0x0, 0x10, 0x0, + + /* U+50 "P" */ + 0x8, 0x88, 0x74, 0x0, 0xf, 0x76, 0x7d, 0x80, + 0xf, 0x10, 0x2, 0xf0, 0xf, 0x10, 0x1, 0xf0, + 0xf, 0x54, 0x5b, 0xb0, 0xf, 0xba, 0x96, 0x0, + 0xf, 0x10, 0x0, 0x0, 0xf, 0x10, 0x0, 0x0, + 0xf, 0x10, 0x0, 0x0, + + /* U+51 "Q" */ + 0x0, 0x49, 0x95, 0x0, 0x6, 0xe7, 0x6d, 0x80, + 0xe, 0x30, 0x1, 0xf2, 0x3e, 0x0, 0x0, 0xb5, + 0x5c, 0x0, 0x0, 0xa7, 0x4d, 0x0, 0x0, 0xa7, + 0x2f, 0x0, 0x0, 0xd4, 0xa, 0x90, 0x7, 0xd0, + 0x1, 0xbe, 0xef, 0x40, 0x0, 0x0, 0x16, 0xe3, + 0x0, 0x0, 0x0, 0x30, + + /* U+52 "R" */ + 0x8, 0x88, 0x72, 0x0, 0xf, 0x76, 0x8e, 0x40, + 0xf, 0x10, 0x7, 0xb0, 0xf, 0x10, 0x7, 0xb0, + 0xf, 0x76, 0x8e, 0x40, 0xf, 0x98, 0xe6, 0x0, + 0xf, 0x10, 0x5d, 0x0, 0xf, 0x10, 0xc, 0x60, + 0xf, 0x10, 0x4, 0xe0, + + /* U+53 "S" */ + 0x0, 0x79, 0x82, 0x0, 0xc9, 0x57, 0xe2, 0x3e, + 0x0, 0x8, 0x81, 0xf6, 0x0, 0x0, 0x3, 0xde, + 0x82, 0x0, 0x0, 0x39, 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x56, 0x6, 0x50, + + /* U+5F "_" */ + 0xde, 0xee, 0xe5, + + /* U+60 "`" */ + 0x4d, 0x10, 0x56, + + /* U+61 "a" */ + 0x0, 0x56, 0x20, 0xc, 0x97, 0xe4, 0x15, 0x0, + 0x79, 0x4, 0xbc, 0xea, 0x2e, 0x20, 0x7a, 0x4d, + 0x0, 0xaa, 0xb, 0xee, 0xbc, 0x0, 0x0, 0x0, + + /* U+62 "b" */ + 0x2e, 0x0, 0x0, 0x2, 0xe0, 0x0, 0x0, 0x2e, + 0x26, 0x40, 0x2, 0xfb, 0x8d, 0x80, 0x2f, 0x0, + 0x2f, 0x2, 0xe0, 0x0, 0xe2, 0x2e, 0x0, 0xf, + 0x12, 0xf2, 0x5, 0xd0, 0x2e, 0xbd, 0xe4, 0x0, + 0x0, 0x0, 0x0, + + /* U+63 "c" */ + 0x0, 0x46, 0x20, 0xa, 0xb7, 0xd5, 0x3d, 0x0, + 0x3a, 0x6a, 0x0, 0x0, 0x6a, 0x0, 0x0, 0x2e, + 0x10, 0x5b, 0x5, 0xed, 0xc2, 0x0, 0x0, 0x0, + + /* U+64 "d" */ + 0x0, 0x0, 0x2e, 0x0, 0x0, 0x2e, 0x0, 0x55, + 0x3e, 0xb, 0xc8, 0xce, 0x3e, 0x0, 0x3e, 0x6a, + 0x0, 0x2e, 0x5b, 0x0, 0x2e, 0x1f, 0x20, 0x6e, + 0x6, 0xed, 0xae, 0x0, 0x0, 0x0, + + /* U+65 "e" */ + 0x0, 0x46, 0x20, 0x9, 0xb7, 0xd4, 0x3d, 0x0, + 0x4c, 0x6e, 0xbb, 0xce, 0x6b, 0x22, 0x21, 0x2e, + 0x20, 0x15, 0x5, 0xed, 0xe4, 0x0, 0x1, 0x0, + + /* U+66 "f" */ + 0x0, 0x1, 0x0, 0x2e, 0xd2, 0x9, 0x80, 0x3, + 0xc9, 0x40, 0x5d, 0xb6, 0x0, 0xa7, 0x0, 0xa, + 0x70, 0x0, 0xa7, 0x0, 0xa, 0x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 0x50, 0x7, 0xe6, + 0x0, 0x10, + + /* U+75 "u" */ + 0x14, 0x0, 0x14, 0x3d, 0x0, 0x4c, 0x3d, 0x0, + 0x4c, 0x3d, 0x0, 0x4c, 0x3e, 0x0, 0x4c, 0x1f, + 0x10, 0x8c, 0x9, 0xed, 0xbc, 0x0, 0x0, 0x0, + + /* U+76 "v" */ + 0x41, 0x0, 0x32, 0x89, 0x0, 0xc4, 0x2e, 0x1, + 0xe0, 0xc, 0x37, 0x90, 0x6, 0x9c, 0x30, 0x1, + 0xed, 0x0, 0x0, 0xb7, 0x0, + + /* U+77 "w" */ + 0x32, 0x0, 0x50, 0x2, 0x38, 0x80, 0x3f, 0x30, + 0x87, 0x3c, 0x8, 0xc7, 0xc, 0x30, 0xe1, 0xd2, + 0xc1, 0xe0, 0xa, 0x7b, 0xc, 0x79, 0x0, 0x5f, + 0x60, 0x7e, 0x50, 0x1, 0xf2, 0x2, 0xf0, 0x0, + + /* U+78 "x" */ + 0x33, 0x0, 0x42, 0x2e, 0x12, 0xe1, 0x7, 0xac, + 0x60, 0x0, 0xdc, 0x0, 0x2, 0xee, 0x10, 0xc, + 0x67, 0xb0, 0x6c, 0x0, 0xd5, + + /* U+79 "y" */ + 0x42, 0x0, 0x32, 0x99, 0x0, 0xe3, 0x3e, 0x3, + 0xe0, 0xd, 0x48, 0x80, 0x7, 0x9d, 0x30, 0x2, + 0xfd, 0x0, 0x0, 0xc8, 0x0, 0x0, 0xd2, 0x0, + 0x39, 0xb0, 0x0, 0x47, 0x0, 0x0, + + /* U+7A "z" */ + 0x25, 0x55, 0x52, 0x38, 0x89, 0xf4, 0x0, 0xa, + 0x80, 0x0, 0x7c, 0x0, 0x3, 0xe2, 0x0, 0x1d, + 0x50, 0x0, 0x7f, 0xdd, 0xd7, + + /* U+7B "{" */ + 0x0, 0x2, 0x0, 0xb8, 0x3, 0xd0, 0x5, 0xb0, + 0x6, 0xa0, 0xa, 0x70, 0x8f, 0x10, 0x8, 0x80, + 0x6, 0xb0, 0x5, 0xb0, 0x2, 0xe0, 0x0, 0x7a, + 0x0, 0x0, + + /* U+7C "|" */ + 0x7e, 0xee, 0xee, 0xee, 0xee, 0x80, + + /* U+7D "}" */ + 0x20, 0x0, 0x7b, 0x0, 0xc, 0x40, 0xa, 0x60, + 0xa, 0x60, 0x6, 0xb1, 0x1, 0xe9, 0x7, 0x90, + 0xa, 0x60, 0xa, 0x60, 0xd, 0x30, 0x98, 0x0, + 0x0, 0x0, + + /* U+7E "~" */ + 0x3, 0xa7, 0x0, 0x43, 0xe, 0x5a, 0xc5, 0xd2, + 0x15, 0x0, 0x59, 0x40, + + /* U+F001 "" */ + 0x0, 0x0, 0x0, 0x0, 0x15, 0x0, 0x0, 0x0, + 0x27, 0xcf, 0xf4, 0x0, 0x4, 0xdf, 0xff, 0xff, + 0x40, 0x0, 0x9f, 0xff, 0xff, 0xf4, 0x0, 0x9, + 0xff, 0xfb, 0x6a, 0x40, 0x0, 0x9b, 0x40, 0x0, + 0x94, 0x0, 0x9, 0x40, 0x0, 0x9, 0x40, 0x0, + 0x94, 0x1, 0x78, 0xb4, 0x0, 0x9, 0x40, 0xef, + 0xff, 0x45, 0xcc, 0xd4, 0x7, 0xef, 0xa0, 0xef, + 0xff, 0x30, 0x0, 0x0, 0x3, 0x9a, 0x50, 0x0, + 0x0, 0x0, + + /* U+F008 "" */ + 0x36, 0x66, 0x66, 0x66, 0x66, 0x66, 0x2e, 0x6b, + 0xb6, 0x66, 0x66, 0xca, 0x7c, 0xd0, 0x76, 0x0, + 0x0, 0x9, 0x40, 0xdf, 0xef, 0x60, 0x0, 0x0, + 0x9e, 0xed, 0xe0, 0x76, 0x0, 0x0, 0x9, 0x50, + 0xde, 0x4a, 0xa4, 0x44, 0x44, 0xc8, 0x5d, 0xf9, + 0xdd, 0x99, 0x99, 0x9d, 0xca, 0xdd, 0x6, 0x60, + 0x0, 0x0, 0x94, 0xd, 0xfb, 0xe6, 0x0, 0x0, + 0x9, 0xdc, 0xde, 0x28, 0x60, 0x0, 0x0, 0x96, + 0x3d, 0xe2, 0x88, 0x22, 0x22, 0x2b, 0x63, 0xd7, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb5, + + /* U+F00B "" */ + 0x46, 0x61, 0x36, 0x66, 0x66, 0x64, 0xff, 0xf6, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xaf, 0xff, + 0xff, 0xff, 0x12, 0x20, 0x2, 0x22, 0x22, 0x21, + 0xef, 0xf4, 0x9f, 0xff, 0xff, 0xfe, 0xff, 0xf6, + 0xbf, 0xff, 0xff, 0xff, 0x79, 0x92, 0x49, 0x99, + 0x99, 0x97, 0x79, 0x92, 0x49, 0x99, 0x99, 0x97, + 0xff, 0xf6, 0xbf, 0xff, 0xff, 0xff, 0xef, 0xf4, + 0x9f, 0xff, 0xff, 0xfe, + + /* U+F00C "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x3e, 0x70, 0x0, 0x0, 0x0, 0x3, + 0xff, 0xf1, 0x2, 0x80, 0x0, 0x3f, 0xff, 0x70, + 0xe, 0xfb, 0x3, 0xff, 0xf7, 0x0, 0xd, 0xff, + 0xcf, 0xff, 0x70, 0x0, 0x1, 0xcf, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x1d, 0xff, 0x70, 0x0, 0x0, + 0x0, 0x1, 0xb7, 0x0, 0x0, 0x0, + + /* U+F00D "" */ + 0x5, 0xb1, 0x0, 0x69, 0x2, 0xff, 0xd1, 0x7f, + 0xf8, 0xb, 0xff, 0xef, 0xff, 0x30, 0xb, 0xff, + 0xff, 0x30, 0x0, 0x7f, 0xff, 0xd1, 0x0, 0x7f, + 0xff, 0xff, 0xd1, 0x2f, 0xff, 0x4b, 0xff, 0x90, + 0x9f, 0x30, 0xb, 0xe2, 0x0, 0x0, 0x0, 0x0, + 0x0, + + /* U+F011 "" */ + 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 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 0x22, 0x93, 0x0, 0x0, 0x2d, + 0xce, 0x8f, 0x60, 0x0, 0x4e, 0x8a, 0x7f, 0xf6, + 0x0, 0x7e, 0x7e, 0xff, 0x7e, 0xa0, 0x8d, 0x8f, + 0xff, 0xff, 0x8c, 0xb3, 0x4f, 0xff, 0xff, 0xff, + 0x64, 0x4, 0xff, 0xd6, 0xbf, 0xf6, 0x0, 0x4f, + 0xfb, 0x9, 0xff, 0x60, 0x3, 0xff, 0xb0, 0x9f, + 0xf5, 0x0, + + /* U+F019 "" */ + 0x0, 0x0, 0x24, 0x20, 0x0, 0x0, 0x0, 0x0, + 0xbf, 0xd0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0xd0, + 0x0, 0x0, 0x0, 0x0, 0xbf, 0xd0, 0x0, 0x0, + 0x0, 0xad, 0xff, 0xfd, 0xc0, 0x0, 0x0, 0x2e, + 0xff, 0xff, 0x40, 0x0, 0x0, 0x2, 0xef, 0xf4, + 0x0, 0x0, 0x46, 0x65, 0x3d, 0x45, 0x66, 0x50, + 0xff, 0xff, 0xa3, 0x9f, 0xff, 0xf2, 0xff, 0xff, + 0xff, 0xfd, 0xaa, 0xd2, 0xef, 0xff, 0xff, 0xff, + 0xff, 0xe1, + + /* U+F01C "" */ + 0x1, 0x99, 0x99, 0x99, 0x30, 0x0, 0x8e, 0xbb, + 0xbb, 0xdd, 0x0, 0xe, 0x60, 0x0, 0x2, 0xf4, + 0x6, 0xf0, 0x0, 0x0, 0xb, 0xa0, 0xc9, 0x0, + 0x0, 0x0, 0x4f, 0x1f, 0xed, 0x90, 0x5, 0xdd, + 0xf4, 0xff, 0xff, 0x99, 0xdf, 0xff, 0x4f, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x30, + + /* U+F021 "" */ + 0x0, 0x2, 0x56, 0x30, 0x0, 0x0, 0x1b, 0xff, + 0xff, 0xd3, 0xc3, 0xc, 0xfb, 0x55, 0x9f, 0xff, + 0x46, 0xf9, 0x0, 0x0, 0xdf, 0xf4, 0xac, 0x0, + 0x0, 0x6d, 0xdd, 0x30, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x56, 0x64, 0x0, 0x0, 0x36, 0xf, 0xff, + 0x80, 0x0, 0x1e, 0xd0, 0xff, 0xf5, 0x0, 0x2c, + 0xf5, 0xf, 0xaf, 0xff, 0xef, 0xf8, 0x0, 0x40, + 0x29, 0xcc, 0xa3, 0x0, 0x0, + + /* U+F026 "" */ + 0x0, 0x0, 0x30, 0x0, 0x5, 0xf2, 0x0, 0x5f, + 0xf2, 0xff, 0xff, 0xf2, 0xff, 0xff, 0xf2, 0xff, + 0xff, 0xf2, 0x56, 0xbf, 0xf2, 0x0, 0xb, 0xf2, + 0x0, 0x0, 0x91, + + /* U+F027 "" */ + 0x0, 0x0, 0x30, 0x0, 0x0, 0x5, 0xf2, 0x0, + 0x0, 0x5f, 0xf2, 0x0, 0xff, 0xff, 0xf2, 0xa3, + 0xff, 0xff, 0xf2, 0x3a, 0xff, 0xff, 0xf2, 0x97, + 0x56, 0xbf, 0xf2, 0x30, 0x0, 0xb, 0xf2, 0x0, + 0x0, 0x0, 0x91, 0x0, + + /* U+F028 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x30, 0x6, 0xb1, 0x0, 0x0, 0x5, 0xf2, 0x15, + 0x4d, 0x10, 0x0, 0x5f, 0xf2, 0xa, 0x95, 0x90, + 0xff, 0xff, 0xf2, 0xa3, 0xc2, 0xd0, 0xff, 0xff, + 0xf2, 0x3a, 0x76, 0xc1, 0xff, 0xff, 0xf2, 0x97, + 0x94, 0xd0, 0x56, 0xbf, 0xf2, 0x34, 0xd2, 0xc0, + 0x0, 0xb, 0xf2, 0x1b, 0x2c, 0x40, 0x0, 0x0, + 0x91, 0x2, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x3, + 0x20, 0x0, + + /* U+F03E "" */ + 0x36, 0x66, 0x66, 0x66, 0x66, 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xfb, 0x20, 0x0, 0x0, 0xff, + 0xff, 0xfa, 0x10, 0x0, 0xff, 0xff, 0xff, 0xf8, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, + 0xff, 0xfe, 0x60, 0xff, 0xff, 0xff, 0x80, 0x0, + 0xff, 0xff, 0x91, 0x0, 0x0, 0xff, 0xb2, 0x0, + 0x0, 0x0, 0xb3, 0x0, 0x0, 0x0, 0x0, + + /* U+F04C "" */ + 0x56, 0x66, 0x10, 0x56, 0x66, 0x1f, 0xff, 0xf4, + 0xf, 0xff, 0xf4, 0xff, 0xff, 0x40, 0xff, 0xff, + 0x4f, 0xff, 0xf4, 0xf, 0xff, 0xf4, 0xff, 0xff, + 0x40, 0xff, 0xff, 0x4f, 0xff, 0xf4, 0xf, 0xff, + 0xf4, 0xff, 0xff, 0x40, 0xff, 0xff, 0x4f, 0xff, + 0xf4, 0xf, 0xff, 0xf4, 0xff, 0xff, 0x40, 0xff, + 0xff, 0x4f, 0xff, 0xf4, 0xf, 0xff, 0xf4, 0xcd, + 0xdd, 0x30, 0xcd, 0xdd, 0x30, + + /* U+F04D "" */ + 0x56, 0x66, 0x66, 0x66, 0x66, 0x1f, 0xff, 0xff, + 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x4f, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xcd, + 0xdd, 0xdd, 0xdd, 0xdd, 0x30, + + /* U+F051 "" */ + 0x20, 0x0, 0x4, 0x4f, 0x30, 0x0, 0xdd, 0xff, + 0x30, 0xd, 0xdf, 0xff, 0x30, 0xdd, 0xff, 0xff, + 0x3d, 0xdf, 0xff, 0xff, 0xed, 0xff, 0xff, 0x9d, + 0xdf, 0xff, 0x90, 0xdd, 0xff, 0x90, 0xd, 0xdf, + 0x80, 0x0, 0xdd, 0x80, 0x0, 0xa, 0xa0, + + /* U+F052 "" */ + 0x0, 0x0, 0x35, 0x0, 0x0, 0x0, 0x0, 0x3e, + 0xf7, 0x0, 0x0, 0x0, 0x3e, 0xff, 0xf7, 0x0, + 0x0, 0x3e, 0xff, 0xff, 0xf7, 0x0, 0x3e, 0xff, + 0xff, 0xff, 0xf7, 0x8, 0x99, 0x99, 0x99, 0x99, + 0x91, 0x89, 0x99, 0x99, 0x99, 0x99, 0x1f, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x30, + + /* U+F053 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0xf4, 0x0, + 0x5, 0xff, 0xd0, 0x5, 0xff, 0xe2, 0x5, 0xff, + 0xe2, 0x5, 0xff, 0xe2, 0x0, 0xcf, 0xf9, 0x0, + 0x1, 0xdf, 0xf8, 0x0, 0x1, 0xdf, 0xf8, 0x0, + 0x1, 0xdf, 0xf7, 0x0, 0x1, 0xdf, 0xb0, 0x0, + 0x1, 0x80, + + /* U+F054 "" */ + 0x0, 0x0, 0x0, 0x0, 0xa, 0xd1, 0x0, 0x0, + 0x4f, 0xfd, 0x10, 0x0, 0x7, 0xff, 0xd1, 0x0, + 0x0, 0x7f, 0xfd, 0x10, 0x0, 0x7, 0xff, 0xd1, + 0x0, 0x1, 0xef, 0xf5, 0x0, 0x1d, 0xff, 0x70, + 0x1, 0xdf, 0xf7, 0x0, 0x1d, 0xff, 0x80, 0x0, + 0x2f, 0xf8, 0x0, 0x0, 0x3, 0x60, 0x0, 0x0, + + /* U+F067 "" */ + 0x0, 0x2, 0x64, 0x0, 0x0, 0x0, 0x9, 0xff, + 0x0, 0x0, 0x0, 0x9, 0xff, 0x0, 0x0, 0x0, + 0x9, 0xff, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, + 0xf4, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x79, 0x9d, + 0xff, 0x99, 0x92, 0x0, 0x9, 0xff, 0x0, 0x0, + 0x0, 0x9, 0xff, 0x0, 0x0, 0x0, 0x7, 0xfe, + 0x0, 0x0, + + /* U+F068 "" */ + 0xef, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, + 0xff, 0xf6, 0x79, 0x99, 0x99, 0x99, 0x92, + + /* U+F071 "" */ + 0x0, 0x0, 0x1, 0x10, 0x0, 0x0, 0x0, 0x0, + 0xe, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xf7, + 0x0, 0x0, 0x0, 0x1, 0xff, 0xff, 0x10, 0x0, + 0x0, 0x9, 0xf3, 0x3f, 0x90, 0x0, 0x0, 0x2f, + 0xf1, 0x1f, 0xf2, 0x0, 0x0, 0xaf, 0xf1, 0x1f, + 0xfa, 0x0, 0x3, 0xff, 0xf8, 0x8f, 0xff, 0x30, + 0xb, 0xff, 0xf8, 0x8f, 0xff, 0xb0, 0x4f, 0xff, + 0xf2, 0x2f, 0xff, 0xf4, 0xdf, 0xff, 0xfe, 0xef, + 0xff, 0xfd, 0xad, 0xdd, 0xdd, 0xdd, 0xdd, 0xda, + + /* U+F074 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x8, 0x50, 0x99, 0x71, 0x0, 0x58, + 0x9d, 0xf5, 0xff, 0xfe, 0x2a, 0xff, 0xff, 0xfc, + 0x12, 0x6f, 0x8f, 0xb3, 0x2a, 0xc1, 0x0, 0x5, + 0xdf, 0x10, 0x5, 0x10, 0x0, 0x5, 0xf9, 0x0, + 0x0, 0x0, 0x0, 0xd, 0xf9, 0x40, 0x8, 0x50, + 0x99, 0xcf, 0x8d, 0xfa, 0x9d, 0xf5, 0xff, 0xf9, + 0x4, 0xef, 0xff, 0xfc, 0x12, 0x0, 0x0, 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0xff, 0xff, 0xff, 0xf1, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x8f, 0xff, + 0xff, 0xff, 0xff, 0xa0, + + /* U+F093 "" */ + 0x0, 0x0, 0x1b, 0x20, 0x0, 0x0, 0x0, 0x1, + 0xdf, 0xe3, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xfe, + 0x30, 0x0, 0x0, 0xbf, 0xff, 0xff, 0xd0, 0x0, + 0x0, 0x0, 0xbf, 0xd0, 0x0, 0x0, 0x0, 0x0, + 0xbf, 0xd0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0xd0, + 0x0, 0x0, 0x79, 0x96, 0x36, 0x45, 0x99, 0x80, + 0xff, 0xff, 0xcb, 0xcf, 0xff, 0xf2, 0xff, 0xff, + 0xff, 0xfd, 0x99, 0xd2, 0xbd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xc0, + + /* U+F095 "" */ + 0x5, 0x10, 0x0, 0x0, 0x0, 0x9f, 0xb0, 0x0, + 0x0, 0x0, 0xff, 0xf4, 0x0, 0x0, 0x0, 0xef, + 0xc1, 0x0, 0x0, 0x0, 0x8f, 0x50, 0x0, 0x0, + 0x0, 0x2f, 0xe1, 0x0, 0x0, 0x0, 0x6, 0xfc, + 0x10, 0x14, 0x0, 0x0, 0x8f, 0xe5, 0xcf, 0xb1, + 0x0, 0x6, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x28, + 0xef, 0x90, + + /* U+F0C4 "" */ + 0x17, 0x83, 0x0, 0x0, 0x0, 0x0, 0xcb, 0x9e, + 0x60, 0x0, 0x2, 0x75, 0xe3, 0x2, 0xf0, 0x0, + 0x75, 0x18, 0x6e, 0x77, 0xf5, 0x56, 0x3, 0x60, + 0x4, 0x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, 0x0, 0x1f, 0xf8, + 0x0, 0x4f, 0xf3, 0x47, 0x8f, 0xff, 0xfa, 0xcf, + 0xff, 0xf3, 0x85, 0x2f, 0xb0, 0x0, 0x4f, 0x30, + 0x0, 0x8c, 0x0, 0x0, 0xc4, 0x0, 0x0, 0xc0, + 0x0, 0x1, 0x40, 0x0, + + /* U+F0F3 "" */ + 0x0, 0x0, 0x1, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x1b, 0xb1, 0x0, 0x0, 0x0, 0x6, 0xff, 0xff, + 0x60, 0x0, 0x0, 0x2f, 0xff, 0xff, 0xf2, 0x0, + 0x0, 0x6f, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x7f, + 0xff, 0xff, 0xf7, 0x0, 0x0, 0x9f, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0xdf, 0xff, 0xff, 0xfd, 0x0, + 0x4, 0xff, 0xff, 0xff, 0xff, 0x40, 0x1d, 0xff, + 0xff, 0xff, 0xff, 0xd1, 0x5f, 0xff, 0xff, 0xff, + 0xff, 0xf5, 0x0, 0x0, 0x8c, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x18, 0x91, 0x0, 0x0, + + /* U+F11C "" */ + 0x8b, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x6d, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x2d, 0xd3, 0x77, 0x3b, + 0x19, 0x55, 0xb2, 0xdd, 0x14, 0x13, 0x3, 0x12, + 0x2c, 0x2d, 0xd2, 0x93, 0x61, 0x72, 0x55, 0x91, + 0xdd, 0x25, 0x59, 0x99, 0x99, 0x36, 0x1d, 0xd1, + 0x22, 0x44, 0x44, 0x41, 0x30, 0xdc, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xda, + + /* U+F124 "" */ + 0x0, 0x0, 0x0, 0x0, 0x53, 0x0, 0x0, 0x0, + 0x5d, 0xf2, 0x0, 0x0, 0x5d, 0xff, 0xa0, 0x0, + 0x5d, 0xff, 0xff, 0x20, 0x5d, 0xff, 0xff, 0xfa, + 0x0, 0x89, 0x99, 0xef, 0xf2, 0x0, 0x0, 0x0, + 0xbf, 0xa0, 0x0, 0x0, 0x0, 0xbf, 0x20, 0x0, + 0x0, 0x0, 0xba, 0x0, 0x0, 0x0, 0x0, 0x82, + 0x0, 0x0, + + /* U+F15B "" */ + 0x24, 0x44, 0x44, 0x0, 0x0, 0xf, 0xff, 0xff, + 0xf2, 0x60, 0x0, 0xff, 0xff, 0xff, 0x2f, 0x60, + 0xf, 0xff, 0xff, 0xf2, 0xff, 0x60, 0xff, 0xff, + 0xff, 0x22, 0x22, 0xf, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x4f, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x9b, 0xbb, 0xbb, 0xbb, 0xbb, 0x10, + + /* U+F1EB "" */ + 0x0, 0x0, 0x14, 0x65, 0x40, 0x0, 0x0, 0x0, + 0x5c, 0xff, 0xff, 0xff, 0xa2, 0x0, 0x1b, 0xff, + 0xa6, 0x45, 0x7c, 0xff, 0x80, 0x8f, 0xa2, 0x6b, + 0xdc, 0xa4, 0x4d, 0xf3, 0x4, 0x4e, 0xff, 0xee, + 0xff, 0xc2, 0x40, 0x0, 0x9f, 0x72, 0x32, 0x2b, + 0xf5, 0x0, 0x0, 0x1, 0x9f, 0xff, 0xe5, 0x20, + 0x0, 0x0, 0x0, 0x9d, 0x78, 0xe5, 0x0, 0x0, + 0x0, 0x0, 0x1, 0xa8, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x95, 0x0, 0x0, 0x0, + + /* U+F240 "" */ + 0x59, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x10, + 0xe4, 0x44, 0x44, 0x44, 0x44, 0x44, 0x47, 0x80, + 0xd3, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xb4, 0xb0, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd1, 0xa6, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x66, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x66, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd4, 0xe2, + 0xd1, 0x44, 0x44, 0x44, 0x44, 0x44, 0x34, 0x90, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0x50, + + /* U+F241 "" */ + 0x59, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x10, + 0xe4, 0x44, 0x44, 0x44, 0x44, 0x44, 0x47, 0x80, + 0xd3, 0xdd, 0xdd, 0xdd, 0xdd, 0x30, 0x4, 0xb0, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0x40, 0x1, 0xa6, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x66, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x66, + 0xd4, 0xff, 0xff, 0xff, 0xff, 0x40, 0x4, 0xe2, + 0xd1, 0x44, 0x44, 0x44, 0x44, 0x10, 0x4, 0x90, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0x50, + + /* U+F242 "" */ + 0x59, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x10, + 0xe4, 0x44, 0x44, 0x44, 0x44, 0x44, 0x47, 0x80, + 0xd3, 0xdd, 0xdd, 0xd9, 0x0, 0x0, 0x4, 0xb0, + 0xd4, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x1, 0xa6, + 0xd4, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0x66, + 0xd4, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x0, 0x66, + 0xd4, 0xff, 0xff, 0xfb, 0x0, 0x0, 0x4, 0xe2, + 0xd1, 0x44, 0x44, 0x43, 0x0, 0x0, 0x4, 0x90, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0x50, + + /* U+F243 "" */ + 0x59, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x10, + 0xe4, 0x44, 0x44, 0x44, 0x44, 0x44, 0x47, 0x80, + 0xd3, 0xdd, 0xd1, 0x0, 0x0, 0x0, 0x4, 0xb0, + 0xd4, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x1, 0xa6, + 0xd4, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x66, + 0xd4, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x66, + 0xd4, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x4, 0xe2, + 0xd1, 0x44, 0x40, 0x0, 0x0, 0x0, 0x4, 0x90, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0x50, + + /* U+F244 "" */ + 0x59, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x10, + 0xe4, 0x44, 0x44, 0x44, 0x44, 0x44, 0x47, 0x80, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0xb0, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xa6, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0xe2, + 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x90, + 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xde, 0x50, + + /* U+F293 "" */ + 0x0, 0x0, 0x33, 0x10, 0x0, 0x0, 0x8f, 0xef, + 0xfb, 0x10, 0x6, 0xff, 0xb5, 0xff, 0xb0, 0xc, + 0xff, 0xb0, 0x5f, 0xf1, 0x1f, 0xa6, 0xb5, 0x56, + 0xf5, 0x2f, 0xf5, 0x32, 0x2d, 0xf7, 0x4f, 0xff, + 0x40, 0xdf, 0xf8, 0x3f, 0xfb, 0x10, 0x6f, 0xf7, + 0x2f, 0xc2, 0x95, 0x57, 0xf6, 0xe, 0xed, 0xb3, + 0x2c, 0xf3, 0x9, 0xff, 0xb1, 0xcf, 0xe0, 0x1, + 0xef, 0xcc, 0xff, 0x40, 0x0, 0x7, 0xaa, 0x82, + 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 48, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 49, .box_h = 10, .box_w = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 15, .adv_w = 61, .box_h = 3, .box_w = 4, .ofs_x = 0, .ofs_y = 6}, + {.bitmap_index = 21, .adv_w = 120, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 53, .adv_w = 108, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 95, .adv_w = 141, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 140, .adv_w = 119, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 180, .adv_w = 33, .box_h = 3, .box_w = 2, .ofs_x = 0, .ofs_y = 6}, + {.bitmap_index = 183, .adv_w = 66, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 209, .adv_w = 67, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 235, .adv_w = 83, .box_h = 6, .box_w = 5, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 250, .adv_w = 109, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 278, .adv_w = 38, .box_h = 4, .box_w = 2, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 282, .adv_w = 53, .box_h = 2, .box_w = 4, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 286, .adv_w = 51, .box_h = 3, .box_w = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 291, .adv_w = 79, .box_h = 10, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 316, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 351, .adv_w = 108, .box_h = 9, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 369, .adv_w = 108, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 401, .adv_w = 108, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 431, .adv_w = 108, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 463, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 498, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 533, .adv_w = 108, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 565, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 600, .adv_w = 108, .box_h = 9, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 627, .adv_w = 47, .box_h = 8, .box_w = 3, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 639, .adv_w = 41, .box_h = 9, .box_w = 3, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 653, .adv_w = 98, .box_h = 6, .box_w = 6, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 671, .adv_w = 105, .box_h = 4, .box_w = 6, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 683, .adv_w = 100, .box_h = 6, .box_w = 6, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 701, .adv_w = 91, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 731, .adv_w = 172, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 797, .adv_w = 125, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 833, .adv_w = 120, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 865, .adv_w = 125, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 905, .adv_w = 126, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 941, .adv_w = 109, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 973, .adv_w = 106, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1005, .adv_w = 131, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1045, .adv_w = 137, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1081, .adv_w = 52, .box_h = 9, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1090, .adv_w = 106, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1120, .adv_w = 120, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1156, .adv_w = 103, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1188, .adv_w = 168, .box_h = 9, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1233, .adv_w = 137, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1269, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1309, .adv_w = 121, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1345, .adv_w = 132, .box_h = 11, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1389, .adv_w = 118, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1425, .adv_w = 114, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1460, .adv_w = 115, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1492, .adv_w = 125, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1527, .adv_w = 122, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1563, .adv_w = 170, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1613, .adv_w = 120, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1649, .adv_w = 115, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1685, .adv_w = 115, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1717, .adv_w = 51, .box_h = 12, .box_w = 4, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1741, .adv_w = 79, .box_h = 10, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1766, .adv_w = 51, .box_h = 12, .box_w = 3, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1784, .adv_w = 80, .box_h = 5, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 1797, .adv_w = 87, .box_h = 1, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1800, .adv_w = 59, .box_h = 2, .box_w = 3, .ofs_x = 0, .ofs_y = 7}, + {.bitmap_index = 1803, .adv_w = 104, .box_h = 8, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1827, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1862, .adv_w = 101, .box_h = 8, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1886, .adv_w = 108, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1916, .adv_w = 102, .box_h = 8, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1940, .adv_w = 67, .box_h = 10, .box_w = 5, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1965, .adv_w = 108, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1995, .adv_w = 106, .box_h = 9, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2022, .adv_w = 47, .box_h = 9, .box_w = 3, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2036, .adv_w = 46, .box_h = 12, .box_w = 3, .ofs_x = -1, .ofs_y = -3}, + {.bitmap_index = 2054, .adv_w = 97, .box_h = 9, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2086, .adv_w = 47, .box_h = 9, .box_w = 2, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2095, .adv_w = 168, .box_h = 7, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2130, .adv_w = 106, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2151, .adv_w = 110, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2179, .adv_w = 108, .box_h = 10, .box_w = 7, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2214, .adv_w = 109, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2244, .adv_w = 65, .box_h = 7, .box_w = 4, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2258, .adv_w = 99, .box_h = 8, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2282, .adv_w = 63, .box_h = 9, .box_w = 4, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2300, .adv_w = 106, .box_h = 8, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2324, .adv_w = 93, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2345, .adv_w = 144, .box_h = 7, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2377, .adv_w = 95, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2398, .adv_w = 91, .box_h = 10, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2428, .adv_w = 95, .box_h = 7, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2449, .adv_w = 65, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2475, .adv_w = 47, .box_h = 11, .box_w = 1, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 2481, .adv_w = 65, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2507, .adv_w = 131, .box_h = 3, .box_w = 8, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 2519, .adv_w = 165, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2585, .adv_w = 206, .box_h = 12, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2663, .adv_w = 192, .box_h = 10, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2723, .adv_w = 192, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2777, .adv_w = 151, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2818, .adv_w = 165, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2884, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2945, .adv_w = 151, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3000, .adv_w = 178, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3050, .adv_w = 178, .box_h = 11, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3116, .adv_w = 165, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3166, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3227, .adv_w = 82, .box_h = 9, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3254, .adv_w = 123, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3290, .adv_w = 178, .box_h = 11, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3356, .adv_w = 206, .box_h = 11, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3428, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3489, .adv_w = 110, .box_h = 11, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3528, .adv_w = 151, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3583, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3644, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3705, .adv_w = 110, .box_h = 11, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3744, .adv_w = 165, .box_h = 9, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3794, .adv_w = 137, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3836, .adv_w = 137, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3884, .adv_w = 151, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3934, .adv_w = 151, .box_h = 3, .box_w = 10, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 3949, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4021, .adv_w = 192, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4093, .adv_w = 192, .box_h = 8, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4141, .adv_w = 192, .box_h = 8, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4189, .adv_w = 206, .box_h = 8, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4241, .adv_w = 178, .box_h = 10, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4301, .adv_w = 178, .box_h = 11, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4367, .adv_w = 151, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4417, .adv_w = 192, .box_h = 10, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4477, .adv_w = 192, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4555, .adv_w = 165, .box_h = 11, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4616, .adv_w = 96, .box_h = 12, .box_w = 6, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4652, .adv_w = 192, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4730, .adv_w = 206, .box_h = 8, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4782, .adv_w = 151, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4832, .adv_w = 165, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4904, .adv_w = 219, .box_h = 10, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4974, .adv_w = 247, .box_h = 9, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5046, .adv_w = 247, .box_h = 9, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5118, .adv_w = 247, .box_h = 9, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5190, .adv_w = 247, .box_h = 9, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5262, .adv_w = 247, .box_h = 9, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5334, .adv_w = 165, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -2} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1[] = { + 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, + 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, + 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, + 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, + 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, + 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, + 0x243, 0x292 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 + }, + { + .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 1, 53, + 3, 3, + 3, 8, + 3, 34, + 3, 66, + 3, 68, + 3, 69, + 3, 70, + 3, 72, + 3, 78, + 3, 79, + 3, 80, + 3, 81, + 3, 82, + 3, 84, + 3, 88, + 8, 3, + 8, 8, + 8, 34, + 8, 66, + 8, 68, + 8, 69, + 8, 70, + 8, 72, + 8, 78, + 8, 79, + 8, 80, + 8, 81, + 8, 82, + 8, 84, + 8, 88, + 9, 55, + 9, 56, + 9, 58, + 13, 3, + 13, 8, + 15, 3, + 15, 8, + 16, 16, + 34, 3, + 34, 8, + 34, 32, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 80, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 90, + 34, 91, + 35, 53, + 35, 55, + 35, 58, + 36, 10, + 36, 53, + 36, 62, + 36, 94, + 37, 13, + 37, 15, + 37, 34, + 37, 53, + 37, 55, + 37, 57, + 37, 58, + 37, 59, + 38, 53, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 80, + 38, 82, + 38, 86, + 38, 87, + 38, 88, + 38, 90, + 39, 13, + 39, 15, + 39, 34, + 39, 43, + 39, 53, + 39, 66, + 39, 68, + 39, 69, + 39, 70, + 39, 72, + 39, 80, + 39, 82, + 39, 83, + 39, 86, + 39, 87, + 39, 90, + 41, 34, + 41, 53, + 41, 57, + 41, 58, + 42, 34, + 42, 53, + 42, 57, + 42, 58, + 43, 34, + 44, 14, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 68, + 44, 69, + 44, 70, + 44, 72, + 44, 78, + 44, 79, + 44, 80, + 44, 81, + 44, 82, + 44, 86, + 44, 87, + 44, 88, + 44, 90, + 45, 3, + 45, 8, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 86, + 45, 87, + 45, 88, + 45, 90, + 46, 34, + 46, 53, + 46, 57, + 46, 58, + 47, 34, + 47, 53, + 47, 57, + 47, 58, + 48, 13, + 48, 15, + 48, 34, + 48, 53, + 48, 55, + 48, 57, + 48, 58, + 48, 59, + 49, 13, + 49, 15, + 49, 34, + 49, 43, + 49, 57, + 49, 59, + 49, 66, + 49, 68, + 49, 69, + 49, 70, + 49, 72, + 49, 80, + 49, 82, + 49, 85, + 49, 87, + 49, 90, + 50, 53, + 50, 55, + 50, 56, + 50, 58, + 51, 53, + 51, 55, + 51, 58, + 53, 1, + 53, 13, + 53, 14, + 53, 15, + 53, 34, + 53, 36, + 53, 40, + 53, 43, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 58, + 53, 66, + 53, 68, + 53, 69, + 53, 70, + 53, 72, + 53, 78, + 53, 79, + 53, 80, + 53, 81, + 53, 82, + 53, 83, + 53, 84, + 53, 86, + 53, 87, + 53, 88, + 53, 89, + 53, 90, + 53, 91, + 54, 34, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 68, + 55, 69, + 55, 70, + 55, 72, + 55, 80, + 55, 82, + 55, 83, + 55, 86, + 55, 87, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 34, + 56, 53, + 56, 62, + 56, 66, + 56, 68, + 56, 69, + 56, 70, + 56, 72, + 56, 80, + 56, 82, + 56, 83, + 56, 86, + 56, 94, + 57, 14, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 55, + 57, 68, + 57, 69, + 57, 70, + 57, 72, + 57, 80, + 57, 82, + 57, 86, + 57, 87, + 57, 90, + 58, 7, + 58, 10, + 58, 11, + 58, 13, + 58, 14, + 58, 15, + 58, 34, + 58, 36, + 58, 40, + 58, 43, + 58, 48, + 58, 50, + 58, 52, + 58, 53, + 58, 54, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 68, + 58, 69, + 58, 70, + 58, 71, + 58, 72, + 58, 78, + 58, 79, + 58, 80, + 58, 81, + 58, 82, + 58, 83, + 58, 84, + 58, 85, + 58, 86, + 58, 87, + 58, 89, + 58, 90, + 58, 91, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 68, + 59, 69, + 59, 70, + 59, 72, + 59, 80, + 59, 82, + 59, 86, + 59, 87, + 59, 88, + 59, 90, + 60, 43, + 60, 54, + 66, 3, + 66, 8, + 66, 87, + 66, 90, + 67, 3, + 67, 8, + 67, 87, + 67, 89, + 67, 90, + 67, 91, + 68, 3, + 68, 8, + 70, 3, + 70, 8, + 70, 87, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 68, + 71, 69, + 71, 70, + 71, 72, + 71, 82, + 71, 94, + 73, 3, + 73, 8, + 76, 68, + 76, 69, + 76, 70, + 76, 72, + 76, 82, + 78, 3, + 78, 8, + 79, 3, + 79, 8, + 80, 3, + 80, 8, + 80, 87, + 80, 89, + 80, 90, + 80, 91, + 81, 3, + 81, 8, + 81, 87, + 81, 89, + 81, 90, + 81, 91, + 83, 3, + 83, 8, + 83, 13, + 83, 15, + 83, 66, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 72, + 83, 80, + 83, 82, + 83, 85, + 83, 87, + 83, 88, + 83, 90, + 85, 80, + 87, 3, + 87, 8, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 71, + 87, 72, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 89, 68, + 89, 69, + 89, 70, + 89, 72, + 89, 80, + 89, 82, + 90, 3, + 90, 8, + 90, 13, + 90, 15, + 90, 66, + 90, 68, + 90, 69, + 90, 70, + 90, 71, + 90, 72, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 72, + 91, 80, + 91, 82, + 92, 43, + 92, 54 +}; + +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = +{ + -4, -10, -10, -11, -5, -6, -6, -6, + -6, -2, -2, -6, -2, -6, -7, 1, + -10, -10, -11, -5, -6, -6, -6, -6, + -2, -2, -6, -2, -6, -7, 1, 2, + 2, 2, -16, -16, -16, -16, -21, -11, + -11, -6, -1, -1, -1, -1, -12, -2, + -8, -6, -9, -1, -2, -1, -5, -3, + -5, 1, -3, -2, -5, -2, -3, -1, + -2, -10, -10, -2, -3, -2, -2, -4, + -2, 2, -2, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -22, -22, -16, + -25, 2, -3, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -2, 2, -3, 2, + -3, 2, -3, 2, -3, -2, -6, -3, + -3, -3, -3, -2, -2, -2, -2, -2, + -2, -3, -2, -2, -2, -4, -6, -4, + -31, -31, 2, -6, -6, -6, -6, -26, + -5, -16, -13, -22, -4, -12, -9, -12, + 2, -3, 2, -3, 2, -3, 2, -3, + -10, -10, -2, -3, -2, -2, -4, -2, + -30, -30, -13, -19, -3, -2, -1, -1, + -1, -1, -1, -1, -1, 1, 1, 1, + -4, -3, -2, -3, -7, -2, -4, -4, + -20, -22, -20, -7, -3, -3, -22, -3, + -3, -1, 2, 2, 1, 2, -11, -9, + -9, -9, -9, -10, -10, -9, -10, -9, + -7, -11, -9, -7, -5, -7, -7, -6, + -2, 2, -21, -3, -21, -7, -1, -1, + -1, -1, 2, -4, -4, -4, -4, -4, + -4, -4, -3, -3, -1, -1, 2, 1, + -12, -6, -12, -4, 1, 1, -3, -3, + -3, -3, -3, -3, -3, -2, -2, 1, + -4, -2, -2, -2, -2, 1, -2, -2, + -2, -2, -2, -2, -2, -3, -3, -3, + 2, -5, -20, -5, -20, -9, -3, -3, + -9, -3, -3, -1, 2, -9, 2, 2, + 1, 2, 2, -7, -6, -6, -6, -2, + -6, -4, -4, -6, -4, -6, -4, -5, + -2, -4, -2, -2, -2, -3, 2, 1, + -2, -2, -2, -2, -2, -2, -2, -2, + -2, -2, -2, -3, -3, -3, -2, -2, + -6, -6, -1, -1, -3, -3, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 2, 2, 2, 2, -2, -2, -2, -2, + -2, 2, -10, -10, -2, -2, -2, -2, + -2, -10, -10, -10, -10, -13, -13, -1, + -2, -1, -1, -3, -3, -1, -1, -1, + -1, 2, 2, -12, -12, -4, -2, -2, + -2, 1, -2, -2, -2, 5, 2, 2, + 2, -2, 1, 1, -10, -10, -1, -1, + -1, -1, 1, -1, -1, -1, -12, -12, + -2, -2, -2, -2, -2, -2, 1, 1, + -10, -10, -1, -1, -1, -1, 1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -2, -2 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = +{ + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 434, + .glyph_ids_size = 0 +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 2, + .bpp = 4, + + .kern_scale = 16, + .kern_dsc = &kern_pairs, + .kern_classes = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_roboto_12 = { + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .line_height = 14, /*The maximum line height required by the font*/ + .base_line = 3, /*Baseline measured from the bottom of the line*/ +}; + +#endif /*#if LV_FONT_ROBOTO_12*/ + diff --git a/src/lv_fonts/lv_font_roboto_16.c b/src/lv_fonts/lv_font_roboto_16.c new file mode 100644 index 000000000000..9278f0ae0f4b --- /dev/null +++ b/src/lv_fonts/lv_font_roboto_16.c @@ -0,0 +1,2233 @@ +#include "lvgl/lvgl.h" + +/******************************************************************************* + * Size: 16 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 16 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_16.c + ******************************************************************************/ + +#ifndef LV_FONT_ROBOTO_16 +#define LV_FONT_ROBOTO_16 1 +#endif + +#if LV_FONT_ROBOTO_16 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x45, 0xad, 0xac, 0xac, 0xac, 0xac, 0x9b, 0x9b, + 0x79, 0x0, 0x35, 0x9d, 0x0, + + /* U+22 "\"" */ + 0xe2, 0xc4, 0xe2, 0xd3, 0xe0, 0xd2, 0xc0, 0xb1, + + /* U+23 "#" */ + 0x0, 0x0, 0x60, 0x5, 0x10, 0x0, 0x2, 0xf0, + 0xf, 0x20, 0x0, 0x5, 0xc0, 0x2f, 0x0, 0x1, + 0x29, 0xa2, 0x7c, 0x20, 0xc, 0xef, 0xfe, 0xff, + 0xe3, 0x0, 0xf, 0x20, 0xc5, 0x0, 0x0, 0x2f, + 0x0, 0xf2, 0x0, 0x14, 0x7d, 0x45, 0xf4, 0x20, + 0x5c, 0xee, 0xce, 0xfc, 0x80, 0x0, 0xb6, 0x8, + 0x90, 0x0, 0x0, 0xe3, 0xb, 0x60, 0x0, 0x1, + 0xf0, 0xe, 0x30, 0x0, + + /* U+24 "$" */ + 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0xe, 0x40, + 0x0, 0x0, 0x5, 0xf8, 0x10, 0x0, 0x1d, 0xfc, + 0xee, 0x30, 0x7, 0xf2, 0x0, 0xdb, 0x0, 0xac, + 0x0, 0x7, 0xf0, 0x8, 0xf2, 0x0, 0x2, 0x0, + 0x1e, 0xe8, 0x20, 0x0, 0x0, 0x19, 0xef, 0xa1, + 0x0, 0x0, 0x0, 0x6f, 0xb0, 0x5, 0x10, 0x0, + 0x7f, 0x0, 0xf7, 0x0, 0x6, 0xf1, 0xa, 0xe5, + 0x24, 0xec, 0x0, 0x1a, 0xff, 0xfb, 0x10, 0x0, + 0x1, 0xf2, 0x0, 0x0, 0x0, 0x9, 0x10, 0x0, + + /* U+25 "%" */ + 0x0, 0x67, 0x20, 0x0, 0x0, 0x0, 0xc, 0xa8, + 0xe1, 0x0, 0x10, 0x0, 0x1f, 0x0, 0x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0x4, 0xe2, 0x0, 0x8, 0xc0, 0x0, + 0xf, 0x50, 0x0, 0xac, 0x0, 0x5, 0xf1, 0x0, + 0x3f, 0x40, 0x1, 0xf5, 0x0, 0xf, 0x60, 0x1, + 0xf5, 0x0, 0x3f, 0x40, 0x5, 0xf0, 0x0, 0xab, + 0x0, 0x1f, 0x40, 0x9, 0xb0, 0x6, 0xd1, 0x0, + 0x41, 0x0, 0x0, + + /* U+2A "*" */ + 0x0, 0x6, 0x0, 0x0, 0x1, 0xf0, 0x0, 0x43, + 0x1f, 0x3, 0x28, 0xfd, 0xfd, 0xf7, 0x0, 0xbf, + 0x90, 0x0, 0x4f, 0x5f, 0x20, 0xb, 0x60, 0xa8, + 0x0, 0x0, 0x0, 0x0, + + /* U+2B "+" */ + 0x0, 0x1, 0x61, 0x0, 0x0, 0x0, 0x3f, 0x30, + 0x0, 0x0, 0x3, 0xf3, 0x0, 0x0, 0x11, 0x4f, + 0x51, 0x10, 0x6f, 0xff, 0xff, 0xff, 0x61, 0x44, + 0x6f, 0x74, 0x41, 0x0, 0x3, 0xf3, 0x0, 0x0, + 0x0, 0x3f, 0x30, 0x0, 0x0, 0x3, 0xd3, 0x0, + 0x0, + + /* U+2C "," */ + 0xb, 0x40, 0xf6, 0x3f, 0x39, 0xb0, 0x0, 0x0, + + /* U+2D "-" */ + 0x46, 0x66, 0x8, 0xcc, 0xc1, + + /* U+2E "." */ + 0x66, 0xbc, 0x0, + + /* U+2F "/" */ + 0x0, 0x0, 0x16, 0x0, 0x0, 0x7, 0xc0, 0x0, + 0x0, 0xd6, 0x0, 0x0, 0x3f, 0x10, 0x0, 0x9, + 0xa0, 0x0, 0x0, 0xe4, 0x0, 0x0, 0x5d, 0x0, + 0x0, 0xc, 0x70, 0x0, 0x2, 0xf1, 0x0, 0x0, + 0x8b, 0x0, 0x0, 0xe, 0x50, 0x0, 0x4, 0xe0, + 0x0, 0x0, 0xa9, 0x0, 0x0, 0x0, + + /* U+30 "0" */ + 0x0, 0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, + 0xe8, 0x0, 0xbe, 0x10, 0xe8, 0x0, 0x1e, 0xb0, + + /* U+6C "l" */ + 0xca, 0xca, 0xca, 0xca, 0xca, 0xca, 0xca, 0xca, + 0xca, 0xca, 0xca, 0xca, + + /* U+6D "m" */ + 0x63, 0x38, 0x83, 0x3, 0x88, 0x40, 0xed, 0xda, + 0xdf, 0x9e, 0xac, 0xf6, 0xeb, 0x0, 0xe, 0xf2, + 0x0, 0xbc, 0xe8, 0x0, 0xb, 0xc0, 0x0, 0x8e, + 0xe8, 0x0, 0xb, 0xb0, 0x0, 0x8e, 0xe8, 0x0, + 0xb, 0xb0, 0x0, 0x8e, 0xe8, 0x0, 0xb, 0xb0, + 0x0, 0x8e, 0xe8, 0x0, 0xb, 0xb0, 0x0, 0x8e, + 0xe8, 0x0, 0xb, 0xb0, 0x0, 0x8e, + + /* U+6E "n" */ + 0x63, 0x38, 0x83, 0xe, 0xde, 0xad, 0xf3, 0xed, + 0x0, 0xe, 0x9e, 0x80, 0x0, 0xbb, 0xe8, 0x0, + 0xb, 0xbe, 0x80, 0x0, 0xbb, 0xe8, 0x0, 0xb, + 0xbe, 0x80, 0x0, 0xbb, 0xe8, 0x0, 0xb, 0xb0, + + /* U+6F "o" */ + 0x0, 0x17, 0x97, 0x10, 0x0, 0x2e, 0xda, 0xdf, + 0x40, 0xc, 0xc0, 0x0, 0xbe, 0x1, 0xf5, 0x0, + 0x3, 0xf3, 0x3f, 0x30, 0x0, 0x1f, 0x52, 0xf4, + 0x0, 0x1, 0xf4, 0xf, 0x80, 0x0, 0x6f, 0x20, + 0x8f, 0x51, 0x4e, 0xa0, 0x0, 0x8f, 0xff, 0x90, + 0x0, 0x0, 0x2, 0x0, 0x0, + + /* U+70 "p" */ + 0x63, 0x49, 0x83, 0x0, 0xed, 0xda, 0xef, 0x40, + 0xec, 0x0, 0xc, 0xd0, 0xe8, 0x0, 0x6, 0xf1, + 0xe8, 0x0, 0x3, 0xf3, 0xe8, 0x0, 0x4, 0xf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2, 0xf2, 0x9, + 0x90, 0x0, 0x0, 0x0, 0x7b, 0x0, 0xf2, 0xfd, + 0xbf, 0xfb, 0xbb, 0xbb, 0xbb, 0xef, 0xbc, 0xf2, + 0xf9, 0x6d, 0xd6, 0x66, 0x66, 0x66, 0xce, 0x68, + 0xf2, 0xf2, 0x9, 0x90, 0x0, 0x0, 0x0, 0x6b, + 0x0, 0xf2, 0xf7, 0x4c, 0x90, 0x0, 0x0, 0x0, + 0x6d, 0x45, 0xf2, 0xfe, 0xdf, 0x90, 0x0, 0x0, + 0x0, 0x6f, 0xee, 0xf2, 0xf2, 0x9, 0x90, 0x0, + 0x0, 0x0, 0x6c, 0x0, 0xf2, 0xf2, 0x9, 0x90, + 0x0, 0x0, 0x0, 0x7c, 0x0, 0xf2, 0xce, 0xdf, + 0xfd, 0xdd, 0xdd, 0xdd, 0xff, 0xee, 0xe0, 0x4, + 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x10, + + /* U+F00B "" */ + 0x69, 0x99, 0x20, 0x89, 0x99, 0x99, 0x99, 0x96, + 0xff, 0xff, 0x84, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xad, 0xdd, 0x41, 0xcd, 0xdd, 0xdd, 0xdd, 0xda, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xcf, 0xff, 0x62, 0xef, 0xff, 0xff, 0xff, 0xfc, + 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x36, 0x66, 0x10, 0x56, 0x66, 0x66, 0x66, 0x63, + 0x36, 0x66, 0x10, 0x56, 0x66, 0x66, 0x66, 0x63, + 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x94, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xcf, 0xff, 0x62, 0xef, 0xff, 0xff, 0xff, 0xfc, + + /* U+F00C "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, 0x60, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xbf, 0xf6, 0x0, 0x0, + 0x0, 0x0, 0xb, 0xff, 0xfc, 0x2, 0x50, 0x0, + 0x0, 0xbf, 0xff, 0xe3, 0x3f, 0xf8, 0x0, 0xb, + 0xff, 0xfe, 0x30, 0xdf, 0xff, 0x80, 0xbf, 0xff, + 0xe3, 0x0, 0x5f, 0xff, 0xfd, 0xff, 0xfe, 0x30, + 0x0, 0x5, 0xff, 0xff, 0xff, 0xe3, 0x0, 0x0, + 0x0, 0x5f, 0xff, 0xfe, 0x30, 0x0, 0x0, 0x0, + 0x5, 0xff, 0xe2, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x5c, 0x20, 0x0, 0x0, 0x0, + + /* U+F00D "" */ + 0x3, 0x30, 0x0, 0x0, 0x50, 0x4, 0xff, 0x50, + 0x0, 0xbf, 0xc0, 0xef, 0xff, 0x50, 0xcf, 0xff, + 0x77, 0xff, 0xff, 0xdf, 0xff, 0xe2, 0x7, 0xff, + 0xff, 0xff, 0xe2, 0x0, 0x8, 0xff, 0xff, 0xe2, + 0x0, 0x0, 0xbf, 0xff, 0xff, 0x50, 0x0, 0xbf, + 0xff, 0xff, 0xff, 0x50, 0xbf, 0xff, 0xe9, 0xff, + 0xff, 0x4d, 0xff, 0xe2, 0x8, 0xff, 0xf6, 0x1d, + 0xe2, 0x0, 0x7, 0xf8, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, + + /* U+F011 "" */ + 0x0, 0x0, 0x0, 0x96, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x4, 0xff, 0x0, 0x0, 0x0, 0x0, 0x15, + 0x4, 0xff, 0x2, 0x50, 0x0, 0x2, 0xdf, 0x74, + 0xff, 0xc, 0xfa, 0x0, 0xc, 0xff, 0x34, 0xff, + 0x7, 0xff, 0x80, 0x6f, 0xf4, 0x4, 0xff, 0x0, + 0x9f, 0xf1, 0xbf, 0xa0, 0x4, 0xff, 0x0, 0xe, + 0xf7, 0xef, 0x60, 0x2, 0xfe, 0x0, 0xa, 0xfa, + 0xff, 0x40, 0x0, 0x21, 0x0, 0x9, 0xfa, 0xdf, + 0x70, 0x0, 0x0, 0x0, 0xc, 0xf9, 0x9f, 0xd0, + 0x0, 0x0, 0x0, 0x3f, 0xf4, 0x2f, 0xfa, 0x0, + 0x0, 0x1, 0xdf, 0xd0, 0x8, 0xff, 0xc5, 0x23, + 0x7e, 0xff, 0x30, 0x0, 0x8f, 0xff, 0xff, 0xff, + 0xf4, 0x0, 0x0, 0x3, 0xaf, 0xff, 0xe9, 0x10, + 0x0, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, + + /* U+F013 "" */ + 0x0, 0x0, 0x4, 0x99, 0x10, 0x0, 0x0, 0x0, + 0x12, 0x9, 0xff, 0x40, 0x30, 0x0, 0x2, 0xee, + 0x7e, 0xff, 0xb9, 0xfa, 0x0, 0xa, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x50, 0x1, 0xef, 0xff, 0xff, + 0xff, 0xfb, 0x0, 0x13, 0xff, 0xf8, 0x12, 0xbf, + 0xfc, 0x20, 0xff, 0xff, 0xc0, 0x0, 0x1f, 0xff, + 0xfb, 0xff, 0xff, 0xa0, 0x0, 0xe, 0xff, 0xfb, + 0x9c, 0xff, 0xe1, 0x0, 0x4f, 0xff, 0xc6, 0x0, + 0xdf, 0xfd, 0x79, 0xff, 0xf9, 0x0, 0x5, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x20, 0x7, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x40, 0x0, 0x8a, 0x1b, 0xff, + 0x72, 0xc5, 0x0, 0x0, 0x0, 0x8, 0xff, 0x30, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, + 0x0, + + /* U+F014 "" */ + 0x0, 0x0, 0x79, 0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0x0, + + /* U+F019 "" */ + 0x0, 0x0, 0x2, 0xbb, 0xa0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4f, 0xff, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x4, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x4f, 0xff, 0x20, 0x0, 0x0, 0x0, 0x1, + 0x26, 0xff, 0xf4, 0x21, 0x0, 0x0, 0x1, 0xff, + 0xff, 0xff, 0xff, 0xe0, 0x0, 0x0, 0x4, 0xff, + 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, 0x4, 0xff, + 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, + 0xf3, 0x0, 0x0, 0x6, 0x99, 0x99, 0x25, 0xe3, + 0x49, 0x99, 0x94, 0xff, 0xff, 0xfe, 0x30, 0x4f, + 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xef, 0xfe, + 0xff, 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8b, + 0xb8, 0xdc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfa, + + /* U+F01C "" */ + 0x0, 0x26, 0x66, 0x66, 0x66, 0x60, 0x0, 0x0, + 0xdf, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x4, 0xfa, + 0x44, 0x44, 0x44, 0xee, 0x0, 0xb, 0xf2, 0x0, + 0x0, 0x0, 0x7f, 0x60, 0x2f, 0xb0, 0x0, 0x0, + 0x0, 0x1f, 0xd0, 0x8f, 0x50, 0x0, 0x0, 0x0, + 0x9, 0xf4, 0xde, 0x22, 0x10, 0x0, 0x1, 0x25, + 0xf9, 0xff, 0xff, 0xd0, 0x0, 0x2f, 0xff, 0xfb, + 0xff, 0xff, 0xf9, 0x66, 0xbf, 0xff, 0xfb, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xef, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf9, + + /* U+F021 "" */ + 0x0, 0x0, 0x27, 0x88, 0x50, 0x0, 0x0, 0x0, + 0x1b, 0xff, 0xff, 0xff, 0x70, 0x99, 0x2, 0xef, + 0xfe, 0xcc, 0xff, 0xfe, 0xfb, 0xd, 0xff, 0x60, + 0x0, 0x19, 0xff, 0xfb, 0x6f, 0xf4, 0x0, 0x0, + 0x9, 0xff, 0xfb, 0xbf, 0xa0, 0x0, 0x0, 0x4f, + 0xff, 0xfa, 0x12, 0x0, 0x0, 0x0, 0x2, 0x22, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x79, 0x99, 0x80, 0x0, 0x0, 0x7, 0x94, 0xff, + 0xff, 0xc0, 0x0, 0x0, 0x3f, 0xf4, 0xff, 0xff, + 0x10, 0x0, 0x1, 0xdf, 0xc0, 0xff, 0xff, 0xd5, + 0x23, 0x7e, 0xff, 0x30, 0xfc, 0x8f, 0xff, 0xff, + 0xff, 0xf4, 0x0, 0x71, 0x3, 0xbf, 0xff, 0xe9, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, + 0x0, + + /* U+F026 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9d, 0x0, + 0x0, 0x9f, 0xd0, 0x0, 0x9f, 0xfd, 0xef, 0xff, + 0xff, 0xdf, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xdf, 0xff, 0xff, 0xfd, 0x79, 0x9f, 0xff, 0xd0, + 0x0, 0x3e, 0xfd, 0x0, 0x0, 0x3e, 0xd0, 0x0, + 0x0, 0x38, + + /* U+F027 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x9d, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xd0, 0x0, + 0x0, 0x0, 0x9f, 0xfd, 0x0, 0x0, 0xef, 0xff, + 0xff, 0xd0, 0xa6, 0xf, 0xff, 0xff, 0xfd, 0x4, + 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0, + 0x0, 0x0, 0x22, 0x21, 0x0, 0x0, 0x0, 0x0, + 0x0, + + /* U+F048 "" */ + 0x79, 0x10, 0x0, 0x0, 0x31, 0xff, 0x40, 0x0, + 0x3, 0xf2, 0xff, 0x40, 0x0, 0x3f, 0xf2, 0xff, + 0x40, 0x3, 0xff, 0xf2, 0xff, 0x40, 0x3f, 0xff, + 0xf2, 0xff, 0x43, 0xff, 0xff, 0xf2, 0xff, 0x8f, + 0xff, 0xff, 0xf2, 0xff, 0xef, 0xff, 0xff, 0xf2, + 0xff, 0x5b, 0xff, 0xff, 0xf2, 0xff, 0x40, 0xbf, + 0xff, 0xf2, 0xff, 0x40, 0xb, 0xff, 0xf2, 0xff, + 0x40, 0x0, 0xbf, 0xf2, 0xff, 0x40, 0x0, 0xb, + 0xf2, 0xff, 0x30, 0x0, 0x0, 0xc2, 0x11, 0x0, + 0x0, 0x0, 0x0, + + /* U+F04B "" */ + 0x71, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0x60, + 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, 0xc3, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xfb, 0x20, 0x0, + 0xf, 0xff, 0xff, 0xff, 0xff, 0x91, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf8, 0xf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xa1, 0xf, 0xff, 0xff, 0xff, 0xfb, 0x20, + 0x0, 0xff, 0xff, 0xff, 0xd4, 0x0, 0x0, 0xf, + 0xff, 0xfe, 0x60, 0x0, 0x0, 0x0, 0xff, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0xf, 0x91, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, + + /* U+F04C "" */ + 0x79, 0x99, 0x95, 0x0, 0x79, 0x99, 0x95, 0xff, + 0xff, 0xfb, 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xfb, 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, + 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, 0x0, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, 0x0, 0xff, + 0xff, 0xfb, 0xff, 0xff, 0xfb, 0x0, 0xff, 0xff, + 0xfb, 0xff, 0xff, 0xfb, 0x0, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xfb, 0x0, 0xff, 0xff, 0xfb, 0xff, + 0xff, 0xfb, 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xfb, 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, + 0x0, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfb, 0x0, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfa, 0x0, 0xff, + 0xff, 0xfa, 0x12, 0x22, 0x20, 0x0, 0x12, 0x22, + 0x20, + + /* U+F04D "" */ + 0x79, 0x99, 0x99, 0x99, 0x99, 0x99, 0x95, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfa, 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x20, + + /* U+F051 "" */ + 0x40, 0x0, 0x0, 0x8, 0x80, 0xf5, 0x0, 0x0, + 0x2f, 0xf2, 0xff, 0x50, 0x0, 0x2f, 0xf2, 0xff, + 0xf5, 0x0, 0x2f, 0xf2, 0xff, 0xff, 0x50, 0x2f, + 0xf2, 0xff, 0xff, 0xf5, 0x2f, 0xf2, 0xff, 0xff, + 0xff, 0x7f, 0xf2, 0xff, 0xff, 0xff, 0xef, 0xf2, + 0xff, 0xff, 0xfd, 0x3f, 0xf2, 0xff, 0xff, 0xd1, + 0x2f, 0xf2, 0xff, 0xfd, 0x10, 0x2f, 0xf2, 0xff, + 0xd1, 0x0, 0x2f, 0xf2, 0xfd, 0x10, 0x0, 0x2f, + 0xf2, 0xd1, 0x0, 0x0, 0x1f, 0xf1, 0x0, 0x0, + 0x0, 0x1, 0x10, + + /* U+F052 "" */ + 0x0, 0x0, 0x0, 0x42, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x5, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x5f, 0xff, 0xe2, 0x0, 0x0, 0x0, 0x5, 0xff, + 0xff, 0xfe, 0x20, 0x0, 0x0, 0x5f, 0xff, 0xff, + 0xff, 0xe2, 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x20, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe2, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x64, + 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x63, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xef, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf9, + + /* U+F053 "" */ + 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0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xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x36, 0x66, 0xaf, 0xff, + 0x66, 0x66, 0x10, 0x0, 0x6, 0xff, 0xf0, 0x0, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x6, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, + 0x3f, 0xfc, 0x0, 0x0, 0x0, + + /* U+F068 "" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x83, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x61, + + /* U+F071 "" */ + 0x0, 0x0, 0x0, 0x8, 0x80, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x5f, 0xf5, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xdf, 0xfd, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6, 0xff, 0xff, 0x60, 0x0, 0x0, + 0x0, 0x0, 0xe, 0xfd, 0xdf, 0xe0, 0x0, 0x0, + 0x0, 0x0, 0x8f, 0xb0, 0xb, 0xf8, 0x0, 0x0, + 0x0, 0x1, 0xff, 0xc0, 0xc, 0xff, 0x10, 0x0, + 0x0, 0x9, 0xff, 0xc0, 0xc, 0xff, 0x90, 0x0, + 0x0, 0x2f, 0xff, 0xd0, 0xd, 0xff, 0xf2, 0x0, + 0x0, 0xbf, 0xff, 0xf9, 0x9f, 0xff, 0xfb, 0x0, + 0x3, 0xff, 0xff, 0xf9, 0x9f, 0xff, 0xff, 0x30, + 0xc, 0xff, 0xff, 0xd0, 0xd, 0xff, 0xff, 0xc0, + 0x5f, 0xff, 0xff, 0xe2, 0x2e, 0xff, 0xff, 0xf5, + 0xdf, 0xff, 0xff, 0xff, 0xff, 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0, 0xbf, 0xb4, 0x44, 0x44, 0xa, 0xff, 0xfe, + 0x20, 0x0, 0xbf, 0xff, 0xff, 0xff, 0x80, 0xcf, + 0xf4, 0x0, 0x0, 0xbf, 0xff, 0xff, 0xff, 0xf3, + 0x1d, 0x60, 0x0, + + /* U+F07B "" */ + 0x7, 0x99, 0x96, 0x0, 0x0, 0x0, 0x0, 0xb, + 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xe4, 0x44, 0x44, 0x42, 0xf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xde, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfb, 0x4e, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfd, 0x30, + + /* U+F093 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x7, 0xf5, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x7, 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, + 0x7, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0, 0x7, + 0xff, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x1, 0xff, + 0xff, 0xff, 0xff, 0xe0, 0x0, 0x0, 0x0, 0x4, + 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, + 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff, + 0x20, 0x0, 0x0, 0x36, 0x66, 0x51, 0x99, 0x80, + 0x56, 0x66, 0x3f, 0xff, 0xff, 0x84, 0x44, 0x9f, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xbb, + 0x6d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xb0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, + + /* U+F095 "" */ + 0x4, 0x80, 0x0, 0x0, 0x0, 0x0, 0x5, 0xff, + 0x80, 0x0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0x10, + 0x0, 0x0, 0x0, 0xf, 0xff, 0xf7, 0x0, 0x0, + 0x0, 0x0, 0xdf, 0xf9, 0x0, 0x0, 0x0, 0x0, + 0x7, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, 0x1f, + 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xf5, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xf5, 0x0, + 0x7, 0x10, 0x0, 0x1, 0xdf, 0xf9, 0x19, 0xff, + 0x80, 0x0, 0x1, 0xcf, 0xff, 0xff, 0xff, 0x80, + 0x0, 0x0, 0x8f, 0xff, 0xff, 0xf4, 0x0, 0x0, + 0x0, 0x17, 0xdf, 0xc5, 0x0, + + /* U+F0C4 "" */ + 0x2, 0x64, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6f, 0xff, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x20, + 0xea, 0x2, 0xaf, 0x50, 0x0, 0x0, 0x59, 0x69, + 0xea, 0x0, 0xb, 0xc0, 0x0, 0x4a, 0x40, 0x67, + 0x6f, 0xa4, 0x3d, 0xd0, 0x29, 0x60, 0x9, 0x40, + 0x6, 0xef, 0xff, 0x7d, 0x80, 0x2, 0xa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0x0, 0x20, 0x0, 0x0, + + /* U+F0F3 "" */ + 0x0, 0x0, 0x0, 0x6, 0x60, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x4e, 0xe4, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2d, 0xff, 0xff, 0xd2, 0x0, 0x0, + 0x0, 0x0, 0xdf, 0xff, 0xff, 0xfe, 0x0, 0x0, + 0x0, 0x6, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, + 0x0, 0x9, 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, + 0x0, 0xa, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x0, + 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x0, + 0x0, 0xe, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0, + 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0, + 0x0, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x0, + 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, + 0x2e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, + 0x3e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, + 0x0, 0x0, 0x2, 0xbf, 0xff, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x9b, 0xfa, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x2, 0x20, 0x0, 0x0, 0x0, + + /* U+F11C "" */ + 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x20, 0xee, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xf1, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xf2, 0xf2, 0xb6, 0x6b, 0x2f, 0xd, + 0x49, 0x94, 0xd0, 0xf2, 0xf2, 0x10, 0x1, 0x2, + 0x1, 0x1, 0x14, 0xd0, 0xf2, 0xf2, 0x8b, 0x63, + 0x90, 0xb1, 0x84, 0x4c, 0xd0, 0xf2, 0xf2, 0x46, + 0x31, 0x50, 0x60, 0x42, 0x26, 0x50, 0xf2, 0xf2, + 0x42, 0x26, 0x66, 0x66, 0x66, 0x31, 0x50, 0xf2, + 0xf2, 0x84, 0x4b, 0xbb, 0xbb, 0xbb, 0x63, 0x90, + 0xf2, 0xf4, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0xf2, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xc0, + + /* U+F124 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x20, 0x0, + 0x0, 0x0, 0x0, 0x3b, 0xf7, 0x0, 0x0, 0x0, + 0x3, 0xbf, 0xfe, 0x0, 0x0, 0x0, 0x3b, 0xff, + 0xff, 0x70, 0x0, 0x3, 0xbf, 0xff, 0xff, 0xe0, + 0x0, 0x3b, 0xff, 0xff, 0xff, 0xf7, 0x0, 0xbf, + 0xff, 0xff, 0xff, 0xfe, 0x0, 0x5, 0x66, 0x66, + 0x9f, 0xff, 0x70, 0x0, 0x0, 0x0, 0x4, 0xff, + 0xe0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x4, 0xfe, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4f, 0x70, 0x0, 0x0, 0x0, 0x0, + 0x3, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x0, 0x0, 0x0, + + /* U+F15B "" */ + 0x8b, 0xbb, 0xbb, 0xbb, 0x1, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xc, 0x20, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xd, 0xe2, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xd, 0xfe, 0x20, 0xff, 0xff, 0xff, 0xff, + 0xb, 0xdd, 0xc1, 0xff, 0xff, 0xff, 0xff, 0x30, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfb, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, + + /* U+F1EB "" */ + 0x0, 0x0, 0x0, 0x46, 0x88, 0x75, 0x10, 0x0, + 0x0, 0x0, 0x3, 0xaf, 0xff, 0xff, 0xff, 0xfc, + 0x50, 0x0, 0x1, 0xaf, 0xff, 0xfd, 0xcc, 0xdf, + 0xff, 0xfd, 0x30, 0x2d, 0xff, 0xd6, 0x10, 0x11, + 0x0, 0x5b, 0xff, 0xf5, 0x4f, 0xf7, 0x5, 0xbf, + 0xff, 0xfc, 0x71, 0x4e, 0xf9, 0x4, 0x33, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0x61, 0x60, 0x0, 0xf, + 0xff, 0xb6, 0x32, 0x49, 0xff, 0xf4, 0x0, 0x0, + 0x5, 0xd3, 0x17, 0xab, 0x82, 0x2c, 0x90, 0x0, + 0x0, 0x0, 0x5, 0xff, 0xff, 0xff, 0x90, 0x0, + 0x0, 0x0, 0x0, 0x5, 0xff, 0xba, 0xef, 0x90, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, 0x23, 0x4, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, + 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x59, 0x0, 0x0, 0x0, 0x0, + + /* U+F240 "" */ + 0x16, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x40, 0xd, 0xcb, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xbf, 0x40, 0xf2, 0x12, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, 0xb6, 0xf, + 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x2b, 0xb1, 0xf2, 0xbf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf2, 0x6d, 0x8f, 0x2b, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x99, 0xf2, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, + 0x9, 0x9f, 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x20, 0x99, 0xf2, 0xbf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf2, 0xbf, 0x6f, 0x28, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x1b, + 0x70, 0xf4, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0xc6, 0x8, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0x10, + + /* U+F241 "" */ + 0x16, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x40, 0xd, 0xcb, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xbf, 0x40, 0xf2, 0x12, 0x22, + 0x22, 0x22, 0x22, 0x21, 0x0, 0x0, 0xb6, 0xf, + 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, 0x0, + 0xb, 0xb1, 0xf2, 0xbf, 0xff, 0xff, 0xff, 0xff, + 0xfb, 0x0, 0x0, 0x6d, 0x8f, 0x2b, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xb0, 0x0, 0x0, 0x99, 0xf2, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, + 0x9, 0x9f, 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xb0, 0x0, 0x0, 0x99, 0xf2, 0xbf, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x0, 0x0, 0xbf, 0x6f, 0x28, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x80, 0x0, 0xb, + 0x70, 0xf4, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0xc6, 0x8, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0x10, + + /* U+F242 "" */ + 0x16, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x40, 0xd, 0xcb, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xbf, 0x40, 0xf2, 0x12, 0x22, + 0x22, 0x22, 0x0, 0x0, 0x0, 0x0, 0xb6, 0xf, + 0x2b, 0xff, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0, + 0xb, 0xb1, 0xf2, 0xbf, 0xff, 0xff, 0xff, 0x40, + 0x0, 0x0, 0x0, 0x6d, 0x8f, 0x2b, 0xff, 0xff, + 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x99, 0xf2, + 0xbf, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0, 0x0, + 0x9, 0x9f, 0x2b, 0xff, 0xff, 0xff, 0xf4, 0x0, + 0x0, 0x0, 0x0, 0x99, 0xf2, 0xbf, 0xff, 0xff, + 0xff, 0x40, 0x0, 0x0, 0x0, 0xbf, 0x6f, 0x28, + 0xbb, 0xbb, 0xbb, 0xb3, 0x0, 0x0, 0x0, 0xb, + 0x70, 0xf4, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x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x0, + 0x0, 0x0, 0x0, 0x6d, 0x8f, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x99, 0xf2, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x9, 0x9f, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x99, 0xf2, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0x6f, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, + 0x70, 0xf4, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0xc6, 0x8, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0x10, + + /* U+F293 "" */ + 0x0, 0x0, 0x59, 0xaa, 0x83, 0x0, 0x0, 0x1, + 0xdf, 0xfd, 0xff, 0xfa, 0x0, 0x0, 0xcf, 0xff, + 0x58, 0xff, 0xf8, 0x0, 0x4f, 0xff, 0xf5, 0x8, + 0xff, 0xf1, 0x9, 0xff, 0xef, 0x54, 0x8, 0xff, + 0x50, 0xdf, 0x72, 0xe5, 0x79, 0xc, 0xf8, 0xf, + 0xff, 0x52, 0x35, 0x17, 0xff, 0xa0, 0xff, 0xff, + 0x50, 0x7, 0xff, 0xfb, 0xf, 0xff, 0xfc, 0x1, + 0xef, 0xff, 0xc0, 0xff, 0xfc, 0x10, 0x2, 0xef, + 0xfb, 0xe, 0xfc, 0x17, 0x57, 0x52, 0xef, 0x90, + 0xcf, 0x97, 0xf5, 0x75, 0x2d, 0xf7, 0x8, 0xff, + 0xff, 0x50, 0x2d, 0xff, 0x30, 0x2f, 0xff, 0xf5, + 0x2d, 0xff, 0xd0, 0x0, 0x7f, 0xff, 0x7d, 0xff, + 0xf3, 0x0, 0x0, 0x6e, 0xff, 0xff, 0xc3, 0x0, + 0x0, 0x0, 0x2, 0x33, 0x10, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 63, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 66, .box_h = 13, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 13, .adv_w = 82, .box_h = 4, .box_w = 4, .ofs_x = 1, .ofs_y = 8}, + {.bitmap_index = 21, .adv_w = 159, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 81, .adv_w = 144, .box_h = 16, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 153, .adv_w = 188, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 231, .adv_w = 159, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 296, .adv_w = 45, .box_h = 4, .box_w = 2, .ofs_x = 0, .ofs_y = 8}, + {.bitmap_index = 300, .adv_w = 88, .box_h = 17, .box_w = 5, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 343, .adv_w = 89, .box_h = 17, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 386, .adv_w = 110, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 414, .adv_w = 145, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 455, .adv_w = 50, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 463, .adv_w = 71, .box_h = 2, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 468, .adv_w = 67, .box_h = 3, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 471, .adv_w = 106, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 517, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 576, .adv_w = 144, .box_h = 12, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 606, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 660, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 712, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 766, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 818, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 870, .adv_w = 144, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 924, .adv_w = 144, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 983, .adv_w = 144, .box_h = 12, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1031, .adv_w = 62, .box_h = 10, .box_w = 2, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1041, .adv_w = 54, .box_h = 12, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 1059, .adv_w = 130, .box_h = 8, .box_w = 7, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 1087, .adv_w = 141, .box_h = 5, .box_w = 7, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 1105, .adv_w = 134, .box_h = 8, .box_w = 7, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 1133, .adv_w = 121, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1179, .adv_w = 230, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1291, .adv_w = 167, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1357, .adv_w = 159, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1411, .adv_w = 167, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1476, .adv_w = 168, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1530, .adv_w = 146, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1578, .adv_w = 142, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1626, .adv_w = 174, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1691, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1751, .adv_w = 70, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1763, .adv_w = 141, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 1815, .adv_w = 161, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1869, .adv_w = 138, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1917, .adv_w = 224, .box_h = 12, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1989, .adv_w = 183, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2049, .adv_w = 176, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2121, .adv_w = 162, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2175, .adv_w = 176, .box_h = 14, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2252, .adv_w = 158, .box_h = 12, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2306, .adv_w = 152, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2365, .adv_w = 153, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2425, .adv_w = 166, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2484, .adv_w = 163, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2544, .adv_w = 227, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2628, .adv_w = 161, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2688, .adv_w = 154, .box_h = 12, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2748, .adv_w = 153, .box_h = 12, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2802, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 2834, .adv_w = 105, .box_h = 13, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2880, .adv_w = 68, .box_h = 16, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 2912, .adv_w = 107, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 2937, .adv_w = 116, .box_h = 2, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 2945, .adv_w = 79, .box_h = 3, .box_w = 4, .ofs_x = 0, .ofs_y = 9}, + {.bitmap_index = 2951, .adv_w = 139, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2991, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3043, .adv_w = 134, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3083, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3135, .adv_w = 136, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3175, .adv_w = 89, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3214, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3266, .adv_w = 141, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3308, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3320, .adv_w = 61, .box_h = 16, .box_w = 4, .ofs_x = -1, .ofs_y = -4}, + {.bitmap_index = 3352, .adv_w = 130, .box_h = 12, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3400, .adv_w = 62, .box_h = 12, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3412, .adv_w = 224, .box_h = 9, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3466, .adv_w = 141, .box_h = 9, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3498, .adv_w = 146, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3543, .adv_w = 144, .box_h = 13, .box_w = 8, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 3595, .adv_w = 146, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3647, .adv_w = 87, .box_h = 9, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3670, .adv_w = 132, .box_h = 10, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3710, .adv_w = 84, .box_h = 12, .box_w = 5, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3740, .adv_w = 141, .box_h = 10, .box_w = 7, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3775, .adv_w = 124, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3811, .adv_w = 192, .box_h = 9, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3865, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3901, .adv_w = 121, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 3953, .adv_w = 127, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3989, .adv_w = 87, .box_h = 16, .box_w = 6, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 4037, .adv_w = 62, .box_h = 15, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 4052, .adv_w = 87, .box_h = 16, .box_w = 5, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 4092, .adv_w = 174, .box_h = 4, .box_w = 9, .ofs_x = 1, .ofs_y = 3}, + {.bitmap_index = 4110, .adv_w = 219, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 4222, .adv_w = 274, .box_h = 16, .box_w = 18, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 4366, .adv_w = 256, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4470, .adv_w = 256, .box_h = 11, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4547, .adv_w = 201, .box_h = 12, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4613, .adv_w = 219, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4725, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4830, .adv_w = 201, .box_h = 15, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 4928, .adv_w = 238, .box_h = 12, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5018, .adv_w = 238, .box_h = 14, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5123, .adv_w = 219, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5207, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5312, .adv_w = 110, .box_h = 12, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5354, .adv_w = 165, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5420, .adv_w = 238, .box_h = 14, .box_w = 15, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5525, .adv_w = 274, .box_h = 15, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5660, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5765, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5840, .adv_w = 201, .box_h = 15, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5938, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6043, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6148, .adv_w = 146, .box_h = 15, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6223, .adv_w = 220, .box_h = 12, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6307, .adv_w = 183, .box_h = 15, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6382, .adv_w = 183, .box_h = 15, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6465, .adv_w = 201, .box_h = 13, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6550, .adv_w = 201, .box_h = 4, .box_w = 13, .ofs_x = 0, .ofs_y = 4}, + {.bitmap_index = 6576, .adv_w = 256, .box_h = 16, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 6704, .adv_w = 256, .box_h = 15, .box_w = 16, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6824, .adv_w = 256, .box_h = 10, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6904, .adv_w = 256, .box_h = 10, .box_w = 16, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6984, .adv_w = 274, .box_h = 11, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7083, .adv_w = 238, .box_h = 13, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7181, .adv_w = 238, .box_h = 16, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7301, .adv_w = 201, .box_h = 13, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7386, .adv_w = 256, .box_h = 14, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7498, .adv_w = 256, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7634, .adv_w = 219, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 7739, .adv_w = 128, .box_h = 16, .box_w = 8, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7803, .adv_w = 256, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 7939, .adv_w = 274, .box_h = 11, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8038, .adv_w = 201, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8129, .adv_w = 219, .box_h = 17, .box_w = 14, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8248, .adv_w = 293, .box_h = 13, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8365, .adv_w = 329, .box_h = 12, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8491, .adv_w = 329, .box_h = 12, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8617, .adv_w = 329, .box_h = 12, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8743, .adv_w = 329, .box_h = 12, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8869, .adv_w = 329, .box_h = 12, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8995, .adv_w = 219, .box_h = 17, .box_w = 13, .ofs_x = 0, .ofs_y = -3} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1[] = { + 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, + 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, + 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, + 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, + 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, + 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, + 0x243, 0x292 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 + }, + { + .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 1, 53, + 3, 3, + 3, 8, + 3, 34, + 3, 66, + 3, 68, + 3, 69, + 3, 70, + 3, 72, + 3, 78, + 3, 79, + 3, 80, + 3, 81, + 3, 82, + 3, 84, + 3, 88, + 8, 3, + 8, 8, + 8, 34, + 8, 66, + 8, 68, + 8, 69, + 8, 70, + 8, 72, + 8, 78, + 8, 79, + 8, 80, + 8, 81, + 8, 82, + 8, 84, + 8, 88, + 9, 55, + 9, 56, + 9, 58, + 13, 3, + 13, 8, + 15, 3, + 15, 8, + 16, 16, + 34, 3, + 34, 8, + 34, 32, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 80, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 90, + 34, 91, + 35, 53, + 35, 55, + 35, 58, + 36, 10, + 36, 53, + 36, 62, + 36, 94, + 37, 13, + 37, 15, + 37, 34, + 37, 53, + 37, 55, + 37, 57, + 37, 58, + 37, 59, + 38, 53, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 80, + 38, 82, + 38, 86, + 38, 87, + 38, 88, + 38, 90, + 39, 13, + 39, 15, + 39, 34, + 39, 43, + 39, 53, + 39, 66, + 39, 68, + 39, 69, + 39, 70, + 39, 72, + 39, 80, + 39, 82, + 39, 83, + 39, 86, + 39, 87, + 39, 90, + 41, 34, + 41, 53, + 41, 57, + 41, 58, + 42, 34, + 42, 53, + 42, 57, + 42, 58, + 43, 34, + 44, 14, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 68, + 44, 69, + 44, 70, + 44, 72, + 44, 78, + 44, 79, + 44, 80, + 44, 81, + 44, 82, + 44, 86, + 44, 87, + 44, 88, + 44, 90, + 45, 3, + 45, 8, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 86, + 45, 87, + 45, 88, + 45, 90, + 46, 34, + 46, 53, + 46, 57, + 46, 58, + 47, 34, + 47, 53, + 47, 57, + 47, 58, + 48, 13, + 48, 15, + 48, 34, + 48, 53, + 48, 55, + 48, 57, + 48, 58, + 48, 59, + 49, 13, + 49, 15, + 49, 34, + 49, 43, + 49, 57, + 49, 59, + 49, 66, + 49, 68, + 49, 69, + 49, 70, + 49, 72, + 49, 80, + 49, 82, + 49, 85, + 49, 87, + 49, 90, + 50, 53, + 50, 55, + 50, 56, + 50, 58, + 51, 53, + 51, 55, + 51, 58, + 53, 1, + 53, 13, + 53, 14, + 53, 15, + 53, 34, + 53, 36, + 53, 40, + 53, 43, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 58, + 53, 66, + 53, 68, + 53, 69, + 53, 70, + 53, 72, + 53, 78, + 53, 79, + 53, 80, + 53, 81, + 53, 82, + 53, 83, + 53, 84, + 53, 86, + 53, 87, + 53, 88, + 53, 89, + 53, 90, + 53, 91, + 54, 34, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 68, + 55, 69, + 55, 70, + 55, 72, + 55, 80, + 55, 82, + 55, 83, + 55, 86, + 55, 87, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 34, + 56, 53, + 56, 62, + 56, 66, + 56, 68, + 56, 69, + 56, 70, + 56, 72, + 56, 80, + 56, 82, + 56, 83, + 56, 86, + 56, 94, + 57, 14, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 55, + 57, 68, + 57, 69, + 57, 70, + 57, 72, + 57, 80, + 57, 82, + 57, 86, + 57, 87, + 57, 90, + 58, 7, + 58, 10, + 58, 11, + 58, 13, + 58, 14, + 58, 15, + 58, 34, + 58, 36, + 58, 40, + 58, 43, + 58, 48, + 58, 50, + 58, 52, + 58, 53, + 58, 54, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 68, + 58, 69, + 58, 70, + 58, 71, + 58, 72, + 58, 78, + 58, 79, + 58, 80, + 58, 81, + 58, 82, + 58, 83, + 58, 84, + 58, 85, + 58, 86, + 58, 87, + 58, 89, + 58, 90, + 58, 91, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 68, + 59, 69, + 59, 70, + 59, 72, + 59, 80, + 59, 82, + 59, 86, + 59, 87, + 59, 88, + 59, 90, + 60, 43, + 60, 54, + 66, 3, + 66, 8, + 66, 87, + 66, 90, + 67, 3, + 67, 8, + 67, 87, + 67, 89, + 67, 90, + 67, 91, + 68, 3, + 68, 8, + 70, 3, + 70, 8, + 70, 87, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 68, + 71, 69, + 71, 70, + 71, 72, + 71, 82, + 71, 94, + 73, 3, + 73, 8, + 76, 68, + 76, 69, + 76, 70, + 76, 72, + 76, 82, + 78, 3, + 78, 8, + 79, 3, + 79, 8, + 80, 3, + 80, 8, + 80, 87, + 80, 89, + 80, 90, + 80, 91, + 81, 3, + 81, 8, + 81, 87, + 81, 89, + 81, 90, + 81, 91, + 83, 3, + 83, 8, + 83, 13, + 83, 15, + 83, 66, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 72, + 83, 80, + 83, 82, + 83, 85, + 83, 87, + 83, 88, + 83, 90, + 85, 80, + 87, 3, + 87, 8, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 71, + 87, 72, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 89, 68, + 89, 69, + 89, 70, + 89, 72, + 89, 80, + 89, 82, + 90, 3, + 90, 8, + 90, 13, + 90, 15, + 90, 66, + 90, 68, + 90, 69, + 90, 70, + 90, 71, + 90, 72, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 72, + 91, 80, + 91, 82, + 92, 43, + 92, 54 +}; + +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = +{ + -5, -13, -13, -15, -6, -7, -7, -7, + -7, -2, -2, -8, -2, -7, -10, 1, + -13, -13, -15, -6, -7, -7, -7, -7, + -2, -2, -8, -2, -7, -10, 1, 3, + 2, 3, -21, -21, -21, -21, -28, -15, + -15, -8, -1, -1, -1, -1, -16, -2, + -11, -9, -12, -1, -2, -1, -6, -4, + -6, 2, -3, -3, -7, -3, -4, -1, + -2, -13, -13, -3, -3, -3, -3, -5, + -3, 3, -2, -2, -2, -2, -2, -2, + -2, -2, -3, -3, -3, -29, -29, -21, + -33, 3, -4, -3, -3, -3, -3, -3, + -3, -3, -3, -3, -3, 2, -4, 2, + -3, 2, -4, 2, -3, -3, -8, -4, + -4, -4, -4, -3, -3, -3, -3, -3, + -3, -3, -3, -3, -3, -5, -8, -5, + -42, -42, 2, -8, -8, -8, -8, -34, + -7, -22, -18, -30, -5, -17, -11, -17, + 2, -4, 2, -3, 2, -4, 2, -3, + -13, -13, -3, -3, -3, -3, -5, -3, + -40, -40, -17, -25, -4, -3, -1, -2, + -2, -2, -2, -2, -2, 2, 2, 2, + -5, -3, -2, -4, -10, -2, -6, -5, + -27, -29, -27, -10, -3, -3, -30, -3, + -3, -2, 2, 2, 2, 2, -14, -12, + -12, -12, -12, -14, -14, -12, -14, -12, + -9, -14, -12, -9, -7, -10, -9, -7, + -3, 3, -28, -5, -28, -9, -2, -2, + -2, -2, 2, -6, -5, -5, -5, -5, + -6, -5, -4, -3, -1, -1, 2, 2, + -15, -7, -15, -5, 2, 2, -4, -4, + -4, -4, -4, -4, -4, -3, -2, 2, + -6, -3, -3, -3, -3, 2, -3, -3, + -3, -3, -3, -3, -3, -4, -4, -4, + 3, -6, -26, -6, -26, -12, -4, -4, + -12, -4, -4, -2, 2, -12, 2, 2, + 2, 2, 2, -9, -8, -8, -8, -3, + -8, -5, -5, -8, -5, -8, -5, -7, + -3, -5, -2, -3, -2, -4, 2, 2, + -3, -3, -3, -3, -3, -3, -3, -3, + -3, -3, -2, -3, -3, -3, -2, -2, + -8, -8, -2, -2, -4, -4, -1, -2, + -1, -2, -1, -1, -2, -2, -2, -2, + 2, 2, 3, 2, -3, -3, -3, -3, + -3, 2, -13, -13, -2, -2, -2, -2, + -2, -13, -13, -13, -13, -17, -17, -2, + -3, -2, -2, -4, -4, -1, -2, -1, + -2, 2, 2, -15, -15, -5, -2, -2, + -2, 2, -2, -2, -2, 6, 2, 2, + 2, -2, 2, 2, -13, -13, -2, -2, + -2, -2, 2, -2, -2, -2, -15, -15, + -2, -2, -2, -2, -2, -2, 2, 2, + -13, -13, -2, -2, -2, -2, 2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, + -2, -2 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = +{ + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 434, + .glyph_ids_size = 0 +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 2, + .bpp = 4, + + .kern_scale = 16, + .kern_dsc = &kern_pairs, + .kern_classes = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_roboto_16 = { + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .line_height = 18, /*The maximum line height required by the font*/ + .base_line = 4, /*Baseline measured from the bottom of the line*/ +}; + +#endif /*#if LV_FONT_ROBOTO_16*/ + diff --git a/src/lv_fonts/lv_font_roboto_18.c b/src/lv_fonts/lv_font_roboto_18.c deleted file mode 100644 index dac586d76a3f..000000000000 --- a/src/lv_fonts/lv_font_roboto_18.c +++ /dev/null @@ -1,2504 +0,0 @@ -#include "lvgl/lvgl.h" - -/******************************************************************************* - * Size: 18 px - * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 18 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_18.c - ******************************************************************************/ - -/*----------------- - * BITMAPS - *----------------*/ - -/*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { - /* U+20 " " */ - - /* U+21 "!" */ - 0x0, 0x7, 0xf3, 0x4b, 0x10, 0x0, 0x26, 0x6, - 0xf0, 0x7f, 0x17, 0xf1, 0x7f, 0x17, 0xf1, 0x7f, - 0x28, 0xf2, 0x8f, 0x26, 0xc2, - - /* U+22 "\"" */ - 0xb2, 0x68, 0xc4, 0x6a, 0xc5, 0x6b, 0xc6, 0x6c, - 0x63, 0x36, - - /* U+23 "#" */ - 0x0, 0xe5, 0x4, 0xf0, 0x0, 0x0, 0xb, 0x80, - 0x1f, 0x20, 0x0, 0x0, 0x7c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4, 0xf5, 0x3, - 0xf3, 0x0, 0x0, 0x0, 0x0, 0xe7, 0x0, 0xf4, - 0xff, 0xdf, 0xff, 0xdd, 0xdd, 0xdd, 0xde, 0xff, - 0xde, 0xf4, 0xfb, 0x69, 0xf9, 0x66, 0x66, 0x66, - 0x67, 0xfc, 0x68, 0xf4, 0xf4, 0x2, 0xf2, 0x0, - 0x0, 0x0, 0x0, 0xd6, 0x0, 0xf4, 0xf6, 0x4, - 0xf2, 0x0, 0x0, 0x0, 0x0, 0xd8, 0x1, 0xf4, - 0xff, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0xdf, - 0xff, 0xf4, 0xf9, 0x48, 0xf2, 0x0, 0x0, 0x0, - 0x0, 0xdb, 0x46, 0xf4, 0xf4, 0x2, 0xf2, 0x0, - 0x0, 0x0, 0x0, 0xd6, 0x0, 0xf4, 0xf8, 0x26, - 0xf6, 0x22, 0x22, 0x22, 0x23, 0xfa, 0x24, 0xf4, - 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xd0, 0x1, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x0, - - /* U+F00B "" */ - 0xcf, 0xff, 0xe0, 0x6f, 0xff, 0xff, 0xff, 0xff, - 0xfc, 0xff, 0xff, 0xf2, 0x9f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xf2, 0x9f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xad, 0xdd, 0xb0, 0x4d, 0xdd, - 0xdd, 0xdd, 0xdd, 0xda, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xad, 0xdd, 0xb0, - 0x4d, 0xdd, 0xdd, 0xdd, 0xdd, 0xda, 0xff, 0xff, - 0xf2, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf2, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xcf, 0xff,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 0x0, 0x0, 0x2d, - 0xf8, 0x2c, 0xfe, 0xff, 0x20, 0x0, 0x0, 0x0, - 0xb, 0xff, 0xf7, 0x6f, 0xf2, 0x0, 0x0, 0x0, - 0x0, 0x8, 0xc5, 0x5, 0xdd, 0x10, 0x0, - - /* U+F019 "" */ - 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xf8, - 0xcb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xaf, - 0xad, 0xbf, 0xff, 0xff, 0xff, 0x74, 0xaf, 0xff, - 0xff, 0xfb, 0xef, 0xff, 0xff, 0x41, 0x60, 0x8f, - 0xff, 0xff, 0x90, 0x22, 0x22, 0x11, 0xdf, 0x90, - 0x22, 0x22, 0x20, 0x0, 0x0, 0x1, 0xdf, 0xff, - 0x90, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, - 0xff, 0x90, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, - 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, 0xaf, 0xff, - 0xff, 0xff, 0xff, 0x60, 0x0, 0x0, 0x2, 0x44, - 0xbf, 0xff, 0x74, 0x40, 0x0, 0x0, 0x0, 0x0, - 0x9, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x9f, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x9, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x9f, 0xff, 0x40, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x2, 0x66, 0x60, 0x0, 0x0, 0x0, - - /* U+F01C "" */ - 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 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xff, 0xff, 0xf6, - 0x0, 0x2d, 0xff, 0xff, 0xff, 0xff, 0x67, 0xf6, - 0x0, 0x0, 0x6c, 0xff, 0xfe, 0x92, 0x0, 0x51, - 0x0, 0x0, 0x0, 0x1, 0x10, 0x0, 0x0, 0x0, - - /* U+F026 "" */ - 0x0, 0x0, 0x0, 0x55, 0x0, 0x0, 0x5, 0xfb, - 0x0, 0x0, 0x5f, 0xfb, 0x12, 0x26, 0xff, 0xfb, - 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, - 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xfb, - 0xef, 0xff, 0xff, 0xfb, 0x0, 0x3, 0xff, 0xfb, - 0x0, 0x0, 0x3f, 0xfb, 0x0, 0x0, 0x4, 0xfb, - 0x0, 0x0, 0x0, 0x34, - - /* U+F027 "" */ - 0x0, 0x0, 0x0, 0x55, 0x0, 0x0, 0x0, 0x0, - 0x5, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x5f, 0xfb, - 0x0, 0x0, 0x12, 0x26, 0xff, 0xfb, 0x0, 0x0, - 0xff, 0xff, 0xff, 0xfb, 0xb, 0x90, 0xff, 0xff, - 0xff, 0xfb, 0x3, 0xf5, 0xff, 0xff, 0xff, 0xfb, - 0x0, 0xc8, 0xff, 0xff, 0xff, 0xfb, 0x5, 0xf4, - 0xef, 0xff, 0xff, 0xfb, 0x9, 0x70, 0x0, 0x3, - 0xff, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xfb, - 0x0, 0x0, 0x0, 0x0, 0x4, 0xfb, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, - - /* U+F028 "" */ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x60, 0x0, - 0x0, 0x0, 0x0, 0x5, 0x50, 0x0, 0x6f, 0xc1, - 0x0, 0x0, 0x0, 0x5, 0xfb, 0x0, 0x31, 0x1d, - 0xd0, 0x0, 0x0, 0x5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e3, 0x9f, 0xff, 0xf2, - 0x0, 0x0, 0x0, 0x0, 0x19, 0xff, 0xff, 0x80, - 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0xf8, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x5e, 0x70, 0x0, - - /* U+F048 "" */ - 0x24, 0x10, 0x0, 0x0, 0x0, 0xf, 0xf8, 0x0, - 0x0, 0x0, 0xc4, 0xff, 0x90, 0x0, 0x0, 0xcf, - 0x4f, 0xf9, 0x0, 0x0, 0xcf, 0xf4, 0xff, 0x90, - 0x0, 0xcf, 0xff, 0x4f, 0xf9, 0x0, 0xcf, 0xff, - 0xf4, 0xff, 0x90, 0xbf, 0xff, 0xff, 0x4f, 0xf9, - 0xbf, 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x4f, 0xf9, 0xaf, 0xff, 0xff, 0xf4, 0xff, - 0x90, 0xaf, 0xff, 0xff, 0x4f, 0xf9, 0x0, 0xaf, - 0xff, 0xf4, 0xff, 0x90, 0x0, 0xaf, 0xff, 0x4f, - 0xf9, 0x0, 0x0, 0xaf, 0xf4, 0xff, 0x90, 0x0, - 0x0, 0xaf, 0x4f, 0xf8, 0x0, 0x0, 0x0, 0xa4, - 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+F04B "" */ - 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, - 0xc3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, - 0xfb, 0x20, 0x0, 0x0, 0x0, 0x0, 0xf, 0xff, - 0xff, 0x91, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, - 0xff, 0xe7, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, - 0xff, 0xfe, 0x50, 0x0, 0x0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xc3, 0x0, 0xf, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfb, 0x20, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfd, 0xf, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf8, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xa2, 0x0, 0xf, 0xff, 0xff, 0xff, 0xfb, 0x30, - 0x0, 0x0, 0xff, 0xff, 0xff, 0xd5, 0x0, 0x0, - 0x0, 0xf, 0xff, 0xfe, 0x60, 0x0, 0x0, 0x0, - 0x0, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xf, 0xa1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+F04C "" */ - 0x24, 0x44, 0x44, 0x0, 0x2, 0x44, 0x44, 0x40, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x60, 0xf, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0x50, 0xf, 0xff, 0xff, 0xf5, - 0x12, 0x22, 0x22, 0x0, 0x1, 0x22, 0x22, 0x20, - - /* U+F04D "" */ - 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x40, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, - 0x12, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x20, - - /* U+F051 "" */ - 0x10, 0x0, 0x0, 0x0, 0x33, 0xe, 0x20, 0x0, - 0x0, 0x4f, 0xf4, 0xfe, 0x30, 0x0, 0x4, 0xff, - 0x4f, 0xfe, 0x30, 0x0, 0x4f, 0xf4, 0xff, 0xfe, - 0x30, 0x4, 0xff, 0x4f, 0xff, 0xfe, 0x30, 0x4f, - 0xf4, 0xff, 0xff, 0xfe, 0x24, 0xff, 0x4f, 0xff, - 0xff, 0xfe, 0x7f, 0xf4, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x4f, 0xff, 0xff, 0xfd, 0x6f, 0xf4, 0xff, - 0xff, 0xfd, 0x14, 0xff, 0x4f, 0xff, 0xfd, 0x10, - 0x4f, 0xf4, 0xff, 0xfd, 0x10, 0x4, 0xff, 0x4f, - 0xfd, 0x10, 0x0, 0x4f, 0xf4, 0xfd, 0x10, 0x0, - 0x4, 0xff, 0x4d, 0x10, 0x0, 0x0, 0x3f, 0xf3, - 0x0, 0x0, 0x0, 0x0, 0x11, 0x0, - - /* U+F052 "" */ - 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, - 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd4, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xad, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd3, - 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, - 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x0, - 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, - 0x0, 0x1, 0xdf, 0xff, 0xff, 0xf6, 0x0, 0x0, - 0x0, 0x0, 0x1d, 0xff, 0xff, 0x60, 0x0, 0x0, - 0x0, 0x0, 0x1, 0xdf, 0xf6, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x1c, 0x60, 0x0, 0x0, 0x0, - - /* U+F053 "" */ - 0x0, 0x0, 0x0, 0x3, 0xe6, 0x0, 0x0, 0x0, - 0x3, 0xef, 0xf6, 0x0, 0x0, 0x3, 0xef, 0xff, - 0xc0, 0x0, 0x3, 0xef, 0xff, 0xe2, 0x0, 0x3, - 0xef, 0xff, 0xe2, 0x0, 0x3, 0xef, 0xff, 0xe2,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0x0, - 0x0, 0xdf, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xd, 0xff, 0xf0, 0x0, 0x0, 0xa, 0xdd, 0xdd, - 0xff, 0xff, 0xdd, 0xdd, 0xb0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x2f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf2, 0xcf, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0, 0xdf, 0xff, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xbf, 0xfe, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, - 0x0, - - /* U+F068 "" */ - 0xad, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdb, 0xf, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2c, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, - - /* U+F071 "" */ - 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x41, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfd, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfd, 0x5f, 0xff, 0xff, 0xfd, 0x44, - 0xdf, 0xff, 0xff, 0xf5, 0xc, 0xff, 0xff, 0xfb, - 0x0, 0xbf, 0xff, 0xff, 0xd0, 0x4, 0xff, 0xff, - 0xfc, 0x22, 0xcf, 0xff, 0xff, 0x40, 0x0, 0xbf, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x0, - 0x2f, 0xff, 0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0xff, 0xb0, 0x0, 0x0, 0x5, - 0x30, 0x49, 0x99, 0x99, 0x99, 0x99, 0x60, 0x0, - - /* U+F07B "" */ - 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, - 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, - 0xff, 0xe9, 0x99, 0x99, 0x98, 0x40, 0xdf, 0xff, - 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x4, 0xef, - 0xff, 0xfd, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x22, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+F093 "" */ - 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0xe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x4f, - 0x4b, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, - 0xfd, 0xfb, 0xff, 0xff, 0xff, 0xb9, 0x99, 0xdf, - 0xff, 0xff, 0xba, 0xdd, 0xdd, 0x70, 0x22, 0x10, - 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22, 0x22, 0x22, 0x27, 0xd0, 0xd6, - 0xf4, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xb0, 0xd6, - 0xf4, 0x1, 0x22, 0x22, 0x22, 0x22, 0x0, 0xd6, - 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd6, - 0xf4, 0x3, 0x44, 0x44, 0x43, 0x0, 0x0, 0xd6, - 0xf4, 0x5f, 0xff, 0xff, 0xff, 0x30, 0x0, 0xd6, - 0xf4, 0x6f, 0xff, 0x70, 0xf, 0x40, 0x1, 0xf4, - 0xf4, 0x6f, 0xff, 0x60, 0xf, 0x40, 0x1d, 0xc0, - 0xf4, 0x6f, 0xff, 0x60, 0xf, 0x41, 0xdd, 0x10, - 0xf6, 0x7f, 0xff, 0x82, 0x2f, 0x7d, 0xd1, 0x0, - 0xef, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x10, 0x0, - 0x2, 0x22, 0x22, 0x22, 0x22, 0x10, 0x0, 0x0, - - /* U+F0E7 "" */ - 0x0, 0x24, 0x0, 0x0, 0x0, 0x3, 0xe0, 0x0, - 0x0, 0x0, 0xe, 0x60, 0x0, 0x0, 0x0, 0xbd, - 0x0, 0x0, 0x0, 0x7, 0xf5, 0x0, 0x0, 0x0, - 0x3f, 0xc0, 0x0, 0x0, 0x0, 0xff, 0x30, 0x0, - 0x0, 0xb, 0xfb, 0x0, 0xdb, 0x73, 0x7f, 0xf2, - 0xb, 0xff, 0xff, 0xff, 0xa0, 0x8f, 0xff, 0xff, - 0xff, 0x24, 0xff, 0xff, 0xff, 0xf9, 0xf, 0xff, - 0xa2, 0x6a, 0xc0, 0xcf, 0xff, 0x10, 0x0, 0x8, - 0xff, 0xf6, 0x0, 0x0, 0x4f, 0xff, 0xc0, 0x0, - 0x0, 0xff, 0xff, 0x10, 0x0, 0x1, 0x22, 0x20, - 0x0, - - /* U+F0F3 "" */ - 0x0, 0x0, 0x0, 0x1, 0x77, 0x10, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x1d, 0xaf, 0xe1, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x7a, 0xff, 0xf7, - 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xd1, 0x2e, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xe2, 0x3, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x0, 0x8f, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, - 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x0, - 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb0, - 0x0, 0x0, 0x7, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x70, 0x0, 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x40, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x30, 0x0, 0x0, 0x2, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x20, 0x0, 0x0, 0x0, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, - 0x9f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, - 0x0, 0xd, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, - 0x0, 0x0, 0x1, 0x9e, 0xff, 0xe9, 0x10, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xee, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x33, 0x0, - 0x0, 0x0, 0x0, - - /* U+F11C "" */ - 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xd1, 0xf7, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0xf4, 0xf4, 0x25, 0x5, 0x66, - 0x66, 0x66, 0x66, 0x3, 0x40, 0xf4, 0xf4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, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xef, - 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c, - 0x0, - - /* U+F15B "" */ - 0x69, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x81, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0, 0x0, 0x0, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x8b, 0xbb, 0x80, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbf, 0xfd, 0x10, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbf, 0xd1, 0x0, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0xbd, 0x10, 0x0, - 0xff, 0xff, 0xff, 0xff, 0xf0, 0x81, 0x0, 0x0, - 0x36, 0x66, 0x66, 0x66, 0x60, 0x0, 0x0, 0x0, - - /* U+F1EB "" */ - 0x0, 0x0, 0x0, 0x0, 0x4, 0xa0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, - 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x6, 0x83, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x4, 0xea, 0x43, 0x6d, 0xb0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, - 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x2, 0x13, - 0xcf, 0xff, 0xff, 0x80, 0x30, 0x0, 0x0, 0x0, - 0x3, 0xfe, 0x50, 0x25, 0x64, 0x1, 0xaf, 0xb0, - 0x0, 0x0, 0x0, 0x9f, 0xff, 0xe8, 0x64, 0x6a, - 0xff, 0xff, 0x30, 0x0, 0x3, 0x70, 0x7f, 0xff, - 0xff, 0xff, 0xff, 0xfd, 0x21, 0x80, 0x3, 0xff, - 0xb1, 0x18, 0xdf, 0xff, 0xff, 0xb5, 0x5, 0xef, - 0xb0, 0x3e, 0xff, 0xf8, 0x10, 0x13, 0x42, 0x0, - 0x4b, 0xff, 0xfa, 0x0, 0x1c, 0xff, 0xff, 0xc9, - 0x77, 0x8a, 0xef, 0xff, 0xf7, 0x0, 0x0, 0x5, - 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa2, 0x0, - 0x0, 0x0, 0x0, 0x48, 0xdf, 0xff, 0xfe, 0xb6, - 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, - 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, - - /* U+F240 "" */ - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, - 0xf4, 0x26, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, - 0x66, 0x61, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x6f, 0x80, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x2, 0xf2, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x4b, 0xf1, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0x6f, 0x60, - 0xf4, 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x41, 0x6d, 0x0, 0xf9, 0x66, 0x66, 0x66, - 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xbc, 0x0, - 0x5d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xc3, 0x0, - - /* U+F241 "" */ - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, - 0xf4, 0x26, 0x66, 0x66, 0x66, 0x66, 0x66, 0x62, - 0x0, 0x0, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x6f, 0x80, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0x0, 0x0, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0x0, 0x0, 0x2, 0xf2, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, - 0x0, 0x0, 0x4b, 0xf1, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x6f, 0x60, - 0xf4, 0x14, 0x44, 0x44, 0x44, 0x44, 0x44, 0x41, - 0x0, 0x0, 0x6d, 0x0, 0xf9, 0x66, 0x66, 0x66, - 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xbc, 0x0, - 0x5d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, - 0xdd, 0xdd, 0xc3, 0x0, - - /* U+F242 "" */ - 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xf5, 0x0, 0xf8, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x9d, 0x0, - 0xf4, 0x26, 0x66, 0x66, 0x66, 0x63, 0x0, 0x0, - 0x0, 0x0, 0x6d, 0x0, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x6f, 0x80, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, - 0x0, 0x0, 0x39, 0xf1, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, - 0x0, 0x0, 0x2, 0xf2, 0xf4, 0x6f, 0xff, 0xff, - 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x2, 0xf2, - 0xf4, 0x6f, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, - 0x0, 0x0, 0x4b, 0xf1, 0xf4, 0x6f, 0xff,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x4, 0xff, - 0xff, 0x4e, 0xff, 0xfa, 0x0, 0xd, 0xff, 0xff, - 0x22, 0xef, 0xff, 0x40, 0x4f, 0xff, 0xff, 0x20, - 0x2e, 0xff, 0xb0, 0x8f, 0xf8, 0xff, 0x27, 0x22, - 0xef, 0xf0, 0xbf, 0xe1, 0x3f, 0x28, 0xa0, 0x7f, - 0xf2, 0xdf, 0xfd, 0x13, 0x15, 0x5, 0xff, 0xf4, - 0xef, 0xff, 0xd1, 0x0, 0x5f, 0xff, 0xf5, 0xef, - 0xff, 0xf9, 0x1, 0xff, 0xff, 0xf5, 0xef, 0xff, - 0xc0, 0x0, 0x3f, 0xff, 0xf5, 0xdf, 0xfb, 0x5, - 0x16, 0x13, 0xff, 0xf4, 0xbf, 0xd0, 0x5f, 0x28, - 0xb0, 0x7f, 0xf1, 0x7f, 0xfa, 0xff, 0x26, 0x14, - 0xff, 0xe0, 0x3f, 0xff, 0xff, 0x20, 0x4f, 0xff, - 0xa0, 0xc, 0xff, 0xff, 0x24, 0xff, 0xff, 0x30, - 0x2, 0xff, 0xff, 0x6f, 0xff, 0xf8, 0x0, 0x0, - 0x2c, 0xff, 0xff, 0xfe, 0x70, 0x0, 0x0, 0x0, - 0x24, 0x65, 0x30, 0x0, 0x0 -}; - - -/*--------------------- - * GLYPH DESCRIPTION - *--------------------*/ - -static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { - {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, - {.bitmap_index = 0, .adv_w = 71, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 0, .adv_w = 74, .box_h = 14, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 21, .adv_w = 92, .box_h = 5, .box_w = 4, .ofs_x = 1, .ofs_y = 9}, - {.bitmap_index = 31, .adv_w = 179, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 103, .adv_w = 162, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 188, .adv_w = 211, .box_h = 14, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 279, .adv_w = 179, .box_h = 14, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 363, .adv_w = 50, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = 9}, - {.bitmap_index = 371, .adv_w = 98, .box_h = 20, .box_w = 5, .ofs_x = 1, .ofs_y = -5}, - {.bitmap_index = 421, .adv_w = 100, .box_h = 20, .box_w = 5, .ofs_x = 0, .ofs_y = -5}, - {.bitmap_index = 471, .adv_w = 124, .box_h = 8, .box_w = 8, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 503, .adv_w = 163, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 553, .adv_w = 57, .box_h = 5, .box_w = 3, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 561, .adv_w = 79, .box_h = 3, .box_w = 5, .ofs_x = 0, .ofs_y = 4}, - {.bitmap_index = 569, .adv_w = 76, .box_h = 3, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 574, .adv_w = 119, .box_h = 15, .box_w = 7, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 627, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 690, .adv_w = 162, .box_h = 13, .box_w = 6, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 729, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 794, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 857, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 922, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 985, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1048, .adv_w = 162, .box_h = 13, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1113, .adv_w = 162, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1183, .adv_w = 162, .box_h = 13, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1242, .adv_w = 70, .box_h = 11, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1259, .adv_w = 61, .box_h = 13, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 1285, .adv_w = 146, .box_h = 9, .box_w = 8, .ofs_x = 0, .ofs_y = 1}, - {.bitmap_index = 1321, .adv_w = 158, .box_h = 6, .box_w = 8, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 1345, .adv_w = 150, .box_h = 9, .box_w = 8, .ofs_x = 1, .ofs_y = 1}, - {.bitmap_index = 1381, .adv_w = 136, .box_h = 14, .box_w = 8, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 1437, .adv_w = 259, .box_h = 17, .box_w = 15, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 1565, .adv_w = 188, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 1643, .adv_w = 179, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1708, .adv_w = 187, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 1778, .adv_w = 189, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1843, .adv_w = 164, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1902, .adv_w = 159, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 1961, .adv_w = 196, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2031, .adv_w = 205, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2103, .adv_w = 78, .box_h = 13, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2123, .adv_w = 159, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2186, .adv_w = 181, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2258, .adv_w = 155, .box_h = 13, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2317, .adv_w = 251, .box_h = 13, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2408, .adv_w = 205, .box_h = 13, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2480, .adv_w = 198, .box_h = 14, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2557, .adv_w = 182, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2622, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 2718, .adv_w = 177, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 2783, .adv_w = 171, .box_h = 14, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 2853, .adv_w = 172, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 2925, .adv_w = 187, .box_h = 14, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 2995, .adv_w = 183, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3073, .adv_w = 256, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3177, .adv_w = 181, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3249, .adv_w = 173, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3321, .adv_w = 172, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3393, .adv_w = 76, .box_h = 18, .box_w = 4, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 3429, .adv_w = 118, .box_h = 15, .box_w = 8, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3489, .adv_w = 76, .box_h = 18, .box_w = 4, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 3525, .adv_w = 120, .box_h = 7, .box_w = 7, .ofs_x = 0, .ofs_y = 6}, - {.bitmap_index = 3550, .adv_w = 130, .box_h = 2, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 3559, .adv_w = 89, .box_h = 4, .box_w = 5, .ofs_x = 0, .ofs_y = 10}, - {.bitmap_index = 3569, .adv_w = 157, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3619, .adv_w = 162, .box_h = 15, .box_w = 9, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 3687, .adv_w = 151, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3737, .adv_w = 162, .box_h = 15, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3805, .adv_w = 153, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 3855, .adv_w = 100, .box_h = 14, .box_w = 7, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 3904, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 3967, .adv_w = 159, .box_h = 14, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4023, .adv_w = 70, .box_h = 13, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4043, .adv_w = 69, .box_h = 17, .box_w = 5, .ofs_x = -1, .ofs_y = -4}, - {.bitmap_index = 4086, .adv_w = 146, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4149, .adv_w = 70, .box_h = 14, .box_w = 2, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4163, .adv_w = 252, .box_h = 10, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4233, .adv_w = 159, .box_h = 10, .box_w = 8, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4273, .adv_w = 164, .box_h = 11, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4328, .adv_w = 162, .box_h = 14, .box_w = 9, .ofs_x = 1, .ofs_y = -4}, - {.bitmap_index = 4391, .adv_w = 164, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 4454, .adv_w = 97, .box_h = 10, .box_w = 5, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 4479, .adv_w = 149, .box_h = 11, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4529, .adv_w = 94, .box_h = 13, .box_w = 6, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 4568, .adv_w = 159, .box_h = 11, .box_w = 8, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 4612, .adv_w = 140, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4657, .adv_w = 216, .box_h = 10, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4727, .adv_w = 143, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4772, .adv_w = 136, .box_h = 14, .box_w = 9, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 4835, .adv_w = 143, .box_h = 10, .box_w = 9, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 4880, .adv_w = 97, .box_h = 18, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 4934, .adv_w = 70, .box_h = 16, .box_w = 2, .ofs_x = 1, .ofs_y = -3}, - {.bitmap_index = 4950, .adv_w = 97, .box_h = 18, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, - {.bitmap_index = 5004, .adv_w = 196, .box_h = 5, .box_w = 11, .ofs_x = 1, .ofs_y = 3}, - {.bitmap_index = 5032, .adv_w = 247, .box_h = 18, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 5176, .adv_w = 309, .box_h = 18, .box_w = 20, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 5356, .adv_w = 288, .box_h = 15, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 5491, .adv_w = 288, .box_h = 13, .box_w = 16, .ofs_x = 1, .ofs_y = 0}, - {.bitmap_index = 5595, .adv_w = 226, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 5680, .adv_w = 247, .box_h = 18, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 5824, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 5960, .adv_w = 226, .box_h = 17, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 6088, .adv_w = 267, .box_h = 13, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6199, .adv_w = 267, .box_h = 16, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6335, .adv_w = 247, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6439, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 6575, .adv_w = 123, .box_h = 13, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6627, .adv_w = 185, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 6705, .adv_w = 267, .box_h = 15, .box_w = 17, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 6833, .adv_w = 309, .box_h = 17, .box_w = 20, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7003, .adv_w = 247, .box_h = 16, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7131, .adv_w = 165, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7225, .adv_w = 226, .box_h = 17, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7353, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7489, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7625, .adv_w = 165, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 7719, .adv_w = 247, .box_h = 13, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 7823, .adv_w = 206, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, - {.bitmap_index = 7917, .adv_w = 206, .box_h = 17, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8019, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8132, .adv_w = 226, .box_h = 4, .box_w = 15, .ofs_x = 0, .ofs_y = 5}, - {.bitmap_index = 8162, .adv_w = 288, .box_h = 18, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 8324, .adv_w = 288, .box_h = 17, .box_w = 18, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8477, .adv_w = 288, .box_h = 11, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8576, .adv_w = 288, .box_h = 12, .box_w = 18, .ofs_x = 0, .ofs_y = -1}, - {.bitmap_index = 8684, .adv_w = 309, .box_h = 12, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8804, .adv_w = 267, .box_h = 15, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 8932, .adv_w = 267, .box_h = 17, .box_w = 17, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 9077, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 9190, .adv_w = 288, .box_h = 15, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 9325, .adv_w = 288, .box_h = 19, .box_w = 18, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 9496, .adv_w = 247, .box_h = 17, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 9632, .adv_w = 144, .box_h = 18, .box_w = 9, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 9713, .adv_w = 288, .box_h = 19, .box_w = 18, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 9884, .adv_w = 309, .box_h = 12, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10004, .adv_w = 226, .box_h = 15, .box_w = 15, .ofs_x = 0, .ofs_y = -2}, - {.bitmap_index = 10117, .adv_w = 247, .box_h = 19, .box_w = 16, .ofs_x = 0, .ofs_y = -3}, - {.bitmap_index = 10269, .adv_w = 329, .box_h = 15, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10427, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10583, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10739, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 10895, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 11051, .adv_w = 370, .box_h = 13, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, - {.bitmap_index = 11207, .adv_w = 247, .box_h = 19, .box_w = 14, .ofs_x = 1, .ofs_y = -3} -}; - - -/*--------------------- - * CHARACTER MAPPING - *--------------------*/ - -static uint16_t unicode_list_1[] = { - 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, - 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, - 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, - 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, - 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, - 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, - 0x243, 0x292 -}; - -/*Collect the unicode lists and glyph_id offsets*/ -static const lv_font_fmt_txt_cmap_t cmaps[] = -{ - { - .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, - .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 - }, - { - .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, - .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 - } -}; - - -/*----------------- - * KERNING - *----------------*/ - - -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = -{ - 1, 53, - 3, 3, - 3, 8, - 3, 34, - 3, 66, - 3, 68, - 3, 69, - 3, 70, - 3, 72, - 3, 78, - 3, 79, - 3, 80, - 3, 81, - 3, 82, - 3, 84, - 3, 88, - 8, 3, - 8, 8, - 8, 34, - 8, 66, - 8, 68, - 8, 69, - 8, 70, - 8, 72, - 8, 78, - 8, 79, - 8, 80, - 8, 81, - 8, 82, - 8, 84, - 8, 88, - 9, 55, - 9, 56, - 9, 58, - 13, 3, - 13, 8, - 15, 3, - 15, 8, - 16, 16, - 34, 3, - 34, 8, - 34, 32, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 80, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 90, - 34, 91, - 35, 53, - 35, 55, - 35, 58, - 36, 10, - 36, 53, - 36, 62, - 36, 94, - 37, 13, - 37, 15, - 37, 34, - 37, 53, - 37, 55, - 37, 57, - 37, 58, - 37, 59, - 38, 53, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 80, - 38, 82, - 38, 86, - 38, 87, - 38, 88, - 38, 90, - 39, 13, - 39, 15, - 39, 34, - 39, 43, - 39, 53, - 39, 66, - 39, 68, - 39, 69, - 39, 70, - 39, 72, - 39, 80, - 39, 82, - 39, 83, - 39, 86, - 39, 87, - 39, 90, - 41, 34, - 41, 53, - 41, 57, - 41, 58, - 42, 34, - 42, 53, - 42, 57, - 42, 58, - 43, 34, - 44, 14, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 68, - 44, 69, - 44, 70, - 44, 72, - 44, 78, - 44, 79, - 44, 80, - 44, 81, - 44, 82, - 44, 86, - 44, 87, - 44, 88, - 44, 90, - 45, 3, - 45, 8, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 86, - 45, 87, - 45, 88, - 45, 90, - 46, 34, - 46, 53, - 46, 57, - 46, 58, - 47, 34, - 47, 53, - 47, 57, - 47, 58, - 48, 13, - 48, 15, - 48, 34, - 48, 53, - 48, 55, - 48, 57, - 48, 58, - 48, 59, - 49, 13, - 49, 15, - 49, 34, - 49, 43, - 49, 57, - 49, 59, - 49, 66, - 49, 68, - 49, 69, - 49, 70, - 49, 72, - 49, 80, - 49, 82, - 49, 85, - 49, 87, - 49, 90, - 50, 53, - 50, 55, - 50, 56, - 50, 58, - 51, 53, - 51, 55, - 51, 58, - 53, 1, - 53, 13, - 53, 14, - 53, 15, - 53, 34, - 53, 36, - 53, 40, - 53, 43, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 58, - 53, 66, - 53, 68, - 53, 69, - 53, 70, - 53, 72, - 53, 78, - 53, 79, - 53, 80, - 53, 81, - 53, 82, - 53, 83, - 53, 84, - 53, 86, - 53, 87, - 53, 88, - 53, 89, - 53, 90, - 53, 91, - 54, 34, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 68, - 55, 69, - 55, 70, - 55, 72, - 55, 80, - 55, 82, - 55, 83, - 55, 86, - 55, 87, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 34, - 56, 53, - 56, 62, - 56, 66, - 56, 68, - 56, 69, - 56, 70, - 56, 72, - 56, 80, - 56, 82, - 56, 83, - 56, 86, - 56, 94, - 57, 14, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 55, - 57, 68, - 57, 69, - 57, 70, - 57, 72, - 57, 80, - 57, 82, - 57, 86, - 57, 87, - 57, 90, - 58, 7, - 58, 10, - 58, 11, - 58, 13, - 58, 14, - 58, 15, - 58, 34, - 58, 36, - 58, 40, - 58, 43, - 58, 48, - 58, 50, - 58, 52, - 58, 53, - 58, 54, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 68, - 58, 69, - 58, 70, - 58, 71, - 58, 72, - 58, 78, - 58, 79, - 58, 80, - 58, 81, - 58, 82, - 58, 83, - 58, 84, - 58, 85, - 58, 86, - 58, 87, - 58, 89, - 58, 90, - 58, 91, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 68, - 59, 69, - 59, 70, - 59, 72, - 59, 80, - 59, 82, - 59, 86, - 59, 87, - 59, 88, - 59, 90, - 60, 43, - 60, 54, - 66, 3, - 66, 8, - 66, 87, - 66, 90, - 67, 3, - 67, 8, - 67, 87, - 67, 89, - 67, 90, - 67, 91, - 68, 3, - 68, 8, - 70, 3, - 70, 8, - 70, 87, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 68, - 71, 69, - 71, 70, - 71, 72, - 71, 82, - 71, 94, - 73, 3, - 73, 8, - 76, 68, - 76, 69, - 76, 70, - 76, 72, - 76, 82, - 78, 3, - 78, 8, - 79, 3, - 79, 8, - 80, 3, - 80, 8, - 80, 87, - 80, 89, - 80, 90, - 80, 91, - 81, 3, - 81, 8, - 81, 87, - 81, 89, - 81, 90, - 81, 91, - 83, 3, - 83, 8, - 83, 13, - 83, 15, - 83, 66, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 72, - 83, 80, - 83, 82, - 83, 85, - 83, 87, - 83, 88, - 83, 90, - 85, 80, - 87, 3, - 87, 8, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 71, - 87, 72, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 89, 68, - 89, 69, - 89, 70, - 89, 72, - 89, 80, - 89, 82, - 90, 3, - 90, 8, - 90, 13, - 90, 15, - 90, 66, - 90, 68, - 90, 69, - 90, 70, - 90, 71, - 90, 72, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 72, - 91, 80, - 91, 82, - 92, 43, - 92, 54 -}; - -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = -{ - -6, -15, -15, -17, -7, -8, -8, -8, - -8, -3, -3, -9, -3, -8, -11, 2, - -15, -15, -17, -7, -8, -8, -8, -8, - -3, -3, -9, -3, -8, -11, 2, 3, - 3, 3, -24, -24, -24, -24, -31, -17, - -17, -9, -2, -2, -2, -2, -18, -2, - -12, -10, -13, -2, -2, -2, -7, -5, - -7, 2, -4, -3, -8, -4, -4, -2, - -2, -14, -14, -3, -4, -3, -3, -6, - -3, 3, -3, -3, -3, -3, -3, -3, - -3, -2, -4, -3, -4, -33, -33, -24, - -37, 3, -5, -3, -3, -3, -3, -3, - -3, -4, -3, -3, -3, 3, -4, 2, - -4, 3, -4, 2, -4, -3, -9, -4, - -4, -4, -4, -4, -4, -4, -4, -3, - -3, -4, -3, -4, -3, -6, -9, -6, - -47, -47, 3, -9, -9, -9, -9, -39, - -8, -25, -20, -34, -6, -19, -13, -19, - 3, -4, 2, -4, 3, -4, 2, -4, - -14, -14, -3, -4, -3, -3, -6, -3, - -46, -46, -19, -28, -4, -4, -2, -2, - -2, -2, -2, -2, -2, 2, 2, 2, - -6, -4, -3, -5, -11, -3, -7, -6, - -31, -33, -31, -11, -4, -4, -34, -4, - -4, -2, 2, 2, 2, 2, -16, -14, - -14, -14, -14, -15, -15, -14, -15, -14, - -11, -16, -13, -10, -8, -11, -10, -8, - -3, 3, -32, -5, -32, -11, -2, -2, - -2, -2, 2, -6, -6, -6, -6, -6, - -6, -6, -4, -4, -2, -2, 3, 2, - -17, -8, -17, -6, 2, 2, -5, -4, - -4, -4, -4, -4, -4, -3, -3, 2, - -6, -4, -4, -4, -4, 2, -4, -4, - -4, -4, -3, -4, -3, -4, -4, -4, - 3, -7, -30, -7, -30, -13, -4, -4, - -13, -4, -4, -2, 2, -13, 3, 2, - 2, 3, 3, -10, -9, -9, -9, -3, - -9, -6, -6, -9, -6, -9, -6, -8, - -3, -5, -3, -3, -3, -4, 3, 2, - -4, -4, -4, -4, -3, -3, -3, -3, - -3, -3, -3, -4, -4, -4, -3, -3, - -9, -9, -2, -2, -4, -4, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, - 2, 2, 3, 3, -3, -3, -3, -3, - -3, 3, -15, -15, -3, -3, -3, -3, - -3, -15, -15, -15, -15, -19, -19, -2, - -3, -2, -2, -4, -4, -2, -2, -2, - -2, 2, 2, -17, -17, -6, -3, -3, - -3, 2, -3, -3, -3, 7, 3, 2, - 3, -3, 2, 2, -15, -15, -2, -2, - -2, -2, 2, -2, -2, -2, -17, -17, - -3, -3, -3, -3, -3, -3, 2, 2, - -15, -15, -2, -2, -2, -2, 2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, - -3, -3 -}; - -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = -{ - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 434, - .glyph_ids_size = 0 -}; - - -/*-------------------- - * ALL CUSTOM DATA - *--------------------*/ - -/*Store all the custom data of the font*/ -static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, - .glyph_dsc = glyph_dsc, - .cmaps = cmaps, - .cmap_num = 2, - .bpp = 4, - - .kern_scale = 16, - //.kern_dsc = &kern_classes, - //.kern_classes = 1, - .kern_dsc = &kern_pairs, - .kern_classes = 0, -}; - - -/*----------------- - * PUBLIC FONT - *----------------*/ - -/*Initialize a public general font descriptor*/ -lv_font_t lv_font_roboto_18 = { - .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ - .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ - .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ - .line_height = 21, /*The maximum line height required by the font*/ - .base_line = 4, /*Baseline measured from the bottom of the line*/ -}; diff --git a/src/lv_fonts/lv_font_roboto_22.c b/src/lv_fonts/lv_font_roboto_22.c new file mode 100644 index 000000000000..09e5bb5f2790 --- /dev/null +++ b/src/lv_fonts/lv_font_roboto_22.c @@ -0,0 +1,3144 @@ +#include "lvgl/lvgl.h" + +/******************************************************************************* + * Size: 22 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 22 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_22.c + ******************************************************************************/ + +#ifndef LV_FONT_ROBOTO_22 +#define LV_FONT_ROBOTO_22 1 +#endif + +#if LV_FONT_ROBOTO_22 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0x2a, 0x90, 0x3f, 0xd0, 0x2f, 0xd0, 0x2f, 0xd0, + 0x2f, 0xd0, 0x2f, 0xc0, 0x2f, 0xc0, 0x1f, 0xc0, + 0x1f, 0xc0, 0x1f, 0xc0, 0x1f, 0xb0, 0x9, 0x70, + 0x0, 0x0, 0x1, 0x0, 0x2f, 0xe0, 0x2f, 0xe0, + 0x0, 0x0, + + /* U+22 "\"" */ + 0x37, 0x4, 0x68, 0xf0, 0x9d, 0x8e, 0xa, 0xd8, + 0xd0, 0xab, 0x8c, 0xa, 0xa6, 0x80, 0x87, + + /* U+23 "#" */ + 0x0, 0x0, 0x5, 0xa0, 0x1, 0xa4, 0x0, 0x0, + 0x0, 0xbd, 0x0, 0x5f, 0x30, 0x0, 0x0, 0xe, + 0x90, 0x8, 0xf0, 0x0, 0x0, 0x1, 0xf6, 0x0, + 0xbc, 0x0, 0x1, 0x33, 0x6f, 0x63, 0x3e, 0xb3, + 0x20, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x2, + 0x55, 0xdd, 0x55, 0x9f, 0x75, 0x30, 0x0, 0xe, + 0xa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9, 0x0, 0x4f, 0x40, 0x0, 0x0, 0x0, 0x0, + 0xb, 0xd0, 0x0, 0xf9, 0xee, 0x66, 0xcf, 0xc6, + 0x66, 0x66, 0x66, 0x66, 0x7f, 0xf8, 0x69, 0xf8, + 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd1, 0x0, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x21, 0x0, + + /* U+F00B "" */ + 0x14, 0x44, 0x42, 0x0, 0x24, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x41, 0xef, 0xff, 0xff, 0x21, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0x42, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x42, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0x31, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x26, + 0x66, 0x64, 0x0, 0x36, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x62, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0xfe, + 0x10, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + 0xff, 0xff, 0xff, 0x42, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x42, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x41, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x6b, 0xbb, 0xb9, 0x0, 0x8b, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xb6, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6b, + 0xbb, 0xb9, 0x0, 0x8b, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xb6, 0xff, 0xff, 0xff, 0x41, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x42, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x42, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xaf, 0xff, 0xfd, 0x10, 0xcf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + + /* U+F00C "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xb5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2e, 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2, 0xef, 0xff, 0xf4, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff, 0xff, 0xf6, + 0x0, 0x14, 0x0, 0x0, 0x0, 0x2, 0xef, 0xff, + 0xff, 0x90, 0x1, 0xdf, 0xa0, 0x0, 0x0, 0x2e, + 0xff, 0xff, 0xf9, 0x0, 0x1d, 0xff, 0xf9, 0x0, + 0x2, 0xef, 0xff, 0xff, 0x90, 0x0, 0x7f, 0xff, + 0xff, 0x90, 0x2e, 0xff, 0xff, 0xf9, 0x0, 0x0, + 0x2e, 0xff, 0xff, 0xfa, 0xef, 0xff, 0xff, 0x90, + 0x0, 0x0, 0x2, 0xef, 0xff, 0xff, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff, 0xff, + 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xef, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2e, 0xff, 0xff, 0x90, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2, 0xef, 0xf9, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2b, + 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F00D "" */ + 0x0, 0x24, 0x0, 0x0, 0x0, 0x2, 0x30, 0x0, + 0x3e, 0xf8, 0x0, 0x0, 0x4, 0xff, 0x70, 0x3f, + 0xff, 0xf8, 0x0, 0x4, 0xff, 0xff, 0x69, 0xff, + 0xff, 0xf8, 0x4, 0xff, 0xff, 0xfe, 0x2e, 0xff, + 0xff, 0xfa, 0xff, 0xff, 0xff, 0x60, 0x3e, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, 0x3e, 0xff, + 0xff, 0xff, 0xff, 0x60, 0x0, 0x0, 0x3e, 0xff, + 0xff, 0xff, 0x60, 0x0, 0x0, 0x4, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0x0, 0x4, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0x4, 0xff, 0xff, 0xff, 0x8e, 0xff, + 0xff, 0xf8, 0x9f, 0xff, 0xff, 0x60, 0x3e, 0xff, + 0xff, 0xe2, 0xef, 0xff, 0x60, 0x0, 0x3e, 0xff, + 0xf4, 0x2, 0xef, 0x60, 0x0, 0x0, 0x3e, 0xf5, + 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x11, 0x0, + + /* U+F011 "" */ + 0x0, 0x0, 0x0, 0x0, 0x7c, 0x50, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, + 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2a, 0x70, + 0x2f, 0xff, 0x0, 0x89, 0x10, 0x0, 0x0, 0x3f, + 0xff, 0x32, 0xff, 0xf0, 0x5f, 0xfe, 0x20, 0x0, + 0x2f, 0xff, 0xf1, 0x2f, 0xff, 0x3, 0xff,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, 0xff, 0xff, 0xd0, 0x0, + 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x10, 0x0, 0x3, 0xff, 0xff, 0xb2, 0x3, + 0xcf, 0xff, 0xf1, 0x0, 0xad, 0xff, 0xff, 0xc0, + 0x0, 0x1, 0xef, 0xff, 0xfc, 0x8f, 0xff, 0xff, + 0xf6, 0x0, 0x0, 0x8, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0x50, 0x0, 0x0, 0x7f, 0xff, 0xff, + 0xde, 0xff, 0xff, 0xfa, 0x0, 0x0, 0xc, 0xff, + 0xff, 0xfc, 0x1, 0x6f, 0xff, 0xf7, 0x0, 0x9, + 0xff, 0xff, 0x52, 0x0, 0x1, 0xff, 0xff, 0xfe, + 0xce, 0xff, 0xff, 0xe0, 0x0, 0x0, 0xaf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0x0, 0x2f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, + 0x0, 0x6f, 0xfe, 0xaf, 0xff, 0xff, 0x9f, 0xff, + 0x60, 0x0, 0x0, 0x7b, 0x10, 0xaf, 0xff, 0x80, + 0x2c, 0x50, 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, + 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x29, 0x99, 0x10, 0x0, 0x0, 0x0, + + /* U+F014 "" */ + 0x0, 0x0, 0x0, 0x34, 0x44, 0x40, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xfe, 0x10, + 0x0, 0x0, 0x0, 0x0, 0x3f, 0x94, 0x44, 0x5f, + 0x80, 0x0, 0x0, 0x12, 0x22, 0xaf, 0x32, 0x22, + 0x2d, 0xe2, 0x22, 0x20, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff,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, 0x99, 0x20, + 0x0, 0x0, 0x0, 0xe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2e, 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff, 0xff, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, + 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x14, 0x44, + 0x44, 0x40, 0x2e, 0xf8, 0x2, 0x44, 0x44, 0x43, + 0xe, 0xff, 0xff, 0xff, 0xa0, 0x25, 0x4, 0xff, + 0xff, 0xff, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xa1, + 0x5, 0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x46, + 0xf6, 0x4f, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfc, 0xdf, 0xdc, 0xf6, 0xaf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, + + /* U+F01C "" */ + 0x0, 0x4, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb3, + 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xd0, 0x0, 0x0, 0x6f, 0xfa, 0xaa, 0xaa, + 0xaa, 0xab, 0xff, 0x40, 0x0, 0xd, 0xfb, 0x0, + 0x0, 0x0, 0x0, 0xd, 0xfb, 0x0, 0x4, 0xff, + 0x40, 0x0, 0x0, 0x0, 0x0, 0x6f, 0xf2, 0x0, + 0xbf, 0xd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x80, 0x2f, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x9, 0xff, 0x9, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2f, 0xf6, 0xef, 0xa1, 0x11, 0x0, + 0x0, 0x0, 0x1, 0x11, 0xcf, 0xbf, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0xb, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0xf1, 0x0, 0x3, 0xff, 0xff, 0xff, + 0xdf, 0xff, 0xff, 0xff, 0xdb, 0xbb, 0xdf, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + + /* U+F021 "" */ + 0x0, 0x0, 0x0, 0x1, 0x34, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x6d, 0xff, 0xff, 0xfb, + 0x40, 0x0, 0x34, 0x0, 0x3, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0xc1, 0x4f, 0xd0, 0x4, 0xff, 0xff, + 0xff, 0xef, 0xff, 0xff, 0xef, 0xfd, 0x2, 0xff, + 0xff, 0x93, 0x0, 0x3, 0xaf, 0xff, 0xff, 0xd0, + 0xcf, 0xff, 0x40, 0x0, 0x0, 0x0, 0x9f, 0xff, + 0xfd, 0x3f, 0xff, 0x50, 0x0, 0x0, 0x0, 0x4f, + 0xff, 0xff, 0xd9, 0xff, 0xc0, 0x0, 0x0, 0x0, + 0x1f, 0xff, 0xff, 0xfd, 0x69, 0x93, 0x0, 0x0, + 0x0, 0x0, 0x89, 0x99, 0x99, 0x50, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x2, 0x44, 0x44, 0x42, 0x0, 0x0, 0x0, 0x0, + 0x24, 0x41, 0xff, 0xff, 0xff, 0xf0, 0x0, 0x0, + 0x0, 0xc, 0xff, 0x6f, 0xff, 0xff, 0xf6, 0x0, + 0x0, 0x0, 0x4, 0xff, 0xf1, 0xff, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x2, 0xef, 0xfa, 0xf, 0xff, + 0xff, 0xe5, 0x0, 0x0, 0x6, 0xff, 0xff, 0x20, + 0xff, 0xff, 0xff, 0xfe, 0xa9, 0xbe, 0xff, 0xff, + 0x40, 0xf, 0xf6, 0x6f, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x40, 0x0, 0x95, 0x0, 0x2a, 0xff, 0xff, + 0xff, 0xf9, 0x10, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x57, 0x87, 0x51, 0x0, 0x0, 0x0, + + /* U+F026 "" */ + 0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, + 0x8, 0xf6, 0x0, 0x0, 0x0, 0x8f, 0xf6, 0x0, + 0x0, 0x8, 0xff, 0xf6, 0x0, 0x0, 0x8f, 0xff, + 0xf6, 0xdf, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, + 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, + 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x24, + 0x44, 0xbf, 0xff, 0xf6, 0x0, 0x0, 0xb, 0xff, + 0xf6, 0x0, 0x0, 0x0, 0xbf, 0xf6, 0x0, 0x0, + 0x0, 0xb, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x71, + + /* U+F027 "" */ + 0x0, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x8f, 0x60, 0x0, 0x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0, 0xf9, 0xf9, 0x6, 0xff, 0xf6, + 0x0, 0x0, 0x5, 0xff, 0xd2, 0x0, 0x0, 0xf9, + 0xf9, 0x0, 0x48, 0x40, 0x0, 0x0, 0x5f, 0xff, + 0xfd, 0x20, 0x0, 0xf9, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x5, 0xff, 0xff, 0xff, 0xe2, 0x0, 0xf9, + 0xf9, 0x0, 0x0, 0x46, 0x0, 0x5f, 0xff, 0xff, + 0xff, 0xfd, 0x10, 0xf9, 0xf9, 0x0, 0x4, 0xff, + 0x65, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0xf9, + 0xf9, 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x60, 0xf9, 0xf9, 0x4, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0xf9, + 0xf9, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x60, 0xf9, 0xf9, 0xd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0xf9, + 0xf9, 0x5, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x20, 0xf9, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf9, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf4, 0x7, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x40, + + /* U+F040 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, 0xe5, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, + 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xb, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, + 0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9f, 0xff, 0xf9, 0xff, + 0xf2, 0x0, 0x9f, 0xff, 0xff, 0x9f, 0xff, 0x20, + 0x9f, 0xff, 0xff, 0xf9, 0xff, 0xf2, 0x9f, 0xff, + 0xff, 0xff, 0x9f, 0xff, 0xbf, 0xff, 0xff, 0xff, + 0xf9, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x9f, + 0xff, 0x3c, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xf2, + 0x1c, 0xff, 0xff, 0xff, 0x9f, 0xff, 0x20, 0x1c, + 0xff, 0xff, 0xf9, 0xff, 0xf2, 0x0, 0x1c, 0xff, + 0xff, 0x9f, 0xff, 0x20, 0x0, 0x1c, 0xff, 0xf9, + 0xff, 0xf2, 0x0, 0x0, 0x1c, 0xff, 0x9f, 0xff, + 0x20, 0x0, 0x0, 0x1c, 0xf9, 0xff, 0xf2, 0x0, + 0x0, 0x0, 0x1d, 0x96, 0x97, 0x0, 0x0, 0x0, + 0x0, 0x14, + + /* U+F04B "" */ + 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xfd, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfb, 0x30, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0xfa, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xe6, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd5, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xb3, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa1, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xe5, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xe7, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf9, 0x10, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x20, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xfc, 0x30, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xfe, 0x60, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0x91, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x82, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, + + /* U+F04C "" */ + 0x24, 0x44, 0x44, 0x41, 0x0, 0x2, 0x44, 0x44, + 0x44, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x0, 0xff, + 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfd, 0x0, + 0xf, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, + 0xd0, 0x0, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0xfd, 0x0, 0xf, 0xff, 0xff, 0xff, 0xdf, + 0xff, 0xff, 0xff, 0xd0, 0x0, 0xff, 0xff, 0xff, + 0xfd, 0xff, 0xff, 0xff, 0xfd, 0x0, 0xf, 0xff, + 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xd0, 0x0, + 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, + 0x0, 0xf, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, + 0xff, 0xd0, 0x0, 0xff, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0xfd, 0x0, 0xf, 0xff, 0xff, 0xff, + 0xdf, 0xff, 0xff, 0xff, 0xd0, 0x0, 0xff, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0x0, 0xf, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xd0, + 0x0, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xfd, 0x0, 0xf, 0xff, 0xff, 0xff, 0xdf, 0xff, + 0xff, 0xff, 0xd0, 0x0, 0xff, 0xff, 0xff, 0xfd, + 0xff, 0xff, 0xff, 0xfd, 0x0, 0xf, 0xff, 0xff, + 0xff, 0xdf, 0xff, 0xff, 0xff, 0xd0, 0x0, 0xff, + 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0x0, + 0xf, 0xff, 0xff, 0xff, 0xd6, 0x99, 0x99, 0x99, + 0x50, 0x0, 0x69, 0x99, 0x99, 0x95, + + /* U+F04D "" */ + 0x24, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x44, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xd6, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x95, + + /* U+F051 "" */ + 0x10, 0x0, 0x0, 0x0, 0x0, 0x44, 0xf, 0x30, + 0x0, 0x0, 0x0, 0x8f, 0xf8, 0xff, 0x30, 0x0, + 0x0, 0x9, 0xff, 0x9f, 0xff, 0x30, 0x0, 0x0, + 0x9f, 0xf9, 0xff, 0xff, 0x30, 0x0, 0x9, 0xff, + 0x9f, 0xff, 0xff, 0x30, 0x0, 0x9f, 0xf9, 0xff, + 0xff, 0xff, 0x30, 0x9, 0xff, 0x9f, 0xff, 0xff, + 0xff, 0x30, 0x9f, 0xf9, 0xff, 0xff, 0xff, 0xff, + 0x39, 0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xcf, + 0xf9, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0x9f, + 0xff, 0xff, 0xff, 0xf7, 0x9f, 0xf9, 0xff, 0xff, + 0xff, 0xf7, 0x9, 0xff, 0x9f, 0xff, 0xff, 0xf7, + 0x0, 0x9f, 0xf9, 0xff, 0xff, 0xf7, 0x0, 0x9, + 0xff, 0x9f, 0xff, 0xf7, 0x0, 0x0, 0x9f, 0xf9, + 0xff, 0xf7, 0x0, 0x0, 0x9, 0xff, 0x9f, 0xf7, + 0x0, 0x0, 0x0, 0x9f, 0xf9, 0xf7, 0x0, 0x0, + 0x0, 0x9, 0xff, 0x95, 0x0, 0x0, 0x0, 0x0, + 0x29, 0x92, + + /* U+F052 "" */ + 0x0, 0x0, 0x0, 0x0, 0x3a, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xfe, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, + 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, + 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x3f, 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, + 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, + 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x20, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x20, 0x3f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfe, 0x29, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb8, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x8, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xb7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, + + /* U+F053 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x62, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x9, 0xff, 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, 0x0, + 0x0, 0x0, 0x7, 0xff, 0xf4, 0x0, 0x4f, 0xff, + 0x70, 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xf5, + 0x0, 0x5f, 0xff, 0xf1, 0x0, 0x0, 0x0, 0x0, + 0x9f, 0xff, 0xf5, 0x0, 0x6f, 0xff, 0xf9, 0x0, + 0x0, 0x0, 0x2, 0xff, 0xff, 0xf6, 0x0, 0x6f, + 0xff, 0xff, 0x20, 0x0, 0x0, 0xa, 0xff, 0xff, + 0xf9, 0x44, 0xaf, 0xff, 0xff, 0xa0, 0x0, 0x0, + 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf3, 0x0, 0x0, 0xcf, 0xff, 0xff, 0xfa, 0x44, + 0xaf, 0xff, 0xff, 0xfc, 0x0, 0x4, 0xff, 0xff, + 0xff, 0xf6, 0x0, 0x6f, 0xff, 0xff, 0xff, 0x40, + 0xd, 0xff, 0xff, 0xff, 0xf6, 0x0, 0x6f, 0xff, + 0xff, 0xff, 0xd0, 0x6f, 0xff, 0xff, 0xff, 0xfc, + 0x99, 0xcf, 0xff, 0xff, 0xff, 0xf6, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfd, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0x28, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x82, + + /* U+F074 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xb, 0xc0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0xfc, + 0x0, 0xab, 0xba, 0x83, 0x0, 0x0, 0x1, 0x7a, + 0xbb, 0xbe, 0xff, 0xc0, 0xff, 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ff, + 0xe2, 0x2e, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x4, + 0xff, 0xff, 0xfe, 0xef, 0xff, 0xff, 0x40, 0x0, + 0x0, 0x0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf4, + 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff, + 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, + 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x3, 0xff, 0xff, 0x40, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3f, 0xf4, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x20, + 0x0, 0x0, 0x0, 0x0, + + /* U+F079 "" */ + 0x0, 0x0, 0x0, 0x0, 0x12, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x0, 0x0, 0x0, 0x3, 0xf9, 0x0, + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, + 0x0, 0x1e, 0xff, 0x70, 0x3f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x60, 0x0, 0x0, 0xcf, 0xff, 0xf4, + 0x6, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, + 0xa, 0xff, 0xff, 0xff, 0x20, 0x0, 0x0, 0x0, + 0xb, 0xff, 0x60, 0x0, 0x8f, 0xff, 0xff, 0xff, + 0xd1, 0x0, 0x0, 0x0, 0xb, 0xff, 0x60, 0x0, + 0xef, 0xff, 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0, + 0xb, 0xff, 0x60, 0x0, 0x2, 0x2e, 0xff, 0x62, + 0x10, 0x0, 0x0, 0x0, 0xb, 0xff, 0x60, 0x0, + 0x0, 0xd, 0xff, 0x40, 0x0, 0x0, 0x0, 0x14, + 0x4c, 0xff, 0x94, 0x40, 0x0, 0xd, 0xff, 0x40, + 0x0, 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xf7, + 0x0, 0xd, 0xff, 0x40, 0x0, 0x0, 0x0, 0x4f, + 0xff, 0xff, 0xff, 0xe1, 0x0, 0xd, 0xff, 0x62, + 0x22, 0x22, 0x21, 0x6, 0xff, 0xff, 0xff, 0x20, + 0x0, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, + 0x9f, 0xff, 0xf4, 0x0, 0x0, 0xd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd1, 0xb, 0xff, 0x70, 0x0, + 0x0, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, + 0x1, 0xc9, 0x0, 0x0, + + /* U+F07B "" */ + 0x0, 0x34, 0x44, 0x41, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2, 0xef, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, 0xff, + 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, + 0xff, 0xff, 0xff, 0xff, 0x72, 0x22, 0x22, 0x22, + 0x20, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf5, 0xf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x10, 0xaf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0x40, + + /* U+F093 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xae, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xaf, 0xfe, 0x30, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xaf, 0xff, 0xfe, 0x30, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, 0xff, 0xff, + 0xfe, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0xaf, + 0xff, 0xff, 0xff, 0xfe, 0x30, 0x0, 0x0, 0x0, + 0x0, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, + 0x0, 0x0, 0x0, 0xe, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2f, 0xff, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, 0x90, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2f, + 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2, 0xff, 0xff, 0x90, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0xf8, 0x0, + 0x0, 0x0, 0x0, 0x6b, 0xbb, 0xbb, 0x70, 0x24, + 0x44, 0x2, 0xbb, 0xbb, 0xba, 0x1f, 0xff, 0xff, + 0xff, 0x72, 0x22, 0x24, 0xdf, 0xff, 0xff, 0xf6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfa, 0xcf, 0xca, 0xf6, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x57, 0xf7, 0x5f, 0x6f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf6, 0x49, 0x99, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x98, 0x0, + + /* U+F095 "" */ + 0x0, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4f, 0xff, 0xe1, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xbf, 0xff, 0xf8, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xfd, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0xff, + 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xe, 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x7, 0xff, 0xf3, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xef, 0xfd, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, 0xc1, 0x0, + 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ff, 0xf8, 0x0, + 0x0, 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfc, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x60, 0x0, 0x0, 0xd, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, 0x7f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x40, 0x1f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xa, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xa0, 0x0, 0x0, 0x0, 0x0, 0xea, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xba, 0xaf, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1b, 0xef, 0xb1, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F11C "" */ + 0x1, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x0, 0x9f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, + 0xfb, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0xf8, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf9, + 0xf9, 0xd, 0xb0, 0xbd, 0x8, 0xf0, 0x6f, 0x14, + 0xf4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0x4, + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x0, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x0, + 0x0, 0x8b, 0xbb, 0xbb, 0xbc, 0xff, 0xff, 0xf2, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, + 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xff, 0xfa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x2, 0xff, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2, 0xff, 0xa0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x2, 0xff, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x2, 0xfa, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x71, 0x0, 0x0, + 0x0, 0x0, + + /* U+F15B "" */ + 0x8d, 0xdd, 0xdd, 0xdd, 0xdd, 0xd0, 0x10, 0x0, + 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6, + 0x80, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf0, 0x6f, 0x80, 0x0, 0xf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x6, 0xff, 0x80, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf0, 0x6f, 0xff, 0x80, 0xf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x6, 0xff, 0xff, + 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x26, + 0x66, 0x66, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x50, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfa, 0x2, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x0, + + /* U+F1EB "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x23, 0x43, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0x8c, 0xff, 0xff, 0xff, 0xfc, 0x83, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x4c, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0x50, 0x0, 0x0, 0x1, 0xbf, + 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, + 0xc2, 0x0, 0x4, 0xef, 0xff, 0xfd, 0x83, 0x0, + 0x0, 0x2, 0x7c, 0xff, 0xff, 0xf6, 0x4, 0xff, + 0xff, 0xd4, 0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8, 0x0, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xd, 0xb0, 0xf, 0x90, 0x89, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x50, + 0xdb, 0x0, 0xf9, 0xd, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xd, 0xe8, + 0xf, 0x90, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x90, 0xad, 0xf3, 0xf9, + 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf9, 0x0, 0x4f, 0x4f, 0x90, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x90, 0x4, 0xf4, 0xf9, 0xd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, + 0x0, 0x4f, 0x4f, 0x90, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x90, 0x4, + 0xf4, 0xf9, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf9, 0x6, 0x9f, 0x4f, + 0x90, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x90, 0xdf, 0xc0, 0xf9, 0xb, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xd8, 0xd, 0xb0, 0xf, 0x90, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xdb, 0x0, 0xed, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9f, + 0x90, 0x4, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc2, 0x0, + + /* U+F241 "" */ + 0x29, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, + 0xbb, 0xbb, 0xbb, 0xbb, 0xb8, 0x0, 0xc, 0xfd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xf8, 0x0, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xd, 0xb0, 0xf, 0x90, 0x89, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x98, 0x0, 0x0, 0x0, + 0xdb, 0x0, 0xf9, 0xd, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, 0xd, 0xe8, + 0xf, 0x90, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0x0, 0x0, 0x0, 0xad, 0xf3, 0xf9, + 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd0, 0x0, 0x0, 0x0, 0x4f, 0x4f, 0x90, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, + 0x0, 0x0, 0x4, 0xf4, 0xf9, 0xd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x0, 0x0, + 0x0, 0x4f, 0x4f, 0x90, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, 0x0, 0x4, + 0xf4, 0xf9, 0xd, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xd0, 0x0, 0x0, 0x6, 0x9f, 0x4f, + 0x90, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfd, 0x0, 0x0, 0x0, 0xdf, 0xc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293 "" */ + 0x0, 0x0, 0x17, 0xbc, 0xdc, 0xa6, 0x10, 0x0, + 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xfe, 0x50, + 0x0, 0x0, 0x7f, 0xff, 0xfb, 0x7f, 0xff, 0xff, + 0x50, 0x0, 0x3f, 0xff, 0xff, 0xb0, 0x7f, 0xff, + 0xff, 0x10, 0xa, 0xff, 0xff, 0xfb, 0x0, 0x7f, + 0xff, 0xf8, 0x0, 0xff, 0xff, 0xff, 0xb0, 0x10, + 0x7f, 0xff, 0xd0, 0x3f, 0xfe, 0x5d, 0xfb, 0xa, + 0x40, 0x7f, 0xff, 0x16, 0xff, 0xb0, 0x1d, 0xb0, + 0xad, 0x0, 0xdf, 0xf4, 0x8f, 0xff, 0xb0, 0x19, + 0x9, 0x20, 0xaf, 0xff, 0x69, 0xff, 0xff, 0xb0, + 0x0, 0x0, 0xaf, 0xff, 0xf7, 0xaf, 0xff, 0xff, + 0xb0, 0x0, 0xaf, 0xff, 0xff, 0x8a, 0xff, 0xff, + 0xfe, 0x10, 0x1d, 0xff, 0xff, 0xf8, 0xaf, 0xff, + 0xfe, 0x20, 0x0, 0x1d, 0xff, 0xff, 0x79, 0xff, + 0xfe, 0x20, 0x60, 0x60, 0x1d, 0xff, 0xf6, 0x7f, + 0xfe, 0x20, 0xab, 0xa, 0xb0, 0x2e, 0xff, 0x54, + 0xff, 0xc1, 0xaf, 0xb0, 0xa8, 0x3, 0xff, 0xf2, + 0x1f, 0xff, 0xff, 0xfb, 0x4, 0x3, 0xff, 0xfe, + 0x0, 0xcf, 0xff, 0xff, 0xb0, 0x3, 0xff, 0xff, + 0x90, 0x5, 0xff, 0xff, 0xfb, 0x3, 0xff, 0xff, + 0xf3, 0x0, 0xb, 0xff, 0xff, 0xb3, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0xb, 0xff, 0xfd, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0x0, 0x5, 0xcf, 0xff, 0xff, + 0xb4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x21, + 0x0, 0x0, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 87, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 91, .box_h = 17, .box_w = 4, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 34, .adv_w = 113, .box_h = 6, .box_w = 5, .ofs_x = 1, .ofs_y = 11}, + {.bitmap_index = 49, .adv_w = 219, .box_h = 16, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 153, .adv_w = 198, .box_h = 22, .box_w = 11, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 274, .adv_w = 258, .box_h = 17, .box_w = 15, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 402, .adv_w = 219, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 513, .adv_w = 61, .box_h = 6, .box_w = 2, .ofs_x = 1, .ofs_y = 11}, + {.bitmap_index = 519, .adv_w = 120, .box_h = 23, .box_w = 7, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 600, .adv_w = 122, .box_h = 23, .box_w = 7, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 681, .adv_w = 152, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 6}, + {.bitmap_index = 731, .adv_w = 200, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 1}, + {.bitmap_index = 803, .adv_w = 69, .box_h = 7, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 817, .adv_w = 97, .box_h = 3, .box_w = 6, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 826, .adv_w = 93, .box_h = 4, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 832, .adv_w = 145, .box_h = 18, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 913, .adv_w = 198, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1007, .adv_w = 198, .box_h = 16, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1063, .adv_w = 198, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1151, .adv_w = 198, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1236, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1332, .adv_w = 198, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1426, .adv_w = 197, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1520, .adv_w = 198, .box_h = 16, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1616, .adv_w = 198, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1710, .adv_w = 198, .box_h = 16, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1790, .adv_w = 85, .box_h = 13, .box_w = 3, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1810, .adv_w = 74, .box_h = 16, .box_w = 4, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1842, .adv_w = 179, .box_h = 10, .box_w = 10, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1892, .adv_w = 193, .box_h = 7, .box_w = 10, .ofs_x = 1, .ofs_y = 4}, + {.bitmap_index = 1927, .adv_w = 184, .box_h = 10, .box_w = 10, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 1977, .adv_w = 166, .box_h = 17, .box_w = 10, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 2062, .adv_w = 316, .box_h = 21, .box_w = 18, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 2251, .adv_w = 230, .box_h = 16, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2371, .adv_w = 219, .box_h = 16, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2467, .adv_w = 229, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2578, .adv_w = 231, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2682, .adv_w = 200, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2770, .adv_w = 195, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2858, .adv_w = 240, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2969, .adv_w = 251, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3073, .adv_w = 96, .box_h = 16, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3105, .adv_w = 194, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 3199, .adv_w = 221, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3303, .adv_w = 189, .box_h = 16, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3391, .adv_w = 307, .box_h = 16, .box_w = 17, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3527, .adv_w = 251, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3631, .adv_w = 242, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3742, .adv_w = 222, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 3846, .adv_w = 242, .box_h = 19, .box_w = 13, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 3970, .adv_w = 217, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 4074, .adv_w = 209, .box_h = 17, .box_w = 13, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 4185, .adv_w = 210, .box_h = 16, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4289, .adv_w = 228, .box_h = 17, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4391, .adv_w = 224, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4503, .adv_w = 312, .box_h = 16, .box_w = 20, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4663, .adv_w = 221, .box_h = 16, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4775, .adv_w = 211, .box_h = 16, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4879, .adv_w = 211, .box_h = 16, .box_w = 13, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 4983, .adv_w = 93, .box_h = 22, .box_w = 5, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 5038, .adv_w = 144, .box_h = 18, .box_w = 9, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5119, .adv_w = 93, .box_h = 22, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 5174, .adv_w = 147, .box_h = 9, .box_w = 9, .ofs_x = 0, .ofs_y = 7}, + {.bitmap_index = 5215, .adv_w = 159, .box_h = 2, .box_w = 10, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 5225, .adv_w = 109, .box_h = 4, .box_w = 6, .ofs_x = 0, .ofs_y = 13}, + {.bitmap_index = 5237, .adv_w = 191, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5302, .adv_w = 197, .box_h = 18, .box_w = 11, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5401, .adv_w = 184, .box_h = 13, .box_w = 11, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5473, .adv_w = 199, .box_h = 18, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5563, .adv_w = 186, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5628, .adv_w = 122, .box_h = 17, .box_w = 8, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 5696, .adv_w = 197, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 5781, .adv_w = 194, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5866, .adv_w = 85, .box_h = 16, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 5890, .adv_w = 84, .box_h = 21, .box_w = 5, .ofs_x = -1, .ofs_y = -5}, + {.bitmap_index = 5943, .adv_w = 178, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6037, .adv_w = 85, .box_h = 17, .box_w = 3, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6063, .adv_w = 309, .box_h = 12, .box_w = 17, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6165, .adv_w = 194, .box_h = 12, .box_w = 10, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6225, .adv_w = 201, .box_h = 13, .box_w = 12, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6303, .adv_w = 197, .box_h = 17, .box_w = 11, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 6397, .adv_w = 200, .box_h = 17, .box_w = 10, .ofs_x = 1, .ofs_y = -5}, + {.bitmap_index = 6482, .adv_w = 119, .box_h = 12, .box_w = 7, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 6524, .adv_w = 182, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6589, .adv_w = 115, .box_h = 16, .box_w = 7, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 6645, .adv_w = 194, .box_h = 13, .box_w = 10, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6710, .adv_w = 171, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6776, .adv_w = 265, .box_h = 12, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6872, .adv_w = 174, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6938, .adv_w = 167, .box_h = 17, .box_w = 11, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 7032, .adv_w = 174, .box_h = 12, .box_w = 11, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7098, .adv_w = 119, .box_h = 22, .box_w = 8, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7186, .adv_w = 86, .box_h = 19, .box_w = 3, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 7215, .adv_w = 119, .box_h = 22, .box_w = 7, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7292, .adv_w = 239, .box_h = 5, .box_w = 13, .ofs_x = 1, .ofs_y = 4}, + {.bitmap_index = 7325, .adv_w = 302, .box_h = 22, .box_w = 19, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7534, .adv_w = 377, .box_h = 22, .box_w = 24, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 7798, .adv_w = 352, .box_h = 18, .box_w = 22, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7996, .adv_w = 352, .box_h = 15, .box_w = 20, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 8146, .adv_w = 277, .box_h = 16, .box_w = 15, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8266, .adv_w = 302, .box_h = 21, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8466, .adv_w = 302, .box_h = 20, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8656, .adv_w = 277, .box_h = 20, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8836, .adv_w = 327, .box_h = 16, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9004, .adv_w = 327, .box_h = 19, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9204, .adv_w = 302, .box_h = 16, .box_w = 19, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9356, .adv_w = 302, .box_h = 20, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 9546, .adv_w = 151, .box_h = 16, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9626, .adv_w = 226, .box_h = 16, .box_w = 15, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 9746, .adv_w = 327, .box_h = 18, .box_w = 21, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 9935, .adv_w = 377, .box_h = 20, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10175, .adv_w = 302, .box_h = 19, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10356, .adv_w = 201, .box_h = 20, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10486, .adv_w = 277, .box_h = 20, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10666, .adv_w = 302, .box_h = 20, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 10856, .adv_w = 302, .box_h = 20, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 11046, .adv_w = 201, .box_h = 20, .box_w = 13, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 11176, .adv_w = 302, .box_h = 16, .box_w = 19, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11328, .adv_w = 251, .box_h = 21, .box_w = 14, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 11475, .adv_w = 251, .box_h = 21, .box_w = 13, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 11612, .adv_w = 277, .box_h = 18, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 11774, .adv_w = 277, .box_h = 5, .box_w = 18, .ofs_x = 0, .ofs_y = 6}, + {.bitmap_index = 11819, .adv_w = 352, .box_h = 21, .box_w = 22, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 12050, .adv_w = 352, .box_h = 21, .box_w = 22, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 12281, .adv_w = 352, .box_h = 13, .box_w = 20, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 12411, .adv_w = 352, .box_h = 14, .box_w = 20, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 12551, .adv_w = 377, .box_h = 15, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 12731, .adv_w = 327, .box_h = 18, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 12920, .adv_w = 327, .box_h = 21, .box_w = 21, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13141, .adv_w = 277, .box_h = 18, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 13303, .adv_w = 352, .box_h = 18, .box_w = 22, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13501, .adv_w = 352, .box_h = 23, .box_w = 22, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 13754, .adv_w = 302, .box_h = 20, .box_w = 19, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13944, .adv_w = 176, .box_h = 22, .box_w = 11, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 14065, .adv_w = 352, .box_h = 23, .box_w = 22, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 14318, .adv_w = 377, .box_h = 15, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14498, .adv_w = 277, .box_h = 18, .box_w = 18, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 14660, .adv_w = 302, .box_h = 23, .box_w = 19, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 14879, .adv_w = 402, .box_h = 18, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15104, .adv_w = 453, .box_h = 16, .box_w = 29, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15336, .adv_w = 453, .box_h = 16, .box_w = 29, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15568, .adv_w = 453, .box_h = 16, .box_w = 29, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15800, .adv_w = 453, .box_h = 16, .box_w = 29, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 16032, .adv_w = 453, .box_h = 16, .box_w = 29, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 16264, .adv_w = 302, .box_h = 23, .box_w = 17, .ofs_x = 1, .ofs_y = -4} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1[] = { + 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, + 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, + 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, + 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, + 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, + 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, + 0x243, 0x292 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 + }, + { + .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 1, 53, + 3, 3, + 3, 8, + 3, 34, + 3, 66, + 3, 68, + 3, 69, + 3, 70, + 3, 72, + 3, 78, + 3, 79, + 3, 80, + 3, 81, + 3, 82, + 3, 84, + 3, 88, + 8, 3, + 8, 8, + 8, 34, + 8, 66, + 8, 68, + 8, 69, + 8, 70, + 8, 72, + 8, 78, + 8, 79, + 8, 80, + 8, 81, + 8, 82, + 8, 84, + 8, 88, + 9, 55, + 9, 56, + 9, 58, + 13, 3, + 13, 8, + 15, 3, + 15, 8, + 16, 16, + 34, 3, + 34, 8, + 34, 32, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 80, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 90, + 34, 91, + 35, 53, + 35, 55, + 35, 58, + 36, 10, + 36, 53, + 36, 62, + 36, 94, + 37, 13, + 37, 15, + 37, 34, + 37, 53, + 37, 55, + 37, 57, + 37, 58, + 37, 59, + 38, 53, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 80, + 38, 82, + 38, 86, + 38, 87, + 38, 88, + 38, 90, + 39, 13, + 39, 15, + 39, 34, + 39, 43, + 39, 53, + 39, 66, + 39, 68, + 39, 69, + 39, 70, + 39, 72, + 39, 80, + 39, 82, + 39, 83, + 39, 86, + 39, 87, + 39, 90, + 41, 34, + 41, 53, + 41, 57, + 41, 58, + 42, 34, + 42, 53, + 42, 57, + 42, 58, + 43, 34, + 44, 14, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 68, + 44, 69, + 44, 70, + 44, 72, + 44, 78, + 44, 79, + 44, 80, + 44, 81, + 44, 82, + 44, 86, + 44, 87, + 44, 88, + 44, 90, + 45, 3, + 45, 8, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 86, + 45, 87, + 45, 88, + 45, 90, + 46, 34, + 46, 53, + 46, 57, + 46, 58, + 47, 34, + 47, 53, + 47, 57, + 47, 58, + 48, 13, + 48, 15, + 48, 34, + 48, 53, + 48, 55, + 48, 57, + 48, 58, + 48, 59, + 49, 13, + 49, 15, + 49, 34, + 49, 43, + 49, 57, + 49, 59, + 49, 66, + 49, 68, + 49, 69, + 49, 70, + 49, 72, + 49, 80, + 49, 82, + 49, 85, + 49, 87, + 49, 90, + 50, 53, + 50, 55, + 50, 56, + 50, 58, + 51, 53, + 51, 55, + 51, 58, + 53, 1, + 53, 13, + 53, 14, + 53, 15, + 53, 34, + 53, 36, + 53, 40, + 53, 43, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 58, + 53, 66, + 53, 68, + 53, 69, + 53, 70, + 53, 72, + 53, 78, + 53, 79, + 53, 80, + 53, 81, + 53, 82, + 53, 83, + 53, 84, + 53, 86, + 53, 87, + 53, 88, + 53, 89, + 53, 90, + 53, 91, + 54, 34, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 68, + 55, 69, + 55, 70, + 55, 72, + 55, 80, + 55, 82, + 55, 83, + 55, 86, + 55, 87, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 34, + 56, 53, + 56, 62, + 56, 66, + 56, 68, + 56, 69, + 56, 70, + 56, 72, + 56, 80, + 56, 82, + 56, 83, + 56, 86, + 56, 94, + 57, 14, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 55, + 57, 68, + 57, 69, + 57, 70, + 57, 72, + 57, 80, + 57, 82, + 57, 86, + 57, 87, + 57, 90, + 58, 7, + 58, 10, + 58, 11, + 58, 13, + 58, 14, + 58, 15, + 58, 34, + 58, 36, + 58, 40, + 58, 43, + 58, 48, + 58, 50, + 58, 52, + 58, 53, + 58, 54, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 68, + 58, 69, + 58, 70, + 58, 71, + 58, 72, + 58, 78, + 58, 79, + 58, 80, + 58, 81, + 58, 82, + 58, 83, + 58, 84, + 58, 85, + 58, 86, + 58, 87, + 58, 89, + 58, 90, + 58, 91, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 68, + 59, 69, + 59, 70, + 59, 72, + 59, 80, + 59, 82, + 59, 86, + 59, 87, + 59, 88, + 59, 90, + 60, 43, + 60, 54, + 66, 3, + 66, 8, + 66, 87, + 66, 90, + 67, 3, + 67, 8, + 67, 87, + 67, 89, + 67, 90, + 67, 91, + 68, 3, + 68, 8, + 70, 3, + 70, 8, + 70, 87, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 68, + 71, 69, + 71, 70, + 71, 72, + 71, 82, + 71, 94, + 73, 3, + 73, 8, + 76, 68, + 76, 69, + 76, 70, + 76, 72, + 76, 82, + 78, 3, + 78, 8, + 79, 3, + 79, 8, + 80, 3, + 80, 8, + 80, 87, + 80, 89, + 80, 90, + 80, 91, + 81, 3, + 81, 8, + 81, 87, + 81, 89, + 81, 90, + 81, 91, + 83, 3, + 83, 8, + 83, 13, + 83, 15, + 83, 66, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 72, + 83, 80, + 83, 82, + 83, 85, + 83, 87, + 83, 88, + 83, 90, + 85, 80, + 87, 3, + 87, 8, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 71, + 87, 72, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 89, 68, + 89, 69, + 89, 70, + 89, 72, + 89, 80, + 89, 82, + 90, 3, + 90, 8, + 90, 13, + 90, 15, + 90, 66, + 90, 68, + 90, 69, + 90, 70, + 90, 71, + 90, 72, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 72, + 91, 80, + 91, 82, + 92, 43, + 92, 54 +}; + +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = +{ + -7, -18, -18, -21, -9, -10, -10, -10, + -10, -3, -3, -10, -3, -10, -14, 2, + -18, -18, -21, -9, -10, -10, -10, -10, + -3, -3, -10, -3, -10, -14, 2, 3, + 3, 4, -29, -29, -29, -29, -38, -21, + -21, -10, -2, -2, -2, -2, -22, -3, + -15, -12, -16, -2, -3, -2, -9, -6, + -9, 2, -5, -4, -9, -4, -5, -2, + -3, -18, -18, -4, -5, -4, -4, -7, + -4, 3, -3, -3, -3, -3, -3, -3, + -3, -3, -4, -4, -4, -40, -40, -29, + -45, 3, -6, -4, -4, -4, -4, -4, + -4, -4, -4, -4, -4, 3, -5, 3, + -5, 3, -5, 3, -5, -4, -11, -5, + -5, -5, -5, -4, -4, -4, -4, -4, + -4, -5, -4, -4, -4, -7, -11, -7, + -58, -58, 3, -11, -11, -11, -11, -47, + -9, -30, -25, -41, -8, -23, -16, -23, + 3, -5, 3, -5, 3, -5, 3, -5, + -18, -18, -4, -5, -4, -4, -7, -4, + -56, -56, -24, -34, -5, -4, -2, -2, + -2, -2, -2, -2, -2, 2, 3, 3, + -7, -5, -3, -6, -14, -3, -8, -7, + -37, -40, -37, -14, -5, -5, -41, -5, + -5, -3, 3, 3, 3, 3, -19, -17, + -17, -17, -17, -19, -19, -17, -19, -17, + -13, -20, -16, -12, -10, -13, -12, -10, + -4, 3, -39, -6, -39, -13, -2, -2, + -2, -2, 3, -8, -8, -8, -8, -8, + -8, -8, -5, -5, -2, -2, 3, 3, + -21, -10, -21, -7, 2, 2, -6, -5, + -5, -5, -5, -5, -5, -4, -3, 2, + -8, -4, -4, -4, -4, 2, -4, -4, + -4, -4, -4, -4, -4, -5, -5, -5, + 3, -8, -36, -9, -36, -16, -5, -5, + -16, -5, -5, -3, 3, -16, 3, 3, + 2, 3, 3, -13, -11, -11, -11, -4, + -11, -7, -7, -11, -7, -11, -7, -10, + -4, -7, -3, -4, -3, -5, 3, 2, + -4, -4, -4, -4, -4, -4, -4, -4, + -4, -4, -3, -5, -5, -5, -3, -3, + -12, -12, -3, -3, -5, -5, -2, -3, + -2, -3, -2, -2, -2, -2, -2, -2, + 3, 3, 3, 3, -4, -4, -4, -4, + -4, 3, -18, -18, -3, -3, -3, -3, + -3, -18, -18, -18, -18, -23, -23, -3, + -4, -3, -3, -5, -5, -2, -3, -2, + -3, 3, 3, -21, -21, -7, -3, -3, + -3, 3, -3, -3, -3, 9, 3, 3, + 3, -3, 3, 3, -18, -18, -3, -2, + -2, -2, 2, -2, -3, -2, -21, -21, + -3, -3, -3, -3, -3, -3, 3, 3, + -18, -18, -3, -2, -2, -2, 2, -2, + -3, -2, -3, -3, -3, -3, -3, -3, + -3, -3 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = +{ + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 434, + .glyph_ids_size = 0 +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 2, + .bpp = 4, + + .kern_scale = 16, + .kern_dsc = &kern_pairs, + .kern_classes = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_roboto_22 = { + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .line_height = 25, /*The maximum line height required by the font*/ + .base_line = 6, /*Baseline measured from the bottom of the line*/ +}; + +#endif /*#if LV_FONT_ROBOTO_22*/ + diff --git a/src/lv_fonts/lv_font_roboto_28.c b/src/lv_fonts/lv_font_roboto_28.c new file mode 100644 index 000000000000..2cd21f6a7613 --- /dev/null +++ b/src/lv_fonts/lv_font_roboto_28.c @@ -0,0 +1,4294 @@ +#include "lvgl/lvgl.h" + +/******************************************************************************* + * Size: 28 px + * Bpp: 4 + * Opts: --no-compress --no-prefilter --bpp 4 --size 28 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_28.c + ******************************************************************************/ + +#ifndef LV_FONT_ROBOTO_28 +#define LV_FONT_ROBOTO_28 1 +#endif + +#if LV_FONT_ROBOTO_28 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { + /* U+20 " " */ + + /* U+21 "!" */ + 0xae, 0xd0, 0xbf, 0xe0, 0xbf, 0xe0, 0xaf, 0xe0, + 0xaf, 0xe0, 0xaf, 0xd0, 0xaf, 0xd0, 0x9f, 0xd0, + 0x9f, 0xd0, 0x9f, 0xc0, 0x9f, 0xc0, 0x9f, 0xc0, +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4, 0x0, 0x0, 0x60, 0x0, + + /* U+2B "+" */ + 0x0, 0x0, 0x2, 0x77, 0x10, 0x0, 0x0, 0x0, + 0x0, 0x6, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0x20, + 0x0, 0x0, 0xaa, 0xaa, 0xac, 0xff, 0xba, 0xaa, + 0xa7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, + 0xab, 0xbb, 0xbd, 0xff, 0xcb, 0xbb, 0xb8, 0x0, + 0x0, 0x6, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, + 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0x20, 0x0, + 0x0, + + /* U+2C "," */ + 0x4, 0xff, 0x30, 0x4f, 0xf3, 0x4, 0xff, 0x20, + 0x7f, 0xf0, 0xc, 0xf9, 0x5, 0xff, 0x10, 0x1b, + 0x40, 0x0, + + /* U+2D "-" */ + 0x37, 0x77, 0x77, 0x71, 0x8f, 0xff, 0xff, 0xf2, + 0x49, 0x99, 0x99, 0x91, + + /* U+2E "." */ + 0x7, 0xd8, 0x0, 0xff, 0xf1, 0xb, 0xfc, 0x0, + 0x1, 0x0, + + /* U+2F "/" */ + 0x0, 0x0, 0x0, 0x0, 0x9e, 0x80, 0x0, 0x0, + 0x0, 0xe, 0xf2, 0x0, 0x0, 0x0, 0x5, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0xbf, 0x60, 0x0, 0x0, + 0x0, 0x2f, 0xf1, 0x0, 0x0, 0x0, 0x8, 0xfa, +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 0x0, 0xc, 0xff, 0x30, 0x0, 0x0, + 0x0, 0x0, 0x7, 0xff, 0x80, 0x0, 0x0, 0x0, + 0x0, 0x2, 0xff, 0xc0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xdf, 0xf2, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x8f, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, + 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x9, 0xff, 0x50, + 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xa0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xef, 0xe1, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xaf, 0xf4, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6f, 0xf9, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2f, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xc, 0xff, 0x30, 0x0, 0x0, 0x0, 0x0, 0x7, + 0xff, 0xa2, 0x22, 0x22, 0x22, 0x22, 0x21, 0xdf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xad, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, + + /* U+5B "[" */ + 0xcc, 0xcc, 0xc1, 0xff, 0xff, 0xf2, 0xff, 0xb5, + 0x50, 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, + 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, + 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, + 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, + 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, + 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, + 0x0, 0xff, 0x80, 0x0, 0xff, 0x80, 0x0, 0xff, + 0x80, 0x0, 0xff, 0x80, 0x0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, 0xdf, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x9e, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x1, 0x5a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xa5, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xea, 0x50, 0x0, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xfd, 0x94, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xc7, 0x20, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x2, + 0x8c, 0xff, 0xd8, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0x0, 0x5f, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0xef, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, 0xfe, + 0x2, 0x8c, 0xff, 0xd8, 0xff, 0x0, 0x0, 0x5f, + 0xff, 0xff, 0xff, 0xf5, 0x5f, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x2, 0x8c, 0xff, 0xc8, 0x20, + 0xef, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, + 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x5f, 0xff, 0xff, 0xff, 0xf5, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2, 0x8c, 0xff, 0xc8, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F008 "" */ + 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0xbf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xff, 0x30, + 0x3, 0xff, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x3, 0xff, 0x30, 0x3, 0xff, 0xff, 0x0, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x0, 0x0, 0xff, 0xff, 0x30, 0x3, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x30, + 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x30, 0x3, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x30, 0x3, 0xff, 0xff, + 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0x0, 0x0, 0xff, 0xff, 0x0, + 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x0, 0x0, 0xff, 0xff, 0x30, 0x3, + 0xff, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, + 0xff, 0x30, 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x30, 0x3, 0xff, 0x30, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0x30, 0x3, + 0xff, 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0xff, 0xff, + 0x30, 0x3, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0x30, 0x3, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x3, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0x30, 0x3, 0xff, 0xff, 0x0, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0x0, 0xff, 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, + 0xff, 0xff, 0x30, 0x3, 0xff, 0x30, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x3, 0xff, 0x30, 0x3, 0xff, + 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0x1b, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, + + /* U+F00B "" */ + 0x8f, 0xff, 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, + 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x8f, 0xff, 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, + 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x8f, 0xff, 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, + 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, + 0xff, 0xf8, 0x0, 0x8f, 0xff, 0xff, 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F013 "" */ + 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x40, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x7, 0xff, 0xff, 0x70, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6b, 0x20, 0x9, 0xff, 0xff, 0x90, + 0x2, 0xb6, 0x0, 0x0, 0x0, 0x7, 0xff, 0xf5, + 0x5e, 0xff, 0xff, 0xe5, 0x5f, 0xff, 0x60, 0x0, + 0x0, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf5, 0x0, 0x0, 0xbf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0x0, + 0x0, 0x2e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xe1, 0x0, 0x0, 0x5, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, + 0x0, 0x5, 0xff, 0xff, 0xfd, 0x40, 0x4, 0xdf, + 0xff, 0xff, 0x50, 0x0, 0x47, 0xae, 0xff, 0xff, + 0xd1, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xe9, 0x63, + 0xff, 0xff, 0xff, 0xff, 0x40, 0x0, 0x0, 0x4, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x40, 0x0, 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, + 0x36, 0x9d, 0xff, 0xff, 0xd1, 0x0, 0x0, 0x1d, + 0xff, 0xff, 0xea, 0x74, 0x0, 0x5, 0xff, 0xff, + 0xfd, 0x40, 0x4, 0xdf, 0xff, 0xff, 0x50, 0x0, + 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x50, 0x0, 0x0, 0x1e, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0x0, + 0x0, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x0, 0x0, 0x5f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6, 0x0, + 0x0, 0x6, 0xff, 0xf5, 0x5e, 0xff, 0xff, 0xe5, + 0x5f, 0xff, 0x70, 0x0, 0x0, 0x0, 0x5c, 0x20, + 0x9, 0xff, 0xff, 0x90, 0x2, 0xc6, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, 0xff, 0x70, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x4, 0xff, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, + + /* U+F014 "" */ + 0x0, 0x0, 0x0, 0x1b, 0xff, 0xff, 0xff, 0xb1, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xff, + 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1, 0xff, 0x20, 0x0, 0x2, 0xff, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x7, 0xfb, 0x0, 0x0, 0x0, + 0xbf, 0x70, 0x0, 0x0, 0xef, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xef, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, 0xee, 0x0, + 0xee, 0x0, 0xee, 0x0, 0xff, 0x0, 0x0, 0xff, + 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, + 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0xff, + 0x0, 0xee, 0x0, 0xee, 0x0, 0xee, 0x0, 0xff, + 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, + 0xef, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xfe, 0x0, 0x0, 0x9f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0xa, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x0, + + /* U+F015 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6, 0xee, 0x60, 0x0, 0xef, 0xfe, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, + 0xff, 0xf9, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xb, 0xff, 0xee, 0xff, 0xb0, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, + 0xdf, 0xfd, 0x22, 0xdf, 0xfd, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3e, 0xff, 0xb1, 0x99, + 0x1b, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x5, 0xff, 0xf9, 0x1b, 0xff, 0xc1, 0x8f, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0x62, + 0xdf, 0xff, 0xfd, 0x26, 0xff, 0xff, 0x0, 0x0, + 0x0, 0xb, 0xff, 0xe4, 0x4f, 0xff, 0xff, 0xff, + 0xf5, 0x3e, 0xff, 0xb0, 0x0, 0x1, 0xcf, 0xfd, + 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xcf, + 0xfd, 0x20, 0x3e, 0xff, 0xb1, 0xaf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfa, 0x1b, 0xff, 0xe3, 0x5f, + 0xf8, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xc1, 0x8f, 0xf5, 0x7, 0x50, 0xef, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x5, + 0x70, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xf0, 0x0, 0xf, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xf0, 0x0, 0xf, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x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0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, + 0xdf, 0xff, 0xff, 0xff, 0xfd, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, + 0xff, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x1, 0xdf, 0xff, 0xfd, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1d, 0xff, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x8f, 0xff, 0xff, 0xff, 0xf4, 0x1, 0xcc, 0x10, + 0x4f, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x40, 0x0, 0x4, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, + 0x11, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x33, 0xff, 0x33, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x33, 0xff, 0x33, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + + /* U+F01C "" */ + 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf7, 0x0, 0x0, 0x0, 0x2, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x20, 0x0, + 0x0, 0x9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x90, 0x0, 0x0, 0xf, 0xff, 0x40, + 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xf0, 0x0, + 0x0, 0x7f, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xdf, 0xf6, 0x0, 0x0, 0xdf, 0xf6, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f, 0xfd, 0x0, + 0x4, 0xff, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xe, 0xff, 0x40, 0xb, 0xff, 0x80, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff, 0xb0, + 0x2f, 0xff, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xff, 0xf2, 0x9f, 0xfb, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xbf, 0xf9, + 0xef, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x4f, 0xfd, 0xff, 0xff, 0xff, 0xff, + 0x40, 0x0, 0x0, 0x4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0, 0x0, 0xc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0x0, 0x0, 0x4f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + + /* U+F021 "" */ + 0x0, 0x0, 0x0, 0x2, 0x7b, 0xef, 0xfd, 0xb6, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xbf, + 0xff, 0xff, 0xff, 0xff, 0xf9, 0x10, 0x1, 0xcc, + 0x0, 0x0, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xe4, 0x1d, 0xff, 0x0, 0x7, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, + 0x0, 0x5f, 0xff, 0xff, 0xd7, 0x21, 0x2, 0x6d, + 0xff, 0xff, 0xff, 0xff, 0x2, 0xff, 0xff, 0xf7, + 0x0, 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, + 0x9, 0xff, 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, + 0x1d, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, + 0x6f, 0xff, 0xd0, 0x0, 0x0, 0x0, 0x0, 0xc, + 0xff, 0xff, 0xff, 0xff, 0x9f, 0xff, 0x60, 0x0, + 0x0, 0x0, 0x0, 0xc, 0xff, 0xff, 0xff, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xcf, 0xff, 0xff, 0xff, 0xc0, 0x0, 0x0, 0x0, + 0x0, 0x6, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, + 0xc0, 0x0, 0x0, 0x0, 0x0, 0xd, 0xff, 0xf4, + 0xff, 0xff, 0xff, 0xfd, 0x10, 0x0, 0x0, 0x0, + 0x0, 0x7f, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xd1, + 0x0, 0x0, 0x0, 0x0, 0x4, 0xff, 0xff, 0x70, + 0xff, 0xff, 0xff, 0xf7, 0x0, 0x0, 0x0, 0x0, + 0x7f, 0xff, 0xfe, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xd7, 0x20, 0x13, 0x7d, 0xff, 0xff, 0xf3, 0x0, + 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x50, 0x0, 0xff, 0xd1, 0x4f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0x0, 0x0, + 0xcc, 0x10, 0x1, 0x9f, 0xff, 0xff, 0xff, 0xff, + 0xfa, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, + 0x6b, 0xdf, 0xfe, 0xb7, 0x10, 0x0, 0x0, 0x0, + + /* U+F026 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, + 0x0, 0x0, 0x6, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x6f, 0xff, 0x0, 0x0, 0x0, 0x6, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, 0x0, 0x0, + 0x6, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x6, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x6, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x6f, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, + + /* U+F027 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0xcf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x6a, 0x20, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xbf, 0xe2, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x1b, + 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x1, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x1, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x1b, 0xfa, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0xbf, 0xe2, 0xcf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x6a, 0x20, 0x0, 0x0, + 0x6, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6f, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x6, 0xff, 0xff, 0x0, 0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0x0, 0x1, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x8, 0xee, + 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0x0, 0x8f, 0xff, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xef, 0xff, 0xfe, 0x0, + 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0x0, 0xef, 0xff, 0xfe, 0x0, 0x0, + 0x0, 0x0, 0x8f, 0x80, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x8f, 0xff, 0xf8, 0x0, 0x0, 0x0, + 0x8, 0xff, 0xf8, 0x0, 0x0, 0x0, 0xff, 0xff, + 0x0, 0x8, 0xee, 0x80, 0x0, 0x0, 0x0, 0x8f, + 0xff, 0xff, 0x80, 0x0, 0x0, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff, 0xff, + 0xff, 0x80, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x88, 0x0, 0x8, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf8, 0x0, 0xff, 0xff, 0x0, 0x0, 0x8, 0xff, + 0x80, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0xff, 0xff, 0x0, 0x0, 0x8f, 0xff, 0xfc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xff, 0xff, 0x0, 0x8, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0xff, 0x0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0x10, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfb, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, + + /* U+F040 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x19, 0x91, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xdf, 0xfe, 0x20, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1d, + 0xff, 0xff, 0xe2, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xbf, 0xff, 0xff, 0xfe, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x22, 0x2d, + 0xff, 0xff, 0xff, 0xe1, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x2, 0xdd, 0x22, 0xdf, 0xff, 0xff, 0xf8, + 0x0, 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, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xe2, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F048 "" */ + 0xcf, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1d, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x1, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1d, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x1d, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x1, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1d, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, + 0xcf, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2d, + + /* U+F04B "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xfa, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xf9, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xe7, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xe5, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xc3, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x91, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x70, + 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x50, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x30, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x20, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfb, 0x20, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x30, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0x50, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0x70, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x91, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xc3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xe5, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xe7, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xf9, 0x10, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xfa, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F04C "" */ + 0xcf, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0, 0xcf, + 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, + 0xfc, 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xfc, + + /* U+F04D "" */ + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + + /* U+F051 "" */ + 0xd2, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xfc, + 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xe2, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xe2, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xe2, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe2, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe2, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xe2, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xe2, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0xe2, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xd2, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xfc, + + /* U+F052 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xdd, 0x20, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xfe, + 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xdf, 0xff, 0xfe, 0x20, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xfe, 0x20, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x20, 0x0, 0x0, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, 0x0, + 0x0, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x20, 0x0, 0x1, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0x20, 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfe, 0x20, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, + + /* U+F053 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xf8, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x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 0x0, 0x6, 0x60, 0x0, + + /* U+F054 "" */ + 0x0, 0x6, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, + 0x0, 0x6, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0, + 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0x80, 0x0, + 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, 0x80, + 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, 0xff, + 0x80, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xff, + 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, + 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, 0x7f, + 0xff, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, 0x0, + 0x7f, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, + 0x0, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x0, 0x0, + 0x0, 0x0, 0x8f, 0xff, 0xff, 0xff, 0x60, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf6, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xff, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x6, 0xff, 0xff, 0xff, 0xf8, 0x0, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, 0xf8, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xf7, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F067 "" */ + 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xf8, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x8f, 0xff, 0xf8, 0x0, 0x0, + 0x0, 0x0, + + /* U+F068 "" */ + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, + + /* U+F071 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4d, 0xd4, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xef, 0xfe, 0x10, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8, 0xff, 0xff, 0x80, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, +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, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xb0, 0x0, 0x0, 0x4f, 0xff, 0xff, + 0xff, 0xff, 0x10, 0x1, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, + 0x5, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x50, 0xe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x10, 0x1, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xe0, 0x7f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf7, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, + 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x4d, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xd4, + + /* U+F074 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x50, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xfb, 0x0, + 0xef, 0xff, 0xfd, 0x82, 0x0, 0x0, 0x0, 0x28, + 0xce, 0xff, 0xff, 0xff, 0xff, 0xb0, 0xff, 0xff, + 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+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, 0x0, 0x0, + 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0x99, 0xff, + 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, 0x6, 0xff, + 0xff, 0xff, 0xf9, 0x0, 0x9f, 0xff, 0xff, 0xff, + 0x60, 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0x90, + 0x0, 0x9, 0xff, 0xff, 0xff, 0xf6, 0x0, 0x6, + 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x9f, + 0xff, 0xff, 0xff, 0x60, 0x5f, 0xff, 0xff, 0xff, + 0x90, 0x0, 0x0, 0x0, 0x9, 0xff, 0xff, 0xff, + 0xf5, 0x7f, 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x9f, 0xff, 0xff, 0xf6, 0x9, 0xff, + 0xff, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9, + 0xff, 0xff, 0x90, 0x0, 0x9f, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xf9, 0x0, + 0x0, 0x7, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x7, 0x70, 0x0, + + /* U+F078 "" */ + 0x0, 0x7, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x7, 0x70, 0x0, 0x0, 0x9f, 0xf9, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, + 0xf9, 0x0, 0x9, 0xff, 0xff, 0x90, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x9, 0xff, 0xff, 0x90, 0x7f, + 0xff, 0xff, 0xf9, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x9f, 0xff, 0xff, 0xf6, 0x5f, 0xff, 0xff, 0xff, + 0x90, 0x0, 0x0, 0x0, 0x9, 0xff, 0xff, 0xff, + 0xf5, 0x6, 0xff, 0xff, 0xff, 0xf9, 0x0, 0x0, + 0x0, 0x9f, 0xff, 0xff, 0xff, 0x60, 0x0, 0x6f, + 0xff, 0xff, 0xff, 0x90, 0x0, 0x9, 0xff, 0xff, + 0xff, 0xf6, 0x0, 0x0, 0x6, 0xff, 0xff, 0xff, + 0xf9, 0x0, 0x9f, 0xff, 0xff, 0xff, 0x60, 0x0, + 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0x99, 0xff, + 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, 0x0, 0x6, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x60, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x6, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6f, 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xff, 0xff, + 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0xf6, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, + + /* U+F079 "" */ + 0x0, 0x0, 0xc, 0xc0, 0x0, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0xbf, 0xfb, 0x0, 0x5f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x8, + 0xff, 0xff, 0x80, 0x7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x6f, 0xff, + 0xff, 0xf6, 0x0, 0xaf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff, + 0xff, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0x2e, 0xff, 0xff, 0xff, 0xff, + 0xe2, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, + 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, + 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, + 0xff, 0xff, 0xff, 0xfc, 0x0, 0x0, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x2e, 0xff, 0xff, + 0xff, 0xff, 0xe2, 0x0, 0x0, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xff, 0xff, + 0xff, 0x40, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfa, 0x0, 0x6f, 0xff, 0xff, 0xf6, + 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x70, 0x8, 0xff, 0xff, 0x80, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf5, 0x0, 0xbf, 0xfb, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0x0, 0xc, 0xc0, 0x0, 0x0, + + /* U+F07B "" */ + 0x4, 0xcf, 0xff, 0xff, 0xfc, 0x40, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x4f, 0xff, 0xff, + 0xff, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf4, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfc, 0x4f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf4, 0x4, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfc, 0x40, + + /* U+F093 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xcc, 0x10, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x1d, 0xff, 0xd1, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xdf, + 0xff, 0xfd, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, 0xd1, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, + 0xdf, 0xff, 0xff, 0xff, 0xfd, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x1d, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xd1, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x1, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, + 0x10, 0x0, 0x0, 0x0, 0x0, 0xc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0, 0x0, + 0x0, 0x0, 0xb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xb0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xff, 0xfc, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xff, 0xff, + 0xff, 0x70, 0x0, 0x0, 0x0, 0x7, 0xff, 0xff, + 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x10, + 0x0, 0x1, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x33, 0xff, 0x33, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x33, + 0xff, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf8, + + /* U+F095 "" */ + 0x0, 0x7d, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x9, 0xff, 0xfe, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, + 0xff, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xaf, 0xff, 0xff, 0xf1, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xef, 0xff, 0xff, 0xfa, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xdf, 0xff, 0xff, 0xe2, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x9f, 0xff, 0xfd, + 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x4f, 0xff, 0xf4, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xd, 0xff, 0xf9, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xff, + 0xff, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xef, 0xff, 0xd0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x5f, 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, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + + /* U+F0C7 "" */ + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe9, 0x10, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xd2, 0x0, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0x10, 0x1, 0xff, + 0x2c, 0xfd, 0x20, 0x0, 0xff, 0x0, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0x0, 0xcf, 0xe2, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0x0, 0xc, 0xfe, 0x20, 0xff, 0x0, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0x0, 0x0, 0xcf, 0xd1, + 0xff, 0x0, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0x0, 0x0, 0xc, 0xf9, 0xff, 0x0, 0xff, 0xff, + 0xff, 0x10, 0x1, 0xff, 0x0, 0x0, 0x2, 0xfe, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x8f, 0xff, + 0xff, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, + 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, + 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + + /* U+F0E7 "" */ + 0x0, 0xc, 0xff, 0xff, 0xf8, 0x0, 0x0, 0x0, + 0x1f, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, 0x5f, + 0xff, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x9f, 0xff, + 0xff, 0xa0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0xff, + 0x40, 0x0, 0x0, 0x1, 0xff, 0xff, 0xfe, 0x0, + 0x0, 0x0, 0x4, 0xff, 0xff, 0xf8, 0x0, 0x0, + 0x34, 0x8, 0xff, 0xff, 0xf3, 0x37, 0xbf, 0xfe, + 0xc,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0, 0x0, 0xdf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x60, 0x0, 0x0, 0x0, 0x0, 0xc, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0, 0x0, + 0x0, 0x0, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xf, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, + 0x0, 0x0, 0x0, 0x0, 0xf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0, 0x0, 0x0, + 0x0, 0x2f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf1, 0x0, 0x0, 0x0, 0x0, 0x3f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0, + 0x0, 0x0, 0x0, 0x6f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xf6, 0x0, 0x0, 0x0, 0x0, + 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xf9, 0x0, 0x0, 0x0, 0x0, 0xdf, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, + 0x0, 0x3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x30, 0x0, 0x0, 0xa, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xa0, 0x0, 0x0, 0x2f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf2, 0x0, 0x0, + 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfc, 0x0, 0x8, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xef, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0x4e, 0xff, 0xff, 0xff, 0xff, + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, + 0x0, 0x0, 0x0, 0x0, 0xf, 0x7f, 0xff, 0xff, + 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xb, 0xb9, 0xff, 0xff, 0xa0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xeb, + 0x7e, 0xfe, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x2b, 0xff, 0xb2, 0x0, + 0x0, 0x0, 0x0, 0x0, + + /* U+F11C "" */ + 0x4e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, 0xef, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, + 0x0, 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0x0, 0xff, 0x0, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, + 0x0, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x4e, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xe4, + + /* U+F124 "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x5, 0xdc, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x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0, 0xff, 0xd0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xbc, 0x0, 0x0, 0x0, + 0x0, 0x0, + + /* U+F15B "" */ + 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x10, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xd2, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xfe, 0x20, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xe2, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xff, 0xfe, 0x20, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xe2, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xfe, 0x20, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xd1, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x70, 0x0, 0x0, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, + + /* U+F1EB "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x48, 0xbd, 0xef, + 0xfe, 0xdb, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x4, 0xaf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfa, 0x40, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x5, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0x50, 0x0, 0x0, + 0x0, 0x2, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x20, 0x0, + 0x0, 0x6f, 0xff, 0xff, 0xff, 0xd9, 0x52, 0x10, + 0x1, 0x25, 0x9d, 0xff, 0xff, 0xff, 0xf6, 0x0, + 0x8, 0xff, 0xff, 0xff, 0xb3, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x3b, 0xff, 0xff, 0xff, 0x80, + 0x3f, 0xff, 0xff, 0xc3, 0x0, 0x4, 0x9c, 0xdf, + 0xfd, 0xc9, 0x40, 0x0, 0x3c, 0xff, 0xff, 0xf3, + 0x8, 0xff, 0xf8, 0x0, 0x29, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x92, 0x0, 0x8f, 0xff, 0x80, + 0x0, 0x8e, 0x40, 0x9, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x90, 0x4, 0xe8, 0x0, + 0x0, 0x0, 0x2, 0xdf, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfd, 0x20, 0x0, 0x0, + 0x0, 0x0, 0xe, 0xff, 0xff, 0xff, 0xa5, 0x10, + 0x2, 0x49, 0xef, 0xff, 0xff, 0xe0, 0x0, 0x0, + 0x0, 0x0, 0x8, 0xff, 0xfe, 0x70, 0x0, 0x0, + 0x0, 0x0, 0x7, 0xff, 0xff, 0x80, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x8f, 0xa1, 0x0, 0x5a, 0xdf, + 0xfd, 0xa5, 0x0, 0x1b, 0xf8, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x2, 0x0, 0x5e, 0xff, 0xff, + 0xff, 0xff, 0xe5,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x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0xff, 0xe4, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xfe, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0xff, 0xfe, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0xff, 0xe4, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0xff, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xff, 0x0, 0xbf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x1b, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0x0, + + /* U+F241 "" */ + 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xb1, 0x0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x0, 0xff, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xff, 0x0, 0xbf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x1b, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0x0, + + /* U+F242 "" */ + 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xb1, 0x0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x0, 0xff, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xff, 0x0, 0xbf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x1b, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0x0, + + /* U+F243 "" */ + 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xb1, 0x0, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0x0, 0xff, 0x10, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x1, 0xff, 0x0, 0xff, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0xff, 0xff, 0x0, 0xff, 0xff, 0xff, 0xff, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0xff, 0xfe, 0xff, 0x0, 0xff, 0xff, + 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0xff, 0xe4, 0xff, 0x0, + 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, + 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0xff, 0x0, 0xff, 0x10, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xff, 0x0, 0xbf, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xfb, 0x0, 0x1b, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb1, 0x0, + + /* U+F244 "" */ + 0x1b, 0xff,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0xff, 0xff, 0x16, 0xff, + 0xff, 0xff, 0xd0, 0x0, 0x0, 0x8f, 0xff, 0xff, + 0xff, 0x10, 0x6f, 0xff, 0xff, 0xf8, 0x0, 0x0, + 0xff, 0xff, 0xff, 0xff, 0x10, 0x6, 0xff, 0xff, + 0xff, 0x0, 0x5, 0xff, 0xff, 0xff, 0xff, 0x10, + 0x0, 0x6f, 0xff, 0xff, 0x50, 0x9, 0xff, 0xfe, + 0xdf, 0xff, 0x10, 0x90, 0x6, 0xff, 0xff, 0x90, + 0xd, 0xff, 0xe3, 0x1d, 0xff, 0x10, 0xdb, 0x0, + 0x6f, 0xff, 0xd0, 0xf, 0xff, 0xf3, 0x1, 0xdf, + 0x10, 0xdf, 0x20, 0x1e, 0xff, 0xf0, 0x2f, 0xff, + 0xff, 0x30, 0x1d, 0x10, 0xd3, 0x1, 0xdf, 0xff, + 0xf2, 0x3f, 0xff, 0xff, 0xf3, 0x1, 0x0, 0x20, + 0x1d, 0xff, 0xff, 0xf3, 0x4f, 0xff, 0xff, 0xff, + 0x30, 0x0, 0x1, 0xdf, 0xff, 0xff, 0xf4, 0x4f, + 0xff, 0xff, 0xff, 0xf3, 0x0, 0x1d, 0xff, 0xff, + 0xff, 0xf4, 0x4f, 0xff, 0xff, 0xff, 0xf3, 0x0, + 0x1d, 0xff, 0xff, 0xff, 0xf4, 0x4f, 0xff, 0xff, + 0xff, 0x30, 0x0, 0x1, 0xdf, 0xff, 0xff, 0xf4, + 0x3f, 0xff, 0xff, 0xf3, 0x1, 0x0, 0x20, 0x1d, + 0xff, 0xff, 0xf3, 0x2f, 0xff, 0xff, 0x30, 0x1d, + 0x10, 0xd3, 0x1, 0xdf, 0xff, 0xf2, 0xf, 0xff, + 0xf3, 0x1, 0xdf, 0x10, 0xdf, 0x20, 0x1e, 0xff, + 0xf0, 0xd, 0xff, 0xe3, 0x1d, 0xff, 0x10, 0xdb, + 0x0, 0x6f, 0xff, 0xd0, 0x9, 0xff, 0xfe, 0xdf, + 0xff, 0x10, 0x90, 0x6, 0xff, 0xff, 0x90, 0x5, + 0xff, 0xff, 0xff, 0xff, 0x10, 0x0, 0x6f, 0xff, + 0xff, 0x50, 0x0, 0xff, 0xff, 0xff, 0xff, 0x10, + 0x6, 0xff, 0xff, 0xff, 0x0, 0x0, 0x8f, 0xff, + 0xff, 0xff, 0x10, 0x6f, 0xff, 0xff, 0xf8, 0x0, + 0x0, 0xd, 0xff, 0xff, 0xff, 0x16, 0xff, 0xff, + 0xff, 0xd0, 0x0, 0x0, 0x2, 0xef, 0xff, 0xff, + 0x7f, 0xff, 0xff, 0xfe, 0x20, 0x0, 0x0, 0x0, + 0x2b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb2, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x39, 0xce, 0xff, 0xec, + 0x93, 0x0, 0x0, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 111, .box_h = 0, .box_w = 0, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 0, .adv_w = 115, .box_h = 21, .box_w = 4, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 42, .adv_w = 143, .box_h = 7, .box_w = 7, .ofs_x = 1, .ofs_y = 14}, + {.bitmap_index = 67, .adv_w = 279, .box_h = 20, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 237, .adv_w = 252, .box_h = 27, .box_w = 14, .ofs_x = 1, .ofs_y = -3}, + {.bitmap_index = 426, .adv_w = 328, .box_h = 22, .box_w = 19, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 635, .adv_w = 278, .box_h = 22, .box_w = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 822, .adv_w = 78, .box_h = 7, .box_w = 3, .ofs_x = 1, .ofs_y = 14}, + {.bitmap_index = 833, .adv_w = 153, .box_h = 30, .box_w = 8, .ofs_x = 1, .ofs_y = -7}, + {.bitmap_index = 953, .adv_w = 156, .box_h = 30, .box_w = 8, .ofs_x = 0, .ofs_y = -7}, + {.bitmap_index = 1073, .adv_w = 193, .box_h = 12, .box_w = 12, .ofs_x = 0, .ofs_y = 8}, + {.bitmap_index = 1145, .adv_w = 254, .box_h = 15, .box_w = 14, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 1250, .adv_w = 88, .box_h = 7, .box_w = 5, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 1268, .adv_w = 124, .box_h = 3, .box_w = 8, .ofs_x = 0, .ofs_y = 7}, + {.bitmap_index = 1280, .adv_w = 118, .box_h = 4, .box_w = 5, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1290, .adv_w = 185, .box_h = 22, .box_w = 11, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 1411, .adv_w = 252, .box_h = 22, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1565, .adv_w = 252, .box_h = 20, .box_w = 8, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 1645, .adv_w = 252, .box_h = 21, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 1792, .adv_w = 252, .box_h = 22, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 1935, .adv_w = 252, .box_h = 20, .box_w = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 2095, .adv_w = 252, .box_h = 21, .box_w = 13, .ofs_x = 2, .ofs_y = -1}, + {.bitmap_index = 2232, .adv_w = 251, .box_h = 21, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2379, .adv_w = 252, .box_h = 20, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2519, .adv_w = 252, .box_h = 22, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2673, .adv_w = 252, .box_h = 21, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 2810, .adv_w = 109, .box_h = 16, .box_w = 5, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 2850, .adv_w = 95, .box_h = 19, .box_w = 6, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 2907, .adv_w = 228, .box_h = 13, .box_w = 13, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 2992, .adv_w = 246, .box_h = 9, .box_w = 12, .ofs_x = 2, .ofs_y = 5}, + {.bitmap_index = 3046, .adv_w = 234, .box_h = 13, .box_w = 13, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 3131, .adv_w = 212, .box_h = 22, .box_w = 12, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 3263, .adv_w = 402, .box_h = 27, .box_w = 23, .ofs_x = 1, .ofs_y = -7}, + {.bitmap_index = 3574, .adv_w = 292, .box_h = 20, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 3754, .adv_w = 279, .box_h = 20, .box_w = 14, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 3894, .adv_w = 292, .box_h = 22, .box_w = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4070, .adv_w = 294, .box_h = 20, .box_w = 15, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 4220, .adv_w = 255, .box_h = 20, .box_w = 13, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 4350, .adv_w = 248, .box_h = 20, .box_w = 13, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 4480, .adv_w = 305, .box_h = 22, .box_w = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 4667, .adv_w = 319, .box_h = 20, .box_w = 16, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 4827, .adv_w = 122, .box_h = 20, .box_w = 4, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 4867, .adv_w = 247, .box_h = 21, .box_w = 14, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 5014, .adv_w = 281, .box_h = 20, .box_w = 16, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 5174, .adv_w = 241, .box_h = 20, .box_w = 13, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 5304, .adv_w = 391, .box_h = 20, .box_w = 21, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 5514, .adv_w = 319, .box_h = 20, .box_w = 16, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 5674, .adv_w = 308, .box_h = 22, .box_w = 17, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 5861, .adv_w = 283, .box_h = 20, .box_w = 15, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 6011, .adv_w = 308, .box_h = 25, .box_w = 17, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 6224, .adv_w = 276, .box_h = 20, .box_w = 15, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 6374, .adv_w = 266, .box_h = 22, .box_w = 15, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6539, .adv_w = 267, .box_h = 20, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 6709, .adv_w = 291, .box_h = 21, .box_w = 16, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 6877, .adv_w = 285, .box_h = 20, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7057, .adv_w = 397, .box_h = 20, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7307, .adv_w = 281, .box_h = 20, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7477, .adv_w = 269, .box_h = 20, .box_w = 17, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 7647, .adv_w = 268, .box_h = 20, .box_w = 15, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 7797, .adv_w = 119, .box_h = 28, .box_w = 6, .ofs_x = 2, .ofs_y = -5}, + {.bitmap_index = 7881, .adv_w = 184, .box_h = 22, .box_w = 12, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 8013, .adv_w = 119, .box_h = 28, .box_w = 6, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 8097, .adv_w = 187, .box_h = 10, .box_w = 11, .ofs_x = 0, .ofs_y = 10}, + {.bitmap_index = 8152, .adv_w = 202, .box_h = 3, .box_w = 13, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 8172, .adv_w = 138, .box_h = 5, .box_w = 7, .ofs_x = 0, .ofs_y = 16}, + {.bitmap_index = 8190, .adv_w = 244, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8301, .adv_w = 251, .box_h = 22, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8455, .adv_w = 235, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8566, .adv_w = 253, .box_h = 22, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8709, .adv_w = 237, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 8820, .adv_w = 156, .box_h = 22, .box_w = 10, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 8930, .adv_w = 251, .box_h = 22, .box_w = 13, .ofs_x = 1, .ofs_y = -6}, + {.bitmap_index = 9073, .adv_w = 247, .box_h = 21, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9210, .adv_w = 109, .box_h = 21, .box_w = 4, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9252, .adv_w = 107, .box_h = 27, .box_w = 6, .ofs_x = -1, .ofs_y = -6}, + {.bitmap_index = 9333, .adv_w = 227, .box_h = 21, .box_w = 14, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9480, .adv_w = 109, .box_h = 21, .box_w = 3, .ofs_x = 2, .ofs_y = 0}, + {.bitmap_index = 9512, .adv_w = 393, .box_h = 16, .box_w = 22, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9688, .adv_w = 247, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 9792, .adv_w = 256, .box_h = 17, .box_w = 14, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 9911, .adv_w = 251, .box_h = 22, .box_w = 14, .ofs_x = 1, .ofs_y = -6}, + {.bitmap_index = 10065, .adv_w = 255, .box_h = 22, .box_w = 13, .ofs_x = 1, .ofs_y = -6}, + {.bitmap_index = 10208, .adv_w = 152, .box_h = 16, .box_w = 9, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 10280, .adv_w = 231, .box_h = 17, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 10391, .adv_w = 146, .box_h = 20, .box_w = 9, .ofs_x = 0, .ofs_y = -1}, + {.bitmap_index = 10481, .adv_w = 247, .box_h = 16, .box_w = 13, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 10585, .adv_w = 217, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10690, .adv_w = 337, .box_h = 15, .box_w = 21, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10848, .adv_w = 222, .box_h = 15, .box_w = 14, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 10953, .adv_w = 212, .box_h = 21, .box_w = 13, .ofs_x = 0, .ofs_y = -6}, + {.bitmap_index = 11090, .adv_w = 222, .box_h = 15, .box_w = 12, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 11180, .adv_w = 152, .box_h = 27, .box_w = 10, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 11315, .adv_w = 109, .box_h = 24, .box_w = 3, .ofs_x = 2, .ofs_y = -4}, + {.bitmap_index = 11351, .adv_w = 152, .box_h = 27, .box_w = 9, .ofs_x = 0, .ofs_y = -5}, + {.bitmap_index = 11473, .adv_w = 305, .box_h = 6, .box_w = 17, .ofs_x = 1, .ofs_y = 5}, + {.bitmap_index = 11524, .adv_w = 384, .box_h = 26, .box_w = 24, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 11836, .adv_w = 480, .box_h = 26, .box_w = 30, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 12226, .adv_w = 448, .box_h = 22, .box_w = 28, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 12534, .adv_w = 448, .box_h = 19, .box_w = 26, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 12781, .adv_w = 352, .box_h = 20, .box_w = 20, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 12981, .adv_w = 384, .box_h = 26, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13293, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13581, .adv_w = 352, .box_h = 24, .box_w = 22, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 13845, .adv_w = 416, .box_h = 21, .box_w = 26, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14118, .adv_w = 416, .box_h = 24, .box_w = 26, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14430, .adv_w = 384, .box_h = 20, .box_w = 24, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 14670, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 14958, .adv_w = 192, .box_h = 20, .box_w = 12, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15078, .adv_w = 288, .box_h = 20, .box_w = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 15258, .adv_w = 416, .box_h = 24, .box_w = 26, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 15570, .adv_w = 480, .box_h = 24, .box_w = 30, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 15930, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 16218, .adv_w = 256, .box_h = 24, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 16410, .adv_w = 352, .box_h = 26, .box_w = 22, .ofs_x = 0, .ofs_y = -3}, + {.bitmap_index = 16696, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 16984, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 17272, .adv_w = 256, .box_h = 24, .box_w = 16, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 17464, .adv_w = 385, .box_h = 21, .box_w = 25, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 17727, .adv_w = 320, .box_h = 26, .box_w = 17, .ofs_x = 2, .ofs_y = -2}, + {.bitmap_index = 17948, .adv_w = 320, .box_h = 26, .box_w = 17, .ofs_x = 1, .ofs_y = -2}, + {.bitmap_index = 18169, .adv_w = 352, .box_h = 22, .box_w = 22, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 18411, .adv_w = 352, .box_h = 6, .box_w = 22, .ofs_x = 0, .ofs_y = 8}, + {.bitmap_index = 18477, .adv_w = 448, .box_h = 26, .box_w = 28, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 18841, .adv_w = 448, .box_h = 26, .box_w = 28, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 19205, .adv_w = 448, .box_h = 17, .box_w = 26, .ofs_x = 1, .ofs_y = 0}, + {.bitmap_index = 19426, .adv_w = 448, .box_h = 17, .box_w = 26, .ofs_x = 1, .ofs_y = -1}, + {.bitmap_index = 19647, .adv_w = 480, .box_h = 18, .box_w = 30, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 19917, .adv_w = 416, .box_h = 22, .box_w = 26, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 20203, .adv_w = 416, .box_h = 25, .box_w = 26, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 20528, .adv_w = 352, .box_h = 22, .box_w = 22, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 20770, .adv_w = 448, .box_h = 22, .box_w = 28, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 21078, .adv_w = 448, .box_h = 28, .box_w = 28, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 21470, .adv_w = 384, .box_h = 24, .box_w = 24, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 21758, .adv_w = 224, .box_h = 26, .box_w = 14, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 21940, .adv_w = 448, .box_h = 28, .box_w = 26, .ofs_x = 1, .ofs_y = -4}, + {.bitmap_index = 22304, .adv_w = 480, .box_h = 18, .box_w = 30, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 22574, .adv_w = 352, .box_h = 22, .box_w = 22, .ofs_x = 0, .ofs_y = -2}, + {.bitmap_index = 22816, .adv_w = 384, .box_h = 28, .box_w = 24, .ofs_x = 0, .ofs_y = -4}, + {.bitmap_index = 23152, .adv_w = 512, .box_h = 22, .box_w = 32, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 23504, .adv_w = 576, .box_h = 20, .box_w = 36, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 23864, .adv_w = 576, .box_h = 20, .box_w = 36, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 24224, .adv_w = 576, .box_h = 20, .box_w = 36, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 24584, .adv_w = 576, .box_h = 20, .box_w = 36, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 24944, .adv_w = 576, .box_h = 20, .box_w = 36, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 25304, .adv_w = 384, .box_h = 28, .box_w = 22, .ofs_x = 1, .ofs_y = -4} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static uint16_t unicode_list_1[] = { + 0x0, 0x7, 0xa, 0xb, 0xc, 0x10, 0x12, 0x13, + 0x14, 0x18, 0x1b, 0x20, 0x25, 0x26, 0x27, 0x3d, + 0x3f, 0x47, 0x4a, 0x4b, 0x4c, 0x50, 0x51, 0x52, + 0x53, 0x66, 0x67, 0x70, 0x73, 0x76, 0x77, 0x78, + 0x7a, 0x92, 0x94, 0xc3, 0xc4, 0xc6, 0xe6, 0xf2, + 0x11b, 0x123, 0x15a, 0x1ea, 0x23f, 0x240, 0x241, 0x242, + 0x243, 0x292 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 32, .range_length = 95, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY, + .glyph_id_start = 1, .unicode_list = NULL, .glyph_id_ofs_list = NULL, .list_length = 0 + }, + { + .range_start = 61441, .range_length = 659, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY, + .glyph_id_start = 96, .unicode_list = unicode_list_1, .glyph_id_ofs_list = NULL, .list_length = 50 + } +}; + +/*----------------- + * KERNING + *----------------*/ + + +/*Pair left and right glyphs for kerning*/ +static const uint8_t kern_pair_glyph_ids[] = +{ + 1, 53, + 3, 3, + 3, 8, + 3, 34, + 3, 66, + 3, 68, + 3, 69, + 3, 70, + 3, 72, + 3, 78, + 3, 79, + 3, 80, + 3, 81, + 3, 82, + 3, 84, + 3, 88, + 8, 3, + 8, 8, + 8, 34, + 8, 66, + 8, 68, + 8, 69, + 8, 70, + 8, 72, + 8, 78, + 8, 79, + 8, 80, + 8, 81, + 8, 82, + 8, 84, + 8, 88, + 9, 55, + 9, 56, + 9, 58, + 13, 3, + 13, 8, + 15, 3, + 15, 8, + 16, 16, + 34, 3, + 34, 8, + 34, 32, + 34, 36, + 34, 40, + 34, 48, + 34, 50, + 34, 53, + 34, 54, + 34, 55, + 34, 56, + 34, 58, + 34, 80, + 34, 85, + 34, 86, + 34, 87, + 34, 88, + 34, 90, + 34, 91, + 35, 53, + 35, 55, + 35, 58, + 36, 10, + 36, 53, + 36, 62, + 36, 94, + 37, 13, + 37, 15, + 37, 34, + 37, 53, + 37, 55, + 37, 57, + 37, 58, + 37, 59, + 38, 53, + 38, 68, + 38, 69, + 38, 70, + 38, 71, + 38, 72, + 38, 80, + 38, 82, + 38, 86, + 38, 87, + 38, 88, + 38, 90, + 39, 13, + 39, 15, + 39, 34, + 39, 43, + 39, 53, + 39, 66, + 39, 68, + 39, 69, + 39, 70, + 39, 72, + 39, 80, + 39, 82, + 39, 83, + 39, 86, + 39, 87, + 39, 90, + 41, 34, + 41, 53, + 41, 57, + 41, 58, + 42, 34, + 42, 53, + 42, 57, + 42, 58, + 43, 34, + 44, 14, + 44, 36, + 44, 40, + 44, 48, + 44, 50, + 44, 68, + 44, 69, + 44, 70, + 44, 72, + 44, 78, + 44, 79, + 44, 80, + 44, 81, + 44, 82, + 44, 86, + 44, 87, + 44, 88, + 44, 90, + 45, 3, + 45, 8, + 45, 34, + 45, 36, + 45, 40, + 45, 48, + 45, 50, + 45, 53, + 45, 54, + 45, 55, + 45, 56, + 45, 58, + 45, 86, + 45, 87, + 45, 88, + 45, 90, + 46, 34, + 46, 53, + 46, 57, + 46, 58, + 47, 34, + 47, 53, + 47, 57, + 47, 58, + 48, 13, + 48, 15, + 48, 34, + 48, 53, + 48, 55, + 48, 57, + 48, 58, + 48, 59, + 49, 13, + 49, 15, + 49, 34, + 49, 43, + 49, 57, + 49, 59, + 49, 66, + 49, 68, + 49, 69, + 49, 70, + 49, 72, + 49, 80, + 49, 82, + 49, 85, + 49, 87, + 49, 90, + 50, 53, + 50, 55, + 50, 56, + 50, 58, + 51, 53, + 51, 55, + 51, 58, + 53, 1, + 53, 13, + 53, 14, + 53, 15, + 53, 34, + 53, 36, + 53, 40, + 53, 43, + 53, 48, + 53, 50, + 53, 52, + 53, 53, + 53, 55, + 53, 56, + 53, 58, + 53, 66, + 53, 68, + 53, 69, + 53, 70, + 53, 72, + 53, 78, + 53, 79, + 53, 80, + 53, 81, + 53, 82, + 53, 83, + 53, 84, + 53, 86, + 53, 87, + 53, 88, + 53, 89, + 53, 90, + 53, 91, + 54, 34, + 55, 10, + 55, 13, + 55, 14, + 55, 15, + 55, 34, + 55, 36, + 55, 40, + 55, 48, + 55, 50, + 55, 62, + 55, 66, + 55, 68, + 55, 69, + 55, 70, + 55, 72, + 55, 80, + 55, 82, + 55, 83, + 55, 86, + 55, 87, + 55, 90, + 55, 94, + 56, 10, + 56, 13, + 56, 14, + 56, 15, + 56, 34, + 56, 53, + 56, 62, + 56, 66, + 56, 68, + 56, 69, + 56, 70, + 56, 72, + 56, 80, + 56, 82, + 56, 83, + 56, 86, + 56, 94, + 57, 14, + 57, 36, + 57, 40, + 57, 48, + 57, 50, + 57, 55, + 57, 68, + 57, 69, + 57, 70, + 57, 72, + 57, 80, + 57, 82, + 57, 86, + 57, 87, + 57, 90, + 58, 7, + 58, 10, + 58, 11, + 58, 13, + 58, 14, + 58, 15, + 58, 34, + 58, 36, + 58, 40, + 58, 43, + 58, 48, + 58, 50, + 58, 52, + 58, 53, + 58, 54, + 58, 55, + 58, 56, + 58, 57, + 58, 58, + 58, 62, + 58, 66, + 58, 68, + 58, 69, + 58, 70, + 58, 71, + 58, 72, + 58, 78, + 58, 79, + 58, 80, + 58, 81, + 58, 82, + 58, 83, + 58, 84, + 58, 85, + 58, 86, + 58, 87, + 58, 89, + 58, 90, + 58, 91, + 58, 94, + 59, 34, + 59, 36, + 59, 40, + 59, 48, + 59, 50, + 59, 68, + 59, 69, + 59, 70, + 59, 72, + 59, 80, + 59, 82, + 59, 86, + 59, 87, + 59, 88, + 59, 90, + 60, 43, + 60, 54, + 66, 3, + 66, 8, + 66, 87, + 66, 90, + 67, 3, + 67, 8, + 67, 87, + 67, 89, + 67, 90, + 67, 91, + 68, 3, + 68, 8, + 70, 3, + 70, 8, + 70, 87, + 70, 90, + 71, 3, + 71, 8, + 71, 10, + 71, 62, + 71, 68, + 71, 69, + 71, 70, + 71, 72, + 71, 82, + 71, 94, + 73, 3, + 73, 8, + 76, 68, + 76, 69, + 76, 70, + 76, 72, + 76, 82, + 78, 3, + 78, 8, + 79, 3, + 79, 8, + 80, 3, + 80, 8, + 80, 87, + 80, 89, + 80, 90, + 80, 91, + 81, 3, + 81, 8, + 81, 87, + 81, 89, + 81, 90, + 81, 91, + 83, 3, + 83, 8, + 83, 13, + 83, 15, + 83, 66, + 83, 68, + 83, 69, + 83, 70, + 83, 71, + 83, 72, + 83, 80, + 83, 82, + 83, 85, + 83, 87, + 83, 88, + 83, 90, + 85, 80, + 87, 3, + 87, 8, + 87, 13, + 87, 15, + 87, 66, + 87, 68, + 87, 69, + 87, 70, + 87, 71, + 87, 72, + 87, 80, + 87, 82, + 88, 13, + 88, 15, + 89, 68, + 89, 69, + 89, 70, + 89, 72, + 89, 80, + 89, 82, + 90, 3, + 90, 8, + 90, 13, + 90, 15, + 90, 66, + 90, 68, + 90, 69, + 90, 70, + 90, 71, + 90, 72, + 90, 80, + 90, 82, + 91, 68, + 91, 69, + 91, 70, + 91, 72, + 91, 80, + 91, 82, + 92, 43, + 92, 54 +}; + +/* Kerning between the respective left and right glyphs + * 4.4 format which needs to scaled with `kern_scale`*/ +static int8_t kern_pair_values[] = +{ + -9, -23, -23, -26, -11, -13, -13, -13, + -13, -4, -4, -13, -4, -13, -17, 2, + -23, -23, -26, -11, -13, -13, -13, -13, + -4, -4, -13, -4, -13, -17, 2, 4, + 4, 5, -37, -37, -37, -37, -49, -26, + -26, -13, -2, -2, -2, -2, -28, -4, + -19, -15, -21, -3, -4, -2, -11, -7, + -11, 3, -6, -5, -12, -6, -6, -3, + -4, -22, -22, -5, -6, -5, -5, -9, + -5, 4, -4, -4, -4, -4, -4, -4, + -4, -4, -6, -5, -6, -51, -51, -37, + -58, 4, -7, -5, -5, -5, -5, -5, + -5, -6, -5, -5, -5, 4, -6, 4, + -6, 4, -6, 4, -6, -5, -14, -7, + -7, -7, -7, -6, -6, -6, -6, -5, + -5, -6, -5, -6, -5, -9, -14, -9, + -73, -73, 4, -14, -14, -14, -14, -60, + -12, -38, -31, -52, -10, -29, -20, -29, + 4, -6, 4, -6, 4, -6, 4, -6, + -22, -22, -5, -6, -5, -5, -9, -5, + -71, -71, -30, -44, -7, -6, -2, -3, + -3, -3, -3, -3, -3, 3, 3, 3, + -9, -6, -4, -8, -17, -4, -10, -9, + -48, -51, -48, -17, -6, -6, -52, -6, + -6, -3, 4, 4, 3, 4, -25, -22, + -22, -22, -22, -24, -24, -22, -24, -22, + -16, -25, -21, -16, -12, -17, -16, -13, + -5, 4, -49, -8, -49, -16, -3, -3, + -3, -3, 4, -10, -10, -10, -10, -10, + -10, -10, -7, -6, -2, -2, 4, 3, + -27, -13, -27, -9, 3, 3, -7, -7, + -7, -7, -7, -7, -7, -5, -4, 3, + -10, -5, -5, -5, -5, 3, -6, -6, + -6, -6, -5, -6, -5, -7, -7, -7, + 4, -11, -46, -11, -46, -21, -6, -6, + -21, -6, -6, -3, 4, -21, 4, 4, + 3, 4, 4, -16, -14, -14, -14, -5, + -14, -9, -9, -14, -9, -14, -9, -13, + -5, -9, -4, -5, -4, -7, 4, 3, + -6, -6, -6, -6, -5, -5, -5, -5, + -5, -5, -4, -6, -6, -6, -4, -4, + -15, -15, -3, -3, -6, -6, -2, -3, + -2, -3, -2, -2, -3, -3, -3, -3, + 4, 4, 4, 4, -5, -5, -5, -5, + -5, 4, -23, -23, -4, -4, -4, -4, + -4, -23, -23, -23, -23, -30, -30, -3, + -5, -3, -3, -6, -6, -2, -3, -2, + -3, 4, 4, -27, -27, -9, -4, -4, + -4, 3, -4, -4, -4, 11, 4, 4, + 4, -4, 3, 3, -23, -23, -3, -3, + -3, -3, 3, -3, -3, -3, -27, -27, + -4, -4, -4, -4, -4, -4, 3, 3, + -23, -23, -3, -3, -3, -3, 3, -3, + -3, -3, -3, -3, -3, -3, -3, -3, + -4, -4 +}; + +/*Collect the kern pair's data in one place*/ +static lv_font_fmt_txt_kern_pair_t kern_pairs = +{ + .glyph_ids = kern_pair_glyph_ids, + .values = kern_pair_values, + .pair_cnt = 434, + .glyph_ids_size = 0 +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_dsc_t font_dsc = { + .glyph_bitmap = gylph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .cmap_num = 2, + .bpp = 4, + + .kern_scale = 16, + .kern_dsc = &kern_pairs, + .kern_classes = 0 +}; + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +lv_font_t lv_font_roboto_28 = { + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .line_height = 31, /*The maximum line height required by the font*/ + .base_line = 7, /*Baseline measured from the bottom of the line*/ +}; + +#endif /*#if LV_FONT_ROBOTO_28*/ + diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h index d29bdf908957..10b73ef20210 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h @@ -122,7 +122,7 @@ typedef struct { const void * glyph_ids; const int8_t * values; uint32_t pair_cnt :24; - uint32_t glyph_ids_size :2; /*1: `glyph_ids` is stored as `uint8_t`; 2: as `uint16_t`*/ + uint32_t glyph_ids_size :2; /*0: `glyph_ids` is stored as `uint8_t`; 1: as `uint16_t`*/ }lv_font_fmt_txt_kern_pair_t; /*More complex but more optimal class based kern value storage*/ From 62c531eec35b62e68b69cc3342ecef35d34b594c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 5 Jun 2019 12:28:31 +0200 Subject: [PATCH 490/590] font: fix glyph_ids_size usage --- src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index a6ffcb70285d..020973e51a61 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -160,7 +160,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t if(fdsc->kern_classes == 0) { /*Kern pairs*/ const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; - if(kdsc->glyph_ids_size == 1) { + if(kdsc->glyph_ids_size == 0) { const uint8_t * g_ids = kdsc->glyph_ids; for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { if(g_ids[k] == gid_left && @@ -169,7 +169,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t break; } } - } else { + } else if(kdsc->glyph_ids_size == 1) { const uint16_t * g_ids = kdsc->glyph_ids; for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { if(g_ids[k] == gid_left && @@ -178,6 +178,8 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t break; } } + } else { + /*Invalid value*/ } } else { /*Kern classes*/ From 3a2def1e76d2368c63a2826299d0c6d32ba93f11 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 5 Jun 2019 15:16:43 +0200 Subject: [PATCH 491/590] font: update lv_conf_template.h --- lv_conf_template.h | 38 ++++-------- src/lv_conf_checker.h | 74 ++++++----------------- src/lv_misc/lv_font.h | 5 ++ src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c | 8 ++- 4 files changed, 40 insertions(+), 85 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 96ca4b499dca..2f146e31f461 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -224,40 +224,26 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i * FONT USAGE *===================*/ -/* More info about fonts: https://docs.littlevgl.com/#Fonts - * To enable a built-in font use 1,2,4 or 8 values - * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#define LV_USE_FONT_DEJAVU_10 4 -#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 4 -#define LV_USE_FONT_DEJAVU_10_CYRILLIC 4 -#define LV_USE_FONT_SYMBOL_10 4 - -#define LV_USE_FONT_DEJAVU_20 4 -#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 -#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 -#define LV_USE_FONT_SYMBOL_20 4 - -#define LV_USE_FONT_DEJAVU_30 4 -#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 4 -#define LV_USE_FONT_DEJAVU_30_CYRILLIC 4 -#define LV_USE_FONT_SYMBOL_30 4 - -#define LV_USE_FONT_DEJAVU_40 4 -#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 4 -#define LV_USE_FONT_DEJAVU_40_CYRILLIC 4 -#define LV_USE_FONT_SYMBOL_40 4 - -#define LV_USE_FONT_MONOSPACE_8 1 +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. + * The symbols are available via `LV_SYMBOL_...` defines + * More info about fonts: https://docs.littlevgl.com/#Fonts + * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array + */ +#define LV_FONT_ROBOTO_12 0 +#define LV_FONT_ROBOTO_16 1 +#define LV_FONT_ROBOTO_22 0 +#define LV_FONT_ROBOTO_28 0 /* Optionally declare your custom fonts here. * You can use these fonts as default font too * and they will be available globally. E.g. * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \ - * LV_FONT_DECLARE(my_font_2) \ + * LV_FONT_DECLARE(my_font_2) */ #define LV_FONT_CUSTOM_DECLARE -#define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/ +/*Always set a default font from the built-in fonts*/ +#define LV_FONT_DEFAULT &lv_font_roboto_16 /*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ typedef void * lv_font_user_data_t; diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 0ff048b1cb38..219a02448e2a 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -322,79 +322,41 @@ * FONT USAGE *===================*/ -/* More info about fonts: https://docs.littlevgl.com/#Fonts - * To enable a built-in font use 1,2,4 or 8 values - * which will determine the bit-per-pixel. Higher value means smoother fonts */ -#ifndef LV_USE_FONT_DEJAVU_10 -#define LV_USE_FONT_DEJAVU_10 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_10_LATIN_SUP -#define LV_USE_FONT_DEJAVU_10_LATIN_SUP 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_10_CYRILLIC -#define LV_USE_FONT_DEJAVU_10_CYRILLIC 4 -#endif -#ifndef LV_USE_FONT_SYMBOL_10 -#define LV_USE_FONT_SYMBOL_10 4 -#endif - -#ifndef LV_USE_FONT_DEJAVU_20 -#define LV_USE_FONT_DEJAVU_20 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_20_LATIN_SUP -#define LV_USE_FONT_DEJAVU_20_LATIN_SUP 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_20_CYRILLIC -#define LV_USE_FONT_DEJAVU_20_CYRILLIC 4 -#endif -#ifndef LV_USE_FONT_SYMBOL_20 -#define LV_USE_FONT_SYMBOL_20 4 -#endif - -#ifndef LV_USE_FONT_DEJAVU_30 -#define LV_USE_FONT_DEJAVU_30 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_30_LATIN_SUP -#define LV_USE_FONT_DEJAVU_30_LATIN_SUP 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_30_CYRILLIC -#define LV_USE_FONT_DEJAVU_30_CYRILLIC 4 -#endif -#ifndef LV_USE_FONT_SYMBOL_30 -#define LV_USE_FONT_SYMBOL_30 4 -#endif - -#ifndef LV_USE_FONT_DEJAVU_40 -#define LV_USE_FONT_DEJAVU_40 4 -#endif -#ifndef LV_USE_FONT_DEJAVU_40_LATIN_SUP -#define LV_USE_FONT_DEJAVU_40_LATIN_SUP 4 +/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel. + * The symbols are available via `LV_SYMBOL_...` defines + * More info about fonts: https://docs.littlevgl.com/#Fonts + * To create a new font go to: https://littlevgl.com/ttf-font-to-c-array + */ +#ifndef LV_FONT_ROBOTO_12 +#define LV_FONT_ROBOTO_12 0 #endif -#ifndef LV_USE_FONT_DEJAVU_40_CYRILLIC -#define LV_USE_FONT_DEJAVU_40_CYRILLIC 4 +#ifndef LV_FONT_ROBOTO_16 +#define LV_FONT_ROBOTO_16 1 #endif -#ifndef LV_USE_FONT_SYMBOL_40 -#define LV_USE_FONT_SYMBOL_40 4 +#ifndef LV_FONT_ROBOTO_22 +#define LV_FONT_ROBOTO_22 0 #endif - -#ifndef LV_USE_FONT_MONOSPACE_8 -#define LV_USE_FONT_MONOSPACE_8 1 +#ifndef LV_FONT_ROBOTO_28 +#define LV_FONT_ROBOTO_28 0 #endif /* Optionally declare your custom fonts here. * You can use these fonts as default font too * and they will be available globally. E.g. * #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \ - * LV_FONT_DECLARE(my_font_2) \ + * LV_FONT_DECLARE(my_font_2) */ #ifndef LV_FONT_CUSTOM_DECLARE #define LV_FONT_CUSTOM_DECLARE #endif +/*Always set a default font from the built-in fonts*/ #ifndef LV_FONT_DEFAULT -#define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/ +#define LV_FONT_DEFAULT &lv_font_roboto_16 #endif +/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/ + /*================= * Text settings *=================*/ diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index 6787b3e397ee..c9166d876fec 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -118,6 +118,11 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; +LV_FONT_DECLARE(lv_font_roboto_12) +LV_FONT_DECLARE(lv_font_roboto_16) +LV_FONT_DECLARE(lv_font_roboto_22) +LV_FONT_DECLARE(lv_font_roboto_28) + /*Declare the custom (user defined) fonts*/ #ifdef LV_FONT_CUSTOM_DECLARE LV_FONT_CUSTOM_DECLARE diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c index 020973e51a61..98e90f6931bb 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c @@ -78,9 +78,11 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * if(!gid) return false; int8_t kvalue = 0; + const lv_font_fmt_txt_glyph_dsc_t * gdsc_next = NULL; if(fdsc->kern_dsc) { uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next); if(gid_next) { + gdsc_next = &fdsc->glyph_dsc[gid_next]; kvalue = get_kern_value(font, gid, gid_next); } } @@ -88,10 +90,10 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * /*Put together a glyph dsc*/ const lv_font_fmt_txt_glyph_dsc_t * gdsc = &fdsc->glyph_dsc[gid]; - uint32_t adw_w = gdsc->adv_w + ((int32_t)((int32_t)kvalue * fdsc->kern_scale) >> 4); - adw_w = (adw_w + (1 << 3)) >> 4; + uint32_t adv_w = gdsc->adv_w + ((int32_t)((int32_t)kvalue * fdsc->kern_scale) >> 4); + adv_w = (adv_w + (1 << 3)) >> 4; - dsc_out->adv_w = adw_w; + dsc_out->adv_w = adv_w; dsc_out->box_h = gdsc->box_h; dsc_out->box_w = gdsc->box_w; dsc_out->ofs_x = gdsc->ofs_x; From 0ef39ed14405ef69f738c161248cb676e72b168f Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 5 Jun 2019 15:23:16 +0200 Subject: [PATCH 492/590] lv_conf_template: formatting --- lv_conf_template.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 2f146e31f461..90ef604423ec 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -140,16 +140,16 @@ typedef void * lv_group_user_data_t; #define LV_USE_FILESYSTEM 1 /* 1: Enable indexed (palette) images */ -#define LV_IMG_CF_INDEXED 1 +#define LV_IMG_CF_INDEXED 1 /* 1: Enable alpha indexed images */ -#define LV_IMG_CF_ALPHA 1 +#define LV_IMG_CF_ALPHA 1 /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ typedef void * lv_img_decoder_user_data_t; /*1: Add a `user_data` to drivers and objects*/ -#define LV_USE_USER_DATA 1 +#define LV_USE_USER_DATA 1 /*===================== * Compiler settings @@ -165,6 +165,10 @@ typedef void * lv_img_decoder_user_data_t; * E.g. __attribute__((aligned(4))) */ #define LV_ATTRIBUTE_MEM_ALIGN +/* Attribute to mark large constant arrays for example + * font's bitmaps */ +#define LV_ATTRIBUTE_LARGE_CONST + /* 1: Variable length array is supported*/ #define LV_COMPILER_VLA_SUPPORTED 1 From 9139b58abc4ce27a7ab5d205ccaf2e69ef96fd9d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 5 Jun 2019 18:36:38 +0200 Subject: [PATCH 493/590] lv_draw_rect: fix underlow on border width --- src/lv_draw/lv_draw_rect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 7b28b10060a2..02d4b804bd8f 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -523,7 +523,7 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); - uint16_t bwidth = style->body.border.width; + lv_coord_t bwidth = style->body.border.width; lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; @@ -721,7 +721,7 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t { uint16_t radius = style->body.radius; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); - uint16_t bwidth = style->body.border.width; + lv_coord_t bwidth = style->body.border.width; lv_color_t color = style->body.border.color; lv_border_part_t part = style->body.border.part; lv_opa_t opa = opa_scale == LV_OPA_COVER From b4d54c71d3f239b5886a658a25de519fae11dc95 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Thu, 6 Jun 2019 01:11:30 +0300 Subject: [PATCH 494/590] small fixes Enable/disable font declarations according to font macros. This is required for Micropython otherwise we would get a declaration with a missing definition. Updated sed line which generates _LV_STR enum for Micropython binding --- src/lv_misc/lv_font.h | 11 +++++++++++ src/lv_misc/lv_symbol_def.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index c9166d876fec..0444a0606b5e 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -118,10 +118,21 @@ static inline uint8_t lv_font_get_line_height(const lv_font_t * font_p) #define LV_FONT_DECLARE(font_name) extern lv_font_t font_name; +#if LV_FONT_ROBOTO_12 LV_FONT_DECLARE(lv_font_roboto_12) +#endif + +#if LV_FONT_ROBOTO_16 LV_FONT_DECLARE(lv_font_roboto_16) +#endif + +#if LV_FONT_ROBOTO_22 LV_FONT_DECLARE(lv_font_roboto_22) +#endif + +#if LV_FONT_ROBOTO_28 LV_FONT_DECLARE(lv_font_roboto_28) +#endif /*Declare the custom (user defined) fonts*/ #ifdef LV_FONT_CUSTOM_DECLARE diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_misc/lv_symbol_def.h index aa66a1903d3d..ff6f84a0b797 100644 --- a/src/lv_misc/lv_symbol_def.h +++ b/src/lv_misc/lv_symbol_def.h @@ -71,7 +71,7 @@ extern "C" { /* * following list is generated using - * cat lv_symbol_def.h | sed -E -n 's/^#define\s+(SYMBOL_\w+).*$/ _LV_STR_\1,/p' + * cat src/lv_misc/lv_symbol_def.h | sed -E -n 's/^#define\s+(LV_SYMBOL_\w+).*"$/ _LV_STR_\1,/p' */ enum { _LV_STR_SYMBOL_AUDIO, From 48e1efb6ef523e20c0d75a1d3de9c8dd04ab810a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 6 Jun 2019 05:55:17 +0200 Subject: [PATCH 495/590] font folder restructure and makefile fixes --- lvgl.h | 4 ++-- lvgl.mk | 2 +- src/lv_core/lv_style.h | 2 +- src/lv_draw/lv_draw_basic.c | 2 +- src/lv_draw/lv_draw_basic.h | 2 +- src/{lv_misc => lv_font}/lv_font.c | 4 ++-- src/{lv_misc => lv_font}/lv_font.h | 0 src/lv_font/lv_font.mk | 11 +++++++++ .../lv_font_fmt => lv_font}/lv_font_fmt_txt.c | 18 +++++++-------- .../lv_font_fmt => lv_font}/lv_font_fmt_txt.h | 5 ++-- src/{lv_fonts => lv_font}/lv_font_roboto_12.c | 0 src/{lv_fonts => lv_font}/lv_font_roboto_16.c | 0 src/{lv_fonts => lv_font}/lv_font_roboto_22.c | 0 src/{lv_fonts => lv_font}/lv_font_roboto_28.c | 0 src/{lv_misc => lv_font}/lv_symbol_def.h | 0 src/lv_fonts/lv_fonts.mk | 23 ------------------- src/lv_misc/lv_misc.mk | 1 - src/lv_misc/lv_txt.c | 4 ++-- src/lv_misc/lv_txt.h | 2 +- src/lv_objx/lv_ddlist.c | 2 +- src/lv_objx/lv_img.h | 1 - src/lv_objx/lv_label.h | 4 ++-- 22 files changed, 35 insertions(+), 52 deletions(-) rename src/{lv_misc => lv_font}/lv_font.c (96%) rename src/{lv_misc => lv_font}/lv_font.h (100%) create mode 100644 src/lv_font/lv_font.mk rename src/{lv_misc/lv_font_fmt => lv_font}/lv_font_fmt_txt.c (94%) rename src/{lv_misc/lv_font_fmt => lv_font}/lv_font_fmt_txt.h (99%) rename src/{lv_fonts => lv_font}/lv_font_roboto_12.c (100%) rename src/{lv_fonts => lv_font}/lv_font_roboto_16.c (100%) rename src/{lv_fonts => lv_font}/lv_font_roboto_22.c (100%) rename src/{lv_fonts => lv_font}/lv_font_roboto_28.c (100%) rename src/{lv_misc => lv_font}/lv_symbol_def.h (100%) delete mode 100644 src/lv_fonts/lv_fonts.mk diff --git a/lvgl.h b/lvgl.h index 9d099f80fd99..e44768c5b600 100644 --- a/lvgl.h +++ b/lvgl.h @@ -30,8 +30,8 @@ extern "C" { #include "src/lv_themes/lv_theme.h" -#include "src/lv_misc/lv_font.h" -#include "src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h" +#include "src/lv_font/lv_font.h" +#include "src/lv_font/lv_font_fmt_txt.h" #include "src/lv_objx/lv_btn.h" #include "src/lv_objx/lv_imgbtn.h" diff --git a/lvgl.mk b/lvgl.mk index a895f33f144e..830fe1194a68 100644 --- a/lvgl.mk +++ b/lvgl.mk @@ -1,7 +1,7 @@ include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk -include $(LVGL_DIR)/lvgl/src/lv_fonts/lv_fonts.mk +include $(LVGL_DIR)/lvgl/src/lv_font/lv_font.mk include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index 8fdf22a7a3e5..ddbc1829b361 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -14,9 +14,9 @@ extern "C" { * INCLUDES *********************/ #include +#include "../lv_font/lv_font.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" -#include "../lv_misc/lv_font.h" #include "../lv_misc/lv_anim.h" /********************* diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 8ab7a90d69dc..dc6badc241ba 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -11,8 +11,8 @@ #include "../lv_core/lv_refr.h" #include "../lv_hal/lv_hal.h" +#include "../lv_font/lv_font.h" #include "../lv_misc/lv_area.h" -#include "../lv_misc/lv_font.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_log.h" diff --git a/src/lv_draw/lv_draw_basic.h b/src/lv_draw/lv_draw_basic.h index 97dfb33499a1..87482237d115 100644 --- a/src/lv_draw/lv_draw_basic.h +++ b/src/lv_draw/lv_draw_basic.h @@ -19,9 +19,9 @@ extern "C" { #include "../../../lv_conf.h" #endif +#include "../lv_font/lv_font.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_area.h" -#include "../lv_misc/lv_font.h" /********************* * DEFINES diff --git a/src/lv_misc/lv_font.c b/src/lv_font/lv_font.c similarity index 96% rename from src/lv_misc/lv_font.c rename to src/lv_font/lv_font.c index d7452ab837bd..c2d6eac821f9 100644 --- a/src/lv_misc/lv_font.c +++ b/src/lv_font/lv_font.c @@ -8,8 +8,8 @@ *********************/ #include "lv_font.h" -#include "lv_log.h" -#include "lv_utils.h" +#include "../lv_misc/lv_utils.h" +#include "../lv_misc/lv_log.h" /********************* * DEFINES diff --git a/src/lv_misc/lv_font.h b/src/lv_font/lv_font.h similarity index 100% rename from src/lv_misc/lv_font.h rename to src/lv_font/lv_font.h diff --git a/src/lv_font/lv_font.mk b/src/lv_font/lv_font.mk new file mode 100644 index 000000000000..a605da791776 --- /dev/null +++ b/src/lv_font/lv_font.mk @@ -0,0 +1,11 @@ +CSRCS += lv_font.c +CSRCS += lv_font_fmt_txt.c +CSRCS += lv_font_roboto_12.c +CSRCS += lv_font_roboto_16.c +CSRCS += lv_font_roboto_22.c +CSRCS += lv_font_roboto_28.c + +DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_font +VPATH += :$(LVGL_DIR)/lvgl/src/lv_font + +CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_font" diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c similarity index 94% rename from src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c rename to src/lv_font/lv_font_fmt_txt.c index 98e90f6931bb..5182074be408 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -7,10 +7,10 @@ * INCLUDES *********************/ -#include "../lv_font.h" -#include "../lv_log.h" -#include "../lv_utils.h" +#include "lv_font.h" #include "lv_font_fmt_txt.h" +#include "../lv_misc/lv_log.h" +#include "../lv_misc/lv_utils.h" /********************* * DEFINES @@ -25,7 +25,7 @@ **********************/ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter); static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right); -static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); +//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); /********************** * STATIC VARIABLES @@ -78,11 +78,9 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t * if(!gid) return false; int8_t kvalue = 0; - const lv_font_fmt_txt_glyph_dsc_t * gdsc_next = NULL; if(fdsc->kern_dsc) { uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next); if(gid_next) { - gdsc_next = &fdsc->glyph_dsc[gid_next]; kvalue = get_kern_value(font, gid, gid_next); } } @@ -213,7 +211,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t * @retval > 0 Reference is less than element. * */ -static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) -{ - return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); -} +//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) +//{ +// return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); +//} diff --git a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h b/src/lv_font/lv_font_fmt_txt.h similarity index 99% rename from src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h rename to src/lv_font/lv_font_fmt_txt.h index 10b73ef20210..26d792677bc0 100644 --- a/src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h +++ b/src/lv_font/lv_font_fmt_txt.h @@ -16,14 +16,13 @@ extern "C" { #ifdef LV_CONF_INCLUDE_SIMPLE #include "lv_conf.h" #else -#include "../../../../lv_conf.h" +#include "../../../lv_conf.h" #endif #include #include #include - -#include "../lv_font.h" +#include "lv_font.h" /********************* * DEFINES diff --git a/src/lv_fonts/lv_font_roboto_12.c b/src/lv_font/lv_font_roboto_12.c similarity index 100% rename from src/lv_fonts/lv_font_roboto_12.c rename to src/lv_font/lv_font_roboto_12.c diff --git a/src/lv_fonts/lv_font_roboto_16.c b/src/lv_font/lv_font_roboto_16.c similarity index 100% rename from src/lv_fonts/lv_font_roboto_16.c rename to src/lv_font/lv_font_roboto_16.c diff --git a/src/lv_fonts/lv_font_roboto_22.c b/src/lv_font/lv_font_roboto_22.c similarity index 100% rename from src/lv_fonts/lv_font_roboto_22.c rename to src/lv_font/lv_font_roboto_22.c diff --git a/src/lv_fonts/lv_font_roboto_28.c b/src/lv_font/lv_font_roboto_28.c similarity index 100% rename from src/lv_fonts/lv_font_roboto_28.c rename to src/lv_font/lv_font_roboto_28.c diff --git a/src/lv_misc/lv_symbol_def.h b/src/lv_font/lv_symbol_def.h similarity index 100% rename from src/lv_misc/lv_symbol_def.h rename to src/lv_font/lv_symbol_def.h diff --git a/src/lv_fonts/lv_fonts.mk b/src/lv_fonts/lv_fonts.mk deleted file mode 100644 index 002fb75b66ca..000000000000 --- a/src/lv_fonts/lv_fonts.mk +++ /dev/null @@ -1,23 +0,0 @@ -CSRCS += lv_font_builtin.c -CSRCS += lv_font_dejavu_10.c -CSRCS += lv_font_dejavu_20.c -CSRCS += lv_font_dejavu_30.c -CSRCS += lv_font_dejavu_40.c -CSRCS += lv_font_dejavu_10_cyrillic.c -CSRCS += lv_font_dejavu_20_cyrillic.c -CSRCS += lv_font_dejavu_30_cyrillic.c -CSRCS += lv_font_dejavu_40_cyrillic.c -CSRCS += lv_font_dejavu_10_latin_sup.c -CSRCS += lv_font_dejavu_20_latin_sup.c -CSRCS += lv_font_dejavu_30_latin_sup.c -CSRCS += lv_font_dejavu_40_latin_sup.c -CSRCS += lv_font_symbol_10.c -CSRCS += lv_font_symbol_20.c -CSRCS += lv_font_symbol_30.c -CSRCS += lv_font_symbol_40.c -CSRCS += lv_font_monospace_8.c - -DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_fonts -VPATH += :$(LVGL_DIR)/lvgl/src/lv_fonts - -CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_fonts" diff --git a/src/lv_misc/lv_misc.mk b/src/lv_misc/lv_misc.mk index 360cf2ee7adc..52ffe890400b 100644 --- a/src/lv_misc/lv_misc.mk +++ b/src/lv_misc/lv_misc.mk @@ -1,4 +1,3 @@ -CSRCS += lv_font.c CSRCS += lv_circ.c CSRCS += lv_area.c CSRCS += lv_task.c diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index 85799d05f92f..b2f1d35ca7a1 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -191,8 +191,8 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord /*Check for new line chars*/ if(letter == '\n' || letter == '\r') { uint32_t i_tmp = i; - uint32_t letter_next = lv_txt_encoded_next(txt, &i_tmp); - if(letter == '\r' && letter_next == '\n') i = i_tmp; + uint32_t n = lv_txt_encoded_next(txt, &i_tmp); + if(letter == '\r' && n == '\n') i = i_tmp; return i; /*Return with the first letter of the next line*/ diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index 1150d3f233fd..1527527e1653 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -21,8 +21,8 @@ extern "C" { #include #include "lv_area.h" -#include "lv_font.h" #include "lv_area.h" +#include "../lv_font/lv_font.h" /********************* * DEFINES diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 0f2f1986bc04..004f03690d01 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -13,7 +13,7 @@ #include "../lv_core/lv_group.h" #include "../lv_core/lv_indev.h" #include "../lv_themes/lv_theme.h" -#include "../lv_misc/lv_symbol_def.h" +#include "../lv_font/lv_symbol_def.h" #include "../lv_misc/lv_anim.h" #include "../lv_misc/lv_math.h" #include diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index 59b0b001969c..5cfaae13a7ba 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -23,7 +23,6 @@ extern "C" { #include "../lv_core/lv_obj.h" #include "../lv_misc/lv_fs.h" -#include "../lv_misc/lv_symbol_def.h" #include "lv_label.h" #include "../lv_draw/lv_draw.h" diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 33f9876956ea..33b5c3c83b13 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -22,9 +22,9 @@ extern "C" { #if LV_USE_LABEL != 0 #include "../lv_core/lv_obj.h" -#include "../lv_misc/lv_font.h" +#include "../lv_font/lv_font.h" +#include "../lv_font/lv_symbol_def.h" #include "../lv_misc/lv_txt.h" -#include "../lv_misc/lv_symbol_def.h" /********************* * DEFINES From dba4cebfeae0861d830c34c2825c833e8a55d8b0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 6 Jun 2019 06:04:15 +0200 Subject: [PATCH 496/590] fix warnings --- src/lv_core/lv_obj.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 50cad5cc4f46..2c03375cacc7 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1100,6 +1100,12 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_TINY obj->ext_click_pad_hor = LV_MATH_MAX(left, right); obj->ext_click_pad_ver = LV_MATH_MAX(top, bottom); +#else + (void) obj; /*Unused*/ + (void) left; /*Unused*/ + (void) right; /*Unused*/ + (void) top; /*Unused*/ + (void) bottom; /*Unused*/ #endif } @@ -1690,6 +1696,7 @@ lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.x1; #else + (void) obj; /*Unused*/ return 0; #endif } @@ -1706,6 +1713,7 @@ lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.x2; #else + (void) obj; /*Unused*/ return 0; #endif } @@ -1722,6 +1730,7 @@ lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.y1; #else + (void) obj; /*Unused*/ return 0; #endif } @@ -1738,6 +1747,7 @@ lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.y2; #else + (void) obj; /*Unused*/ return 0; #endif } From 23f842e46237e51e6cf04349982f616314f95097 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 6 Jun 2019 06:05:40 +0200 Subject: [PATCH 497/590] run clag-format --- src/lv_core/lv_group.c | 43 ++-- src/lv_core/lv_group.h | 36 +-- src/lv_core/lv_indev.c | 77 +++---- src/lv_core/lv_indev.h | 2 +- src/lv_core/lv_obj.c | 94 ++++---- src/lv_core/lv_obj.h | 55 +++-- src/lv_core/lv_refr.c | 39 ++-- src/lv_core/lv_style.c | 51 ++--- src/lv_core/lv_style.h | 5 +- src/lv_draw/lv_draw.c | 8 +- src/lv_draw/lv_draw.h | 9 +- src/lv_draw/lv_draw_arc.c | 27 +-- src/lv_draw/lv_draw_arc.h | 3 +- src/lv_draw/lv_draw_basic.c | 97 ++++---- src/lv_draw/lv_draw_basic.h | 15 +- src/lv_draw/lv_draw_img.c | 33 +-- src/lv_draw/lv_draw_img.h | 7 +- src/lv_draw/lv_draw_label.c | 32 ++- src/lv_draw/lv_draw_label.h | 5 +- src/lv_draw/lv_draw_line.c | 141 +++++------- src/lv_draw/lv_draw_rect.c | 368 +++++++++++++----------------- src/lv_draw/lv_draw_rect.h | 3 +- src/lv_draw/lv_draw_triangle.c | 35 +-- src/lv_draw/lv_draw_triangle.h | 6 +- src/lv_draw/lv_img_decoder.c | 238 +++++++++---------- src/lv_draw/lv_img_decoder.h | 28 +-- src/lv_hal/lv_hal_disp.c | 14 +- src/lv_hal/lv_hal_disp.h | 7 +- src/lv_hal/lv_hal_indev.c | 3 +- src/lv_hal/lv_hal_indev.h | 7 +- src/lv_misc/lv_anim.c | 14 +- src/lv_misc/lv_anim.h | 38 +-- src/lv_misc/lv_area.c | 3 +- src/lv_misc/lv_color.h | 13 +- src/lv_misc/lv_gc.h | 18 +- src/lv_misc/lv_ll.c | 5 +- src/lv_misc/lv_ll.h | 5 +- src/lv_misc/lv_log.h | 32 +-- src/lv_misc/lv_math.c | 13 +- src/lv_misc/lv_mem.c | 5 +- src/lv_misc/lv_mem.h | 24 +- src/lv_misc/lv_task.c | 37 ++- src/lv_misc/lv_txt.c | 64 +++--- src/lv_misc/lv_txt.h | 17 +- src/lv_objx/lv_arc.c | 6 +- src/lv_objx/lv_bar.c | 60 ++--- src/lv_objx/lv_bar.h | 1 - src/lv_objx/lv_btn.c | 44 ++-- src/lv_objx/lv_btn.h | 5 +- src/lv_objx/lv_btnm.c | 52 ++--- src/lv_objx/lv_btnm.h | 18 +- src/lv_objx/lv_calendar.c | 166 ++++++-------- src/lv_objx/lv_calendar.h | 11 +- src/lv_objx/lv_canvas.c | 81 +++---- src/lv_objx/lv_canvas.h | 47 ++-- src/lv_objx/lv_cb.c | 22 +- src/lv_objx/lv_chart.c | 240 +++++++++---------- src/lv_objx/lv_chart.h | 34 ++- src/lv_objx/lv_cont.c | 75 +++--- src/lv_objx/lv_cont.h | 3 +- src/lv_objx/lv_ddlist.c | 73 +++--- src/lv_objx/lv_ddlist.h | 22 +- src/lv_objx/lv_gauge.c | 39 ++-- src/lv_objx/lv_img.c | 20 +- src/lv_objx/lv_imgbtn.c | 4 +- src/lv_objx/lv_imgbtn.h | 4 +- src/lv_objx/lv_kb.c | 15 +- src/lv_objx/lv_kb.h | 7 +- src/lv_objx/lv_label.c | 216 +++++++++--------- src/lv_objx/lv_label.h | 46 ++-- src/lv_objx/lv_led.c | 17 +- src/lv_objx/lv_line.c | 19 +- src/lv_objx/lv_line.h | 12 +- src/lv_objx/lv_list.c | 55 ++--- src/lv_objx/lv_list.h | 9 +- src/lv_objx/lv_lmeter.c | 26 +-- src/lv_objx/lv_mbox.c | 109 ++++----- src/lv_objx/lv_mbox.h | 4 +- src/lv_objx/lv_page.c | 147 +++++------- src/lv_objx/lv_page.h | 53 ++--- src/lv_objx/lv_preload.c | 57 +++-- src/lv_objx/lv_preload.h | 8 +- src/lv_objx/lv_roller.c | 64 ++---- src/lv_objx/lv_roller.h | 3 +- src/lv_objx/lv_slider.c | 103 +++------ src/lv_objx/lv_slider.h | 4 +- src/lv_objx/lv_spinbox.c | 9 +- src/lv_objx/lv_spinbox.h | 6 +- src/lv_objx/lv_sw.c | 6 +- src/lv_objx/lv_sw.h | 3 +- src/lv_objx/lv_ta.c | 256 +++++++++------------ src/lv_objx/lv_ta.h | 36 +-- src/lv_objx/lv_table.c | 47 ++-- src/lv_objx/lv_tabview.c | 255 ++++++++------------- src/lv_objx/lv_tabview.h | 7 +- src/lv_objx/lv_tileview.c | 50 ++-- src/lv_objx/lv_win.c | 27 +-- src/lv_themes/lv_theme_alien.c | 3 +- src/lv_themes/lv_theme_default.c | 6 +- src/lv_themes/lv_theme_material.c | 22 +- src/lv_themes/lv_theme_mono.c | 6 +- src/lv_themes/lv_theme_nemo.c | 3 +- src/lv_themes/lv_theme_night.c | 6 +- src/lv_themes/lv_theme_zen.c | 6 +- 104 files changed, 1929 insertions(+), 2602 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index f71819672bb4..bda9f098d91e 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -157,14 +157,12 @@ void lv_group_remove_obj(lv_obj_t * obj) { lv_group_t * g = obj->group_p; if(g == NULL) return; - if(g->obj_focus == NULL) - return; /*Just to be sure (Not possible if there is at least one object in the group)*/ + if(g->obj_focus == NULL) return; /*Just to be sure (Not possible if there is at least one object in the group)*/ /*Focus on the next object*/ if(*g->obj_focus == obj) { /*If this is the only object in the group then focus to nothing.*/ - if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && - lv_ll_get_tail(&g->obj_ll) == g->obj_focus) { + if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) { (*g->obj_focus)->signal_cb(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL); } /*If there more objects in the group then focus to the next/prev object*/ @@ -199,20 +197,21 @@ void lv_group_remove_obj(lv_obj_t * obj) */ void lv_group_remove_all_objs(lv_group_t * group) { - /*Defocus the the currently focused object*/ - if(group->obj_focus != NULL) { - (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); - lv_obj_invalidate(*group->obj_focus); - group->obj_focus = NULL; - } + /*Defocus the the currently focused object*/ + if(group->obj_focus != NULL) { + (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); + lv_obj_invalidate(*group->obj_focus); + group->obj_focus = NULL; + } - /*Remove the objects from the group*/ - lv_obj_t ** obj; - LV_LL_READ(group->obj_ll, obj) { - (*obj)->group_p = NULL; - } + /*Remove the objects from the group*/ + lv_obj_t ** obj; + LV_LL_READ(group->obj_ll, obj) + { + (*obj)->group_p = NULL; + } - lv_ll_clear(&(group->obj_ll)); + lv_ll_clear(&(group->obj_ll)); } /** @@ -359,8 +358,7 @@ void lv_group_set_editing(lv_group_t * group, bool edit) lv_obj_t * focused = lv_group_get_focused(group); if(focused) { - focused->signal_cb(focused, LV_SIGNAL_FOCUS, - NULL); /*Focus again to properly leave/open edit/navigate mode*/ + focused->signal_cb(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave/open edit/navigate mode*/ lv_res_t res = lv_event_send(*group->obj_focus, LV_EVENT_FOCUSED, NULL); if(res != LV_RES_OK) return; } @@ -557,8 +555,7 @@ static void style_mod_def(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); @@ -588,8 +585,7 @@ static void style_mod_edit_def(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); @@ -657,8 +653,7 @@ static void focus_next_core(lv_group_t * group, void * (*begin)(const lv_ll_t *) if(!lv_obj_get_hidden(*obj_next)) break; } - if(obj_next == group->obj_focus) - return; /*There's only one visible object and it's already focused*/ + if(obj_next == group->obj_focus) return; /*There's only one visible object and it's already focused*/ if(group->obj_focus) { (*group->obj_focus)->signal_cb(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL); diff --git a/src/lv_core/lv_group.h b/src/lv_core/lv_group.h index 43bc8d12c9ea..58b258d6daba 100644 --- a/src/lv_core/lv_group.h +++ b/src/lv_core/lv_group.h @@ -28,18 +28,18 @@ extern "C" { /*For compatibility in signal function define the keys regardless to `LV_USE_GROUP`*/ enum { - LV_KEY_UP = 17, /*0x11*/ - LV_KEY_DOWN = 18, /*0x12*/ - LV_KEY_RIGHT = 19, /*0x13*/ - LV_KEY_LEFT = 20, /*0x14*/ - LV_KEY_ESC = 27, /*0x1B*/ - LV_KEY_DEL = 127, /*0x7F*/ - LV_KEY_BACKSPACE = 8, /*0x08*/ - LV_KEY_ENTER = 10, /*0x0A, '\n'*/ - LV_KEY_NEXT = 9, /*0x09, '\t'*/ - LV_KEY_PREV=11, /*0x0B, '*/ - LV_KEY_HOME = 2, /*0x02, STX*/ - LV_KEY_END = 3, /*0x03, ETX*/ + LV_KEY_UP = 17, /*0x11*/ + LV_KEY_DOWN = 18, /*0x12*/ + LV_KEY_RIGHT = 19, /*0x13*/ + LV_KEY_LEFT = 20, /*0x14*/ + LV_KEY_ESC = 27, /*0x1B*/ + LV_KEY_DEL = 127, /*0x7F*/ + LV_KEY_BACKSPACE = 8, /*0x08*/ + LV_KEY_ENTER = 10, /*0x0A, '\n'*/ + LV_KEY_NEXT = 9, /*0x09, '\t'*/ + LV_KEY_PREV = 11, /*0x0B, '*/ + LV_KEY_HOME = 2, /*0x02, STX*/ + LV_KEY_END = 3, /*0x03, ETX*/ }; typedef uint8_t lv_key_t; @@ -57,10 +57,10 @@ typedef struct _lv_group_t lv_ll_t obj_ll; /*Linked list to store the objects in the group */ lv_obj_t ** obj_focus; /*The object in focus*/ - lv_group_style_mod_cb_t style_mod_cb; /*A function to modifies the style of the focused object*/ + lv_group_style_mod_cb_t style_mod_cb; /*A function to modifies the style of the focused object*/ lv_group_style_mod_cb_t style_mod_edit_cb; /*A function which modifies the style of the edited object*/ - lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ - lv_style_t style_tmp; /*Stores the modified style of the focused object */ + lv_group_focus_cb_t focus_cb; /*A function to call when a new object is focused (optional)*/ + lv_style_t style_tmp; /*Stores the modified style of the focused object */ #if LV_USE_USER_DATA lv_group_user_data_t user_data; #endif @@ -71,8 +71,8 @@ typedef struct _lv_group_t focused */ uint8_t refocus_policy : 1; /*1: Focus prev if focused on deletion. 0: Focus next if focused on deletion.*/ - uint8_t wrap : 1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end - of list.*/ + uint8_t wrap : 1; /*1: Focus next/prev can wrap at end of list. 0: Focus next/prev stops at end + of list.*/ } lv_group_t; enum { LV_GROUP_REFOCUS_POLICY_NEXT = 0, LV_GROUP_REFOCUS_POLICY_PREV = 1 }; @@ -118,7 +118,7 @@ void lv_group_remove_obj(lv_obj_t * obj); * @param group pointer to a group */ void lv_group_remove_all_objs(lv_group_t * group); - + /** * Focus on an object (defocus the current) * @param obj pointer to an object to focus on diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 6dc7b789159f..398de855bd73 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -42,7 +42,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev); static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj); static void indev_drag(lv_indev_proc_t * state); static void indev_drag_throw(lv_indev_proc_t * proc); -static bool indev_reset_check(lv_indev_proc_t *proc); +static bool indev_reset_check(lv_indev_proc_t * proc); /********************** * STATIC VARIABLES @@ -117,7 +117,7 @@ void lv_indev_read_task(lv_task_t * task) } while(more_to_read); /*End of indev processing, so no act indev*/ - indev_act = NULL; + indev_act = NULL; indev_obj_act = NULL; LV_LOG_TRACE("indev read task finished"); @@ -196,8 +196,7 @@ void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj) indev->cursor = cur_obj; lv_obj_set_parent(indev->cursor, lv_disp_get_layer_sys(indev->driver.disp)); - lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, - indev->proc.types.pointer.act_point.y); + lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act_point.y); } #if LV_USE_GROUP @@ -265,8 +264,7 @@ uint32_t lv_indev_get_key(const lv_indev_t * indev) bool lv_indev_is_dragging(const lv_indev_t * indev) { if(indev == NULL) return false; - if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) - return false; + if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) return false; return indev->proc.types.pointer.drag_in_prog == 0 ? false : true; } @@ -339,8 +337,8 @@ lv_obj_t * lv_indev_get_obj_act(void) static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data) { /*Move the cursor if set and moved*/ - if(i->cursor != NULL && (i->proc.types.pointer.last_point.x != data->point.x || - i->proc.types.pointer.last_point.y != data->point.y)) { + if(i->cursor != NULL && + (i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data->point.y)) { lv_obj_set_pos(i->cursor, data->point.x, data->point.y); } @@ -415,15 +413,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Move the focus on NEXT*/ else if(data->key == LV_KEY_NEXT) { - lv_group_set_editing(g, - false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); if(indev_reset_check(&i->proc)) return; } /*Move the focus on PREV*/ else if(data->key == LV_KEY_PREV) { - lv_group_set_editing(g, - false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); if(indev_reset_check(&i->proc)) return; } @@ -435,8 +431,7 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) /*Pressing*/ else if(data->state == LV_INDEV_STATE_PR && prev_state == LV_INDEV_STATE_PR) { /*Long press time has elapsed?*/ - if(i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { + if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { i->proc.long_pr_sent = 1; if(data->key == LV_KEY_ENTER) { i->proc.longpr_rep_timestamp = lv_tick_get(); @@ -461,15 +456,13 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) } /*Move the focus on NEXT again*/ else if(data->key == LV_KEY_NEXT) { - lv_group_set_editing( - g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_next(g); if(indev_reset_check(&i->proc)) return; } /*Move the focus on PREV again*/ else if(data->key == LV_KEY_PREV) { - lv_group_set_editing( - g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ + lv_group_set_editing(g, false); /*Editing is not used by KEYPAD is be sure it is disabled*/ lv_group_focus_prev(g); if(indev_reset_check(&i->proc)) return; } @@ -530,7 +523,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) /* Save the last keys before anything else. * They need to be already saved if the the function returns for any reason*/ - lv_indev_state_t last_state = i->proc.types.keypad.last_state; + lv_indev_state_t last_state = i->proc.types.keypad.last_state; i->proc.types.keypad.last_state = data->state; i->proc.types.keypad.last_key = data->key; @@ -581,10 +574,8 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Pressing*/ - else if(data->state == LV_INDEV_STATE_PR && - last_state == LV_INDEV_STATE_PR) { - if(i->proc.long_pr_sent == 0 && - lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { + else if(data->state == LV_INDEV_STATE_PR && last_state == LV_INDEV_STATE_PR) { + if(i->proc.long_pr_sent == 0 && lv_tick_elaps(i->proc.pr_timestamp) > i->driver.long_press_time) { bool editable = false; indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); @@ -592,9 +583,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) if(editable) { /*Don't leave edit mode if there is only one object (nowhere to navigate)*/ if(lv_ll_is_empty(&g->obj_ll) == false) { - lv_group_set_editing(g, lv_group_get_editing(g) - ? false - : true); /*Toggle edit mode on long press*/ + lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ } } /*If not editable then just send a long press signal*/ @@ -608,8 +597,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) } } /*Release happened*/ - else if(data->state == LV_INDEV_STATE_REL && - last_state == LV_INDEV_STATE_PR) { + else if(data->state == LV_INDEV_STATE_REL && last_state == LV_INDEV_STATE_PR) { bool editable = false; indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_GET_EDITABLE, &editable); @@ -676,8 +664,7 @@ static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data) /*Still the same point is pressed*/ if(i->proc.types.pointer.last_point.x == i->proc.types.pointer.act_point.x && - i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && - data->state == LV_INDEV_STATE_PR) { + i->proc.types.pointer.last_point.y == i->proc.types.pointer.act_point.y && data->state == LV_INDEV_STATE_PR) { indev_proc_press(&i->proc); } else { /*If a new point comes always make a release*/ @@ -735,7 +722,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(indev_reset_check(proc)) return; } - proc->types.pointer.act_obj = indev_obj_act; /*Save the pressed object*/ + proc->types.pointer.act_obj = indev_obj_act; /*Save the pressed object*/ proc->types.pointer.last_obj = indev_obj_act; if(indev_obj_act != NULL) { @@ -890,7 +877,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(indev_reset_check(proc)) return; - /*Handle click focus*/ + /*Handle click focus*/ #if LV_USE_GROUP lv_group_t * g = lv_obj_get_group(indev_obj_act); @@ -971,7 +958,7 @@ static void indev_proc_reset_query_handler(lv_indev_t * indev) indev->proc.types.pointer.drag_throw_vect.x = 0; indev->proc.types.pointer.drag_throw_vect.y = 0; indev->proc.reset_query = 0; - indev_obj_act = NULL; + indev_obj_act = NULL; } } /** @@ -994,13 +981,13 @@ static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj) if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) { #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL - lv_area_t ext_area; - ext_area.x1 = obj->coords.x1 - obj->ext_click_pad.x1; - ext_area.x2 = obj->coords.x2 + obj->ext_click_pad.x2; - ext_area.y1 = obj->coords.y1 - obj->ext_click_pad.y1; - ext_area.y2 = obj->coords.y2 + obj->ext_click_pad.y2; + lv_area_t ext_area; + ext_area.x1 = obj->coords.x1 - obj->ext_click_pad.x1; + ext_area.x2 = obj->coords.x2 + obj->ext_click_pad.x2; + ext_area.y1 = obj->coords.y1 - obj->ext_click_pad.y1; + ext_area.y2 = obj->coords.y2 + obj->ext_click_pad.y2; - if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) { + if(lv_area_is_point_on(&ext_area, &proc->types.pointer.act_point)) { #else if(lv_area_is_point_on(&obj->coords, &proc->types.pointer.act_point)) { #endif @@ -1073,8 +1060,8 @@ static void indev_drag(lv_indev_proc_t * state) /*Set new position if the vector is not zero*/ if(state->types.pointer.vect.x != 0 || state->types.pointer.vect.y != 0) { - uint16_t inv_buf_size = lv_disp_get_inv_buf_size( - indev_act->driver.disp); /*Get the number of currently invalidated areas*/ + uint16_t inv_buf_size = + lv_disp_get_inv_buf_size(indev_act->driver.disp); /*Get the number of currently invalidated areas*/ lv_coord_t prev_x = drag_obj->coords.x1; lv_coord_t prev_y = drag_obj->coords.y1; @@ -1090,8 +1077,7 @@ static void indev_drag(lv_indev_proc_t * state) act_x += state->types.pointer.drag_sum.x; act_y += state->types.pointer.drag_sum.y; } - lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, - act_y + state->types.pointer.vect.y); + lv_obj_set_pos(drag_obj, act_x + state->types.pointer.vect.x, act_y + state->types.pointer.vect.y); } else if(allowed_dirs & LV_DRAG_DIR_HOR) { if(drag_just_started) { act_x += state->types.pointer.drag_sum.x; @@ -1124,8 +1110,7 @@ static void indev_drag(lv_indev_proc_t * state) lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj)); if(act_par_w == prev_par_w && act_par_h == prev_par_h) { uint16_t new_inv_buf_size = lv_disp_get_inv_buf_size(indev_act->driver.disp); - lv_disp_pop_from_inv_buf(indev_act->driver.disp, - new_inv_buf_size - inv_buf_size); + lv_disp_pop_from_inv_buf(indev_act->driver.disp, new_inv_buf_size - inv_buf_size); } } } @@ -1218,7 +1203,7 @@ static void indev_drag_throw(lv_indev_proc_t * proc) * @param proc pointer to an input device 'proc' * return true if indev query should be immediately truncated. */ -static bool indev_reset_check(lv_indev_proc_t *proc) +static bool indev_reset_check(lv_indev_proc_t * proc) { if(proc->reset_query) { indev_obj_act = NULL; diff --git a/src/lv_core/lv_indev.h b/src/lv_core/lv_indev.h index b1527ea0e859..69ab5a4108b4 100644 --- a/src/lv_core/lv_indev.h +++ b/src/lv_core/lv_indev.h @@ -146,7 +146,7 @@ lv_task_t * lv_indev_get_read_task(lv_disp_t * indev); * NULL if no object is currently being handled or if groups aren't used. * @return pointer to currently active object */ -lv_obj_t * lv_indev_get_obj_act( void ); +lv_obj_t * lv_indev_get_obj_act(void); /********************** * MACROS diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 2c03375cacc7..bdd6f631384c 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -39,7 +39,7 @@ typedef struct _lv_event_temp_data lv_obj_t * obj; bool deleted; struct _lv_event_temp_data * prev; -}lv_event_temp_data_t; +} lv_event_temp_data_t; /********************** * STATIC PROTOTYPES @@ -134,8 +134,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) LV_LOG_TRACE("Screen create started"); lv_disp_t * disp = lv_disp_get_default(); if(!disp) { - LV_LOG_WARN( - "lv_obj_create: not display created to so far. No place to assign the new screen"); + LV_LOG_WARN("lv_obj_create: not display created to so far. No place to assign the new screen"); return NULL; } @@ -147,11 +146,11 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_ll_init(&(new_obj->child_ll), sizeof(lv_obj_t)); /*Set coordinates to full screen size*/ - new_obj->coords.x1 = 0; - new_obj->coords.y1 = 0; - new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1; - new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; - new_obj->ext_draw_pad = 0; + new_obj->coords.x1 = 0; + new_obj->coords.y1 = 0; + new_obj->coords.x2 = lv_disp_get_hor_res(NULL) - 1; + new_obj->coords.y2 = lv_disp_get_ver_res(NULL) - 1; + new_obj->ext_draw_pad = 0; #if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); @@ -220,11 +219,11 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_ll_init(&(new_obj->child_ll), sizeof(lv_obj_t)); /*Set coordinates left top corner of parent*/ - new_obj->coords.x1 = parent->coords.x1; - new_obj->coords.y1 = parent->coords.y1; - new_obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH; - new_obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT; - new_obj->ext_draw_pad = 0; + new_obj->coords.x1 = parent->coords.x1; + new_obj->coords.y1 = parent->coords.y1; + new_obj->coords.x2 = parent->coords.x1 + LV_OBJ_DEF_WIDTH; + new_obj->coords.y2 = parent->coords.y1 + LV_OBJ_DEF_HEIGHT; + new_obj->ext_draw_pad = 0; #if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); @@ -256,7 +255,6 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy) lv_obj_set_design_cb(new_obj, lv_obj_design); new_obj->event_cb = NULL; - #if LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL memset(&new_obj->ext_click_pad, 0, sizeof(new_obj->ext_click_pad)); #endif @@ -381,7 +379,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) if(group) lv_group_remove_obj(obj); #endif - /*Remove the animations from this object*/ + /*Remove the animations from this object*/ #if LV_USE_ANIMATION lv_anim_del(obj, NULL); #endif @@ -426,7 +424,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj) } #if LV_USE_GROUP - if(indev->group == group && obj == lv_indev_get_obj_act() ) { + if(indev->group == group && obj == lv_indev_get_obj_act()) { lv_indev_reset(indev); } #endif @@ -494,9 +492,8 @@ void lv_obj_invalidate(const lv_obj_t * obj) /*Check through all parents*/ while(par != NULL) { union_ok = lv_area_intersect(&area_trunc, &area_trunc, &par->coords); - if(union_ok == false) break; /*If no common parts with parent break;*/ - if(lv_obj_get_hidden(par)) - return; /*If the parent is hidden then the child is hidden and won't be drawn*/ + if(union_ok == false) break; /*If no common parts with parent break;*/ + if(lv_obj_get_hidden(par)) return; /*If the parent is hidden then the child is hidden and won't be drawn*/ par = lv_obj_get_parent(par); } @@ -608,8 +605,8 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) /*Convert x and y to absolute coordinates*/ lv_obj_t * par = obj->par; - x = x + par->coords.x1; - y = y + par->coords.y1; + x = x + par->coords.x1; + y = y + par->coords.y1; /*Calculate and set the movement*/ lv_point_t diff; @@ -743,8 +740,7 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h) * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, - lv_coord_t y_mod) +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod) { lv_coord_t new_x = lv_obj_get_x(obj); lv_coord_t new_y = lv_obj_get_y(obj); @@ -889,8 +885,7 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, - lv_coord_t y_mod) +void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod) { lv_coord_t new_x = lv_obj_get_x(obj); lv_coord_t new_y = lv_obj_get_y(obj); @@ -1038,11 +1033,9 @@ void lv_obj_realign(lv_obj_t * obj) { #if LV_USE_OBJ_REALIGN if(obj->realign.origo_align) - lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, - obj->realign.yofs); + lv_obj_align_origo(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs); else - lv_obj_align(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, - obj->realign.yofs); + lv_obj_align(obj, obj->realign.base, obj->realign.align, obj->realign.xofs, obj->realign.yofs); #else (void)obj; LV_LOG_WARN("lv_obj_realaign: no effect because LV_USE_OBJ_REALIGN = 0"); @@ -1075,7 +1068,7 @@ void lv_obj_set_auto_realign(lv_obj_t * obj, bool en) */ void lv_obj_set_ext_click_area(lv_obj_t * obj, uint8_t w, uint8_t h) { - obj->ext_click_pad_hor= w; + obj->ext_click_pad_hor = w; obj->ext_click_pad_ver = h; } #endif @@ -1101,11 +1094,11 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right obj->ext_click_pad_hor = LV_MATH_MAX(left, right); obj->ext_click_pad_ver = LV_MATH_MAX(top, bottom); #else - (void) obj; /*Unused*/ - (void) left; /*Unused*/ - (void) right; /*Unused*/ - (void) top; /*Unused*/ - (void) bottom; /*Unused*/ + (void)obj; /*Unused*/ + (void)left; /*Unused*/ + (void)right; /*Unused*/ + (void)top; /*Unused*/ + (void)bottom; /*Unused*/ #endif } @@ -1174,13 +1167,11 @@ void lv_obj_report_style_mod(lv_style_t * style) */ void lv_obj_set_hidden(lv_obj_t * obj, bool en) { - if(!obj->hidden) - lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ + if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ obj->hidden = en == false ? 0 : 1; - if(!obj->hidden) - lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ + if(!obj->hidden) lv_obj_invalidate(obj); /*Invalidate when not hidden (hidden objects are ignored) */ lv_obj_t * par = lv_obj_get_parent(obj); par->signal_cb(par, LV_SIGNAL_CHILD_CHG, obj); @@ -1341,9 +1332,9 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data) { lv_event_temp_data_t event_temp_data; - event_temp_data.obj = obj; + event_temp_data.obj = obj; event_temp_data.deleted = false; - event_temp_data.prev = NULL; + event_temp_data.prev = NULL; if(event_temp_data_head == NULL) { event_temp_data_head = &event_temp_data; @@ -1571,12 +1562,14 @@ uint16_t lv_obj_count_children(const lv_obj_t * obj) * @param obj pointer to an object * @return children number of 'obj' */ -uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj){ +uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj) +{ lv_obj_t * i; uint16_t cnt = 0; - LV_LL_READ(obj->child_ll, i) { - cnt++; // Count the child + LV_LL_READ(obj->child_ll, i) + { + cnt++; // Count the child cnt += lv_obj_count_children_recursive(i); // recursively count children's children } @@ -1696,7 +1689,7 @@ lv_coord_t lv_obj_get_ext_click_pad_left(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.x1; #else - (void) obj; /*Unused*/ + (void)obj; /*Unused*/ return 0; #endif } @@ -1713,7 +1706,7 @@ lv_coord_t lv_obj_get_ext_click_pad_right(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.x2; #else - (void) obj; /*Unused*/ + (void)obj; /*Unused*/ return 0; #endif } @@ -1730,7 +1723,7 @@ lv_coord_t lv_obj_get_ext_click_pad_top(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.y1; #else - (void) obj; /*Unused*/ + (void)obj; /*Unused*/ return 0; #endif } @@ -1747,7 +1740,7 @@ lv_coord_t lv_obj_get_ext_click_pad_bottom(const lv_obj_t * obj) #elif LV_USE_EXT_CLICK_AREA == LV_EXT_CLICK_AREA_FULL return obj->ext_click_pad.y2; #else - (void) obj; /*Unused*/ + (void)obj; /*Unused*/ return 0; #endif } @@ -2031,7 +2024,7 @@ lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj) * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj) +lv_obj_user_data_t * lv_obj_get_user_data_ptr(lv_obj_t * obj) { return &obj->user_data; } @@ -2240,7 +2233,6 @@ static void delete_children(lv_obj_t * obj) if(group) lv_group_remove_obj(obj); #endif - while(i != NULL) { /*Get the next object before delete this*/ i_next = lv_ll_get_next(&(obj->child_ll), i); @@ -2274,7 +2266,7 @@ static void delete_children(lv_obj_t * obj) indev->proc.types.pointer.last_pressed = NULL; } #if LV_USE_GROUP - if(indev->group == group && obj == lv_indev_get_obj_act() ) { + if(indev->group == group && obj == lv_indev_get_obj_act()) { lv_indev_reset(indev); } #endif diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 56b395e8f0b3..add883d4b53a 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -45,9 +45,9 @@ extern "C" { #define LV_MAX_ANCESTOR_NUM 8 -#define LV_EXT_CLICK_AREA_OFF 0 -#define LV_EXT_CLICK_AREA_TINY 1 -#define LV_EXT_CLICK_AREA_FULL 2 +#define LV_EXT_CLICK_AREA_OFF 0 +#define LV_EXT_CLICK_AREA_TINY 1 +#define LV_EXT_CLICK_AREA_FULL 2 /********************** * TYPEDEFS @@ -62,15 +62,14 @@ enum { }; typedef uint8_t lv_design_mode_t; -typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, - lv_design_mode_t mode); +typedef bool (*lv_design_cb_t)(struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode); enum { - LV_EVENT_PRESSED, /*The object has been pressed*/ - LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ - LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ - LV_EVENT_SHORT_CLICKED, /*Released before long press time. Not called if dragged.*/ - LV_EVENT_LONG_PRESSED, /*Pressing for `LV_INDEV_LONG_PRESS_TIME` time. Not called if dragged.*/ + LV_EVENT_PRESSED, /*The object has been pressed*/ + LV_EVENT_PRESSING, /*The object is being pressed (called continuously while pressing)*/ + LV_EVENT_PRESS_LOST, /*Still pressing but slid from the objects*/ + LV_EVENT_SHORT_CLICKED, /*Released before long press time. Not called if dragged.*/ + LV_EVENT_LONG_PRESSED, /*Pressing for `LV_INDEV_LONG_PRESS_TIME` time. Not called if dragged.*/ LV_EVENT_LONG_PRESSED_REPEAT, /*Called after `LV_INDEV_LONG_PRESS_TIME` in every `LV_INDEV_LONG_PRESS_REP_TIME` ms. Not called if dragged.*/ LV_EVENT_CLICKED, /*Called on release if not dragged (regardless to long press)*/ @@ -182,7 +181,7 @@ typedef struct _lv_obj_t lv_signal_cb_t signal_cb; /*Object type specific signal function*/ lv_design_cb_t design_cb; /*Object type specific design function*/ - void * ext_attr; /*Object type specific extended data*/ + void * ext_attr; /*Object type specific extended data*/ const lv_style_t * style_p; /*Pointer to the object's style*/ #if LV_USE_GROUP != 0 @@ -199,22 +198,22 @@ typedef struct _lv_obj_t #endif /*Attributes and states*/ - uint8_t click :1; /*1: Can be pressed by an input device*/ - uint8_t drag :1; /*1: Enable the dragging*/ - uint8_t drag_throw :1; /*1: Enable throwing with drag*/ - uint8_t drag_parent :1; /*1: Parent will be dragged instead*/ - uint8_t hidden :1; /*1: Object is hidden*/ - uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/ - uint8_t opa_scale_en :1; /*1: opa_scale is set*/ - uint8_t parent_event :1; /*1: Send the object's events to the parent too. */ + uint8_t click : 1; /*1: Can be pressed by an input device*/ + uint8_t drag : 1; /*1: Enable the dragging*/ + uint8_t drag_throw : 1; /*1: Enable throwing with drag*/ + uint8_t drag_parent : 1; /*1: Parent will be dragged instead*/ + uint8_t hidden : 1; /*1: Object is hidden*/ + uint8_t top : 1; /*1: If the object or its children is clicked it goes to the foreground*/ + uint8_t opa_scale_en : 1; /*1: opa_scale is set*/ + uint8_t parent_event : 1; /*1: Send the object's events to the parent too. */ lv_drag_dir_t drag_dir : 2; /* Which directions the object can be dragged in */ - uint8_t reserved :6; /*Reserved for future use*/ - uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from - `lv_protect_t`*/ - lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ + uint8_t reserved : 6; /*Reserved for future use*/ + uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from + `lv_protect_t`*/ + lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/ lv_coord_t ext_draw_pad; /*EXTtend the size in every direction for drawing. */ - + #if LV_USE_OBJ_REALIGN lv_reailgn_t realign; #endif @@ -370,8 +369,7 @@ void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h); * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, - lv_coord_t y_mod); +void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); /** * Align an object to an other object. @@ -381,8 +379,7 @@ void lv_obj_align(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_co * @param x_mod x coordinate shift after alignment * @param y_mod y coordinate shift after alignment */ -void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, - lv_coord_t y_mod); +void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod); /** * Realign the object based on the last `lv_obj_align` parameters. @@ -904,7 +901,7 @@ lv_obj_user_data_t lv_obj_get_user_data(lv_obj_t * obj); * @param obj pointer to an object * @return pointer to the user data */ -lv_obj_user_data_t *lv_obj_get_user_data_ptr(lv_obj_t * obj); +lv_obj_user_data_t * lv_obj_get_user_data_ptr(lv_obj_t * obj); /** * Set the object's user data. The data will be copied. diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index ba5bf83a1efb..2eb432133e6c 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -24,7 +24,7 @@ * DEFINES *********************/ /* Draw translucent random colored areas on the invalidated (redrawn) areas*/ -#define MASK_AREA_DEBUG 0 +#define MASK_AREA_DEBUG 0 /********************** * TYPEDEFS @@ -154,7 +154,6 @@ void lv_refr_set_disp_refreshing(lv_disp_t * disp) disp_refr = disp; } - /** * Called periodically to handle the refreshing * @param task pointer to the task itself @@ -184,7 +183,8 @@ void lv_disp_refr_task(lv_task_t * task) /* With true double buffering the flushing should be only the address change of the * current frame buffer. Wait until the address change is ready and copy the changed * content to the other frame buffer (new active VDB) to keep the buffers synchronized*/ - while(vdb->flushing); + while(vdb->flushing) + ; uint8_t * buf_act = (uint8_t *)vdb->buf_act; uint8_t * buf_ina = (uint8_t *)vdb->buf_act == vdb->buf1 ? vdb->buf2 : vdb->buf1; @@ -195,10 +195,8 @@ void lv_disp_refr_task(lv_task_t * task) if(disp_refr->inv_area_joined[a] == 0) { lv_coord_t y; uint32_t start_offs = - (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * - sizeof(lv_color_t); - uint32_t line_length = - lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); + (hres * disp_refr->inv_areas[a].y1 + disp_refr->inv_areas[a].x1) * sizeof(lv_color_t); + uint32_t line_length = lv_area_get_width(&disp_refr->inv_areas[a]) * sizeof(lv_color_t); for(y = disp_refr->inv_areas[a].y1; y <= disp_refr->inv_areas[a].y2; y++) { memcpy(buf_act + start_offs, buf_ina + start_offs, line_length); @@ -245,18 +243,15 @@ static void lv_refr_join_area(void) } /*Check if the areas are on each other*/ - if(lv_area_is_on(&disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]) == - false) { + if(lv_area_is_on(&disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]) == false) { continue; } - lv_area_join(&joined_area, &disp_refr->inv_areas[join_in], - &disp_refr->inv_areas[join_from]); + lv_area_join(&joined_area, &disp_refr->inv_areas[join_in], &disp_refr->inv_areas[join_from]); /*Join two area only if the joined area size is smaller*/ - if(lv_area_get_size(&joined_area) < - (lv_area_get_size(&disp_refr->inv_areas[join_in]) + - lv_area_get_size(&disp_refr->inv_areas[join_from]))) { + if(lv_area_get_size(&joined_area) < (lv_area_get_size(&disp_refr->inv_areas[join_in]) + + lv_area_get_size(&disp_refr->inv_areas[join_from]))) { lv_area_copy(&disp_refr->inv_areas[join_in], &joined_area); /*Mark 'join_form' is joined into 'join_in'*/ @@ -305,11 +300,10 @@ static void lv_refr_area(const lv_area_t * area_p) else { lv_disp_buf_t * vdb = lv_disp_get_buf(disp_refr); /*Calculate the max row num*/ - lv_coord_t w = lv_area_get_width(area_p); - lv_coord_t h = lv_area_get_height(area_p); - lv_coord_t y2 = area_p->y2 >= lv_disp_get_ver_res(disp_refr) - ? y2 = lv_disp_get_ver_res(disp_refr) - 1 - : area_p->y2; + lv_coord_t w = lv_area_get_width(area_p); + lv_coord_t h = lv_area_get_height(area_p); + lv_coord_t y2 = + area_p->y2 >= lv_disp_get_ver_res(disp_refr) ? y2 = lv_disp_get_ver_res(disp_refr) - 1 : area_p->y2; int32_t max_row = (uint32_t)vdb->size / w; @@ -383,7 +377,8 @@ static void lv_refr_area_part(const lv_area_t * area_p) /*In non double buffered mode, before rendering the next part wait until the previous image is * flushed*/ if(lv_disp_is_double_buf(disp_refr) == false) { - while(vdb->flushing); + while(vdb->flushing) + ; } lv_obj_t * top_p; @@ -436,8 +431,7 @@ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) /*If no better children check this object*/ if(found_p == NULL) { const lv_style_t * style = lv_obj_get_style(obj); - if(style->body.opa == LV_OPA_COVER && - obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && + if(style->body.opa == LV_OPA_COVER && obj->design_cb(obj, area_p, LV_DESIGN_COVER_CHK) != false && lv_obj_get_opa_scale(obj) == LV_OPA_COVER) { found_p = obj; } @@ -489,7 +483,6 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) /*Go a level deeper*/ par = lv_obj_get_parent(par); } - } /** diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 2dfbd7039147..1600321441e7 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -17,11 +17,11 @@ #define STYLE_MIX_SHIFT 8 /*log2(STYLE_MIX_MAX)*/ #define VAL_PROP(v1, v2, r) v1 + (((v2 - v1) * r) >> STYLE_MIX_SHIFT) -#define STYLE_ATTR_MIX(attr, r) \ - if(start->attr != end->attr) { \ - res->attr = VAL_PROP(start->attr, end->attr, r); \ - } else { \ - res->attr = start->attr; \ +#define STYLE_ATTR_MIX(attr, r) \ + if(start->attr != end->attr) { \ + res->attr = VAL_PROP(start->attr, end->attr, r); \ + } else { \ + res->attr = start->attr; \ } /********************** @@ -229,8 +229,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src) * @param res store the result style here * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style */ -void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, - uint16_t ratio) +void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio) { STYLE_ATTR_MIX(body.opa, ratio); STYLE_ATTR_MIX(body.radius, ratio); @@ -277,34 +276,32 @@ void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * #if LV_USE_ANIMATION - void lv_style_anim_init(lv_anim_t * a) { lv_anim_init(a); - a->start = 0; - a->end = STYLE_MIX_MAX; - a->exec_cb = (lv_anim_exec_cb_t)style_animator; - a->path_cb = lv_anim_path_linear; - a->ready_cb = style_animation_common_end_cb; - - lv_style_anim_dsc_t * dsc; - dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t)); - lv_mem_assert(dsc); - if(dsc == NULL) return; - dsc->ready_cb = NULL; - dsc->style_anim = NULL; - lv_style_copy(&dsc->style_start, &lv_style_plain); - lv_style_copy(&dsc->style_end, &lv_style_plain); - - a->var = (void *)dsc; - + a->start = 0; + a->end = STYLE_MIX_MAX; + a->exec_cb = (lv_anim_exec_cb_t)style_animator; + a->path_cb = lv_anim_path_linear; + a->ready_cb = style_animation_common_end_cb; + + lv_style_anim_dsc_t * dsc; + dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t)); + lv_mem_assert(dsc); + if(dsc == NULL) return; + dsc->ready_cb = NULL; + dsc->style_anim = NULL; + lv_style_copy(&dsc->style_start, &lv_style_plain); + lv_style_copy(&dsc->style_end, &lv_style_plain); + + a->var = (void *)dsc; } void lv_style_anim_set_styles(lv_anim_t * a, lv_style_t * to_anim, const lv_style_t * start, const lv_style_t * end) { lv_style_anim_dsc_t * dsc = a->var; - dsc->style_anim = to_anim; + dsc->style_anim = to_anim; memcpy(&dsc->style_start, start, sizeof(lv_style_t)); memcpy(&dsc->style_end, end, sizeof(lv_style_t)); memcpy(dsc->style_anim, start, sizeof(lv_style_t)); @@ -338,7 +335,7 @@ static void style_animator(lv_style_anim_dsc_t * dsc, lv_anim_value_t val) static void style_animation_common_end_cb(lv_anim_t * a) { - (void) a; /*Unused*/ + (void)a; /*Unused*/ lv_style_anim_dsc_t * dsc = a->var; /*To avoid casting*/ if(dsc->ready_cb) dsc->ready_cb(a); diff --git a/src/lv_core/lv_style.h b/src/lv_core/lv_style.h index ddbc1829b361..a1f52dca4b71 100644 --- a/src/lv_core/lv_style.h +++ b/src/lv_core/lv_style.h @@ -143,8 +143,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src); * @param res store the result style here * @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style */ -void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, - uint16_t ratio); +void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio); #if LV_USE_ANIMATION @@ -187,7 +186,7 @@ static inline void lv_style_anim_set_time(lv_anim_t * a, uint16_t duration, uint static inline void lv_style_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_cb) { lv_style_anim_dsc_t * dsc = a->var; - dsc->ready_cb = ready_cb; + dsc->ready_cb = ready_cb; } /** diff --git a/src/lv_draw/lv_draw.c b/src/lv_draw/lv_draw.c index c7bcad1e2326..2cca6c717d5a 100644 --- a/src/lv_draw/lv_draw.c +++ b/src/lv_draw/lv_draw.c @@ -99,8 +99,8 @@ lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa) * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, - lv_color_t color, lv_opa_t opa) +void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, + lv_opa_t opa) { bool aa_inv = false; if(length < 0) { @@ -125,8 +125,8 @@ void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, - lv_color_t color, lv_opa_t opa) +void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, + lv_opa_t opa) { bool aa_inv = false; if(length < 0) { diff --git a/src/lv_draw/lv_draw.h b/src/lv_draw/lv_draw.h index c6088a3e2c7f..447fe7505f2f 100644 --- a/src/lv_draw/lv_draw.h +++ b/src/lv_draw/lv_draw.h @@ -31,7 +31,6 @@ extern "C" { * TYPEDEFS **********************/ - /********************** * GLOBAL PROTOTYPES **********************/ @@ -56,8 +55,8 @@ lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa) * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, - lv_color_t color, lv_opa_t opa); +void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, + lv_opa_t opa); /** * Add a horizontal anti-aliasing segment (pixels with decreasing opacity) @@ -68,8 +67,8 @@ void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_ * @param color color of pixels * @param opa maximum opacity */ -void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, - lv_color_t color, lv_opa_t opa); +void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, + lv_opa_t opa); #endif /********************** diff --git a/src/lv_draw/lv_draw_arc.c b/src/lv_draw/lv_draw_arc.c index e33c22b09865..a5fd3f873f34 100644 --- a/src/lv_draw/lv_draw_arc.c +++ b/src/lv_draw/lv_draw_arc.c @@ -21,10 +21,10 @@ * STATIC PROTOTYPES **********************/ static uint16_t fast_atan2(int x, int y); -static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, - lv_color_t color, lv_opa_t opa); -static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, - lv_color_t color, lv_opa_t opa); +static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, + lv_opa_t opa); +static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, + lv_opa_t opa); static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end); static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end); @@ -52,8 +52,7 @@ static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end); * @param opa_scale scale down all opacities by the factor */ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, - uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, - lv_opa_t opa_scale) + uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale) { lv_coord_t thickness = style->line.width; if(thickness > radius) thickness = radius; @@ -66,9 +65,7 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons lv_coord_t x_end[4]; lv_color_t color = style->line.color; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; bool (*deg_test)(uint16_t, uint16_t, uint16_t); if(start_angle <= end_angle) @@ -150,14 +147,12 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons if(x_start[2] != LV_COORD_MIN) { if(x_end[2] == LV_COORD_MIN) x_end[2] = xi - 1; - hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), - color, opa); + hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), color, opa); } if(x_start[3] != LV_COORD_MIN) { if(x_end[3] == LV_COORD_MIN) x_end[3] = xi - 1; - hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), - color, opa); + hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), color, opa); } #if LV_ANTIALIAS @@ -245,8 +240,7 @@ static uint16_t fast_atan2(int x, int y) /********************** * STATIC FUNCTIONS **********************/ -static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, - lv_color_t color, lv_opa_t opa) +static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa) { lv_area_t area; lv_area_set(&area, x, y, x, y + len); @@ -254,8 +248,7 @@ static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coor lv_draw_fill(&area, mask, color, opa); } -static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, - lv_color_t color, lv_opa_t opa) +static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa) { lv_area_t area; lv_area_set(&area, x, y, x + len, y); diff --git a/src/lv_draw/lv_draw_arc.h b/src/lv_draw/lv_draw_arc.h index faff91a615e5..98d0f0bc37f3 100644 --- a/src/lv_draw/lv_draw_arc.h +++ b/src/lv_draw/lv_draw_arc.h @@ -39,8 +39,7 @@ extern "C" { * @param opa_scale scale down all opacities by the factor */ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask, - uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, - lv_opa_t opa_scale); + uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale); /********************** * MACROS diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index dc6badc241ba..10b7731600a9 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -42,12 +42,11 @@ * STATIC PROTOTYPES **********************/ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, - lv_color_t color, lv_opa_t opa); +static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, + lv_opa_t opa); #if LV_COLOR_SCREEN_TRANSP -static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, - lv_color_t fg_color, lv_opa_t fg_opa); +static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa); #endif /********************** @@ -70,8 +69,7 @@ static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, * @param color pixel color * @param opa opacity of the area (0..255) */ -void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, - lv_opa_t opa) +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) { if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; @@ -113,8 +111,7 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, - lv_opa_t opa) +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa) { if(opa < LV_OPA_MIN) return; if(opa > LV_OPA_MAX) opa = LV_OPA_COVER; @@ -147,8 +144,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ vdb_buf_tmp += vdb_width * vdb_rel_a.y1; #if LV_USE_GPU - static LV_ATTRIBUTE_MEM_ALIGN lv_color_t - color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ + static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES_MAX]; /*Used by 'lv_disp_mem_blend'*/ static lv_coord_t last_width = -1; lv_coord_t w = lv_area_get_width(&vdb_rel_a); @@ -163,8 +159,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ disp->driver.mem_fill_cb(&disp->driver, vdb->buf_act, &vdb->area, &vdb_rel_a, color); } /*Use hw blend if present and the area is not too small*/ - else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && - disp->driver.mem_blend_cb) { + else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && disp->driver.mem_blend_cb) { /*Fill a one line sized buffer with a color and blend this later*/ if(color_array_tmp[0].full != color.full || last_width != w) { uint16_t i; @@ -226,16 +221,14 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, - uint32_t letter, lv_color_t color, lv_opa_t opa) +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter, + lv_color_t color, lv_opa_t opa) { /*clang-format off*/ - const uint8_t bpp1_opa_table[2] = { 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + const uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, - 136, 153, 170, 187, - 204, 221, 238, 255}; + 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}; /*clang-format on*/ if(opa < LV_OPA_MIN) return; @@ -260,19 +253,19 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv switch(g.bpp) { case 1: bpp_opa_table = bpp1_opa_table; - bitmask_init = 0x80; + bitmask_init = 0x80; break; case 2: bpp_opa_table = bpp2_opa_table; - bitmask_init = 0xC0; + bitmask_init = 0xC0; break; case 4: bpp_opa_table = bpp4_opa_table; - bitmask_init = 0xF0; + bitmask_init = 0xF0; break; case 8: bpp_opa_table = NULL; - bitmask_init = 0xFF; + bitmask_init = 0xFF; break; /*No opa table, pixel value will be used directly*/ default: return; /*Invalid bpp. Can't render the letter*/ } @@ -282,9 +275,7 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv if(map_p == NULL) return; /*If the letter is completely out of mask don't draw it */ - if(pos_x + g.box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g.box_h < mask_p->y1 || - pos_y > mask_p->y2) - return; + if(pos_x + g.box_w < mask_p->x1 || pos_x > mask_p->x2 || pos_y + g.box_h < mask_p->y1 || pos_y > mask_p->y2) return; lv_disp_t * disp = lv_refr_get_disp_refreshing(); lv_disp_buf_t * vdb = lv_disp_get_buf(disp); @@ -311,15 +302,15 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv /*Move on the map too*/ uint32_t bit_ofs = (row_start * width_bit) + (col_start * g.bpp); - map_p += bit_ofs>> 3; + map_p += bit_ofs >> 3; uint8_t letter_px; lv_opa_t px_opa; uint16_t col_bit; - col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */ + col_bit = bit_ofs & 0x7; /* "& 0x7" equals to "% 8" just faster */ for(row = row_start; row < row_end; row++) { - bitmask = bitmask_init >> col_bit; + bitmask = bitmask_init >> col_bit; for(col = col_start; col < col_end; col++) { letter_px = (*map_p & bitmask) >> (8 - col_bit - g.bpp); if(letter_px != 0) { @@ -327,21 +318,20 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv px_opa = g.bpp == 8 ? letter_px : bpp_opa_table[letter_px]; } else { px_opa = g.bpp == 8 ? (uint16_t)((uint16_t)letter_px * opa) >> 8 - : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; + : (uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8; } if(disp->driver.set_px_cb) { disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, - (col + pos_x) - vdb->area.x1, - (row + pos_y) - vdb->area.y1, color, px_opa); - } else if (vdb_buf_tmp->full != color.full) { - if(px_opa > LV_OPA_MAX) *vdb_buf_tmp = color; + (col + pos_x) - vdb->area.x1, (row + pos_y) - vdb->area.y1, color, px_opa); + } else if(vdb_buf_tmp->full != color.full) { + if(px_opa > LV_OPA_MAX) + *vdb_buf_tmp = color; else if(px_opa > LV_OPA_MIN) { #if LV_COLOR_SCREEN_TRANSP == 0 *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa); #else - *vdb_buf_tmp = - color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); + *vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa); #endif } } @@ -377,9 +367,8 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, - lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, - lv_opa_t recolor_opa) +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa, + bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa) { if(opa < LV_OPA_MIN) return; @@ -426,8 +415,7 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint lv_coord_t map_useful_w = lv_area_get_width(&masked_a); /*The simplest case just copy the pixels into the VDB*/ - if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && - recolor_opa == LV_OPA_TRANSP) { + if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) { /*Use the custom VDB write function is exists*/ if(disp->driver.set_px_cb) { @@ -435,8 +423,8 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint for(row = masked_a.y1; row <= masked_a.y2; row++) { for(col = 0; col < map_useful_w; col++) { lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]); - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, - col + masked_a.x1, row, px_color, opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, row, + px_color, opa); } map_p += map_width * px_size_byte; /*Next row on the map*/ } @@ -502,22 +490,21 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint } /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, - col + masked_a.x1, row, recolored_px, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, + row, recolored_px, opa_result); } /*Normal native VDB write*/ else { if(opa_result == LV_OPA_COVER) vdb_buf_tmp[col].full = recolored_px.full; else - vdb_buf_tmp[col] = - lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result); + vdb_buf_tmp[col] = lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result); } } else { /*Handle custom VDB write is present*/ if(disp->driver.set_px_cb) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, - col + masked_a.x1, row, px_color, opa_result); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)vdb->buf_act, vdb_width, col + masked_a.x1, + row, px_color, opa_result); } /*Normal native VDB write*/ else { @@ -527,8 +514,8 @@ void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint #if LV_COLOR_SCREEN_TRANSP == 0 vdb_buf_tmp[col] = lv_color_mix(px_color, vdb_buf_tmp[col], opa_result); #else - vdb_buf_tmp[col] = color_mix_2_alpha( - vdb_buf_tmp[col], vdb_buf_tmp[col].alpha, px_color, opa_result); + vdb_buf_tmp[col] = + color_mix_2_alpha(vdb_buf_tmp[col], vdb_buf_tmp[col].alpha, px_color, opa_result); #endif } } @@ -572,8 +559,8 @@ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t len * @param color fill color * @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover) */ -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, - lv_color_t color, lv_opa_t opa) +static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, + lv_opa_t opa) { /*Set all row in vdb to the given color*/ lv_coord_t row; @@ -584,8 +571,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ if(disp->driver.set_px_cb) { for(col = fill_area->x1; col <= fill_area->x2; col++) { for(row = fill_area->y1; row <= fill_area->y2; row++) { - disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, - opa); + disp->driver.set_px_cb(&disp->driver, (uint8_t *)mem, mem_width, col, row, color, opa); } } } else { @@ -647,8 +633,7 @@ static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_ * @param fg_opa alpha of the foreground color * @return the mixed color. the alpha channel (color.alpha) contains the result alpha */ -static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, - lv_color_t fg_color, lv_opa_t fg_opa) +static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa) { /* Pick the foreground if it's fully opaque or the Background is fully transparent*/ if(fg_opa == LV_OPA_COVER || bg_opa <= LV_OPA_MIN) { diff --git a/src/lv_draw/lv_draw_basic.h b/src/lv_draw/lv_draw_basic.h index 87482237d115..266b0c6cc2f5 100644 --- a/src/lv_draw/lv_draw_basic.h +++ b/src/lv_draw/lv_draw_basic.h @@ -35,8 +35,7 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ -void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, - lv_opa_t opa); +void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); /** * Fill an area in the Virtual Display Buffer * @param cords_p coordinates of the area to fill @@ -44,8 +43,7 @@ void lv_draw_px(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t * @param color fill color * @param opa opacity of the area (0..255) */ -void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, - lv_opa_t opa); +void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa); /** * Draw a letter in the Virtual Display Buffer @@ -56,8 +54,8 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ * @param color color of letter * @param opa opacity of letter (0..255) */ -void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, - uint32_t letter, lv_color_t color, lv_opa_t opa); +void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv_font_t * font_p, uint32_t letter, + lv_color_t color, lv_opa_t opa); /** * Draw a color map to the display (image) @@ -70,9 +68,8 @@ void lv_draw_letter(const lv_point_t * pos_p, const lv_area_t * mask_p, const lv * @param recolor mix the pixels with this color * @param recolor_opa the intense of recoloring */ -void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, - lv_opa_t opa, bool chroma_key, bool alpha_byte, lv_color_t recolor, - lv_opa_t recolor_opa); +void lv_draw_map(const lv_area_t * cords_p, const lv_area_t * mask_p, const uint8_t * map_p, lv_opa_t opa, + bool chroma_key, bool alpha_byte, lv_color_t recolor, lv_opa_t recolor_opa); /********************** * MACROS diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 466037da06d4..dceec352e3de 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -43,14 +43,13 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas * @param style style of the image * @param opa_scale scale down all opacities by the factor */ -void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, - const lv_style_t * style, lv_opa_t opa_scale) +void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style, + lv_opa_t opa_scale) { if(src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, - NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); return; } @@ -60,8 +59,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * if(res == LV_RES_INV) { LV_LOG_WARN("Image draw error"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, - NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); return; } } @@ -76,8 +74,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * * used. * @return color of the point */ -lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, - const lv_style_t * style) +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, const lv_style_t * style) { lv_color_t p_color = LV_COLOR_BLACK; if(x >= dsc->header.w) { @@ -98,8 +95,7 @@ lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t uint8_t * buf_u8 = (uint8_t *)dsc->data; - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED || + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA) { uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; uint32_t px = dsc->header.w * y * px_size + x * px_size; @@ -217,8 +213,7 @@ void lv_img_buf_set_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_ { uint8_t * buf_u8 = (uint8_t *)dsc->data; - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { uint8_t px_size = lv_img_color_format_get_px_size(dsc->header.cf) >> 3; uint32_t px = dsc->header.w * y * px_size + x * px_size; memcpy(&buf_u8[px], &c, px_size); @@ -447,9 +442,8 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas successfully.*/ } - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->image.opa - : (uint16_t)((uint16_t)style->image.opa * opa_scale) >> 8; + lv_opa_t opa = + opa_scale == LV_OPA_COVER ? style->image.opa : (uint16_t)((uint16_t)style->image.opa * opa_scale) >> 8; lv_img_header_t header; lv_res_t header_res; @@ -473,8 +467,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas /* The decoder open could open the image and gave the entire uncompressed image. * Just draw it!*/ if(img_data) { - lv_draw_map(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, - style->image.intense); + lv_draw_map(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); } /* The whole uncompressed image is not available. Try to read it line-by-line*/ else { @@ -483,8 +476,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas #if LV_COMPILER_VLA_SUPPORTED uint8_t buf[(lv_area_get_width(&mask_com) * ((LV_COLOR_DEPTH >> 3) + 1))]; #else - uint8_t buf[LV_HOR_RES_MAX * - ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ + uint8_t buf[LV_HOR_RES_MAX * ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/ #endif lv_area_t line; lv_area_copy(&line, &mask_com); @@ -500,8 +492,7 @@ static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mas LV_LOG_WARN("Image draw can't read the line"); return LV_RES_INV; } - lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, - style->image.intense); + lv_draw_map(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense); line.y1++; line.y2++; y++; diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 5db721af7ea5..721a507e004e 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -36,8 +36,8 @@ extern "C" { * @param style style of the image * @param opa_scale scale down all opacities by the factor */ -void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, - const lv_style_t * style, lv_opa_t opa_scale); +void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * src, const lv_style_t * style, + lv_opa_t opa_scale); /** * Get the type of an image source @@ -59,8 +59,7 @@ lv_img_src_t lv_img_src_get_type(const void * src); * used. * @return color of the point */ -lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, - const lv_style_t * style); +lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, const lv_style_t * style); /** * Get the alpha value of an image's pixel * @param dsc pointer to an image descriptor diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 947dd703550a..f44679acd8a3 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -53,9 +53,8 @@ static uint8_t hex_char_to_num(char hex); * @param sel_start start index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) * @param sel_end end index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) */ -void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale, const char * txt, lv_txt_flag_t flag, lv_point_t * offset, - uint16_t sel_start, uint16_t sel_end) +void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end) { const lv_font_t * font = style->text.font; lv_coord_t w; @@ -65,8 +64,8 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } else { /*If EXAPND is enabled then not limit the text's width to the object's width*/ lv_point_t p; - lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, - LV_COORD_MAX, flag); + lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, + flag); w = p.x; } @@ -101,22 +100,18 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st /*Align to middle*/ if(flag & LV_TXT_FLAG_CENTER) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, - style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag); pos.x += (lv_area_get_width(coords) - line_width) / 2; } /*Align to the right*/ else if(flag & LV_TXT_FLAG_RIGHT) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, - style->text.letter_space, flag); + line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag); pos.x += lv_area_get_width(coords) - line_width; } - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->text.opa - : (uint16_t)((uint16_t)style->text.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->text.opa : (uint16_t)((uint16_t)style->text.opa * opa_scale) >> 8; cmd_state_t cmd_state = CMD_STATE_WAIT; uint32_t i; @@ -138,7 +133,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st uint32_t letter; uint32_t letter_next; while(i < line_end) { - letter = lv_txt_encoded_next(txt, &i); + letter = lv_txt_encoded_next(txt, &i); letter_next = lv_txt_encoded_next(&txt[i], NULL); /*Handle the re-color command*/ @@ -148,8 +143,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st par_start = i; cmd_state = CMD_STATE_PAR; continue; - } else if(cmd_state == - CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */ + } else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */ cmd_state = CMD_STATE_WAIT; } else if(cmd_state == CMD_STATE_IN) { /*Command end */ cmd_state = CMD_STATE_WAIT; @@ -210,16 +204,16 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st pos.x = coords->x1; /*Align to middle*/ if(flag & LV_TXT_FLAG_CENTER) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, - style->text.letter_space, flag); + line_width = + lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag); pos.x += (lv_area_get_width(coords) - line_width) / 2; } /*Align to the right*/ else if(flag & LV_TXT_FLAG_RIGHT) { - line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, - style->text.letter_space, flag); + line_width = + lv_txt_get_width(&txt[line_start], line_end - line_start, font, style->text.letter_space, flag); pos.x += lv_area_get_width(coords) - line_width; } diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index 11b0c8235b3f..31086f59ad28 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -39,9 +39,8 @@ extern "C" { * @param sel_start start index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) * @param sel_end end index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) */ -void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale, const char * txt, lv_txt_flag_t flag, lv_point_t * offset, - uint16_t sel_start, uint16_t sel_end); +void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end); /********************** * MACROS diff --git a/src/lv_draw/lv_draw_line.c b/src/lv_draw/lv_draw_line.c index c965d981d7c3..2f367d546dc7 100644 --- a/src/lv_draw/lv_draw_line.c +++ b/src/lv_draw/lv_draw_line.c @@ -51,8 +51,8 @@ static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_opa_t opa_scale); static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); -static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); +static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2); static bool line_next(line_draw_t * line); static bool line_next_y(line_draw_t * line); @@ -150,15 +150,13 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv p_tmp.x = main_line.p2.x; p_tmp.y = main_line.p2.y - 1; line_init(&main_line, &p1, &p_tmp); - main_line.sy = LV_MATH_ABS( - main_line.sy); /*The sign can change if the line becomes horizontal*/ + main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ } else if(main_line.p1.y > main_line.p2.y) { dir_ori = false; p_tmp.x = main_line.p2.x; p_tmp.y = main_line.p2.y + 1; line_init(&main_line, &p1, &p_tmp); - main_line.sy = -LV_MATH_ABS( - main_line.sy); /*The sign can change if the line becomes horizontal*/ + main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/ } } else { if(main_line.p1.x < main_line.p2.x) { @@ -166,15 +164,13 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv p_tmp.x = main_line.p2.x - 1; p_tmp.y = main_line.p2.y; line_init(&main_line, &p1, &p_tmp); - main_line.sx = LV_MATH_ABS( - main_line.sx); /*The sign can change if the line becomes vertical*/ + main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ } else if(main_line.p1.x > main_line.p2.x) { dir_ori = false; p_tmp.x = main_line.p2.x + 1; p_tmp.y = main_line.p2.y; line_init(&main_line, &p1, &p_tmp); - main_line.sx = -LV_MATH_ABS( - main_line.sx); /*The sign can change if the line becomes vertical*/ + main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/ } } } @@ -187,15 +183,12 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv * STATIC FUNCTIONS **********************/ -static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) +static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { lv_coord_t width = style->line.width - 1; lv_coord_t width_half = width >> 1; lv_coord_t width_1 = width & 0x1; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->line.opa - : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; lv_area_t act_area; act_area.x1 = main_line->p1.x; @@ -211,15 +204,12 @@ static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_draw_fill(&draw_area, mask, style->line.color, opa); } -static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) +static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { lv_coord_t width = style->line.width - 1; lv_coord_t width_half = width >> 1; lv_coord_t width_1 = width & 0x1; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->line.opa - : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; lv_area_t act_area; act_area.x1 = main_line->p1.x - width_half; @@ -235,13 +225,11 @@ static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_draw_fill(&draw_area, mask, style->line.color, opa); } -static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->line.opa - : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t)style->line.opa * opa_scale) >> 8; #if LV_ANTIALIAS bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); #endif @@ -298,8 +286,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /*Finish the pattern line if it's length equal to the desired width (Use Pythagoras * theorem)*/ - uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + - pattern_line.p_act.y * pattern_line.p_act.y; + uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + pattern_line.p_act.y * pattern_line.p_act.y; if(sqr >= width_sqr) { width = i; #if LV_ANTIALIAS @@ -345,22 +332,20 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y; if(main_line->sy < 0) { lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, - main_line->p1.y + pattern[aa_last_corner].y + seg_w + - 1, - seg_w, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1, seg_w, mask, + style->line.color, opa); lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, - main_line->p2.y + pattern[aa_last_corner].y + seg_w + - 1, - -seg_w, mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1, -seg_w, mask, + style->line.color, opa); } else { lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, - main_line->p1.y + pattern[aa_last_corner].y, seg_w, - mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y, seg_w, mask, + style->line.color, opa); lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, - main_line->p2.y + pattern[aa_last_corner].y, -seg_w, - mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y, -seg_w, mask, + style->line.color, opa); } aa_last_corner = i; } @@ -368,23 +353,21 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(pattern[i - 1].y != pattern[i].y) { lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x; if(main_line->sx < 0) { - lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + - 1, - main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); - - lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + - 1, - main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); + lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1, + main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w, mask, + style->line.color, opa); + + lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1, + main_line->p2.y + pattern[aa_last_corner].y + 1, -seg_w, mask, + style->line.color, opa); } else { lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, - main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w, mask, + style->line.color, opa); lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, - main_line->p2.y + pattern[aa_last_corner].y + 1, - -seg_w, mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y + 1, -seg_w, mask, + style->line.color, opa); } aa_last_corner = i; } @@ -401,41 +384,41 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_coord_t seg_w = pattern[width_safe - 1].y - pattern[aa_last_corner].y; if(main_line->sy < 0) { lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, - main_line->p1.y + pattern[aa_last_corner].y + seg_w, - seg_w + main_line->sy, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y + seg_w, seg_w + main_line->sy, mask, + style->line.color, opa); lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, - main_line->p2.y + pattern[aa_last_corner].y + seg_w, - -(seg_w + main_line->sy), mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y + seg_w, -(seg_w + main_line->sy), mask, + style->line.color, opa); } else { lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, - main_line->p1.y + pattern[aa_last_corner].y, - seg_w + main_line->sy, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y, seg_w + main_line->sy, mask, + style->line.color, opa); lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, - main_line->p2.y + pattern[aa_last_corner].y, - -(seg_w + main_line->sy), mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y, -(seg_w + main_line->sy), mask, + style->line.color, opa); } } else { lv_coord_t seg_w = pattern[width_safe - 1].x - pattern[aa_last_corner].x; if(main_line->sx < 0) { lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w, - main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w + main_line->sx, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w + main_line->sx, mask, + style->line.color, opa); lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w, - main_line->p2.y + pattern[aa_last_corner].y + 1, - -(seg_w + main_line->sx), mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y + 1, -(seg_w + main_line->sx), mask, + style->line.color, opa); } else { lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, - main_line->p1.y + pattern[aa_last_corner].y - 1, - seg_w + main_line->sx, mask, style->line.color, opa); + main_line->p1.y + pattern[aa_last_corner].y - 1, seg_w + main_line->sx, mask, + style->line.color, opa); lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, - main_line->p2.y + pattern[aa_last_corner].y + 1, - -(seg_w + main_line->sx), mask, style->line.color, opa); + main_line->p2.y + pattern[aa_last_corner].y + 1, -(seg_w + main_line->sx), mask, + style->line.color, opa); } } } @@ -486,8 +469,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ * When stepping in y one pixel remains empty on every corner (don't do this on the * first segment ) */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, - opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); } } @@ -496,8 +478,8 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, -(main_line->p_act.x - prev_p.x), mask, style->line.color, opa); lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, - prev_p.y + pattern[width_safe - 1].y + aa_shift2, - main_line->p_act.x - prev_p.x, mask, style->line.color, opa); + prev_p.y + pattern[width_safe - 1].y + aa_shift2, main_line->p_act.x - prev_p.x, + mask, style->line.color, opa); } #endif @@ -517,8 +499,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /* Fill the gaps * When stepping in y one pixel remains empty on every corner */ if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) { - lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, - opa); + lv_draw_px(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa); } } @@ -526,8 +507,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(aa) { lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1, -(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa); - lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, - prev_p.y + pattern[width_safe - 1].y + aa_shift2, + lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2, main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa); } #endif @@ -548,8 +528,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ * When stepping in x one pixel remains empty on every corner (don't do this on the * first segment ) */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, - opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); } } @@ -558,8 +537,8 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, -(main_line->p_act.y - prev_p.y), mask, style->line.color, opa); lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, - prev_p.y + pattern[width_safe - 1].y, - main_line->p_act.y - prev_p.y, mask, style->line.color, opa); + prev_p.y + pattern[width_safe - 1].y, main_line->p_act.y - prev_p.y, mask, + style->line.color, opa); } #endif @@ -581,8 +560,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ /* Fill the gaps * When stepping in x one pixel remains empty on every corner */ if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) { - lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, - opa); + lv_draw_px(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa); } } @@ -590,8 +568,7 @@ static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_ if(aa) { lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y, -(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa); - lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, - prev_p.y + pattern[width_safe - 1].y, + lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y, main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa); } #endif diff --git a/src/lv_draw/lv_draw_rect.c b/src/lv_draw/lv_draw_rect.c index 02d4b804bd8f..56291a547e78 100644 --- a/src/lv_draw/lv_draw_rect.c +++ b/src/lv_draw/lv_draw_rect.c @@ -31,24 +31,24 @@ /********************** * STATIC PROTOTYPES **********************/ -static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); +static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); #if LV_USE_SHADOW -static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale); -static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, const lv_opa_t * map); +static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale); +static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + const lv_opa_t * map); #endif static uint16_t lv_draw_cont_radius_corr(uint16_t r, lv_coord_t w, lv_coord_t h); @@ -76,8 +76,7 @@ static lv_opa_t antialias_get_opa_circ(lv_coord_t seg, lv_coord_t px_id, lv_opa_ * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) +void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { if(lv_area_get_height(coords) < 1 || lv_area_get_width(coords) < 1) return; @@ -120,8 +119,8 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty * @param rects_p pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { uint16_t radius = style->body.radius; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); @@ -131,9 +130,7 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma uint8_t mix; lv_coord_t height = lv_area_get_height(coords); lv_coord_t width = lv_area_get_width(coords); - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; radius = lv_draw_cont_radius_corr(radius, width, height); @@ -194,8 +191,8 @@ static void lv_draw_rect_main_mid(const lv_area_t * coords, const lv_area_t * ma * @param rects_p pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { uint16_t radius = style->body.radius; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); @@ -203,9 +200,7 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_color_t mcolor = style->body.main_color; lv_color_t gcolor = style->body.grad_color; lv_color_t act_color; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; uint8_t mix; lv_coord_t height = lv_area_get_height(coords); lv_coord_t width = lv_area_get_width(coords); @@ -287,31 +282,27 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); } - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, - rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, aa_color_hor_bottom, - aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, - lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, aa_color_hor_bottom, - aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, - lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, aa_color_hor_top, - aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, - rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, aa_color_hor_top, - aa_opa); - - mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, + aa_color_hor_bottom, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, + aa_color_hor_bottom, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, + aa_color_hor_top, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, + aa_color_hor_top, aa_opa); + + mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, - rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, - lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + aa_color_ver, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + aa_color_ver, aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, - lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, - rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + aa_color_ver, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + aa_color_ver, aa_opa); } out_x_last = cir.x; @@ -377,21 +368,17 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * } /*Save the current coordinates*/ - lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), - lb_origo.y + LV_CIRC_OCT4_Y(cir), rb_origo.x + LV_CIRC_OCT1_X(cir), - rb_origo.y + LV_CIRC_OCT1_Y(cir)); + lv_area_set(&mid_bot_area, lb_origo.x + LV_CIRC_OCT4_X(cir), lb_origo.y + LV_CIRC_OCT4_Y(cir), + rb_origo.x + LV_CIRC_OCT1_X(cir), rb_origo.y + LV_CIRC_OCT1_Y(cir)); - lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), - lb_origo.y + LV_CIRC_OCT3_Y(cir), rb_origo.x + LV_CIRC_OCT2_X(cir), - rb_origo.y + LV_CIRC_OCT2_Y(cir)); + lv_area_set(&edge_bot_area, lb_origo.x + LV_CIRC_OCT3_X(cir), lb_origo.y + LV_CIRC_OCT3_Y(cir), + rb_origo.x + LV_CIRC_OCT2_X(cir), rb_origo.y + LV_CIRC_OCT2_Y(cir)); - lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), - lt_origo.y + LV_CIRC_OCT5_Y(cir), rt_origo.x + LV_CIRC_OCT8_X(cir), - rt_origo.y + LV_CIRC_OCT8_Y(cir)); + lv_area_set(&mid_top_area, lt_origo.x + LV_CIRC_OCT5_X(cir), lt_origo.y + LV_CIRC_OCT5_Y(cir), + rt_origo.x + LV_CIRC_OCT8_X(cir), rt_origo.y + LV_CIRC_OCT8_Y(cir)); - lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), - lt_origo.y + LV_CIRC_OCT6_Y(cir), rt_origo.x + LV_CIRC_OCT7_X(cir), - rt_origo.y + LV_CIRC_OCT7_Y(cir)); + lv_area_set(&edge_top_area, lt_origo.x + LV_CIRC_OCT6_X(cir), lt_origo.y + LV_CIRC_OCT6_Y(cir), + rt_origo.x + LV_CIRC_OCT7_X(cir), rt_origo.y + LV_CIRC_OCT7_Y(cir)); lv_circ_next(&cir, &cir_tmp); } @@ -462,27 +449,27 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * lv_coord_t i; for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, - mask, aa_color_hor_top, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, - mask, aa_color_hor_top, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, - mask, aa_color_hor_bottom, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, - mask, aa_color_hor_bottom, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, + aa_color_hor_top, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, + aa_color_hor_top, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, + aa_color_hor_bottom, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, + aa_color_hor_bottom, aa_opa); mix = (uint32_t)((uint32_t)(radius - out_y_seg_start + i) * 255) / height; aa_color_ver = lv_color_mix(mcolor, gcolor, mix); - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, - mask, aa_color_ver, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, - mask, aa_color_ver, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, aa_color_ver, + aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, aa_color_ver, + aa_opa); aa_color_ver = lv_color_mix(gcolor, mcolor, mix); - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, - mask, aa_color_ver, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, - mask, aa_color_ver, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, aa_color_ver, + aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, aa_color_ver, + aa_opa); } /*In some cases the last pixel is not drawn*/ @@ -495,14 +482,14 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * aa_color_hor_bottom = lv_color_mix(mcolor, gcolor, mix); lv_opa_t aa_opa = opa >> 1; - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, - aa_color_hor_bottom, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, - aa_color_hor_bottom, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, - aa_color_hor_top, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, - aa_color_hor_top, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, aa_color_hor_bottom, + aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, aa_color_hor_bottom, + aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, aa_color_hor_top, + aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, aa_color_hor_top, + aa_opa); } } #endif @@ -515,18 +502,17 @@ static void lv_draw_rect_main_corner(const lv_area_t * coords, const lv_area_t * * @param rstyle pointer to a rectangle style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { uint16_t radius = style->body.radius; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t width = lv_area_get_width(coords); lv_coord_t height = lv_area_get_height(coords); - lv_coord_t bwidth = style->body.border.width; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.border.opa - : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; + lv_coord_t bwidth = style->body.border.width; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa + : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; lv_border_part_t part = style->body.border.part; lv_color_t color = style->body.border.color; lv_area_t work_area; @@ -716,17 +702,16 @@ static void lv_draw_rect_border_straight(const lv_area_t * coords, const lv_area * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { uint16_t radius = style->body.radius; bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); - lv_coord_t bwidth = style->body.border.width; + lv_coord_t bwidth = style->body.border.width; lv_color_t color = style->body.border.color; lv_border_part_t part = style->body.border.part; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.border.opa - : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.border.opa + : (uint16_t)((uint16_t)style->body.border.opa * opa_scale) >> 8; /*0 px border width drawn as 1 px, so decrement the bwidth*/ bwidth--; @@ -819,38 +804,30 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, - rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, - rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, - lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, - lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, - lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, - lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, - rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, - rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } @@ -880,53 +857,45 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, - rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, - lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, - lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, - rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } /*Be sure the pixels on the middle are not drawn twice*/ if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, - rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, - style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, - lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, - style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, - lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, - style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, + mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, - rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, - style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, + mask, style->body.border.color, aa_opa); } } } @@ -1025,39 +994,31 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = opa - lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, - rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, - aa_opa); - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, - rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, style->body.border.color, - aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) + 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, - lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, style->body.border.color, - aa_opa); - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, - lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, - aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) - 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, - lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, - aa_opa); - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, - lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, style->body.border.color, - aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) - 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, - rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, style->body.border.color, - aa_opa); - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, - rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, - aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) + 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } } @@ -1069,23 +1030,23 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t lv_opa_t aa_opa = opa >> 1; if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), - mask, style->body.border.color, aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p), rb_origo.y + LV_CIRC_OCT2_Y(aa_p), mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), - mask, style->body.border.color, aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p), lb_origo.y + LV_CIRC_OCT4_Y(aa_p), mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), - mask, style->body.border.color, aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p), lt_origo.y + LV_CIRC_OCT6_Y(aa_p), mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), - mask, style->body.border.color, aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p), rt_origo.y + LV_CIRC_OCT8_Y(aa_p), mask, + style->body.border.color, aa_opa); } } @@ -1098,51 +1059,43 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t for(i = 0; i < seg_size; i++) { lv_opa_t aa_opa = lv_draw_aa_get_opa(seg_size, i, opa); if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, - rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, style->body.border.color, - aa_opa); + lv_draw_px(rb_origo.x + LV_CIRC_OCT1_X(aa_p) - 1, rb_origo.y + LV_CIRC_OCT1_Y(aa_p) + i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, - lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, style->body.border.color, - aa_opa); + lv_draw_px(lb_origo.x + LV_CIRC_OCT3_X(aa_p) - i, lb_origo.y + LV_CIRC_OCT3_Y(aa_p) - 1, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, - lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, style->body.border.color, - aa_opa); + lv_draw_px(lt_origo.x + LV_CIRC_OCT5_X(aa_p) + 1, lt_origo.y + LV_CIRC_OCT5_Y(aa_p) - i, mask, + style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, - rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, style->body.border.color, - aa_opa); + lv_draw_px(rt_origo.x + LV_CIRC_OCT7_X(aa_p) + i, rt_origo.y + LV_CIRC_OCT7_Y(aa_p) + 1, mask, + style->body.border.color, aa_opa); } if(LV_CIRC_OCT1_X(aa_p) - 1 != LV_CIRC_OCT2_X(aa_p) + i) { if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, - rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, + lv_draw_px(rb_origo.x + LV_CIRC_OCT2_X(aa_p) + i, rb_origo.y + LV_CIRC_OCT2_Y(aa_p) - 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_BOTTOM) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, - lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, + lv_draw_px(lb_origo.x + LV_CIRC_OCT4_X(aa_p) + 1, lb_origo.y + LV_CIRC_OCT4_Y(aa_p) + i, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_LEFT)) { - lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, - lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, + lv_draw_px(lt_origo.x + LV_CIRC_OCT6_X(aa_p) - i, lt_origo.y + LV_CIRC_OCT6_Y(aa_p) + 1, mask, style->body.border.color, aa_opa); } if((part & LV_BORDER_TOP) && (part & LV_BORDER_RIGHT)) { - lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, - rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, + lv_draw_px(rt_origo.x + LV_CIRC_OCT8_X(aa_p) - 1, rt_origo.y + LV_CIRC_OCT8_Y(aa_p) - i, mask, style->body.border.color, aa_opa); } } @@ -1159,8 +1112,8 @@ static void lv_draw_rect_border_corner(const lv_area_t * coords, const lv_area_t * @param mask pointer to a mask area (from the design functions) * @param opa_scale scale down all opacities by the factor */ -static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { /* If mask is in the middle of cords do not draw shadow*/ lv_coord_t radius = style->body.radius; @@ -1188,8 +1141,8 @@ static void lv_draw_shadow(const lv_area_t * coords, const lv_area_t * mask, } } -static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { /* KNOWN ISSUE @@ -1246,13 +1199,10 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask #endif #endif /*1D Blur horizontally*/ - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; for(line = 0; line < filter_width; line++) { - line_1d_blur[line] = - (uint32_t)((uint32_t)(filter_width - line) * (opa * 2) << SHADOW_OPA_EXTRA_PRECISION) / - (filter_width * filter_width); + line_1d_blur[line] = (uint32_t)((uint32_t)(filter_width - line) * (opa * 2) << SHADOW_OPA_EXTRA_PRECISION) / + (filter_width * filter_width); } uint16_t col; @@ -1288,9 +1238,8 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask bool line_ready; for(line = 0; line <= radius + swidth; line++) { /*Check all rows and make the 1D blur to 2D*/ line_ready = false; - for(col = 0; col <= radius + swidth; - col++) { /*Check all pixels in a 1D blur line (from the origo to last shadow pixel - (radius + swidth))*/ + for(col = 0; col <= radius + swidth; col++) { /*Check all pixels in a 1D blur line (from the origo to last + shadow pixel (radius + swidth))*/ /*Sum the opacities from the lines above and below this 'row'*/ int16_t line_rel; @@ -1300,8 +1249,7 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask int16_t col_rel; if(line + line_rel < 0) { /*Below the radius, here is the blur of the edge */ col_rel = radius - curve_x[line] - col; - } else if(line + line_rel > - radius) { /*Above the radius, here won't be more 1D blur*/ + } else if(line + line_rel > radius) { /*Above the radius, here won't be more 1D blur*/ break; } else { /*Blur from the curve*/ col_rel = curve_x[line + line_rel] - curve_x[line] - col; @@ -1312,13 +1260,11 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask if(line_rel == -swidth) line_ready = true; /*If no data even on the very first line then it wont't be anything else in this line*/ - break; /*Break anyway because only smaller 'col_rel' values will come */ + break; /*Break anyway because only smaller 'col_rel' values will come */ } else if(col_rel > swidth) px_opa_sum += line_1d_blur[0]; /*Inside the not blurred area*/ else - px_opa_sum += - line_1d_blur[swidth - - col_rel]; /*On the 1D blur (+ swidth to align to the center)*/ + px_opa_sum += line_1d_blur[swidth - col_rel]; /*On the 1D blur (+ swidth to align to the center)*/ } line_2d_blur[col] = px_opa_sum >> SHADOW_OPA_EXTRA_PRECISION; @@ -1374,8 +1320,8 @@ static void lv_draw_shadow_full(const lv_area_t * coords, const lv_area_t * mask } } -static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, lv_opa_t opa_scale) +static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + lv_opa_t opa_scale) { bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; @@ -1415,9 +1361,7 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma #endif #endif - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; for(col = 0; col < swidth; col++) { line_1d_blur[col] = (uint32_t)((uint32_t)(swidth - col) * opa / 2) / (swidth); } @@ -1476,8 +1420,8 @@ static void lv_draw_shadow_bottom(const lv_area_t * coords, const lv_area_t * ma } } -static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, - const lv_style_t * style, const lv_opa_t * map) +static void lv_draw_shadow_full_straight(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, + const lv_opa_t * map) { bool aa = lv_disp_get_antialiasing(lv_refr_get_disp_refreshing()); lv_coord_t radius = style->body.radius; diff --git a/src/lv_draw/lv_draw_rect.h b/src/lv_draw/lv_draw_rect.h index 3d347eb8fd3d..852b72912696 100644 --- a/src/lv_draw/lv_draw_rect.h +++ b/src/lv_draw/lv_draw_rect.h @@ -34,8 +34,7 @@ extern "C" { * @param style pointer to a style * @param opa_scale scale down all opacities by the factor */ -void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale); +void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); /********************** * MACROS diff --git a/src/lv_draw/lv_draw_triangle.c b/src/lv_draw/lv_draw_triangle.c index 02147095bd5c..e06af2b184eb 100644 --- a/src/lv_draw/lv_draw_triangle.c +++ b/src/lv_draw/lv_draw_triangle.c @@ -43,8 +43,7 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2); * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor (0..255) */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) { /*Return is the triangle is degenerated*/ @@ -55,9 +54,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l if(points[0].x == points[1].x && points[1].x == points[2].x) return; if(points[0].y == points[1].y && points[1].y == points[2].y) return; - lv_opa_t opa = opa_scale == LV_OPA_COVER - ? style->body.opa - : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; + lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t)style->body.opa * opa_scale) >> 8; /*Is the triangle flat or tall?*/ lv_coord_t x_min = LV_MATH_MIN(LV_MATH_MIN(points[0].x, points[1].x), points[2].x); @@ -71,7 +68,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l * Some pixels are overdrawn on the common edges of the triangles * so use it only if the triangle has no opacity*/ - /* Draw from horizontal lines*/ + /* Draw from horizontal lines*/ if(x_max - x_min < y_max - y_min) { tri_draw_tall(points, mask, style, opa); } @@ -90,7 +87,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l * @param opa_scale scale down all opacities by the factor (0..255) */ void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale) + lv_opa_t opa_scale) { if(point_cnt < 3) return; if(points == NULL) return; @@ -102,8 +99,8 @@ void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_are for(i = 0; i < point_cnt - 1; i++) { tri[1].x = points[i].x; tri[1].y = points[i].y; - tri[2].x = points[i+1].x; - tri[2].y = points[i+1].y; + tri[2].x = points[i + 1].x; + tri[2].y = points[i + 1].y; lv_draw_triangle(tri, mask, style, opa_scale); } } @@ -112,31 +109,22 @@ void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_are * STATIC FUNCTIONS **********************/ - void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa) { /*Return if the points are out of the mask*/ - if(points[0].x < mask->x1 && - points[1].x < mask->x1 && - points[2].x < mask->x1) { + if(points[0].x < mask->x1 && points[1].x < mask->x1 && points[2].x < mask->x1) { return; } - if(points[0].x > mask->x2 && - points[1].x > mask->x2 && - points[2].x > mask->x2) { + if(points[0].x > mask->x2 && points[1].x > mask->x2 && points[2].x > mask->x2) { return; } - if(points[0].y < mask->y1 && - points[1].y < mask->y1 && - points[2].y < mask->y1) { + if(points[0].y < mask->y1 && points[1].y < mask->y1 && points[2].y < mask->y1) { return; } - if(points[0].y > mask->y2 && - points[1].y > mask->y2 && - points[2].y > mask->y2) { + if(points[0].y > mask->y2 && points[1].y > mask->y2 && points[2].y > mask->y2) { return; } @@ -218,7 +206,7 @@ void tri_draw_flat(const lv_point_t * points, const lv_area_t * mask, const lv_s /*Calc. the next point of edge2*/ y2_tmp = edge2.y; do { - if(edge2.x == tri[2].x && edge2.y == tri[2].y) return; + if(edge2.x == tri[2].x && edge2.y == tri[2].y) return; err_tmp2 = err2; if(err_tmp2 > -dx2) { err2 -= dy2; @@ -337,7 +325,6 @@ void tri_draw_tall(const lv_point_t * points, const lv_area_t * mask, const lv_s } } - /** * Swap two points * p1 pointer to the first point diff --git a/src/lv_draw/lv_draw_triangle.h b/src/lv_draw/lv_draw_triangle.h index e9ba0bf335cf..b6b230d970e1 100644 --- a/src/lv_draw/lv_draw_triangle.h +++ b/src/lv_draw/lv_draw_triangle.h @@ -34,8 +34,7 @@ extern "C" { * @param style style for of the triangle * @param opa_scale scale down all opacities by the factor (0..255) */ -void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale); +void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale); /** * Draw a polygon from triangles. Only convex polygons are supported @@ -46,8 +45,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l * @param opa_scale scale down all opacities by the factor (0..255) */ void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style, - lv_opa_t opa_scale); - + lv_opa_t opa_scale); /********************** * MACROS diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index c6d6db7910b3..5d539864e3b0 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -23,13 +23,13 @@ /********************** * TYPEDEFS **********************/ -typedef struct { +typedef struct +{ #if LV_USE_FILESYSTEM lv_fs_file_t * f; #endif lv_color_t * palette; -}lv_img_decoder_built_in_data_t; - +} lv_img_decoder_built_in_data_t; /********************** * STATIC PROTOTYPES @@ -37,16 +37,15 @@ typedef struct { static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header); static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); -static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, - lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, + lv_coord_t y, lv_coord_t len, uint8_t * buf); static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc); -static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, - lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); -static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf); -static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf); - +static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf); +static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf); +static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf); /********************** * STATIC VARIABLES @@ -96,7 +95,8 @@ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) lv_res_t res = LV_RES_INV; lv_img_decoder_t * d; - LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) { + LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) + { res = LV_RES_INV; if(d->info_cb) { res = d->info_cb(d, src, header); @@ -122,9 +122,9 @@ lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header) */ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style) { - dsc->style = style; - dsc->src = src; - dsc->src_type = lv_img_src_get_type(src); + dsc->style = style; + dsc->src = src; + dsc->src_type = lv_img_src_get_type(src); dsc->user_data = NULL; lv_res_t header_res; @@ -133,8 +133,9 @@ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src const uint8_t * res = NULL; lv_img_decoder_t * d; - LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) { - res = NULL; + LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d) + { + res = NULL; dsc->decoder = d; if(d->open_cb) res = d->open_cb(d, dsc); @@ -156,7 +157,7 @@ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) { lv_res_t res = LV_RES_INV; - if(dsc->decoder->read_line_cb)res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf); + if(dsc->decoder->read_line_cb) res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf); return res; } @@ -242,7 +243,7 @@ void lv_img_decoder_set_close_cb(lv_img_decoder_t * decoder, lv_img_decoder_clos static lv_res_t lv_img_decoder_built_in_info(lv_img_decoder_t * decoder, const void * src, lv_img_header_t * header) { - (void)decoder; /*Unused*/ + (void)decoder; /*Unused*/ lv_img_src_t src_type = lv_img_src_get_type(src); if(src_type == LV_IMG_SRC_VARIABLE) { @@ -308,7 +309,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, } lv_img_decoder_built_in_data_t * user_data = dsc->user_data; - user_data->f = lv_mem_alloc(sizeof(f)); + user_data->f = lv_mem_alloc(sizeof(f)); if(user_data->f == NULL) { LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); lv_mem_assert(user_data->f); @@ -324,8 +325,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_img_cf_t cf = dsc->header.cf; /*Process true color formats*/ - if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { + if(cf == LV_IMG_CF_TRUE_COLOR || cf == LV_IMG_CF_TRUE_COLOR_ALPHA || cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { if(dsc->src_type == LV_IMG_SRC_VARIABLE) { /* In case of uncompressed formats the image stored in the ROM/RAM. * So simply give its pointer*/ @@ -336,12 +336,12 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, } } /*Process indexed images. Build a palette*/ - else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || - cf == LV_IMG_CF_INDEXED_4BIT || cf == LV_IMG_CF_INDEXED_8BIT) { + else if(cf == LV_IMG_CF_INDEXED_1BIT || cf == LV_IMG_CF_INDEXED_2BIT || cf == LV_IMG_CF_INDEXED_4BIT || + cf == LV_IMG_CF_INDEXED_8BIT) { #if LV_IMG_CF_INDEXED - uint8_t px_size = lv_img_color_format_get_px_size(cf); - uint32_t palette_size = 1 << px_size; + uint8_t px_size = lv_img_color_format_get_px_size(cf); + uint32_t palette_size = 1 << px_size; /*Allocate the palette*/ if(dsc->user_data == NULL) { @@ -354,7 +354,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, } lv_img_decoder_built_in_data_t * user_data = dsc->user_data; - user_data->palette = lv_mem_alloc(palette_size * sizeof(lv_color_t)); + user_data->palette = lv_mem_alloc(palette_size * sizeof(lv_color_t)); if(user_data->palette == NULL) { LV_LOG_ERROR("img_decoder_built_in_open: out of memory"); #if LV_USE_FILESYSTEM @@ -373,8 +373,7 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, lv_fs_read(user_data->f, palette_tmp, palette_size * sizeof(lv_color_t), NULL); palette_p = palette_tmp; #else - LV_LOG_WARN( - "Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in decoder can read the palette because LV_USE_FILESYSTEM = 0"); return LV_IMG_DECODER_OPEN_FAIL; #endif } else { @@ -393,8 +392,8 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, #endif } /*Alpha indexed images. */ - else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || - cf == LV_IMG_CF_ALPHA_4BIT || cf == LV_IMG_CF_ALPHA_8BIT) { + else if(cf == LV_IMG_CF_ALPHA_1BIT || cf == LV_IMG_CF_ALPHA_2BIT || cf == LV_IMG_CF_ALPHA_4BIT || + cf == LV_IMG_CF_ALPHA_8BIT) { #if LV_IMG_CF_ALPHA return NULL; /*Nothing to process*/ #else @@ -412,34 +411,26 @@ static const uint8_t * lv_img_decoder_built_in_open(lv_img_decoder_t * decoder, } } - - -static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, - lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, + lv_coord_t y, lv_coord_t len, uint8_t * buf) { - (void)decoder; /*Unused*/ + (void)decoder; /*Unused*/ lv_res_t res = LV_RES_INV; - if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || - dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) - { + if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR || dsc->header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA || + dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) { /* For TRUE_COLOR images read line required only for files. * For variables the image data was returned in `open`*/ if(dsc->src_type == LV_IMG_SRC_FILE) { res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf); } - } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || - dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { + } else if(dsc->header.cf == LV_IMG_CF_ALPHA_1BIT || dsc->header.cf == LV_IMG_CF_ALPHA_2BIT || + dsc->header.cf == LV_IMG_CF_ALPHA_4BIT || dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) { res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf); - } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || - dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { + } else if(dsc->header.cf == LV_IMG_CF_INDEXED_1BIT || dsc->header.cf == LV_IMG_CF_INDEXED_2BIT || + dsc->header.cf == LV_IMG_CF_INDEXED_4BIT || dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) { res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf); } else { LV_LOG_WARN("Built-in image decoder read not supports the color format"); @@ -451,7 +442,7 @@ static lv_res_t lv_img_decoder_built_in_read_line(lv_img_decoder_t * decoder, l static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc) { - (void)decoder; /*Unused*/ + (void)decoder; /*Unused*/ lv_img_decoder_built_in_data_t * user_data = dsc->user_data; if(user_data) { @@ -466,9 +457,8 @@ static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_dec } } - -static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, - lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf) { #if LV_USE_FILESYSTEM lv_img_decoder_built_in_data_t * user_data = dsc->user_data; @@ -497,17 +487,15 @@ static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * d #endif } -static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf) { #if LV_IMG_CF_ALPHA - const lv_opa_t alpha1_opa_table[2] = { - 0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ - const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ - const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ - 68, 85, 102, 119, 136, 153, - 170, 187, 204, 221, 238, 255}; + const lv_opa_t alpha1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/ + const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/ + const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/ + 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255}; /*Simply fill the buffer with the color. Later only the alpha value will be modified.*/ lv_color_t bg_color = dsc->style->image.color; @@ -534,32 +522,32 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l uint32_t ofs = 0; int8_t pos = 0; switch(dsc->header.cf) { - case LV_IMG_CF_ALPHA_1BIT: - w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(dsc->header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - pos = 7 - (x & 0x7); - opa_table = alpha1_opa_table; - break; - case LV_IMG_CF_ALPHA_2BIT: - w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(dsc->header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - pos = 6 - ((x & 0x3) * 2); - opa_table = alpha2_opa_table; - break; - case LV_IMG_CF_ALPHA_4BIT: - w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(dsc->header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - pos = 4 - ((x & 0x1) * 4); - opa_table = alpha4_opa_table; - break; - case LV_IMG_CF_ALPHA_8BIT: - w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - pos = 0; - break; + case LV_IMG_CF_ALPHA_1BIT: + w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(dsc->header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + pos = 7 - (x & 0x7); + opa_table = alpha1_opa_table; + break; + case LV_IMG_CF_ALPHA_2BIT: + w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(dsc->header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + pos = 6 - ((x & 0x3) * 2); + opa_table = alpha2_opa_table; + break; + case LV_IMG_CF_ALPHA_4BIT: + w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(dsc->header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + pos = 4 - ((x & 0x1) * 4); + opa_table = alpha4_opa_table; + break; + case LV_IMG_CF_ALPHA_8BIT: + w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + pos = 0; + break; } #if LV_USE_FILESYSTEM @@ -574,14 +562,14 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l if(dsc->src_type == LV_IMG_SRC_VARIABLE) { const lv_img_dsc_t * img_dsc = dsc->src; - data_tmp = img_dsc->data + ofs; + data_tmp = img_dsc->data + ofs; } else { #if LV_USE_FILESYSTEM lv_fs_seek(user_data->f, ofs + 4); /*+4 to skip the header*/ lv_fs_read(user_data->f, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN( "Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in alpha line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -593,7 +581,7 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l val_act = (data_tmp[byte_act] & (mask << pos)) >> pos; buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] = - dsc->header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; + dsc->header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act]; pos -= px_size; if(pos < 0) { @@ -605,14 +593,13 @@ static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, l return LV_RES_OK; #else - LV_LOG_WARN( - "Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); + LV_LOG_WARN("Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h"); return LV_RES_INV; #endif } -static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, - uint8_t * buf) +static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, + lv_coord_t len, uint8_t * buf) { #if LV_IMG_CF_INDEXED @@ -623,33 +610,33 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, int8_t pos = 0; uint32_t ofs = 0; switch(dsc->header.cf) { - case LV_IMG_CF_INDEXED_1BIT: - w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ - if(dsc->header.w & 0x7) w++; - ofs += w * y + (x >> 3); /*First pixel*/ - ofs += 8; /*Skip the palette*/ - pos = 7 - (x & 0x7); - break; - case LV_IMG_CF_INDEXED_2BIT: - w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ - if(dsc->header.w & 0x3) w++; - ofs += w * y + (x >> 2); /*First pixel*/ - ofs += 16; /*Skip the palette*/ - pos = 6 - ((x & 0x3) * 2); - break; - case LV_IMG_CF_INDEXED_4BIT: - w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ - if(dsc->header.w & 0x1) w++; - ofs += w * y + (x >> 1); /*First pixel*/ - ofs += 64; /*Skip the palette*/ - pos = 4 - ((x & 0x1) * 4); - break; - case LV_IMG_CF_INDEXED_8BIT: - w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ - ofs += w * y + x; /*First pixel*/ - ofs += 1024; /*Skip the palette*/ - pos = 0; - break; + case LV_IMG_CF_INDEXED_1BIT: + w = (dsc->header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/ + if(dsc->header.w & 0x7) w++; + ofs += w * y + (x >> 3); /*First pixel*/ + ofs += 8; /*Skip the palette*/ + pos = 7 - (x & 0x7); + break; + case LV_IMG_CF_INDEXED_2BIT: + w = (dsc->header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/ + if(dsc->header.w & 0x3) w++; + ofs += w * y + (x >> 2); /*First pixel*/ + ofs += 16; /*Skip the palette*/ + pos = 6 - ((x & 0x3) * 2); + break; + case LV_IMG_CF_INDEXED_4BIT: + w = (dsc->header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/ + if(dsc->header.w & 0x1) w++; + ofs += w * y + (x >> 1); /*First pixel*/ + ofs += 64; /*Skip the palette*/ + pos = 4 - ((x & 0x1) * 4); + break; + case LV_IMG_CF_INDEXED_8BIT: + w = dsc->header.w; /*E.g. x = 7 -> w = 7 (bytes)*/ + ofs += w * y + x; /*First pixel*/ + ofs += 1024; /*Skip the palette*/ + pos = 0; + break; } lv_img_decoder_built_in_data_t * user_data = dsc->user_data; @@ -671,8 +658,7 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_fs_read(user_data->f, fs_buf, w, NULL); data_tmp = fs_buf; #else - LV_LOG_WARN( - "Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); + LV_LOG_WARN("Image built-in indexed line reader can't read file because LV_USE_FILESYSTEM = 0"); data_tmp = NULL; /*To avoid warnings*/ return LV_RES_INV; #endif @@ -695,11 +681,7 @@ static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, return LV_RES_OK; #else - LV_LOG_WARN( - "Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); + LV_LOG_WARN("Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h"); return LV_RES_INV; #endif } - - - diff --git a/src/lv_draw/lv_img_decoder.h b/src/lv_draw/lv_img_decoder.h index 8112478695bc..d6ed7399a50d 100644 --- a/src/lv_draw/lv_img_decoder.h +++ b/src/lv_draw/lv_img_decoder.h @@ -37,7 +37,6 @@ extern "C" { #define LV_IMG_PX_SIZE_ALPHA_BYTE 4 #endif - #define LV_IMG_DECODER_OPEN_FAIL ((void *)(-1)) /********************** @@ -72,14 +71,14 @@ typedef struct enum { LV_IMG_CF_UNKNOWN = 0, - LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ - LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder - function*/ + LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/ + LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder + function*/ LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs custom decoder function*/ - LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ - LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ + LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/ + LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/ LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels will be transparent*/ @@ -116,7 +115,8 @@ struct _lv_img_decoder_dsc; * @param header store the info here * @return LV_RES_OK: info written correctly; LV_RES_INV: failed */ -typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src, lv_img_header_t * header); +typedef lv_res_t (*lv_img_decoder_info_f_t)(struct _lv_img_decoder * decoder, const void * src, + lv_img_header_t * header); /** * Open an image for decoding. Prepare it as it is required to read it later @@ -149,7 +149,8 @@ typedef lv_res_t (*lv_img_decoder_read_line_f_t)(struct _lv_img_decoder * decode */ typedef void (*lv_img_decoder_close_f_t)(struct _lv_img_decoder * decoder, struct _lv_img_decoder_dsc * dsc); -typedef struct _lv_img_decoder { +typedef struct _lv_img_decoder +{ lv_img_decoder_info_f_t info_cb; lv_img_decoder_open_f_t open_cb; lv_img_decoder_read_line_f_t read_line_cb; @@ -158,10 +159,10 @@ typedef struct _lv_img_decoder { #if LV_USE_USER_DATA lv_img_decoder_user_data_t user_data; #endif -}lv_img_decoder_t; +} lv_img_decoder_t; - -typedef struct _lv_img_decoder_dsc { +typedef struct _lv_img_decoder_dsc +{ lv_img_decoder_t * decoder; const lv_style_t * style; const void * src; @@ -171,7 +172,7 @@ typedef struct _lv_img_decoder_dsc { #if LV_USE_USER_DATA void * user_data; #endif -}lv_img_decoder_dsc_t; +} lv_img_decoder_dsc_t; /********************** * GLOBAL PROTOTYPES @@ -218,7 +219,8 @@ const uint8_t * lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src * @param buf store the data here * @return LV_RES_OK: success; LV_RES_INV: an error occurred */ -lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf); +lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_t len, + uint8_t * buf); /** * Close a decoding session diff --git a/src/lv_hal/lv_hal_disp.c b/src/lv_hal/lv_hal_disp.c index 327b5c5fc337..285613d0ca71 100644 --- a/src/lv_hal/lv_hal_disp.c +++ b/src/lv_hal/lv_hal_disp.c @@ -56,11 +56,11 @@ void lv_disp_drv_init(lv_disp_drv_t * driver) { memset(driver, 0, sizeof(lv_disp_drv_t)); - driver->flush_cb = NULL; - driver->hor_res = LV_HOR_RES_MAX; - driver->ver_res = LV_VER_RES_MAX; - driver->buffer = NULL; - driver->rotated = 0; + driver->flush_cb = NULL; + driver->hor_res = LV_HOR_RES_MAX; + driver->ver_res = LV_VER_RES_MAX; + driver->buffer = NULL; + driver->rotated = 0; driver->color_chroma_key = LV_COLOR_TRANSP; #if LV_ANTIALIAS @@ -126,8 +126,8 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver) if(disp_def == NULL) disp_def = disp; lv_disp_t * disp_def_tmp = disp_def; - disp_def = disp; /*Temporarily change the default screen to create the default screens on the - new display*/ + disp_def = disp; /*Temporarily change the default screen to create the default screens on the + new display*/ disp->inv_p = 0; diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index e67a28a4fb9a..98298709dee6 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -83,8 +83,8 @@ typedef struct _disp_drv_t /* OPTIONAL: Set a pixel in a buffer according to the special requirements of the display * Can be used for color format not supported in LittelvGL. E.g. 2 bit -> 4 gray scales * Note: Much slower then drawing with supported color formats. */ - void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, - lv_coord_t y, lv_color_t color, lv_opa_t opa); + void (*set_px_cb)(struct _disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, + lv_color_t color, lv_opa_t opa); /* OPTIONAL: Called after every refresh cycle to tell the rendering and flushing time + the * number of flushed pixels */ @@ -92,7 +92,8 @@ typedef struct _disp_drv_t #if LV_USE_GPU /*OPTIONAL: Blend two memories using opacity (GPU only)*/ - void (*mem_blend_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); + void (*mem_blend_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, + lv_opa_t opa); /*OPTIONAL: Fill a memory with a color (GPU only)*/ void (*mem_fill_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, diff --git a/src/lv_hal/lv_hal_indev.c b/src/lv_hal/lv_hal_indev.c index 9629cef3033d..112734117b1e 100644 --- a/src/lv_hal/lv_hal_indev.c +++ b/src/lv_hal/lv_hal_indev.c @@ -89,8 +89,7 @@ lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver) indev->group = NULL; indev->btn_points = NULL; - indev->driver.read_task = - lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev); + indev->driver.read_task = lv_task_create(lv_indev_read_task, LV_INDEV_DEF_READ_PERIOD, LV_TASK_PRIO_MID, indev); return indev; } diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index cea6ebba7186..d08c3038fd6b 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -54,7 +54,6 @@ typedef uint8_t lv_indev_type_t; enum { LV_INDEV_STATE_REL = 0, LV_INDEV_STATE_PR }; typedef uint8_t lv_indev_state_t; - /*Data type when an input device is read */ typedef struct { @@ -117,9 +116,9 @@ typedef struct _lv_indev_proc_t lv_point_t vect; lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DEF_DRAG_LIMIT*/ lv_point_t drag_throw_vect; - struct _lv_obj_t * act_obj; /*The object being pressed*/ - struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and - other post-release event)*/ + struct _lv_obj_t * act_obj; /*The object being pressed*/ + struct _lv_obj_t * last_obj; /*The last obejct which was pressed (used by dragthrow and + other post-release event)*/ struct _lv_obj_t * last_pressed; /*The lastly pressed object*/ /*Flags*/ diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 70edb989af2e..6961a4927e1a 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -73,7 +73,7 @@ void lv_anim_init(lv_anim_t * a) { memset(a, 0, sizeof(lv_anim_t)); a->time = 500; - a->end = 100; + a->end = 100; } /** * Create an animation @@ -83,8 +83,7 @@ void lv_anim_create(lv_anim_t * a) { LV_LOG_TRACE("animation create started") /* Do not let two animations for the same 'var' with the same 'fp'*/ - if(a->exec_cb != NULL) - lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/ + if(a->exec_cb != NULL) lv_anim_del(a->var, a->exec_cb); /*fp == NULL would delete all animations of var*/ /*Add the new animation to the animation linked list*/ lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll)); @@ -181,8 +180,7 @@ lv_anim_value_t lv_anim_path_linear(const lv_anim_t * a) uint32_t step; if(a->time == a->act_time) { step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/ - } - else { + } else { step = ((int32_t)a->act_time * LV_ANIM_RESOLUTION) / a->time; } @@ -396,8 +394,7 @@ static void anim_task(lv_task_t * param) anim_list_changed = false; if(!a->has_run) { - a->has_run = - 1; /*The list readying might be reseted so need to know which anim has run already*/ + a->has_run = 1; /*The list readying might be reseted so need to know which anim has run already*/ a->act_time += elaps; if(a->act_time >= 0) { if(a->act_time > a->time) a->act_time = a->time; @@ -438,8 +435,7 @@ static bool anim_ready_handler(lv_anim_t * a) /*Delete the animation if * - no repeat and no play back (simple one shot animation) * - no repeat, play back is enabled and play back is ready */ - if((a->repeat == 0 && a->playback == 0) || - (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { + if((a->repeat == 0 && a->playback == 0) || (a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) { /*Create copy from the animation and delete the animation from the list. * This way the `ready_cb` will see the animations like it's animation is ready deleted*/ diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 22528d3812c9..736a7d95048f 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -57,22 +57,22 @@ typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); /*Describe an animation*/ typedef struct _lv_anim_t { - void * var; /*Variable to animate*/ - lv_anim_exec_cb_t exec_cb; /*Function to execute to animate*/ - lv_anim_path_cb_t path_cb; /*An array with the steps of animations*/ - lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready*/ - int32_t start; /*Start value*/ - int32_t end; /*End value*/ - uint16_t time; /*Animation time in ms*/ - int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ - uint16_t playback_pause; /*Wait before play back*/ - uint16_t repeat_pause; /*Wait before repeat*/ + void * var; /*Variable to animate*/ + lv_anim_exec_cb_t exec_cb; /*Function to execute to animate*/ + lv_anim_path_cb_t path_cb; /*An array with the steps of animations*/ + lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready*/ + int32_t start; /*Start value*/ + int32_t end; /*End value*/ + uint16_t time; /*Animation time in ms*/ + int16_t act_time; /*Current time in animation. Set to negative to make delay.*/ + uint16_t playback_pause; /*Wait before play back*/ + uint16_t repeat_pause; /*Wait before repeat*/ #if LV_USE_USER_DATA - lv_anim_user_data_t user_data; /*Custom user data*/ + lv_anim_user_data_t user_data; /*Custom user data*/ #endif - uint8_t playback : 1; /*When the animation is ready play it back*/ - uint8_t repeat : 1; /*Repeat the animation infinitely*/ + uint8_t playback : 1; /*When the animation is ready play it back*/ + uint8_t repeat : 1; /*Repeat the animation infinitely*/ /*Animation system use these - user shouldn't set*/ uint8_t playback_now : 1; /*Play back is in progress*/ uint32_t has_run : 1; /*Indicates the animation has run in this round*/ @@ -108,7 +108,7 @@ void lv_anim_init(lv_anim_t * a); */ static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_cb_t exec_cb) { - a->var = var; + a->var = var; a->exec_cb = exec_cb; } @@ -120,7 +120,7 @@ static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_c */ static inline void lv_anim_set_time(lv_anim_t * a, uint16_t duration, uint16_t delay) { - a->time = duration; + a->time = duration; a->act_time = -delay; } @@ -133,7 +133,7 @@ static inline void lv_anim_set_time(lv_anim_t * a, uint16_t duration, uint16_t d static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_anim_value_t end) { a->start = start; - a->end = end; + a->end = end; } /** @@ -146,7 +146,7 @@ static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_a */ static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { - a->var = a; + a->var = a; a->exec_cb = (lv_anim_exec_cb_t)exec_cb; } @@ -178,7 +178,7 @@ static inline void lv_anim_set_ready_cb(lv_anim_t * a, lv_anim_ready_cb_t ready_ */ static inline void lv_anim_set_playback(lv_anim_t * a, uint16_t wait_time) { - a->playback = 1; + a->playback = 1; a->playback_pause = wait_time; } @@ -198,7 +198,7 @@ static inline void lv_anim_clear_playback(lv_anim_t * a) */ static inline void lv_anim_set_repeat(lv_anim_t * a, uint16_t wait_time) { - a->repeat = 1; + a->repeat = 1; a->repeat_pause = wait_time; } diff --git a/src/lv_misc/lv_area.c b/src/lv_misc/lv_area.c index b8ab439194f3..025e1733ef0c 100644 --- a/src/lv_misc/lv_area.c +++ b/src/lv_misc/lv_area.c @@ -167,8 +167,7 @@ bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p) */ bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p) { - if((a1_p->x1 <= a2_p->x2) && (a1_p->x2 >= a2_p->x1) && (a1_p->y1 <= a2_p->y2) && - (a1_p->y2 >= a2_p->y1)) { + if((a1_p->x1 <= a2_p->x2) && (a1_p->x2 >= a2_p->x1) && (a1_p->y1 <= a2_p->y2) && (a1_p->y2 >= a2_p->y1)) { return true; } else { return false; diff --git a/src/lv_misc/lv_color.h b/src/lv_misc/lv_color.h index 9b0ded93be8d..4571fc306dba 100644 --- a/src/lv_misc/lv_color.h +++ b/src/lv_misc/lv_color.h @@ -310,10 +310,9 @@ static inline uint32_t lv_color_to32(lv_color_t color) return ret.full; #else lv_color32_t ret; - ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ - ret.ch.green = - ((color.ch.green_h << 3) + color.ch.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ - ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.red = color.ch.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ + ret.ch.green = ((color.ch.green_h << 3) + color.ch.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/ + ret.ch.blue = color.ch.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/ ret.ch.alpha = 0xFF; return ret.full; #endif @@ -420,14 +419,12 @@ static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8) static inline lv_color_t lv_color_hex(uint32_t c) { - return lv_color_make((uint8_t)((c >> 16) & 0xFF), (uint8_t)((c >> 8) & 0xFF), - (uint8_t)(c & 0xFF)); + return lv_color_make((uint8_t)((c >> 16) & 0xFF), (uint8_t)((c >> 8) & 0xFF), (uint8_t)(c & 0xFF)); } static inline lv_color_t lv_color_hex3(uint32_t c) { - return lv_color_make((uint8_t)(((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), - (uint8_t)((c & 0xF0) | ((c & 0xF0) >> 4)), + return lv_color_make((uint8_t)(((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), (uint8_t)((c & 0xF0) | ((c & 0xF0) >> 4)), (uint8_t)((c & 0xF) | ((c & 0xF) << 4))); } diff --git a/src/lv_misc/lv_gc.h b/src/lv_misc/lv_gc.h index ac9d93f3d006..5d57d15ab069 100644 --- a/src/lv_misc/lv_gc.h +++ b/src/lv_misc/lv_gc.h @@ -29,15 +29,15 @@ extern "C" { * DEFINES *********************/ -#define LV_GC_ROOTS(prefix) \ - prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \ - prefix lv_ll_t _lv_disp_ll; /*Linked list of screens*/ \ - prefix lv_ll_t _lv_indev_ll; /*Linked list of screens*/ \ - prefix lv_ll_t _lv_drv_ll; \ - prefix lv_ll_t _lv_file_ll; \ - prefix lv_ll_t _lv_anim_ll; \ - prefix lv_ll_t _lv_group_ll; \ - prefix lv_ll_t _lv_img_defoder_ll; \ +#define LV_GC_ROOTS(prefix) \ + prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \ + prefix lv_ll_t _lv_disp_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_indev_ll; /*Linked list of screens*/ \ + prefix lv_ll_t _lv_drv_ll; \ + prefix lv_ll_t _lv_file_ll; \ + prefix lv_ll_t _lv_anim_ll; \ + prefix lv_ll_t _lv_group_ll; \ + prefix lv_ll_t _lv_img_defoder_ll; \ prefix void * _lv_task_act; #define LV_NO_PREFIX diff --git a/src/lv_misc/lv_ll.c b/src/lv_misc/lv_ll.c index 7901a87ad6d8..7077fff1f9be 100644 --- a/src/lv_misc/lv_ll.c +++ b/src/lv_misc/lv_ll.c @@ -323,11 +323,12 @@ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act) * @param ll_p pointer to linked list * @return length of the linked list */ -uint32_t lv_ll_get_len(const lv_ll_t *ll_p){ +uint32_t lv_ll_get_len(const lv_ll_t * ll_p) +{ uint32_t len = 0; void * node; - for(node=lv_ll_get_head(ll_p); node!=NULL; node=lv_ll_get_next(ll_p, node)) { + for(node = lv_ll_get_head(ll_p); node != NULL; node = lv_ll_get_next(ll_p, node)) { len++; } diff --git a/src/lv_misc/lv_ll.h b/src/lv_misc/lv_ll.h index 7c6baba6359f..fbb6d03f3ce7 100644 --- a/src/lv_misc/lv_ll.h +++ b/src/lv_misc/lv_ll.h @@ -129,7 +129,7 @@ void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act); * @param ll_p pointer to linked list * @return length of the linked list */ -uint32_t lv_ll_get_len(const lv_ll_t *ll_p); +uint32_t lv_ll_get_len(const lv_ll_t * ll_p); /** * Move a nodw before an other node in the same linked list @@ -151,8 +151,7 @@ bool lv_ll_is_empty(lv_ll_t * ll_p); #define LV_LL_READ(list, i) for(i = lv_ll_get_head(&list); i != NULL; i = lv_ll_get_next(&list, i)) -#define LV_LL_READ_BACK(list, i) \ - for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) +#define LV_LL_READ_BACK(list, i) for(i = lv_ll_get_tail(&list); i != NULL; i = lv_ll_get_prev(&list, i)) #ifdef __cplusplus } /* extern "C" */ diff --git a/src/lv_misc/lv_log.h b/src/lv_misc/lv_log.h index 4deb8f8d4aa7..759820332b38 100644 --- a/src/lv_misc/lv_log.h +++ b/src/lv_misc/lv_log.h @@ -42,7 +42,7 @@ typedef int8_t lv_log_level_t; /** * Log print function. Receives "Log Level", "File path", "Line number" and "Description". */ -typedef void (*lv_log_print_g_cb_t) (lv_log_level_t level, const char *, uint32_t, const char *); +typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *); /********************** * GLOBAL PROTOTYPES @@ -77,25 +77,25 @@ void lv_log_add(lv_log_level_t level, const char * file, int line, const char * #else /*LV_USE_LOG*/ /*Do nothing if `LV_USE_LOG 0`*/ -#define lv_log_add(level, file, line, dsc) \ - { \ - ; \ +#define lv_log_add(level, file, line, dsc) \ + { \ + ; \ } -#define LV_LOG_TRACE(dsc) \ - { \ - ; \ +#define LV_LOG_TRACE(dsc) \ + { \ + ; \ } -#define LV_LOG_INFO(dsc) \ - { \ - ; \ +#define LV_LOG_INFO(dsc) \ + { \ + ; \ } -#define LV_LOG_WARN(dsc) \ - { \ - ; \ +#define LV_LOG_WARN(dsc) \ + { \ + ; \ } -#define LV_LOG_ERROR(dsc) \ - { \ - ; \ +#define LV_LOG_ERROR(dsc) \ + { \ + ; \ } #endif /*LV_USE_LOG*/ diff --git a/src/lv_misc/lv_math.c b/src/lv_misc/lv_math.c index 9f16d3625927..d16a16a4b068 100644 --- a/src/lv_misc/lv_math.c +++ b/src/lv_misc/lv_math.c @@ -26,13 +26,12 @@ * STATIC VARIABLES **********************/ static int16_t sin0_90_table[] = { - 0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126, 5690, 6252, 6813, - 7371, 7927, 8481, 9032, 9580, 10126, 10668, 11207, 11743, 12275, 12803, 13328, 13848, - 14364, 14876, 15383, 15886, 16383, 16876, 17364, 17846, 18323, 18794, 19260, 19720, 20173, - 20621, 21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964, 24351, 24730, 25101, 25465, - 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087, 28377, 28659, 28932, 29196, 29451, - 29697, 29934, 30162, 30381, 30591, 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, - 32051, 32165, 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, 32767}; + 0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126, 5690, 6252, 6813, 7371, 7927, 8481, + 9032, 9580, 10126, 10668, 11207, 11743, 12275, 12803, 13328, 13848, 14364, 14876, 15383, 15886, 16383, 16876, + 17364, 17846, 18323, 18794, 19260, 19720, 20173, 20621, 21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964, + 24351, 24730, 25101, 25465, 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087, 28377, 28659, 28932, 29196, + 29451, 29697, 29934, 30162, 30381, 30591, 30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, 32051, 32165, + 32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762, 32767}; /********************** * MACROS diff --git a/src/lv_misc/lv_mem.c b/src/lv_misc/lv_mem.c index 6dfcea849346..2538e98e0e8c 100644 --- a/src/lv_misc/lv_mem.c +++ b/src/lv_misc/lv_mem.c @@ -19,7 +19,7 @@ * DEFINES *********************/ /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ -#define LV_MEM_ADD_JUNK 1 +#define LV_MEM_ADD_JUNK 1 #ifdef LV_MEM_ENV64 #define MEM_UNIT uint64_t @@ -126,7 +126,6 @@ void * lv_mem_alloc(uint32_t size) #endif void * alloc = NULL; - #if LV_MEM_CUSTOM == 0 /*Use the built-in allocators*/ lv_mem_ent_t * e = NULL; @@ -154,7 +153,7 @@ void * lv_mem_alloc(uint32_t size) ((lv_mem_ent_t *)alloc)->header.s.d_size = size; ((lv_mem_ent_t *)alloc)->header.s.used = 1; - alloc = &((lv_mem_ent_t *)alloc)->first_data; + alloc = &((lv_mem_ent_t *)alloc)->first_data; } #endif /* LV_ENABLE_GC */ #endif /* LV_MEM_CUSTOM */ diff --git a/src/lv_misc/lv_mem.h b/src/lv_misc/lv_mem.h index b62abc586999..5b4efbe6fb32 100644 --- a/src/lv_misc/lv_mem.h +++ b/src/lv_misc/lv_mem.h @@ -112,20 +112,20 @@ uint32_t lv_mem_get_size(const void * data); * p pointer to a memory */ #if LV_USE_LOG == 0 -#define lv_mem_assert(p) \ - { \ - if(p == NULL) \ - while(1) \ - ; \ +#define lv_mem_assert(p) \ + { \ + if(p == NULL) \ + while(1) \ + ; \ } #else -#define lv_mem_assert(p) \ - { \ - if(p == NULL) { \ - LV_LOG_ERROR("Out of memory!"); \ - while(1) \ - ; \ - } \ +#define lv_mem_assert(p) \ + { \ + if(p == NULL) { \ + LV_LOG_ERROR("Out of memory!"); \ + while(1) \ + ; \ + } \ } #endif #ifdef __cplusplus diff --git a/src/lv_misc/lv_task.c b/src/lv_misc/lv_task.c index 4b35e399793f..51a904ca4be7 100644 --- a/src/lv_misc/lv_task.c +++ b/src/lv_misc/lv_task.c @@ -20,8 +20,8 @@ * DEFINES *********************/ #define IDLE_MEAS_PERIOD 500 /*[ms]*/ -#define DEF_PRIO LV_TASK_PRIO_MID -#define DEF_PERIOD 500 +#define DEF_PRIO LV_TASK_PRIO_MID +#define DEF_PERIOD 500 /********************** * TYPEDEFS @@ -119,8 +119,8 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) else if(task_interrupter) { if(((lv_task_t *)LV_GC_ROOT(_lv_task_act))->prio > task_interrupter->prio) { if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) { - task_interrupter = LV_GC_ROOT( - _lv_task_act); /*Check all tasks again from the highest priority */ + task_interrupter = + LV_GC_ROOT(_lv_task_act); /*Check all tasks again from the highest priority */ end_flag = false; break; } @@ -130,17 +130,14 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) * Just run the remaining tasks*/ else { if(lv_task_exec(LV_GC_ROOT(_lv_task_act))) { - task_interrupter = LV_GC_ROOT( - _lv_task_act); /*Check all tasks again from the highest priority */ - end_flag = false; + task_interrupter = LV_GC_ROOT(_lv_task_act); /*Check all tasks again from the highest priority */ + end_flag = false; break; } } - if(task_deleted) - break; /*If a task was deleted then this or the next item might be corrupted*/ - if(task_created) - break; /*If a task was created then this or the next item might be corrupted*/ + if(task_deleted) break; /*If a task was deleted then this or the next item might be corrupted*/ + if(task_created) break; /*If a task was created then this or the next item might be corrupted*/ LV_GC_ROOT(_lv_task_act) = next; /*Load the next task*/ } @@ -150,9 +147,8 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void) uint32_t idle_period_time = lv_tick_elaps(idle_period_start); if(idle_period_time >= IDLE_MEAS_PERIOD) { - idle_last = (uint32_t)((uint32_t)busy_time * 100) / - IDLE_MEAS_PERIOD; /*Calculate the busy percentage*/ - idle_last = idle_last > 100 ? 0 : 100 - idle_last; /*But we need idle time*/ + idle_last = (uint32_t)((uint32_t)busy_time * 100) / IDLE_MEAS_PERIOD; /*Calculate the busy percentage*/ + idle_last = idle_last > 100 ? 0 : 100 - idle_last; /*But we need idle time*/ busy_time = 0; idle_period_start = lv_tick_get(); } @@ -200,21 +196,20 @@ lv_task_t * lv_task_create_basic(void) } } - new_task->period = DEF_PERIOD; - new_task->task_cb = NULL; - new_task->prio = DEF_PRIO; + new_task->period = DEF_PERIOD; + new_task->task_cb = NULL; + new_task->prio = DEF_PRIO; new_task->once = 0; new_task->last_run = lv_tick_get(); - new_task->user_data= NULL; + new_task->user_data = NULL; task_created = true; return new_task; } - /** * Create a new lv_task * @param task a function which is the task itself @@ -360,8 +355,8 @@ static bool lv_task_exec(lv_task_t * task) uint32_t elp = lv_tick_elaps(task->last_run); if(elp >= task->period) { task->last_run = lv_tick_get(); - task_deleted = false; - task_created = false; + task_deleted = false; + task_created = false; if(task->task_cb) task->task_cb(task); /*Delete if it was a one shot lv_task*/ diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index b2f1d35ca7a1..dd49137fa387 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -104,9 +104,8 @@ uint32_t (*lv_txt_get_encoded_length)(const char *) = lv_txt_iso8859_ * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid * line breaks */ -void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, - lv_txt_flag_t flag) +void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, lv_coord_t letter_space, + lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag) { size_res->x = 0; size_res->y = 0; @@ -123,14 +122,12 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * /*Calc. the height and longest line*/ while(text[line_start] != '\0') { - new_line_start += - lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, flag); + new_line_start += lv_txt_get_next_line(&text[line_start], font, letter_space, max_width, flag); size_res->y += letter_height; size_res->y += line_space; /*Calculate the the longest line*/ - act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, font, - letter_space, flag); + act_line_length = lv_txt_get_width(&text[line_start], new_line_start - line_start, font, letter_space, flag); size_res->x = LV_MATH_MAX(act_line_length, size_res->x); line_start = new_line_start; @@ -159,8 +156,8 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 * they are different) */ -uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, - lv_coord_t max_width, lv_txt_flag_t flag) +uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, lv_coord_t max_width, + lv_txt_flag_t flag) { if(txt == NULL) return 0; if(font == NULL) return 0; @@ -178,7 +175,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord while(txt[i] != '\0') { lv_coord_t letter_width; - letter = lv_txt_encoded_next(txt, &i); + letter = lv_txt_encoded_next(txt, &i); letter_next = lv_txt_encoded_next(&txt[i], NULL); /*Handle the recolor command*/ @@ -190,8 +187,8 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord /*Check for new line chars*/ if(letter == '\n' || letter == '\r') { - uint32_t i_tmp = i; - uint32_t n = lv_txt_encoded_next(txt, &i_tmp); + uint32_t i_tmp = i; + uint32_t n = lv_txt_encoded_next(txt, &i_tmp); if(letter == '\r' && n == '\n') i = i_tmp; return i; /*Return with the first letter of the next line*/ @@ -216,7 +213,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord cur_w -= w_at_last_break + letter_space; bool other = true; while(txt[i_tmp] != '\0') { - letter = lv_txt_encoded_next(txt, &i_tmp); + letter = lv_txt_encoded_next(txt, &i_tmp); letter_next = lv_txt_encoded_next(&txt[i_tmp], NULL); /*Handle the recolor command*/ @@ -233,8 +230,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord uint32_t char_remain; lv_txt_encoded_prev(txt, &i); for(char_remain = n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; - char_remain++) { + char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; char_remain++) { lv_txt_encoded_prev(txt, &i); } } else { @@ -262,8 +258,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord uint32_t char_remain; lv_txt_encoded_prev(txt, &i); for(char_remain = n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; - char_remain++) { + char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; char_remain++) { lv_txt_encoded_prev(txt, &i); } } else { @@ -315,8 +310,8 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord * @param flags settings for the text from 'txt_flag_t' enum * @return length of a char_num long text */ -lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, - lv_coord_t letter_space, lv_txt_flag_t flag) +lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, lv_coord_t letter_space, + lv_txt_flag_t flag) { if(txt == NULL) return 0; if(font == NULL) return 0; @@ -329,7 +324,7 @@ lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * if(length != 0) { while(i < length) { - letter = lv_txt_encoded_next(txt, &i); + letter = lv_txt_encoded_next(txt, &i); letter_next = lv_txt_encoded_next(&txt[i], NULL); if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { @@ -404,8 +399,7 @@ void lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) uint32_t old_len = strlen(txt_buf); uint32_t ins_len = strlen(ins_txt); uint32_t new_len = ins_len + old_len; - pos = - lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/ + pos = lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of letter index*/ /*Copy the second part into the end to make place to text to insert*/ uint32_t i; @@ -693,11 +687,10 @@ static uint32_t lv_txt_utf8_get_length(const char * txt) */ static uint8_t lv_txt_iso8859_1_size(const char * str) { - (void) str; /*Unused*/ + (void)str; /*Unused*/ return 1; } - /** * Convert an Unicode letter to ISO8859-1. * @param letter_uni an Unicode letter @@ -705,8 +698,10 @@ static uint8_t lv_txt_iso8859_1_size(const char * str) */ static uint32_t lv_txt_unicode_to_iso8859_1(uint32_t letter_uni) { - if(letter_uni < 128) return letter_uni; - else return ' '; + if(letter_uni < 128) + return letter_uni; + else + return ' '; } /** @@ -730,9 +725,9 @@ static uint32_t lv_txt_iso8859_1_conv_wc(uint32_t c) */ static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i) { - if(i == NULL) return txt[1]; /*Get the next char */ + if(i == NULL) return txt[1]; /*Get the next char */ - uint8_t letter = txt[*i] ; + uint8_t letter = txt[*i]; (*i)++; return letter; } @@ -745,10 +740,10 @@ static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i) */ static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i) { - if(i == NULL) return *(txt - 1); /*Get the prev. char */ + if(i == NULL) return *(txt - 1); /*Get the prev. char */ (*i)--; - uint8_t letter = txt[*i] ; + uint8_t letter = txt[*i]; return letter; } @@ -762,11 +757,10 @@ static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i) */ static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id) { - (void) txt; /*Unused*/ - return utf8_id; /*In Non encoded no difference*/ + (void)txt; /*Unused*/ + return utf8_id; /*In Non encoded no difference*/ } - /** * Convert a byte index (in an ISO8859-1 text) to character index. * E.g. in "AÁRT" index of 'R' is 2th char but start at byte 3 because 'Á' is 2 bytes long @@ -776,8 +770,8 @@ static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id) */ static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id) { - (void) txt; /*Unused*/ - return byte_id; /*In Non encoded no difference*/ + (void)txt; /*Unused*/ + return byte_id; /*In Non encoded no difference*/ } /** diff --git a/src/lv_misc/lv_txt.h b/src/lv_misc/lv_txt.h index 1527527e1653..3e60fcf619a6 100644 --- a/src/lv_misc/lv_txt.h +++ b/src/lv_misc/lv_txt.h @@ -29,8 +29,8 @@ extern "C" { *********************/ #define LV_TXT_COLOR_CMD "#" -#define LV_TXT_ENC_UTF8 1 -#define LV_TXT_ENC_ASCII 2 +#define LV_TXT_ENC_UTF8 1 +#define LV_TXT_ENC_ASCII 2 /********************** * TYPEDEFS @@ -66,9 +66,8 @@ typedef uint8_t lv_txt_cmd_state_t; * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid * line breaks */ -void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, - lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, - lv_txt_flag_t flag); +void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, lv_coord_t letter_space, + lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag); /** * Get the next line of text. Check line length and break chars too. @@ -81,8 +80,8 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 * they are different) */ -uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, - lv_coord_t max_width, lv_txt_flag_t flag); +uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, lv_coord_t max_width, + lv_txt_flag_t flag); /** * Give the length of a text with a given font @@ -94,8 +93,8 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord * @param flags settings for the text from 'txt_flag_t' enum * @return length of a char_num long text */ -lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, - lv_coord_t letter_space, lv_txt_flag_t flag); +lv_coord_t lv_txt_get_width(const char * txt, uint16_t length, const lv_font_t * font, lv_coord_t letter_space, + lv_txt_flag_t flag); /** * Check next character in a string and decide if te character is part of the command or not diff --git a/src/lv_objx/lv_arc.c b/src/lv_objx/lv_arc.c index 23b0a3b65817..7db5fb5e4f01 100644 --- a/src/lv_objx/lv_arc.c +++ b/src/lv_objx/lv_arc.c @@ -231,10 +231,8 @@ static bool lv_arc_design(lv_obj_t * arc, const lv_area_t * mask, lv_design_mode /*Draw circle on the ends if enabled */ if(style->line.rounded) { lv_coord_t thick_half = style->line.width / 2; - lv_coord_t cir_x = - ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); - lv_coord_t cir_y = - ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT); + lv_coord_t cir_x = ((r - thick_half) * lv_trigo_sin(ext->angle_start) >> LV_TRIGO_SHIFT); + lv_coord_t cir_y = ((r - thick_half) * lv_trigo_sin(ext->angle_start + 90) >> LV_TRIGO_SHIFT); lv_style_t cir_style; lv_style_copy(&cir_style, &lv_style_plain); diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 9f2ffc26d173..4c01d0ac5f32 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -72,14 +72,14 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->min_value = 0; - ext->max_value = 100; - ext->cur_value = 0; + ext->min_value = 0; + ext->max_value = 100; + ext->cur_value = 0; #if LV_USE_ANIMATION - ext->anim_time = 200; - ext->anim_start = 0; - ext->anim_end = 0; - ext->anim_state = LV_BAR_ANIM_STATE_INV; + ext->anim_time = 200; + ext->anim_start = 0; + ext->anim_end = 0; + ext->anim_state = LV_BAR_ANIM_STATE_INV; #endif ext->sym = 0; ext->style_indic = &lv_style_pretty_color; @@ -294,7 +294,7 @@ bool lv_bar_get_sym(lv_obj_t * bar) const lv_style_t * lv_bar_get_style(const lv_obj_t * bar, lv_bar_style_t type) { const lv_style_t * style = NULL; - lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); switch(type) { case LV_BAR_STYLE_BG: style = lv_obj_get_style(bar); break; @@ -349,7 +349,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #if LV_USE_ANIMATION || ext->anim_start != LV_BAR_ANIM_STATE_INV #endif - ) { + ) { const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); lv_area_t indic_area; lv_area_copy(&indic_area, &bar->coords); @@ -367,30 +367,26 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_x = - (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / - (ext->max_value - ext->min_value); + (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); lv_coord_t anim_end_x = - (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / - (ext->max_value - ext->min_value); + (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ indic_area.x2 = - anim_start_x + - (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); - }else + anim_start_x + (((anim_end_x - anim_start_x) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + } else #endif { - indic_area.x2 = (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / - (ext->max_value - ext->min_value); + indic_area.x2 = + (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); } indic_area.x2 = indic_area.x1 + indic_area.x2 - 1; if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { /*Calculate the coordinate of the zero point*/ lv_coord_t zero; - zero = - indic_area.x1 + (-ext->min_value * w) / (ext->max_value - ext->min_value); + zero = indic_area.x1 + (-ext->min_value * w) / (ext->max_value - ext->min_value); if(indic_area.x2 > zero) indic_area.x1 = zero; else { @@ -403,22 +399,19 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(ext->anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_y = - (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / - (ext->max_value - ext->min_value); + (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); lv_coord_t anim_end_y = - (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / - (ext->max_value - ext->min_value); + (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ indic_area.y1 = - anim_start_y + - (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); - } else + anim_start_y + (((anim_end_y - anim_start_y) * ext->anim_state) >> LV_BAR_ANIM_STATE_NORM); + } else #endif { - indic_area.y1 = (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / - (ext->max_value - ext->min_value); + indic_area.y1 = + (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); } indic_area.y1 = indic_area.y2 - indic_area.y1 + 1; @@ -426,8 +419,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { /*Calculate the coordinate of the zero point*/ lv_coord_t zero; - zero = - indic_area.y2 - (-ext->min_value * h) / (ext->max_value - ext->min_value); + zero = indic_area.y2 - (-ext->min_value * h) / (ext->max_value - ext->min_value); if(indic_area.y1 < zero) indic_area.y2 = zero; else { @@ -444,7 +436,7 @@ static bool lv_bar_design(lv_obj_t * bar, const lv_area_t * mask, lv_design_mode #if LV_USE_GROUP /*Draw the border*/ if(lv_obj_is_focused(bar)) { - lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); + lv_opa_t opa_scale = lv_obj_get_opa_scale(bar); const lv_style_t * style_bg = lv_bar_get_style(bar, LV_BAR_STYLE_BG); lv_style_t style_tmp; lv_style_copy(&style_tmp, style_bg); @@ -472,11 +464,9 @@ static lv_res_t lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param) res = ancestor_signal(bar, sign, param); if(res != LV_RES_OK) return res; - if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { const lv_style_t * style_indic = lv_bar_get_style(bar, LV_BAR_STYLE_INDIC); - if(style_indic->body.shadow.width > bar->ext_draw_pad) - bar->ext_draw_pad = style_indic->body.shadow.width; + if(style_indic->body.shadow.width > bar->ext_draw_pad) bar->ext_draw_pad = style_indic->body.shadow.width; } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index 2d923563f018..a7a82467b1be 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -27,7 +27,6 @@ extern "C" { #include "lv_btn.h" #include "lv_label.h" - /********************* * DEFINES *********************/ diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 7dd163953aad..a74cca648098 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -353,7 +353,7 @@ uint16_t lv_btn_get_ink_out_time(const lv_obj_t * btn) const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) { const lv_style_t * style = NULL; - lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); + lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); switch(type) { case LV_BTN_STYLE_REL: style = ext->styles[LV_BTN_STATE_REL]; break; @@ -408,9 +408,8 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode /*In the first part of the animation increase the size of the circle (ink effect) */ lv_area_t cir_area; - lv_coord_t coord_state = ink_act_value < LV_BTN_INK_VALUE_MAX / 2 - ? ink_act_value - : LV_BTN_INK_VALUE_MAX / 2; + lv_coord_t coord_state = + ink_act_value < LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value : LV_BTN_INK_VALUE_MAX / 2; lv_point_t p_act; p_act.x = ink_point.x; p_act.y = ink_point.y; @@ -421,28 +420,21 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode p_act.y += (y_err * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1); lv_coord_t half_side = LV_MATH_MAX(w, h) / 2; - cir_area.x1 = - p_act.x - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.y1 = - p_act.y - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.x2 = - p_act.x + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - cir_area.y2 = - p_act.y + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); - - lv_area_intersect( - &cir_area, &btn->coords, - &cir_area); /*Limit the area. (It might be too big on the smaller side)*/ + cir_area.x1 = p_act.x - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.y1 = p_act.y - ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.x2 = p_act.x + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + cir_area.y2 = p_act.y + ((half_side * coord_state) >> (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + + lv_area_intersect(&cir_area, &btn->coords, + &cir_area); /*Limit the area. (It might be too big on the smaller side)*/ /*In the second part animate the radius. Circle -> body.radius*/ - lv_coord_t r_state = ink_act_value > LV_BTN_INK_VALUE_MAX / 2 - ? ink_act_value - LV_BTN_INK_VALUE_MAX / 2 - : 0; + lv_coord_t r_state = + ink_act_value > LV_BTN_INK_VALUE_MAX / 2 ? ink_act_value - LV_BTN_INK_VALUE_MAX / 2 : 0; lv_style_copy(&style_tmp, ext->styles[ink_top_state]); - style_tmp.body.radius = - r_max + (((ext->styles[ink_bg_state]->body.radius - r_max) * r_state) >> - (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); + style_tmp.body.radius = r_max + (((ext->styles[ink_bg_state]->body.radius - r_max) * r_state) >> + (LV_BTN_INK_VALUE_MAX_SHIFT - 1)); style_tmp.body.border.width = 0; /*Draw the circle*/ @@ -450,8 +442,7 @@ static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode } else { lv_style_t res; lv_style_copy(&res, ext->styles[ink_bg_state]); - lv_style_mix(ext->styles[ink_bg_state], ext->styles[ink_top_state], &res, - ink_act_value); + lv_style_mix(ext->styles[ink_bg_state], ext->styles[ink_top_state], &res, ink_act_value); lv_draw_rect(&btn->coords, mask, &res, opa_scale); } } @@ -646,7 +637,7 @@ static void lv_btn_ink_effect_anim(lv_obj_t * btn, lv_anim_value_t val) */ static void lv_btn_ink_effect_anim_ready(lv_anim_t * a) { - (void) a; /*Unused*/ + (void)a; /*Unused*/ lv_btn_ext_t * ext = lv_obj_get_ext_attr(ink_obj); lv_btn_state_t state = lv_btn_get_state(ink_obj); @@ -654,8 +645,7 @@ static void lv_btn_ink_effect_anim_ready(lv_anim_t * a) lv_obj_invalidate(ink_obj); ink_ready = true; - if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && - ink_playback == false) { + if((state == LV_BTN_STATE_REL || state == LV_BTN_STATE_TGL_REL) && ext->toggle == 0 && ink_playback == false) { lv_anim_t new_a; new_a.var = ink_obj; new_a.start = LV_BTN_INK_VALUE_MAX; diff --git a/src/lv_objx/lv_btn.h b/src/lv_objx/lv_btn.h index cd23e24e359b..6cfb2fc23de3 100644 --- a/src/lv_objx/lv_btn.h +++ b/src/lv_objx/lv_btn.h @@ -61,7 +61,7 @@ typedef struct uint16_t ink_out_time; /*[ms] Time of ink disappearing*/ #endif lv_btn_state_t state : 3; /*Current state of the button from 'lv_btn_state_t' enum*/ - uint8_t toggle : 1; /*1: Toggle enabled*/ + uint8_t toggle : 1; /*1: Toggle enabled*/ } lv_btn_ext_t; /*Styles*/ @@ -129,8 +129,7 @@ static inline void lv_btn_set_layout(lv_obj_t * btn, lv_layout_t layout) * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, - lv_fit_t bottom) +static inline void lv_btn_set_fit4(lv_obj_t * btn, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) { lv_cont_set_fit4(btn, left, right, top, bottom); } diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 5ac4737044eb..0ab5a95edecf 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -165,11 +165,9 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) /*Set size and positions of the buttons*/ const lv_style_t * style_bg = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BG); - lv_coord_t max_w = - lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; - lv_coord_t max_h = - lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom; - lv_coord_t act_y = style_bg->body.padding.top; + lv_coord_t max_w = lv_obj_get_width(btnm) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t max_h = lv_obj_get_height(btnm) - style_bg->body.padding.top - style_bg->body.padding.bottom; + lv_coord_t act_y = style_bg->body.padding.top; /*Count the lines to calculate button height*/ uint8_t line_cnt = 1; @@ -196,8 +194,7 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) unit_cnt = 0; btn_cnt = 0; /*Count the buttons in a line*/ - while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && - strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ + while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 && strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/ unit_cnt += get_button_width(ext->ctrl_bits[btn_i + btn_cnt]); btn_cnt++; } @@ -232,11 +229,10 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) * If inner padding is zero then use the prev. button x2 as x1 to avoid rounding * errors*/ if(style_bg->body.padding.inner == 0 && act_x != style_bg->body.padding.left) { - lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, - act_x + act_unit_w, act_y + btn_h); - } else { - lv_area_set(&ext->button_areas[btn_i], act_x, act_y, act_x + act_unit_w, + lv_area_set(&ext->button_areas[btn_i], ext->button_areas[btn_i - 1].x2, act_y, act_x + act_unit_w, act_y + btn_h); + } else { + lv_area_set(&ext->button_areas[btn_i], act_x, act_y, act_x + act_unit_w, act_y + btn_h); } unit_act_cnt += get_button_width(ext->ctrl_bits[btn_i]); @@ -402,7 +398,8 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width /** * Make the button matrix like a selector widget (only one button may be toggled at a time). * - * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or `lv_btnm_set_btn_ctrl_all`. + * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or + * `lv_btnm_set_btn_ctrl_all`. * * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled @@ -535,8 +532,8 @@ bool lv_btnm_get_btn_ctrl(lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) */ const lv_style_t * lv_btnm_get_style(const lv_obj_t * btnm, lv_btnm_style_t type) { - const lv_style_t * style = NULL; - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + const lv_style_t * style = NULL; + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); switch(type) { case LV_BTNM_STYLE_BG: style = lv_obj_get_style(btnm); break; @@ -588,7 +585,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo ancestor_design_f(btnm, mask, mode); - lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); const lv_style_t * bg_style = lv_obj_get_style(btnm); const lv_style_t * btn_style; lv_opa_t opa_scale = lv_obj_get_opa_scale(btnm); @@ -638,8 +635,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo else if(btn_i == ext->btn_id_pr && tgl_state == true) btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_TGL_PR); else - btn_style = lv_btnm_get_style( - btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/ + btn_style = lv_btnm_get_style(btnm, LV_BTNM_STYLE_BTN_REL); /*Not possible option, just to be sure*/ lv_style_copy(&style_tmp, btn_style); @@ -676,8 +672,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo area_tmp.x2 = area_tmp.x1 + txt_size.x; area_tmp.y2 = area_tmp.y1 + txt_size.y; - lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, - -1, -1); + lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, -1, -1); } } return true; @@ -707,8 +702,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) lv_btnm_set_map(btnm, ext->map_p); } else if(sign == LV_SIGNAL_PRESSED) { lv_indev_t * indev = lv_indev_get_act(); - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || - lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { uint16_t btn_pr; /*Search the pressed area*/ lv_indev_get_point(param, &p); @@ -724,7 +718,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_PRESSING) { @@ -740,7 +734,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } if(btn_pr != LV_BTNM_BTN_NONE) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); if(res == LV_RES_OK) { invalidate_button_area(btnm, btn_pr); } @@ -778,7 +772,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { @@ -787,7 +781,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); } } } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { @@ -842,8 +836,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = 0; } else { uint16_t area_below; - lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + - (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); + lv_coord_t pr_center = + ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); for(area_below = ext->btn_id_pr; area_below < ext->btn_cnt; area_below++) { if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 && @@ -864,8 +858,8 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) ext->btn_id_pr = 0; } else { int16_t area_above; - lv_coord_t pr_center = ext->button_areas[ext->btn_id_pr].x1 + - (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); + lv_coord_t pr_center = + ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1); for(area_above = ext->btn_id_pr; area_above >= 0; area_above--) { if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 && diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index b02ab8417426..fb02a23f0290 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -42,7 +42,7 @@ enum { LV_BTNM_CTRL_INACTIVE = 0x0020, LV_BTNM_CTRL_TGL_ENABLE = 0x0040, LV_BTNM_CTRL_TGL_STATE = 0x0080, - LV_BTNM_CTRL_CLICK_TRIG = 0x0100, /*1: Send LV_EVENT_SELECTED on CLICK, 0: Send LV_EVENT_SELECTED on PRESS*/ + LV_BTNM_CTRL_CLICK_TRIG = 0x0100, /*1: Send LV_EVENT_SELECTED on CLICK, 0: Send LV_EVENT_SELECTED on PRESS*/ }; typedef uint16_t lv_btnm_ctrl_t; @@ -51,14 +51,13 @@ typedef struct { /*No inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ - const char ** map_p; /*Pointer to the current map*/ - lv_area_t * button_areas; /*Array of areas of buttons*/ - lv_btnm_ctrl_t * ctrl_bits; /*Array of control bytes*/ + const char ** map_p; /*Pointer to the current map*/ + lv_area_t * button_areas; /*Array of areas of buttons*/ + lv_btnm_ctrl_t * ctrl_bits; /*Array of control bytes*/ const lv_style_t * styles_btn[LV_BTN_STATE_NUM]; /*Styles of buttons in each state*/ - uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ - uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ - uint16_t - btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ + uint16_t btn_cnt; /*Number of button in 'map_p'(Handled by the library)*/ + uint16_t btn_id_pr; /*Index of the currently pressed button or LV_BTNM_BTN_NONE*/ + uint16_t btn_id_act; /*Index of the active button (being pressed/released etc) or LV_BTNM_BTN_NONE */ uint8_t recolor : 1; /*Enable button recoloring*/ uint8_t one_toggle : 1; /*Single button toggled at once*/ } lv_btnm_ext_t; @@ -171,7 +170,8 @@ void lv_btnm_set_btn_width(const lv_obj_t * btnm, uint16_t btn_id, uint8_t width /** * Make the button matrix like a selector widget (only one button may be toggled at a time). * - * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or `lv_btnm_set_btn_ctrl_all`. + * Toggling must be enabled on the buttons you want to be selected with `lv_btnm_set_ctrl` or + * `lv_btnm_set_btn_ctrl_all`. * * @param btnm Button matrix object * @param one_toggle Whether "one toggle" mode is enabled diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 63bf0727e0ab..5d044fd1070c 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -54,9 +54,8 @@ static uint8_t is_leap_year(uint32_t year); static lv_signal_cb_t ancestor_signal; static lv_design_cb_t ancestor_design; static const char * day_name[7] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}; -static const char * month_name[12] = {"January", "February", "March", "April", - "May", "June", "July", "August", - "September", "October", "November", "December"}; +static const char * month_name[12] = {"January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December"}; /********************** * MACROS @@ -125,20 +124,14 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_theme_t * th = lv_theme_get_current(); if(th) { lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, th->style.calendar.bg); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, - th->style.calendar.header); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, - th->style.calendar.header_pr); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, - th->style.calendar.day_names); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, - th->style.calendar.week_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, - th->style.calendar.today_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, th->style.calendar.header); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER_PR, th->style.calendar.header_pr); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, th->style.calendar.day_names); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, th->style.calendar.week_box); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, th->style.calendar.today_box); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, th->style.calendar.highlighted_days); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, - th->style.calendar.inactive_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, th->style.calendar.inactive_days); } else { lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_BG, &lv_style_pretty); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HEADER, ext->style_header); @@ -146,10 +139,8 @@ lv_obj_t * lv_calendar_create(lv_obj_t * par, const lv_obj_t * copy) lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_DAY_NAMES, ext->style_day_names); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_WEEK_BOX, ext->style_week_box); lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_TODAY_BOX, ext->style_today_box); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, - ext->style_highlighted_days); - lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, - ext->style_inactive_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_HIGHLIGHTED_DAYS, ext->style_highlighted_days); + lv_calendar_set_style(new_calendar, LV_CALENDAR_STYLE_INACTIVE_DAYS, ext->style_inactive_days); } } /*Copy an existing calendar*/ @@ -235,8 +226,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe * WILL BE SAVED! CAN'T BE LOCAL ARRAY. * @param date_num number of dates in the array */ -void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, - uint16_t date_num) +void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); ext->highlighted_dates = highlighted; @@ -386,8 +376,8 @@ const char ** lv_calendar_get_month_names(const lv_obj_t * calendar) * */ const lv_style_t * lv_calendar_get_style(const lv_obj_t * calendar, lv_calendar_style_t type) { - const lv_style_t * style = NULL; - lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); + const lv_style_t * style = NULL; + lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); switch(type) { case LV_CALENDAR_STYLE_BG: style = lv_obj_get_style(calendar); break; @@ -435,8 +425,7 @@ static bool lv_calendar_design(lv_obj_t * calendar, const lv_area_t * mask, lv_d /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); - lv_draw_rect(&calendar->coords, mask, lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG), - opa_scale); + lv_draw_rect(&calendar->coords, mask, lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG), opa_scale); draw_header(calendar, mask); draw_day_names(calendar, mask); @@ -486,18 +475,18 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * ext->btn_pressing = 1; } - ext->pressed_date.year = 0; + ext->pressed_date.year = 0; ext->pressed_date.month = 0; - ext->pressed_date.day = 0; + ext->pressed_date.day = 0; } else if(calculate_touched_day(calendar, &p)) { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); ext->btn_pressing = 0; } else { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); - ext->btn_pressing = 0; - ext->pressed_date.year = 0; + ext->btn_pressing = 0; + ext->pressed_date.year = 0; ext->pressed_date.month = 0; - ext->pressed_date.day = 0; + ext->pressed_date.day = 0; } } else if(sign == LV_SIGNAL_PRESS_LOST) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); @@ -525,7 +514,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * if(res != LV_RES_OK) return res; } - ext->btn_pressing = 0; + ext->btn_pressing = 0; lv_obj_invalidate(calendar); } else if(sign == LV_SIGNAL_CONTROL) { uint8_t c = *((uint8_t *)param); @@ -574,8 +563,8 @@ static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touche const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); days_area.x1 += style_bg->body.padding.left; days_area.x2 -= style_bg->body.padding.right; - days_area.y1 = calendar->coords.y1 + get_header_height(calendar) + - get_day_names_height(calendar) - style_bg->body.padding.top; + days_area.y1 = + calendar->coords.y1 + get_header_height(calendar) + get_day_names_height(calendar) - style_bg->body.padding.top; if(lv_area_is_point_on(&days_area, touched_point)) { lv_coord_t w = (days_area.x2 - days_area.x1 + 1) / 7; @@ -591,25 +580,20 @@ static bool calculate_touched_day(lv_obj_t * calendar, const lv_point_t * touche i_pos = (y_pos * 7) + x_pos; lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); if(i_pos < get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1)) { - ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0); - ext->pressed_date.month = - ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); - ext->pressed_date.day = - get_month_length(ext->pressed_date.year, ext->pressed_date.month) - - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos; + ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0); + ext->pressed_date.month = ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); + ext->pressed_date.day = get_month_length(ext->pressed_date.year, ext->pressed_date.month) - + get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + 1 + i_pos; } else if(i_pos < (get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) + get_month_length(ext->showed_date.year, ext->showed_date.month))) { ext->pressed_date.year = ext->showed_date.year; ext->pressed_date.month = ext->showed_date.month; - ext->pressed_date.day = - i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); + ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1); } else if(i_pos < 42) { - ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0); - ext->pressed_date.month = - ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); - ext->pressed_date.day = - i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) - - get_month_length(ext->showed_date.year, ext->showed_date.month); + ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0); + ext->pressed_date.month = ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); + ext->pressed_date.day = i_pos + 1 - get_day_of_week(ext->showed_date.year, ext->showed_date.month, 1) - + get_month_length(ext->showed_date.year, ext->showed_date.month); } return true; } else { @@ -639,8 +623,8 @@ static lv_coord_t get_day_names_height(lv_obj_t * calendar) { lv_calendar_ext_t * ext = lv_obj_get_ext_attr(calendar); - return lv_font_get_line_height(ext->style_day_names->text.font) + - ext->style_day_names->body.padding.top + ext->style_day_names->body.padding.bottom; + return lv_font_get_line_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.top + + ext->style_day_names->body.padding.bottom; } /** @@ -668,23 +652,19 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); header_area.y1 += ext->style_header->body.padding.top; - lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, - NULL, -1, -1); + lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); /*Add the left arrow*/ const lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.left; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, - NULL, -1, -1); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1); /*Add the right arrow*/ - arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; - header_area.x1 = - header_area.x2 - ext->style_header->body.padding.right - - lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, - arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, - NULL, -1, -1); + arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; + header_area.x1 = header_area.x2 - ext->style_header->body.padding.right - + lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, + arrow_style->text.line_space, LV_TXT_FLAG_NONE); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, -1, -1); } /** @@ -698,19 +678,18 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); lv_coord_t l_pad = ext->style_day_names->body.padding.left; - lv_coord_t w = lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - - ext->style_day_names->body.padding.right; + lv_coord_t w = + lv_obj_get_width(calendar) - ext->style_day_names->body.padding.left - ext->style_day_names->body.padding.right; lv_coord_t box_w = w / 7; lv_area_t label_area; - label_area.y1 = - calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; + label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top; label_area.y2 = label_area.y1 + lv_font_get_line_height(ext->style_day_names->text.font); uint32_t i; for(i = 0; i < 7; i++) { label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; label_area.x2 = label_area.x1 + box_w - 1; - lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), - LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, + NULL, -1, -1); } } @@ -725,14 +704,12 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) const lv_style_t * style_bg = lv_calendar_get_style(calendar, LV_CALENDAR_STYLE_BG); lv_area_t label_area; lv_opa_t opa_scale = lv_obj_get_opa_scale(calendar); - label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + - ext->style_day_names->body.padding.top + + label_area.y1 = calendar->coords.y1 + get_header_height(calendar) + ext->style_day_names->body.padding.top + lv_font_get_line_height(ext->style_day_names->text.font) + ext->style_day_names->body.padding.bottom; label_area.y2 = label_area.y1 + lv_font_get_line_height(style_bg->text.font); - lv_coord_t w = - lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; + lv_coord_t w = lv_obj_get_width(calendar) - style_bg->body.padding.left - style_bg->body.padding.right; lv_coord_t h = calendar->coords.y2 - label_area.y1 - style_bg->body.padding.bottom; lv_coord_t box_w = w / 7; lv_coord_t vert_space = (h - (6 * lv_font_get_line_height(style_bg->text.font))) / 5; @@ -750,8 +727,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) act_style = style_bg; } else { draw_state = DAY_DRAW_PREV_MONTH; - day_cnt = get_month_length(ext->showed_date.year, - ext->showed_date.month - 1); /*Length of the previous month*/ + day_cnt = get_month_length(ext->showed_date.year, ext->showed_date.month - 1); /*Length of the previous month*/ day_cnt -= month_start_day - 1; /*First visible number of the previous month*/ act_style = ext->style_inactive_days; } @@ -768,16 +744,15 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) for(week = 0; week < 6; week++) { /*Draw the "week box"*/ - if(month_of_today_shown && ((draw_state == DAY_DRAW_ACT_MONTH && - ext->today.day >= day_cnt && ext->today.day < day_cnt + 7) || - (draw_state == DAY_DRAW_PREV_MONTH && - ext->today.day <= 7 - month_start_day && week == 0))) { + if(month_of_today_shown && + ((draw_state == DAY_DRAW_ACT_MONTH && ext->today.day >= day_cnt && ext->today.day < day_cnt + 7) || + (draw_state == DAY_DRAW_PREV_MONTH && ext->today.day <= 7 - month_start_day && week == 0))) { lv_area_t week_box_area; lv_area_copy(&week_box_area, &label_area); /*'label_area' is already set for this row*/ - week_box_area.x1 = calendar->coords.x1 + style_bg->body.padding.left - - ext->style_week_box->body.padding.left; - week_box_area.x2 = calendar->coords.x2 - style_bg->body.padding.right + - ext->style_week_box->body.padding.right; + week_box_area.x1 = + calendar->coords.x1 + style_bg->body.padding.left - ext->style_week_box->body.padding.left; + week_box_area.x2 = + calendar->coords.x2 - style_bg->body.padding.right + ext->style_week_box->body.padding.right; week_box_area.y1 -= ext->style_week_box->body.padding.top; week_box_area.y2 += ext->style_week_box->body.padding.bottom; @@ -805,13 +780,12 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) act_style = ext->style_inactive_days; } - label_area.x1 = calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + - style_bg->body.padding.right; + label_area.x1 = + calendar->coords.x1 + (w * day) / 7 + style_bg->body.padding.left + style_bg->body.padding.right; label_area.x2 = label_area.x1 + box_w - 1; /*Draw the "today box"*/ - if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && - ext->today.day == day_cnt) { + if(draw_state == DAY_DRAW_ACT_MONTH && month_of_today_shown && ext->today.day == day_cnt) { lv_area_t today_box_area; lv_area_copy(&today_box_area, &label_area); today_box_area.x1 = label_area.x1; @@ -825,21 +799,17 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*Get the final style : highlighted/week box/today box/normal*/ const lv_style_t * final_style; if(draw_state == DAY_DRAW_PREV_MONTH && - is_highlighted( - calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0), - ext->showed_date.month == 1 ? 12 : ext->showed_date.month - 1, day_cnt)) { + is_highlighted(calendar, ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0), + ext->showed_date.month == 1 ? 12 : ext->showed_date.month - 1, day_cnt)) { final_style = ext->style_highlighted_days; } else if(draw_state == DAY_DRAW_ACT_MONTH && - is_highlighted(calendar, ext->showed_date.year, ext->showed_date.month, - day_cnt)) { + is_highlighted(calendar, ext->showed_date.year, ext->showed_date.month, day_cnt)) { final_style = ext->style_highlighted_days; } else if(draw_state == DAY_DRAW_NEXT_MONTH && - is_highlighted( - calendar, ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0), - ext->showed_date.month == 12 ? 1 : ext->showed_date.month + 1, day_cnt)) { + is_highlighted(calendar, ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0), + ext->showed_date.month == 12 ? 1 : ext->showed_date.month + 1, day_cnt)) { final_style = ext->style_highlighted_days; - } else if(month_of_today_shown && day_cnt == ext->today.day && - draw_state == DAY_DRAW_ACT_MONTH) + } else if(month_of_today_shown && day_cnt == ext->today.day && draw_state == DAY_DRAW_ACT_MONTH) final_style = ext->style_today_box; else if(in_week_box && draw_state == DAY_DRAW_ACT_MONTH) final_style = ext->style_week_box; @@ -848,8 +818,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*Write the day's number*/ lv_utils_num_to_str(day_cnt, buf); - lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, - -1, -1); + lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); /*Go to the next day*/ day_cnt++; @@ -932,7 +901,7 @@ static uint8_t get_month_length(int32_t year, int32_t month) { month--; /*Range of months id [1..12] but range of indexes is [0..11]*/ if(month < 0) { - year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/ + year--; /*Already in the previous year (won't be less then -12 to skip a whole year)*/ month = 12 + month; /*`month` is negative, the result will be < 12*/ } if(month >= 12) { @@ -966,8 +935,7 @@ static uint8_t get_day_of_week(uint32_t year, uint32_t month, uint32_t day) uint32_t a = month < 3 ? 1 : 0; uint32_t b = year - a; - uint32_t day_of_week = - (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400)) % 7; + uint32_t day_of_week = (day + (31 * (month - 2 + 12 * a) / 12) + b + (b / 4) - (b / 100) + (b / 400)) % 7; return day_of_week; } diff --git a/src/lv_objx/lv_calendar.h b/src/lv_objx/lv_calendar.h index 997ecd6a8d84..ad7dda2a7f27 100644 --- a/src/lv_objx/lv_calendar.h +++ b/src/lv_objx/lv_calendar.h @@ -48,12 +48,10 @@ typedef struct lv_calendar_date_t * highlighted_dates; /*Apply different style on these days (pointer to an array defined by the user)*/ uint8_t highlighted_dates_num; /*Number of elements in `highlighted_days`*/ - int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/ + int8_t btn_pressing; /*-1: prev month pressing, +1 next month pressing on the header*/ lv_calendar_date_t pressed_date; - const char ** - day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/ - const char ** - month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ + const char ** day_names; /*Pointer to an array with the name of the days (NULL: use default names)*/ + const char ** month_names; /*Pointer to an array with the name of the month (NULL. use default names)*/ /*Styles*/ const lv_style_t * style_header; @@ -121,8 +119,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe * WILL BE SAVED! CAN'T BE LOCAL ARRAY. * @param date_num number of dates in the array */ -void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, - uint16_t date_num); +void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num); /** * Set the name of the days diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index cd1796861b34..854903f22e1c 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -214,8 +214,7 @@ const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_ * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, - lv_coord_t x, lv_coord_t y) +void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, lv_coord_t y) { lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); if(x + w >= ext->dsc.header.w || y + h >= ext->dsc.header.h) { @@ -247,8 +246,8 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l * @param pivot_y pivot Y of rotation. Relative to the source canvas * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, - lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y) +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, lv_coord_t offset_y, + int32_t pivot_x, int32_t pivot_y) { lv_canvas_ext_t * ext_dst = lv_obj_get_ext_attr(canvas); const lv_style_t * style = lv_canvas_get_style(canvas, LV_CANVAS_STYLE_MAIN); @@ -346,8 +345,7 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c lv_color_t y_dest = lv_color_mix(c_dest_int, c_dest_yn, yr); lv_color_t color_res = lv_color_mix(x_dest, y_dest, LV_OPA_50); - if(x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && - y + offset_y < dest_height) { + if(x + offset_x >= 0 && x + offset_x < dest_width && y + offset_y >= 0 && y + offset_y < dest_height) { /*If the image has no alpha channel just simple set the result color on the canvas*/ if(lv_img_color_format_has_alpha(img->header.cf) == false) { lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); @@ -361,29 +359,23 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c lv_opa_t opa_res = (opa_x + opa_y) / 2; if(opa_res <= LV_OPA_MIN) continue; - lv_color_t bg_color = - lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style); + lv_color_t bg_color = lv_img_buf_get_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, style); /*If the canvas has no alpha but the image has mix the image's color with * canvas*/ if(lv_img_color_format_has_alpha(ext_dst->dsc.header.cf) == false) { - if(opa_res < LV_OPA_MAX) - color_res = lv_color_mix(color_res, bg_color, opa_res); - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, - color_res); + if(opa_res < LV_OPA_MAX) color_res = lv_color_mix(color_res, bg_color, opa_res); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); } /*Both the image and canvas has alpha channel. Some extra calculation is required*/ else { - lv_opa_t bg_opa = - lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y); + lv_opa_t bg_opa = lv_img_buf_get_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y); /* Pick the foreground if it's fully opaque or the Background is fully * transparent*/ if(opa_res >= LV_OPA_MAX || bg_opa <= LV_OPA_MIN) { - lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, - color_res); - lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, - opa_res); + lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, color_res); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res); } /*Opaque background: use simple mix*/ else if(bg_opa >= LV_OPA_MAX) { @@ -395,8 +387,7 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c /*Info: * https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/ - lv_opa_t opa_res_2 = - 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8); + lv_opa_t opa_res_2 = 255 - ((uint16_t)((uint16_t)(255 - opa_res) * (255 - bg_opa)) >> 8); if(opa_res_2 == 0) { opa_res_2 = 1; /*never happens, just to be sure*/ } @@ -404,8 +395,7 @@ void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_c lv_img_buf_set_px_color(&ext_dst->dsc, x + offset_x, y + offset_y, lv_color_mix(color_res, bg_color, ratio)); - lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, - opa_res_2); + lv_img_buf_set_px_alpha(&ext_dst->dsc, x + offset_x, y + offset_y, opa_res_2); } } } @@ -432,7 +422,6 @@ void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color) lv_img_buf_set_px_color(dsc, x, y, color); } } - } /** @@ -444,7 +433,8 @@ void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color) * @param h height of the rectangle * @param style style of the rectangle (`body` properties are used except `padding`) */ -void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, const lv_style_t * style) +void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + const lv_style_t * style) { lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); @@ -466,12 +456,12 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord memset(&disp, 0, sizeof(lv_disp_t)); lv_disp_buf_t disp_buf; - lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); lv_area_copy(&disp_buf.area, &mask); lv_disp_drv_init(&disp.driver); - disp.driver.buffer = &disp_buf; + disp.driver.buffer = &disp_buf; disp.driver.hor_res = dsc->header.w; disp.driver.ver_res = dsc->header.h; @@ -493,7 +483,8 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord * @param txt text to display * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`) */ -void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, const char * txt, lv_label_align_t align) +void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, + const char * txt, lv_label_align_t align) { lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); @@ -515,12 +506,12 @@ void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord memset(&disp, 0, sizeof(lv_disp_t)); lv_disp_buf_t disp_buf; - lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); lv_area_copy(&disp_buf.area, &mask); lv_disp_drv_init(&disp.driver); - disp.driver.buffer = &disp_buf; + disp.driver.buffer = &disp_buf; disp.driver.hor_res = dsc->header.w; disp.driver.ver_res = dsc->header.h; @@ -529,18 +520,10 @@ void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord lv_txt_flag_t flag; switch(align) { - case LV_LABEL_ALIGN_LEFT: - flag = LV_TXT_FLAG_NONE; - break; - case LV_LABEL_ALIGN_RIGHT: - flag = LV_TXT_FLAG_RIGHT; - break; - case LV_LABEL_ALIGN_CENTER: - flag = LV_TXT_FLAG_CENTER; - break; - default: - flag = LV_TXT_FLAG_NONE; - break; + case LV_LABEL_ALIGN_LEFT: flag = LV_TXT_FLAG_NONE; break; + case LV_LABEL_ALIGN_RIGHT: flag = LV_TXT_FLAG_RIGHT; break; + case LV_LABEL_ALIGN_CENTER: flag = LV_TXT_FLAG_CENTER; break; + default: flag = LV_TXT_FLAG_NONE; break; } lv_draw_label(&coords, &mask, style, LV_OPA_COVER, txt, flag, NULL, LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF); @@ -571,12 +554,12 @@ void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t memset(&disp, 0, sizeof(lv_disp_t)); lv_disp_buf_t disp_buf; - lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); lv_area_copy(&disp_buf.area, &mask); lv_disp_drv_init(&disp.driver); - disp.driver.buffer = &disp_buf; + disp.driver.buffer = &disp_buf; disp.driver.hor_res = dsc->header.w; disp.driver.ver_res = dsc->header.h; @@ -614,12 +597,12 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32 memset(&disp, 0, sizeof(lv_disp_t)); lv_disp_buf_t disp_buf; - lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); lv_area_copy(&disp_buf.area, &mask); lv_disp_drv_init(&disp.driver); - disp.driver.buffer = &disp_buf; + disp.driver.buffer = &disp_buf; disp.driver.hor_res = dsc->header.w; disp.driver.ver_res = dsc->header.h; @@ -631,7 +614,6 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32 lv_refr_set_disp_refreshing(refr_ori); } - /** * Draw an arc on the canvas * @param canvas pointer to a canvas object @@ -642,7 +624,8 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32 * @param end_angle end angle in degrees * @param style style of the polygon (`body.main_color` and `body.opa` is used) */ -void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, const lv_style_t * style) +void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, + int32_t end_angle, const lv_style_t * style) { lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); @@ -658,12 +641,12 @@ void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_ memset(&disp, 0, sizeof(lv_disp_t)); lv_disp_buf_t disp_buf; - lv_disp_buf_init(&disp_buf, (void*)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); lv_area_copy(&disp_buf.area, &mask); lv_disp_drv_init(&disp.driver); - disp.driver.buffer = &disp_buf; + disp.driver.buffer = &disp_buf; disp.driver.hor_res = dsc->header.w; disp.driver.ver_res = dsc->header.h; diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 550ce64f52f6..a44fd66c8815 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -74,8 +74,7 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy); * @param cf color format. The following formats are supported: * LV_IMG_CF_TRUE_COLOR, LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, LV_IMG_CF_INDEXES_1/2/4/8BIT */ -void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, - lv_img_cf_t cf); +void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf); /** * Set the color of a pixel on the canvas @@ -136,8 +135,8 @@ const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_ * @param x left side of the destination position * @param y top side of the destination position */ -void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, - lv_coord_t x, lv_coord_t y); +void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, + lv_coord_t y); /** * Rotate and image and store the result on a canvas. @@ -152,8 +151,8 @@ void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, l * @param pivot_y pivot Y of rotation. Relative to the source canvas * Set to `source height / 2` to rotate around the center */ -void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, - lv_coord_t offset_y, int32_t pivot_x, int32_t pivot_y); +void lv_canvas_rotate(lv_obj_t * canvas, lv_img_dsc_t * img, int16_t angle, lv_coord_t offset_x, lv_coord_t offset_y, + int32_t pivot_x, int32_t pivot_y); /** * Fill the canvas with color @@ -171,7 +170,8 @@ void lv_canvas_fill_bg(lv_obj_t * canvas, lv_color_t color); * @param h height of the rectangle * @param style style of the rectangle (`body` properties are used except `padding`) */ -void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, const lv_style_t * style); +void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, + const lv_style_t * style); /** * Draw a text on the canvas. @@ -183,7 +183,8 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord * @param txt text to display * @param align align of the text (`LV_LABEL_ALIGN_LEFT/RIGHT/CENTER`) */ -void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, const char * txt, lv_label_align_t align); +void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, + const char * txt, lv_label_align_t align); /** * Draw a line on the canvas @@ -213,7 +214,8 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32 * @param end_angle end angle in degrees * @param style style of the polygon (`body.main_color` and `body.opa` is used) */ -void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, int32_t end_angle, const lv_style_t * style); +void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_angle, + int32_t end_angle, const lv_style_t * style); /********************** * MACROS @@ -222,27 +224,20 @@ void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_ #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h) #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) -#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) \ - ((((w / 8) + 1) * \ - h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) \ - (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) /*4 * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) \ + ((((w / 8) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) /*4 * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) \ - ((((w / 4) + 1) * \ - h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) \ - (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) /*4 * 4: palette*/ +#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) \ + ((((w / 4) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) /*4 * 4: palette*/ -#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) \ - ((((w / 2) + 1) * \ - h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) \ - (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) /*4 * 16: palette*/ +#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) \ + ((((w / 2) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) /*4 * 16: palette*/ #define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h)) -#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) \ - (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) /*4 * 256: palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) /*4 * 256: palette*/ #endif /*LV_USE_CANVAS*/ diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index ee4195911485..a817caa17ab9 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -74,8 +74,7 @@ lv_obj_t * lv_cb_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new checkbox object*/ if(copy == NULL) { ext->bullet = lv_btn_create(new_cb, NULL); - if(ancestor_bullet_design == NULL) - ancestor_bullet_design = lv_obj_get_design_cb(ext->bullet); + if(ancestor_bullet_design == NULL) ancestor_bullet_design = lv_obj_get_design_cb(ext->bullet); lv_obj_set_click(ext->bullet, false); ext->label = lv_label_create(new_cb, NULL); @@ -163,12 +162,8 @@ void lv_cb_set_style(lv_obj_t * cb, lv_cb_style_t type, const lv_style_t * style break; case LV_CB_STYLE_BOX_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_REL, style); break; case LV_CB_STYLE_BOX_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_PR, style); break; - case LV_CB_STYLE_BOX_TGL_REL: - lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_REL, style); - break; - case LV_CB_STYLE_BOX_TGL_PR: - lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_PR, style); - break; + case LV_CB_STYLE_BOX_TGL_REL: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_REL, style); break; + case LV_CB_STYLE_BOX_TGL_PR: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_TGL_PR, style); break; case LV_CB_STYLE_BOX_INA: lv_btn_set_style(ext->bullet, LV_BTN_STYLE_INA, style); break; } } @@ -202,12 +197,8 @@ const lv_style_t * lv_cb_get_style(const lv_obj_t * cb, lv_cb_style_t type) switch(type) { case LV_CB_STYLE_BOX_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_REL); break; case LV_CB_STYLE_BOX_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_PR); break; - case LV_CB_STYLE_BOX_TGL_REL: - style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_REL); - break; - case LV_CB_STYLE_BOX_TGL_PR: - style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_PR); - break; + case LV_CB_STYLE_BOX_TGL_REL: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_REL); break; + case LV_CB_STYLE_BOX_TGL_PR: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_TGL_PR); break; case LV_CB_STYLE_BOX_INA: style = lv_btn_get_style(ext->bullet, LV_BTN_STYLE_INA); break; default: style = NULL; break; } @@ -317,8 +308,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) lv_obj_set_size(ext->bullet, lv_font_get_line_height(label_style->text.font), lv_font_get_line_height(label_style->text.font)); lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); - } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || - sign == LV_SIGNAL_PRESS_LOST) { + } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); } else if(sign == LV_SIGNAL_CONTROL) { char c = *((char *)param); diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 5796dab21bdf..ebc0f5f3fd31 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -44,8 +44,8 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask); static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i); -static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i); -static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i); +static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i); +static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i); /********************** * STATIC VARIABLES @@ -84,16 +84,16 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) lv_ll_init(&ext->series_ll, sizeof(lv_chart_series_t)); - ext->series.num = 0; - ext->ymin = LV_CHART_YMIN_DEF; - ext->ymax = LV_CHART_YMAX_DEF; - ext->hdiv_cnt = LV_CHART_HDIV_DEF; - ext->vdiv_cnt = LV_CHART_VDIV_DEF; - ext->point_cnt = LV_CHART_PNUM_DEF; - ext->type = LV_CHART_TYPE_LINE; - ext->update_mode = LV_CHART_UPDATE_MODE_SHIFT; - ext->series.opa = LV_OPA_COVER; - ext->series.dark = LV_OPA_50; + ext->series.num = 0; + ext->ymin = LV_CHART_YMIN_DEF; + ext->ymax = LV_CHART_YMAX_DEF; + ext->hdiv_cnt = LV_CHART_HDIV_DEF; + ext->vdiv_cnt = LV_CHART_VDIV_DEF; + ext->point_cnt = LV_CHART_PNUM_DEF; + ext->type = LV_CHART_TYPE_LINE; + ext->update_mode = LV_CHART_UPDATE_MODE_SHIFT; + ext->series.opa = LV_OPA_COVER; + ext->series.dark = LV_OPA_50; ext->series.width = 2; ext->margin = 0; memset(&ext->x_axis, 0, sizeof(ext->x_axis)); @@ -160,7 +160,7 @@ lv_chart_series_t * lv_chart_add_series(lv_obj_t * chart, lv_color_t color) if(ser == NULL) return NULL; - ser->color = color; + ser->color = color; ser->points = lv_mem_alloc(sizeof(lv_coord_t) * ext->point_cnt); lv_mem_assert(ser->points); if(ser->points == NULL) { @@ -281,16 +281,16 @@ void lv_chart_set_point_count(lv_obj_t * chart, uint16_t point_cnt) if(point_cnt >= point_cnt_old) { for(i = 0; i < point_cnt_old; i++) { - new_points[i] = ser->points[(i + ser->start_point) % - point_cnt_old]; /*Copy old contents to new array*/ + new_points[i] = + ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/ } for(i = point_cnt_old; i < point_cnt; i++) { new_points[i] = def; /*Fill up the rest with default value*/ } } else { for(i = 0; i < point_cnt; i++) { - new_points[i] = ser->points[(i + ser->start_point) % - point_cnt_old]; /*Copy old contents to new array*/ + new_points[i] = + ser->points[(i + ser->start_point) % point_cnt_old]; /*Copy old contents to new array*/ } } @@ -397,22 +397,23 @@ void lv_chart_set_points(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y */ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - if(ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT) { - ser->points[ser->start_point] = y; /*This was the place of the former left most value, after shifting it is the rightmost*/ - ser->start_point = (ser->start_point + 1) % ext->point_cnt; - lv_chart_refresh(chart); - } else if(ext->update_mode == LV_CHART_UPDATE_MODE_CIRCULAR) { - ser->points[ser->start_point] = y; - - if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser->start_point); - if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser->start_point); - if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser->start_point); - if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser->start_point); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT) { + ser->points[ser->start_point] = + y; /*This was the place of the former left most value, after shifting it is the rightmost*/ + ser->start_point = (ser->start_point + 1) % ext->point_cnt; + lv_chart_refresh(chart); + } else if(ext->update_mode == LV_CHART_UPDATE_MODE_CIRCULAR) { + ser->points[ser->start_point] = y; + + if(ext->type & LV_CHART_TYPE_LINE) lv_chart_inv_lines(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_COLUMN) lv_chart_inv_cols(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_POINT) lv_chart_inv_points(chart, ser->start_point); + if(ext->type & LV_CHART_TYPE_VERTICAL_LINE) lv_chart_inv_lines(chart, ser->start_point); if(ext->type & LV_CHART_TYPE_AREA) lv_chart_inv_lines(chart, ser->start_point); - ser->start_point = (ser->start_point + 1) % ext->point_cnt;/*update the x for next incoming y*/ - } + ser->start_point = (ser->start_point + 1) % ext->point_cnt; /*update the x for next incoming y*/ + } } /** @@ -422,11 +423,11 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y) */ void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - if(ext->update_mode == update_mode) return; + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + if(ext->update_mode == update_mode) return; - ext->update_mode = update_mode; - lv_obj_invalidate(chart); + ext->update_mode = update_mode; + lv_obj_invalidate(chart); } /** @@ -450,9 +451,8 @@ void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin) * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ -void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, - uint8_t major_tick_len, uint8_t minor_tick_len, - lv_chart_axis_options_t options) +void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->x_axis.num_tick_marks = num_tick_marks; @@ -462,9 +462,8 @@ void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t ext->x_axis.options = options; } -void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, - uint8_t major_tick_len, uint8_t minor_tick_len, - lv_chart_axis_options_t options) +void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options) { lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); ext->y_axis.num_tick_marks = num_tick_marks; @@ -668,10 +667,8 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) for(div_i = div_i_start; div_i <= div_i_end; div_i++) { p1.y = (int32_t)((int32_t)h * div_i) / (ext->hdiv_cnt + 1); p1.y += y_ofs; - if(div_i == div_i_start) - p1.y += (style->line.width >> 1) + 1; /*The first line might not be visible*/ - if(div_i == div_i_end) - p1.y -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ + if(div_i == div_i_start) p1.y += (style->line.width >> 1) + 1; /*The first line might not be visible*/ + if(div_i == div_i_end) p1.y -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ p2.y = p1.y; lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -693,10 +690,8 @@ static void lv_chart_draw_div(lv_obj_t * chart, const lv_area_t * mask) for(div_i = div_i_start; div_i <= div_i_end; div_i++) { p1.x = (int32_t)((int32_t)w * div_i) / (ext->vdiv_cnt + 1); p1.x += x_ofs; - if(div_i == div_i_start) - p1.x += (style->line.width >> 1) + 1; /*The first line might not be visible*/ - if(div_i == div_i_end) - p1.x -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ + if(div_i == div_i_start) p1.x += (style->line.width >> 1) + 1; /*The first line might not be visible*/ + if(div_i == div_i_end) p1.x -= (style->line.width >> 1) + 1; /*The last line might not be visible*/ p2.x = p1.x; lv_draw_line(&p1, &p2, mask, style, opa_scale); } @@ -755,8 +750,7 @@ static void lv_chart_draw_lines(lv_obj_t * chart, const lv_area_t * mask) y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; - if(ser->points[p_prev] != LV_CHART_POINT_DEF && - ser->points[p_act] != LV_CHART_POINT_DEF) + if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) lv_draw_line(&p1, &p2, mask, &style, opa_scale); p_prev = p_act; @@ -793,7 +787,8 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; style_point.body.main_color = ser->color; @@ -805,7 +800,7 @@ static void lv_chart_draw_points(lv_obj_t * chart, const lv_area_t * mask) cir_a.x1 -= style_point.body.radius; p_act = (start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); cir_a.y1 = h - y_tmp + y_ofs; @@ -837,9 +832,8 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) int32_t y_tmp; lv_chart_series_t * ser; lv_style_t rects; - lv_coord_t col_w = - w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ - lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ + lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ + lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ lv_style_copy(&rects, &lv_style_plain); rects.body.border.width = 0; @@ -856,11 +850,12 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) x_act += chart->coords.x1 + x_ofs; /*Draw the current point of all data line*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; - col_a.x1 = x_act; - col_a.x2 = col_a.x1 + col_w; + col_a.x1 = x_act; + col_a.x2 = col_a.x1 + col_w; x_act += col_w; if(col_a.x2 < mask->x1) continue; @@ -870,9 +865,9 @@ static void lv_chart_draw_cols(lv_obj_t * chart, const lv_area_t * mask) rects.body.grad_color = lv_color_mix(LV_COLOR_BLACK, ser->color, ext->series.dark); lv_coord_t p_act = (start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; - y_tmp = y_tmp / (ext->ymax - ext->ymin); - col_a.y1 = h - y_tmp + chart->coords.y1; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; + y_tmp = y_tmp / (ext->ymax - ext->ymin); + col_a.y1 = h - y_tmp + chart->coords.y1; mask_ret = lv_area_intersect(&col_mask, mask, &col_a); if(mask_ret != false && ser->points[p_act] != LV_CHART_POINT_DEF) { @@ -901,7 +896,7 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas lv_point_t p1; lv_point_t p2; lv_coord_t p_act; - lv_coord_t h = lv_obj_get_height(chart); + lv_coord_t h = lv_obj_get_height(chart); lv_coord_t x_ofs = chart->coords.x1; lv_coord_t y_ofs = chart->coords.y1; int32_t y_tmp; @@ -913,9 +908,10 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas style.line.width = ext->series.width; /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; - style.line.color = ser->color; + style.line.color = ser->color; p1.x = 0 + x_ofs; p2.x = 0 + x_ofs; @@ -924,11 +920,10 @@ static void lv_chart_draw_vertical_lines(lv_obj_t * chart, const lv_area_t * mas p2.y = h - y_tmp + y_ofs; p1.y = p2.y; - for(i = 0; i < ext->point_cnt; i++) - { + for(i = 0; i < ext->point_cnt; i++) { p_act = (start_point + i) % ext->point_cnt; - y_tmp = (int32_t)((int32_t) ser->points[p_act] - ext->ymin) * h; + y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; @@ -971,10 +966,11 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) lv_style_copy(&style, &lv_style_plain); /*Go through all data lines*/ - LV_LL_READ_BACK(ext->series_ll, ser) { + LV_LL_READ_BACK(ext->series_ll, ser) + { lv_coord_t start_point = ext->update_mode == LV_CHART_UPDATE_MODE_SHIFT ? ser->start_point : 0; - style.body.main_color = ser->color; - style.body.opa = ext->series.opa; + style.body.main_color = ser->color; + style.body.opa = ext->series.opa; p2.x = 0 + x_ofs; @@ -988,14 +984,13 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) p1.y = p2.y; p_act = (start_point + i) % ext->point_cnt; - p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; y_tmp = (int32_t)((int32_t)ser->points[p_act] - ext->ymin) * h; y_tmp = y_tmp / (ext->ymax - ext->ymin); p2.y = h - y_tmp + y_ofs; - if(ser->points[p_prev] != LV_CHART_POINT_DEF && - ser->points[p_act] != LV_CHART_POINT_DEF) { + if(ser->points[p_prev] != LV_CHART_POINT_DEF && ser->points[p_act] != LV_CHART_POINT_DEF) { lv_point_t triangle_points[3]; triangle_points[0] = p1; triangle_points[1] = p2; @@ -1003,7 +998,7 @@ static void lv_chart_draw_areas(lv_obj_t * chart, const lv_area_t * mask) triangle_points[2].y = chart->coords.y2; lv_draw_triangle(triangle_points, mask, &style, opa_scale); triangle_points[2].x = p2.x; - triangle_points[0].y =chart->coords.y2; + triangle_points[0].y = chart->coords.y2; lv_draw_triangle(triangle_points, mask, &style, opa_scale); } p_prev = p_act; @@ -1031,8 +1026,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t y_ofs = chart->coords.y1; lv_coord_t h = lv_obj_get_height(chart); lv_coord_t w = lv_obj_get_width(chart); - char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + - 1]; /* up to N symbols per label + null terminator */ + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + 1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ if(ext->y_axis.major_tick_len == 0) @@ -1065,9 +1059,8 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) else num_scale_ticks = (ext->y_axis.num_tick_marks * (num_of_labels - 1)); - for(i = 0; i < (num_scale_ticks + 1); - i++) { /* one extra loop - it may not exist in the list, empty label */ - /* first point of the tick */ + for(i = 0; i < (num_scale_ticks + 1); i++) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ p1.x = 0 + x_ofs; /* second point of the tick */ @@ -1077,8 +1070,8 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) p2.x = p1.x - minor_tick_len; /* minor tick */ /* draw a line at moving y position */ - p2.y = p1.y = y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - - LV_CHART_AXIS_Y_TICK_OFFSET_FIX; + p2.y = p1.y = + y_ofs + h - (int32_t)(((int32_t)h * i) / num_scale_ticks + 1) - LV_CHART_AXIS_Y_TICK_OFFSET_FIX; if(i != num_scale_ticks) lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -1108,15 +1101,13 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) /* reserve appropriate area */ lv_point_t size; - lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, LV_TXT_FLAG_CENTER); /* set the area at some distance of the major tick len left of the tick */ - lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), - (p2.y - size.y / 2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), - (p2.y + size.y / 2)}; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, - -1); + lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y - size.y / 2), + (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y + size.y / 2)}; + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); } } } @@ -1144,8 +1135,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) lv_coord_t y_ofs = chart->coords.y1; lv_coord_t h = lv_obj_get_height(chart); lv_coord_t w = lv_obj_get_width(chart); - char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + - 1]; /* up to N symbols per label + null terminator */ + char buf[LV_CHART_AXIS_TICK_LABEL_MAX_LEN + 1]; /* up to N symbols per label + null terminator */ /* calculate the size of tick marks */ if(ext->x_axis.major_tick_len == 0) @@ -1178,9 +1168,8 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) else num_scale_ticks = (ext->x_axis.num_tick_marks * (num_of_labels - 1)); - for(i = 0; i < (num_scale_ticks + 1); - i++) { /* one extra loop - it may not exist in the list, empty label */ - /* first point of the tick */ + for(i = 0; i < (num_scale_ticks + 1); i++) { /* one extra loop - it may not exist in the list, empty label */ + /* first point of the tick */ p1.y = h + y_ofs; /* second point of the tick */ @@ -1190,8 +1179,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) p2.y = p1.y + minor_tick_len; /* minor tick */ /* draw a line at moving x position */ - p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - - LV_CHART_AXIS_X_TICK_OFFSET_FIX; + p2.x = p1.x = x_ofs + (int32_t)(((int32_t)w * i) / num_scale_ticks + 1) - LV_CHART_AXIS_X_TICK_OFFSET_FIX; if(i != num_scale_ticks) lv_draw_line(&p1, &p2, mask, style, opa_scale); @@ -1221,15 +1209,13 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) /* reserve appropriate area */ lv_point_t size; - lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_CENTER); + lv_txt_get_size(&size, buf, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, LV_TXT_FLAG_CENTER); /* set the area at some distance of the major tick len under of the tick */ - lv_area_t a = {(p2.x - size.x / 2), (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), - (p2.x + size.x / 2), + lv_area_t a = {(p2.x - size.x / 2), (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x / 2), (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE)}; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, - -1); + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); } } } @@ -1248,13 +1234,13 @@ static void lv_chart_draw_axes(lv_obj_t * chart, const lv_area_t * mask) */ static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t x_ofs = chart->coords.x1; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t x_ofs = chart->coords.x1; - if(i < ext->point_cnt) { - lv_area_t coords; + if(i < ext->point_cnt) { + lv_area_t coords; lv_obj_get_coords(chart, &coords); if(i < ext->point_cnt - 1) { coords.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs - ext->series.width; @@ -1267,7 +1253,7 @@ static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i) coords.x2 = ((w * i) / (ext->point_cnt - 1)) + x_ofs + ext->series.width; lv_inv_area(lv_obj_get_disp(chart), &coords); } - } + } } /** @@ -1277,16 +1263,16 @@ static void lv_chart_inv_lines(lv_obj_t * chart, uint16_t i) */ static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_area_t cir_a; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t x_ofs = chart->coords.x1; + lv_area_t cir_a; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t x_ofs = chart->coords.x1; - lv_obj_get_coords(chart, &cir_a); - cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; - cir_a.x2 = cir_a.x1 + ext->series.width; - cir_a.x1 -= ext->series.width; + lv_obj_get_coords(chart, &cir_a); + cir_a.x1 = ((w * i) / (ext->point_cnt - 1)) + x_ofs; + cir_a.x2 = cir_a.x1 + ext->series.width; + cir_a.x1 -= ext->series.width; lv_inv_area(lv_obj_get_disp(chart), &cir_a); } @@ -1298,21 +1284,21 @@ static void lv_chart_inv_points(lv_obj_t * chart, uint16_t i) */ static void lv_chart_inv_cols(lv_obj_t * chart, uint16_t i) { - lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); + lv_chart_ext_t * ext = lv_obj_get_ext_attr(chart); - lv_area_t col_a; - lv_coord_t w = lv_obj_get_width(chart); - lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ - lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ + lv_area_t col_a; + lv_coord_t w = lv_obj_get_width(chart); + lv_coord_t col_w = w / ((ext->series.num + 1) * ext->point_cnt); /* Suppose + 1 series as separator*/ + lv_coord_t x_ofs = col_w / 2; /*Shift with a half col.*/ - lv_coord_t x_act; + lv_coord_t x_act; - x_act = (int32_t)((int32_t) w * i) / ext->point_cnt; - x_act += chart->coords.x1 + x_ofs; + x_act = (int32_t)((int32_t)w * i) / ext->point_cnt; + x_act += chart->coords.x1 + x_ofs; - lv_obj_get_coords(chart, &col_a); - col_a.x1 = x_act; - col_a.x2 = col_a.x1 + col_w; + lv_obj_get_coords(chart, &col_a); + col_a.x1 = x_act; + col_a.x2 = col_a.x1 + col_w; lv_inv_area(lv_obj_get_disp(chart), &col_a); } diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 49cb6ecfd83c..3c3b601962f3 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -35,23 +35,21 @@ extern "C" { /*Chart types*/ enum { - LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ - LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ - LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ - LV_CHART_TYPE_VERTICAL_LINE = - 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ - LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ + LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ + LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ + LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ + LV_CHART_TYPE_VERTICAL_LINE = 0x08, /*Draw vertical lines on points (useful when chart width == point count)*/ + LV_CHART_TYPE_AREA = 0x10, /*Draw area chart*/ }; typedef uint8_t lv_chart_type_t; /*Chart update mode*/ -enum -{ - LV_CHART_UPDATE_MODE_SHIFT, - LV_CHART_UPDATE_MODE_CIRCULAR, +enum { + LV_CHART_UPDATE_MODE_SHIFT, + LV_CHART_UPDATE_MODE_CIRCULAR, }; typedef uint8_t lv_chart_update_mode_t; - + typedef struct { lv_coord_t * points; @@ -89,7 +87,7 @@ typedef struct lv_chart_axis_cfg_t y_axis; lv_chart_axis_cfg_t x_axis; uint16_t margin; - uint8_t update_mode: 1; + uint8_t update_mode : 1; struct { lv_coord_t width; /*Line width or point radius*/ @@ -216,7 +214,7 @@ void lv_chart_set_next(lv_obj_t * chart, lv_chart_series_t * ser, lv_coord_t y); * @param update mode */ void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mode); - + /** * Set the style of a chart * @param chart pointer to a chart object @@ -244,13 +242,11 @@ void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin); * @param minor_tick_len the length of the minor tick, AUTO if 0 * @param options extra options */ -void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, - uint8_t major_tick_len, uint8_t minor_tick_len, - lv_chart_axis_options_t options); +void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options); -void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, - uint8_t major_tick_len, uint8_t minor_tick_len, - lv_chart_axis_options_t options); +void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, + uint8_t minor_tick_len, lv_chart_axis_options_t options); /*===================== * Getter functions diff --git a/src/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c index 690d09cc6f04..79443fbf737a 100644 --- a/src/lv_objx/lv_cont.c +++ b/src/lv_objx/lv_cont.c @@ -146,8 +146,7 @@ void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t t { lv_obj_invalidate(cont); lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->fit_left == left && ext->fit_right == right && ext->fit_top == top && - ext->fit_bottom == bottom) { + if(ext->fit_left == left && ext->fit_right == right && ext->fit_top == top && ext->fit_bottom == bottom) { return; } @@ -245,8 +244,7 @@ static lv_res_t lv_cont_signal(lv_obj_t * cont, lv_signal_t sign, void * param) lv_cont_refr_layout(cont); lv_cont_refr_autofit(cont); } else if(sign == LV_SIGNAL_CORD_CHG) { - if(lv_obj_get_width(cont) != lv_area_get_width(param) || - lv_obj_get_height(cont) != lv_area_get_height(param)) { + if(lv_obj_get_width(cont) != lv_area_get_width(param) || lv_obj_get_height(cont) != lv_area_get_height(param)) { lv_cont_refr_layout(cont); lv_cont_refr_autofit(cont); } @@ -332,8 +330,7 @@ static void lv_cont_layout_col(lv_obj_t * cont) lv_coord_t last_cord = style->body.padding.top; LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) - continue; + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; lv_obj_align(child, cont, align, hpad_corr, last_cord); last_cord += lv_obj_get_height(child) + style->body.padding.inner; @@ -383,8 +380,7 @@ static void lv_cont_layout_row(lv_obj_t * cont) lv_coord_t last_cord = style->body.padding.left; LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) - continue; + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; lv_obj_align(child, cont, align, last_cord, vpad_corr); last_cord += lv_obj_get_width(child) + style->body.padding.inner; @@ -406,8 +402,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) LV_LL_READ(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) - continue; + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; h_tot += lv_obj_get_height(child) + style->body.padding.inner; obj_num++; } @@ -424,8 +419,7 @@ static void lv_cont_layout_center(lv_obj_t * cont) lv_coord_t last_cord = -(h_tot / 2); LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) - continue; + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; lv_obj_align(child, cont, LV_ALIGN_CENTER, 0, last_cord + lv_obj_get_height(child) / 2); last_cord += lv_obj_get_height(child) + style->body.padding.inner; @@ -458,14 +452,13 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) child_rc = child_rs; /*Initially the the row starter and closer is the same*/ while(child_rs != NULL) { lv_coord_t h_row = 0; - lv_coord_t w_row = style->body.padding.left + - style->body.padding.right; /*The width is at least the left+right hpad*/ + lv_coord_t w_row = + style->body.padding.left + style->body.padding.right; /*The width is at least the left+right hpad*/ uint32_t obj_num = 0; /*Find the row closer object and collect some data*/ do { - if(lv_obj_get_hidden(child_rc) == false && - lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) { + if(lv_obj_get_hidden(child_rc) == false && lv_obj_is_protected(child_rc, LV_PROTECT_POS) == false) { /*If this object is already not fit then break*/ if(w_row + lv_obj_get_width(child_rc) > w_obj) { /*Step back one child because the last already not fit, so the previous is the @@ -475,10 +468,8 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) } break; } - w_row += lv_obj_get_width(child_rc) + - style->body.padding.inner; /*Add the object width + opad*/ - h_row = - LV_MATH_MAX(h_row, lv_obj_get_height(child_rc)); /*Search the highest object*/ + w_row += lv_obj_get_width(child_rc) + style->body.padding.inner; /*Add the object width + opad*/ + h_row = LV_MATH_MAX(h_row, lv_obj_get_height(child_rc)); /*Search the highest object*/ obj_num++; if(lv_obj_is_protected(child_rc, LV_PROTECT_FOLLOW)) break; /*If can not be followed by an other object then break here*/ @@ -493,8 +484,7 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) if(obj_num == 0) { if(child_rc != NULL) { lv_obj_align(child_rc, cont, LV_ALIGN_IN_TOP_MID, 0, act_y); - h_row = - lv_obj_get_height(child_rc); /*Not set previously because of the early break*/ + h_row = lv_obj_get_height(child_rc); /*Not set previously because of the early break*/ } } /*If there is only one object in the row then align it to the middle*/ @@ -507,10 +497,8 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) lv_obj_t * obj2 = lv_ll_get_prev(&cont->child_ll, child_rs); w_row = lv_obj_get_width(obj1) + lv_obj_get_width(obj2); lv_coord_t pad = (w_obj - w_row) / 3; - lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT, pad, - act_y + (h_row - lv_obj_get_height(obj1)) / 2); - lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT, -pad, - act_y + (h_row - lv_obj_get_height(obj2)) / 2); + lv_obj_align(obj1, cont, LV_ALIGN_IN_TOP_LEFT, pad, act_y + (h_row - lv_obj_get_height(obj1)) / 2); + lv_obj_align(obj2, cont, LV_ALIGN_IN_TOP_RIGHT, -pad, act_y + (h_row - lv_obj_get_height(obj2)) / 2); } /* Align the children (from child_rs to child_rc)*/ else { @@ -519,8 +507,7 @@ static void lv_cont_layout_pretty(lv_obj_t * cont) lv_coord_t act_x = style->body.padding.left; /*x init*/ child_tmp = child_rs; while(child_tmp != NULL) { - if(lv_obj_get_hidden(child_tmp) == false && - lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) { + if(lv_obj_get_hidden(child_tmp) == false && lv_obj_is_protected(child_tmp, LV_PROTECT_POS) == false) { lv_obj_align(child_tmp, cont, LV_ALIGN_IN_TOP_LEFT, act_x, act_y + (h_row - lv_obj_get_height(child_tmp)) / 2); act_x += lv_obj_get_width(child_tmp) + new_opad; @@ -550,11 +537,10 @@ static void lv_cont_layout_grid(lv_obj_t * cont) lv_coord_t w_obj = lv_obj_get_width(lv_obj_get_child(cont, NULL)); lv_coord_t h_obj = lv_obj_get_height(lv_obj_get_child(cont, NULL)); uint16_t obj_row = (w_tot - style->body.padding.left - style->body.padding.right) / - (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ + (w_obj + style->body.padding.inner); /*Obj. num. in a row*/ lv_coord_t x_ofs; if(obj_row > 1) { - x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - - (obj_row * w_obj)) / + x_ofs = (w_obj + (w_tot - style->body.padding.left - style->body.padding.right) - (obj_row * w_obj)) / (obj_row - 1); } else { x_ofs = w_tot / 2 - w_obj / 2; @@ -571,8 +557,7 @@ static void lv_cont_layout_grid(lv_obj_t * cont) uint16_t obj_cnt = 0; LV_LL_READ_BACK(cont->child_ll, child) { - if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) - continue; + if(lv_obj_get_hidden(child) != false || lv_obj_is_protected(child, LV_PROTECT_POS) != false) continue; if(obj_row > 1) { lv_obj_set_pos(child, act_x, act_y); @@ -600,8 +585,8 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) { lv_cont_ext_t * ext = lv_obj_get_ext_attr(cont); - if(ext->fit_left == LV_FIT_NONE && ext->fit_right == LV_FIT_NONE && - ext->fit_top == LV_FIT_NONE && ext->fit_bottom == LV_FIT_NONE) { + if(ext->fit_left == LV_FIT_NONE && ext->fit_right == LV_FIT_NONE && ext->fit_top == LV_FIT_NONE && + ext->fit_bottom == LV_FIT_NONE) { return; } @@ -652,42 +637,34 @@ static void lv_cont_refr_autofit(lv_obj_t * cont) switch(ext->fit_left) { case LV_FIT_TIGHT: new_area.x1 = tight_area.x1; break; case LV_FIT_FLOOD: new_area.x1 = flood_area.x1; break; - case LV_FIT_FILL: - new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; - break; + case LV_FIT_FILL: new_area.x1 = has_children ? LV_MATH_MIN(tight_area.x1, flood_area.x1) : flood_area.x1; break; default: break; } switch(ext->fit_right) { case LV_FIT_TIGHT: new_area.x2 = tight_area.x2; break; case LV_FIT_FLOOD: new_area.x2 = flood_area.x2; break; - case LV_FIT_FILL: - new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; - break; + case LV_FIT_FILL: new_area.x2 = has_children ? LV_MATH_MAX(tight_area.x2, flood_area.x2) : flood_area.x2; break; default: break; } switch(ext->fit_top) { case LV_FIT_TIGHT: new_area.y1 = tight_area.y1; break; case LV_FIT_FLOOD: new_area.y1 = flood_area.y1; break; - case LV_FIT_FILL: - new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; - break; + case LV_FIT_FILL: new_area.y1 = has_children ? LV_MATH_MIN(tight_area.y1, flood_area.y1) : flood_area.y1; break; default: break; } switch(ext->fit_bottom) { case LV_FIT_TIGHT: new_area.y2 = tight_area.y2; break; case LV_FIT_FLOOD: new_area.y2 = flood_area.y2; break; - case LV_FIT_FILL: - new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; - break; + case LV_FIT_FILL: new_area.y2 = has_children ? LV_MATH_MAX(tight_area.y2, flood_area.y2) : flood_area.y2; break; default: break; } /*Do nothing if the coordinates are not changed*/ - if(cont->coords.x1 != new_area.x1 || cont->coords.y1 != new_area.y1 || - cont->coords.x2 != new_area.x2 || cont->coords.y2 != new_area.y2) { + if(cont->coords.x1 != new_area.x1 || cont->coords.y1 != new_area.y1 || cont->coords.x2 != new_area.x2 || + cont->coords.y2 != new_area.y2) { lv_obj_invalidate(cont); lv_area_copy(&cont->coords, &new_area); diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index 0d44c81a90dd..a53b5024520a 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -98,8 +98,7 @@ void lv_cont_set_layout(lv_obj_t * cont, lv_layout_t layout); * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, - lv_fit_t bottom); +void lv_cont_set_fit4(lv_obj_t * cont, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom); /** * Set the fit policy horizontally and vertically separately. diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 004f03690d01..9d3ce58d1308 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -43,10 +43,10 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * static lv_res_t release_handler(lv_obj_t * ddlist); static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); -static void lv_ddlist_refr_width(lv_obj_t* ddlist); +static void lv_ddlist_refr_width(lv_obj_t * ddlist); #if LV_USE_ANIMATION static void lv_ddlist_anim_ready_cb(lv_anim_t * a); -static void lv_ddlist_anim_finish(lv_obj_t* ddlist); +static void lv_ddlist_anim_finish(lv_obj_t * ddlist); static void lv_ddlist_adjust_height(lv_obj_t * ddlist, lv_anim_value_t height); #endif @@ -82,8 +82,7 @@ lv_obj_t * lv_ddlist_create(lv_obj_t * par, const lv_obj_t * copy) if(new_ddlist == NULL) return NULL; if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_ddlist); - if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ddlist)); + if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_ddlist)); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_ddlist); /*Allocate the drop down list type specific extended data*/ @@ -184,15 +183,9 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options) lv_ddlist_refr_width(ddlist); switch(lv_label_get_align(ext->label)) { - case LV_LABEL_ALIGN_LEFT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); - break; - case LV_LABEL_ALIGN_CENTER: - lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); - break; - case LV_LABEL_ALIGN_RIGHT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); - break; + case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break; + case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break; + case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break; } lv_ddlist_refr_size(ddlist, false); @@ -317,17 +310,10 @@ void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align) lv_label_set_align(ext->label, align); switch(align) { - case LV_LABEL_ALIGN_LEFT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); - break; - case LV_LABEL_ALIGN_CENTER: - lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); - break; - case LV_LABEL_ALIGN_RIGHT: - lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); - break; + case LV_LABEL_ALIGN_LEFT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_LEFT_MID, 0, 0); break; + case LV_LABEL_ALIGN_CENTER: lv_obj_align(ext->label, NULL, LV_ALIGN_CENTER, 0, 0); break; + case LV_LABEL_ALIGN_RIGHT: lv_obj_align(ext->label, NULL, LV_ALIGN_IN_RIGHT_MID, 0, 0); break; } - } /*===================== * Getter functions @@ -592,8 +578,8 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.color = sel_style->text.color; new_style.text.opa = sel_style->text.opa; lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist); - lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, - lv_label_get_text(ext->label), flag, NULL, -1, -1); + lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, lv_label_get_text(ext->label), + flag, NULL, -1, -1); } } @@ -611,9 +597,8 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.opa = sel_style->text.opa; lv_area_t area_arrow; area_arrow.x2 = ddlist->coords.x2 - style->body.padding.right; - area_arrow.x1 = - area_arrow.x2 - lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), - sel_style->text.font, 0, 0); + area_arrow.x1 = area_arrow.x2 - + lv_txt_get_width(LV_SYMBOL_DOWN, strlen(LV_SYMBOL_DOWN), sel_style->text.font, 0, 0); area_arrow.y1 = ddlist->coords.y1 + style->text.line_space; area_arrow.y2 = area_arrow.y1 + font_h; @@ -622,10 +607,9 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig bool area_ok; area_ok = lv_area_intersect(&mask_arrow, mask, &area_arrow); if(area_ok) { - lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, LV_SYMBOL_DOWN, - LV_TXT_FLAG_NONE, NULL, -1, - -1); /*Use a down arrow in ddlist, you can replace it with your - custom symbol*/ + lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, + NULL, -1, -1); /*Use a down arrow in ddlist, you can replace it with your + custom symbol*/ } } } @@ -761,7 +745,7 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * /* Because of the wider selected rectangle ext. size * In this way by dragging the scrollable part the wider rectangle area can be redrawn too*/ const lv_style_t * style = lv_ddlist_get_style(ddlist, LV_DDLIST_STYLE_BG); - lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); + lv_coord_t hpad = LV_MATH_MAX(style->body.padding.left, style->body.padding.right); if(scrl->ext_draw_pad < hpad) scrl->ext_draw_pad = hpad; } else if(sign == LV_SIGNAL_RELEASED) { if(lv_indev_is_dragging(lv_indev_get_act()) == false) { @@ -794,15 +778,14 @@ static lv_res_t release_handler(lv_obj_t * ddlist) lv_indev_t * indev = lv_indev_get_act(); if(lv_indev_get_type(indev) == LV_INDEV_TYPE_ENCODER) { ext->sel_opt_id_ori = ext->sel_opt_id; - lv_group_t * g = lv_obj_get_group(ddlist); + lv_group_t * g = lv_obj_get_group(ddlist); if(lv_group_get_editing(g)) { lv_group_set_editing(g, false); } } /*Search the clicked option (For KEYPAD and ENCODER the new value should be already set)*/ - if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || - lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { + if(lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER || lv_indev_get_type(indev) == LV_INDEV_TYPE_BUTTON) { lv_point_t p; lv_indev_get_point(indev, &p); p.y -= ext->label->coords.y1; @@ -822,7 +805,7 @@ static lv_res_t release_handler(lv_obj_t * ddlist) if(letter == '\n' && i != letter_i) new_opt++; } - ext->sel_opt_id = new_opt; + ext->sel_opt_id = new_opt; ext->sel_opt_id_ori = ext->sel_opt_id; } @@ -858,8 +841,8 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) /*Open the list*/ if(ext->opened) { if(ext->fix_height == 0) { - new_height = lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + - style->body.padding.bottom; + new_height = + lv_obj_get_height(lv_page_get_scrl(ddlist)) + style->body.padding.top + style->body.padding.bottom; } else { new_height = ext->fix_height; } @@ -892,7 +875,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) a.var = ddlist; a.start = lv_obj_get_height(ddlist); a.end = new_height; - a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; + a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_ddlist_anim_ready_cb; a.act_time = 0; @@ -925,7 +908,7 @@ static void lv_ddlist_anim_ready_cb(lv_anim_t * a) * Clean up after the open animation * @param ddlist */ -static void lv_ddlist_anim_finish(lv_obj_t* ddlist) +static void lv_ddlist_anim_finish(lv_obj_t * ddlist) { lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); @@ -960,9 +943,9 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) const lv_style_t * label_style = lv_obj_get_style(ext->label); lv_obj_t * scrl = lv_page_get_scrl(ddlist); - lv_coord_t h = lv_obj_get_height(ddlist); - lv_coord_t line_y1 = ext->sel_opt_id * (font_h + label_style->text.line_space) + - ext->label->coords.y1 - scrl->coords.y1; + lv_coord_t h = lv_obj_get_height(ddlist); + lv_coord_t line_y1 = + ext->sel_opt_id * (font_h + label_style->text.line_space) + ext->label->coords.y1 - scrl->coords.y1; lv_obj_set_y(scrl, -line_y1 + (h - font_h) / 2); lv_obj_invalidate(ddlist); @@ -972,7 +955,7 @@ static void lv_ddlist_pos_current_option(lv_obj_t * ddlist) * Be sure the width of the scrollable exactly fits the ddlist * @param ddlist pointer to a ddlist */ -static void lv_ddlist_refr_width(lv_obj_t* ddlist) +static void lv_ddlist_refr_width(lv_obj_t * ddlist) { /*Set the TIGHT fit horizontally the set the width to the content*/ lv_page_set_scrl_fit2(ddlist, LV_FIT_TIGHT, lv_page_get_scrl_fit_bottom(ddlist)); diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 05ec32946a33..57e5a0c67d16 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -46,17 +46,17 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * label; /*Label for the options*/ - const lv_style_t * sel_style; /*Style of the selected option*/ - uint16_t option_cnt; /*Number of options*/ - uint16_t sel_opt_id; /*Index of the current option*/ - uint16_t sel_opt_id_ori; /*Store the original index on focus*/ - uint16_t anim_time; /*Open/Close animation time [ms]*/ - uint8_t opened : 1; /*1: The list is opened (handled by the library)*/ - uint8_t force_sel : 1; /*1: Keep the selection highlight even if the list is closed*/ - uint8_t draw_arrow : 1; /*1: Draw arrow*/ - uint8_t stay_open : 1; /*1: Don't close the list when a new item is selected*/ - lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ + lv_obj_t * label; /*Label for the options*/ + const lv_style_t * sel_style; /*Style of the selected option*/ + uint16_t option_cnt; /*Number of options*/ + uint16_t sel_opt_id; /*Index of the current option*/ + uint16_t sel_opt_id_ori; /*Store the original index on focus*/ + uint16_t anim_time; /*Open/Close animation time [ms]*/ + uint8_t opened : 1; /*1: The list is opened (handled by the library)*/ + uint8_t force_sel : 1; /*1: Keep the selection highlight even if the list is closed*/ + uint8_t draw_arrow : 1; /*1: Draw arrow*/ + uint8_t stay_open : 1; /*1: Don't close the list when a new item is selected*/ + lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/ } lv_ddlist_ext_t; enum { diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 10739014734a..11bcf00d0558 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -87,8 +87,7 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new gauge gauge*/ if(copy == NULL) { - lv_gauge_set_scale(new_gauge, LV_GAUGE_DEF_ANGLE, LV_GAUGE_DEF_LINE_COUNT, - LV_GAUGE_DEF_LABEL_COUNT); + lv_gauge_set_scale(new_gauge, LV_GAUGE_DEF_ANGLE, LV_GAUGE_DEF_LINE_COUNT, LV_GAUGE_DEF_LABEL_COUNT); lv_gauge_set_needle_count(new_gauge, 1, NULL); lv_gauge_set_critical_value(new_gauge, 80); lv_obj_set_size(new_gauge, 2 * LV_DPI, 2 * LV_DPI); @@ -350,15 +349,14 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); const lv_style_t * style = lv_obj_get_style(gauge); lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); - lv_coord_t r = - lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; - lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; - lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; - int16_t scale_angle = lv_lmeter_get_scale_angle(gauge); - uint16_t label_num = ext->label_count; - int16_t angle_ofs = 90 + (360 - scale_angle) / 2; - int16_t min = lv_gauge_get_min_value(gauge); - int16_t max = lv_gauge_get_max_value(gauge); + lv_coord_t r = lv_obj_get_width(gauge) / 2 - (3 * style->body.padding.left) - style->body.padding.inner; + lv_coord_t x_ofs = lv_obj_get_width(gauge) / 2 + gauge->coords.x1; + lv_coord_t y_ofs = lv_obj_get_height(gauge) / 2 + gauge->coords.y1; + int16_t scale_angle = lv_lmeter_get_scale_angle(gauge); + uint16_t label_num = ext->label_count; + int16_t angle_ofs = 90 + (360 - scale_angle) / 2; + int16_t min = lv_gauge_get_min_value(gauge); + int16_t max = lv_gauge_get_max_value(gauge); uint8_t i; for(i = 0; i < label_num; i++) { @@ -377,8 +375,8 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) lv_area_t label_cord; lv_point_t label_size; - lv_txt_get_size(&label_size, scale_txt, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); + lv_txt_get_size(&label_size, scale_txt, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, LV_TXT_FLAG_NONE); /*Draw the label*/ label_cord.x1 = x - label_size.x / 2; @@ -386,8 +384,7 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) label_cord.x2 = label_cord.x1 + label_size.x; label_cord.y2 = label_cord.y1 + label_size.y; - lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, - -1); + lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, -1); } } /** @@ -421,8 +418,8 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) p_mid.y = y_ofs; for(i = 0; i < ext->needle_count; i++) { /*Calculate the end point of a needle*/ - int16_t needle_angle = (ext->values[i] - min) * angle * (1 << LV_GAUGE_INTERPOLATE_SHIFT) / - (max - min); //+ angle_ofs; + int16_t needle_angle = + (ext->values[i] - min) * angle * (1 << LV_GAUGE_INTERPOLATE_SHIFT) / (max - min); //+ angle_ofs; int16_t needle_angle_low = (needle_angle >> LV_GAUGE_INTERPOLATE_SHIFT) + angle_ofs; int16_t needle_angle_high = needle_angle_low + 1; @@ -433,11 +430,9 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) p_end_high.y = (lv_trigo_sin(needle_angle_high) * r) / LV_TRIGO_SIN_MAX + y_ofs; p_end_high.x = (lv_trigo_sin(needle_angle_high + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs; - uint16_t rem = needle_angle & ((1 << LV_GAUGE_INTERPOLATE_SHIFT) - 1); - int16_t x_mod = - ((LV_MATH_ABS(p_end_high.x - p_end_low.x)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; - int16_t y_mod = - ((LV_MATH_ABS(p_end_high.y - p_end_low.y)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; + uint16_t rem = needle_angle & ((1 << LV_GAUGE_INTERPOLATE_SHIFT) - 1); + int16_t x_mod = ((LV_MATH_ABS(p_end_high.x - p_end_low.x)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; + int16_t y_mod = ((LV_MATH_ABS(p_end_high.y - p_end_low.y)) * rem) >> LV_GAUGE_INTERPOLATE_SHIFT; if(p_end_high.x < p_end_low.x) x_mod = -x_mod; if(p_end_high.y < p_end_low.y) y_mod = -y_mod; diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index f9eca884db28..92b4a5cc59d8 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -127,12 +127,8 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) #if LV_USE_LOG && LV_LOG_LEVEL >= LV_LOG_LEVEL_INFO switch(src_type) { case LV_IMG_SRC_FILE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_FILE` type found"); break; - case LV_IMG_SRC_VARIABLE: - LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found"); - break; - case LV_IMG_SRC_SYMBOL: - LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_SYMBOL` type found"); - break; + case LV_IMG_SRC_VARIABLE: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_VARIABLE` type found"); break; + case LV_IMG_SRC_SYMBOL: LV_LOG_TRACE("lv_img_set_src: `LV_IMG_SRC_SYMBOL` type found"); break; default: LV_LOG_WARN("lv_img_set_src: unknown type"); } #endif @@ -179,8 +175,8 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) /*`lv_img_dsc_get_info` couldn't set the with and height of a font so set it here*/ const lv_style_t * style = lv_img_get_style(img); lv_point_t size; - lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); + lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, LV_TXT_FLAG_NONE); header.w = size.x; header.h = size.y; } @@ -344,14 +340,13 @@ lv_coord_t lv_img_get_offset_y(lv_obj_t * img) static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode_t mode) { const lv_style_t * style = lv_obj_get_style(img); - lv_img_ext_t * ext = lv_obj_get_ext_attr(img); + lv_img_ext_t * ext = lv_obj_get_ext_attr(img); if(mode == LV_DESIGN_COVER_CHK) { bool cover = false; if(ext->src_type == LV_IMG_SRC_UNKNOWN || ext->src_type == LV_IMG_SRC_SYMBOL) return false; - if(ext->cf == LV_IMG_CF_TRUE_COLOR || ext->cf == LV_IMG_CF_RAW) - cover = lv_area_is_in(mask, &img->coords); + if(ext->cf == LV_IMG_CF_TRUE_COLOR || ext->cf == LV_IMG_CF_RAW) cover = lv_area_is_in(mask, &img->coords); return cover; } else if(mode == LV_DESIGN_DRAW_MAIN) { @@ -382,8 +377,7 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode lv_style_t style_mod; lv_style_copy(&style_mod, style); style_mod.text.color = style->image.color; - lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, - -1, -1); + lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, -1, -1); } else { /*Trigger the error handler of image drawer*/ LV_LOG_WARN("lv_img_design: image source type is unknown"); diff --git a/src/lv_objx/lv_imgbtn.c b/src/lv_objx/lv_imgbtn.c index 952644087e0f..b2e5cf6d81ac 100644 --- a/src/lv_objx/lv_imgbtn.c +++ b/src/lv_objx/lv_imgbtn.c @@ -131,8 +131,8 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src * @param src_right pointer to an image source for the right side of the button (a C array or path * to a file) */ -void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, - const void * src_mid, const void * src_right) +void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid, + const void * src_right) { lv_imgbtn_ext_t * ext = lv_obj_get_ext_attr(imgbtn); diff --git a/src/lv_objx/lv_imgbtn.h b/src/lv_objx/lv_imgbtn.h index ff9d92c6b2b2..850866335f1a 100644 --- a/src/lv_objx/lv_imgbtn.h +++ b/src/lv_objx/lv_imgbtn.h @@ -103,8 +103,8 @@ void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src * @param src_right pointer to an image source for the right side of the button (a C array or path * to a file) */ -void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, - const void * src_mid, const void * src_right); +void lv_imgbtn_set_src(lv_obj_t * imgbtn, lv_btn_state_t state, const void * src_left, const void * src_mid, + const void * src_right); #endif diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index c1135fb2d27a..5c05c68a2a72 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -244,9 +244,7 @@ void lv_kb_set_style(lv_obj_t * kb, lv_kb_style_t type, const lv_style_t * style case LV_KB_STYLE_BG: lv_btnm_set_style(kb, LV_BTNM_STYLE_BG, style); break; case LV_KB_STYLE_BTN_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_REL, style); break; case LV_KB_STYLE_BTN_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_PR, style); break; - case LV_KB_STYLE_BTN_TGL_REL: - lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_REL, style); - break; + case LV_KB_STYLE_BTN_TGL_REL: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_REL, style); break; case LV_KB_STYLE_BTN_TGL_PR: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_TGL_PR, style); break; case LV_KB_STYLE_BTN_INA: lv_btnm_set_style(kb, LV_BTNM_STYLE_BTN_INA, style); break; } @@ -303,9 +301,7 @@ const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) case LV_KB_STYLE_BG: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BG); break; case LV_KB_STYLE_BTN_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_REL); break; case LV_KB_STYLE_BTN_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_PR); break; - case LV_KB_STYLE_BTN_TGL_REL: - style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_REL); - break; + case LV_KB_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_REL); break; case LV_KB_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_TGL_PR); break; case LV_KB_STYLE_BTN_INA: style = lv_btnm_get_style(kb, LV_BTNM_STYLE_BTN_INA); break; default: style = NULL; break; @@ -333,9 +329,7 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) uint16_t btn_id = lv_btnm_get_active_btn(kb); if(btn_id == LV_BTNM_BTN_NONE) return; if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return; - if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && - event == LV_EVENT_LONG_PRESSED_REPEAT) - return; + if(lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_NO_REPEAT) && event == LV_EVENT_LONG_PRESSED_REPEAT) return; const char * txt = lv_btnm_get_active_btn_text(kb); if(txt == NULL) return; @@ -367,8 +361,7 @@ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) if(kb->event_cb != lv_kb_def_event_cb) { lv_res_t res = lv_event_send(kb, LV_EVENT_APPLY, NULL); if(res != LV_RES_OK) return; - } - else { + } else { lv_kb_set_ta(kb, NULL); /*De-assign the text area to hide it cursor if needed*/ } return; diff --git a/src/lv_objx/lv_kb.h b/src/lv_objx/lv_kb.h index 0f34b93c009e..8ea7c99a0996 100644 --- a/src/lv_objx/lv_kb.h +++ b/src/lv_objx/lv_kb.h @@ -52,10 +52,9 @@ typedef struct { lv_btnm_ext_t btnm; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * ta; /*Pointer to the assigned text area*/ - lv_kb_mode_t mode; /*Key map type*/ - uint8_t - cursor_mng : 1; /*1: automatically show/hide cursor when a text area is assigned or left*/ + lv_obj_t * ta; /*Pointer to the assigned text area*/ + lv_kb_mode_t mode; /*Key map type*/ + uint8_t cursor_mng : 1; /*1: automatically show/hide cursor when a text area is assigned or left*/ } lv_kb_ext_t; enum { diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 8d7c7461f727..5ffaea4c2785 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -42,9 +42,9 @@ static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x); static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y); #endif -static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len); -static char * lv_label_get_dot_tmp(lv_obj_t *label); -static void lv_label_dot_tmp_free(lv_obj_t *label); +static bool lv_label_set_dot_tmp(lv_obj_t * label, char * data, uint16_t len); +static char * lv_label_get_dot_tmp(lv_obj_t * label); +static void lv_label_dot_tmp_free(lv_obj_t * label); /********************** * STATIC VARIABLES @@ -83,23 +83,23 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->text = NULL; - ext->static_txt = 0; - ext->recolor = 0; - ext->body_draw = 0; - ext->align = LV_LABEL_ALIGN_LEFT; - ext->dot_end = LV_LABEL_DOT_END_INV; - ext->long_mode = LV_LABEL_LONG_EXPAND; + ext->text = NULL; + ext->static_txt = 0; + ext->recolor = 0; + ext->body_draw = 0; + ext->align = LV_LABEL_ALIGN_LEFT; + ext->dot_end = LV_LABEL_DOT_END_INV; + ext->long_mode = LV_LABEL_LONG_EXPAND; #if LV_USE_ANIMATION - ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; + ext->anim_speed = LV_LABEL_DEF_SCROLL_SPEED; #endif - ext->offset.x = 0; - ext->offset.y = 0; + ext->offset.x = 0; + ext->offset.y = 0; #if LV_LABEL_TEXT_SEL ext->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; #endif - ext->dot.tmp_ptr = NULL; + ext->dot.tmp_ptr = NULL; ext->dot_tmp_alloc = 0; lv_obj_set_design_cb(new_label, lv_label_design); @@ -132,15 +132,14 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) memcpy(ext->text, copy_ext->text, lv_mem_get_size(copy_ext->text)); } - if(copy_ext->dot_tmp_alloc && copy_ext->dot.tmp_ptr ){ + if(copy_ext->dot_tmp_alloc && copy_ext->dot.tmp_ptr) { int len = strlen(copy_ext->dot.tmp_ptr); lv_label_set_dot_tmp(new_label, ext->dot.tmp_ptr, len); - } - else{ + } else { memcpy(ext->dot.tmp, copy_ext->dot.tmp, sizeof(ext->dot.tmp)); } ext->dot_tmp_alloc = copy_ext->dot_tmp_alloc; - ext->dot_end = copy_ext->dot_end; + ext->dot_end = copy_ext->dot_end; /*Refresh the style with new signal function*/ lv_obj_refresh_style(new_label); @@ -274,8 +273,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) ext->offset.x = 0; ext->offset.y = 0; - if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_ROLL_CIRC || - long_mode == LV_LABEL_LONG_CROP) + if(long_mode == LV_LABEL_LONG_ROLL || long_mode == LV_LABEL_LONG_ROLL_CIRC || long_mode == LV_LABEL_LONG_CROP) ext->expand = 1; else ext->expand = 0; @@ -357,19 +355,20 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed) #endif } -void lv_label_set_text_sel_start( lv_obj_t * label, uint16_t index ) { +void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index) +{ #if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - ext->txt_sel_start = index; + ext->txt_sel_start = index; lv_obj_invalidate(label); #endif } -void lv_label_set_text_sel_end( lv_obj_t * label, uint16_t index ) +void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index) { #if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - ext->txt_sel_end = index; + ext->txt_sel_end = index; lv_obj_invalidate(label); #endif } @@ -482,8 +481,7 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t /*Search the line of the index letter */; while(txt[new_line_start] != '\0') { - new_line_start += - lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); if(index < new_line_start || txt[new_line_start] == '\0') break; /*The line of 'index' letter begins at 'line_start'*/ @@ -500,21 +498,18 @@ void lv_label_get_letter_pos(const lv_obj_t * label, uint16_t index, lv_point_t } /*Calculate the x coordinate*/ - lv_coord_t x = lv_txt_get_width(&txt[line_start], index - line_start, font, - style->text.letter_space, flag); + lv_coord_t x = lv_txt_get_width(&txt[line_start], index - line_start, font, style->text.letter_space, flag); if(index != line_start) x += style->text.letter_space; if(ext->align == LV_LABEL_ALIGN_CENTER) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, - style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag); x += lv_obj_get_width(label) / 2 - line_w / 2; } else if(ext->align == LV_LABEL_ALIGN_RIGHT) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, - style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag); x += lv_obj_get_width(label) - line_w; } @@ -553,8 +548,7 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) /*Search the line of the index letter */; while(txt[line_start] != '\0') { - new_line_start += - lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ y += letter_height + style->text.line_space; @@ -566,15 +560,14 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) lv_coord_t x = 0; if(ext->align == LV_LABEL_ALIGN_CENTER) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, - style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag); x += lv_obj_get_width(label) / 2 - line_w / 2; } lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t i = line_start; - uint32_t i_current = i; + uint32_t i = line_start; + uint32_t i_current = i; uint32_t letter; uint32_t letter_next; @@ -612,7 +605,8 @@ uint16_t lv_label_get_letter_on(const lv_obj_t * label, lv_point_t * pos) * @param label pointer to a label object. * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -uint16_t lv_label_get_text_sel_start( const lv_obj_t * label ) { +uint16_t lv_label_get_text_sel_start(const lv_obj_t * label) +{ #if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); return ext->txt_sel_start; @@ -627,17 +621,17 @@ uint16_t lv_label_get_text_sel_start( const lv_obj_t * label ) { * @param label pointer to a label object. * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -uint16_t lv_label_get_text_sel_end( const lv_obj_t * label ) { +uint16_t lv_label_get_text_sel_end(const lv_obj_t * label) +{ #if LV_LABEL_TEXT_SEL lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - return ext->txt_sel_end; + return ext->txt_sel_end; #else - (void) label; /*Unused*/ + (void)label; /*Unused*/ return LV_LABEL_TEXT_SEL_OFF; #endif } - /** * Check if a character is drawn under a point. * @param label Label object @@ -668,8 +662,7 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) /*Search the line of the index letter */; while(txt[line_start] != '\0') { - new_line_start += - lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); + new_line_start += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, max_w, flag); if(pos->y <= y + letter_height) break; /*The line is found (stored in 'line_start')*/ y += letter_height + style->text.line_space; @@ -682,15 +675,14 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) lv_coord_t last_x = 0; if(ext->align == LV_LABEL_ALIGN_CENTER) { lv_coord_t line_w; - line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, - style->text.letter_space, flag); + line_w = lv_txt_get_width(&txt[line_start], new_line_start - line_start, font, style->text.letter_space, flag); x += lv_obj_get_width(label) / 2 - line_w / 2; } lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t i = line_start; - uint32_t i_current = i; + uint32_t i = line_start; + uint32_t i_current = i; uint32_t letter; uint32_t letter_next; @@ -807,7 +799,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ else if(mode == LV_DESIGN_DRAW_MAIN) { lv_area_t coords; const lv_style_t * style = lv_obj_get_style(label); - lv_opa_t opa_scale = lv_obj_get_opa_scale(label); + lv_opa_t opa_scale = lv_obj_get_opa_scale(label); lv_obj_get_coords(label, &coords); #if LV_USE_GROUP @@ -844,8 +836,8 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ if((ext->long_mode == LV_LABEL_LONG_ROLL || ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) && (ext->align == LV_LABEL_ALIGN_CENTER || ext->align == LV_LABEL_ALIGN_RIGHT)) { lv_point_t size; - lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, flag); + lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, flag); if(size.x > lv_obj_get_width(label)) { flag &= ~LV_TXT_FLAG_RIGHT; flag &= ~LV_TXT_FLAG_CENTER; @@ -853,12 +845,12 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; - lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, - style->text.line_space, LV_COORD_MAX, flag); + lv_txt_get_size(&size, ext->text, style->text.font, style->text.letter_space, style->text.line_space, + LV_COORD_MAX, flag); lv_point_t ofs; @@ -869,7 +861,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); } /*Draw the text again below the original to make an circular effect */ @@ -877,7 +869,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.x = ext->offset.x; ofs.y = ext->offset.y + size.y + lv_font_get_line_height(style->text.font); lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); } } } @@ -921,10 +913,10 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param if(ext->body_draw) { const lv_style_t * style = lv_label_get_style(label); - label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left); - label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right); - label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.top); - label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.bottom); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.top); + label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.bottom); } } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; @@ -962,8 +954,7 @@ static void lv_label_refr_text(lv_obj_t * label) lv_txt_flag_t flag = LV_TXT_FLAG_NONE; if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= LV_TXT_FLAG_EXPAND; - lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, - flag); + lv_txt_get_size(&size, ext->text, font, style->text.letter_space, style->text.line_space, max_w, flag); /*Set the full size in expand mode*/ if(ext->long_mode == LV_LABEL_LONG_EXPAND) { @@ -977,18 +968,20 @@ static void lv_label_refr_text(lv_obj_t * label) anim.repeat = 1; anim.playback = 1; anim.start = 0; - anim.ready_cb = NULL; - anim.path_cb = lv_anim_path_linear; - anim.playback_pause = (((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / - ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; + anim.ready_cb = NULL; + anim.path_cb = lv_anim_path_linear; + anim.playback_pause = + (((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / + ext->anim_speed) * + LV_LABEL_WAIT_CHAR_COUNT; anim.repeat_pause = anim.playback_pause; - anim.act_time = -anim.playback_pause; + anim.act_time = -anim.playback_pause; bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = lv_obj_get_width(label) - size.x; - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + anim.end = lv_obj_get_width(label) - size.x; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { @@ -998,8 +991,8 @@ static void lv_label_refr_text(lv_obj_t * label) } if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_line_height(font)); - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; + anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_line_height(font)); + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); @@ -1014,22 +1007,23 @@ static void lv_label_refr_text(lv_obj_t * label) else if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { #if LV_USE_ANIMATION lv_anim_t anim; - anim.var = label; - anim.repeat = 1; - anim.playback = 0; - anim.start = 0; - anim.act_time = -(((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / - ext->anim_speed) * LV_LABEL_WAIT_CHAR_COUNT; - anim.ready_cb = NULL; - anim.path_cb = lv_anim_path_linear; + anim.var = label; + anim.repeat = 1; + anim.playback = 0; + anim.start = 0; + anim.act_time = -(((lv_font_get_glyph_width(style->text.font, ' ', ' ') + style->text.letter_space) * 1000) / + ext->anim_speed) * + LV_LABEL_WAIT_CHAR_COUNT; + anim.ready_cb = NULL; + anim.path_cb = lv_anim_path_linear; anim.playback_pause = 0; anim.repeat_pause = 0; bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { - anim.end = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + anim.end = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { @@ -1039,9 +1033,9 @@ static void lv_label_refr_text(lv_obj_t * label) } if(size.y > lv_obj_get_height(label) && hor_anim == false) { - anim.end = -size.y - (lv_font_get_line_height(font)); - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; - anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); + anim.end = -size.y - (lv_font_get_line_height(font)); + anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; + anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ @@ -1052,8 +1046,7 @@ static void lv_label_refr_text(lv_obj_t * label) } else if(ext->long_mode == LV_LABEL_LONG_DOT) { if(size.y <= lv_obj_get_height(label)) { /*No dots are required, the text is short enough*/ ext->dot_end = LV_LABEL_DOT_END_INV; - } else if(lv_txt_get_encoded_length(ext->text) <= - LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/ + } else if(lv_txt_get_encoded_length(ext->text) <= LV_LABEL_DOT_NUM) { /*Don't turn to dots all the characters*/ ext->dot_end = LV_LABEL_DOT_END_INV; } else { lv_point_t p; @@ -1061,9 +1054,9 @@ static void lv_label_refr_text(lv_obj_t * label) (lv_font_get_glyph_width(style->text.font, '.', '.') + style->text.letter_space) * LV_LABEL_DOT_NUM; /*Shrink with dots*/ p.y = lv_obj_get_height(label); - p.y -= p.y % (lv_font_get_line_height(style->text.font) + - style->text.line_space); /*Round down to the last line*/ - p.y -= style->text.line_space; /*Trim the last line space*/ + p.y -= p.y % + (lv_font_get_line_height(style->text.font) + style->text.line_space); /*Round down to the last line*/ + p.y -= style->text.line_space; /*Trim the last line space*/ uint32_t letter_id = lv_label_get_letter_on(label, &p); /*Save letters under the dots and replace them with dots*/ @@ -1076,12 +1069,12 @@ static void lv_label_refr_text(lv_obj_t * label) lv_txt_encoded_next(ext->text, &byte_id); } - if( lv_label_set_dot_tmp(label, &ext->text[byte_id_ori], len ) ){ + if(lv_label_set_dot_tmp(label, &ext->text[byte_id_ori], len)) { for(i = 0; i < LV_LABEL_DOT_NUM; i++) { ext->text[byte_id_ori + i] = '.'; } ext->text[byte_id_ori + LV_LABEL_DOT_NUM] = '\0'; - ext->dot_end = letter_id + LV_LABEL_DOT_NUM; + ext->dot_end = letter_id + LV_LABEL_DOT_NUM; } } } @@ -1106,8 +1099,8 @@ static void lv_label_revert_dots(lv_obj_t * label) uint32_t byte_i = lv_txt_encoded_get_byte_id(ext->text, letter_i); /*Restore the characters*/ - uint8_t i = 0; - char* dot_tmp = lv_label_get_dot_tmp(label); + uint8_t i = 0; + char * dot_tmp = lv_label_get_dot_tmp(label); while(ext->text[byte_i + i] != '\0') { ext->text[byte_i + i] = dot_tmp[i]; i++; @@ -1141,22 +1134,22 @@ static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y) * @param len Number of characters to store. * @return true on success. */ -static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ +static bool lv_label_set_dot_tmp(lv_obj_t * label, char * data, uint16_t len) +{ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - lv_label_dot_tmp_free( label ); /* Deallocate any existing space */ - if( len > sizeof(char *) ){ + lv_label_dot_tmp_free(label); /* Deallocate any existing space */ + if(len > sizeof(char *)) { /* Memory needs to be allocated. Allocates an additional byte * for a NULL-terminator so it can be copied. */ ext->dot.tmp_ptr = lv_mem_alloc(len + 1); - if( ext->dot.tmp_ptr == NULL ){ + if(ext->dot.tmp_ptr == NULL) { LV_LOG_ERROR("Failed to allocate memory for dot_tmp_ptr"); return false; } memcpy(ext->dot.tmp_ptr, data, len); - ext->dot.tmp_ptr[len]='\0'; - ext->dot_tmp_alloc = true; - } - else { + ext->dot.tmp_ptr[len] = '\0'; + ext->dot_tmp_alloc = true; + } else { /* Characters can be directly stored in object */ ext->dot_tmp_alloc = false; memcpy(ext->dot.tmp, data, len); @@ -1169,12 +1162,12 @@ static bool lv_label_set_dot_tmp(lv_obj_t *label, char *data, uint16_t len){ * @param label pointer to label object * @return char pointer to a stored characters. Is *not* necessarily NULL-terminated. */ -static char * lv_label_get_dot_tmp(lv_obj_t *label){ +static char * lv_label_get_dot_tmp(lv_obj_t * label) +{ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( ext->dot_tmp_alloc ){ + if(ext->dot_tmp_alloc) { return ext->dot.tmp_ptr; - } - else{ + } else { return ext->dot.tmp; } } @@ -1184,13 +1177,14 @@ static char * lv_label_get_dot_tmp(lv_obj_t *label){ * Always clears the field * @param label pointer to label object. */ -static void lv_label_dot_tmp_free(lv_obj_t *label){ +static void lv_label_dot_tmp_free(lv_obj_t * label) +{ lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - if( ext->dot_tmp_alloc && ext->dot.tmp_ptr ){ + if(ext->dot_tmp_alloc && ext->dot.tmp_ptr) { lv_mem_free(ext->dot.tmp_ptr); } ext->dot_tmp_alloc = false; - ext->dot.tmp_ptr = NULL; + ext->dot.tmp_ptr = NULL; } #endif diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 33b5c3c83b13..5a445015d339 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -29,8 +29,8 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_LABEL_DOT_NUM 3 -#define LV_LABEL_POS_LAST 0xFFFF +#define LV_LABEL_DOT_NUM 3 +#define LV_LABEL_POS_LAST 0xFFFF #define LV_LABEL_TEXT_SEL_OFF 0xFFFF /********************** @@ -62,30 +62,33 @@ typedef struct { /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ /*New data for this type */ - char * text; /*Text of the label*/ - union{ - char * tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled by the library)*/ - char tmp[ sizeof(char *) ]; /* Directly store the characters if <=4 characters */ + char * text; /*Text of the label*/ + union + { + char * tmp_ptr; /* Pointer to the allocated memory containing the character which are replaced by dots (Handled + by the library)*/ + char tmp[sizeof(char *)]; /* Directly store the characters if <=4 characters */ } dot; - uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ - lv_point_t offset; /*Text draw position offset*/ + uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ + lv_point_t offset; /*Text draw position offset*/ #if LV_USE_ANIMATION - uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ + uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ #endif #if LV_LABEL_TEXT_SEL - uint16_t txt_sel_start; /*Left-most selection character*/ - uint16_t txt_sel_end; /*Right-most selection character*/ + uint16_t txt_sel_start; /*Left-most selection character*/ + uint16_t txt_sel_end; /*Right-most selection character*/ #endif lv_label_long_mode_t long_mode : 3; /*Determinate what to do with the long texts*/ - uint8_t static_txt : 1; /*Flag to indicate the text is static*/ - uint8_t align : 2; /*Align type from 'lv_label_align_t'*/ - uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ - uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ - uint8_t body_draw : 1; /*Draw background body*/ - uint8_t dot_tmp_alloc : 1; /*True if dot_tmp has been allocated. False if dot_tmp directly holds up to 4 bytes of characters */ + uint8_t static_txt : 1; /*Flag to indicate the text is static*/ + uint8_t align : 2; /*Align type from 'lv_label_align_t'*/ + uint8_t recolor : 1; /*Enable in-line letter re-coloring*/ + uint8_t expand : 1; /*Ignore real width (used by the library with LV_LABEL_LONG_ROLL)*/ + uint8_t body_draw : 1; /*Draw background body*/ + uint8_t dot_tmp_alloc : 1; /*True if dot_tmp has been allocated. False if dot_tmp directly holds up to 4 bytes of + characters */ } lv_label_ext_t; /********************** @@ -180,14 +183,14 @@ static inline void lv_label_set_style(lv_obj_t * label, const lv_style_t * style * @param label pointer to a label object. * @param index index to set. `LV_LABEL_TXT_SEL_OFF` to select nothing. */ -void lv_label_set_text_sel_start( lv_obj_t * label, uint16_t index ); +void lv_label_set_text_sel_start(lv_obj_t * label, uint16_t index); /** * @brief Set the selection end index. * @param label pointer to a label object. * @param index index to set. `LV_LABEL_TXT_SEL_OFF` to select nothing. */ -void lv_label_set_text_sel_end( lv_obj_t * label, uint16_t index ); +void lv_label_set_text_sel_end(lv_obj_t * label, uint16_t index); /*===================== * Getter functions @@ -276,15 +279,14 @@ static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) * @param label pointer to a label object. * @return selection start index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -uint16_t lv_label_get_text_sel_start( const lv_obj_t * label ); +uint16_t lv_label_get_text_sel_start(const lv_obj_t * label); /** * @brief Get the selection end index. * @param label pointer to a label object. * @return selection end index. `LV_LABEL_TXT_SEL_OFF` if nothing is selected. */ -uint16_t lv_label_get_text_sel_end( const lv_obj_t * label ); - +uint16_t lv_label_get_text_sel_end(const lv_obj_t * label); /*===================== * Other functions diff --git a/src/lv_objx/lv_led.c b/src/lv_objx/lv_led.c index 4f95cc3bcf3a..5cd15bca8dc3 100644 --- a/src/lv_objx/lv_led.c +++ b/src/lv_objx/lv_led.c @@ -186,7 +186,7 @@ static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode return ancestor_design_f(led, mask, mode); } else if(mode == LV_DESIGN_DRAW_MAIN) { /*Make darker colors in a temporary style according to the brightness*/ - lv_led_ext_t * ext = lv_obj_get_ext_attr(led); + lv_led_ext_t * ext = lv_obj_get_ext_attr(led); const lv_style_t * style = lv_obj_get_style(led); /* Store the real pointer because of 'lv_group' @@ -199,18 +199,15 @@ static bool lv_led_design(lv_obj_t * led, const lv_area_t * mask, lv_design_mode memcpy(&leds_tmp, style, sizeof(leds_tmp)); /*Mix. the color with black proportionally with brightness*/ - leds_tmp.body.main_color = - lv_color_mix(leds_tmp.body.main_color, LV_COLOR_BLACK, ext->bright); - leds_tmp.body.grad_color = - lv_color_mix(leds_tmp.body.grad_color, LV_COLOR_BLACK, ext->bright); - leds_tmp.body.border.color = - lv_color_mix(leds_tmp.body.border.color, LV_COLOR_BLACK, ext->bright); + leds_tmp.body.main_color = lv_color_mix(leds_tmp.body.main_color, LV_COLOR_BLACK, ext->bright); + leds_tmp.body.grad_color = lv_color_mix(leds_tmp.body.grad_color, LV_COLOR_BLACK, ext->bright); + leds_tmp.body.border.color = lv_color_mix(leds_tmp.body.border.color, LV_COLOR_BLACK, ext->bright); /*Set the current swidth according to brightness proportionally between LV_LED_BRIGHT_OFF * and LV_LED_BRIGHT_ON*/ - uint16_t bright_tmp = ext->bright; - leds_tmp.body.shadow.width = ((bright_tmp - LV_LED_BRIGHT_OFF) * style->body.shadow.width) / - (LV_LED_BRIGHT_ON - LV_LED_BRIGHT_OFF); + uint16_t bright_tmp = ext->bright; + leds_tmp.body.shadow.width = + ((bright_tmp - LV_LED_BRIGHT_OFF) * style->body.shadow.width) / (LV_LED_BRIGHT_ON - LV_LED_BRIGHT_OFF); led->style_p = &leds_tmp; ancestor_design_f(led, mask, mode); diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index 4bac6bc0d364..abe6f5a96894 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -73,9 +73,8 @@ lv_obj_t * lv_line_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new line*/ if(copy == NULL) { - lv_obj_set_size( - new_line, LV_DPI, - LV_DPI); /*Auto size is enables, but set default size until no points are added*/ + lv_obj_set_size(new_line, LV_DPI, + LV_DPI); /*Auto size is enables, but set default size until no points are added*/ lv_obj_set_style(new_line, NULL); /*Inherit parent's style*/ lv_obj_set_click(new_line, false); } @@ -215,7 +214,7 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo if(ext->point_num == 0 || ext->point_array == NULL) return false; const lv_style_t * style = lv_obj_get_style(line); - lv_opa_t opa_scale = lv_obj_get_opa_scale(line); + lv_opa_t opa_scale = lv_obj_get_opa_scale(line); lv_area_t area; lv_obj_get_coords(line, &area); lv_coord_t x_ofs = area.x1; @@ -250,10 +249,8 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo /*Draw circle on the joints if enabled*/ if(style->line.rounded) { - circle_area.x1 = - p1.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); - circle_area.y1 = - p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.x1 = p1.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.y1 = p1.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p1.x + ((style->line.width - 1) >> 1); circle_area.y2 = p1.y + ((style->line.width - 1) >> 1); lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale); @@ -262,10 +259,8 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo /*Draw circle on the last point too if enabled*/ if(style->line.rounded) { - circle_area.x1 = - p2.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); - circle_area.y1 = - p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.x1 = p2.x - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); + circle_area.y1 = p2.y - ((style->line.width - 1) >> 1) - ((style->line.width - 1) & 0x1); circle_area.x2 = p2.x + ((style->line.width - 1) >> 1); circle_area.y2 = p2.y + ((style->line.width - 1) >> 1); lv_draw_rect(&circle_area, mask, &circle_style_tmp, opa_scale); diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index 3621731a515a..9c89d96bcdb6 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -35,10 +35,10 @@ extern "C" { typedef struct { /*Inherited from 'base_obj' so no inherited ext.*/ /*Ext. of ancestor*/ - const lv_point_t * point_array; /*Pointer to an array with the points of the line*/ - uint16_t point_num; /*Number of points in 'point_array' */ - uint8_t auto_size : 1; /*1: set obj. width to x max and obj. height to y max */ - uint8_t y_inv : 1; /*1: y == 0 will be on the bottom*/ + const lv_point_t * point_array; /*Pointer to an array with the points of the line*/ + uint16_t point_num; /*Number of points in 'point_array' */ + uint8_t auto_size : 1; /*1: set obj. width to x max and obj. height to y max */ + uint8_t y_inv : 1; /*1: y == 0 will be on the bottom*/ } lv_line_ext_t; /********************** @@ -82,8 +82,8 @@ void lv_line_set_auto_size(lv_obj_t * line, bool en); */ void lv_line_set_y_invert(lv_obj_t * line, bool en); -#define lv_line_set_y_inv \ - lv_line_set_y_invert /*The name was inconsistent. In v.6.0 only `lv_line_set_y_invert`will \ +#define lv_line_set_y_inv \ + lv_line_set_y_invert /*The name was inconsistent. In v.6.0 only `lv_line_set_y_invert`will \ work */ /** diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 46a948975f3f..30516df0565d 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -95,10 +95,10 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) ext->styles_btn[LV_BTN_STATE_TGL_PR] = &lv_style_btn_tgl_pr; ext->styles_btn[LV_BTN_STATE_INA] = &lv_style_btn_ina; #if LV_USE_ANIMATION - ext->anim_time = LV_LIST_DEF_ANIM_TIME; + ext->anim_time = LV_LIST_DEF_ANIM_TIME; #endif - ext->single_mode = false; - ext->size = 0; + ext->single_mode = false; + ext->size = 0; #if LV_USE_GROUP ext->last_sel = NULL; @@ -145,10 +145,8 @@ lv_obj_t * lv_list_create(lv_obj_t * par, const lv_obj_t * copy) lv_list_set_style(new_list, LV_LIST_STYLE_BTN_REL, copy_ext->styles_btn[LV_BTN_STATE_REL]); lv_list_set_style(new_list, LV_LIST_STYLE_BTN_PR, copy_ext->styles_btn[LV_BTN_STATE_PR]); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, - copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); - lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, - copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_REL, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); + lv_list_set_style(new_list, LV_LIST_STYLE_BTN_TGL_PR, copy_ext->styles_btn[LV_BTN_STATE_TGL_REL]); lv_list_set_style(new_list, LV_LIST_STYLE_BTN_INA, copy_ext->styles_btn[LV_BTN_STATE_INA]); /*Refresh the style with new signal function*/ @@ -184,8 +182,7 @@ void lv_list_clean(lv_obj_t * obj) * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, - lv_event_cb_t event_cb) +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); ext->size++; @@ -320,7 +317,7 @@ void lv_list_set_btn_selected(lv_obj_t * list, lv_obj_t * btn) else if(s == LV_BTN_STATE_TGL_REL) lv_btn_set_state(ext->selected_btn, LV_BTN_STATE_TGL_PR); - lv_page_focus(list, ext->selected_btn, lv_list_get_anim_time(list) ); + lv_page_focus(list, ext->selected_btn, lv_list_get_anim_time(list)); } } @@ -335,7 +332,7 @@ void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time) { #if LV_USE_ANIMATION lv_list_ext_t * ext = lv_obj_get_ext_attr(list); - anim_time = 0; + anim_time = 0; if(ext->anim_time == anim_time) return; ext->anim_time = anim_time; @@ -361,9 +358,7 @@ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * break; case LV_LIST_STYLE_SCRL: lv_page_set_style(list, LV_PAGE_STYLE_SCRL, style); break; case LV_LIST_STYLE_SB: lv_page_set_style(list, LV_PAGE_STYLE_SB, style); break; - case LV_LIST_STYLE_EDGE_FLASH: - lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); - break; + case LV_LIST_STYLE_EDGE_FLASH: lv_page_set_style(list, LV_PAGE_STYLE_EDGE_FLASH, style); break; case LV_LIST_STYLE_BTN_REL: ext->styles_btn[LV_BTN_STATE_REL] = style; btn_style_refr = LV_BTN_STYLE_REL; @@ -387,9 +382,8 @@ void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * } /*Refresh existing buttons' style*/ - if(type == LV_LIST_STYLE_BTN_PR || type == LV_LIST_STYLE_BTN_REL || - type == LV_LIST_STYLE_BTN_TGL_REL || type == LV_LIST_STYLE_BTN_TGL_PR || - type == LV_LIST_STYLE_BTN_INA) { + if(type == LV_LIST_STYLE_BTN_PR || type == LV_LIST_STYLE_BTN_REL || type == LV_LIST_STYLE_BTN_TGL_REL || + type == LV_LIST_STYLE_BTN_TGL_PR || type == LV_LIST_STYLE_BTN_INA) { btn = lv_list_get_prev_btn(list, NULL); while(btn != NULL) { lv_btn_set_style(btn, btn_style_refr, ext->styles_btn[btn_style_refr]); @@ -587,16 +581,14 @@ uint16_t lv_list_get_anim_time(const lv_obj_t * list) * */ const lv_style_t * lv_list_get_style(const lv_obj_t * list, lv_list_style_t type) { - const lv_style_t * style = NULL; - lv_list_ext_t * ext = lv_obj_get_ext_attr(list); + const lv_style_t * style = NULL; + lv_list_ext_t * ext = lv_obj_get_ext_attr(list); switch(type) { case LV_LIST_STYLE_BG: style = lv_page_get_style(list, LV_PAGE_STYLE_BG); break; case LV_LIST_STYLE_SCRL: style = lv_page_get_style(list, LV_PAGE_STYLE_SCRL); break; case LV_LIST_STYLE_SB: style = lv_page_get_style(list, LV_PAGE_STYLE_SB); break; - case LV_LIST_STYLE_EDGE_FLASH: - style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); - break; + case LV_LIST_STYLE_EDGE_FLASH: style = lv_page_get_style(list, LV_PAGE_STYLE_EDGE_FLASH); break; case LV_LIST_STYLE_BTN_REL: style = ext->styles_btn[LV_BTN_STATE_REL]; break; case LV_LIST_STYLE_BTN_PR: style = ext->styles_btn[LV_BTN_STATE_PR]; break; case LV_LIST_STYLE_BTN_TGL_REL: style = ext->styles_btn[LV_BTN_STATE_TGL_REL]; break; @@ -626,8 +618,7 @@ void lv_list_up(const lv_obj_t * list) while(e != NULL) { if(e->coords.y2 <= list->coords.y2) { if(e_prev != NULL) { - lv_coord_t new_y = - lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev)); + lv_coord_t new_y = lv_obj_get_height(list) - (lv_obj_get_y(e_prev) + lv_obj_get_height(e_prev)); if(lv_list_get_anim_time(list) == 0) { lv_obj_set_y(scrl, new_y); } else { @@ -669,7 +660,7 @@ void lv_list_down(const lv_obj_t * list) e = lv_list_get_prev_btn(list, NULL); while(e != NULL) { if(e->coords.y1 < list->coords.y1) { - lv_coord_t new_y = -lv_obj_get_y(e); + lv_coord_t new_y = -lv_obj_get_y(e); if(lv_list_get_anim_time(list) == 0) { lv_obj_set_y(scrl, new_y); } else { @@ -837,9 +828,8 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param) else { lv_obj_t * btn = lv_list_get_next_btn(list, NULL); if(btn) - lv_list_set_btn_selected( - list, - btn); /*If there are no buttons on the list then there is no first button*/ + lv_list_set_btn_selected(list, + btn); /*If there are no buttons on the list then there is no first button*/ } } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) { lv_list_ext_t * ext = lv_obj_get_ext_attr(list); @@ -960,8 +950,7 @@ static bool lv_list_is_list_btn(lv_obj_t * list_btn) uint8_t cnt; for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { if(type.type[cnt] == NULL) break; - if(!strcmp(type.type[cnt], "lv_btn")) - return true; + if(!strcmp(type.type[cnt], "lv_btn")) return true; } return false; } @@ -978,8 +967,7 @@ static bool lv_list_is_list_label(lv_obj_t * list_label) uint8_t cnt; for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { if(type.type[cnt] == NULL) break; - if(!strcmp(type.type[cnt], "lv_label")) - return true; + if(!strcmp(type.type[cnt], "lv_label")) return true; } return false; } @@ -996,8 +984,7 @@ static bool lv_list_is_list_img(lv_obj_t * list_img) uint8_t cnt; for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) { if(type.type[cnt] == NULL) break; - if(!strcmp(type.type[cnt], "lv_img")) - return true; + if(!strcmp(type.type[cnt], "lv_img")) return true; } return false; } diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 31797ddc170f..811f2745e69f 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -56,13 +56,13 @@ typedef struct const lv_style_t * style_img; /*Style of the list element images on buttons*/ uint16_t size; /*the number of items(buttons) in the list*/ #if LV_USE_ANIMATION - uint16_t anim_time; /*Scroll animation time*/ + uint16_t anim_time; /*Scroll animation time*/ #endif - uint8_t single_mode:1; /* whether single selected mode is enabled */ + uint8_t single_mode : 1; /* whether single selected mode is enabled */ #if LV_USE_GROUP - lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ + lv_obj_t * last_sel; /* The last selected button. It will be reverted when the list is focused again */ lv_obj_t * selected_btn; /* The button is currently being selected*/ #endif } lv_list_ext_t; @@ -110,8 +110,7 @@ void lv_list_clean(lv_obj_t * obj); * @param event_cb specify the an event handler function. NULL if unused * @return pointer to the new list element which can be customized (a button) */ -lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, - lv_event_cb_t event_cb); +lv_obj_t * lv_list_add(lv_obj_t * list, const void * img_src, const char * txt, lv_event_cb_t event_cb); /** * Remove the index of the button in the list diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index 563d139c9a99..d414c5ccec62 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -249,9 +249,9 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig } /*Draw the object*/ else if(mode == LV_DESIGN_DRAW_MAIN) { - lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter); - const lv_style_t * style = lv_obj_get_style(lmeter); - lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); + lv_lmeter_ext_t * ext = lv_obj_get_ext_attr(lmeter); + const lv_style_t * style = lv_obj_get_style(lmeter); + lv_opa_t opa_scale = lv_obj_get_opa_scale(lmeter); lv_style_t style_tmp; lv_style_copy(&style_tmp, style); @@ -269,8 +269,8 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig lv_coord_t x_ofs = lv_obj_get_width(lmeter) / 2 + lmeter->coords.x1; lv_coord_t y_ofs = lv_obj_get_height(lmeter) / 2 + lmeter->coords.y1; int16_t angle_ofs = 90 + (360 - ext->scale_angle) / 2; - int16_t level = (int32_t)((int32_t)(ext->cur_value - ext->min_value) * ext->line_cnt) / - (ext->max_value - ext->min_value); + int16_t level = + (int32_t)((int32_t)(ext->cur_value - ext->min_value) * ext->line_cnt) / (ext->max_value - ext->min_value); uint8_t i; style_tmp.line.color = style->body.main_color; @@ -284,10 +284,9 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig int16_t angle = (i * ext->scale_angle) / (ext->line_cnt - 1) + angle_ofs; lv_coord_t y_out = (int32_t)((int32_t)lv_trigo_sin(angle) * r_out) >> LV_TRIGO_SHIFT; - lv_coord_t x_out = - (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_out) >> LV_TRIGO_SHIFT; - lv_coord_t y_in = (int32_t)((int32_t)lv_trigo_sin(angle) * r_in) >> LV_TRIGO_SHIFT; - lv_coord_t x_in = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_in) >> LV_TRIGO_SHIFT; + lv_coord_t x_out = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_out) >> LV_TRIGO_SHIFT; + lv_coord_t y_in = (int32_t)((int32_t)lv_trigo_sin(angle) * r_in) >> LV_TRIGO_SHIFT; + lv_coord_t x_in = (int32_t)((int32_t)lv_trigo_sin(angle + 90) * r_in) >> LV_TRIGO_SHIFT; /*Rounding*/ x_out = lv_lmeter_coord_round(x_out); @@ -307,8 +306,8 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig if(i >= level) style_tmp.line.color = style->line.color; else { - style_tmp.line.color = lv_color_mix(style->body.grad_color, style->body.main_color, - (255 * i) / ext->line_cnt); + style_tmp.line.color = + lv_color_mix(style->body.grad_color, style->body.main_color, (255 * i) / ext->line_cnt); } lv_draw_line(&p1, &p2, mask, &style_tmp, opa_scale); @@ -343,7 +342,7 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par lv_obj_refresh_ext_draw_pad(lmeter); } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { const lv_style_t * style = lv_lmeter_get_style(lmeter); - lmeter->ext_draw_pad = LV_MATH_MAX(lmeter->ext_draw_pad, style->line.width); + lmeter->ext_draw_pad = LV_MATH_MAX(lmeter->ext_draw_pad, style->line.width); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; uint8_t i; @@ -370,8 +369,7 @@ static lv_coord_t lv_lmeter_coord_round(int32_t x) x = -x; } - x = (x >> LV_LMETER_LINE_UPSCALE) + - ((x & LV_LMETER_LINE_UPSCALE_MASK) >> (LV_LMETER_LINE_UPSCALE - 1)); + x = (x >> LV_LMETER_LINE_UPSCALE) + ((x & LV_LMETER_LINE_UPSCALE_MASK) >> (LV_LMETER_LINE_UPSCALE - 1)); if(was_negative) x = -x; diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index e8ce978bfda5..c59dfc44ebc8 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -77,8 +77,8 @@ lv_obj_t * lv_mbox_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->text = NULL; - ext->btnm = NULL; + ext->text = NULL; + ext->btnm = NULL; #if LV_USE_ANIMATION ext->anim_time = LV_MBOX_CLOSE_ANIM_TIME; #endif @@ -188,11 +188,11 @@ void lv_mbox_set_anim_time(lv_obj_t * mbox, uint16_t anim_time) { #if LV_USE_ANIMATION lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); - anim_time = 0; - ext->anim_time = anim_time; + anim_time = 0; + ext->anim_time = anim_time; #else - (void) mbox; - (void) anim_time; + (void)mbox; + (void)anim_time; #endif } @@ -207,22 +207,22 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) if(lv_mbox_get_anim_time(mbox) != 0) { /*Add shrinking animations*/ lv_anim_t a; - a.var = mbox; - a.start = lv_obj_get_height(mbox); - a.end = 0; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; - a.path_cb = lv_anim_path_linear; - a.ready_cb = NULL; - a.act_time = -delay; - a.time = lv_mbox_get_anim_time(mbox); - a.playback = 0; + a.var = mbox; + a.start = lv_obj_get_height(mbox); + a.end = 0; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; + a.path_cb = lv_anim_path_linear; + a.ready_cb = NULL; + a.act_time = -delay; + a.time = lv_mbox_get_anim_time(mbox); + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); - a.start = lv_obj_get_width(mbox); - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_width; + a.start = lv_obj_get_width(mbox); + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_width; a.ready_cb = lv_mbox_close_ready_cb; lv_anim_create(&a); @@ -231,18 +231,18 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) } else { /*Create an animation to delete the mbox `delay` ms later*/ lv_anim_t a; - a.var = mbox; - a.start = 0; - a.end = 1; - a.exec_cb = (lv_anim_exec_cb_t)NULL; - a.path_cb = lv_anim_path_linear; - a.ready_cb = lv_mbox_close_ready_cb; - a.act_time = -delay; - a.time = 0; - a.playback = 0; + a.var = mbox; + a.start = 0; + a.end = 1; + a.exec_cb = (lv_anim_exec_cb_t)NULL; + a.path_cb = lv_anim_path_linear; + a.ready_cb = lv_mbox_close_ready_cb; + a.act_time = -delay; + a.time = 0; + a.playback = 0; a.playback_pause = 0; - a.repeat = 0; - a.repeat_pause = 0; + a.repeat = 0; + a.repeat_pause = 0; lv_anim_create(&a); } #else @@ -277,19 +277,11 @@ void lv_mbox_set_style(lv_obj_t * mbox, lv_mbox_style_t type, const lv_style_t * switch(type) { case LV_MBOX_STYLE_BG: lv_obj_set_style(mbox, style); break; case LV_MBOX_STYLE_BTN_BG: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BG, style); break; - case LV_MBOX_STYLE_BTN_REL: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_REL, style); - break; + case LV_MBOX_STYLE_BTN_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_REL, style); break; case LV_MBOX_STYLE_BTN_PR: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_PR, style); break; - case LV_MBOX_STYLE_BTN_TGL_REL: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL, style); - break; - case LV_MBOX_STYLE_BTN_TGL_PR: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR, style); - break; - case LV_MBOX_STYLE_BTN_INA: - lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_INA, style); - break; + case LV_MBOX_STYLE_BTN_TGL_REL: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL, style); break; + case LV_MBOX_STYLE_BTN_TGL_PR: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR, style); break; + case LV_MBOX_STYLE_BTN_INA: lv_btnm_set_style(ext->btnm, LV_BTNM_STYLE_BTN_INA, style); break; } mbox_realign(mbox); @@ -364,7 +356,7 @@ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox) lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); return ext->anim_time; #else - (void) mbox; + (void)mbox; return 0; #endif } @@ -377,27 +369,17 @@ uint16_t lv_mbox_get_anim_time(const lv_obj_t * mbox) */ const lv_style_t * lv_mbox_get_style(const lv_obj_t * mbox, lv_mbox_style_t type) { - const lv_style_t * style = NULL; - lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); + const lv_style_t * style = NULL; + lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); switch(type) { case LV_MBOX_STYLE_BG: style = lv_obj_get_style(mbox); break; case LV_MBOX_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BG); break; - case LV_MBOX_STYLE_BTN_REL: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_REL); - break; - case LV_MBOX_STYLE_BTN_PR: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_PR); - break; - case LV_MBOX_STYLE_BTN_TGL_REL: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL); - break; - case LV_MBOX_STYLE_BTN_TGL_PR: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR); - break; - case LV_MBOX_STYLE_BTN_INA: - style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_INA); - break; + case LV_MBOX_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_REL); break; + case LV_MBOX_STYLE_BTN_PR: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_PR); break; + case LV_MBOX_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_REL); break; + case LV_MBOX_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_TGL_PR); break; + case LV_MBOX_STYLE_BTN_INA: style = lv_btnm_get_style(ext->btnm, LV_BTNM_STYLE_BTN_INA); break; default: style = NULL; break; } @@ -513,7 +495,7 @@ static void mbox_realign(lv_obj_t * mbox) lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox); const lv_style_t * style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BG); - lv_coord_t w = lv_obj_get_width(mbox) - style->body.padding.left - style->body.padding.right; + lv_coord_t w = lv_obj_get_width(mbox) - style->body.padding.left - style->body.padding.right; if(ext->text) { lv_obj_set_width(ext->text, w); @@ -524,9 +506,8 @@ static void mbox_realign(lv_obj_t * mbox) const lv_style_t * btn_rel_style = lv_mbox_get_style(mbox, LV_MBOX_STYLE_BTN_REL); lv_coord_t font_h = lv_font_get_line_height(btn_rel_style->text.font); lv_obj_set_size(ext->btnm, w, - font_h + btn_rel_style->body.padding.top + - btn_rel_style->body.padding.bottom + btn_bg_style->body.padding.top + - btn_bg_style->body.padding.bottom); + font_h + btn_rel_style->body.padding.top + btn_rel_style->body.padding.bottom + + btn_bg_style->body.padding.top + btn_bg_style->body.padding.bottom); } } diff --git a/src/lv_objx/lv_mbox.h b/src/lv_objx/lv_mbox.h index ed1a889646d7..805bf190a331 100644 --- a/src/lv_objx/lv_mbox.h +++ b/src/lv_objx/lv_mbox.h @@ -52,8 +52,8 @@ typedef struct { lv_cont_ext_t bg; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * text; /*Text of the message box*/ - lv_obj_t * btnm; /*Button matrix for the buttons*/ + lv_obj_t * text; /*Text of the message box*/ + lv_obj_t * btnm; /*Button matrix for the buttons*/ #if LV_USE_ANIMATION uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/ #endif diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 2470c87f39a0..17d3e9633391 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -83,11 +83,11 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->scrl = NULL; - ext->sb.hor_draw = 0; - ext->sb.ver_draw = 0; - ext->sb.style = &lv_style_pretty; - ext->sb.mode = LV_SB_MODE_AUTO; + ext->scrl = NULL; + ext->sb.hor_draw = 0; + ext->sb.ver_draw = 0; + ext->sb.style = &lv_style_pretty; + ext->sb.mode = LV_SB_MODE_AUTO; #if LV_USE_ANIMATION ext->edge_flash.enabled = 0; ext->edge_flash.bottom_ip = 0; @@ -97,9 +97,9 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) ext->edge_flash.state = 0; ext->edge_flash.style = &lv_style_plain_color; #endif - ext->arrow_scroll = 0; - ext->scroll_prop = 0; - ext->scroll_prop_ip = 0; + ext->arrow_scroll = 0; + ext->scroll_prop = 0; + ext->scroll_prop_ip = 0; /*Init the new page object*/ if(copy == NULL) { @@ -146,8 +146,7 @@ lv_obj_t * lv_page_create(lv_obj_t * par, const lv_obj_t * copy) lv_page_set_arrow_scroll(new_page, copy_ext->arrow_scroll); lv_page_set_style(new_page, LV_PAGE_STYLE_BG, lv_page_get_style(copy, LV_PAGE_STYLE_BG)); - lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, - lv_page_get_style(copy, LV_PAGE_STYLE_SCRL)); + lv_page_set_style(new_page, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy, LV_PAGE_STYLE_SCRL)); lv_page_set_style(new_page, LV_PAGE_STYLE_SB, lv_page_get_style(copy, LV_PAGE_STYLE_SB)); /* Add the signal function only if 'scrolling' is created @@ -241,8 +240,8 @@ void lv_page_set_edge_flash(lv_obj_t * page, bool en) lv_page_ext_t * ext = lv_obj_get_ext_attr(page); ext->edge_flash.enabled = en ? 1 : 0; #else - (void) page; - (void) en; + (void)page; + (void)en; #endif } @@ -333,7 +332,7 @@ bool lv_page_get_edge_flash(lv_obj_t * page) lv_page_ext_t * ext = lv_obj_get_ext_attr(page); return ext->edge_flash.enabled == 0 ? false : true; #else - (void) page; + (void)page; return false; #endif } @@ -374,8 +373,8 @@ lv_coord_t lv_page_get_fit_height(lv_obj_t * page) * */ const lv_style_t * lv_page_get_style(const lv_obj_t * page, lv_page_style_t type) { - const lv_style_t * style = NULL; - lv_page_ext_t * ext = lv_obj_get_ext_attr(page); + const lv_style_t * style = NULL; + lv_page_ext_t * ext = lv_obj_get_ext_attr(page); switch(type) { case LV_PAGE_STYLE_BG: style = lv_obj_get_style(page); break; @@ -412,14 +411,11 @@ bool lv_page_on_edge(lv_obj_t * page, lv_page_edge_t edge) if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) return true; - else if(edge == LV_PAGE_EDGE_BOTTOM && - scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) + else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom) return true; - else if(edge == LV_PAGE_EDGE_LEFT && - scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) + else if(edge == LV_PAGE_EDGE_LEFT && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) return true; - else if(edge == LV_PAGE_EDGE_RIGHT && - scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) + else if(edge == LV_PAGE_EDGE_RIGHT && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right) return true; return false; @@ -516,17 +512,17 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) a.start = lv_obj_get_y(ext->scrl); a.end = scrlable_y; a.time = anim_time; - a.ready_cb = NULL; + a.ready_cb = NULL; a.playback = 0; a.repeat = 0; a.var = ext->scrl; - a.path_cb = lv_anim_path_linear; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.path_cb = lv_anim_path_linear; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; lv_anim_create(&a); - a.start = lv_obj_get_x(ext->scrl); - a.end = scrlable_x; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.start = lv_obj_get_x(ext->scrl); + a.end = scrlable_x; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; lv_anim_create(&a); #endif } @@ -711,8 +707,8 @@ static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mo lv_style_t flash_style; lv_style_copy(&flash_style, ext->edge_flash.style); flash_style.body.radius = LV_RADIUS_CIRCLE; - uint32_t opa = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE; - flash_style.body.opa = opa; + uint32_t opa = (flash_style.body.opa * ext->edge_flash.state) / LV_PAGE_END_FLASH_SIZE; + flash_style.body.opa = opa; lv_draw_rect(&flash_area, mask, &flash_style, lv_obj_get_opa_scale(page)); } } @@ -792,13 +788,13 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param) lv_obj_t * child; if(sign == LV_SIGNAL_CHILD_CHG) { /*Automatically move children to the scrollable object*/ const lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_SCRL); - lv_fit_t fit_left = lv_page_get_scrl_fit_left(page); - lv_fit_t fit_top = lv_page_get_scrl_fit_top(page); - child = lv_obj_get_child(page, NULL); + lv_fit_t fit_left = lv_page_get_scrl_fit_left(page); + lv_fit_t fit_top = lv_page_get_scrl_fit_top(page); + child = lv_obj_get_child(page, NULL); while(child != NULL) { if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) { lv_obj_t * tmp = child; - child = lv_obj_get_child(page, child); /*Get the next child before move this*/ + child = lv_obj_get_child(page, child); /*Get the next child before move this*/ /* Reposition the child to take padding into account (Only if it's on (0;0) now) * It's required to keep new the object on the same coordinate if FIT is enabled.*/ @@ -891,9 +887,9 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi res = ancestor_signal(scrl, sign, param); if(res != LV_RES_OK) return res; - lv_obj_t * page = lv_obj_get_parent(scrl); - const lv_style_t * page_style = lv_obj_get_style(page); - lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page); + lv_obj_t * page = lv_obj_get_parent(scrl); + const lv_style_t * page_style = lv_obj_get_style(page); + lv_page_ext_t * page_ext = lv_obj_get_ext_attr(page); if(sign == LV_SIGNAL_CORD_CHG) { /*Limit the position of the scrollable object to be always visible @@ -921,19 +917,13 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi /* Start the scroll propagation if there is drag vector on the indev, but the drag is not * started yet and the scrollable is in a corner. It will enable the scroll propagation only * when a new scroll begins and not when the scrollable is already being scrolled.*/ - if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && - lv_indev_is_dragging(indev) == false) { - if(((drag_vect.y > 0 && - scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) || - (drag_vect.y < 0 && - scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) && - ((drag_vect.x > 0 && - scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) || - (drag_vect.x < 0 && - scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) { - - if(lv_obj_get_parent(page_parent) != - NULL) { /*Do not propagate the scroll to a screen*/ + if(page_ext->scroll_prop && page_ext->scroll_prop_ip == 0 && lv_indev_is_dragging(indev) == false) { + if(((drag_vect.y > 0 && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top) || + (drag_vect.y < 0 && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)) && + ((drag_vect.x > 0 && scrl_coords.x1 == page_coords.x1 + page_style->body.padding.left) || + (drag_vect.x < 0 && scrl_coords.x2 == page_coords.x2 - page_style->body.padding.right))) { + + if(lv_obj_get_parent(page_parent) != NULL) { /*Do not propagate the scroll to a screen*/ page_ext->scroll_prop_ip = 1; } } @@ -1080,17 +1070,10 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) lv_obj_t * page = lv_obj_get_parent(scrl); /*clang-format off*/ - if(event == LV_EVENT_PRESSED || - event == LV_EVENT_PRESSING || - event == LV_EVENT_PRESS_LOST || - event == LV_EVENT_RELEASED || - event == LV_EVENT_SHORT_CLICKED || - event == LV_EVENT_CLICKED || - event == LV_EVENT_LONG_PRESSED || - event == LV_EVENT_LONG_PRESSED_REPEAT || - event == LV_EVENT_FOCUSED || - event == LV_EVENT_DEFOCUSED) - { + if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST || + event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_CLICKED || + event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || event == LV_EVENT_FOCUSED || + event == LV_EVENT_DEFOCUSED) { lv_event_send(page, event, lv_event_get_data()); } /*clang-format on*/ @@ -1115,10 +1098,8 @@ static void lv_page_sb_refresh(lv_obj_t * page) * else: * - horizontal and vertical scrollbars can overlap on the corners * - if the page has radius the scrollbar can be out of the radius */ - lv_coord_t sb_hor_pad = - LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right); - lv_coord_t sb_ver_pad = - LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom); + lv_coord_t sb_hor_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.right); + lv_coord_t sb_ver_pad = LV_MATH_MAX(ext->sb.style->body.padding.inner, style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_OFF) return; @@ -1154,8 +1135,7 @@ static void lv_page_sb_refresh(lv_obj_t * page) } /*Full sized horizontal scrollbar*/ - if(scrl_w <= - obj_w - style->body.padding.left - style->body.padding.right) { + if(scrl_w <= obj_w - style->body.padding.left - style->body.padding.right) { lv_area_set_width(&ext->sb.hor_area, obj_w - 2 * sb_hor_pad); lv_area_set_pos(&ext->sb.hor_area, sb_hor_pad, obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); @@ -1163,18 +1143,16 @@ static void lv_page_sb_refresh(lv_obj_t * page) } /*Smaller horizontal scrollbar*/ else { - size_tmp = (obj_w * (obj_w - (2 * sb_hor_pad))) / - (scrl_w + style->body.padding.left + style->body.padding.right); + size_tmp = + (obj_w * (obj_w - (2 * sb_hor_pad))) / (scrl_w + style->body.padding.left + style->body.padding.right); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; lv_area_set_width(&ext->sb.hor_area, size_tmp); - lv_area_set_pos( - &ext->sb.hor_area, - sb_hor_pad + - (-(lv_obj_get_x(scrl) - style->body.padding.left) * - (obj_w - size_tmp - 2 * sb_hor_pad)) / - (scrl_w + style->body.padding.left + style->body.padding.right - obj_w), - obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); + lv_area_set_pos(&ext->sb.hor_area, + sb_hor_pad + + (-(lv_obj_get_x(scrl) - style->body.padding.left) * (obj_w - size_tmp - 2 * sb_hor_pad)) / + (scrl_w + style->body.padding.left + style->body.padding.right - obj_w), + obj_h - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.bottom); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; } @@ -1183,24 +1161,21 @@ static void lv_page_sb_refresh(lv_obj_t * page) if(scrl_h <= obj_h - style->body.padding.top - style->body.padding.bottom) { lv_area_set_height(&ext->sb.ver_area, obj_h - 2 * sb_ver_pad); lv_area_set_pos(&ext->sb.ver_area, - obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, - sb_ver_pad); + obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, sb_ver_pad); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; } /*Smaller vertical scroll bar*/ else { - size_tmp = (obj_h * (obj_h - (2 * sb_ver_pad))) / - (scrl_h + style->body.padding.top + style->body.padding.bottom); + size_tmp = + (obj_h * (obj_h - (2 * sb_ver_pad))) / (scrl_h + style->body.padding.top + style->body.padding.bottom); if(size_tmp < LV_PAGE_SB_MIN_SIZE) size_tmp = LV_PAGE_SB_MIN_SIZE; lv_area_set_height(&ext->sb.ver_area, size_tmp); - lv_area_set_pos( - &ext->sb.ver_area, - obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, - sb_ver_pad + - (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * - (obj_h - size_tmp - 2 * sb_ver_pad)) / - (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h)); + lv_area_set_pos(&ext->sb.ver_area, + obj_w - ext->sb.style->body.padding.inner - ext->sb.style->body.padding.right, + sb_ver_pad + (-(lv_obj_get_y(scrl) - ext->sb.style->body.padding.bottom) * + (obj_h - size_tmp - 2 * sb_ver_pad)) / + (scrl_h + style->body.padding.top + style->body.padding.bottom - obj_h)); if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 1; } diff --git a/src/lv_objx/lv_page.h b/src/lv_objx/lv_page.h index c81db161644d..337ea0a55301 100644 --- a/src/lv_objx/lv_page.h +++ b/src/lv_objx/lv_page.h @@ -40,11 +40,10 @@ extern "C" { /*Scrollbar modes: shows when should the scrollbars be visible*/ enum { - LV_SB_MODE_OFF = 0x0, /*Never show scrollbars*/ - LV_SB_MODE_ON = 0x1, /*Always show scrollbars*/ - LV_SB_MODE_DRAG = 0x2, /*Show scrollbars when page is being dragged*/ - LV_SB_MODE_AUTO = - 0x3, /*Show scrollbars when the scrollable container is large enough to be scrolled*/ + LV_SB_MODE_OFF = 0x0, /*Never show scrollbars*/ + LV_SB_MODE_ON = 0x1, /*Always show scrollbars*/ + LV_SB_MODE_DRAG = 0x2, /*Show scrollbars when page is being dragged*/ + LV_SB_MODE_AUTO = 0x3, /*Show scrollbars when the scrollable container is large enough to be scrolled*/ LV_SB_MODE_HIDE = 0x4, /*Hide the scroll bar temporally*/ LV_SB_MODE_UNHIDE = 0x5, /*Unhide the previously hidden scrollbar. Recover it's type too*/ }; @@ -52,12 +51,7 @@ typedef uint8_t lv_sb_mode_t; /*Edges: describes the four edges of the page*/ -enum { - LV_PAGE_EDGE_LEFT = 0x0, - LV_PAGE_EDGE_TOP = 0x1, - LV_PAGE_EDGE_RIGHT = 0x2, - LV_PAGE_EDGE_BOTTOM = 0x3 -}; +enum { LV_PAGE_EDGE_LEFT = 0x0, LV_PAGE_EDGE_TOP = 0x1, LV_PAGE_EDGE_RIGHT = 0x2, LV_PAGE_EDGE_BOTTOM = 0x3 }; typedef uint8_t lv_page_edge_t; /*Data of page*/ @@ -69,28 +63,26 @@ typedef struct struct { const lv_style_t * style; /*Style of scrollbars*/ - lv_area_t - hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ - lv_area_t - ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/ - uint8_t hor_draw : 1; /*1: horizontal scrollbar is visible now (Handled by the library)*/ - uint8_t ver_draw : 1; /*1: vertical scrollbar is visible now (Handled by the library)*/ - lv_sb_mode_t mode : 3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/ + lv_area_t hor_area; /*Horizontal scrollbar area relative to the page. (Handled by the library) */ + lv_area_t ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/ + uint8_t hor_draw : 1; /*1: horizontal scrollbar is visible now (Handled by the library)*/ + uint8_t ver_draw : 1; /*1: vertical scrollbar is visible now (Handled by the library)*/ + lv_sb_mode_t mode : 3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/ } sb; #if LV_USE_ANIMATION struct { - lv_anim_value_t state; /*Store the current size of the edge flash effect*/ - const lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ - uint8_t enabled : 1; /*1: Show a flash animation on the edge*/ - uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In - Progress)*/ - uint8_t bottom_ip : 1; /*Used internally to show that bottom most position is reached (flash - is In Progress)*/ - uint8_t right_ip : 1; /*Used internally to show that right most position is reached (flash - is In Progress)*/ - uint8_t left_ip : 1; /*Used internally to show that left most position is reached (flash is - In Progress)*/ + lv_anim_value_t state; /*Store the current size of the edge flash effect*/ + const lv_style_t * style; /*Style of edge flash effect (usually homogeneous circle)*/ + uint8_t enabled : 1; /*1: Show a flash animation on the edge*/ + uint8_t top_ip : 1; /*Used internally to show that top most position is reached (flash is In + Progress)*/ + uint8_t bottom_ip : 1; /*Used internally to show that bottom most position is reached (flash + is In Progress)*/ + uint8_t right_ip : 1; /*Used internally to show that right most position is reached (flash + is In Progress)*/ + uint8_t left_ip : 1; /*Used internally to show that left most position is reached (flash is + In Progress)*/ } edge_flash; #endif @@ -175,8 +167,7 @@ void lv_page_set_edge_flash(lv_obj_t * page, bool en); * @param top bottom fit policy from `lv_fit_t` * @param bottom bottom fit policy from `lv_fit_t` */ -static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, - lv_fit_t top, lv_fit_t bottom) +static inline void lv_page_set_scrl_fit4(lv_obj_t * page, lv_fit_t left, lv_fit_t right, lv_fit_t top, lv_fit_t bottom) { lv_cont_set_fit4(lv_page_get_scrl(page), left, right, top, bottom); } diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index d89c37aace4c..f63430405363 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -80,7 +80,7 @@ lv_obj_t * lv_preload_create(lv_obj_t * par, const lv_obj_t * copy) /*Initialize the allocated 'ext' */ ext->arc_length = LV_PRELOAD_DEF_ARC_LENGTH; ext->anim_type = LV_PRELOAD_DEF_ANIM; - ext->anim_dir = LV_PRELOAD_DIR_FORWARD; + ext->anim_dir = LV_PRELOAD_DIR_FORWARD; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_preload, lv_preload_signal); @@ -178,15 +178,14 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) case LV_PRELOAD_TYPE_FILLSPIN_ARC: { ext->anim_type = LV_PRELOAD_TYPE_FILLSPIN_ARC; lv_anim_t a; - a.var = preload; - if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { + a.var = preload; + if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) { /* Clockwise */ - a.start = 360; - a.end = 0; - } - else { - a.start = 0; - a.end = 360; + a.start = 360; + a.end = 0; + } else { + a.start = 0; + a.end = 360; } a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; a.path_cb = lv_anim_path_ease_in_out; @@ -200,15 +199,14 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) lv_anim_create(&a); lv_anim_t b; - b.var = preload; - if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { + b.var = preload; + if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) { /* Clockwise */ - b.start = 360 - ext->arc_length; - b.end = ext->arc_length; - } - else { - b.start = ext->arc_length; - b.end = 360 - ext->arc_length; + b.start = 360 - ext->arc_length; + b.end = ext->arc_length; + } else { + b.start = ext->arc_length; + b.end = 360 - ext->arc_length; } b.exec_cb = (lv_anim_exec_cb_t)lv_preload_set_arc_length; b.path_cb = lv_anim_path_ease_in_out; @@ -226,15 +224,14 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) default: { ext->anim_type = LV_PRELOAD_TYPE_SPINNING_ARC; lv_anim_t a; - a.var = preload; - if( ext->anim_dir == LV_PRELOAD_DIR_FORWARD ) { + a.var = preload; + if(ext->anim_dir == LV_PRELOAD_DIR_FORWARD) { /* Clockwise */ - a.start = 360; - a.end = 0; - } - else { - a.start = 0; - a.end = 360; + a.start = 360; + a.end = 0; + } else { + a.start = 0; + a.end = 360; } a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; a.path_cb = lv_anim_path_ease_in_out; @@ -251,7 +248,8 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) } } -void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir) { +void lv_preload_set_anim_dir(lv_obj_t * preload, lv_preload_dir_t dir) +{ lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); ext->anim_dir = dir; @@ -311,7 +309,8 @@ lv_preload_type_t lv_preload_get_anim_type(lv_obj_t * preload) return ext->anim_type; } -lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload) { +lv_preload_dir_t lv_preload_get_anim_dir(lv_obj_t * preload) +{ lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); return ext->anim_dir; } @@ -330,8 +329,8 @@ void lv_preload_spinner_anim(void * ptr, lv_anim_value_t val) lv_obj_t * preload = ptr; lv_preload_ext_t * ext = lv_obj_get_ext_attr(preload); - int16_t angle_start = val - ext->arc_length / 2 + 180; - int16_t angle_end = angle_start + ext->arc_length; + int16_t angle_start = val - ext->arc_length / 2 + 180; + int16_t angle_end = angle_start + ext->arc_length; angle_start = angle_start % 360; angle_end = angle_end % 360; diff --git a/src/lv_objx/lv_preload.h b/src/lv_objx/lv_preload.h index 7d73eb373ab1..45e0f620ffe6 100644 --- a/src/lv_objx/lv_preload.h +++ b/src/lv_objx/lv_preload.h @@ -59,10 +59,10 @@ typedef struct { lv_arc_ext_t arc; /*Ext. of ancestor*/ /*New data for this type */ - lv_anim_value_t arc_length; /*Length of the spinning indicator in degree*/ - uint16_t time; /*Time of one round*/ - lv_preload_type_t anim_type:1; /*Type of the arc animation*/ - lv_preload_dir_t anim_dir:1; /*Animation Direction*/ + lv_anim_value_t arc_length; /*Length of the spinning indicator in degree*/ + uint16_t time; /*Time of one round*/ + lv_preload_type_t anim_type : 1; /*Type of the arc animation*/ + lv_preload_dir_t anim_dir : 1; /*Animation Direction*/ } lv_preload_ext_t; /*Styles*/ diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index 8698d47603fe..e8d80ef8c5dd 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -72,8 +72,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(new_roller); if(new_roller == NULL) return NULL; - if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_roller)); + if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_roller)); if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_roller); /*Allocate the roller type specific extended data*/ @@ -89,7 +88,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy) /*Init the new roller roller*/ if(copy == NULL) { lv_obj_t * scrl = lv_page_get_scrl(new_roller); - lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ + lv_obj_set_drag(scrl, true); /*In ddlist it might be disabled*/ lv_page_set_scrl_fit2(new_roller, LV_FIT_TIGHT, LV_FIT_NONE); /*Height is specified directly*/ lv_ddlist_open(new_roller, false); lv_ddlist_set_anim_time(new_roller, LV_ROLLER_DEF_ANIM_TIME); @@ -181,8 +180,7 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align) { lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_mem_assert(ext); - if(ext->ddlist.label == NULL) - return; /*Probably the roller is being deleted if the label is NULL.*/ + if(ext->ddlist.label == NULL) return; /*Probably the roller is being deleted if the label is NULL.*/ lv_label_set_align(ext->ddlist.label, align); } @@ -323,10 +321,8 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); lv_coord_t font_h = lv_font_get_line_height(font); lv_area_t rect_area; - rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - - style->text.line_space / 2; - if((font_h & 0x1) && (style->text.line_space & 0x1)) - rect_area.y1--; /*Compensate the two rounding error*/ + rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; + if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/ rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; rect_area.x1 = roller->coords.x1; rect_area.x2 = roller->coords.x2; @@ -343,10 +339,8 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig /*Redraw the text on the selected area with a different color*/ lv_area_t rect_area; - rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - - style->text.line_space / 2; - if((font_h & 0x1) && (style->text.line_space & 0x1)) - rect_area.y1--; /*Compensate the two rounding error*/ + rect_area.y1 = roller->coords.y1 + lv_obj_get_height(roller) / 2 - font_h / 2 - style->text.line_space / 2; + if((font_h & 0x1) && (style->text.line_space & 0x1)) rect_area.y1--; /*Compensate the two rounding error*/ rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; rect_area.x1 = roller->coords.x1; rect_area.x2 = roller->coords.x2; @@ -435,9 +429,8 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; } } else { - ext->ddlist.sel_opt_id_ori = - ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if ENER - wont't be pressed*/ + ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Save the current value. Used to revert this state if + ENER wont't be pressed*/ } #endif } else if(sign == LV_SIGNAL_DEFOCUS) { @@ -452,15 +445,13 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par char c = *((char *)param); if(c == LV_KEY_RIGHT || c == LV_KEY_DOWN) { if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { - uint16_t ori_id = - ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ + uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id + 1, true); ext->ddlist.sel_opt_id_ori = ori_id; } } else if(c == LV_KEY_LEFT || c == LV_KEY_UP) { if(ext->ddlist.sel_opt_id > 0) { - uint16_t ori_id = - ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ + uint16_t ori_id = ext->ddlist.sel_opt_id_ori; /*lv_roller_set_selceted will overwrite this*/ lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true); ext->ddlist.sel_opt_id_ori = ori_id; } @@ -529,12 +520,10 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, /*In edit mode go to navigate mode if an option is selected*/ lv_group_t * g = lv_obj_get_group(roller); bool editing = lv_group_get_editing(g); - if(editing) - lv_group_set_editing(g, false); + if(editing) lv_group_set_editing(g, false); #endif } - } - else if(sign == LV_SIGNAL_PRESSED) { + } else if(sign == LV_SIGNAL_PRESSED) { #if LV_USE_ANIMATION lv_anim_del(roller_scrl, (lv_anim_exec_cb_t)lv_obj_set_y); #endif @@ -582,8 +571,7 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) half_roller.x2 += roller->ext_draw_pad; half_roller.y2 = roller->coords.y2 + roller->ext_draw_pad; half_roller.y1 = roller->coords.y1 + h / 2; - if((h & 0x1) == 0) - half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/ + if((h & 0x1) == 0) half_roller.y1++; /*With even height the pixels in the middle would be drawn twice*/ union_ok = lv_area_intersect(&half_mask, &half_roller, mask); @@ -620,24 +608,24 @@ static void refr_position(lv_obj_t * roller, bool anim_en) /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. * But without animations do it manually*/ - if(anim_en == false + if(anim_en == false #if LV_USE_ANIMATION - || ext->ddlist.anim_time == 0 + || ext->ddlist.anim_time == 0 #endif - ) { + ) { inf_normalize(roller_scrl); } - int32_t id = ext->ddlist.sel_opt_id; - lv_coord_t line_y1 = id * (font_h + style_label->text.line_space) + - ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; + int32_t id = ext->ddlist.sel_opt_id; + lv_coord_t line_y1 = + id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; lv_coord_t new_y = -line_y1 + (h - font_h) / 2; - if( anim_en == false + if(anim_en == false #if LV_USE_ANIMATION - || ext->ddlist.anim_time == 0 + || ext->ddlist.anim_time == 0 #endif - ) { + ) { lv_obj_set_y(roller_scrl, new_y); } else { #if LV_USE_ANIMATION @@ -675,8 +663,7 @@ static void refr_height(lv_obj_t * roller) obj_align = LV_ALIGN_IN_RIGHT_MID; } - lv_obj_set_height(lv_page_get_scrl(roller), - lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); + lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); #if LV_USE_ANIMATION lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); @@ -699,8 +686,7 @@ static void inf_normalize(void * scrl) ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id % real_id_cnt; - ext->ddlist.sel_opt_id += - (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ + ext->ddlist.sel_opt_id += (LV_ROLLER_INF_PAGES / 2) * real_id_cnt; /*Select the middle page*/ /*Move to the new id*/ const lv_style_t * style_label = lv_obj_get_style(ext->ddlist.label); diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index c99b665240d0..869b3abe6a61 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -141,8 +141,7 @@ uint16_t lv_roller_get_selected(const lv_obj_t * roller); * @param buf pointer to an array to store the string * @param buf_size size of `buf` in bytes. 0: to ignore it. */ -static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, - uint16_t buf_size) +static inline void lv_roller_get_selected_str(const lv_obj_t * roller, char * buf, uint16_t buf_size) { lv_ddlist_get_selected_str(roller, buf, buf_size); } diff --git a/src/lv_objx/lv_slider.c b/src/lv_objx/lv_slider.c index e2e7666cda2d..a7fb4333bf5a 100644 --- a/src/lv_objx/lv_slider.c +++ b/src/lv_objx/lv_slider.c @@ -18,8 +18,7 @@ /********************* * DEFINES *********************/ -#define LV_SLIDER_SIZE_MIN \ - 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/ +#define LV_SLIDER_SIZE_MIN 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/ #define LV_SLIDER_NOT_PRESSED INT16_MIN /********************** @@ -196,8 +195,8 @@ bool lv_slider_get_knob_in(const lv_obj_t * slider) */ const lv_style_t * lv_slider_get_style(const lv_obj_t * slider, lv_slider_style_t type) { - const lv_style_t * style = NULL; - lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); + const lv_style_t * style = NULL; + lv_slider_ext_t * ext = lv_obj_get_ext_attr(slider); switch(type) { case LV_SLIDER_STYLE_BG: style = lv_bar_get_style(slider, LV_BAR_STYLE_BG); break; @@ -265,12 +264,11 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig area_bg.x2 -= pad_right_bg; area_bg.y1 += pad_top_bg; area_bg.y2 -= pad_bottom_bg; - } else { /*Let space only in the perpendicular directions*/ - area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/ - area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/ - area_bg.y1 += slider_w > slider_h ? pad_top_bg : 0; /*Pad only for horizontal slider*/ - area_bg.y2 -= - slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/ + } else { /*Let space only in the perpendicular directions*/ + area_bg.x1 += slider_w < slider_h ? pad_left_bg : 0; /*Pad only for vertical slider*/ + area_bg.x2 -= slider_w < slider_h ? pad_right_bg : 0; /*Pad only for vertical slider*/ + area_bg.y1 += slider_w > slider_h ? pad_top_bg : 0; /*Pad only for horizontal slider*/ + area_bg.y2 -= slider_w > slider_h ? pad_bottom_bg : 0; /*Pad only for horizontal slider*/ } #if LV_USE_GROUP == 0 @@ -325,29 +323,23 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_x = - (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)indic_w * (ext->bar.anim_start - min_value)) / (max_value - min_value); lv_coord_t anim_end_x = - (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)indic_w * (ext->bar.anim_end - min_value)) / (max_value - min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ - area_indic.x2 = - anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } - else + area_indic.x2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else #endif { - area_indic.x2 = - (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); + area_indic.x2 = (int32_t)((int32_t)indic_w * (cur_value - min_value)) / (max_value - min_value); } area_indic.x2 = area_indic.x1 + area_indic.x2 - 1; /*Draw the indicator but don't draw an ugly 1px wide rectangle on the left on min. * value*/ - if(area_indic.x1 != area_indic.x2) - lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); } else { lv_coord_t indic_h = lv_area_get_height(&area_indic); @@ -355,29 +347,23 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { /*Calculate the coordinates of anim. start and end*/ lv_coord_t anim_start_y = - (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)indic_h * (ext->bar.anim_start - min_value)) / (max_value - min_value); lv_coord_t anim_end_y = - (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)indic_h * (ext->bar.anim_end - min_value)) / (max_value - min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ - area_indic.y1 = - anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); - } - else + area_indic.y1 = anim_start_y + (((anim_end_y - anim_start_y) * ext->bar.anim_state) >> 8); + } else #endif { - area_indic.y1 = - (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); + area_indic.y1 = (int32_t)((int32_t)indic_h * (cur_value - min_value)) / (max_value - min_value); } area_indic.y1 = area_indic.y2 - area_indic.y1 + 1; /*Draw the indicator but don't draw an ugly 1px height rectangle on the bottom on min. * value*/ - if(area_indic.x1 != area_indic.x2) - lv_draw_rect(&area_indic, mask, style_indic, opa_scale); + if(area_indic.x1 != area_indic.x2) lv_draw_rect(&area_indic, mask, style_indic, opa_scale); } /*Before the knob add the border if required*/ @@ -407,22 +393,18 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t w = slider_w - slider_h - 1; lv_coord_t anim_start_x = - (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)w * (ext->bar.anim_start - min_value)) / (max_value - min_value); lv_coord_t anim_end_x = - (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)w * (ext->bar.anim_end - min_value)) / (max_value - min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ - knob_area.x1 = - anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } else + knob_area.x1 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else #endif { - knob_area.x1 = - (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / - (max_value - min_value); + knob_area.x1 = (int32_t)((int32_t)(slider_w - slider_h - 1) * (cur_value - min_value)) / + (max_value - min_value); } knob_area.x1 += slider->coords.x1; @@ -440,22 +422,18 @@ static bool lv_slider_design(lv_obj_t * slider, const lv_area_t * mask, lv_desig if(ext->bar.anim_state != LV_BAR_ANIM_STATE_INV) { lv_coord_t h = slider_h - slider_w - 1; lv_coord_t anim_start_x = - (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)h * (ext->bar.anim_start - min_value)) / (max_value - min_value); lv_coord_t anim_end_x = - (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / - (max_value - min_value); + (int32_t)((int32_t)h * (ext->bar.anim_end - min_value)) / (max_value - min_value); /*Calculate the real position based on `anim_state` (between `anim_start` and * `anim_end`)*/ - knob_area.y2 = - anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); - } else + knob_area.y2 = anim_start_x + (((anim_end_x - anim_start_x) * ext->bar.anim_state) >> 8); + } else #endif { - knob_area.y2 = - (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / - (max_value - min_value); + knob_area.y2 = (int32_t)((int32_t)(slider_h - slider_w - 1) * (cur_value - min_value)) / + (max_value - min_value); } knob_area.y2 = slider->coords.y2 - knob_area.y2; @@ -501,18 +479,14 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(w > h) { lv_coord_t knob_w = h; p.x -= - slider->coords.x1 + - h / 2; /*Modify the point to shift with half knob (important on the start and end)*/ - tmp = (int32_t)((int32_t)p.x * (ext->bar.max_value - ext->bar.min_value + 1)) / - (w - knob_w); + slider->coords.x1 + h / 2; /*Modify the point to shift with half knob (important on the start and end)*/ + tmp = (int32_t)((int32_t)p.x * (ext->bar.max_value - ext->bar.min_value + 1)) / (w - knob_w); tmp += ext->bar.min_value; } else { lv_coord_t knob_h = w; p.y -= - slider->coords.y1 + - w / 2; /*Modify the point to shift with half knob (important on the start and end)*/ - tmp = (int32_t)((int32_t)p.y * (ext->bar.max_value - ext->bar.min_value + 1)) / - (h - knob_h); + slider->coords.y1 + w / 2; /*Modify the point to shift with half knob (important on the start and end)*/ + tmp = (int32_t)((int32_t)p.y * (ext->bar.max_value - ext->bar.min_value + 1)) / (h - knob_h); tmp = ext->bar.max_value - tmp; /*Invert the value: smaller value means higher y*/ } @@ -528,8 +502,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par if(res != LV_RES_OK) return res; } } else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_PRESS_LOST) { - if(ext->drag_value != LV_SLIDER_NOT_PRESSED) - lv_slider_set_value(slider, ext->drag_value, false); + if(ext->drag_value != LV_SLIDER_NOT_PRESSED) lv_slider_set_value(slider, ext->drag_value, false); ext->drag_value = LV_SLIDER_NOT_PRESSED; #if LV_USE_GROUP @@ -553,7 +526,7 @@ static lv_res_t lv_slider_signal(lv_obj_t * slider, lv_signal_t sign, void * par const lv_style_t * style = lv_slider_get_style(slider, LV_SLIDER_STYLE_BG); const lv_style_t * knob_style = lv_slider_get_style(slider, LV_SLIDER_STYLE_KNOB); - lv_coord_t shadow_w = knob_style->body.shadow.width; + lv_coord_t shadow_w = knob_style->body.shadow.width; if(ext->knob_in == 0) { /* The smaller size is the knob diameter*/ lv_coord_t x = LV_MATH_MIN(w / 2 + 1 + shadow_w, h / 2 + 1 + shadow_w); diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index e82525672def..2f602ed3cb11 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -42,8 +42,8 @@ typedef struct lv_bar_ext_t bar; /*Ext. of ancestor*/ /*New data for this type */ const lv_style_t * style_knob; /*Style of the knob*/ - int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ - uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/ + int16_t drag_value; /*Store a temporal value during press until release (Handled by the library)*/ + uint8_t knob_in : 1; /*1: Draw the knob inside the bar*/ } lv_slider_ext_t; /*Built-in styles of slider*/ diff --git a/src/lv_objx/lv_spinbox.c b/src/lv_objx/lv_spinbox.c index 8dfd9d87215d..c6b1ccc612c7 100644 --- a/src/lv_objx/lv_spinbox.c +++ b/src/lv_objx/lv_spinbox.c @@ -138,16 +138,14 @@ void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i) * @param separator_position number of digit before the decimal point. If 0, decimal point is not * shown */ -void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, - uint8_t separator_position) +void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position) { lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); if(ext == NULL) return; if(digit_count > LV_SPINBOX_MAX_DIGIT_COUNT) digit_count = LV_SPINBOX_MAX_DIGIT_COUNT; - if(separator_position > LV_SPINBOX_MAX_DIGIT_COUNT) - separator_position = LV_SPINBOX_MAX_DIGIT_COUNT; + if(separator_position > LV_SPINBOX_MAX_DIGIT_COUNT) separator_position = LV_SPINBOX_MAX_DIGIT_COUNT; ext->digit_count = digit_count; ext->dec_point_pos = separator_position; @@ -249,8 +247,7 @@ void lv_spinbox_step_previous(lv_obj_t * spinbox) { lv_spinbox_ext_t * ext = lv_obj_get_ext_attr(spinbox); int32_t step_limit; - step_limit = - LV_MATH_MAX(ext->range_max, (ext->range_min < 0 ? (-ext->range_min) : ext->range_min)); + step_limit = LV_MATH_MAX(ext->range_max, (ext->range_min < 0 ? (-ext->range_min) : ext->range_min)); int32_t new_step = ext->step * 10; if(new_step <= step_limit) ext->step = new_step; diff --git a/src/lv_objx/lv_spinbox.h b/src/lv_objx/lv_spinbox.h index 484457f27c43..b5fcee0425e7 100644 --- a/src/lv_objx/lv_spinbox.h +++ b/src/lv_objx/lv_spinbox.h @@ -82,8 +82,7 @@ lv_obj_t * lv_spinbox_create(lv_obj_t * par, const lv_obj_t * copy); * @param type which style should be set * @param style pointer to a style */ -static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, - lv_style_t * style) +static inline void lv_spinbox_set_style(lv_obj_t * spinbox, lv_spinbox_style_t type, lv_style_t * style) { lv_ta_set_style(spinbox, type, style); } @@ -102,8 +101,7 @@ void lv_spinbox_set_value(lv_obj_t * spinbox, int32_t i); * @param separator_position number of digit before the decimal point. If 0, decimal point is not * shown */ -void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, - uint8_t separator_position); +void lv_spinbox_set_digit_format(lv_obj_t * spinbox, uint8_t digit_count, uint8_t separator_position); /** * Set spinbox step diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 5468dd9dd9b1..0d2ac9ce468b 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -203,8 +203,8 @@ void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time) lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); ext->anim_time = anim_time; #else - (void) sw; - (void) anim_time; + (void)sw; + (void)anim_time; #endif } @@ -221,7 +221,7 @@ void lv_sw_set_anim_time(lv_obj_t * sw, uint16_t anim_time) const lv_style_t * lv_sw_get_style(const lv_obj_t * sw, lv_sw_style_t type) { const lv_style_t * style = NULL; - lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); + lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); switch(type) { case LV_SW_STYLE_BG: style = lv_slider_get_style(sw, LV_SLIDER_STYLE_BG); break; diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index 1b4e73e25a25..386f1ef33159 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -43,8 +43,7 @@ typedef struct lv_slider_ext_t slider; /*Ext. of ancestor*/ /*New data for this type */ const lv_style_t * style_knob_off; /*Style of the knob when the switch is OFF*/ - const lv_style_t * - style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/ + const lv_style_t * style_knob_on; /*Style of the knob when the switch is ON (NULL to use the same as OFF)*/ lv_coord_t start_x; uint8_t changed : 1; /*Indicates the switch state explicitly changed by drag*/ uint8_t slided : 1; diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index e6b7ebb243dc..acad1d7f4a02 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -54,8 +54,7 @@ static bool char_is_accepted(lv_obj_t * ta, uint32_t c); static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res); static void refr_cursor_area(lv_obj_t * ta); static void placeholder_update(lv_obj_t * ta); -static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, - lv_indev_t * click_source); +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source); /********************** * STATIC VARIABLES @@ -99,24 +98,24 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; - ext->cursor.state = 1; - ext->pwd_mode = 0; - ext->pwd_tmp = NULL; - ext->pwd_show_time = LV_TA_DEF_PWD_SHOW_TIME; - ext->accapted_chars = NULL; - ext->max_length = 0; - ext->cursor.style = NULL; + ext->cursor.state = 1; + ext->pwd_mode = 0; + ext->pwd_tmp = NULL; + ext->pwd_show_time = LV_TA_DEF_PWD_SHOW_TIME; + ext->accapted_chars = NULL; + ext->max_length = 0; + ext->cursor.style = NULL; ext->cursor.blink_time = LV_TA_DEF_CURSOR_BLINK_TIME; - ext->cursor.pos = 0; - ext->cursor.type = LV_CURSOR_LINE; - ext->cursor.valid_x = 0; - ext->one_line = 0; - ext->text_sel_en = 0; - ext->label = NULL; - ext->placeholder = NULL; + ext->cursor.pos = 0; + ext->cursor.type = LV_CURSOR_LINE; + ext->cursor.valid_x = 0; + ext->one_line = 0; + ext->text_sel_en = 0; + ext->label = NULL; + ext->placeholder = NULL; #if LV_USE_ANIMATION == 0 - ext->pwd_show_time = 0; + ext->pwd_show_time = 0; ext->cursor.blink_time = 0; #endif @@ -183,7 +182,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) a.repeat_pause = 0; a.playback = 1; a.playback_pause = 0; - a.path_cb = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); } #endif @@ -242,14 +241,12 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) if(ext->pwd_mode != 0) pwd_char_hider(ta); /*Make sure all the current text contains only '*'*/ - lv_label_ins_text(ext->label, ext->cursor.pos, - (const char *)letter_buf); /*Insert the character*/ - lv_ta_clear_selection(ta); /*Clear selection*/ + lv_label_ins_text(ext->label, ext->cursor.pos, (const char *)letter_buf); /*Insert the character*/ + lv_ta_clear_selection(ta); /*Clear selection*/ if(ext->pwd_mode != 0) { - ext->pwd_tmp = - lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */ + ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */ lv_mem_assert(ext->pwd_tmp); if(ext->pwd_tmp == NULL) return; @@ -269,7 +266,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) a.repeat_pause = 0; a.playback = 0; a.playback_pause = 0; - a.path_cb = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); #else @@ -337,21 +334,21 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt); #if LV_USE_ANIMATION - /*Auto hide characters*/ - lv_anim_t a; - a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; - a.time = ext->pwd_show_time; - a.act_time = 0; - a.ready_cb = pwd_char_hider_anim_ready; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); + /*Auto hide characters*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.time = ext->pwd_show_time; + a.act_time = 0; + a.ready_cb = pwd_char_hider_anim_ready; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); #else pwd_char_hider(ta); #endif @@ -477,21 +474,21 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) strcpy(ext->pwd_tmp, txt); #if LV_USE_ANIMATION - /*Auto hide characters*/ - lv_anim_t a; - a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; - a.time = ext->pwd_show_time; - a.act_time = 0; - a.ready_cb = pwd_char_hider_anim_ready; - a.start = 0; - a.end = 1; - a.repeat = 0; - a.repeat_pause = 0; - a.playback = 0; - a.playback_pause = 0; - a.path_cb = lv_anim_path_step; - lv_anim_create(&a); + /*Auto hide characters*/ + lv_anim_t a; + a.var = ta; + a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.time = ext->pwd_show_time; + a.act_time = 0; + a.ready_cb = pwd_char_hider_anim_ready; + a.start = 0; + a.end = 1; + a.repeat = 0; + a.repeat_pause = 0; + a.playback = 0; + a.playback_pause = 0; + a.path_cb = lv_anim_path_step; + lv_anim_create(&a); #else pwd_char_hider(ta); #endif @@ -566,8 +563,8 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Check the bottom*/ if(label_cords.y1 + cur_pos.y + font_h + style->body.padding.bottom > ta_cords.y2) { - lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + font_h + - style->body.padding.top + style->body.padding.bottom)); + lv_obj_set_y(label_par, -(cur_pos.y - lv_obj_get_height(ta) + font_h + style->body.padding.top + + style->body.padding.bottom)); } /*Check the left (use the font_h as general unit)*/ if(lv_obj_get_x(label_par) + cur_pos.x < font_h) { @@ -576,8 +573,8 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Check the right (use the font_h as general unit)*/ if(label_cords.x1 + cur_pos.x + font_h + style->body.padding.right > ta_cords.x2) { - lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + font_h + - style->body.padding.left + style->body.padding.right)); + lv_obj_set_x(label_par, -(cur_pos.x - lv_obj_get_width(ta) + font_h + style->body.padding.left + + style->body.padding.right)); } ext->cursor.valid_x = cur_pos.x; @@ -597,7 +594,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) a.repeat_pause = 0; a.playback = 1; a.playback_pause = 0; - a.path_cb = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); } #endif @@ -685,8 +682,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) style_scrl->body.padding.top + style_scrl->body.padding.bottom); lv_label_set_long_mode(ext->label, LV_LABEL_LONG_EXPAND); if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_EXPAND); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, - style_ta->body.padding.top); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); } else { const lv_style_t * style_ta = lv_obj_get_style(ta); @@ -696,8 +692,7 @@ void lv_ta_set_one_line(lv_obj_t * ta, bool en) if(ext->placeholder) lv_label_set_long_mode(ext->placeholder, LV_LABEL_LONG_BREAK); lv_obj_set_height(ta, LV_TA_DEF_HEIGHT); - lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, - style_ta->body.padding.top); + lv_obj_set_pos(lv_page_get_scrl(ta), style_ta->body.padding.left, style_ta->body.padding.top); } placeholder_update(ta); @@ -792,8 +787,7 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style case LV_TA_STYLE_EDGE_FLASH: lv_page_set_style(ta, LV_PAGE_STYLE_EDGE_FLASH, style); break; case LV_TA_STYLE_CURSOR: ext->cursor.style = style; - lv_obj_refresh_ext_draw_pad( - lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ + lv_obj_refresh_ext_draw_pad(lv_page_get_scrl(ta)); /*Refresh ext. size because of cursor drawing*/ refr_cursor_area(ta); break; case LV_TA_STYLE_PLACEHOLDER: @@ -812,12 +806,12 @@ void lv_ta_set_text_sel(lv_obj_t * ta, bool en) #if LV_LABEL_TEXT_SEL lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - ext->text_sel_en = en; + ext->text_sel_en = en; if(!en) lv_ta_clear_selection(ta); #else - (void) ta; /*Unused*/ - (void) en; /*Unused*/ + (void)ta; /*Unused*/ + (void)en; /*Unused*/ #endif } @@ -832,7 +826,7 @@ void lv_ta_set_pwd_show_time(lv_obj_t * ta, uint16_t time) time = 0; #endif - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); ext->pwd_show_time = time; } @@ -847,7 +841,7 @@ void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time) time = 0; #endif - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); ext->cursor.blink_time = time; #if LV_USE_ANIMATION @@ -865,7 +859,7 @@ void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time) a.repeat_pause = 0; a.playback = 1; a.playback_pause = 0; - a.path_cb = lv_anim_path_step; + a.path_cb = lv_anim_path_step; lv_anim_create(&a); } else { ext->cursor.state = 1; @@ -1001,7 +995,7 @@ uint16_t lv_ta_get_max_length(lv_obj_t * ta) const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) { const lv_style_t * style = NULL; - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); switch(type) { case LV_TA_STYLE_BG: style = lv_page_get_style(ta, LV_PAGE_STYLE_BG); break; @@ -1028,13 +1022,13 @@ bool lv_ta_text_is_selected(const lv_obj_t * ta) lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if((lv_label_get_text_sel_start(ext->label) == LV_LABEL_TEXT_SEL_OFF || - lv_label_get_text_sel_end(ext->label) == LV_LABEL_TEXT_SEL_OFF)){ + lv_label_get_text_sel_end(ext->label) == LV_LABEL_TEXT_SEL_OFF)) { return true; } else { return false; } #else - (void) ta; /*Unused*/ + (void)ta; /*Unused*/ return false; #endif } @@ -1050,7 +1044,7 @@ bool lv_ta_get_text_sel_en(lv_obj_t * ta) lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); return ext->text_sel_en; #else - (void) ta; /*Unused*/ + (void)ta; /*Unused*/ return false; #endif } @@ -1089,15 +1083,15 @@ uint16_t lv_ta_get_cursor_blink_time(lv_obj_t * ta) void lv_ta_clear_selection(lv_obj_t * ta) { #if LV_LABEL_TEXT_SEL - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); if(lv_label_get_text_sel_start(ext->label) != LV_LABEL_TEXT_SEL_OFF || - lv_label_get_text_sel_end(ext->label) != LV_LABEL_TEXT_SEL_OFF){ + lv_label_get_text_sel_end(ext->label) != LV_LABEL_TEXT_SEL_OFF) { lv_label_set_text_sel_start(ext->label, LV_LABEL_TEXT_SEL_OFF); lv_label_set_text_sel_end(ext->label, LV_LABEL_TEXT_SEL_OFF); } #else - (void) ta; /*Unused*/ + (void)ta; /*Unused*/ #endif } @@ -1149,8 +1143,7 @@ void lv_ta_cursor_down(lv_obj_t * ta) /*Get the letter index on the new cursor position and set it*/ uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos); - lv_coord_t cur_valid_x_tmp = - ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ + lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ lv_ta_set_cursor_pos(ta, new_cur_pos); ext->cursor.valid_x = cur_valid_x_tmp; } @@ -1176,9 +1169,8 @@ void lv_ta_cursor_up(lv_obj_t * ta) pos.x = ext->cursor.valid_x; /*Get the letter index on the new cursor position and set it*/ - uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos); - lv_coord_t cur_valid_x_tmp = - ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ + uint16_t new_cur_pos = lv_label_get_letter_on(ext->label, &pos); + lv_coord_t cur_valid_x_tmp = ext->cursor.valid_x; /*Cursor position set overwrites the valid positon */ lv_ta_set_cursor_pos(ta, new_cur_pos); ext->cursor.valid_x = cur_valid_x_tmp; } @@ -1237,8 +1229,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ lv_obj_t * ta = lv_obj_get_parent(scrl); lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); - if(ext->cursor.type == LV_CURSOR_NONE || (ext->cursor.type & LV_CURSOR_HIDDEN) || - ext->cursor.state == 0) { + if(ext->cursor.type == LV_CURSOR_NONE || (ext->cursor.type & LV_CURSOR_HIDDEN) || ext->cursor.state == 0) { return true; /*The cursor is not visible now*/ } @@ -1264,8 +1255,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); char letter_buf[8] = {0}; - memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], - lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); + memcpy(letter_buf, &txt[ext->cursor.txt_byte_pos], lv_txt_encoded_size(&txt[ext->cursor.txt_byte_pos])); cur_area.x1 += cur_style.body.padding.left; cur_area.y1 += cur_style.body.padding.top; @@ -1274,8 +1264,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { cur_style.body.opa = LV_OPA_TRANSP; - if(cur_style.body.border.width == 0) - cur_style.body.border.width = 1; /*Be sure the border will be drawn*/ + if(cur_style.body.border.width == 0) cur_style.body.border.width = 1; /*Be sure the border will be drawn*/ lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) { lv_draw_rect(&cur_area, mask, &cur_style, opa_scale); @@ -1314,21 +1303,18 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) /*In one line mode refresh the Text Area height because 'vpad' can modify it*/ const lv_style_t * style_label = lv_obj_get_style(ext->label); lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); - lv_obj_set_height( - ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + - style_scrl->body.padding.top + style_scrl->body.padding.bottom); + lv_obj_set_height(ta, font_h + style_ta->body.padding.top + style_ta->body.padding.bottom + + style_scrl->body.padding.top + style_scrl->body.padding.bottom); } else { /*In not one line mode refresh the Label width because 'hpad' can modify it*/ lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, - style_scrl->body.padding - .right); /*Be sure the Label is in the correct position*/ + style_scrl->body.padding.right); /*Be sure the Label is in the correct position*/ if(ext->placeholder) { lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, - style_scrl->body.padding - .top); /*Be sure the placeholder is in the correct position*/ + style_scrl->body.padding.top); /*Be sure the placeholder is in the correct position*/ } } lv_label_set_text(ext->label, NULL); @@ -1336,13 +1322,11 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { - if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { + if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_obj_t * scrl = lv_page_get_scrl(ta); const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->label, style_scrl->body.padding.left, - style_scrl->body.padding.top); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); @@ -1350,13 +1334,11 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) } /*Set the placeholder width according to the text area width*/ if(ext->placeholder) { - if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { + if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { lv_obj_t * scrl = lv_page_get_scrl(ta); const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, - style_scrl->body.padding.top); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->placeholder, NULL); /*Refresh the label*/ refr_cursor_area(ta); @@ -1415,8 +1397,8 @@ static lv_res_t lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param) lv_ta_set_cursor_type(ta, cur_type & (~LV_CURSOR_HIDDEN)); } #endif - } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || - sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESS_LOST || + sign == LV_SIGNAL_RELEASED) { update_cursor_position_on_click(ta, sign, (lv_indev_t *)param); } return res; @@ -1443,25 +1425,23 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { /*Set ext. size because the cursor might be out of this object*/ const lv_style_t * style_label = lv_obj_get_style(ext->label); - lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); - scrl->ext_draw_pad = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h); + lv_coord_t font_h = lv_font_get_line_height(style_label->text.font); + scrl->ext_draw_pad = LV_MATH_MAX(scrl->ext_draw_pad, style_label->text.line_space + font_h); } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { - if(lv_obj_get_width(ta) != lv_area_get_width(param) || - lv_obj_get_height(ta) != lv_area_get_height(param)) { + if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); - lv_obj_set_pos(ext->label, style_scrl->body.padding.left, - style_scrl->body.padding.top); + lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_label_set_text(ext->label, NULL); /*Refresh the label*/ refr_cursor_area(ta); } } - } else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || - sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_RELEASED) { + } else if(sign == LV_SIGNAL_PRESSING || sign == LV_SIGNAL_PRESSED || sign == LV_SIGNAL_PRESS_LOST || + sign == LV_SIGNAL_RELEASED) { update_cursor_position_on_click(ta, sign, (lv_indev_t *)param); } @@ -1585,8 +1565,7 @@ static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) lv_style_copy(style_res, label_style); lv_color_t clv_color_tmp = style_res->text.color; /*Make letter color to cursor color*/ style_res->text.color = - style_res->body - .main_color; /*In block mode the letter color will be current background color*/ + style_res->body.main_color; /*In block mode the letter color will be current background color*/ style_res->body.main_color = clv_color_tmp; style_res->body.grad_color = clv_color_tmp; style_res->body.border.color = clv_color_tmp; @@ -1635,8 +1614,8 @@ static void refr_cursor_area(lv_obj_t * ta) lv_label_get_letter_pos(ext->label, cur_pos, &letter_pos); /*If the cursor is out of the text (most right) draw it to the next line*/ - if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && - ext->one_line == 0 && lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) { + if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && ext->one_line == 0 && + lv_label_get_align(ext->label) != LV_LABEL_ALIGN_RIGHT) { letter_pos.x = 0; letter_pos.y += letter_h + label_style->text.line_space; @@ -1659,8 +1638,8 @@ static void refr_cursor_area(lv_obj_t * ta) lv_area_t cur_area; if(ext->cursor.type == LV_CURSOR_LINE) { - cur_area.x1 = letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - - (cur_style.line.width & 0x1); + cur_area.x1 = + letter_pos.x + cur_style.body.padding.left - (cur_style.line.width >> 1) - (cur_style.line.width & 0x1); cur_area.y1 = letter_pos.y + cur_style.body.padding.top; cur_area.x2 = letter_pos.x + cur_style.body.padding.right + (cur_style.line.width >> 1); cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; @@ -1677,11 +1656,10 @@ static void refr_cursor_area(lv_obj_t * ta) cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h; } else if(ext->cursor.type == LV_CURSOR_UNDERLINE) { cur_area.x1 = letter_pos.x + cur_style.body.padding.left; - cur_area.y1 = - letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1); + cur_area.y1 = letter_pos.y + cur_style.body.padding.top + letter_h - (cur_style.line.width >> 1); cur_area.x2 = letter_pos.x + cur_style.body.padding.right + letter_w; - cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + - (cur_style.line.width >> 1) + (cur_style.line.width & 0x1); + cur_area.y2 = letter_pos.y + cur_style.body.padding.bottom + letter_h + (cur_style.line.width >> 1) + + (cur_style.line.width & 0x1); } /*Save the new area*/ @@ -1717,8 +1695,7 @@ static void placeholder_update(lv_obj_t * ta) /*Be sure the main label and the placeholder has the same coordinates*/ lv_obj_t * scrl = lv_page_get_scrl(ta); const lv_style_t * style_scrl = lv_obj_get_style(scrl); - lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, - style_scrl->body.padding.top); + lv_obj_set_pos(ext->placeholder, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_obj_set_pos(ext->label, style_scrl->body.padding.left, style_scrl->body.padding.top); lv_obj_set_width(ext->placeholder, lv_page_get_fit_width(ta)); @@ -1728,8 +1705,7 @@ static void placeholder_update(lv_obj_t * ta) } } -static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, - lv_indev_t * click_source) +static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source) { if(click_source == NULL) return; @@ -1738,7 +1714,7 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, return; } - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_area_t label_coords; lv_obj_get_coords(ext->label, &label_coords); @@ -1756,7 +1732,6 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, uint16_t index_of_char_at_position; - #if LV_LABEL_TEXT_SEL lv_label_ext_t * ext_label = lv_obj_get_ext_attr(ext->label); bool click_outside_label; @@ -1777,9 +1752,9 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, if(ext->text_sel_en) { if(!ext->text_sel_in_prog && !click_outside_label && sign == LV_SIGNAL_PRESSED) { /*Input device just went down. Store the selection start position*/ - ext->tmp_sel_start = index_of_char_at_position; - ext->tmp_sel_end = LV_LABEL_TEXT_SEL_OFF; - ext->text_sel_in_prog = 1; + ext->tmp_sel_start = index_of_char_at_position; + ext->tmp_sel_end = LV_LABEL_TEXT_SEL_OFF; + ext->text_sel_in_prog = 1; lv_obj_set_drag(lv_page_get_scrl(ta), false); } else if(ext->text_sel_in_prog && sign == LV_SIGNAL_PRESSING) { /*Input device may be moving. Store the end position */ @@ -1790,30 +1765,26 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, } } - if(ext->text_sel_in_prog || sign == LV_SIGNAL_PRESSED) - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + if(ext->text_sel_in_prog || sign == LV_SIGNAL_PRESSED) lv_ta_set_cursor_pos(ta, index_of_char_at_position); if(ext->text_sel_in_prog) { /*If the selected area has changed then update the real values and*/ /*invalidate the text area.*/ if(ext->tmp_sel_start > ext->tmp_sel_end) { - if(ext_label->txt_sel_start != ext->tmp_sel_end || - ext_label->txt_sel_end != ext->tmp_sel_start) { + if(ext_label->txt_sel_start != ext->tmp_sel_end || ext_label->txt_sel_end != ext->tmp_sel_start) { ext_label->txt_sel_start = ext->tmp_sel_end; ext_label->txt_sel_end = ext->tmp_sel_start; lv_obj_invalidate(ta); } } else if(ext->tmp_sel_start < ext->tmp_sel_end) { - if(ext_label->txt_sel_start != ext->tmp_sel_start || - ext_label->txt_sel_end != ext->tmp_sel_end) { + if(ext_label->txt_sel_start != ext->tmp_sel_start || ext_label->txt_sel_end != ext->tmp_sel_end) { ext_label->txt_sel_start = ext->tmp_sel_start; ext_label->txt_sel_end = ext->tmp_sel_end; lv_obj_invalidate(ta); } } else { - if(ext_label->txt_sel_start != LV_LABEL_TEXT_SEL_OFF || - ext_label->txt_sel_end != LV_LABEL_TEXT_SEL_OFF) { + if(ext_label->txt_sel_start != LV_LABEL_TEXT_SEL_OFF || ext_label->txt_sel_end != LV_LABEL_TEXT_SEL_OFF) { ext_label->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext_label->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; lv_obj_invalidate(ta); @@ -1836,8 +1807,7 @@ static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, index_of_char_at_position = lv_label_get_letter_on(ext->label, &relative_position); } - if(sign == LV_SIGNAL_PRESSED) - lv_ta_set_cursor_pos(ta, index_of_char_at_position); + if(sign == LV_SIGNAL_PRESSED) lv_ta_set_cursor_pos(ta, index_of_char_at_position); #endif } diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index 56d4963a4d6f..cb2c1ca8cf69 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -58,33 +58,33 @@ typedef struct { lv_page_ext_t page; /*Ext. of ancestor*/ /*New data for this type */ - lv_obj_t * label; /*Label of the text area*/ - lv_obj_t * placeholder; /*Place holder label. only visible if text is an empty string*/ - char * pwd_tmp; /*Used to store the original text in password mode*/ + lv_obj_t * label; /*Label of the text area*/ + lv_obj_t * placeholder; /*Place holder label. only visible if text is an empty string*/ + char * pwd_tmp; /*Used to store the original text in password mode*/ const char * accapted_chars; /*Only these characters will be accepted. NULL: accept all*/ uint16_t max_length; /*The max. number of characters. 0: no limit*/ uint16_t pwd_show_time; /*Time to show characters in password mode before change them to '*' */ struct { - const lv_style_t * style; /* Style of the cursor (NULL to use label's style)*/ - lv_coord_t valid_x; /* Used when stepping up/down to a shorter line. - * (Used by the library)*/ - uint16_t pos; /* The current cursor position - * (0: before 1st letter; 1: before 2nd letter ...)*/ - uint16_t blink_time; /*Blink period*/ - lv_area_t area; /* Cursor area relative to the Text Area*/ - uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/ - lv_cursor_type_t type : 4; /* Shape of the cursor*/ - uint8_t state : 1; /*Cursor is visible now or not (Handled by the library)*/ + const lv_style_t * style; /* Style of the cursor (NULL to use label's style)*/ + lv_coord_t valid_x; /* Used when stepping up/down to a shorter line. + * (Used by the library)*/ + uint16_t pos; /* The current cursor position + * (0: before 1st letter; 1: before 2nd letter ...)*/ + uint16_t blink_time; /*Blink period*/ + lv_area_t area; /* Cursor area relative to the Text Area*/ + uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/ + lv_cursor_type_t type : 4; /* Shape of the cursor*/ + uint8_t state : 1; /*Cursor is visible now or not (Handled by the library)*/ } cursor; #if LV_LABEL_TEXT_SEL - uint16_t tmp_sel_start; /*Temporary value*/ - uint16_t tmp_sel_end; /*Temporary value*/ + uint16_t tmp_sel_start; /*Temporary value*/ + uint16_t tmp_sel_end; /*Temporary value*/ uint8_t text_sel_in_prog : 1; /*User is in process of selecting */ - uint8_t text_sel_en : 1; /*Text can be selected on this text area*/ + uint8_t text_sel_en : 1; /*Text can be selected on this text area*/ #endif - uint8_t pwd_mode : 1; /*Replace characters with '*' */ - uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ + uint8_t pwd_mode : 1; /*Replace characters with '*' */ + uint8_t one_line : 1; /*One line mode (ignore line breaks)*/ } lv_ta_ext_t; enum { diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index a20d45b7a042..9ecacac30a79 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -152,9 +152,8 @@ void lv_table_set_cell_value(lv_obj_t * table, uint16_t row, uint16_t col, const format.s.crop = 0; } - ext->cell_data[cell] = - lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/ - strcpy(ext->cell_data[cell] + 1, txt); /*Leave the format byte*/ + ext->cell_data[cell] = lv_mem_realloc(ext->cell_data[cell], strlen(txt) + 2); /*+1: trailing '\0; +1: format byte*/ + strcpy(ext->cell_data[cell] + 1, txt); /*Leave the format byte*/ ext->cell_data[cell][0] = format.format_byte; refr_size(table); } @@ -171,15 +170,13 @@ void lv_table_set_row_cnt(lv_obj_t * table, uint16_t row_cnt) ext->row_cnt = row_cnt; if(ext->row_cnt > 0 && ext->col_cnt > 0) { - ext->cell_data = - lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); + ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); /*Initilize the new fields*/ if(old_row_cnt < row_cnt) { uint16_t old_cell_cnt = old_row_cnt * ext->col_cnt; uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; - memset(&ext->cell_data[old_cell_cnt], 0, - (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); + memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); } } else { lv_mem_free(ext->cell_data); @@ -207,14 +204,12 @@ void lv_table_set_col_cnt(lv_obj_t * table, uint16_t col_cnt) ext->col_cnt = col_cnt; if(ext->row_cnt > 0 && ext->col_cnt > 0) { - ext->cell_data = - lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); + ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); /*Initilize the new fields*/ if(old_col_cnt < col_cnt) { uint16_t old_cell_cnt = old_col_cnt * ext->row_cnt; uint32_t new_cell_cnt = ext->col_cnt * ext->row_cnt; - memset(&ext->cell_data[old_cell_cnt], 0, - (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); + memset(&ext->cell_data[old_cell_cnt], 0, (new_cell_cnt - old_cell_cnt) * sizeof(ext->cell_data[0])); } } else { @@ -567,8 +562,8 @@ bool lv_table_get_cell_merge_right(lv_obj_t * table, uint16_t row, uint16_t col) */ const lv_style_t * lv_table_get_style(const lv_obj_t * table, lv_table_style_t type) { - lv_table_ext_t * ext = lv_obj_get_ext_attr(table); - const lv_style_t * style = NULL; + lv_table_ext_t * ext = lv_obj_get_ext_attr(table); + const lv_style_t * style = NULL; switch(type) { case LV_TABLE_STYLE_BG: style = lv_obj_get_style(table); break; @@ -695,8 +690,8 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ bool label_mask_ok; label_mask_ok = lv_area_intersect(&label_mask, mask, &cell_area); if(label_mask_ok) { - lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, - ext->cell_data[cell] + 1, txt_flags, NULL, -1, -1); + lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, ext->cell_data[cell] + 1, + txt_flags, NULL, -1, -1); } /*Draw lines after '\n's*/ lv_point_t p1; @@ -707,9 +702,8 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ for(i = 1; ext->cell_data[cell][i] != '\0'; i++) { if(ext->cell_data[cell][i] == '\n') { ext->cell_data[cell][i] = '\0'; - lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, - cell_style->text.font, cell_style->text.letter_space, - cell_style->text.line_space, + lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, + cell_style->text.letter_space, cell_style->text.line_space, lv_area_get_width(&txt_area), txt_flags); p1.y = txt_area.y1 + txt_size.y + cell_style->text.line_space / 2; @@ -804,8 +798,7 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) uint16_t row_start = row_id * ext->col_cnt; uint16_t cell; uint16_t col; - lv_coord_t h_max = lv_font_get_line_height(ext->cell_style[0]->text.font) + - ext->cell_style[0]->body.padding.top + + lv_coord_t h_max = lv_font_get_line_height(ext->cell_style[0]->text.font) + ext->cell_style[0]->body.padding.top + ext->cell_style[0]->body.padding.bottom; for(cell = row_start, col = 0; cell < row_start + ext->col_cnt; cell++, col++) { @@ -833,22 +826,18 @@ static lv_coord_t get_row_height(lv_obj_t * table, uint16_t row_id) /*With text crop assume 1 line*/ if(format.s.crop) { - h_max = - LV_MATH_MAX(lv_font_get_line_height(cell_style->text.font) + - cell_style->body.padding.top + cell_style->body.padding.bottom, - h_max); + h_max = LV_MATH_MAX(lv_font_get_line_height(cell_style->text.font) + cell_style->body.padding.top + + cell_style->body.padding.bottom, + h_max); } /*Without text crop calculate the height of the text in the cell*/ else { txt_w -= cell_style->body.padding.left + cell_style->body.padding.right; lv_txt_get_size(&txt_size, ext->cell_data[cell] + 1, cell_style->text.font, - cell_style->text.letter_space, cell_style->text.line_space, txt_w, - LV_TXT_FLAG_NONE); + cell_style->text.letter_space, cell_style->text.line_space, txt_w, LV_TXT_FLAG_NONE); - h_max = LV_MATH_MAX(txt_size.y + cell_style->body.padding.top + - cell_style->body.padding.bottom, - h_max); + h_max = LV_MATH_MAX(txt_size.y + cell_style->body.padding.top + cell_style->body.padding.bottom, h_max); cell += col_merge; col += col_merge; } diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 0b2c27695f39..d4b1a306262e 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -19,8 +19,7 @@ *********************/ #if LV_USE_ANIMATION #ifndef LV_TABVIEW_DEF_ANIM_TIME -#define LV_TABVIEW_DEF_ANIM_TIME \ - 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ +#define LV_TABVIEW_DEF_ANIM_TIME 300 /*Animation time of focusing to the a list element [ms] (0: no animation) */ #endif #else #undef LV_TABVIEW_DEF_ANIM_TIME @@ -94,9 +93,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->btns = NULL; ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP; #if LV_USE_ANIMATION - ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; + ext->anim_time = LV_TABVIEW_DEF_ANIM_TIME; #endif - ext->btns_hide = 0; + ext->btns_hide = 0; /*The signal and design functions are not copied so set them here*/ lv_obj_set_signal_cb(new_tabview, lv_tabview_signal); @@ -116,22 +115,21 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_get_height_fit(lv_obj_get_parent(new_tabview))); ext->content = lv_cont_create(new_tabview, NULL); - ext->btns = lv_btnm_create(new_tabview, NULL); - ext->indic = lv_obj_create(ext->btns, NULL); + ext->btns = lv_btnm_create(new_tabview, NULL); + ext->indic = lv_obj_create(ext->btns, NULL); lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); lv_btnm_set_map(ext->btns, tab_def); lv_obj_set_event_cb(ext->btns, tab_btnm_event_cb); - + lv_obj_set_width(ext->indic, LV_DPI); lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_obj_set_click(ext->indic, false); - + lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); lv_cont_set_style(ext->content, &lv_style_transp_tight); - lv_obj_set_height(ext->content, - lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); + lv_obj_set_height(ext->content, lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); /*Set the default styles*/ @@ -142,10 +140,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, th->style.tabview.btn.bg); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_REL, th->style.tabview.btn.rel); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_PR, th->style.tabview.btn.pr); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, - th->style.tabview.btn.tgl_rel); - lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, - th->style.tabview.btn.tgl_pr); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_REL, th->style.tabview.btn.tgl_rel); + lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_TGL_PR, th->style.tabview.btn.tgl_pr); } else { lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BG, &lv_style_plain); lv_tabview_set_style(new_tabview, LV_TABVIEW_STYLE_BTN_BG, &lv_style_transp); @@ -161,7 +157,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) ext->indic = lv_obj_create(ext->btns, copy_ext->indic); ext->content = lv_cont_create(new_tabview, copy_ext->content); #if LV_USE_ANIMATION - ext->anim_time = copy_ext->anim_time; + ext->anim_time = copy_ext->anim_time; #endif ext->tab_name_ptr = lv_mem_alloc(sizeof(char *)); @@ -176,12 +172,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) for(i = 0; i < copy_ext->tab_cnt; i++) { new_tab = lv_tabview_add_tab(new_tabview, copy_ext->tab_name_ptr[i]); copy_tab = lv_tabview_get_tab(copy, i); - lv_page_set_style(new_tab, LV_PAGE_STYLE_BG, - lv_page_get_style(copy_tab, LV_PAGE_STYLE_BG)); - lv_page_set_style(new_tab, LV_PAGE_STYLE_SCRL, - lv_page_get_style(copy_tab, LV_PAGE_STYLE_SCRL)); - lv_page_set_style(new_tab, LV_PAGE_STYLE_SB, - lv_page_get_style(copy_tab, LV_PAGE_STYLE_SB)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_BG, lv_page_get_style(copy_tab, LV_PAGE_STYLE_BG)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_SCRL, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SCRL)); + lv_page_set_style(new_tab, LV_PAGE_STYLE_SB, lv_page_get_style(copy_tab, LV_PAGE_STYLE_SB)); } /*Refresh the style with new signal function*/ @@ -248,7 +241,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2)); break; } - + lv_mem_assert(ext->tab_name_ptr); if(ext->tab_name_ptr == NULL) return NULL; @@ -265,15 +258,15 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: if(ext->tab_cnt == 1) { - ext->tab_name_ptr[0] = name_dm; - ext->tab_name_ptr[1] = ""; + ext->tab_name_ptr[0] = name_dm; + ext->tab_name_ptr[1] = ""; } else { - ext->tab_name_ptr[ext->tab_cnt * 2 - 3] = "\n"; - ext->tab_name_ptr[ext->tab_cnt * 2 - 2] = name_dm; - ext->tab_name_ptr[ext->tab_cnt * 2 - 1] = ""; + ext->tab_name_ptr[ext->tab_cnt * 2 - 3] = "\n"; + ext->tab_name_ptr[ext->tab_cnt * 2 - 2] = name_dm; + ext->tab_name_ptr[ext->tab_cnt * 2 - 1] = ""; } break; - } + } /* The button matrix's map still points to the old `tab_name_ptr` which might be freed by * `lv_mem_realloc`. So make its current map invalid*/ @@ -291,14 +284,12 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - indic_size = - (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - - style_tabs->body.padding.left - style_tabs->body.padding.right) / - ext->tab_cnt; + indic_size = (lv_obj_get_width(tabview) - style_tabs->body.padding.inner * (ext->tab_cnt - 1) - + style_tabs->body.padding.left - style_tabs->body.padding.right) / + ext->tab_cnt; lv_obj_set_width(ext->indic, indic_size); - lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + - style_tabs->body.padding.inner * ext->tab_cur + - style_tabs->body.padding.left); + lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + style_tabs->body.padding.inner * ext->tab_cur + + style_tabs->body.padding.left); break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: @@ -359,27 +350,24 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + - style->body.padding.left); + cont_x = -(lv_obj_get_width(tabview) * id + style->body.padding.inner * id + style->body.padding.left); break; case LV_TABVIEW_BTNS_POS_LEFT: - cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + - style->body.padding.inner * id + - style->body.padding.left) + - lv_obj_get_width(ext->btns); + cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + style->body.padding.inner * id + + style->body.padding.left) + + lv_obj_get_width(ext->btns); break; case LV_TABVIEW_BTNS_POS_RIGHT: - cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + - style->body.padding.inner * id + - style->body.padding.left); + cont_x = -((lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)) * id + style->body.padding.inner * id + + style->body.padding.left); break; } - if( anim_en == false + if(anim_en == false #if LV_USE_ANIMATION - || ext->anim_time == 0 + || ext->anim_time == 0 #endif - ) { + ) { lv_obj_set_x(ext->content, cont_x); } else { #if LV_USE_ANIMATION @@ -411,45 +399,41 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) indic_size = lv_obj_get_width(ext->indic); indic_pos = indic_size * id + tabs_style->body.padding.inner * id + tabs_style->body.padding.left; break; - case LV_TABVIEW_BTNS_POS_LEFT: - case LV_TABVIEW_BTNS_POS_RIGHT: + case LV_TABVIEW_BTNS_POS_LEFT: + case LV_TABVIEW_BTNS_POS_RIGHT: indic_size = lv_obj_get_height(ext->indic); indic_pos = tabs_style->body.padding.top + id * (indic_size + tabs_style->body.padding.inner); break; } - if( anim_en == false + if(anim_en == false #if LV_USE_ANIMATION - || ext->anim_time == 0 + || ext->anim_time == 0 #endif - ) { + ) { switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: - case LV_TABVIEW_BTNS_POS_BOTTOM: - lv_obj_set_x(ext->indic, indic_pos); - break; + case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_set_x(ext->indic, indic_pos); break; case LV_TABVIEW_BTNS_POS_LEFT: - case LV_TABVIEW_BTNS_POS_RIGHT: - lv_obj_set_y(ext->indic, indic_pos); - break; - } + case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_y(ext->indic, indic_pos); break; + } } else { #if LV_USE_ANIMATION lv_anim_t a; - a.var = ext->indic; + a.var = ext->indic; switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - a.start = lv_obj_get_x(ext->indic); - a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.start = lv_obj_get_x(ext->indic); + a.end = indic_pos; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: - a.start = lv_obj_get_y(ext->indic); - a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.start = lv_obj_get_y(ext->indic); + a.end = indic_pos; + a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; break; } @@ -488,10 +472,10 @@ void lv_tabview_set_anim_time(lv_obj_t * tabview, uint16_t anim_time) { #if LV_USE_ANIMATION lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); - ext->anim_time = anim_time; + ext->anim_time = anim_time; #else - (void) tabview; - (void) anim_time; + (void)tabview; + (void)anim_time; #endif } @@ -515,29 +499,19 @@ void lv_tabview_set_style(lv_obj_t * tabview, lv_tabview_style_t type, const lv_ lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_REL, style); tabview_realign(tabview); break; - case LV_TABVIEW_STYLE_BTN_PR: - lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_PR, style); - break; - case LV_TABVIEW_STYLE_BTN_TGL_REL: - lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL, style); - break; - case LV_TABVIEW_STYLE_BTN_TGL_PR: - lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR, style); - break; + case LV_TABVIEW_STYLE_BTN_PR: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_PR, style); break; + case LV_TABVIEW_STYLE_BTN_TGL_REL: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL, style); break; + case LV_TABVIEW_STYLE_BTN_TGL_PR: lv_btnm_set_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR, style); break; case LV_TABVIEW_STYLE_INDIC: lv_obj_set_style(ext->indic, style); switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: - case LV_TABVIEW_BTNS_POS_BOTTOM: - lv_obj_set_height(ext->indic, style->body.padding.inner); - break; + case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_set_height(ext->indic, style->body.padding.inner); break; case LV_TABVIEW_BTNS_POS_LEFT: - case LV_TABVIEW_BTNS_POS_RIGHT: - lv_obj_set_width(ext->indic, style->body.padding.inner); - break; + case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_width(ext->indic, style->body.padding.inner); break; } - + tabview_realign(tabview); break; } @@ -639,7 +613,7 @@ uint16_t lv_tabview_get_anim_time(const lv_obj_t * tabview) lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); return ext->anim_time; #else - (void) tabview; + (void)tabview; return 0; #endif } @@ -658,18 +632,10 @@ const lv_style_t * lv_tabview_get_style(const lv_obj_t * tabview, lv_tabview_sty switch(type) { case LV_TABVIEW_STYLE_BG: style = lv_obj_get_style(tabview); break; case LV_TABVIEW_STYLE_BTN_BG: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BG); break; - case LV_TABVIEW_STYLE_BTN_REL: - style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_REL); - break; - case LV_TABVIEW_STYLE_BTN_PR: - style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_PR); - break; - case LV_TABVIEW_STYLE_BTN_TGL_REL: - style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL); - break; - case LV_TABVIEW_STYLE_BTN_TGL_PR: - style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR); - break; + case LV_TABVIEW_STYLE_BTN_REL: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_REL); break; + case LV_TABVIEW_STYLE_BTN_PR: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_PR); break; + case LV_TABVIEW_STYLE_BTN_TGL_REL: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_REL); break; + case LV_TABVIEW_STYLE_BTN_TGL_PR: style = lv_btnm_get_style(ext->btns, LV_BTNM_STYLE_BTN_TGL_PR); break; default: style = NULL; break; } @@ -737,8 +703,7 @@ static lv_res_t lv_tabview_signal(lv_obj_t * tabview, lv_signal_t sign, void * p lv_indev_t * indev = lv_indev_get_act(); lv_indev_type_t indev_type = lv_indev_get_type(indev); if(indev_type == LV_INDEV_TYPE_KEYPAD || - (indev_type == LV_INDEV_TYPE_ENCODER && - lv_group_get_editing(lv_obj_get_group(tabview)))) { + (indev_type == LV_INDEV_TYPE_ENCODER && lv_group_get_editing(lv_obj_get_group(tabview)))) { lv_event_send(ext->btns, LV_EVENT_CLICKED, lv_event_get_data()); } } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL) { @@ -871,8 +836,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) lv_coord_t x_diff = point_act.x - ext->point_last.x; lv_coord_t y_diff = point_act.y - ext->point_last.y; - if(!ext->scroll_ver && - (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) { + if(!ext->scroll_ver && (x_diff >= LV_INDEV_DEF_DRAG_LIMIT || x_diff <= -LV_INDEV_DEF_DRAG_LIMIT)) { ext->draging = 1; /*Check if the page is on the edge */ if((lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT) && x_diff > 0) || @@ -900,7 +864,7 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) ext->point_last.y = point_act.y; /*Move the indicator*/ - const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); + const lv_style_t * tabs_style = lv_obj_get_style(ext->btns); lv_coord_t indic_size; lv_coord_t p; lv_coord_t indic_y; @@ -911,19 +875,16 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage) case LV_TABVIEW_BTNS_POS_BOTTOM: indic_size = lv_obj_get_width(ext->indic); indic_style = lv_obj_get_style(ext->indic); - p = ((tabpage->coords.x1 - tabview->coords.x1) * - (indic_size + tabs_style->body.padding.inner)) / - lv_obj_get_width(tabview); + p = ((tabpage->coords.x1 - tabview->coords.x1) * (indic_size + tabs_style->body.padding.inner)) / + lv_obj_get_width(tabview); - lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + - tabs_style->body.padding.inner * ext->tab_cur + - indic_style->body.padding.left - p); + lv_obj_set_x(ext->indic, indic_size * ext->tab_cur + tabs_style->body.padding.inner * ext->tab_cur + + indic_style->body.padding.left - p); break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: indic_size = lv_obj_get_height(ext->indic); - indic_y = tabs_style->body.padding.top + - ext->tab_cur * (indic_size + tabs_style->body.padding.inner); + indic_y = tabs_style->body.padding.top + ext->tab_cur * (indic_size + tabs_style->body.padding.inner); lv_obj_set_y(ext->indic, indic_y); break; } @@ -1018,17 +979,17 @@ static void tabview_realign(lv_obj_t * tabview) switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - indic_size = - (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - - style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / - ext->tab_cnt; + indic_size = (lv_obj_get_width(tabview) - style_btn_bg->body.padding.inner * (ext->tab_cnt - 1) - + style_btn_bg->body.padding.left - style_btn_bg->body.padding.right) / + ext->tab_cnt; lv_obj_set_width(ext->indic, indic_size); break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); - max_h = lv_obj_get_height(ext->btns) - style_btn_bg->body.padding.top - style_btn_bg->body.padding.bottom; + max_h = + lv_obj_get_height(ext->btns) - style_btn_bg->body.padding.top - style_btn_bg->body.padding.bottom; indic_size = max_h - ((ext->tab_cnt - 1) * style_btn_bg->body.padding.inner); indic_size = indic_size / ext->tab_cnt; indic_size--; /*-1 because e.g. height = 100 means 101 pixels (0..100)*/ @@ -1042,17 +1003,15 @@ static void tabview_realign(lv_obj_t * tabview) switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - btns_size = lv_font_get_line_height(style_btn_rel->text.font) + - style_btn_rel->body.padding.top + - style_btn_rel->body.padding.bottom + - style_btn_bg->body.padding.top + style_btn_bg->body.padding.bottom; + btns_size = lv_font_get_line_height(style_btn_rel->text.font) + style_btn_rel->body.padding.top + + style_btn_rel->body.padding.bottom + style_btn_bg->body.padding.top + + style_btn_bg->body.padding.bottom; lv_obj_set_height(ext->btns, btns_size); break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: btns_size = lv_font_get_glyph_width(style_btn_rel->text.font, 'A', '\0') + - style_btn_rel->body.padding.left + - style_btn_rel->body.padding.right + + style_btn_rel->body.padding.left + style_btn_rel->body.padding.right + style_btn_bg->body.padding.left + style_btn_bg->body.padding.right; lv_obj_set_width(ext->btns, btns_size); break; @@ -1064,9 +1023,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); break; case LV_TABVIEW_BTNS_POS_LEFT: - case LV_TABVIEW_BTNS_POS_RIGHT: - lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); - break; + case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_set_height(ext->content, lv_obj_get_height(tabview)); break; } switch(ext->btns_pos) { @@ -1077,8 +1034,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); - lv_obj_set_height(ext->content, - lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); // lv_obj_set_height(ext->btns, 3 * LV_DPI / 4); @@ -1091,8 +1047,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); - lv_obj_set_height(ext->content, - lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); + lv_obj_set_height(ext->content, lv_obj_get_height(tabview) - lv_obj_get_height(ext->btns)); break; case LV_TABVIEW_BTNS_POS_LEFT: lv_obj_align(ext->btns, NULL, LV_ALIGN_IN_TOP_LEFT, 0, 0); @@ -1101,8 +1056,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); - lv_obj_set_width(ext->content, - lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); + lv_obj_set_width(ext->content, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner); @@ -1114,8 +1068,7 @@ static void tabview_realign(lv_obj_t * tabview) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); - lv_obj_set_width(ext->content, - lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); + lv_obj_set_width(ext->content, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns)); lv_obj_set_height(ext->btns, lv_obj_get_height(tabview)); lv_obj_set_width(ext->indic, style_btn_bg->body.padding.inner); @@ -1125,45 +1078,29 @@ static void tabview_realign(lv_obj_t * tabview) lv_obj_t * pages = lv_obj_get_child(ext->content, NULL); while(pages != NULL) { - if(lv_obj_get_signal_cb(pages) == - tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ + if(lv_obj_get_signal_cb(pages) == tabpage_signal) { /*Be sure adjust only the pages (user can other things)*/ switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: - lv_obj_set_size( - pages, - lv_obj_get_width(tabview), - lv_obj_get_height(ext->content) - ); + lv_obj_set_size(pages, lv_obj_get_width(tabview), lv_obj_get_height(ext->content)); break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: - lv_obj_set_size( - pages, - lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns), - lv_obj_get_height(ext->content) - ); + lv_obj_set_size(pages, lv_obj_get_width(tabview) - lv_obj_get_width(ext->btns), + lv_obj_get_height(ext->content)); break; - } + } } pages = lv_obj_get_child(ext->content, pages); } if(!ext->btns_hide) { switch(ext->btns_pos) { - case LV_TABVIEW_BTNS_POS_TOP: - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); - break; - case LV_TABVIEW_BTNS_POS_BOTTOM: - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); - break; - case LV_TABVIEW_BTNS_POS_LEFT: - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); - break; - case LV_TABVIEW_BTNS_POS_RIGHT: - lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); - break; - } + case LV_TABVIEW_BTNS_POS_TOP: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); break; + case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); break; + case LV_TABVIEW_BTNS_POS_LEFT: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_RIGHT, 0, 0); break; + case LV_TABVIEW_BTNS_POS_RIGHT: lv_obj_align(ext->indic, ext->btns, LV_ALIGN_IN_TOP_LEFT, 0, 0); break; + } } lv_tabview_set_tab_act(tabview, ext->tab_cur, false); diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index 9482d7bff9d9..225f204e5e1d 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -42,12 +42,7 @@ extern "C" { * TYPEDEFS **********************/ -enum { - LV_TABVIEW_BTNS_POS_TOP, - LV_TABVIEW_BTNS_POS_BOTTOM, - LV_TABVIEW_BTNS_POS_LEFT, - LV_TABVIEW_BTNS_POS_RIGHT -}; +enum { LV_TABVIEW_BTNS_POS_TOP, LV_TABVIEW_BTNS_POS_BOTTOM, LV_TABVIEW_BTNS_POS_LEFT, LV_TABVIEW_BTNS_POS_RIGHT }; typedef uint8_t lv_tabview_btns_pos_t; /*Data of tab*/ diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index 5e21031489f6..f72742cb958f 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -73,11 +73,10 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) lv_mem_assert(ext); if(ext == NULL) return NULL; if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_cb(new_tileview); - if(ancestor_scrl_signal == NULL) - ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_tileview)); + if(ancestor_scrl_signal == NULL) ancestor_scrl_signal = lv_obj_get_signal_cb(lv_page_get_scrl(new_tileview)); if(ancestor_design == NULL) ancestor_design = lv_obj_get_design_cb(new_tileview); - /*Initialize the allocated 'ext' */ + /*Initialize the allocated 'ext' */ #if LV_USE_ANIMATION ext->anim_time = LV_TILEVIEW_DEF_ANIM_TIME; #endif @@ -112,7 +111,7 @@ lv_obj_t * lv_tileview_create(lv_obj_t * par, const lv_obj_t * copy) ext->act_id.x = copy_ext->act_id.x; ext->act_id.y = copy_ext->act_id.y; #if LV_USE_ANIMATION - ext->anim_time = copy_ext->anim_time; + ext->anim_time = copy_ext->anim_time; #endif /*Refresh the style with new signal function*/ @@ -354,19 +353,16 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void /*Set horizontal drag constraint if no vertical constraint an dragged to valid x * direction */ - if(ext->drag_ver == 0 && ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= - -LV_INDEV_DEF_DRAG_LIMIT) || - (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= - LV_INDEV_DEF_DRAG_LIMIT))) { + if(ext->drag_ver == 0 && + ((ext->drag_right_en && indev->proc.types.pointer.drag_sum.x <= -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_left_en && indev->proc.types.pointer.drag_sum.x >= LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_hor = 1; } /*Set vertical drag constraint if no horizontal constraint an dragged to valid y * direction */ if(ext->drag_hor == 0 && - ((ext->drag_bottom_en && - indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) || - (ext->drag_top_en && - indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) { + ((ext->drag_bottom_en && indev->proc.types.pointer.drag_sum.y <= -LV_INDEV_DEF_DRAG_LIMIT) || + (ext->drag_top_en && indev->proc.types.pointer.drag_sum.y >= LV_INDEV_DEF_DRAG_LIMIT))) { ext->drag_ver = 1; } @@ -387,8 +383,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_coord_t h = lv_obj_get_height(tileview); lv_coord_t w = lv_obj_get_width(tileview); if(ext->drag_top_en == 0) { - if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && - ext->drag_hor == 0) { + if(y > -(ext->act_id.y * h) && indev->proc.types.pointer.vect.y > 0 && ext->drag_hor == 0) { #if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && @@ -401,8 +396,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } } - if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && - ext->drag_hor == 0) { + if(ext->drag_bottom_en == 0 && indev->proc.types.pointer.vect.y < 0 && ext->drag_hor == 0) { if(y < -(ext->act_id.y * h)) { #if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && @@ -417,8 +411,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_y(scrl, -ext->act_id.y * h + style_bg->body.padding.top); } if(ext->drag_left_en == 0) { - if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && - ext->drag_ver == 0) { + if(x > -(ext->act_id.x * w) && indev->proc.types.pointer.vect.x > 0 && ext->drag_ver == 0) { #if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && ext->page.edge_flash.right_ip == 0 && ext->page.edge_flash.top_ip == 0 && @@ -431,8 +424,7 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void lv_obj_set_x(scrl, -ext->act_id.x * w + style_bg->body.padding.left); } } - if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && - ext->drag_ver == 0) { + if(ext->drag_right_en == 0 && indev->proc.types.pointer.vect.x < 0 && ext->drag_ver == 0) { if(x < -(ext->act_id.x * w)) { #if LV_USE_ANIMATION if(ext->page.edge_flash.enabled && ext->page.edge_flash.left_ip == 0 && @@ -449,11 +441,9 @@ static lv_res_t lv_tileview_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void /*Apply the drag constraints*/ if(ext->drag_ver == 0) - lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + - style_bg->body.padding.top); + lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top); if(ext->drag_hor == 0) - lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + - style_bg->body.padding.left); + lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left); } } return res; @@ -554,14 +544,10 @@ static bool set_valid_drag_dirs(lv_obj_t * tileview) uint16_t i; for(i = 0; ext->valid_pos[i].x != LV_COORD_MIN; i++) { - if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) - ext->drag_top_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) - ext->drag_bottom_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) - ext->drag_left_en = 1; - if(ext->valid_pos[i].x == ext->act_id.x + 1 && ext->valid_pos[i].y == ext->act_id.y) - ext->drag_right_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) ext->drag_top_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) ext->drag_bottom_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_left_en = 1; + if(ext->valid_pos[i].x == ext->act_id.x + 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_right_en = 1; } return true; diff --git a/src/lv_objx/lv_win.c b/src/lv_objx/lv_win.c index 54fb1f74a634..31c3ba3228bb 100644 --- a/src/lv_objx/lv_win.c +++ b/src/lv_objx/lv_win.c @@ -270,9 +270,7 @@ void lv_win_set_style(lv_obj_t * win, lv_win_style_t type, const lv_style_t * st lv_win_realign(win); break; case LV_WIN_STYLE_CONTENT_BG: lv_page_set_style(ext->page, LV_PAGE_STYLE_BG, style); break; - case LV_WIN_STYLE_CONTENT_SCRL: - lv_page_set_style(ext->page, LV_PAGE_STYLE_SCRL, style); - break; + case LV_WIN_STYLE_CONTENT_SCRL: lv_page_set_style(ext->page, LV_PAGE_STYLE_SCRL, style); break; case LV_WIN_STYLE_SB: lv_page_set_style(ext->page, LV_PAGE_STYLE_SB, style); break; case LV_WIN_STYLE_HEADER: lv_obj_set_style(ext->header, style); @@ -411,9 +409,7 @@ const lv_style_t * lv_win_get_style(const lv_obj_t * win, lv_win_style_t type) switch(type) { case LV_WIN_STYLE_BG: style = lv_obj_get_style(win); break; case LV_WIN_STYLE_CONTENT_BG: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_BG); break; - case LV_WIN_STYLE_CONTENT_SCRL: - style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SCRL); - break; + case LV_WIN_STYLE_CONTENT_SCRL: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SCRL); break; case LV_WIN_STYLE_SB: style = lv_page_get_style(ext->page, LV_PAGE_STYLE_SB); break; case LV_WIN_STYLE_HEADER: style = lv_obj_get_style(ext->header); break; case LV_WIN_STYLE_BTN_REL: style = ext->style_btn_rel; break; @@ -468,7 +464,7 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param) while(child != NULL) { if(lv_obj_is_protected(child, LV_PROTECT_PARENT) == false) { lv_obj_t * tmp = child; - child = lv_obj_get_child(win, child); /*Get the next child before move this*/ + child = lv_obj_get_child(win, child); /*Get the next child before move this*/ lv_obj_set_parent(tmp, page); } else { child = lv_obj_get_child(win, child); @@ -479,8 +475,7 @@ static lv_res_t lv_win_signal(lv_obj_t * win, lv_signal_t sign, void * param) lv_win_realign(win); } else if(sign == LV_SIGNAL_CORD_CHG) { /*If the size is changed refresh the window*/ - if(lv_area_get_width(param) != lv_obj_get_width(win) || - lv_area_get_height(param) != lv_obj_get_height(win)) { + if(lv_area_get_width(param) != lv_obj_get_width(win) || lv_area_get_height(param) != lv_obj_get_height(win)) { lv_win_realign(win); } } else if(sign == LV_SIGNAL_CLEANUP) { @@ -514,8 +509,7 @@ static void lv_win_realign(lv_obj_t * win) const lv_style_t * header_style = lv_win_get_style(win, LV_WIN_STYLE_HEADER); lv_obj_set_size(ext->header, lv_obj_get_width(win), - ext->btn_size + header_style->body.padding.top + - header_style->body.padding.bottom); + ext->btn_size + header_style->body.padding.top + header_style->body.padding.bottom); bool first_btn = true; lv_obj_t * btn; @@ -526,24 +520,21 @@ static void lv_win_realign(lv_obj_t * win) while(btn != NULL) { lv_obj_set_size(btn, ext->btn_size, ext->btn_size); if(first_btn) { - lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, -header_style->body.padding.right, - 0); + lv_obj_align(btn, ext->header, LV_ALIGN_IN_RIGHT_MID, -header_style->body.padding.right, 0); first_btn = false; } else { - lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, -header_style->body.padding.inner, - 0); + lv_obj_align(btn, btn_prev, LV_ALIGN_OUT_LEFT_MID, -header_style->body.padding.inner, 0); } btn_prev = btn; btn = lv_obj_get_child_back(ext->header, btn); } - const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER); + const lv_style_t * style_header = lv_win_get_style(win, LV_WIN_STYLE_HEADER); lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, style_header->body.padding.left, 0); lv_obj_set_pos(ext->header, 0, 0); - lv_obj_set_size(ext->page, lv_obj_get_width(win), - lv_obj_get_height(win) - lv_obj_get_height(ext->header)); + lv_obj_set_size(ext->page, lv_obj_get_width(win), lv_obj_get_height(win) - lv_obj_get_height(ext->header)); lv_obj_align(ext->page, ext->header, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); } diff --git a/src/lv_themes/lv_theme_alien.c b/src/lv_themes/lv_theme_alien.c index dceed68caaf1..43747038fd70 100644 --- a/src/lv_themes/lv_theme_alien.c +++ b/src/lv_themes/lv_theme_alien.c @@ -855,8 +855,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); diff --git a/src/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c index 46a9e0a689f2..0d33fdb0d611 100644 --- a/src/lv_themes/lv_theme_default.c +++ b/src/lv_themes/lv_theme_default.c @@ -358,8 +358,7 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_ORANGE; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70); @@ -382,8 +381,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 23317973aca2..2437de779771 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -806,18 +806,13 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.color = lv_color_hsv_to_rgb(_hue, 90, 70); /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; - - style->body.main_color = - lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); - style->body.grad_color = - lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); - style->body.shadow.color = - lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); - - style->text.color = - lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; + + style->body.main_color = lv_color_mix(style->body.main_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.grad_color = lv_color_mix(style->body.grad_color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); + style->body.shadow.color = lv_color_mix(style->body.shadow.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_60); + + style->text.color = lv_color_mix(style->text.color, lv_color_hsv_to_rgb(_hue, 90, 70), LV_OPA_70); #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -834,8 +829,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index 99095efdbdfc..f6b0c2a73860 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -413,8 +413,7 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -431,8 +430,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_BLACK; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/src/lv_themes/lv_theme_nemo.c b/src/lv_themes/lv_theme_nemo.c index 544f806823fb..2fd2df9395ae 100644 --- a/src/lv_themes/lv_theme_nemo.c +++ b/src/lv_themes/lv_theme_nemo.c @@ -828,8 +828,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); diff --git a/src/lv_themes/lv_theme_night.c b/src/lv_themes/lv_theme_night.c index 1d743ce194cc..79a17f645457 100644 --- a/src/lv_themes/lv_theme_night.c +++ b/src/lv_themes/lv_theme_night.c @@ -732,8 +732,7 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.color = lv_color_hsv_to_rgb(_hue, 80, 70); /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -750,8 +749,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/src/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c index e0eee0ce5473..5d02c2260dc4 100644 --- a/src/lv_themes/lv_theme_zen.c +++ b/src/lv_themes/lv_theme_zen.c @@ -781,8 +781,7 @@ static void style_mod(lv_group_t * group, lv_style_t * style) style->body.border.color = lv_color_hsv_to_rgb(_hue, 40, 50); /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -800,8 +799,7 @@ static void style_mod_edit(lv_group_t * group, lv_style_t * style) style->body.border.color = LV_COLOR_GREEN; /*If not empty or has border then emphasis the border*/ - if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) - style->body.border.width = LV_DPI / 20; + if(style->body.opa != LV_OPA_TRANSP || style->body.border.width != 0) style->body.border.width = LV_DPI / 20; style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70); style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70); From dbb5f23cd6d36995147e78f74812e4541dc299f1 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 6 Jun 2019 23:42:51 +0200 Subject: [PATCH 498/590] lv_indev: use event instead of signal in feedback function --- src/lv_core/lv_obj.c | 32 ++++++++++++++++---------------- src/lv_hal/lv_hal_indev.h | 6 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index bdd6f631384c..73441bd26b87 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1331,29 +1331,38 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) */ lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data) { + /* Build a simple linked list from the objects used in the events + * It's important to know if an this object was deleted by a nested event + * called from this `even_cb`. */ lv_event_temp_data_t event_temp_data; event_temp_data.obj = obj; event_temp_data.deleted = false; event_temp_data.prev = NULL; - if(event_temp_data_head == NULL) { - event_temp_data_head = &event_temp_data; - } else { + if(event_temp_data_head) { event_temp_data.prev = event_temp_data_head; - event_temp_data_head = &event_temp_data; } - event_temp_data_head = &event_temp_data; + const void * event_act_data_save = event_act_data; event_act_data = data; + /*Call the input device's feedback callback if set*/ + lv_indev_t * indev_act = lv_indev_get_act(); + if(indev_act) { + if(indev_act->driver.feedback_cb) indev_act->driver.feedback_cb(&indev_act->driver, event); + } + + /*Call the event callback itself*/ if(event_cb) event_cb(obj, event); + /*Restore the event data*/ + event_act_data = event_act_data_save; + /*Remove this element from the list*/ event_temp_data_head = event_temp_data_head->prev; if(event_temp_data.deleted) { - event_act_data = NULL; return LV_RES_INV; } @@ -1361,7 +1370,6 @@ lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t e if(obj->parent_event && obj->par) { lv_res_t res = lv_event_send(obj->par, event, data); if(res != LV_RES_OK) { - event_act_data = NULL; return LV_RES_INV; } } @@ -2092,7 +2100,7 @@ static bool lv_obj_design(lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mo /* Because of the radius it is not sure the area is covered * Check the areas where there is no radius*/ - uint16_t r = style->body.radius; + lv_coord_t r = style->body.radius; if(r == LV_RADIUS_CIRCLE) return false; @@ -2133,14 +2141,6 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param) const lv_style_t * style = lv_obj_get_style(obj); - lv_indev_t * indev_act = lv_indev_get_act(); - - if(sign > _LV_SIGNAL_FEEDBACK_SECTION_START && sign < _LV_SIGNAL_FEEDBACK_SECTION_END) { - if(indev_act != NULL) { - if(indev_act->driver.feedback_cb) indev_act->driver.feedback_cb(&indev_act->driver, sign); - } - } - if(sign == LV_SIGNAL_CHILD_CHG) { /*Return 'invalid' if the child change signal is not enabled*/ if(lv_obj_is_protected(obj, LV_PROTECT_CHILD_CHG) != false) res = LV_RES_INV; diff --git a/src/lv_hal/lv_hal_indev.h b/src/lv_hal/lv_hal_indev.h index d08c3038fd6b..fa0e2ad5f280 100644 --- a/src/lv_hal/lv_hal_indev.h +++ b/src/lv_hal/lv_hal_indev.h @@ -44,7 +44,7 @@ enum { LV_INDEV_TYPE_NONE, /*Show uninitialized state*/ LV_INDEV_TYPE_POINTER, /*Touch pad, mouse, external button*/ LV_INDEV_TYPE_KEYPAD, /*Keypad or keyboard*/ - LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the + LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assigned to a specific point of the screen*/ LV_INDEV_TYPE_ENCODER, /*Encoder with only Left, Right turn and a Button*/ }; @@ -63,7 +63,6 @@ typedef struct int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/ lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/ - } lv_indev_data_t; /*Initialized by the user and registered by 'lv_indev_add()'*/ @@ -77,7 +76,8 @@ typedef struct _lv_indev_drv_t * Return 'true' if there is still data to be read (buffered)*/ bool (*read_cb)(struct _lv_indev_drv_t * indev_drv, lv_indev_data_t * data); - /*Called when an action happened on the input device.*/ + /* Called when an action happened on the input device. + * The second parameter is the event from `lv_event_t`*/ void (*feedback_cb)(struct _lv_indev_drv_t *, uint8_t); #if LV_USE_USER_DATA From f2ca0b15f3c1a3a637098287b13d381ae83b31fb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 6 Jun 2019 23:44:30 +0200 Subject: [PATCH 499/590] lv_coord_t: add config option in lv_conf.h --- lv_conf_template.h | 3 +++ src/lv_conf_checker.h | 17 ++++++++++++++--- src/lv_misc/lv_area.h | 8 +++++--- src/lv_objx/lv_gauge.c | 2 -- src/lv_objx/lv_ta.c | 4 ++-- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 90ef604423ec..d7366aa72e0d 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -53,6 +53,9 @@ * (Not so important, you can adjust it to modify default sizes and spaces)*/ #define LV_DPI 100 /*[px]*/ +/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ +#define LV_COORD_T int32_t + /*========================= Memory manager settings *=========================*/ diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 219a02448e2a..7ac0d1b907ef 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -66,6 +66,11 @@ #define LV_DPI 100 /*[px]*/ #endif +/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ +#ifndef LV_COORD_T +#define LV_COORD_T int32_t +#endif + /*========================= Memory manager settings *=========================*/ @@ -196,19 +201,19 @@ /* 1: Enable indexed (palette) images */ #ifndef LV_IMG_CF_INDEXED -#define LV_IMG_CF_INDEXED 1 +#define LV_IMG_CF_INDEXED 1 #endif /* 1: Enable alpha indexed images */ #ifndef LV_IMG_CF_ALPHA -#define LV_IMG_CF_ALPHA 1 +#define LV_IMG_CF_ALPHA 1 #endif /*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/ /*1: Add a `user_data` to drivers and objects*/ #ifndef LV_USE_USER_DATA -#define LV_USE_USER_DATA 1 +#define LV_USE_USER_DATA 1 #endif /*===================== @@ -231,6 +236,12 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif +/* Attribute to mark large constant arrays for example + * font's bitmaps */ +#ifndef LV_ATTRIBUTE_LARGE_CONST +#define LV_ATTRIBUTE_LARGE_CONST +#endif + /* 1: Variable length array is supported*/ #ifndef LV_COMPILER_VLA_SUPPORTED #define LV_COMPILER_VLA_SUPPORTED 1 diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index 133f4bcac655..5e06039939f9 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -25,13 +25,11 @@ extern "C" { /********************* * DEFINES *********************/ -#define LV_COORD_MAX (16383) /*To avoid overflow don't let the max [-32,32k] range */ -#define LV_COORD_MIN (-16384) /********************** * TYPEDEFS **********************/ -typedef int16_t lv_coord_t; +typedef LV_COORD_T lv_coord_t; typedef struct { @@ -165,6 +163,10 @@ bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p); * MACROS **********************/ +/*To avoid overflow don't let the max ranges (reduce with 1000) */ +#define LV_COORD_MAX ((lv_coord_t)((uint32_t)((uint32_t)1 << (8 * sizeof(lv_coord_t) - 1)) - 1000)) +#define LV_COORD_MIN (-LV_COORD_MAX) + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 11bcf00d0558..438eec5eca51 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -193,8 +193,6 @@ void lv_gauge_set_value(lv_obj_t * gauge, uint8_t needle_id, int16_t value) */ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint8_t label_cnt) { - /*TODO v6.0: change `line_cnt` to `subdiv_cnt`*/ - lv_lmeter_set_scale(gauge, angle, line_cnt); lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index acad1d7f4a02..a1155182bd6f 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -235,7 +235,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) return; } - /*Disable edge flash. If a new line was added it could show edge flash effect*/ + /*If a new line was added it shouldn't show edge flash effect*/ bool edge_flash_en = lv_ta_get_edge_flash(ta); lv_ta_set_edge_flash(ta, false); @@ -318,7 +318,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) return; } - /*Disable edge flash. If a new line was added it could show edge flash effect*/ + /*If a new line was added it shouldn't show edge flash effect*/ bool edge_flash_en = lv_ta_get_edge_flash(ta); lv_ta_set_edge_flash(ta, false); From 5cc1548b83fe7d0e87bb195adf885702a1171b91 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 7 Jun 2019 00:08:48 +0200 Subject: [PATCH 500/590] lv_coord_t: use typdef in lv_conf.h --- lv_conf_template.h | 4 +++- src/lv_conf_checker.h | 5 ++--- src/lv_misc/lv_area.h | 8 +++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index d7366aa72e0d..883d14355da2 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -13,6 +13,8 @@ #define LV_CONF_H /* clang-format off */ +#include + /*==================== Graphical settings *====================*/ @@ -54,7 +56,7 @@ #define LV_DPI 100 /*[px]*/ /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ -#define LV_COORD_T int32_t +typedef int16_t lv_coord_t; /*========================= Memory manager settings diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 7ac0d1b907ef..9a747b254590 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -8,6 +8,8 @@ #define LV_CONF_CHECKER_H /* clang-format off */ +#include + /*==================== Graphical settings *====================*/ @@ -67,9 +69,6 @@ #endif /* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */ -#ifndef LV_COORD_T -#define LV_COORD_T int32_t -#endif /*========================= Memory manager settings diff --git a/src/lv_misc/lv_area.h b/src/lv_misc/lv_area.h index 5e06039939f9..88051e7894df 100644 --- a/src/lv_misc/lv_area.h +++ b/src/lv_misc/lv_area.h @@ -25,11 +25,13 @@ extern "C" { /********************* * DEFINES *********************/ +/*To avoid overflow don't let the max ranges (reduce with 1000) */ +#define LV_COORD_MAX ((lv_coord_t)((uint32_t)((uint32_t)1 << (8 * sizeof(lv_coord_t) - 1)) - 1000)) +#define LV_COORD_MIN (-LV_COORD_MAX) /********************** * TYPEDEFS **********************/ -typedef LV_COORD_T lv_coord_t; typedef struct { @@ -163,10 +165,6 @@ bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p); * MACROS **********************/ -/*To avoid overflow don't let the max ranges (reduce with 1000) */ -#define LV_COORD_MAX ((lv_coord_t)((uint32_t)((uint32_t)1 << (8 * sizeof(lv_coord_t) - 1)) - 1000)) -#define LV_COORD_MIN (-LV_COORD_MAX) - #ifdef __cplusplus } /* extern "C" */ #endif From 8254ee66619032db57d57f25f8de9ced933b64fa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 7 Jun 2019 14:52:14 +0200 Subject: [PATCH 501/590] rename lv_obj_adjust_coords to lv_obj_get_inner_coords --- src/lv_core/lv_obj.c | 17 ++++++++++------- src/lv_core/lv_obj.h | 7 ++++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 3906bafa70ce..bf7b63315b42 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1593,21 +1593,24 @@ void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p) } /** - * Adjust the coordinates retrieved from lv_obj_get_coords() according - * to the object's style. + * Reduce area retried by `lv_obj_get_coords()` the get graphically usable area of an object. + * (Without the size of the border or other extra graphical elements) + * @param coords_p store the result area here */ -void lv_obj_adjust_coords(const lv_obj_t *obj, lv_area_t * cords_p) +void lv_obj_get_inner_coords(const lv_obj_t *obj, lv_area_t * coords_p) { const lv_style_t *style = lv_obj_get_style(obj); if(style->body.border.part & LV_BORDER_LEFT) - cords_p->x1 += style->body.border.width; + coords_p->x1 += style->body.border.width; if(style->body.border.part & LV_BORDER_RIGHT) - cords_p->x2 -= style->body.border.width; + coords_p->x2 -= style->body.border.width; + if(style->body.border.part & LV_BORDER_TOP) - cords_p->y1 += style->body.border.width; + coords_p->y1 += style->body.border.width; + if(style->body.border.part & LV_BORDER_BOTTOM) - cords_p->y2 -= style->body.border.width; + coords_p->y2 -= style->body.border.width; } diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 03ffa19786be..e993aacb029d 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -667,10 +667,11 @@ uint16_t lv_obj_count_children_recursive(const lv_obj_t * obj); void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p); /** - * Adjust the coordinates retrieved from lv_obj_get_coords() according - * to the object's style. + * Reduce area retried by `lv_obj_get_coords()` the get graphically usable area of an object. + * (Without the size of the border or other extra graphical elements) + * @param coords_p store the result area here */ -void lv_obj_adjust_coords(const lv_obj_t *obj, lv_area_t * cords_p); +void lv_obj_get_inner_coords(const lv_obj_t *obj, lv_area_t * coords_p); /** * Get the x coordinate of object From 857d1734fd7288f39fecbe5f21628e80ca35210e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 7 Jun 2019 14:54:19 +0200 Subject: [PATCH 502/590] lv_roller: fix refactoring issue --- src/lv_objx/lv_roller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index a649cbcd4078..fd12c3dde3cc 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -326,7 +326,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig rect_area.y2 = rect_area.y1 + font_h + style->text.line_space - 1; lv_area_t roller_coords; lv_obj_get_coords(roller, &roller_coords); - lv_obj_adjust_coords(roller, &roller_coords); + lv_obj_get_inner_coords(roller, &roller_coords); rect_area.x1 = roller_coords.x1; rect_area.x2 = roller_coords.x2; From 288b972ce0ec5f82cbffbcda1190896dce019824 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 11 Jun 2019 06:33:33 +0200 Subject: [PATCH 503/590] add LV_STYLE_XXX_MAIN if an object has only one style --- src/lv_core/lv_refr.c | 5 ++--- src/lv_objx/lv_canvas.c | 4 ++-- src/lv_objx/lv_cb.c | 2 +- src/lv_objx/lv_chart.c | 4 ++-- src/lv_objx/lv_chart.h | 13 +++++++++++-- src/lv_objx/lv_cont.c | 4 ++-- src/lv_objx/lv_cont.h | 14 ++++++++++++-- src/lv_objx/lv_gauge.c | 6 +++--- src/lv_objx/lv_gauge.h | 18 ++++++++++++++---- src/lv_objx/lv_img.c | 2 +- src/lv_objx/lv_img.h | 36 ++++++++++++------------------------ src/lv_objx/lv_label.c | 8 ++++---- src/lv_objx/lv_label.h | 14 ++++++++++++-- src/lv_objx/lv_led.c | 4 ++-- src/lv_objx/lv_led.h | 14 ++++++++++++-- src/lv_objx/lv_line.c | 4 ++-- src/lv_objx/lv_line.h | 35 ++++++++++++----------------------- src/lv_objx/lv_lmeter.c | 6 +++--- src/lv_objx/lv_lmeter.h | 18 ++++++++++++++---- src/lv_objx/lv_ta.c | 4 ++-- src/lv_objx/lv_tabview.c | 2 +- 21 files changed, 126 insertions(+), 91 deletions(-) diff --git a/src/lv_core/lv_refr.c b/src/lv_core/lv_refr.c index 2eb432133e6c..a7c30188f94f 100644 --- a/src/lv_core/lv_refr.c +++ b/src/lv_core/lv_refr.c @@ -413,11 +413,11 @@ static void lv_refr_area_part(const lv_area_t * area_p) */ static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj) { - lv_obj_t * i; lv_obj_t * found_p = NULL; /*If this object is fully cover the draw area check the children too */ if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) { + lv_obj_t * i; LV_LL_READ(obj->child_ll, i) { found_p = lv_refr_get_top_obj(area_p, i); @@ -458,7 +458,6 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) /*Draw the 'younger' sibling objects because they can be on top_obj */ lv_obj_t * par; - lv_obj_t * i; lv_obj_t * border_p = top_p; par = lv_obj_get_parent(top_p); @@ -466,7 +465,7 @@ static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p) /*Do until not reach the screen*/ while(par != NULL) { /*object before border_p has to be redrawn*/ - i = lv_ll_get_prev(&(par->child_ll), border_p); + lv_obj_t * i = lv_ll_get_prev(&(par->child_ll), border_p); while(i != NULL) { /*Refresh the objects*/ diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 854903f22e1c..19f0750ca989 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -146,7 +146,7 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t void lv_canvas_set_style(lv_obj_t * canvas, lv_canvas_style_t type, const lv_style_t * style) { switch(type) { - case LV_CANVAS_STYLE_MAIN: lv_img_set_style(canvas, style); break; + case LV_CANVAS_STYLE_MAIN: lv_img_set_style(canvas, LV_IMG_STYLE_MAIN, style); break; } } @@ -193,7 +193,7 @@ const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_ const lv_style_t * style = NULL; switch(type) { - case LV_CANVAS_STYLE_MAIN: style = lv_img_get_style(canvas); break; + case LV_CANVAS_STYLE_MAIN: style = lv_img_get_style(canvas, LV_IMG_STYLE_MAIN); break; default: style = NULL; } diff --git a/src/lv_objx/lv_cb.c b/src/lv_objx/lv_cb.c index a817caa17ab9..a12518c16ae9 100644 --- a/src/lv_objx/lv_cb.c +++ b/src/lv_objx/lv_cb.c @@ -304,7 +304,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param) lv_cb_ext_t * ext = lv_obj_get_ext_attr(cb); if(sign == LV_SIGNAL_STYLE_CHG) { - const lv_style_t * label_style = lv_label_get_style(ext->label); + const lv_style_t * label_style = lv_label_get_style(ext->label, LV_LABEL_STYLE_MAIN); lv_obj_set_size(ext->bullet, lv_font_get_line_height(label_style->text.font), lv_font_get_line_height(label_style->text.font)); lv_btn_set_state(ext->bullet, lv_btn_get_state(cb)); diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index ebc0f5f3fd31..80d72da5bf95 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -112,9 +112,9 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_chart_set_style(new_chart, th->style.chart); + lv_chart_set_style(new_chart, LV_CHART_STYLE_MAIN, th->style.chart); } else { - lv_chart_set_style(new_chart, &lv_style_pretty); + lv_chart_set_style(new_chart, LV_CHART_STYLE_MAIN, &lv_style_pretty); } } else { diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 3c3b601962f3..0ef9e645b880 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -97,6 +97,11 @@ typedef struct } series; } lv_chart_ext_t; +enum { + LV_CHART_STYLE_MAIN, +}; +typedef uint8_t lv_chart_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -218,10 +223,12 @@ void lv_chart_set_update_mode(lv_obj_t * chart, lv_chart_update_mode_t update_mo /** * Set the style of a chart * @param chart pointer to a chart object + * @param type which style should be set (can be only `LV_CHART_STYLE_MAIN`) * @param style pointer to a style */ -static inline void lv_chart_set_style(lv_obj_t * chart, const lv_style_t * style) +static inline void lv_chart_set_style(lv_obj_t * chart, lv_chart_style_t type, const lv_style_t * style) { + (void) type; /*Unused*/ lv_obj_set_style(chart, style); } @@ -290,10 +297,12 @@ lv_opa_t lv_chart_get_series_darking(const lv_obj_t * chart); /** * Get the style of an chart object * @param chart pointer to an chart object + * @param type which style should be get (can be only `LV_CHART_STYLE_MAIN`) * @return pointer to the chart's style */ -static inline const lv_style_t * lv_chart_get_style(const lv_obj_t * chart) +static inline const lv_style_t * lv_chart_get_style(const lv_obj_t * chart, lv_chart_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(chart); } diff --git a/src/lv_objx/lv_cont.c b/src/lv_objx/lv_cont.c index 79443fbf737a..07348d5ccb45 100644 --- a/src/lv_objx/lv_cont.c +++ b/src/lv_objx/lv_cont.c @@ -90,9 +90,9 @@ lv_obj_t * lv_cont_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_cont_set_style(new_cont, th->style.cont); + lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, th->style.cont); } else { - lv_cont_set_style(new_cont, &lv_style_pretty); + lv_cont_set_style(new_cont, LV_CONT_STYLE_MAIN, &lv_style_pretty); } } /*Copy an existing object*/ diff --git a/src/lv_objx/lv_cont.h b/src/lv_objx/lv_cont.h index a53b5024520a..22a3a1ff74f2 100644 --- a/src/lv_objx/lv_cont.h +++ b/src/lv_objx/lv_cont.h @@ -66,6 +66,12 @@ typedef struct uint8_t fit_bottom : 2; /*A fit type from `lv_fit_t` enum */ } lv_cont_ext_t; +/*Styles*/ +enum { + LV_CONT_STYLE_MAIN, +}; +typedef uint8_t lv_cont_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -126,10 +132,12 @@ static inline void lv_cont_set_fit(lv_obj_t * cont, lv_fit_t fit) /** * Set the style of a container * @param cont pointer to a container object + * @param type which style should be set (can be only `LV_CONT_STYLE_MAIN`) * @param style pointer to the new style */ -static inline void lv_cont_set_style(lv_obj_t * cont, const lv_style_t * style) +static inline void lv_cont_set_style(lv_obj_t * cont, lv_cont_style_t type, const lv_style_t * style) { + (void) type; /*Unused*/ lv_obj_set_style(cont, style); } @@ -175,10 +183,12 @@ lv_fit_t lv_cont_get_fit_bottom(const lv_obj_t * cont); /** * Get the style of a container * @param cont pointer to a container object + * @param type which style should be get (can be only `LV_CONT_STYLE_MAIN`) * @return pointer to the container's style */ -static inline const lv_style_t * lv_cont_get_style(const lv_obj_t * cont) +static inline const lv_style_t * lv_cont_get_style(const lv_obj_t * cont, lv_cont_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(cont); } diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index 438eec5eca51..cf2eeffd4eb4 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -95,9 +95,9 @@ lv_obj_t * lv_gauge_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_gauge_set_style(new_gauge, th->style.gauge); + lv_gauge_set_style(new_gauge, LV_GAUGE_STYLE_MAIN, th->style.gauge); } else { - lv_gauge_set_style(new_gauge, &lv_style_pretty_color); + lv_gauge_set_style(new_gauge, LV_GAUGE_STYLE_MAIN, &lv_style_pretty_color); } } /*Copy an existing gauge*/ @@ -394,7 +394,7 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) { lv_style_t style_needle; lv_gauge_ext_t * ext = lv_obj_get_ext_attr(gauge); - const lv_style_t * style = lv_gauge_get_style(gauge); + const lv_style_t * style = lv_gauge_get_style(gauge, LV_GAUGE_STYLE_MAIN); lv_opa_t opa_scale = lv_obj_get_opa_scale(gauge); lv_coord_t r = lv_obj_get_width(gauge) / 2 - style->body.padding.left; diff --git a/src/lv_objx/lv_gauge.h b/src/lv_objx/lv_gauge.h index 2b91545fd8c9..3d953cfabbbc 100644 --- a/src/lv_objx/lv_gauge.h +++ b/src/lv_objx/lv_gauge.h @@ -50,6 +50,12 @@ typedef struct uint8_t label_count; /*Number of labels on the scale*/ } lv_gauge_ext_t; +/*Styles*/ +enum { + LV_GAUGE_STYLE_MAIN, +}; +typedef uint8_t lv_gauge_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -117,11 +123,13 @@ void lv_gauge_set_scale(lv_obj_t * gauge, uint16_t angle, uint8_t line_cnt, uint /** * Set the styles of a gauge * @param gauge pointer to a gauge object - * @param bg set the style of the gauge + * @param type which style should be set (can be only `LV_GAUGE_STYLE_MAIN`) + * @param style set the style of the gauge * */ -static inline void lv_gauge_set_style(lv_obj_t * gauge, lv_style_t * bg) +static inline void lv_gauge_set_style(lv_obj_t * gauge, lv_gauge_style_t type, lv_style_t * style) { - lv_obj_set_style(gauge, bg); + (void) type; /*Unused*/ + lv_obj_set_style(gauge, style); } /*===================== @@ -203,10 +211,12 @@ static inline uint16_t lv_gauge_get_scale_angle(const lv_obj_t * gauge) /** * Get the style of a gauge * @param gauge pointer to a gauge object + * @param type which style should be get (can be only `LV_GAUGE_STYLE_MAIN`) * @return pointer to the gauge's style */ -static inline const lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge) +static inline const lv_style_t * lv_gauge_get_style(const lv_obj_t * gauge, lv_gauge_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(gauge); } diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 92b4a5cc59d8..091362bfe10f 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -173,7 +173,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img) if(src_type == LV_IMG_SRC_SYMBOL) { /*`lv_img_dsc_get_info` couldn't set the with and height of a font so set it here*/ - const lv_style_t * style = lv_img_get_style(img); + const lv_style_t * style = lv_img_get_style(img, LV_IMG_STYLE_MAIN); lv_point_t size; lv_txt_get_size(&size, src_img, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, LV_TXT_FLAG_NONE); diff --git a/src/lv_objx/lv_img.h b/src/lv_objx/lv_img.h index 5cfaae13a7ba..968f16bdca30 100644 --- a/src/lv_objx/lv_img.h +++ b/src/lv_objx/lv_img.h @@ -47,6 +47,12 @@ typedef struct uint8_t cf : 5; /*Color format from `lv_img_color_format_t`*/ } lv_img_ext_t; +/*Styles*/ +enum { + LV_IMG_STYLE_MAIN, +}; +typedef uint8_t lv_img_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -118,24 +124,15 @@ void lv_img_set_offset_y(lv_obj_t * img, lv_coord_t y); /** * Set the style of an image * @param img pointer to an image object + * @param type which style should be set (can be only `LV_IMG_STYLE_MAIN`) * @param style pointer to a style */ -static inline void lv_img_set_style(lv_obj_t * img, const lv_style_t * style) +static inline void lv_img_set_style(lv_obj_t * img, lv_img_style_t type, const lv_style_t * style) { + (void)type; /*Unused*/ lv_obj_set_style(img, style); } -/** - * Obsolete since v5.1. Just for compatibility with v5.0. Will be removed in v6.0 - * @param img - - * @param upscale - - */ -static inline void lv_img_set_upscale(lv_obj_t * img, bool upcale) -{ - (void)img; - (void)upcale; -} - /*===================== * Getter functions *====================*/ @@ -178,24 +175,15 @@ lv_coord_t lv_img_get_offset_y(lv_obj_t * img); /** * Get the style of an image object * @param img pointer to an image object + * @param type which style should be get (can be only `LV_IMG_STYLE_MAIN`) * @return pointer to the image's style */ -static inline const lv_style_t * lv_img_get_style(const lv_obj_t * img) +static inline const lv_style_t * lv_img_get_style(const lv_obj_t * img, lv_img_style_t type) { + (void)type; /*Unused*/ return lv_obj_get_style(img); } -/** - * Obsolete since v5.1. Just for compatibility with v5.0. Will be removed in v6.0 - * @param img - - * @return false - */ -static inline bool lv_img_get_upscale(const lv_obj_t * img) -{ - (void)img; - return false; -} - /********************** * MACROS **********************/ diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 5ffaea4c2785..018bfd78b465 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -110,7 +110,7 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) lv_obj_set_click(new_label, false); lv_label_set_long_mode(new_label, LV_LABEL_LONG_EXPAND); lv_label_set_text(new_label, "Text"); - lv_label_set_style(new_label, NULL); /*Inherit parent's style*/ + lv_label_set_style(new_label, LV_LABEL_STYLE_MAIN, NULL); /*Inherit parent's style*/ } /*Copy 'copy' if not NULL*/ else { @@ -683,8 +683,8 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos) uint32_t i = line_start; uint32_t i_current = i; - uint32_t letter; - uint32_t letter_next; + uint32_t letter = '\0'; + uint32_t letter_next = '\0'; if(new_line_start > 0) { while(i <= new_line_start - 1) { @@ -911,7 +911,7 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param } } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { if(ext->body_draw) { - const lv_style_t * style = lv_label_get_style(label); + const lv_style_t * style = lv_label_get_style(label, LV_LABEL_STYLE_MAIN); label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.left); label->ext_draw_pad = LV_MATH_MAX(label->ext_draw_pad, style->body.padding.right); diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 5a445015d339..4a7c8c8ad316 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -91,6 +91,12 @@ typedef struct characters */ } lv_label_ext_t; +/*Styles*/ +enum { + LV_LABEL_STYLE_MAIN, +}; +typedef uint8_t lv_label_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -171,10 +177,12 @@ void lv_label_set_anim_speed(lv_obj_t * label, uint16_t anim_speed); /** * Set the style of an label * @param label pointer to an label object + * @param type which style should be get (can be only `LV_LABEL_STYLE_MAIN`) * @param style pointer to a style */ -static inline void lv_label_set_style(lv_obj_t * label, const lv_style_t * style) +static inline void lv_label_set_style(lv_obj_t * label, lv_label_style_t type, const lv_style_t * style) { + (void) type; /*Unused*/ lv_obj_set_style(label, style); } @@ -267,10 +275,12 @@ bool lv_label_is_char_under_pos(const lv_obj_t * label, lv_point_t * pos); /** * Get the style of an label object * @param label pointer to an label object + * @param type which style should be get (can be only `LV_LABEL_STYLE_MAIN`) * @return pointer to the label's style */ -static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label) +static inline const lv_style_t * lv_label_get_style(const lv_obj_t * label, lv_label_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(label); } diff --git a/src/lv_objx/lv_led.c b/src/lv_objx/lv_led.c index 5cd15bca8dc3..c991b518b7c6 100644 --- a/src/lv_objx/lv_led.c +++ b/src/lv_objx/lv_led.c @@ -79,9 +79,9 @@ lv_obj_t * lv_led_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_led_set_style(new_led, th->style.led); + lv_led_set_style(new_led, LV_LED_STYLE_MAIN, th->style.led); } else { - lv_led_set_style(new_led, &lv_style_pretty_color); + lv_led_set_style(new_led, LV_LED_STYLE_MAIN, &lv_style_pretty_color); } } /*Copy an existing object*/ diff --git a/src/lv_objx/lv_led.h b/src/lv_objx/lv_led.h index 957c2ae09bea..530be5c579f8 100644 --- a/src/lv_objx/lv_led.h +++ b/src/lv_objx/lv_led.h @@ -39,6 +39,12 @@ typedef struct uint8_t bright; /*Current brightness of the LED (0..255)*/ } lv_led_ext_t; +/*Styles*/ +enum { + LV_LED_STYLE_MAIN, +}; +typedef uint8_t lv_led_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -79,10 +85,12 @@ void lv_led_toggle(lv_obj_t * led); /** * Set the style of a led * @param led pointer to a led object + * @param type which style should be set (can be only `LV_LED_STYLE_MAIN`) * @param style pointer to a style */ -static inline void lv_led_set_style(lv_obj_t * led, const lv_style_t * style) +static inline void lv_led_set_style(lv_obj_t * led, lv_led_style_t type, const lv_style_t * style) { + (void) type; /*Unused*/ lv_obj_set_style(led, style); } @@ -96,10 +104,12 @@ uint8_t lv_led_get_bright(const lv_obj_t * led); /** * Get the style of an led object * @param led pointer to an led object + * @param type which style should be get (can be only `LV_CHART_STYLE_MAIN`) * @return pointer to the led's style */ -static inline const lv_style_t * lv_led_get_style(const lv_obj_t * led) +static inline const lv_style_t * lv_led_get_style(const lv_obj_t * led, lv_led_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(led); } diff --git a/src/lv_objx/lv_line.c b/src/lv_objx/lv_line.c index abe6f5a96894..3831449a0df4 100644 --- a/src/lv_objx/lv_line.c +++ b/src/lv_objx/lv_line.c @@ -120,7 +120,7 @@ void lv_line_set_points(lv_obj_t * line, const lv_point_t point_a[], uint16_t po ymax = LV_MATH_MAX(point_a[i].y, ymax); } - const lv_style_t * style = lv_line_get_style(line); + const lv_style_t * style = lv_line_get_style(line, LV_LINE_STYLE_MAIN); lv_obj_set_size(line, xmax + style->line.width, ymax + style->line.width); } @@ -291,7 +291,7 @@ static lv_res_t lv_line_signal(lv_obj_t * line, lv_signal_t sign, void * param) } buf->type[i] = "lv_line"; } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { - const lv_style_t * style = lv_line_get_style(line); + const lv_style_t * style = lv_line_get_style(line, LV_LINE_STYLE_MAIN); if(line->ext_draw_pad < style->line.width) line->ext_draw_pad = style->line.width; } diff --git a/src/lv_objx/lv_line.h b/src/lv_objx/lv_line.h index 9c89d96bcdb6..ad677c9fba2e 100644 --- a/src/lv_objx/lv_line.h +++ b/src/lv_objx/lv_line.h @@ -41,6 +41,12 @@ typedef struct uint8_t y_inv : 1; /*1: y == 0 will be on the bottom*/ } lv_line_ext_t; +/*Styles*/ +enum { + LV_LINE_STYLE_MAIN, +}; +typedef uint8_t lv_line_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -89,23 +95,15 @@ void lv_line_set_y_invert(lv_obj_t * line, bool en); /** * Set the style of a line * @param line pointer to a line object + * @param type which style should be set (can be only `LV_LINE_STYLE_MAIN`) * @param style pointer to a style */ -static inline void lv_line_set_style(lv_obj_t * line, const lv_style_t * style) +static inline void lv_line_set_style(lv_obj_t * line, lv_line_style_t type, const lv_style_t * style) { + (void) type; /*Unused*/ lv_obj_set_style(line, style); } -/** - * Obsolete since v5.1. Just for compatibility with v5.0. Will be removed in v6.0 - * @param line - - * @param upscale - - */ -static inline void lv_line_set_upscale(lv_obj_t * line, bool upcale) -{ - (void)line; - (void)upcale; -} /*===================== * Getter functions *====================*/ @@ -127,24 +125,15 @@ bool lv_line_get_y_invert(const lv_obj_t * line); /** * Get the style of an line object * @param line pointer to an line object + * @param type which style should be get (can be only `LV_LINE_STYLE_MAIN`) * @return pointer to the line's style */ -static inline const lv_style_t * lv_line_get_style(const lv_obj_t * line) +static inline const lv_style_t * lv_line_get_style(const lv_obj_t * line, lv_line_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(line); } -/** - * Obsolete since v5.1. Just for compatibility with v5.0. Will be removed in v6.0 - * @param line - - * @return false - */ -static inline bool lv_line_get_upscale(const lv_obj_t * line) -{ - (void)line; - return false; -} - /********************** * MACROS **********************/ diff --git a/src/lv_objx/lv_lmeter.c b/src/lv_objx/lv_lmeter.c index d414c5ccec62..78f7a8e61e40 100644 --- a/src/lv_objx/lv_lmeter.c +++ b/src/lv_objx/lv_lmeter.c @@ -85,9 +85,9 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy) /*Set the default styles*/ lv_theme_t * th = lv_theme_get_current(); if(th) { - lv_lmeter_set_style(new_lmeter, th->style.lmeter); + lv_lmeter_set_style(new_lmeter, LV_LMETER_STYLE_MAIN, th->style.lmeter); } else { - lv_lmeter_set_style(new_lmeter, &lv_style_pretty_color); + lv_lmeter_set_style(new_lmeter, LV_LMETER_STYLE_MAIN, &lv_style_pretty_color); } } /*Copy an existing line meter*/ @@ -341,7 +341,7 @@ static lv_res_t lv_lmeter_signal(lv_obj_t * lmeter, lv_signal_t sign, void * par } else if(sign == LV_SIGNAL_STYLE_CHG) { lv_obj_refresh_ext_draw_pad(lmeter); } else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) { - const lv_style_t * style = lv_lmeter_get_style(lmeter); + const lv_style_t * style = lv_lmeter_get_style(lmeter, LV_LMETER_STYLE_MAIN); lmeter->ext_draw_pad = LV_MATH_MAX(lmeter->ext_draw_pad, style->line.width); } else if(sign == LV_SIGNAL_GET_TYPE) { lv_obj_type_t * buf = param; diff --git a/src/lv_objx/lv_lmeter.h b/src/lv_objx/lv_lmeter.h index 9650985d0dec..e83ccbfb8f9f 100644 --- a/src/lv_objx/lv_lmeter.h +++ b/src/lv_objx/lv_lmeter.h @@ -42,6 +42,12 @@ typedef struct int16_t max_value; } lv_lmeter_ext_t; +/*Styles*/ +enum { + LV_LMETER_STYLE_MAIN, +}; +typedef uint8_t lv_lmeter_style_t; + /********************** * GLOBAL PROTOTYPES **********************/ @@ -85,11 +91,13 @@ void lv_lmeter_set_scale(lv_obj_t * lmeter, uint16_t angle, uint8_t line_cnt); /** * Set the styles of a line meter * @param lmeter pointer to a line meter object - * @param bg set the style of the line meter + * @param type which style should be set (can be only `LV_LMETER_STYLE_MAIN`) + * @param style set the style of the line meter */ -static inline void lv_lmeter_set_style(lv_obj_t * lmeter, lv_style_t * bg) +static inline void lv_lmeter_set_style(lv_obj_t * lmeter, lv_lmeter_style_t type, lv_style_t * style) { - lv_obj_set_style(lmeter, bg); + (void) type; /*Unused*/ + lv_obj_set_style(lmeter, style); } /*===================== @@ -134,10 +142,12 @@ uint16_t lv_lmeter_get_scale_angle(const lv_obj_t * lmeter); /** * Get the style of a line meter * @param lmeter pointer to a line meter object + * @param type which style should be get (can be only `LV_LMETER_STYLE_MAIN`) * @return pointer to the line meter's style */ -static inline const lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter) +static inline const lv_style_t * lv_lmeter_get_style(const lv_obj_t * lmeter, lv_lmeter_style_t type) { + (void) type; /*Unused*/ return lv_obj_get_style(lmeter); } diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index a1155182bd6f..7f6f112dffdd 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -791,7 +791,7 @@ void lv_ta_set_style(lv_obj_t * ta, lv_ta_style_t type, const lv_style_t * style refr_cursor_area(ta); break; case LV_TA_STYLE_PLACEHOLDER: - if(ext->placeholder) lv_label_set_style(ext->placeholder, style); + if(ext->placeholder) lv_label_set_style(ext->placeholder, LV_LABEL_STYLE_MAIN, style); break; } } @@ -1003,7 +1003,7 @@ const lv_style_t * lv_ta_get_style(const lv_obj_t * ta, lv_ta_style_t type) case LV_TA_STYLE_EDGE_FLASH: style = lv_page_get_style(ta, LV_PAGE_STYLE_EDGE_FLASH); break; case LV_TA_STYLE_CURSOR: style = ext->cursor.style; break; case LV_TA_STYLE_PLACEHOLDER: - if(ext->placeholder) style = lv_label_get_style(ext->placeholder); + if(ext->placeholder) style = lv_label_get_style(ext->placeholder, LV_LABEL_STYLE_MAIN); break; default: style = NULL; break; } diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d4b1a306262e..d50a00a79905 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -128,7 +128,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy) lv_cont_set_fit2(ext->content, LV_FIT_TIGHT, LV_FIT_NONE); lv_cont_set_layout(ext->content, LV_LAYOUT_ROW_T); - lv_cont_set_style(ext->content, &lv_style_transp_tight); + lv_cont_set_style(ext->content, LV_CONT_STYLE_MAIN, &lv_style_transp_tight); lv_obj_set_height(ext->content, lv_obj_get_height(new_tabview) - lv_obj_get_height(ext->btns)); lv_obj_align(ext->content, ext->btns, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); From 56b9893854f329d3156c30c3adfe80cb786649eb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 11 Jun 2019 06:33:53 +0200 Subject: [PATCH 504/590] add cppchecker script --- scripts/cppcheck_run.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 scripts/cppcheck_run.sh diff --git a/scripts/cppcheck_run.sh b/scripts/cppcheck_run.sh new file mode 100755 index 000000000000..1db16fc91102 --- /dev/null +++ b/scripts/cppcheck_run.sh @@ -0,0 +1,2 @@ +cppcheck --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force + From a2c9c72186559a027fbaa70a2cc77749d8c8e84e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 11 Jun 2019 13:51:14 +0200 Subject: [PATCH 505/590] add LV_ANIM_ON/OFF --- src/lv_core/lv_group.c | 13 +++++++++++++ src/lv_core/lv_obj.c | 2 +- src/lv_core/lv_obj.h | 1 + src/lv_misc/lv_anim.h | 8 ++++++++ src/lv_objx/lv_bar.c | 6 +++--- src/lv_objx/lv_bar.h | 4 ++-- src/lv_objx/lv_btn.c | 29 +++++++++++++++++++++-------- src/lv_objx/lv_ddlist.c | 20 ++++++++++---------- src/lv_objx/lv_ddlist.h | 8 ++++---- src/lv_objx/lv_list.c | 6 +++--- src/lv_objx/lv_list.h | 4 ++-- src/lv_objx/lv_roller.c | 28 ++++++++++------------------ src/lv_objx/lv_roller.h | 4 ++-- src/lv_objx/lv_slider.h | 4 ++-- src/lv_objx/lv_sw.c | 18 +++++++++--------- src/lv_objx/lv_sw.h | 12 ++++++------ src/lv_objx/lv_tabview.c | 18 +++++------------- src/lv_objx/lv_tabview.h | 4 ++-- src/lv_objx/lv_tileview.c | 8 ++++---- src/lv_objx/lv_tileview.h | 4 ++-- 20 files changed, 110 insertions(+), 91 deletions(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index bda9f098d91e..e945d5375771 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -562,6 +562,12 @@ static void style_mod_def(lv_group_t * group, lv_style_t * style) style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); + + /*Add some recolor to the images*/ + if(style->image.intense < LV_OPA_MIN) { + style->image.color = LV_COLOR_ORANGE; + style->image.intense = LV_OPA_40; + } #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; @@ -592,6 +598,13 @@ static void style_mod_edit_def(lv_group_t * group, lv_style_t * style) style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60); style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70); + + /*Add some recolor to the images*/ + if(style->image.intense < LV_OPA_MIN) { + style->image.color = LV_COLOR_GREEN; + style->image.intense = LV_OPA_40; + } + #else style->body.border.opa = LV_OPA_COVER; style->body.border.color = LV_COLOR_BLACK; diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index 8f6d23fb604f..abc68354bcdb 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1806,7 +1806,7 @@ const lv_style_t * lv_obj_get_style(const lv_obj_t * obj) #if LV_USE_GROUP == 0 style_act = par->style_p; #else - /*Is a parent is focused then use then focused style*/ + /*If a parent is focused then use then focused style*/ lv_group_t * g = lv_obj_get_group(par); if(lv_group_get_focused(g) == par) { style_act = lv_group_mod_style(g, par->style_p); diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 1269976aae6f..1eba9b6c2bc9 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -245,6 +245,7 @@ typedef struct ... [x]: "lv_obj" */ } lv_obj_type_t; + /********************** * GLOBAL PROTOTYPES **********************/ diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index 736a7d95048f..bba9d25b4a02 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -78,6 +78,14 @@ typedef struct _lv_anim_t uint32_t has_run : 1; /*Indicates the animation has run in this round*/ } lv_anim_t; +/*Can be used to indicate if animations are enabled or disabled in a case*/ +enum { + LV_ANIM_OFF, + LV_ANIM_ON, +}; + +typedef uint8_t lv_anim_enable_t; + /********************** * GLOBAL PROTOTYPES **********************/ diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 4c01d0ac5f32..9e4a74f207c1 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -126,9 +126,9 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy) * Set a new value on the bar * @param bar pointer to a bar object * @param value new value - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediatelly */ -void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) +void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 anim = false; @@ -142,7 +142,7 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim) if(ext->cur_value == new_value) return; - if(anim == false) { + if(anim == LV_ANIM_OFF) { ext->cur_value = new_value; lv_obj_invalidate(bar); } else { diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index a7a82467b1be..a90525f13d08 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -83,9 +83,9 @@ lv_obj_t * lv_bar_create(lv_obj_t * par, const lv_obj_t * copy); * Set a new value on the bar * @param bar pointer to a bar object * @param value new value - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_bar_set_value(lv_obj_t * bar, int16_t value, bool anim); +void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim); /** * Set minimum and the maximum values of a bar diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index a74cca648098..6cdbe3b90e82 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -354,14 +354,27 @@ const lv_style_t * lv_btn_get_style(const lv_obj_t * btn, lv_btn_style_t type) { const lv_style_t * style = NULL; lv_btn_ext_t * ext = lv_obj_get_ext_attr(btn); - - switch(type) { - case LV_BTN_STYLE_REL: style = ext->styles[LV_BTN_STATE_REL]; break; - case LV_BTN_STYLE_PR: style = ext->styles[LV_BTN_STATE_PR]; break; - case LV_BTN_STYLE_TGL_REL: style = ext->styles[LV_BTN_STATE_TGL_REL]; break; - case LV_BTN_STYLE_TGL_PR: style = ext->styles[LV_BTN_STATE_TGL_PR]; break; - case LV_BTN_STYLE_INA: style = ext->styles[LV_BTN_STATE_INA]; break; - default: style = NULL; break; + lv_btn_state_t state = lv_btn_get_state(btn); + + /* If the style of the current state is asked then return object style. + * If the button is focused then this style is updated by the group's + * `style_mod_cb` function */ + if((type == LV_BTN_STYLE_REL && state == LV_BTN_STATE_REL) || + (type == LV_BTN_STYLE_PR && state == LV_BTN_STATE_PR) || + (type == LV_BTN_STYLE_TGL_REL && state == LV_BTN_STATE_TGL_REL) || + (type == LV_BTN_STYLE_TGL_PR && state == LV_BTN_STATE_TGL_PR) || + (type == LV_BTN_STYLE_INA && state == LV_BTN_STATE_INA)) { + + style = lv_obj_get_style(btn); + } else { + switch(type) { + case LV_BTN_STYLE_REL: style = ext->styles[LV_BTN_STATE_REL]; break; + case LV_BTN_STYLE_PR: style = ext->styles[LV_BTN_STATE_PR]; break; + case LV_BTN_STYLE_TGL_REL: style = ext->styles[LV_BTN_STATE_TGL_REL]; break; + case LV_BTN_STYLE_TGL_PR: style = ext->styles[LV_BTN_STATE_TGL_PR]; break; + case LV_BTN_STYLE_INA: style = ext->styles[LV_BTN_STATE_INA]; break; + default: style = NULL; break; + } } return style; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 9d3ce58d1308..eb7c1577cbe5 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -41,7 +41,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * param); static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void * param); static lv_res_t release_handler(lv_obj_t * ddlist); -static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en); +static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim); static void lv_ddlist_pos_current_option(lv_obj_t * ddlist); static void lv_ddlist_refr_width(lv_obj_t * ddlist); #if LV_USE_ANIMATION @@ -452,9 +452,9 @@ lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist) /** * Open the drop down list with or without animation * @param ddlist pointer to drop down list object - * @param anim_en true: use animation; false: not use animations + * @param anim_en LV_ANIM_EN: use animation; LV_ANIM_OFF: not use animations */ -void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) +void lv_ddlist_open(lv_obj_t * ddlist, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 anim_en = false; @@ -462,15 +462,15 @@ void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); ext->opened = 1; lv_obj_set_drag(lv_page_get_scrl(ddlist), true); - lv_ddlist_refr_size(ddlist, anim_en); + lv_ddlist_refr_size(ddlist, anim); } /** * Close (Collapse) the drop down list * @param ddlist pointer to drop down list object - * @param anim_en true: use animation; false: not use animations + * @param anim_en LV_ANIM_ON: use animation; LV_ANIM_OFF: not use animations */ -void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) +void lv_ddlist_close(lv_obj_t * ddlist, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 anim_en = false; @@ -478,7 +478,7 @@ void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en) lv_ddlist_ext_t * ext = lv_obj_get_ext_attr(ddlist); ext->opened = 0; lv_obj_set_drag(lv_page_get_scrl(ddlist), false); - lv_ddlist_refr_size(ddlist, anim_en); + lv_ddlist_refr_size(ddlist, anim); } /********************** @@ -827,9 +827,9 @@ static lv_res_t release_handler(lv_obj_t * ddlist) /** * Refresh the size of drop down list according to its status (open or closed) * @param ddlist pointer to a drop down list object - * @param anim_en Change the size (open/close) with or without animation (true/false) + * @param anim Change the size (open/close) with or without animation (true/false) */ -static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) +static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 anim_en = false; @@ -858,7 +858,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en) lv_page_set_sb_mode(ddlist, LV_SB_MODE_HIDE); } - if(anim_en == 0) { + if(anim == LV_ANIM_OFF) { lv_obj_set_height(ddlist, new_height); lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index 57e5a0c67d16..c9253c30d10b 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -241,16 +241,16 @@ lv_label_align_t lv_ddlist_get_align(const lv_obj_t * ddlist); /** * Open the drop down list with or without animation * @param ddlist pointer to drop down list object - * @param anim_en true: use animation; false: not use animations + * @param anim_en LV_ANIM_ON: use animation; LV_ANOM_OFF: not use animations */ -void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en); +void lv_ddlist_open(lv_obj_t * ddlist, lv_anim_enable_t anim); /** * Close (Collapse) the drop down list * @param ddlist pointer to drop down list object - * @param anim_en true: use animation; false: not use animations + * @param anim_en LV_ANIM_ON: use animation; LV_ANOM_OFF: not use animations */ -void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en); +void lv_ddlist_close(lv_obj_t * ddlist, lv_anim_enable_t anim); /********************** * MACROS diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 30516df0565d..0f67ee0ca177 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -690,9 +690,9 @@ void lv_list_down(const lv_obj_t * list) /** * Focus on a list button. It ensures that the button will be visible on the list. * @param btn pointer to a list button to focus - * @param anim_en true: scroll with animation, false: without animation + * @param anim_en LV_ANIM_ON: scroll with animation, LV_ANOM_OFF: without animation */ -void lv_list_focus(const lv_obj_t * btn, bool anim_en) +void lv_list_focus(const lv_obj_t * btn, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 @@ -701,7 +701,7 @@ void lv_list_focus(const lv_obj_t * btn, bool anim_en) lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn)); - lv_page_focus(list, btn, anim_en == false ? 0 : lv_list_get_anim_time(list)); + lv_page_focus(list, btn, anim == LV_ANIM_OFF ? 0 : lv_list_get_anim_time(list)); } /********************** diff --git a/src/lv_objx/lv_list.h b/src/lv_objx/lv_list.h index 811f2745e69f..cec77441dd4c 100644 --- a/src/lv_objx/lv_list.h +++ b/src/lv_objx/lv_list.h @@ -322,9 +322,9 @@ void lv_list_down(const lv_obj_t * list); /** * Focus on a list button. It ensures that the button will be visible on the list. * @param btn pointer to a list button to focus - * @param anim_en true: scroll with animation, false: without animation + * @param anim LV_ANOM_ON: scroll with animation, LV_ANIM_OFF: without animation */ -void lv_list_focus(const lv_obj_t * btn, bool anim_en); +void lv_list_focus(const lv_obj_t * btn, lv_anim_enable_t anim); /********************** * MACROS diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index fd12c3dde3cc..a2377ef6888c 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -35,7 +35,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_design_mode_t mode); static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, void * param); static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * param); -static void refr_position(lv_obj_t * roller, bool anim_en); +static void refr_position(lv_obj_t * roller, lv_anim_enable_t animen); static void refr_height(lv_obj_t * roller); static void inf_normalize(void * roller_scrl); #if LV_USE_ANIMATION @@ -188,18 +188,18 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align) * Set the selected option * @param roller pointer to a roller object * @param sel_opt id of the selected option (0 ... number of option - 1); - * @param anim_en true: set with animation; false set immediately + * @param anim_en LV_ANIM_ON: set with animation; LV_ANOM_OFF set immediately */ -void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en) +void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim_en = false; + anim = LV_ANIM_OFF; #endif if(lv_roller_get_selected(roller) == sel_opt) return; lv_ddlist_set_selected(roller, sel_opt); - refr_position(roller, anim_en); + refr_position(roller, anim); } /** @@ -596,12 +596,12 @@ static void draw_bg(lv_obj_t * roller, const lv_area_t * mask) /** * Refresh the position of the roller. It uses the id stored in: ext->ddlist.selected_option_id * @param roller pointer to a roller object - * @param anim_en true: refresh with animation; false: without animation + * @param anim LV_ANIM_ON: refresh with animation; LV_ANOM_OFF: without animation */ -static void refr_position(lv_obj_t * roller, bool anim_en) +static void refr_position(lv_obj_t * roller, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim_en = false; + anim = LV_ANOM_OFF; #endif lv_obj_t * roller_scrl = lv_page_get_scrl(roller); lv_roller_ext_t * ext = lv_obj_get_ext_attr(roller); @@ -612,11 +612,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) /* Normally the animtaion's `end_cb` sets correct position of the roller is infinite. * But without animations do it manually*/ - if(anim_en == false -#if LV_USE_ANIMATION - || ext->ddlist.anim_time == 0 -#endif - ) { + if(anim == LV_ANIM_OFF || ext->ddlist.anim_time == 0) { inf_normalize(roller_scrl); } @@ -625,11 +621,7 @@ static void refr_position(lv_obj_t * roller, bool anim_en) id * (font_h + style_label->text.line_space) + ext->ddlist.label->coords.y1 - roller_scrl->coords.y1; lv_coord_t new_y = -line_y1 + (h - font_h) / 2; - if(anim_en == false -#if LV_USE_ANIMATION - || ext->ddlist.anim_time == 0 -#endif - ) { + if(anim == LV_ANIM_OFF || ext->ddlist.anim_time == 0) { lv_obj_set_y(roller_scrl, new_y); } else { #if LV_USE_ANIMATION diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index 869b3abe6a61..a9a80e9fc272 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -86,9 +86,9 @@ void lv_roller_set_align(lv_obj_t * roller, lv_label_align_t align); * Set the selected option * @param roller pointer to a roller object * @param sel_opt id of the selected option (0 ... number of option - 1); - * @param anim_en true: set with animation; false set immediately + * @param anim LV_ANOM_ON: set with animation; LV_ANIM_OFF set immediately */ -void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, bool anim_en); +void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, lv_anim_enable_t anim); /** * Set the height to show the given number of rows (options) diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 2f602ed3cb11..5511eec4e5d9 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -74,9 +74,9 @@ lv_obj_t * lv_slider_create(lv_obj_t * par, const lv_obj_t * copy); * Set a new value on the slider * @param slider pointer to a slider object * @param value new value - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value, bool anim) +static inline void lv_slider_set_value(lv_obj_t * slider, int16_t value, lv_anim_enable_t anim) { lv_bar_set_value(slider, value, anim); } diff --git a/src/lv_objx/lv_sw.c b/src/lv_objx/lv_sw.c index 0d2ac9ce468b..803ab156f288 100644 --- a/src/lv_objx/lv_sw.c +++ b/src/lv_objx/lv_sw.c @@ -125,12 +125,12 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy) /** * Turn ON the switch * @param sw pointer to a switch objec - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANOM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_sw_on(lv_obj_t * sw, bool anim) +void lv_sw_on(lv_obj_t * sw, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim = false; + anim = LV_ANIM_OFF; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); lv_slider_set_value(sw, LV_SW_MAX_VALUE, anim); @@ -140,12 +140,12 @@ void lv_sw_on(lv_obj_t * sw, bool anim) /** * Turn OFF the switch * @param sw pointer to a switch object - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_sw_off(lv_obj_t * sw, bool anim) +void lv_sw_off(lv_obj_t * sw, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim = false; + anim = LV_ANIM_OFF; #endif lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw); lv_slider_set_value(sw, 0, anim); @@ -155,13 +155,13 @@ void lv_sw_off(lv_obj_t * sw, bool anim) /** * Toggle the position of the switch * @param sw pointer to a switch object - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t * sw, bool anim) +bool lv_sw_toggle(lv_obj_t * sw, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim = false; + anim = LV_ANIM_OFF; #endif bool state = lv_sw_get_state(sw); diff --git a/src/lv_objx/lv_sw.h b/src/lv_objx/lv_sw.h index 386f1ef33159..91723e4dfa37 100644 --- a/src/lv_objx/lv_sw.h +++ b/src/lv_objx/lv_sw.h @@ -79,24 +79,24 @@ lv_obj_t * lv_sw_create(lv_obj_t * par, const lv_obj_t * copy); /** * Turn ON the switch * @param sw pointer to a switch object - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_sw_on(lv_obj_t * sw, bool anim); +void lv_sw_on(lv_obj_t * sw, lv_anim_enable_t anim); /** * Turn OFF the switch * @param sw pointer to a switch object - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_sw_off(lv_obj_t * sw, bool anim); +void lv_sw_off(lv_obj_t * sw, lv_anim_enable_t anim); /** * Toggle the position of the switch * @param sw pointer to a switch object - * @param anim true: set the value with an animation; false: change the value immediatelly + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately * @return resulting state of the switch. */ -bool lv_sw_toggle(lv_obj_t * sw, bool anim); +bool lv_sw_toggle(lv_obj_t * sw, lv_anim_enable_t anim); /** * Set a style of a switch diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index d50a00a79905..81cc8d0045cf 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -324,12 +324,12 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) * Set a new tab * @param tabview pointer to Tab view object * @param id index of a tab to load - * @param anim_en true: set with sliding animation; false: set immediately + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) +void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim_en = false; + anim = LV_ANIM_OFF; #endif lv_tabview_ext_t * ext = lv_obj_get_ext_attr(tabview); @@ -363,11 +363,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if(anim_en == false -#if LV_USE_ANIMATION - || ext->anim_time == 0 -#endif - ) { + if(anim == LV_ANIM_OFF || ext->anim_time == 0) { lv_obj_set_x(ext->content, cont_x); } else { #if LV_USE_ANIMATION @@ -406,11 +402,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en) break; } - if(anim_en == false -#if LV_USE_ANIMATION - || ext->anim_time == 0 -#endif - ) { + if(anim == LV_ANIM_OFF || ext->anim_time == 0) { switch(ext->btns_pos) { case LV_TABVIEW_BTNS_POS_TOP: case LV_TABVIEW_BTNS_POS_BOTTOM: lv_obj_set_x(ext->indic, indic_pos); break; diff --git a/src/lv_objx/lv_tabview.h b/src/lv_objx/lv_tabview.h index 225f204e5e1d..2c0b24e1d37f 100644 --- a/src/lv_objx/lv_tabview.h +++ b/src/lv_objx/lv_tabview.h @@ -117,9 +117,9 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name); * Set a new tab * @param tabview pointer to Tab view object * @param id index of a tab to load - * @param anim_en true: set with sliding animation; false: set immediately + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, bool anim_en); +void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t anim); /** * Enable horizontal sliding with touch pad diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index f72742cb958f..e091493d006f 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -181,12 +181,12 @@ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * val * @param tileview pointer to a tileview object * @param x column id (0, 1, 2...) * @param y line id (0, 1, 2...) - * @param anim_en true: move with animation + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, bool anim_en) +void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim) { #if LV_USE_ANIMATION == 0 - anim_en = false; + anim = LV_ANIM_OFF; #endif lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); @@ -207,7 +207,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, b lv_coord_t x_coord = -x * lv_obj_get_width(tileview); lv_coord_t y_coord = -y * lv_obj_get_height(tileview); lv_obj_t * scrl = lv_page_get_scrl(tileview); - if(anim_en) { + if(anim) { #if LV_USE_ANIMATION lv_coord_t x_act = lv_obj_get_x(scrl); lv_coord_t y_act = lv_obj_get_y(scrl); diff --git a/src/lv_objx/lv_tileview.h b/src/lv_objx/lv_tileview.h index 53f6e9d92960..d8432b46c601 100644 --- a/src/lv_objx/lv_tileview.h +++ b/src/lv_objx/lv_tileview.h @@ -96,9 +96,9 @@ void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * val * @param tileview pointer to a tileview object * @param x column id (0, 1, 2...) * @param y line id (0, 1, 2...) - * @param anim_en true: move with animation + * @param anim LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately */ -void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, bool anim_en); +void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t anim); /** * Enable the edge flash effect. (Show an arc when the an edge is reached) From ed69452c459ab082b50087c4b213192a7d154ecf Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 12 Jun 2019 23:01:16 +0200 Subject: [PATCH 506/590] font: use binary search --- src/lv_font/lv_font_fmt_txt.c | 94 +++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 31 deletions(-) diff --git a/src/lv_font/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c index 5182074be408..aa249d79f75c 100644 --- a/src/lv_font/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -25,7 +25,9 @@ **********************/ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter); static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right); -//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement); +static int32_t unicode_list_compare(const void * ref, const void * element); +static int32_t kern_pair_8_compare(const void * ref, const void * element); +static int32_t kern_pair_16_compare(const void * ref, const void * element); /********************** * STATIC VARIABLES @@ -126,21 +128,22 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_8[rcp]; } else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) { - uint32_t u; - for(u = 0; u < fdsc->cmaps[i].list_length; u++) { - if(fdsc->cmaps[i].unicode_list[u] == rcp) { - glyph_id = fdsc->cmaps[i].glyph_id_start + u; - } + uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare); + + if(p) { + uint32_t ofs = (uintptr_t)p - (uintptr_t) fdsc->cmaps[i].unicode_list; + ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/ + glyph_id = fdsc->cmaps[i].glyph_id_start + ofs; } } - else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_TINY) { - const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; - uint32_t u; - for(u = 0; u < 50 /*fdsc->cmaps[i].list_length*/; u++) { - if(fdsc->cmaps[i].unicode_list[u] == rcp) { - glyph_id = fdsc->cmaps[i].glyph_id_start + u; - } - glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[u]; + else if(fdsc->cmaps[i].type == LV_FONT_FMT_TXT_CMAP_SPARSE_FULL) { + uint8_t * p = lv_utils_bsearch(&rcp, fdsc->cmaps[i].unicode_list, fdsc->cmaps[i].list_length, sizeof(fdsc->cmaps[i].unicode_list[0]), unicode_list_compare); + + if(p) { + uint32_t ofs = (uintptr_t)p - (uintptr_t) fdsc->cmaps[i].unicode_list; + ofs = ofs >> 1; /*The list stores `uint16_t` so the get the index divide by 2*/ + const uint8_t * gid_ofs_16 = fdsc->cmaps[i].glyph_id_ofs_list; + glyph_id = fdsc->cmaps[i].glyph_id_start + gid_ofs_16[ofs]; } } @@ -156,28 +159,37 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; int8_t value = 0; - uint32_t k; + if(fdsc->kern_classes == 0) { /*Kern pairs*/ const lv_font_fmt_txt_kern_pair_t * kdsc = fdsc->kern_dsc; if(kdsc->glyph_ids_size == 0) { + /* Use binary search to find the kern value. + * The pairs are ordered left_id first, then right_id secondly. */ const uint8_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == gid_left && - g_ids[k+1] == gid_right) { - value = kdsc->values[k >> 1]; - break; - } + uint16_t g_id_both = (gid_right << 8) + gid_left; /*Create one number from the ids*/ + uint8_t * kid_p = lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 2, kern_pair_8_compare); + + /*If the `g_id_both` were found get its index from the pointer*/ + if(kid_p) { + uintptr_t ofs = (uintptr_t)kid_p - (uintptr_t)g_ids; + ofs = ofs >> 1; /*ofs is for pair, divide by 2 to refer as a single value*/ + value = kdsc->values[ofs]; } } else if(kdsc->glyph_ids_size == 1) { + /* Use binary search to find the kern value. + * The pairs are ordered left_id first, then right_id secondly. */ const uint16_t * g_ids = kdsc->glyph_ids; - for(k = 0; k < (uint32_t)kdsc->pair_cnt * 2; k += 2) { - if(g_ids[k] == gid_left && - g_ids[k+1] == gid_right) { - value = kdsc->values[k >> 1]; - break; - } + uint32_t g_id_both = (uint32_t)((uint32_t)gid_right << 8) + gid_left; /*Create one number from the ids*/ + uint8_t * kid_p = lv_utils_bsearch(&g_id_both, g_ids, kdsc->pair_cnt, 4, kern_pair_16_compare); + + /*If the `g_id_both` were found get its index from the pointer*/ + if(kid_p) { + uintptr_t ofs = (uintptr_t)kid_p - (uintptr_t)g_ids; + ofs = ofs >> 4; /*ofs is 4 byte pairs, divide by 4 to refer as a single value*/ + value = kdsc->values[ofs]; } + } else { /*Invalid value*/ } @@ -197,6 +209,26 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t return value; } +static int32_t kern_pair_8_compare(const void * ref, const void * element) +{ + const uint8_t * ref8_p = ref; + const uint8_t * element8_p = element; + + /*If the MSB is different it will matter. If not return the diff. of the LSB*/ + if(ref8_p[0] != element8_p[0]) return (int32_t)ref8_p[0] - element8_p[0]; + else return (int32_t) ref8_p[1] - element8_p[1]; + +} + +static int32_t kern_pair_16_compare(const void * ref, const void * element) +{ + const uint16_t * ref16_p = ref; + const uint16_t * element16_p = element; + + /*If the MSB is different it will matter. If not return the diff. of the LSB*/ + if(ref16_p[0] != element16_p[0]) return (int32_t)ref16_p[0] - element16_p[0]; + else return (int32_t) ref16_p[1] - element16_p[1]; +} /** Code Comparator. * @@ -211,7 +243,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t * @retval > 0 Reference is less than element. * */ -//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement) -//{ -// return (*(uint16_t *)pRef) - (*(uint16_t *)pElement); -//} +static int32_t unicode_list_compare(const void * ref, const void * element) +{ + return (*(uint16_t *)ref) - (*(uint16_t *)element); +} From bceb46b813bffe0b2c7089e88f5bc903fd7616df Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 12 Jun 2019 23:10:54 +0200 Subject: [PATCH 507/590] improve callback conventions --- porting/lv_port_disp_template.c | 5 +++-- src/lv_core/lv_group.c | 4 ++-- src/lv_core/lv_obj.c | 8 +++++--- src/lv_core/lv_style.c | 2 +- src/lv_misc/lv_anim.c | 2 +- src/lv_misc/lv_anim.h | 16 +++++++++------- src/lv_objx/lv_bar.c | 2 +- src/lv_objx/lv_btn.c | 10 +++++----- src/lv_objx/lv_ddlist.c | 4 ++-- src/lv_objx/lv_label.c | 24 ++++++++++++------------ src/lv_objx/lv_list.c | 4 ++-- src/lv_objx/lv_mbox.c | 6 +++--- src/lv_objx/lv_page.c | 18 +++++++++--------- src/lv_objx/lv_preload.c | 6 +++--- src/lv_objx/lv_roller.c | 8 ++++---- src/lv_objx/lv_ta.c | 12 ++++++------ src/lv_objx/lv_tabview.c | 6 +++--- src/lv_objx/lv_tileview.c | 4 ++-- src/lv_themes/lv_theme.h | 6 ++++-- src/lv_themes/lv_theme_alien.c | 4 ++-- src/lv_themes/lv_theme_default.c | 4 ++-- src/lv_themes/lv_theme_material.c | 4 ++-- src/lv_themes/lv_theme_mono.c | 4 ++-- src/lv_themes/lv_theme_nemo.c | 4 ++-- src/lv_themes/lv_theme_night.c | 4 ++-- src/lv_themes/lv_theme_templ.c | 4 ++-- src/lv_themes/lv_theme_zen.c | 4 ++-- 27 files changed, 93 insertions(+), 86 deletions(-) diff --git a/porting/lv_port_disp_template.c b/porting/lv_port_disp_template.c index 1f4502720970..ebd044e68c30 100644 --- a/porting/lv_port_disp_template.c +++ b/porting/lv_port_disp_template.c @@ -160,7 +160,7 @@ static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_colo /* If your MCU has hardware accelerator (GPU) then you can use it to blend to memories using opacity * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ -static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa) +static void mem_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa) { /*It's an example code which should be done by your GPU*/ @@ -172,7 +172,8 @@ static void mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length /* If your MCU has hardware accelerator (GPU) then you can use it to fill a memory with a color * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ -static void mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color) +static void mem_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, + const lv_area_t * fill_area, lv_color_t color); { /*It's an example code which should be done by your GPU*/ diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index e945d5375771..5b173b149537 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -618,8 +618,8 @@ static void refresh_theme(lv_group_t * g, lv_theme_t * th) g->style_mod_cb = style_mod_def; g->style_mod_edit_cb = style_mod_edit_def; if(th) { - if(th->group.style_mod_cb) g->style_mod_cb = th->group.style_mod_cb; - if(th->group.style_mod_edit_cb) g->style_mod_edit_cb = th->group.style_mod_edit_cb; + if(th->group.style_mod_xcb) g->style_mod_cb = th->group.style_mod_xcb; + if(th->group.style_mod_edit_xcb) g->style_mod_edit_cb = th->group.style_mod_edit_xcb; } } diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index abc68354bcdb..ec5b9a370f3e 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -1323,13 +1323,15 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_t event, const void * data) /** * Call an event function with an object, event, and data. - * @param event_cb an event callback function. If `NULL` `LV_RES_OK` will return without any actions. + * @param event_xcb an event callback function. If `NULL` `LV_RES_OK` will return without any actions. + * (the 'x' in the argument name indicates that its not a fully generic function because it not follows + * the `func_name(object, callback, ...)` convention) * @param obj pointer to an object to associate with the event (can be `NULL` to simply call the `event_cb`) * @param event an event * @param data pointer to a custom data * @return LV_RES_OK: `obj` was not deleted in the event; LV_RES_INV: `obj` was deleted in the event */ -lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t event, const void * data) +lv_res_t lv_event_send_func(lv_event_cb_t event_xcb, lv_obj_t * obj, lv_event_t event, const void * data) { /* Build a simple linked list from the objects used in the events * It's important to know if an this object was deleted by a nested event @@ -1354,7 +1356,7 @@ lv_res_t lv_event_send_func(lv_event_cb_t event_cb, lv_obj_t * obj, lv_event_t e } /*Call the event callback itself*/ - if(event_cb) event_cb(obj, event); + if(event_xcb) event_xcb(obj, event); /*Restore the event data*/ event_act_data = event_act_data_save; diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index 1600321441e7..24d4d2ffc722 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -281,7 +281,7 @@ void lv_style_anim_init(lv_anim_t * a) lv_anim_init(a); a->start = 0; a->end = STYLE_MIX_MAX; - a->exec_cb = (lv_anim_exec_cb_t)style_animator; + a->exec_cb = (lv_anim_exec_xcb_t)style_animator; a->path_cb = lv_anim_path_linear; a->ready_cb = style_animation_common_end_cb; diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 6961a4927e1a..88ee70057550 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -111,7 +111,7 @@ void lv_anim_create(lv_anim_t * a) * or NULL to delete all the animations of 'var' * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb) +bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb) { lv_anim_t * a; lv_anim_t * a_next; diff --git a/src/lv_misc/lv_anim.h b/src/lv_misc/lv_anim.h index bba9d25b4a02..dae12fd375ab 100644 --- a/src/lv_misc/lv_anim.h +++ b/src/lv_misc/lv_anim.h @@ -41,8 +41,10 @@ typedef int16_t lv_anim_value_t; /* Generic prototype of "animator" functions. * First parameter is the variable to animate. * Second parameter is the value to set. - * Compatible with `lv_xxx_set_yyy(obj, value)` functions*/ -typedef void (*lv_anim_exec_cb_t)(void *, lv_anim_value_t); + * Compatible with `lv_xxx_set_yyy(obj, value)` functions + * The `x` in `_xcb_t` means its not a fully generic prototype because + * it doesn't receive `lv_anim_t *` as its first argument*/ +typedef void (*lv_anim_exec_xcb_t)(void *, lv_anim_value_t); /* Same as `lv_anim_exec_cb_t` but receives `lv_anim_t *` as the first parameter. * It's more consistent but less convenient. Might be used by binding generator functions.*/ @@ -58,7 +60,7 @@ typedef void (*lv_anim_ready_cb_t)(struct _lv_anim_t *); typedef struct _lv_anim_t { void * var; /*Variable to animate*/ - lv_anim_exec_cb_t exec_cb; /*Function to execute to animate*/ + lv_anim_exec_xcb_t exec_cb; /*Function to execute to animate*/ lv_anim_path_cb_t path_cb; /*An array with the steps of animations*/ lv_anim_ready_cb_t ready_cb; /*Call it when the animation is ready*/ int32_t start; /*Start value*/ @@ -114,7 +116,7 @@ void lv_anim_init(lv_anim_t * a); * LittelvGL's built-in functions can be used. * E.g. lv_obj_set_x */ -static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_cb_t exec_cb) +static inline void lv_anim_set_exec_cb(lv_anim_t * a, void * var, lv_anim_exec_xcb_t exec_cb) { a->var = var; a->exec_cb = exec_cb; @@ -155,7 +157,7 @@ static inline void lv_anim_set_values(lv_anim_t * a, lv_anim_value_t start, lv_a static inline void lv_anim_set_custom_exec_cb(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { a->var = a; - a->exec_cb = (lv_anim_exec_cb_t)exec_cb; + a->exec_cb = (lv_anim_exec_xcb_t)exec_cb; } /** @@ -262,7 +264,7 @@ void lv_anim_create(lv_anim_t * a); * or NULL to ignore it and delete all the animations of 'var * @return true: at least 1 animation is deleted, false: no animation is deleted */ -bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb); +bool lv_anim_del(void * var, lv_anim_exec_xcb_t exec_cb); /** * Delete an aniamation by getting the animated variable from `a`. @@ -277,7 +279,7 @@ bool lv_anim_del(void * var, lv_anim_exec_cb_t exec_cb); */ static inline bool lv_anim_custom_del(lv_anim_t * a, lv_anim_custom_exec_cb_t exec_cb) { - return lv_anim_del(a->var, (lv_anim_exec_cb_t)exec_cb); + return lv_anim_del(a->var, (lv_anim_exec_xcb_t)exec_cb); } /** diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 9e4a74f207c1..853a6383d4d3 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -162,7 +162,7 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value, lv_anim_enable_t anim) a.var = bar; a.start = LV_BAR_ANIM_STATE_START; a.end = LV_BAR_ANIM_STATE_END; - a.exec_cb = (lv_anim_exec_cb_t)lv_bar_anim; + a.exec_cb = (lv_anim_exec_xcb_t)lv_bar_anim; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_bar_anim_ready; a.act_time = 0; diff --git a/src/lv_objx/lv_btn.c b/src/lv_objx/lv_btn.c index 6cdbe3b90e82..c13fe21bd108 100644 --- a/src/lv_objx/lv_btn.c +++ b/src/lv_objx/lv_btn.c @@ -506,7 +506,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT /*Forget the old inked button*/ if(ink_obj != NULL && ink_obj != btn) { - lv_anim_del(ink_obj, (lv_anim_exec_cb_t)lv_btn_ink_effect_anim); + lv_anim_del(ink_obj, (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim); lv_obj_invalidate(ink_obj); ink_obj = NULL; } @@ -521,7 +521,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = btn; a.start = 0; a.end = LV_BTN_INK_VALUE_MAX; - a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; @@ -590,7 +590,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) a.var = ink_obj; a.start = LV_BTN_INK_VALUE_MAX; a.end = 0; - a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_btn_ink_effect_anim_ready; a.act_time = 0; @@ -613,7 +613,7 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_CLEANUP) { #if LV_USE_ANIMATION && LV_BTN_INK_EFFECT if(btn == ink_obj) { - lv_anim_del(ink_obj, (lv_anim_exec_cb_t)lv_btn_ink_effect_anim); + lv_anim_del(ink_obj, (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim); ink_obj = NULL; } #endif @@ -663,7 +663,7 @@ static void lv_btn_ink_effect_anim_ready(lv_anim_t * a) new_a.var = ink_obj; new_a.start = LV_BTN_INK_VALUE_MAX; new_a.end = 0; - new_a.exec_cb = (lv_anim_exec_cb_t)lv_btn_ink_effect_anim; + new_a.exec_cb = (lv_anim_exec_xcb_t)lv_btn_ink_effect_anim; new_a.path_cb = lv_anim_path_linear; new_a.ready_cb = lv_btn_ink_effect_anim_ready; new_a.act_time = -ext->ink_wait_time; diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index eb7c1577cbe5..4ac1d7827f98 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -863,7 +863,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim) lv_ddlist_pos_current_option(ddlist); if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE); #if LV_USE_ANIMATION - lv_anim_del(ddlist, (lv_anim_exec_cb_t)lv_ddlist_adjust_height); /*If an animation is in progress then + lv_anim_del(ddlist, (lv_anim_exec_xcb_t)lv_ddlist_adjust_height); /*If an animation is in progress then it will overwrite this changes*/ /*Force animation complete to fix highlight selection*/ @@ -875,7 +875,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, lv_anim_enable_t anim) a.var = ddlist; a.start = lv_obj_get_height(ddlist); a.end = new_height; - a.exec_cb = (lv_anim_exec_cb_t)lv_ddlist_adjust_height; + a.exec_cb = (lv_anim_exec_xcb_t)lv_ddlist_adjust_height; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_ddlist_anim_ready_cb; a.act_time = 0; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 018bfd78b465..8bd32e10e2b2 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -265,10 +265,10 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode) #if LV_USE_ANIMATION /*Delete the old animation (if exists)*/ - lv_anim_del(label, (lv_anim_exec_cb_t)lv_obj_set_x); - lv_anim_del(label, (lv_anim_exec_cb_t)lv_obj_set_y); - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_obj_set_x); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_obj_set_y); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y); #endif ext->offset.x = 0; ext->offset.y = 0; @@ -980,25 +980,25 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { anim.end = lv_obj_get_width(label) - size.x; - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; + anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x); ext->offset.x = 0; } if(size.y > lv_obj_get_height(label) && hor_anim == false) { anim.end = lv_obj_get_height(label) - size.y - (lv_font_get_line_height(font)); - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; + anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y); ext->offset.y = 0; } #endif @@ -1022,24 +1022,24 @@ static void lv_label_refr_text(lv_obj_t * label) bool hor_anim = false; if(size.x > lv_obj_get_width(label)) { anim.end = -size.x - lv_font_get_glyph_width(font, ' ', ' ') * LV_LABEL_WAIT_CHAR_COUNT; - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_x; + anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_x; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); hor_anim = true; } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_x); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_x); ext->offset.x = 0; } if(size.y > lv_obj_get_height(label) && hor_anim == false) { anim.end = -size.y - (lv_font_get_line_height(font)); - anim.exec_cb = (lv_anim_exec_cb_t)lv_label_set_offset_y; + anim.exec_cb = (lv_anim_exec_xcb_t)lv_label_set_offset_y; anim.time = lv_anim_speed_to_time(ext->anim_speed, anim.start, anim.end); lv_anim_create(&anim); } else { /*Delete the offset animation if not required*/ - lv_anim_del(label, (lv_anim_exec_cb_t)lv_label_set_offset_y); + lv_anim_del(label, (lv_anim_exec_xcb_t)lv_label_set_offset_y); ext->offset.y = 0; } #endif diff --git a/src/lv_objx/lv_list.c b/src/lv_objx/lv_list.c index 0f67ee0ca177..cf4fb87d915b 100644 --- a/src/lv_objx/lv_list.c +++ b/src/lv_objx/lv_list.c @@ -627,7 +627,7 @@ void lv_list_up(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -669,7 +669,7 @@ void lv_list_down(const lv_obj_t * list) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = new_y; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index c59dfc44ebc8..099a4b76701e 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -210,7 +210,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) a.var = mbox; a.start = lv_obj_get_height(mbox); a.end = 0; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_height; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_height; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = -delay; @@ -222,7 +222,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) lv_anim_create(&a); a.start = lv_obj_get_width(mbox); - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_width; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_width; a.ready_cb = lv_mbox_close_ready_cb; lv_anim_create(&a); @@ -234,7 +234,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay) a.var = mbox; a.start = 0; a.end = 1; - a.exec_cb = (lv_anim_exec_cb_t)NULL; + a.exec_cb = (lv_anim_exec_xcb_t)NULL; a.path_cb = lv_anim_path_linear; a.ready_cb = lv_mbox_close_ready_cb; a.act_time = -delay; diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index 17d3e9633391..eb2210f1bfb9 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -445,10 +445,10 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) #if LV_USE_ANIMATION /* Be sure there is no position changing animation in progress * because it can overide the current changes*/ - lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_x); - lv_anim_del(page, (lv_anim_exec_cb_t)lv_obj_set_y); - lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_x); - lv_anim_del(ext->scrl, (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(page, (lv_anim_exec_xcb_t)lv_obj_set_x); + lv_anim_del(page, (lv_anim_exec_xcb_t)lv_obj_set_y); + lv_anim_del(ext->scrl, (lv_anim_exec_xcb_t)lv_obj_set_x); + lv_anim_del(ext->scrl, (lv_anim_exec_xcb_t)lv_obj_set_y); #else anim_time = 0; #endif @@ -517,12 +517,12 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time) a.repeat = 0; a.var = ext->scrl; a.path_cb = lv_anim_path_linear; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; lv_anim_create(&a); a.start = lv_obj_get_x(ext->scrl); a.end = scrlable_x; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x; lv_anim_create(&a); #endif } @@ -542,7 +542,7 @@ void lv_page_scroll_hor(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_x(scrl); a.end = a.start + dist; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -571,7 +571,7 @@ void lv_page_scroll_ver(lv_obj_t * page, lv_coord_t dist) a.var = scrl; a.start = lv_obj_get_y(scrl); a.end = a.start + dist; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -600,7 +600,7 @@ void lv_page_start_edge_flash(lv_obj_t * page) a.var = page; a.start = 0; a.end = LV_PAGE_END_FLASH_SIZE; - a.exec_cb = (lv_anim_exec_cb_t)edge_flash_anim; + a.exec_cb = (lv_anim_exec_xcb_t)edge_flash_anim; a.path_cb = lv_anim_path_linear; a.ready_cb = edge_flash_anim_end; a.act_time = 0; diff --git a/src/lv_objx/lv_preload.c b/src/lv_objx/lv_preload.c index f63430405363..74aa0fbf8d17 100644 --- a/src/lv_objx/lv_preload.c +++ b/src/lv_objx/lv_preload.c @@ -187,7 +187,7 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.exec_cb = (lv_anim_exec_xcb_t)lv_preload_spinner_anim; a.path_cb = lv_anim_path_ease_in_out; a.ready_cb = NULL; a.act_time = 0; @@ -208,7 +208,7 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) b.start = ext->arc_length; b.end = 360 - ext->arc_length; } - b.exec_cb = (lv_anim_exec_cb_t)lv_preload_set_arc_length; + b.exec_cb = (lv_anim_exec_xcb_t)lv_preload_set_arc_length; b.path_cb = lv_anim_path_ease_in_out; b.ready_cb = NULL; b.act_time = 0; @@ -233,7 +233,7 @@ void lv_preload_set_anim_type(lv_obj_t * preload, lv_preload_type_t type) a.start = 0; a.end = 360; } - a.exec_cb = (lv_anim_exec_cb_t)lv_preload_spinner_anim; + a.exec_cb = (lv_anim_exec_xcb_t)lv_preload_spinner_anim; a.path_cb = lv_anim_path_ease_in_out; a.ready_cb = NULL; a.act_time = 0; diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index a2377ef6888c..a144a1a28d98 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -408,7 +408,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par refr_height(roller); #if LV_USE_ANIMATION - lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_xcb_t)lv_obj_set_y); #endif lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); refr_position(roller, false); @@ -529,7 +529,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign, } } else if(sign == LV_SIGNAL_PRESSED) { #if LV_USE_ANIMATION - lv_anim_del(roller_scrl, (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(roller_scrl, (lv_anim_exec_xcb_t)lv_obj_set_y); #endif } @@ -629,7 +629,7 @@ static void refr_position(lv_obj_t * roller, lv_anim_enable_t anim) a.var = roller_scrl; a.start = lv_obj_get_y(roller_scrl); a.end = new_y; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; a.path_cb = lv_anim_path_linear; a.ready_cb = scroll_anim_ready_cb; a.act_time = 0; @@ -662,7 +662,7 @@ static void refr_height(lv_obj_t * roller) lv_obj_set_height(lv_page_get_scrl(roller), lv_obj_get_height(ext->ddlist.label) + lv_obj_get_height(roller)); lv_obj_align(ext->ddlist.label, NULL, obj_align, 0, 0); #if LV_USE_ANIMATION - lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_cb_t)lv_obj_set_y); + lv_anim_del(lv_page_get_scrl(roller), (lv_anim_exec_xcb_t)lv_obj_set_y); #endif lv_ddlist_set_selected(roller, ext->ddlist.sel_opt_id); } diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 7f6f112dffdd..d529c942053b 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -172,7 +172,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) /*Create a cursor blinker animation*/ lv_anim_t a; a.var = new_ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim; a.time = ext->cursor.blink_time; a.act_time = 0; a.ready_cb = NULL; @@ -256,7 +256,7 @@ void lv_ta_add_char(lv_obj_t * ta, uint32_t c) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim; a.time = ext->pwd_show_time; a.act_time = 0; a.ready_cb = pwd_char_hider_anim_ready; @@ -337,7 +337,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim; a.time = ext->pwd_show_time; a.act_time = 0; a.ready_cb = pwd_char_hider_anim_ready; @@ -477,7 +477,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt) /*Auto hide characters*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)pwd_char_hider_anim; + a.exec_cb = (lv_anim_exec_xcb_t)pwd_char_hider_anim; a.time = ext->pwd_show_time; a.act_time = 0; a.ready_cb = pwd_char_hider_anim_ready; @@ -584,7 +584,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos) /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim; a.time = ext->cursor.blink_time; a.act_time = 0; a.ready_cb = NULL; @@ -849,7 +849,7 @@ void lv_ta_set_cursor_blink_time(lv_obj_t * ta, uint16_t time) /*Reset cursor blink animation*/ lv_anim_t a; a.var = ta; - a.exec_cb = (lv_anim_exec_cb_t)cursor_blink_anim; + a.exec_cb = (lv_anim_exec_xcb_t)cursor_blink_anim; a.time = ext->cursor.blink_time; a.act_time = 0; a.ready_cb = NULL; diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 81cc8d0045cf..7653e1dfd573 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -371,7 +371,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t an a.var = ext->content; a.start = lv_obj_get_x(ext->content); a.end = cont_x; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -419,13 +419,13 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t an case LV_TABVIEW_BTNS_POS_BOTTOM: a.start = lv_obj_get_x(ext->indic); a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x; break; case LV_TABVIEW_BTNS_POS_LEFT: case LV_TABVIEW_BTNS_POS_RIGHT: a.start = lv_obj_get_y(ext->indic); a.end = indic_pos; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; break; } diff --git a/src/lv_objx/lv_tileview.c b/src/lv_objx/lv_tileview.c index e091493d006f..8b35f0a78eaa 100644 --- a/src/lv_objx/lv_tileview.c +++ b/src/lv_objx/lv_tileview.c @@ -214,7 +214,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, l lv_anim_t a; a.var = scrl; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_x; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_x; a.path_cb = lv_anim_path_linear; a.ready_cb = NULL; a.act_time = 0; @@ -233,7 +233,7 @@ void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, l if(y_coord != y_act) { a.start = y_act; a.end = y_coord; - a.exec_cb = (lv_anim_exec_cb_t)lv_obj_set_y; + a.exec_cb = (lv_anim_exec_xcb_t)lv_obj_set_y; lv_anim_create(&a); } #endif diff --git a/src/lv_themes/lv_theme.h b/src/lv_themes/lv_theme.h index 2ce92d0d81a5..7c0c66697585 100644 --- a/src/lv_themes/lv_theme.h +++ b/src/lv_themes/lv_theme.h @@ -328,8 +328,10 @@ typedef struct #if LV_USE_GROUP struct { - lv_group_style_mod_cb_t style_mod_cb; - lv_group_style_mod_cb_t style_mod_edit_cb; + /* The `x` in the names inidicates that inconsistence becasue + * the group related function are stored in the theme.*/ + lv_group_style_mod_cb_t style_mod_xcb; + lv_group_style_mod_cb_t style_mod_edit_xcb; } group; #endif } lv_theme_t; diff --git a/src/lv_themes/lv_theme_alien.c b/src/lv_themes/lv_theme_alien.c index 43747038fd70..28c1b29a5164 100644 --- a/src/lv_themes/lv_theme_alien.c +++ b/src/lv_themes/lv_theme_alien.c @@ -928,8 +928,8 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_default.c b/src/lv_themes/lv_theme_default.c index 0d33fdb0d611..36b7665ef701 100644 --- a/src/lv_themes/lv_theme_default.c +++ b/src/lv_themes/lv_theme_default.c @@ -448,8 +448,8 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_material.c b/src/lv_themes/lv_theme_material.c index 2437de779771..e2c12fe1e4ea 100644 --- a/src/lv_themes/lv_theme_material.c +++ b/src/lv_themes/lv_theme_material.c @@ -902,8 +902,8 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_mono.c b/src/lv_themes/lv_theme_mono.c index f6b0c2a73860..3b58c92c2bbb 100644 --- a/src/lv_themes/lv_theme_mono.c +++ b/src/lv_themes/lv_theme_mono.c @@ -495,8 +495,8 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_nemo.c b/src/lv_themes/lv_theme_nemo.c index 2fd2df9395ae..e30b0e6a49c3 100644 --- a/src/lv_themes/lv_theme_nemo.c +++ b/src/lv_themes/lv_theme_nemo.c @@ -900,8 +900,8 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_night.c b/src/lv_themes/lv_theme_night.c index 79a17f645457..73aaf39b097b 100644 --- a/src/lv_themes/lv_theme_night.c +++ b/src/lv_themes/lv_theme_night.c @@ -816,8 +816,8 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_templ.c b/src/lv_themes/lv_theme_templ.c index 8479f202a3cb..6dd4eef7ec07 100644 --- a/src/lv_themes/lv_theme_templ.c +++ b/src/lv_themes/lv_theme_templ.c @@ -450,8 +450,8 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; diff --git a/src/lv_themes/lv_theme_zen.c b/src/lv_themes/lv_theme_zen.c index 5d02c2260dc4..a87f63fdfffb 100644 --- a/src/lv_themes/lv_theme_zen.c +++ b/src/lv_themes/lv_theme_zen.c @@ -872,8 +872,8 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font) win_init(); #if LV_USE_GROUP - theme.group.style_mod_cb = style_mod; - theme.group.style_mod_edit_cb = style_mod_edit; + theme.group.style_mod_xcb = style_mod; + theme.group.style_mod_edit_xcb = style_mod_edit; #endif return &theme; From 3abcf52ad7c4ed1834d5a8704bf30428195359de Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 13 Jun 2019 05:13:34 +0200 Subject: [PATCH 508/590] mbox: fix clicking with no buttons (#1101) --- src/lv_objx/lv_mbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 099a4b76701e..9c8db33dfa7e 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -448,10 +448,11 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) } } else if(sign == LV_SIGNAL_STYLE_CHG) { mbox_realign(mbox); - } else if(sign == LV_SIGNAL_RELEASED) { - uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); - if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id); + if(ext->btnm) { + uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); + if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id); + } } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL || sign == LV_SIGNAL_GET_EDITABLE) { if(ext->btnm) { From 0e41e9aacb9069c7d71664c904939353166e790d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Thu, 13 Jun 2019 19:25:23 +0200 Subject: [PATCH 509/590] simplify mem_fill --- porting/lv_port_disp_template.c | 14 ++++++++++++-- src/lv_draw/lv_draw_basic.c | 19 +++++++++---------- src/lv_hal/lv_hal_disp.h | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/porting/lv_port_disp_template.c b/porting/lv_port_disp_template.c index ebd044e68c30..d95d8139d947 100644 --- a/porting/lv_port_disp_template.c +++ b/porting/lv_port_disp_template.c @@ -172,10 +172,20 @@ static void mem_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_colo /* If your MCU has hardware accelerator (GPU) then you can use it to fill a memory with a color * It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/ -static void mem_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, - const lv_area_t * fill_area, lv_color_t color); +static void mem_fill_cb(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width, + const lv_area_t * fill_area, lv_color_t color); { /*It's an example code which should be done by your GPU*/ + uint32_t x, y; + dest_buf += dest_widht * fill_area->y1; /*Go to the first line*/ + + for(y = fill_area->y1; y < fill_area->y2; y++) { + for(x = fill_area->x1; x < fill_area->x2; x++) { + dest_buf[x] = color; + } + dest_buf+=des_width; /*Go to the next line*/ + } + uint32_t i; for(i = 0; i < length; i++) { diff --git a/src/lv_draw/lv_draw_basic.c b/src/lv_draw/lv_draw_basic.c index 10b7731600a9..8573903377e4 100644 --- a/src/lv_draw/lv_draw_basic.c +++ b/src/lv_draw/lv_draw_basic.c @@ -42,7 +42,7 @@ * STATIC PROTOTYPES **********************/ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa); -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, +static void sw_color_fill(lv_color_t * mem, lv_coord_t mem_width, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa); #if LV_COLOR_SCREEN_TRANSP @@ -150,13 +150,13 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ lv_coord_t w = lv_area_get_width(&vdb_rel_a); /*Don't use hw. acc. for every small fill (because of the init overhead)*/ if(w < VFILL_HW_ACC_SIZE_LIMIT) { - sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); + sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa); } /*Not opaque fill*/ else if(opa == LV_OPA_COVER) { /*Use hw fill if present*/ if(disp->driver.mem_fill_cb) { - disp->driver.mem_fill_cb(&disp->driver, vdb->buf_act, &vdb->area, &vdb_rel_a, color); + disp->driver.mem_fill_cb(&disp->driver, vdb->buf_act, vdb_width, &vdb_rel_a, color); } /*Use hw blend if present and the area is not too small*/ else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT && disp->driver.mem_blend_cb) { @@ -179,7 +179,7 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ } /*Else use sw fill if no better option*/ else { - sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); + sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa); } } @@ -204,11 +204,11 @@ void lv_draw_fill(const lv_area_t * cords_p, const lv_area_t * mask_p, lv_color_ } /*Use sw fill with opa if no better option*/ else { - sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); + sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa); } } #else - sw_color_fill(&vdb->area, vdb->buf_act, &vdb_rel_a, color, opa); + sw_color_fill(vdb->buf_act, vdb_width, &vdb_rel_a, color, opa); #endif } @@ -552,20 +552,19 @@ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t len } /** - * - * @param mem_area coordinates of 'mem' memory area + * Fill an area with a color * @param mem a memory address. Considered to a rectangular window according to 'mem_area' + * @param mem_width width of the 'mem' buffer * @param fill_area coordinates of an area to fill. Relative to 'mem_area'. * @param color fill color * @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover) */ -static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, +static void sw_color_fill(lv_color_t * mem, lv_coord_t mem_width, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa) { /*Set all row in vdb to the given color*/ lv_coord_t row; lv_coord_t col; - lv_coord_t mem_width = lv_area_get_width(mem_area); lv_disp_t * disp = lv_refr_get_disp_refreshing(); if(disp->driver.set_px_cb) { diff --git a/src/lv_hal/lv_hal_disp.h b/src/lv_hal/lv_hal_disp.h index 98298709dee6..5c4cdd3527cd 100644 --- a/src/lv_hal/lv_hal_disp.h +++ b/src/lv_hal/lv_hal_disp.h @@ -96,7 +96,7 @@ typedef struct _disp_drv_t lv_opa_t opa); /*OPTIONAL: Fill a memory with a color (GPU only)*/ - void (*mem_fill_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest_buf, const lv_area_t * dest_area, + void (*mem_fill_cb)(struct _disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width, const lv_area_t * fill_area, lv_color_t color); #endif From c52d8e8120133fcf1b4e4bb878fe96dd6a761388 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 05:47:40 +0200 Subject: [PATCH 510/590] lv_txt: performance optimization --- src/lv_misc/lv_txt.c | 139 ++++++++++--------------------------------- 1 file changed, 33 insertions(+), 106 deletions(-) diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index dd49137fa387..d8fc24e4f5eb 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -36,7 +36,7 @@ /********************** * STATIC PROTOTYPES **********************/ -static bool is_break_char(uint32_t letter); +static inline bool is_break_char(uint32_t letter); #if LV_TXT_ENC == LV_TXT_ENC_UTF8 static uint8_t lv_txt_utf8_size(const char * str); @@ -145,132 +145,64 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * size_res->y -= line_space; } + /** * Get the next line of text. Check line length and break chars too. * @param txt a '\0' terminated string * @param font pointer to a font * @param letter_space letter space - * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid - * line breaks + * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks * @param flags settings for the text from 'txt_flag_type' enum - * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 - * they are different) + * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 they are different) */ -uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, lv_coord_t max_width, - lv_txt_flag_t flag) +uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, + lv_coord_t letter_space, lv_coord_t max_width, lv_txt_flag_t flag) { if(txt == NULL) return 0; if(font == NULL) return 0; if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX; - uint32_t i = 0; - lv_coord_t cur_w = 0; - lv_coord_t w_at_last_break = 0; - uint32_t n_char_since_last_break = 0; /* Used count word length of long words */ - uint32_t last_break = NO_BREAK_FOUND; - lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; - uint32_t letter; - uint32_t letter_next; + uint32_t i = 0; + uint32_t i_next = 0; + lv_coord_t cur_w = 0; + uint32_t last_break = NO_BREAK_FOUND; + lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT; + uint32_t letter_w; + uint32_t letter = 0; + uint32_t letter_next = 0; + + letter_next = lv_txt_encoded_next(txt, &i_next); while(txt[i] != '\0') { - lv_coord_t letter_width; - letter = lv_txt_encoded_next(txt, &i); - letter_next = lv_txt_encoded_next(&txt[i], NULL); + letter = letter_next; + i = i_next; + letter_next = lv_txt_encoded_next(txt, &i_next); /*Handle the recolor command*/ if((flag & LV_TXT_FLAG_RECOLOR) != 0) { if(lv_txt_is_cmd(&cmd_state, letter) != false) { - continue; /*Skip the letter is it is part of a command*/ + continue; /*Skip the letter is it is part of a command*/ } } /*Check for new line chars*/ if(letter == '\n' || letter == '\r') { - uint32_t i_tmp = i; - uint32_t n = lv_txt_encoded_next(txt, &i_tmp); - if(letter == '\r' && n == '\n') i = i_tmp; - - return i; /*Return with the first letter of the next line*/ - + /*Return with the first letter of the next line*/ + if(letter == '\r' && letter_next == '\n') return i_next; + else return i; } else { /*Check the actual length*/ - n_char_since_last_break++; - letter_width = lv_font_get_glyph_width(font, letter, letter_next); - cur_w += letter_width; + letter_w = lv_font_get_glyph_width(font, letter, letter_next); + cur_w += letter_w; - /* Get the length of the current work and determine best place - * to break the line. */ + /*If the txt is too long then finish, this is the line end*/ if(cur_w > max_width) { + /*If a break character was already found break there*/ if(last_break != NO_BREAK_FOUND) { - /* Continue searching for next breakable character to see if the next word will - * fit */ - uint32_t n_char_fit = n_char_since_last_break - 1; - if(n_char_since_last_break <= LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN) { - i = last_break; - } else { - uint32_t i_tmp = i; - /*ignore the first letter_space after the break char */ - cur_w -= w_at_last_break + letter_space; - bool other = true; - while(txt[i_tmp] != '\0') { - letter = lv_txt_encoded_next(txt, &i_tmp); - letter_next = lv_txt_encoded_next(&txt[i_tmp], NULL); - - /*Handle the recolor command*/ - if((flag & LV_TXT_FLAG_RECOLOR) != 0) { - if(lv_txt_is_cmd(&cmd_state, letter) != false) { - continue; /*Skip the letter is it is part of a command*/ - } - } - - /*Check for new line chars*/ - if(letter == '\n' || letter == '\r' || is_break_char(letter)) { - if(n_char_since_last_break >= LV_TXT_LINE_BREAK_LONG_LEN) { - /* Figure out the prettiest place to break */ - uint32_t char_remain; - lv_txt_encoded_prev(txt, &i); - for(char_remain = n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; char_remain++) { - lv_txt_encoded_prev(txt, &i); - } - } else { - i = last_break; - } - other = false; - break; - } - n_char_since_last_break++; - lv_coord_t letter_width2 = lv_font_get_glyph_width(font, letter, letter_next); - cur_w += letter_width2; - if(cur_w > max_width) { - /* Current letter already exceeds, return previous */ - lv_txt_encoded_prev(txt, &i); - other = false; - break; - } - if(letter_width2 > 0) { - cur_w += letter_space; - } - } - if(other) { - if(n_char_since_last_break >= LV_TXT_LINE_BREAK_LONG_LEN) { - /* Figure out the prettiest place to break */ - uint32_t char_remain; - lv_txt_encoded_prev(txt, &i); - for(char_remain = n_char_since_last_break - n_char_fit; - char_remain < LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN; char_remain++) { - lv_txt_encoded_prev(txt, &i); - } - } else { - i = last_break; - } - } - } + i = last_break; } else { - /* Now this character is out of the area so it will be first character of the - * next line*/ - /* But 'i' already points to the next character (because of lv_txt_utf8_next) - * step beck one*/ + /* Now this character is out of the area so it will be first character of the next line*/ + /* But 'i' already points to the next character (because of lv_txt_utf8_next) step beck one*/ lv_txt_encoded_prev(txt, &i); } @@ -283,16 +215,11 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord /*If this char still can fit to this line then check if * txt can be broken here later */ else if(is_break_char(letter)) { - last_break = i; /*Save the first char index after break*/ - w_at_last_break = cur_w; - if(letter_width > 0) { - w_at_last_break += letter_space; - } - n_char_since_last_break = 0; + last_break = i; /*Save the first char index after break*/ } } - if(letter_width > 0) { + if(letter_w > 0) { cur_w += letter_space; } } @@ -799,7 +726,7 @@ static uint32_t lv_txt_iso8859_1_get_length(const char * txt) * @param letter a letter * @return false: 'letter' is not break char */ -static bool is_break_char(uint32_t letter) +static inline bool is_break_char(uint32_t letter) { uint8_t i; bool ret = false; From f69dfce05124f6cbfa18808d3547e61508b44856 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 05:55:43 +0200 Subject: [PATCH 511/590] font_fmt_txt: cache the last letter and its glyph --- src/lv_font/lv_font_fmt_txt.c | 8 ++++++++ src/lv_font/lv_font_fmt_txt.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/lv_font/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c index aa249d79f75c..0e7f024ae51c 100644 --- a/src/lv_font/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -113,6 +113,9 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; + /*Check the chacge first*/ + if(letter == fdsc->last_letter) fdsc->last_glyph_id; + uint16_t i; for(i = 0; i < fdsc->cmap_num; i++) { @@ -147,9 +150,14 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) } } + /*Update the cache*/ + fdsc->last_letter = letter; + fdsc->last_glyph_id = glyph_id; return glyph_id; } + fdsc->last_letter = letter; + fdsc->last_glyph_id = 0; return 0; } diff --git a/src/lv_font/lv_font_fmt_txt.h b/src/lv_font/lv_font_fmt_txt.h index 26d792677bc0..34678bdb5c3d 100644 --- a/src/lv_font/lv_font_fmt_txt.h +++ b/src/lv_font/lv_font_fmt_txt.h @@ -184,6 +184,11 @@ typedef struct { * from `lv_font_fmt_txt_bitmap_format_t` */ uint16_t bitmap_format :2; + + /*Cache the last letter and is glyph id*/ + uint32_t last_letter; + uint32_t last_glyph_id; + }lv_font_fmt_txt_dsc_t; /********************** From 7cbc2d0e7f24835a5ab9bfae5ffcf1868089e8f0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 06:24:02 +0200 Subject: [PATCH 512/590] font_fmt_txt: cache fix --- src/lv_font/lv_font_fmt_txt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_font/lv_font_fmt_txt.c b/src/lv_font/lv_font_fmt_txt.c index 0e7f024ae51c..345666f93107 100644 --- a/src/lv_font/lv_font_fmt_txt.c +++ b/src/lv_font/lv_font_fmt_txt.c @@ -114,7 +114,7 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter) lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *) font->dsc; /*Check the chacge first*/ - if(letter == fdsc->last_letter) fdsc->last_glyph_id; + if(letter == fdsc->last_letter) return fdsc->last_glyph_id; uint16_t i; for(i = 0; i < fdsc->cmap_num; i++) { From 71f00017af0cace8b81041a7a817058c690226a5 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 06:56:54 +0200 Subject: [PATCH 513/590] remove LV_EVENT_SLECTED and use LV_EVENT_VALUE_CHANGED instead --- src/lv_core/lv_obj.h | 1 - src/lv_objx/lv_btnm.c | 8 ++++---- src/lv_objx/lv_ddlist.c | 2 ++ src/lv_objx/lv_kb.c | 2 +- src/lv_objx/lv_mbox.c | 4 ++-- src/lv_objx/lv_tabview.c | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index 1eba9b6c2bc9..a9de823cf18b 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -82,7 +82,6 @@ enum { LV_EVENT_DEFOCUSED, LV_EVENT_VALUE_CHANGED, LV_EVENT_INSERT, - LV_EVENT_SELECTED, LV_EVENT_REFRESH, LV_EVENT_APPLY, /*"Ok", "Apply" or similar specific button has clicked*/ LV_EVENT_CANCEL, /*"Close", "Cancel" or similar specific button has clicked*/ diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 0ab5a95edecf..26046ae15941 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -718,7 +718,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b); } } } else if(sign == LV_SIGNAL_PRESSING) { @@ -734,7 +734,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) } if(btn_pr != LV_BTNM_BTN_NONE) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b); if(res == LV_RES_OK) { invalidate_button_area(btnm, btn_pr); } @@ -772,7 +772,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b); } } } else if(sign == LV_SIGNAL_LONG_PRESS_REP) { @@ -781,7 +781,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param) button_is_inactive(ext->ctrl_bits[ext->btn_id_act]) == false && button_is_hidden(ext->ctrl_bits[ext->btn_id_act]) == false) { uint32_t b = ext->btn_id_act; - res = lv_event_send(btnm, LV_EVENT_SELECTED, &b); + res = lv_event_send(btnm, LV_EVENT_VALUE_CHANGED, &b); } } } else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) { diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 4ac1d7827f98..34e088c33d70 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -209,6 +209,8 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt) } else { lv_obj_invalidate(ddlist); } + + lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &ext->sel_opt_id); } /** diff --git a/src/lv_objx/lv_kb.c b/src/lv_objx/lv_kb.c index 5c05c68a2a72..c3219976e569 100644 --- a/src/lv_objx/lv_kb.c +++ b/src/lv_objx/lv_kb.c @@ -323,7 +323,7 @@ const lv_style_t * lv_kb_get_style(const lv_obj_t * kb, lv_kb_style_t type) */ void lv_kb_def_event_cb(lv_obj_t * kb, lv_event_t event) { - if(event != LV_EVENT_SELECTED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; + if(event != LV_EVENT_VALUE_CHANGED && event != LV_EVENT_LONG_PRESSED_REPEAT) return; lv_kb_ext_t * ext = lv_obj_get_ext_attr(kb); uint16_t btn_id = lv_btnm_get_active_btn(kb); diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index 9c8db33dfa7e..c240b5918d58 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -451,7 +451,7 @@ static lv_res_t lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param) } else if(sign == LV_SIGNAL_RELEASED) { if(ext->btnm) { uint16_t btn_id = lv_btnm_get_active_btn(ext->btnm); - if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_SELECTED, &btn_id); + if(btn_id != LV_BTNM_BTN_NONE) lv_event_send(mbox, LV_EVENT_VALUE_CHANGED, &btn_id); } } else if(sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS || sign == LV_SIGNAL_CONTROL || sign == LV_SIGNAL_GET_EDITABLE) { @@ -521,7 +521,7 @@ static void lv_mbox_close_ready_cb(lv_anim_t * a) static void lv_mbox_default_event_cb(lv_obj_t * mbox, lv_event_t event) { - if(event != LV_EVENT_SELECTED) return; + if(event != LV_EVENT_VALUE_CHANGED) return; uint16_t btn_id = lv_mbox_get_active_btn(mbox); if(btn_id == LV_BTNM_BTN_NONE) return; diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 7653e1dfd573..9e7de29768ea 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -338,7 +338,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t an lv_res_t res = LV_RES_OK; if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; - if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_SELECTED, &id); + if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return; lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, false); From 89fae4458e1b1eba24887875c11baba894aed296 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 07:17:02 +0200 Subject: [PATCH 514/590] add lv_canvas_set_palette() --- src/lv_draw/lv_draw_img.c | 22 +++++++++++----------- src/lv_draw/lv_draw_img.h | 6 +++--- src/lv_objx/lv_canvas.c | 18 ++++++++++++++++++ src/lv_objx/lv_canvas.h | 12 ++++++++++++ 4 files changed, 44 insertions(+), 14 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index dceec352e3de..2196d5eaff0e 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -299,27 +299,27 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_ /** * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` * @param dsc pointer to an image descriptor - * @param color_id the palette color to set: + * @param id the palette color to set: * - for `LV_IMG_CF_INDEXED1`: 0..1 * - for `LV_IMG_CF_INDEXED2`: 0..3 * - for `LV_IMG_CF_INDEXED4`: 0..15 * - for `LV_IMG_CF_INDEXED8`: 0..255 - * @param color the color to set + * @param c the color to set */ -void lv_img_buf_set_palette(lv_img_dsc_t * dsc, int color_id, lv_color_t color) +void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c) { - if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && color_id > 1) || - (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && color_id > 3) || - (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && color_id > 15) || - (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT && color_id > 255)) { - LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'color_id'"); + if((dsc->header.cf == LV_IMG_CF_ALPHA_1BIT && id > 1) || + (dsc->header.cf == LV_IMG_CF_ALPHA_2BIT && id > 3) || + (dsc->header.cf == LV_IMG_CF_ALPHA_4BIT && id > 15) || + (dsc->header.cf == LV_IMG_CF_ALPHA_8BIT)) { + LV_LOG_WARN("lv_img_buf_set_px_alpha: invalid 'id'"); return; } lv_color32_t c32; - c32.full = lv_color_to32(color); - uint32_t * buf = (uint32_t *)dsc->data; - buf[color_id] = c32.full; + c32.full = lv_color_to32(c); + uint8_t * buf = (uint8_t *)dsc->data; + memcpy(&buf[id * sizeof(c32)], &c32, sizeof(c32)); } /** diff --git a/src/lv_draw/lv_draw_img.h b/src/lv_draw/lv_draw_img.h index 721a507e004e..61c6048056da 100644 --- a/src/lv_draw/lv_draw_img.h +++ b/src/lv_draw/lv_draw_img.h @@ -90,14 +90,14 @@ void lv_img_buf_set_px_alpha(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_ /** * Set the palette color of an indexed image. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` * @param dsc pointer to an image descriptor - * @param color_id the palette color to set: + * @param id the palette color to set: * - for `LV_IMG_CF_INDEXED1`: 0..1 * - for `LV_IMG_CF_INDEXED2`: 0..3 * - for `LV_IMG_CF_INDEXED4`: 0..15 * - for `LV_IMG_CF_INDEXED8`: 0..255 - * @param color the color to set + * @param c the color to set */ -void lv_img_buf_set_palette(lv_img_dsc_t * dsc, int color_id, lv_color_t color); +void lv_img_buf_set_palette(lv_img_dsc_t * dsc, uint8_t id, lv_color_t c); /** * Get the pixel size of a color format in bits diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 19f0750ca989..88e4322b07ad 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -137,6 +137,24 @@ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t lv_obj_invalidate(canvas); } +/** + * Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * @param canvas pointer to canvas object + * @param id the palette color to set: + * - for `LV_IMG_CF_INDEXED1`: 0..1 + * - for `LV_IMG_CF_INDEXED2`: 0..3 + * - for `LV_IMG_CF_INDEXED4`: 0..15 + * - for `LV_IMG_CF_INDEXED8`: 0..255 + * @param c the color to set + */ +void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color_t c) +{ + lv_canvas_ext_t * ext = lv_obj_get_ext_attr(canvas); + + lv_img_buf_set_palette(&ext->dsc, id, c); + lv_obj_invalidate(canvas); +} + /** * Set a style of a canvas. * @param canvas pointer to canvas object diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index a44fd66c8815..29925887eb44 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -85,6 +85,18 @@ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_ */ void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); +/** + * Set the palette color of a canvas with index format. Valid only for `LV_IMG_CF_INDEXED1/2/4/8` + * @param canvas pointer to canvas object + * @param id the palette color to set: + * - for `LV_IMG_CF_INDEXED1`: 0..1 + * - for `LV_IMG_CF_INDEXED2`: 0..3 + * - for `LV_IMG_CF_INDEXED4`: 0..15 + * - for `LV_IMG_CF_INDEXED8`: 0..255 + * @param c the color to set + */ +void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color_t c); + /** * Set a style of a canvas. * @param canvas pointer to canvas object From dd8fdafe3e3e19c1412073ed3cfa5e59eab7355a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 14:26:10 +0200 Subject: [PATCH 515/590] lv_ta: minor fix to speed up adding texts --- src/lv_objx/lv_ta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index d529c942053b..be6d69f761c9 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -1430,7 +1430,7 @@ static lv_res_t lv_ta_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void } else if(sign == LV_SIGNAL_CORD_CHG) { /*Set the label width according to the text area width*/ if(ext->label) { - if(lv_obj_get_width(ta) != lv_area_get_width(param) || lv_obj_get_height(ta) != lv_area_get_height(param)) { + if(lv_obj_get_width(scrl) != lv_area_get_width(param) || lv_obj_get_height(scrl) != lv_area_get_height(param)) { const lv_style_t * style_scrl = lv_obj_get_style(scrl); lv_obj_set_width(ext->label, lv_page_get_fit_width(ta)); From 10c46e73a84bc95632cdcf61a7bf52193e20738e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 14:57:59 +0200 Subject: [PATCH 516/590] label_draw hint experiments --- src/lv_draw/lv_draw_img.c | 4 ++-- src/lv_draw/lv_draw_label.c | 22 ++++++++++++++++++++-- src/lv_draw/lv_draw_label.h | 8 +++++++- src/lv_objx/lv_btnm.c | 2 +- src/lv_objx/lv_calendar.c | 10 +++++----- src/lv_objx/lv_canvas.c | 2 +- src/lv_objx/lv_chart.c | 4 ++-- src/lv_objx/lv_ddlist.c | 4 ++-- src/lv_objx/lv_gauge.c | 2 +- src/lv_objx/lv_img.c | 2 +- src/lv_objx/lv_label.c | 7 ++++--- src/lv_objx/lv_roller.c | 2 +- src/lv_objx/lv_ta.c | 2 +- src/lv_objx/lv_table.c | 2 +- 14 files changed, 49 insertions(+), 24 deletions(-) diff --git a/src/lv_draw/lv_draw_img.c b/src/lv_draw/lv_draw_img.c index 2196d5eaff0e..e17e2c6839bf 100644 --- a/src/lv_draw/lv_draw_img.c +++ b/src/lv_draw/lv_draw_img.c @@ -49,7 +49,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * if(src == NULL) { LV_LOG_WARN("Image draw: src is NULL"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); return; } @@ -59,7 +59,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, const void * if(res == LV_RES_INV) { LV_LOG_WARN("Image draw error"); lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER); - lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); return; } } diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index f44679acd8a3..80cbef74ed68 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -54,7 +54,7 @@ static uint8_t hex_char_to_num(char hex); * @param sel_end end index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) */ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end) + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end, lv_draw_label_hint_t * hint) { const lv_font_t * font = style->text.font; lv_coord_t w; @@ -86,15 +86,33 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } uint32_t line_start = 0; - uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag); + int32_t last_line_start = -1; + if(hint) { + if(hint->coord_y == coords->y1) last_line_start = hint->line_start; + } + if(last_line_start >= 0) { + line_start = last_line_start; + pos.y = hint->y; + } + + uint32_t line_end = line_start + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag); /*Go the first visible line*/ + bool hint_saved = false; while(pos.y + line_height < mask->y1) { /*Go to next line*/ line_start = line_end; line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag); pos.y += line_height; + if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) { + hint->line_start = line_start; + hint->y = pos.y; + hint->coord_y = coords->y1; + hint_saved = true; + printf("in : %d, %d, %d\n", hint->line_start, hint->y, hint->coord_y); + } + if(txt[line_start] == '\0') return; } diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index 31086f59ad28..7083244ec73f 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -22,6 +22,12 @@ extern "C" { /********************** * TYPEDEFS **********************/ +typedef struct +{ + int32_t line_start; + int32_t y; + int32_t coord_y; +}lv_draw_label_hint_t; /********************** * GLOBAL PROTOTYPES @@ -40,7 +46,7 @@ extern "C" { * @param sel_end end index of selected area (`LV_LABEL_TXT_SEL_OFF` if none) */ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale, - const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end); + const char * txt, lv_txt_flag_t flag, lv_point_t * offset, uint16_t sel_start, uint16_t sel_end, lv_draw_label_hint_t * hint); /********************** * MACROS diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index 26046ae15941..b9ca57fbd524 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -672,7 +672,7 @@ static bool lv_btnm_design(lv_obj_t * btnm, const lv_area_t * mask, lv_design_mo area_tmp.x2 = area_tmp.x1 + txt_size.x; area_tmp.y2 = area_tmp.y1 + txt_size.y; - lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, -1, -1); + lv_draw_label(&area_tmp, mask, btn_style, opa_scale, ext->map_p[txt_i], txt_flag, NULL, -1, -1, NULL); } } return true; diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index 5d044fd1070c..ed889260ff54 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -652,19 +652,19 @@ static void draw_header(lv_obj_t * calendar, const lv_area_t * mask) txt_buf[5] = '\0'; strcpy(&txt_buf[5], get_month_name(calendar, ext->showed_date.month)); header_area.y1 += ext->style_header->body.padding.top; - lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&header_area, mask, ext->style_header, opa_scale, txt_buf, LV_TXT_FLAG_CENTER, NULL, -1, -1, NULL); /*Add the left arrow*/ const lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; header_area.x1 += ext->style_header->body.padding.left; - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_LEFT, LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); /*Add the right arrow*/ arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; header_area.x1 = header_area.x2 - ext->style_header->body.padding.right - lv_txt_get_width(LV_SYMBOL_RIGHT, strlen(LV_SYMBOL_RIGHT), arrow_style->text.font, arrow_style->text.line_space, LV_TXT_FLAG_NONE); - lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&header_area, mask, arrow_style, opa_scale, LV_SYMBOL_RIGHT, LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); } /** @@ -689,7 +689,7 @@ static void draw_day_names(lv_obj_t * calendar, const lv_area_t * mask) label_area.x1 = calendar->coords.x1 + (w * i) / 7 + l_pad; label_area.x2 = label_area.x1 + box_w - 1; lv_draw_label(&label_area, mask, ext->style_day_names, opa_scale, get_day_name(calendar, i), LV_TXT_FLAG_CENTER, - NULL, -1, -1); + NULL, -1, -1, NULL); } } @@ -818,7 +818,7 @@ static void draw_days(lv_obj_t * calendar, const lv_area_t * mask) /*Write the day's number*/ lv_utils_num_to_str(day_cnt, buf); - lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&label_area, mask, final_style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1, NULL); /*Go to the next day*/ day_cnt++; diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index 88e4322b07ad..e221981660aa 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -544,7 +544,7 @@ void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord default: flag = LV_TXT_FLAG_NONE; break; } - lv_draw_label(&coords, &mask, style, LV_OPA_COVER, txt, flag, NULL, LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF); + lv_draw_label(&coords, &mask, style, LV_OPA_COVER, txt, flag, NULL, LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF, NULL); lv_refr_set_disp_refreshing(refr_ori); } diff --git a/src/lv_objx/lv_chart.c b/src/lv_objx/lv_chart.c index 80d72da5bf95..0c33edda7623 100644 --- a/src/lv_objx/lv_chart.c +++ b/src/lv_objx/lv_chart.c @@ -1107,7 +1107,7 @@ static void lv_chart_draw_y_ticks(lv_obj_t * chart, const lv_area_t * mask) /* set the area at some distance of the major tick len left of the tick */ lv_area_t a = {(p2.x - size.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y - size.y / 2), (p2.x - LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.y + size.y / 2)}; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1, NULL); } } } @@ -1215,7 +1215,7 @@ static void lv_chart_draw_x_ticks(lv_obj_t * chart, const lv_area_t * mask) /* set the area at some distance of the major tick len under of the tick */ lv_area_t a = {(p2.x - size.x / 2), (p2.y + LV_CHART_AXIS_TO_LABEL_DISTANCE), (p2.x + size.x / 2), (p2.y + size.y + LV_CHART_AXIS_TO_LABEL_DISTANCE)}; - lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1); + lv_draw_label(&a, mask, style, opa_scale, buf, LV_TXT_FLAG_CENTER, NULL, -1, -1, NULL); } } } diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 34e088c33d70..54d538782099 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -581,7 +581,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig new_style.text.opa = sel_style->text.opa; lv_txt_flag_t flag = lv_ddlist_get_txt_flag(ddlist); lv_draw_label(&ext->label->coords, &mask_sel, &new_style, opa_scale, lv_label_get_text(ext->label), - flag, NULL, -1, -1); + flag, NULL, -1, -1, NULL); } } @@ -610,7 +610,7 @@ static bool lv_ddlist_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_desig area_ok = lv_area_intersect(&mask_arrow, mask, &area_arrow); if(area_ok) { lv_draw_label(&area_arrow, &mask_arrow, &new_style, opa_scale, LV_SYMBOL_DOWN, LV_TXT_FLAG_NONE, - NULL, -1, -1); /*Use a down arrow in ddlist, you can replace it with your + NULL, -1, -1, NULL); /*Use a down arrow in ddlist, you can replace it with your custom symbol*/ } } diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index cf2eeffd4eb4..f2adcf72c72a 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -382,7 +382,7 @@ static void lv_gauge_draw_scale(lv_obj_t * gauge, const lv_area_t * mask) label_cord.x2 = label_cord.x1 + label_size.x; label_cord.y2 = label_cord.y1 + label_size.y; - lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&label_cord, mask, style, opa_scale, scale_txt, LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); } } /** diff --git a/src/lv_objx/lv_img.c b/src/lv_objx/lv_img.c index 091362bfe10f..e8072164564f 100644 --- a/src/lv_objx/lv_img.c +++ b/src/lv_objx/lv_img.c @@ -377,7 +377,7 @@ static bool lv_img_design(lv_obj_t * img, const lv_area_t * mask, lv_design_mode lv_style_t style_mod; lv_style_copy(&style_mod, style); style_mod.text.color = style->image.color; - lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, -1, -1); + lv_draw_label(&coords, mask, &style_mod, opa_scale, ext->src, LV_TXT_FLAG_NONE, NULL, -1, -1, NULL); } else { /*Trigger the error handler of image drawer*/ LV_LOG_WARN("lv_img_design: image source type is unknown"); diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 8bd32e10e2b2..413913c5d245 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -50,6 +50,7 @@ static void lv_label_dot_tmp_free(lv_obj_t * label); * STATIC VARIABLES **********************/ static lv_signal_cb_t ancestor_signal; +lv_draw_label_hint_t hint = {.line_start = -1}; /********************** * MACROS @@ -845,7 +846,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label), &hint); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; @@ -861,7 +862,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.y = ext->offset.y; lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label), NULL); } /*Draw the text again below the original to make an circular effect */ @@ -869,7 +870,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ofs.x = ext->offset.x; ofs.y = ext->offset.y + size.y + lv_font_get_line_height(style->text.font); lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ofs, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label)); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label), NULL); } } } diff --git a/src/lv_objx/lv_roller.c b/src/lv_objx/lv_roller.c index a144a1a28d98..3877f048169b 100644 --- a/src/lv_objx/lv_roller.c +++ b/src/lv_objx/lv_roller.c @@ -370,7 +370,7 @@ static bool lv_roller_design(lv_obj_t * roller, const lv_area_t * mask, lv_desig new_style.text.color = sel_style->text.color; new_style.text.opa = sel_style->text.opa; lv_draw_label(&ext->ddlist.label->coords, &mask_sel, &new_style, opa_scale, - lv_label_get_text(ext->ddlist.label), txt_align, NULL, -1, -1); + lv_label_get_text(ext->ddlist.label), txt_align, NULL, -1, -1, NULL); } } diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index d529c942053b..8a925017042e 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -1260,7 +1260,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_ cur_area.x1 += cur_style.body.padding.left; cur_area.y1 += cur_style.body.padding.top; lv_draw_label(&cur_area, mask, &cur_style, opa_scale, letter_buf, LV_TXT_FLAG_NONE, 0, - LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF); + LV_LABEL_TEXT_SEL_OFF, LV_LABEL_TEXT_SEL_OFF, NULL); } else if(ext->cursor.type == LV_CURSOR_OUTLINE) { cur_style.body.opa = LV_OPA_TRANSP; diff --git a/src/lv_objx/lv_table.c b/src/lv_objx/lv_table.c index 9ecacac30a79..f3c6bfab6543 100644 --- a/src/lv_objx/lv_table.c +++ b/src/lv_objx/lv_table.c @@ -691,7 +691,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ label_mask_ok = lv_area_intersect(&label_mask, mask, &cell_area); if(label_mask_ok) { lv_draw_label(&txt_area, &label_mask, cell_style, opa_scale, ext->cell_data[cell] + 1, - txt_flags, NULL, -1, -1); + txt_flags, NULL, -1, -1, NULL); } /*Draw lines after '\n's*/ lv_point_t p1; From 9e34000dfc0d5d93a1e930cfb77f6dfa056dc114 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 15:15:20 +0200 Subject: [PATCH 517/590] label hint updates --- src/lv_draw/lv_draw_label.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 80cbef74ed68..55a2b1538fa2 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -88,7 +88,10 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st uint32_t line_start = 0; int32_t last_line_start = -1; if(hint) { - if(hint->coord_y == coords->y1) last_line_start = hint->line_start; + if(LV_MATH_ABS(hint->coord_y - coords->y1) > 800) { + hint->line_start = -1; + last_line_start = hint->line_start; + } } if(last_line_start >= 0) { line_start = last_line_start; @@ -105,7 +108,8 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag); pos.y += line_height; - if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) { +// if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) { + if(pos.y >= -1000 && hint->line_start < 0) { hint->line_start = line_start; hint->y = pos.y; hint->coord_y = coords->y1; From 4f07e9b4ab4164f7fb67d10928b389cb94e94ea2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 15:20:46 +0200 Subject: [PATCH 518/590] label hint updates --- src/lv_draw/lv_draw_label.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 55a2b1538fa2..968ed1be280b 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -88,20 +88,19 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st uint32_t line_start = 0; int32_t last_line_start = -1; if(hint) { - if(LV_MATH_ABS(hint->coord_y - coords->y1) > 800) { + if(LV_MATH_ABS(hint->coord_y - coords->y1) > 50) { hint->line_start = -1; - last_line_start = hint->line_start; } + last_line_start = hint->line_start; } if(last_line_start >= 0) { line_start = last_line_start; - pos.y = hint->y; + pos.y += hint->y; } uint32_t line_end = line_start + lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag); /*Go the first visible line*/ - bool hint_saved = false; while(pos.y + line_height < mask->y1) { /*Go to next line*/ line_start = line_end; @@ -109,11 +108,10 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st pos.y += line_height; // if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) { - if(pos.y >= -1000 && hint->line_start < 0) { + if(pos.y >= -100 && hint->line_start < 0) { hint->line_start = line_start; - hint->y = pos.y; + hint->y = pos.y - coords->y1; hint->coord_y = coords->y1; - hint_saved = true; printf("in : %d, %d, %d\n", hint->line_start, hint->y, hint->coord_y); } From 5bb1653991eee08afefb686c03b8168c70b329aa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 14 Jun 2019 16:04:15 +0200 Subject: [PATCH 519/590] label hint: comments and formatting --- src/lv_draw/lv_draw_label.c | 15 ++++++++++----- src/lv_draw/lv_draw_label.h | 15 +++++++++++++-- src/lv_objx/lv_label.c | 15 ++++++++++++--- src/lv_objx/lv_label.h | 2 ++ src/lv_objx/lv_ta.c | 31 ++++++++++++++++++++++++++++++- src/lv_objx/lv_ta.h | 15 +++++++++++++++ 6 files changed, 82 insertions(+), 11 deletions(-) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 968ed1be280b..95ff2a9ec6c7 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -13,6 +13,7 @@ * DEFINES *********************/ #define LABEL_RECOLOR_PAR_LENGTH 6 +#define LV_LABEL_HINT_UPDATE_TH 1024 /*Update the "hint" if the label's y coordinates have changed more then this*/ /********************** * TYPEDEFS @@ -87,12 +88,17 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st uint32_t line_start = 0; int32_t last_line_start = -1; - if(hint) { - if(LV_MATH_ABS(hint->coord_y - coords->y1) > 50) { + + /*Check the hint to use the cached info*/ + if(hint && y_ofs == 0) { + /*If the label changed too much recalculate the hint.*/ + if(LV_MATH_ABS(hint->coord_y - coords->y1) > LV_LABEL_HINT_UPDATE_TH - 2 * line_height) { hint->line_start = -1; } last_line_start = hint->line_start; } + + /*Use the hint if it's valid*/ if(last_line_start >= 0) { line_start = last_line_start; pos.y += hint->y; @@ -107,12 +113,11 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag); pos.y += line_height; -// if(pos.y + line_height <= 0 && pos.y + 2 * line_height > 0 && hint_saved == false) { - if(pos.y >= -100 && hint->line_start < 0) { + /*Save at the threshold coordinate*/ + if(pos.y >= -LV_LABEL_HINT_UPDATE_TH && hint->line_start < 0) { hint->line_start = line_start; hint->y = pos.y - coords->y1; hint->coord_y = coords->y1; - printf("in : %d, %d, %d\n", hint->line_start, hint->y, hint->coord_y); } if(txt[line_start] == '\0') return; diff --git a/src/lv_draw/lv_draw_label.h b/src/lv_draw/lv_draw_label.h index 7083244ec73f..ebc66d4304cd 100644 --- a/src/lv_draw/lv_draw_label.h +++ b/src/lv_draw/lv_draw_label.h @@ -22,10 +22,21 @@ extern "C" { /********************** * TYPEDEFS **********************/ -typedef struct -{ + +/* Store some info to speed up drawing of very large texts + * It takes a lot of time to get the first visible character because + * all the previous characters needs to be checked to calculate the positions. + * This structure stores an earlier (e.g. at -1000 px) coordinate and the index of that line. + * Therefore the calculations can start from here.*/ +typedef struct { + /*Index of the line at `y` coordinate*/ int32_t line_start; + + /*Give the `y` coordinate of the first letter at `line start` index. Relative to the label's coordinates*/ int32_t y; + + /*The 'y1' coordinate of the label when the hint was saved. + * Used to invalidate the hint if the label has moved too much. */ int32_t coord_y; }lv_draw_label_hint_t; diff --git a/src/lv_objx/lv_label.c b/src/lv_objx/lv_label.c index 413913c5d245..9ec0a550d7e5 100644 --- a/src/lv_objx/lv_label.c +++ b/src/lv_objx/lv_label.c @@ -11,7 +11,6 @@ #include "../lv_core/lv_obj.h" #include "../lv_core/lv_group.h" -#include "../lv_draw/lv_draw.h" #include "../lv_misc/lv_color.h" #include "../lv_misc/lv_math.h" @@ -24,6 +23,7 @@ #endif #define LV_LABEL_DOT_END_INV 0xFFFF +#define LV_LABEL_HINT_HEIGHT_LIMIT 1024 /*Enable "hint" to buffer info about labels larger than this. (Speed up their drawing)*/ /********************** * TYPEDEFS @@ -50,7 +50,6 @@ static void lv_label_dot_tmp_free(lv_obj_t * label); * STATIC VARIABLES **********************/ static lv_signal_cb_t ancestor_signal; -lv_draw_label_hint_t hint = {.line_start = -1}; /********************** * MACROS @@ -96,6 +95,11 @@ lv_obj_t * lv_label_create(lv_obj_t * par, const lv_obj_t * copy) #endif ext->offset.x = 0; ext->offset.y = 0; + + ext->hint.line_start = -1; + ext->hint.coord_y = 0; + ext->hint.y = 0; + #if LV_LABEL_TEXT_SEL ext->txt_sel_start = LV_LABEL_TEXT_SEL_OFF; ext->txt_sel_end = LV_LABEL_TEXT_SEL_OFF; @@ -845,8 +849,11 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ } } + lv_draw_label_hint_t * hint = &ext->hint; + if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC || lv_obj_get_height(label) < LV_LABEL_HINT_HEIGHT_LIMIT) hint = NULL; + lv_draw_label(&coords, mask, style, opa_scale, ext->text, flag, &ext->offset, - lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label), &hint); + lv_label_get_text_sel_start(label), lv_label_get_text_sel_end(label), hint); if(ext->long_mode == LV_LABEL_LONG_ROLL_CIRC) { lv_point_t size; @@ -941,6 +948,8 @@ static void lv_label_refr_text(lv_obj_t * label) if(ext->text == NULL) return; + ext->hint.line_start = -1; /*The hint is invalid if the text changes*/ + lv_coord_t max_w = lv_obj_get_width(label); const lv_style_t * style = lv_obj_get_style(label); const lv_font_t * font = style->text.font; diff --git a/src/lv_objx/lv_label.h b/src/lv_objx/lv_label.h index 4a7c8c8ad316..2d505c3d11d8 100644 --- a/src/lv_objx/lv_label.h +++ b/src/lv_objx/lv_label.h @@ -25,6 +25,7 @@ extern "C" { #include "../lv_font/lv_font.h" #include "../lv_font/lv_symbol_def.h" #include "../lv_misc/lv_txt.h" +#include "../lv_draw/lv_draw.h" /********************* * DEFINES @@ -72,6 +73,7 @@ typedef struct uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/ lv_point_t offset; /*Text draw position offset*/ + lv_draw_label_hint_t hint; /*Used to buffer info about large text*/ #if LV_USE_ANIMATION uint16_t anim_speed; /*Speed of scroll and roll animation in px/sec unit*/ #endif diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index ee1279764756..68db1af48e17 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -107,6 +107,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->cursor.style = NULL; ext->cursor.blink_time = LV_TA_DEF_CURSOR_BLINK_TIME; ext->cursor.pos = 0; + ext->cursor.click_pos = 1; ext->cursor.type = LV_CURSOR_LINE; ext->cursor.valid_x = 0; ext->one_line = 0; @@ -617,6 +618,17 @@ void lv_ta_set_cursor_type(lv_obj_t * ta, lv_cursor_type_t cur_type) refr_cursor_area(ta); } +/** + * Enable/Disable the positioning of the the cursor by clicking the text on the text area. + * @param ta pointer to a text area object + * @param en true: enable click positions; false: disable + */ +void lv_ta_set_cursor_click_pos(lv_obj_t * ta, bool en) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + ext->cursor.click_pos = en ? 1 : 0; +} + /** * Enable/Disable password mode * @param ta pointer to a text area object @@ -941,6 +953,17 @@ lv_cursor_type_t lv_ta_get_cursor_type(const lv_obj_t * ta) return ext->cursor.type; } +/** + * Get whether the cursor click positioning is enabled or not. + * @param ta pointer to a text area object + * @return true: enable click positions; false: disable + */ +bool lv_ta_get_cursor_click_pos(lv_obj_t * ta) +{ + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + return ext->cursor.click_pos ? true : false; +} + /** * Get the password mode attribute * @param ta pointer to a text area object @@ -1586,6 +1609,8 @@ static void get_cursor_style(lv_obj_t * ta, lv_style_t * style_res) static void refr_cursor_area(lv_obj_t * ta) { lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + + const lv_style_t * label_style = lv_obj_get_style(ext->label); lv_style_t cur_style; @@ -1707,14 +1732,18 @@ static void placeholder_update(lv_obj_t * ta) static void update_cursor_position_on_click(lv_obj_t * ta, lv_signal_t sign, lv_indev_t * click_source) { + if(click_source == NULL) return; + lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); + if(ext->cursor.click_pos == 0) return; + if(ext->cursor.type == LV_CURSOR_NONE) return; + if(lv_indev_get_type(click_source) == LV_INDEV_TYPE_KEYPAD || lv_indev_get_type(click_source) == LV_INDEV_TYPE_ENCODER) { return; } - lv_ta_ext_t * ext = lv_obj_get_ext_attr(ta); lv_area_t label_coords; lv_obj_get_coords(ext->label, &label_coords); diff --git a/src/lv_objx/lv_ta.h b/src/lv_objx/lv_ta.h index cb2c1ca8cf69..08ef34c9cbcc 100644 --- a/src/lv_objx/lv_ta.h +++ b/src/lv_objx/lv_ta.h @@ -76,6 +76,7 @@ typedef struct uint16_t txt_byte_pos; /* Byte index of the letter after (on) the cursor*/ lv_cursor_type_t type : 4; /* Shape of the cursor*/ uint8_t state : 1; /*Cursor is visible now or not (Handled by the library)*/ + uint8_t click_pos :1; /*1: Enable positioning the cursor by clicking the text area*/ } cursor; #if LV_LABEL_TEXT_SEL uint16_t tmp_sel_start; /*Temporary value*/ @@ -173,6 +174,13 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos); */ void lv_ta_set_cursor_type(lv_obj_t * ta, lv_cursor_type_t cur_type); +/** + * Enable/Disable the positioning of the the cursor by clicking the text on the text area. + * @param ta pointer to a text area object + * @param en true: enable click positions; false: disable + */ +void lv_ta_set_cursor_click_pos(lv_obj_t * ta, bool en); + /** * Enable/Disable password mode * @param ta pointer to a text area object @@ -319,6 +327,13 @@ uint16_t lv_ta_get_cursor_pos(const lv_obj_t * ta); */ lv_cursor_type_t lv_ta_get_cursor_type(const lv_obj_t * ta); +/** + * Get whether the cursor click positioning is enabled or not. + * @param ta pointer to a text area object + * @return true: enable click positions; false: disable + */ +bool lv_ta_get_cursor_click_pos(lv_obj_t * ta); + /** * Get the password mode attribute * @param ta pointer to a text area object From a92ffe7cde646c50ebfa8c9c29ce1cc4cfd68abf Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Fri, 14 Jun 2019 11:34:22 -0400 Subject: [PATCH 520/590] Fix use of NULL pointer in lv_draw_label --- src/lv_draw/lv_draw_label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lv_draw/lv_draw_label.c b/src/lv_draw/lv_draw_label.c index 95ff2a9ec6c7..6244668ef95b 100644 --- a/src/lv_draw/lv_draw_label.c +++ b/src/lv_draw/lv_draw_label.c @@ -99,7 +99,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st } /*Use the hint if it's valid*/ - if(last_line_start >= 0) { + if(hint && last_line_start >= 0) { line_start = last_line_start; pos.y += hint->y; } @@ -114,7 +114,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st pos.y += line_height; /*Save at the threshold coordinate*/ - if(pos.y >= -LV_LABEL_HINT_UPDATE_TH && hint->line_start < 0) { + if(hint && pos.y >= -LV_LABEL_HINT_UPDATE_TH && hint->line_start < 0) { hint->line_start = line_start; hint->y = pos.y - coords->y1; hint->coord_y = coords->y1; From 728c221986ab23d2942be864b1adf0c29a21ac08 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 15 Jun 2019 17:21:02 +0200 Subject: [PATCH 521/590] regenerate fonts --- lv_conf_template.h | 20 +- scripts/built_in_font/built_in_font_gen.py | 6 +- src/lv_conf_checker.h | 28 +- src/lv_font/lv_font_roboto_12.c | 736 +++++++-------------- src/lv_font/lv_font_roboto_16.c | 736 +++++++-------------- src/lv_font/lv_font_roboto_22.c | 736 +++++++-------------- src/lv_font/lv_font_roboto_28.c | 736 +++++++-------------- src/lv_misc/lv_txt.c | 15 - 8 files changed, 956 insertions(+), 2057 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 883d14355da2..0d341408f5f3 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -271,15 +271,6 @@ typedef void * lv_font_user_data_t; /*Can break (wrap) texts on these chars*/ #define LV_TXT_BREAK_CHARS " ,.;:-_" -/* If a character is at least this long, will break wherever "prettiest" */ -#define LV_TXT_LINE_BREAK_LONG_LEN 12 - -/* Minimum number of characters of a word to put on a line before a break */ -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 - -/* Minimum number of characters of a word to put on a line after a break */ -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 - /*=================== * LV_OBJ SETTINGS *==================*/ @@ -366,8 +357,15 @@ typedef void * lv_obj_user_data_t; #if LV_USE_LABEL != 0 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/ # define LV_LABEL_DEF_SCROLL_SPEED 25 -# define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ -# define LV_LABEL_TEXT_SEL 1 /*Enable selecting text of the label */ + +/* Waiting period at beginning/end of animation cycle */ +# define LV_LABEL_WAIT_CHAR_COUNT 3 + +/*Enable selecting text of the label */ +# define LV_LABEL_TEXT_SEL 0 + +/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/ +# define LV_LABEL_LONG_TXT_HINT 0 #endif /*LED (dependencies: -)*/ diff --git a/scripts/built_in_font/built_in_font_gen.py b/scripts/built_in_font/built_in_font_gen.py index 260c5871734b..1f5d64b1b991 100644 --- a/scripts/built_in_font/built_in_font_gen.py +++ b/scripts/built_in_font/built_in_font_gen.py @@ -1,8 +1,10 @@ import argparse +from argparse import RawTextHelpFormatter import os import sys -parser = argparse.ArgumentParser(description='Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv') +parser = argparse.ArgumentParser(description="""Create fonts for LittelvGL including the built-in symbols. lv_font_conv needs to be installed. See https://github.com/littlevgl/lv_font_conv +Example: python built_in_font_gen.py --size 16 -o lv_font_roboto_16.c --bpp 4 -r 0x20-0x7F""", formatter_class=RawTextHelpFormatter) parser.add_argument('-s', '--size', type=int, metavar = 'px', @@ -41,5 +43,5 @@ syms = "61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099" #Run the command -cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff -r {} --font FontAwesome.ttf -r {} --format lvgl -o {}".format(compr, args.bpp, args.size, args.range, syms, args.output) +cmd = "lv_font_conv {} --bpp {} --size {} --font ./Roboto-Regular.woff -r {} --font FontAwesome.ttf -r {} --format lvgl -o {} --force-fast-kern-format".format(compr, args.bpp, args.size, args.range[0], syms, args.output) os.system(cmd) diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 9a747b254590..627be4c0127b 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -385,21 +385,6 @@ #define LV_TXT_BREAK_CHARS " ,.;:-_" #endif -/* If a character is at least this long, will break wherever "prettiest" */ -#ifndef LV_TXT_LINE_BREAK_LONG_LEN -#define LV_TXT_LINE_BREAK_LONG_LEN 12 -#endif - -/* Minimum number of characters of a word to put on a line before a break */ -#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 -#endif - -/* Minimum number of characters of a word to put on a line after a break */ -#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 -#endif - /*=================== * LV_OBJ SETTINGS *==================*/ @@ -529,11 +514,20 @@ #ifndef LV_LABEL_DEF_SCROLL_SPEED # define LV_LABEL_DEF_SCROLL_SPEED 25 #endif + +/* Waiting period at beginning/end of animation cycle */ #ifndef LV_LABEL_WAIT_CHAR_COUNT -# define LV_LABEL_WAIT_CHAR_COUNT 3 /* Waiting period at beginning/end of animation cycle */ +# define LV_LABEL_WAIT_CHAR_COUNT 3 #endif + +/*Enable selecting text of the label */ #ifndef LV_LABEL_TEXT_SEL -# define LV_LABEL_TEXT_SEL 1 /*Enable selecting text of the label */ +# define LV_LABEL_TEXT_SEL 0 +#endif + +/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/ +#ifndef LV_LABEL_LONG_TXT_HINT +# define LV_LABEL_LONG_TXT_HINT 0 #endif #endif diff --git a/src/lv_font/lv_font_roboto_12.c b/src/lv_font/lv_font_roboto_12.c index 8e0d15aac3d5..6f08594fae58 100644 --- a/src/lv_font/lv_font_roboto_12.c +++ b/src/lv_font/lv_font_roboto_12.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 12 px * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 12 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_12.c + * Opts: --no-compress --no-prefilter --bpp 4 --size 12 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_12.c --force-fast-kern-format ******************************************************************************/ #ifndef LV_FONT_ROBOTO_12 @@ -1227,513 +1227,243 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = *----------------*/ -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = { - 1, 53, - 3, 3, - 3, 8, - 3, 34, - 3, 66, - 3, 68, - 3, 69, - 3, 70, - 3, 72, - 3, 78, - 3, 79, - 3, 80, - 3, 81, - 3, 82, - 3, 84, - 3, 88, - 8, 3, - 8, 8, - 8, 34, - 8, 66, - 8, 68, - 8, 69, - 8, 70, - 8, 72, - 8, 78, - 8, 79, - 8, 80, - 8, 81, - 8, 82, - 8, 84, - 8, 88, - 9, 55, - 9, 56, - 9, 58, - 13, 3, - 13, 8, - 15, 3, - 15, 8, - 16, 16, - 34, 3, - 34, 8, - 34, 32, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 80, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 90, - 34, 91, - 35, 53, - 35, 55, - 35, 58, - 36, 10, - 36, 53, - 36, 62, - 36, 94, - 37, 13, - 37, 15, - 37, 34, - 37, 53, - 37, 55, - 37, 57, - 37, 58, - 37, 59, - 38, 53, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 80, - 38, 82, - 38, 86, - 38, 87, - 38, 88, - 38, 90, - 39, 13, - 39, 15, - 39, 34, - 39, 43, - 39, 53, - 39, 66, - 39, 68, - 39, 69, - 39, 70, - 39, 72, - 39, 80, - 39, 82, - 39, 83, - 39, 86, - 39, 87, - 39, 90, - 41, 34, - 41, 53, - 41, 57, - 41, 58, - 42, 34, - 42, 53, - 42, 57, - 42, 58, - 43, 34, - 44, 14, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 68, - 44, 69, - 44, 70, - 44, 72, - 44, 78, - 44, 79, - 44, 80, - 44, 81, - 44, 82, - 44, 86, - 44, 87, - 44, 88, - 44, 90, - 45, 3, - 45, 8, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 86, - 45, 87, - 45, 88, - 45, 90, - 46, 34, - 46, 53, - 46, 57, - 46, 58, - 47, 34, - 47, 53, - 47, 57, - 47, 58, - 48, 13, - 48, 15, - 48, 34, - 48, 53, - 48, 55, - 48, 57, - 48, 58, - 48, 59, - 49, 13, - 49, 15, - 49, 34, - 49, 43, - 49, 57, - 49, 59, - 49, 66, - 49, 68, - 49, 69, - 49, 70, - 49, 72, - 49, 80, - 49, 82, - 49, 85, - 49, 87, - 49, 90, - 50, 53, - 50, 55, - 50, 56, - 50, 58, - 51, 53, - 51, 55, - 51, 58, - 53, 1, - 53, 13, - 53, 14, - 53, 15, - 53, 34, - 53, 36, - 53, 40, - 53, 43, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 58, - 53, 66, - 53, 68, - 53, 69, - 53, 70, - 53, 72, - 53, 78, - 53, 79, - 53, 80, - 53, 81, - 53, 82, - 53, 83, - 53, 84, - 53, 86, - 53, 87, - 53, 88, - 53, 89, - 53, 90, - 53, 91, - 54, 34, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 68, - 55, 69, - 55, 70, - 55, 72, - 55, 80, - 55, 82, - 55, 83, - 55, 86, - 55, 87, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 34, - 56, 53, - 56, 62, - 56, 66, - 56, 68, - 56, 69, - 56, 70, - 56, 72, - 56, 80, - 56, 82, - 56, 83, - 56, 86, - 56, 94, - 57, 14, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 55, - 57, 68, - 57, 69, - 57, 70, - 57, 72, - 57, 80, - 57, 82, - 57, 86, - 57, 87, - 57, 90, - 58, 7, - 58, 10, - 58, 11, - 58, 13, - 58, 14, - 58, 15, - 58, 34, - 58, 36, - 58, 40, - 58, 43, - 58, 48, - 58, 50, - 58, 52, - 58, 53, - 58, 54, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 68, - 58, 69, - 58, 70, - 58, 71, - 58, 72, - 58, 78, - 58, 79, - 58, 80, - 58, 81, - 58, 82, - 58, 83, - 58, 84, - 58, 85, - 58, 86, - 58, 87, - 58, 89, - 58, 90, - 58, 91, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 68, - 59, 69, - 59, 70, - 59, 72, - 59, 80, - 59, 82, - 59, 86, - 59, 87, - 59, 88, - 59, 90, - 60, 43, - 60, 54, - 66, 3, - 66, 8, - 66, 87, - 66, 90, - 67, 3, - 67, 8, - 67, 87, - 67, 89, - 67, 90, - 67, 91, - 68, 3, - 68, 8, - 70, 3, - 70, 8, - 70, 87, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 68, - 71, 69, - 71, 70, - 71, 72, - 71, 82, - 71, 94, - 73, 3, - 73, 8, - 76, 68, - 76, 69, - 76, 70, - 76, 72, - 76, 82, - 78, 3, - 78, 8, - 79, 3, - 79, 8, - 80, 3, - 80, 8, - 80, 87, - 80, 89, - 80, 90, - 80, 91, - 81, 3, - 81, 8, - 81, 87, - 81, 89, - 81, 90, - 81, 91, - 83, 3, - 83, 8, - 83, 13, - 83, 15, - 83, 66, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 72, - 83, 80, - 83, 82, - 83, 85, - 83, 87, - 83, 88, - 83, 90, - 85, 80, - 87, 3, - 87, 8, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 71, - 87, 72, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 89, 68, - 89, 69, - 89, 70, - 89, 72, - 89, 80, - 89, 82, - 90, 3, - 90, 8, - 90, 13, - 90, 15, - 90, 66, - 90, 68, - 90, 69, - 90, 70, - 90, 71, - 90, 72, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 72, - 91, 80, - 91, 82, - 92, 43, - 92, 54 + 0, 1, 0, 2, 0, 0, 0, 0, + 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 7, 8, 9, 10, 11, + 0, 12, 12, 13, 14, 15, 12, 12, + 9, 16, 17, 18, 0, 19, 13, 20, + 21, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 27, 28, 0, 29, 30, + 0, 31, 0, 0, 32, 0, 31, 31, + 33, 27, 0, 34, 0, 35, 0, 36, + 37, 38, 36, 39, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = { - -4, -10, -10, -11, -5, -6, -6, -6, - -6, -2, -2, -6, -2, -6, -7, 1, - -10, -10, -11, -5, -6, -6, -6, -6, - -2, -2, -6, -2, -6, -7, 1, 2, - 2, 2, -16, -16, -16, -16, -21, -11, - -11, -6, -1, -1, -1, -1, -12, -2, - -8, -6, -9, -1, -2, -1, -5, -3, - -5, 1, -3, -2, -5, -2, -3, -1, - -2, -10, -10, -2, -3, -2, -2, -4, - -2, 2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -22, -22, -16, - -25, 2, -3, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, 2, -3, 2, - -3, 2, -3, 2, -3, -2, -6, -3, - -3, -3, -3, -2, -2, -2, -2, -2, - -2, -3, -2, -2, -2, -4, -6, -4, - -31, -31, 2, -6, -6, -6, -6, -26, - -5, -16, -13, -22, -4, -12, -9, -12, - 2, -3, 2, -3, 2, -3, 2, -3, - -10, -10, -2, -3, -2, -2, -4, -2, - -30, -30, -13, -19, -3, -2, -1, -1, - -1, -1, -1, -1, -1, 1, 1, 1, - -4, -3, -2, -3, -7, -2, -4, -4, - -20, -22, -20, -7, -3, -3, -22, -3, - -3, -1, 2, 2, 1, 2, -11, -9, - -9, -9, -9, -10, -10, -9, -10, -9, - -7, -11, -9, -7, -5, -7, -7, -6, - -2, 2, -21, -3, -21, -7, -1, -1, - -1, -1, 2, -4, -4, -4, -4, -4, - -4, -4, -3, -3, -1, -1, 2, 1, - -12, -6, -12, -4, 1, 1, -3, -3, - -3, -3, -3, -3, -3, -2, -2, 1, - -4, -2, -2, -2, -2, 1, -2, -2, - -2, -2, -2, -2, -2, -3, -3, -3, - 2, -5, -20, -5, -20, -9, -3, -3, - -9, -3, -3, -1, 2, -9, 2, 2, - 1, 2, 2, -7, -6, -6, -6, -2, - -6, -4, -4, -6, -4, -6, -4, -5, - -2, -4, -2, -2, -2, -3, 2, 1, - -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -3, -3, -3, -2, -2, - -6, -6, -1, -1, -3, -3, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - 2, 2, 2, 2, -2, -2, -2, -2, - -2, 2, -10, -10, -2, -2, -2, -2, - -2, -10, -10, -10, -10, -13, -13, -1, - -2, -1, -1, -3, -3, -1, -1, -1, - -1, 2, 2, -12, -12, -4, -2, -2, - -2, 1, -2, -2, -2, 5, 2, 2, - 2, -2, 1, 1, -10, -10, -1, -1, - -1, -1, 1, -1, -1, -1, -12, -12, - -2, -2, -2, -2, -2, -2, 1, 1, - -10, -10, -1, -1, -1, -1, 1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -2, -2 + 0, 1, 0, 2, 0, 0, 0, 3, + 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 10, 0, 11, 0, 0, 0, + 11, 0, 0, 12, 0, 0, 0, 0, + 11, 0, 11, 0, 13, 14, 15, 16, + 17, 18, 19, 20, 0, 0, 21, 0, + 0, 0, 22, 0, 23, 23, 23, 24, + 23, 0, 0, 0, 0, 0, 25, 25, + 26, 25, 23, 27, 28, 29, 30, 31, + 32, 33, 31, 34, 0, 0, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = +/*Kern values between classes*/ +static uint8_t kern_class_values[] = { - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 434, - .glyph_ids_size = 0 + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -10, 0, 0, 0, + 0, 0, 0, 0, -11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -5, -6, 0, -2, -6, 0, -7, 0, + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 2, 0, + 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -21, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, +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+ 0, 0, 0, 2, -6, 0, 0, -26, + -5, -16, -13, 0, -22, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -4, + -12, -9, 0, 0, 0, 0, 0, 0, + 0, 0, -30, 0, 0, 0, -13, 0, + -19, 0, 0, 0, 0, 0, -3, 0, + -2, 0, -1, -1, 0, 0, -1, 0, + 0, 1, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -4, 0, -3, + -2, 0, -3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -7, 0, -2, 0, 0, -4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -4, 0, + 0, 0, 0, -20, -22, 0, 0, -7, + -3, -22, -1, 2, 0, 2, 1, 0, + 2, 0, 0, -11, -9, 0, -10, -9, + -7, -11, 0, -9, -7, -5, -7, -6, + 0, 0, 0, 0, 2, 0, -21, -3, + 0, 0, -7, -1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, -4, -4, + 0, 0, -4, -3, 0, 0, -3, -1, + 0, 0, 0, 2, 0, 0, 0, 1, + 0, -12, -6, 0, 0, -4, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 0, + 1, -3, -3, 0, 0, -3, -2, 0, + 0, -2, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, -4, 0, 0, + 0, -2, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, -2, 0, 0, + -2, 0, 0, 0, -2, -3, 0, 0, + 0, 0, 0, 0, -3, 2, -5, -20, + -5, 0, 0, -9, -3, -9, -1, 2, + -9, 2, 2, 1, 2, 0, 2, -7, + -6, -2, -4, -6, -4, -5, -2, -4, + -2, 0, -2, -3, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, -2, + 0, 0, 0, 0, 0, 0, 0, 0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0, + -2, -1, 0, 0, 2, 0, 0, 0, + -12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -4, -2, 1, 0, -2, 0, 0, 5, + 0, 2, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, -10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, -1, + 1, 0, -1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -12, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -2, 0, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -1, 0, 0, -1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -2, 0, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 40, + .right_class_cnt = 35, }; /*-------------------- @@ -1749,8 +1479,8 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 4, .kern_scale = 16, - .kern_dsc = &kern_pairs, - .kern_classes = 0 + .kern_dsc = &kern_classes, + .kern_classes = 1 }; diff --git a/src/lv_font/lv_font_roboto_16.c b/src/lv_font/lv_font_roboto_16.c index 9278f0ae0f4b..cde1768add16 100644 --- a/src/lv_font/lv_font_roboto_16.c +++ b/src/lv_font/lv_font_roboto_16.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 16 px * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 16 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_16.c + * Opts: --no-compress --no-prefilter --bpp 4 --size 16 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_16.c --force-fast-kern-format ******************************************************************************/ #ifndef LV_FONT_ROBOTO_16 @@ -1689,513 +1689,243 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = *----------------*/ -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = { - 1, 53, - 3, 3, - 3, 8, - 3, 34, - 3, 66, - 3, 68, - 3, 69, - 3, 70, - 3, 72, - 3, 78, - 3, 79, - 3, 80, - 3, 81, - 3, 82, - 3, 84, - 3, 88, - 8, 3, - 8, 8, - 8, 34, - 8, 66, - 8, 68, - 8, 69, - 8, 70, - 8, 72, - 8, 78, - 8, 79, - 8, 80, - 8, 81, - 8, 82, - 8, 84, - 8, 88, - 9, 55, - 9, 56, - 9, 58, - 13, 3, - 13, 8, - 15, 3, - 15, 8, - 16, 16, - 34, 3, - 34, 8, - 34, 32, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 80, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 90, - 34, 91, - 35, 53, - 35, 55, - 35, 58, - 36, 10, - 36, 53, - 36, 62, - 36, 94, - 37, 13, - 37, 15, - 37, 34, - 37, 53, - 37, 55, - 37, 57, - 37, 58, - 37, 59, - 38, 53, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 80, - 38, 82, - 38, 86, - 38, 87, - 38, 88, - 38, 90, - 39, 13, - 39, 15, - 39, 34, - 39, 43, - 39, 53, - 39, 66, - 39, 68, - 39, 69, - 39, 70, - 39, 72, - 39, 80, - 39, 82, - 39, 83, - 39, 86, - 39, 87, - 39, 90, - 41, 34, - 41, 53, - 41, 57, - 41, 58, - 42, 34, - 42, 53, - 42, 57, - 42, 58, - 43, 34, - 44, 14, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 68, - 44, 69, - 44, 70, - 44, 72, - 44, 78, - 44, 79, - 44, 80, - 44, 81, - 44, 82, - 44, 86, - 44, 87, - 44, 88, - 44, 90, - 45, 3, - 45, 8, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 86, - 45, 87, - 45, 88, - 45, 90, - 46, 34, - 46, 53, - 46, 57, - 46, 58, - 47, 34, - 47, 53, - 47, 57, - 47, 58, - 48, 13, - 48, 15, - 48, 34, - 48, 53, - 48, 55, - 48, 57, - 48, 58, - 48, 59, - 49, 13, - 49, 15, - 49, 34, - 49, 43, - 49, 57, - 49, 59, - 49, 66, - 49, 68, - 49, 69, - 49, 70, - 49, 72, - 49, 80, - 49, 82, - 49, 85, - 49, 87, - 49, 90, - 50, 53, - 50, 55, - 50, 56, - 50, 58, - 51, 53, - 51, 55, - 51, 58, - 53, 1, - 53, 13, - 53, 14, - 53, 15, - 53, 34, - 53, 36, - 53, 40, - 53, 43, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 58, - 53, 66, - 53, 68, - 53, 69, - 53, 70, - 53, 72, - 53, 78, - 53, 79, - 53, 80, - 53, 81, - 53, 82, - 53, 83, - 53, 84, - 53, 86, - 53, 87, - 53, 88, - 53, 89, - 53, 90, - 53, 91, - 54, 34, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 68, - 55, 69, - 55, 70, - 55, 72, - 55, 80, - 55, 82, - 55, 83, - 55, 86, - 55, 87, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 34, - 56, 53, - 56, 62, - 56, 66, - 56, 68, - 56, 69, - 56, 70, - 56, 72, - 56, 80, - 56, 82, - 56, 83, - 56, 86, - 56, 94, - 57, 14, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 55, - 57, 68, - 57, 69, - 57, 70, - 57, 72, - 57, 80, - 57, 82, - 57, 86, - 57, 87, - 57, 90, - 58, 7, - 58, 10, - 58, 11, - 58, 13, - 58, 14, - 58, 15, - 58, 34, - 58, 36, - 58, 40, - 58, 43, - 58, 48, - 58, 50, - 58, 52, - 58, 53, - 58, 54, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 68, - 58, 69, - 58, 70, - 58, 71, - 58, 72, - 58, 78, - 58, 79, - 58, 80, - 58, 81, - 58, 82, - 58, 83, - 58, 84, - 58, 85, - 58, 86, - 58, 87, - 58, 89, - 58, 90, - 58, 91, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 68, - 59, 69, - 59, 70, - 59, 72, - 59, 80, - 59, 82, - 59, 86, - 59, 87, - 59, 88, - 59, 90, - 60, 43, - 60, 54, - 66, 3, - 66, 8, - 66, 87, - 66, 90, - 67, 3, - 67, 8, - 67, 87, - 67, 89, - 67, 90, - 67, 91, - 68, 3, - 68, 8, - 70, 3, - 70, 8, - 70, 87, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 68, - 71, 69, - 71, 70, - 71, 72, - 71, 82, - 71, 94, - 73, 3, - 73, 8, - 76, 68, - 76, 69, - 76, 70, - 76, 72, - 76, 82, - 78, 3, - 78, 8, - 79, 3, - 79, 8, - 80, 3, - 80, 8, - 80, 87, - 80, 89, - 80, 90, - 80, 91, - 81, 3, - 81, 8, - 81, 87, - 81, 89, - 81, 90, - 81, 91, - 83, 3, - 83, 8, - 83, 13, - 83, 15, - 83, 66, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 72, - 83, 80, - 83, 82, - 83, 85, - 83, 87, - 83, 88, - 83, 90, - 85, 80, - 87, 3, - 87, 8, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 71, - 87, 72, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 89, 68, - 89, 69, - 89, 70, - 89, 72, - 89, 80, - 89, 82, - 90, 3, - 90, 8, - 90, 13, - 90, 15, - 90, 66, - 90, 68, - 90, 69, - 90, 70, - 90, 71, - 90, 72, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 72, - 91, 80, - 91, 82, - 92, 43, - 92, 54 + 0, 1, 0, 2, 0, 0, 0, 0, + 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 7, 8, 9, 10, 11, + 0, 12, 12, 13, 14, 15, 12, 12, + 9, 16, 17, 18, 0, 19, 13, 20, + 21, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 27, 28, 0, 29, 30, + 0, 31, 0, 0, 32, 0, 31, 31, + 33, 27, 0, 34, 0, 35, 0, 36, + 37, 38, 36, 39, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = { - -5, -13, -13, -15, -6, -7, -7, -7, - -7, -2, -2, -8, -2, -7, -10, 1, - -13, -13, -15, -6, -7, -7, -7, -7, - -2, -2, -8, -2, -7, -10, 1, 3, - 2, 3, -21, -21, -21, -21, -28, -15, - -15, -8, -1, -1, -1, -1, -16, -2, - -11, -9, -12, -1, -2, -1, -6, -4, - -6, 2, -3, -3, -7, -3, -4, -1, - -2, -13, -13, -3, -3, -3, -3, -5, - -3, 3, -2, -2, -2, -2, -2, -2, - -2, -2, -3, -3, -3, -29, -29, -21, - -33, 3, -4, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -3, 2, -4, 2, - -3, 2, -4, 2, -3, -3, -8, -4, - -4, -4, -4, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -3, -5, -8, -5, - -42, -42, 2, -8, -8, -8, -8, -34, - -7, -22, -18, -30, -5, -17, -11, -17, - 2, -4, 2, -3, 2, -4, 2, -3, - -13, -13, -3, -3, -3, -3, -5, -3, - -40, -40, -17, -25, -4, -3, -1, -2, - -2, -2, -2, -2, -2, 2, 2, 2, - -5, -3, -2, -4, -10, -2, -6, -5, - -27, -29, -27, -10, -3, -3, -30, -3, - -3, -2, 2, 2, 2, 2, -14, -12, - -12, -12, -12, -14, -14, -12, -14, -12, - -9, -14, -12, -9, -7, -10, -9, -7, - -3, 3, -28, -5, -28, -9, -2, -2, - -2, -2, 2, -6, -5, -5, -5, -5, - -6, -5, -4, -3, -1, -1, 2, 2, - -15, -7, -15, -5, 2, 2, -4, -4, - -4, -4, -4, -4, -4, -3, -2, 2, - -6, -3, -3, -3, -3, 2, -3, -3, - -3, -3, -3, -3, -3, -4, -4, -4, - 3, -6, -26, -6, -26, -12, -4, -4, - -12, -4, -4, -2, 2, -12, 2, 2, - 2, 2, 2, -9, -8, -8, -8, -3, - -8, -5, -5, -8, -5, -8, -5, -7, - -3, -5, -2, -3, -2, -4, 2, 2, - -3, -3, -3, -3, -3, -3, -3, -3, - -3, -3, -2, -3, -3, -3, -2, -2, - -8, -8, -2, -2, -4, -4, -1, -2, - -1, -2, -1, -1, -2, -2, -2, -2, - 2, 2, 3, 2, -3, -3, -3, -3, - -3, 2, -13, -13, -2, -2, -2, -2, - -2, -13, -13, -13, -13, -17, -17, -2, - -3, -2, -2, -4, -4, -1, -2, -1, - -2, 2, 2, -15, -15, -5, -2, -2, - -2, 2, -2, -2, -2, 6, 2, 2, - 2, -2, 2, 2, -13, -13, -2, -2, - -2, -2, 2, -2, -2, -2, -15, -15, - -2, -2, -2, -2, -2, -2, 2, 2, - -13, -13, -2, -2, -2, -2, 2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2 + 0, 1, 0, 2, 0, 0, 0, 3, + 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 10, 0, 11, 0, 0, 0, + 11, 0, 0, 12, 0, 0, 0, 0, + 11, 0, 11, 0, 13, 14, 15, 16, + 17, 18, 19, 20, 0, 0, 21, 0, + 0, 0, 22, 0, 23, 23, 23, 24, + 23, 0, 0, 0, 0, 0, 25, 25, + 26, 25, 23, 27, 28, 29, 30, 31, + 32, 33, 31, 34, 0, 0, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = +/*Kern values between classes*/ +static uint8_t kern_class_values[] = { - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 434, - .glyph_ids_size = 0 + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -13, 0, 0, 0, + 0, 0, 0, 0, -15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -6, -7, 0, -2, -8, 0, -10, 0, + 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 2, 0, + 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -21, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -15, 0, 0, 0, 0, 0, 0, -8, + 0, -1, 0, 0, -16, -2, -11, -9, + 0, -12, 0, 0, 0, 0, 0, 0, + -1, 0, 0, -2, -1, -6, -4, 0, + 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -3, + 0, -3, 0, 0, -7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -4, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -2, + 0, 0, 0, 0, 0, -13, 0, 0, + 0, -3, 0, 0, 0, -3, 0, -3, + 0, -3, -5, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, + 0, -2, -2, 0, -2, 0, 0, 0, + -2, -3, -3, 0, 0, 0, 0, 0, + 0, 0, 0, -29, 0, 0, 0, -21, + 0, -33, 0, 3, 0, 0, 0, 0, + 0, 0, 0, -4, -3, 0, 0, -3, + -3, 0, 0, -3, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 0, 0, 0, -4, 0, + 0, 0, 2, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -8, 0, 0, + 0, -4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -3, 0, -3, + -3, 0, 0, 0, -3, -5, -8, 0, + 0, 0, 0, -42, 0, 0, 0, 0, + 0, 0, 0, 2, -8, 0, 0, -34, + -7, -22, -18, 0, -30, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -5, + -17, -11, 0, 0, 0, 0, 0, 0, + 0, 0, -40, 0, 0, 0, -17, 0, + -25, 0, 0, 0, 0, 0, -4, 0, + -3, 0, -1, -2, 0, 0, -2, 0, + 0, 2, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -5, 0, -3, + -2, 0, -4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -10, 0, -2, 0, 0, -6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -5, 0, + 0, 0, 0, -27, -29, 0, 0, -10, + -3, -30, -2, 2, 0, 2, 2, 0, + 2, 0, 0, -14, -12, 0, -14, -12, + -9, -14, 0, -12, -9, -7, -10, -7, + 0, 0, 0, 0, 3, 0, -28, -5, + 0, 0, -9, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, -6, -5, + 0, 0, -6, -4, 0, 0, -3, -1, + 0, 0, 0, 2, 0, 0, 0, 2, + 0, -15, -7, 0, 0, -5, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 2, -4, -4, 0, 0, -4, -3, 0, + 0, -2, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, -6, 0, 0, + 0, -3, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, -3, 0, 0, + -3, 0, 0, 0, -3, -4, 0, 0, + 0, 0, 0, 0, -4, 3, -6, -26, + -6, 0, 0, -12, -4, -12, -2, 2, + -12, 2, 2, 2, 2, 0, 2, -9, + -8, -3, -5, -8, -5, -7, -3, -5, + -2, 0, -3, -4, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, -3, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -3, 0, 0, -3, 0, + 0, 0, -2, -3, -3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -2, 0, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -8, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2,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, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -2, -2, + 2, 0, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -2, 0, 0, + -2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -2, 0, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -2, 0, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 40, + .right_class_cnt = 35, }; /*-------------------- @@ -2211,8 +1941,8 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 4, .kern_scale = 16, - .kern_dsc = &kern_pairs, - .kern_classes = 0 + .kern_dsc = &kern_classes, + .kern_classes = 1 }; diff --git a/src/lv_font/lv_font_roboto_22.c b/src/lv_font/lv_font_roboto_22.c index 09e5bb5f2790..614bbfead3d1 100644 --- a/src/lv_font/lv_font_roboto_22.c +++ b/src/lv_font/lv_font_roboto_22.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 22 px * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 22 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_22.c + * Opts: --no-compress --no-prefilter --bpp 4 --size 22 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_22.c --force-fast-kern-format ******************************************************************************/ #ifndef LV_FONT_ROBOTO_22 @@ -2600,513 +2600,243 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = *----------------*/ -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = { - 1, 53, - 3, 3, - 3, 8, - 3, 34, - 3, 66, - 3, 68, - 3, 69, - 3, 70, - 3, 72, - 3, 78, - 3, 79, - 3, 80, - 3, 81, - 3, 82, - 3, 84, - 3, 88, - 8, 3, - 8, 8, - 8, 34, - 8, 66, - 8, 68, - 8, 69, - 8, 70, - 8, 72, - 8, 78, - 8, 79, - 8, 80, - 8, 81, - 8, 82, - 8, 84, - 8, 88, - 9, 55, - 9, 56, - 9, 58, - 13, 3, - 13, 8, - 15, 3, - 15, 8, - 16, 16, - 34, 3, - 34, 8, - 34, 32, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 80, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 90, - 34, 91, - 35, 53, - 35, 55, - 35, 58, - 36, 10, - 36, 53, - 36, 62, - 36, 94, - 37, 13, - 37, 15, - 37, 34, - 37, 53, - 37, 55, - 37, 57, - 37, 58, - 37, 59, - 38, 53, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 80, - 38, 82, - 38, 86, - 38, 87, - 38, 88, - 38, 90, - 39, 13, - 39, 15, - 39, 34, - 39, 43, - 39, 53, - 39, 66, - 39, 68, - 39, 69, - 39, 70, - 39, 72, - 39, 80, - 39, 82, - 39, 83, - 39, 86, - 39, 87, - 39, 90, - 41, 34, - 41, 53, - 41, 57, - 41, 58, - 42, 34, - 42, 53, - 42, 57, - 42, 58, - 43, 34, - 44, 14, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 68, - 44, 69, - 44, 70, - 44, 72, - 44, 78, - 44, 79, - 44, 80, - 44, 81, - 44, 82, - 44, 86, - 44, 87, - 44, 88, - 44, 90, - 45, 3, - 45, 8, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 86, - 45, 87, - 45, 88, - 45, 90, - 46, 34, - 46, 53, - 46, 57, - 46, 58, - 47, 34, - 47, 53, - 47, 57, - 47, 58, - 48, 13, - 48, 15, - 48, 34, - 48, 53, - 48, 55, - 48, 57, - 48, 58, - 48, 59, - 49, 13, - 49, 15, - 49, 34, - 49, 43, - 49, 57, - 49, 59, - 49, 66, - 49, 68, - 49, 69, - 49, 70, - 49, 72, - 49, 80, - 49, 82, - 49, 85, - 49, 87, - 49, 90, - 50, 53, - 50, 55, - 50, 56, - 50, 58, - 51, 53, - 51, 55, - 51, 58, - 53, 1, - 53, 13, - 53, 14, - 53, 15, - 53, 34, - 53, 36, - 53, 40, - 53, 43, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 58, - 53, 66, - 53, 68, - 53, 69, - 53, 70, - 53, 72, - 53, 78, - 53, 79, - 53, 80, - 53, 81, - 53, 82, - 53, 83, - 53, 84, - 53, 86, - 53, 87, - 53, 88, - 53, 89, - 53, 90, - 53, 91, - 54, 34, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 68, - 55, 69, - 55, 70, - 55, 72, - 55, 80, - 55, 82, - 55, 83, - 55, 86, - 55, 87, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 34, - 56, 53, - 56, 62, - 56, 66, - 56, 68, - 56, 69, - 56, 70, - 56, 72, - 56, 80, - 56, 82, - 56, 83, - 56, 86, - 56, 94, - 57, 14, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 55, - 57, 68, - 57, 69, - 57, 70, - 57, 72, - 57, 80, - 57, 82, - 57, 86, - 57, 87, - 57, 90, - 58, 7, - 58, 10, - 58, 11, - 58, 13, - 58, 14, - 58, 15, - 58, 34, - 58, 36, - 58, 40, - 58, 43, - 58, 48, - 58, 50, - 58, 52, - 58, 53, - 58, 54, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 68, - 58, 69, - 58, 70, - 58, 71, - 58, 72, - 58, 78, - 58, 79, - 58, 80, - 58, 81, - 58, 82, - 58, 83, - 58, 84, - 58, 85, - 58, 86, - 58, 87, - 58, 89, - 58, 90, - 58, 91, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 68, - 59, 69, - 59, 70, - 59, 72, - 59, 80, - 59, 82, - 59, 86, - 59, 87, - 59, 88, - 59, 90, - 60, 43, - 60, 54, - 66, 3, - 66, 8, - 66, 87, - 66, 90, - 67, 3, - 67, 8, - 67, 87, - 67, 89, - 67, 90, - 67, 91, - 68, 3, - 68, 8, - 70, 3, - 70, 8, - 70, 87, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 68, - 71, 69, - 71, 70, - 71, 72, - 71, 82, - 71, 94, - 73, 3, - 73, 8, - 76, 68, - 76, 69, - 76, 70, - 76, 72, - 76, 82, - 78, 3, - 78, 8, - 79, 3, - 79, 8, - 80, 3, - 80, 8, - 80, 87, - 80, 89, - 80, 90, - 80, 91, - 81, 3, - 81, 8, - 81, 87, - 81, 89, - 81, 90, - 81, 91, - 83, 3, - 83, 8, - 83, 13, - 83, 15, - 83, 66, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 72, - 83, 80, - 83, 82, - 83, 85, - 83, 87, - 83, 88, - 83, 90, - 85, 80, - 87, 3, - 87, 8, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 71, - 87, 72, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 89, 68, - 89, 69, - 89, 70, - 89, 72, - 89, 80, - 89, 82, - 90, 3, - 90, 8, - 90, 13, - 90, 15, - 90, 66, - 90, 68, - 90, 69, - 90, 70, - 90, 71, - 90, 72, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 72, - 91, 80, - 91, 82, - 92, 43, - 92, 54 + 0, 1, 0, 2, 0, 0, 0, 0, + 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 7, 8, 9, 10, 11, + 0, 12, 12, 13, 14, 15, 12, 12, + 9, 16, 17, 18, 0, 19, 13, 20, + 21, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 27, 28, 0, 29, 30, + 0, 31, 0, 0, 32, 0, 31, 31, + 33, 27, 0, 34, 0, 35, 0, 36, + 37, 38, 36, 39, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = { - -7, -18, -18, -21, -9, -10, -10, -10, - -10, -3, -3, -10, -3, -10, -14, 2, - -18, -18, -21, -9, -10, -10, -10, -10, - -3, -3, -10, -3, -10, -14, 2, 3, - 3, 4, -29, -29, -29, -29, -38, -21, - -21, -10, -2, -2, -2, -2, -22, -3, - -15, -12, -16, -2, -3, -2, -9, -6, - -9, 2, -5, -4, -9, -4, -5, -2, - -3, -18, -18, -4, -5, -4, -4, -7, - -4, 3, -3, -3, -3, -3, -3, -3, - -3, -3, -4, -4, -4, -40, -40, -29, - -45, 3, -6, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, 3, -5, 3, - -5, 3, -5, 3, -5, -4, -11, -5, - -5, -5, -5, -4, -4, -4, -4, -4, - -4, -5, -4, -4, -4, -7, -11, -7, - -58, -58, 3, -11, -11, -11, -11, -47, - -9, -30, -25, -41, -8, -23, -16, -23, - 3, -5, 3, -5, 3, -5, 3, -5, - -18, -18, -4, -5, -4, -4, -7, -4, - -56, -56, -24, -34, -5, -4, -2, -2, - -2, -2, -2, -2, -2, 2, 3, 3, - -7, -5, -3, -6, -14, -3, -8, -7, - -37, -40, -37, -14, -5, -5, -41, -5, - -5, -3, 3, 3, 3, 3, -19, -17, - -17, -17, -17, -19, -19, -17, -19, -17, - -13, -20, -16, -12, -10, -13, -12, -10, - -4, 3, -39, -6, -39, -13, -2, -2, - -2, -2, 3, -8, -8, -8, -8, -8, - -8, -8, -5, -5, -2, -2, 3, 3, - -21, -10, -21, -7, 2, 2, -6, -5, - -5, -5, -5, -5, -5, -4, -3, 2, - -8, -4, -4, -4, -4, 2, -4, -4, - -4, -4, -4, -4, -4, -5, -5, -5, - 3, -8, -36, -9, -36, -16, -5, -5, - -16, -5, -5, -3, 3, -16, 3, 3, - 2, 3, 3, -13, -11, -11, -11, -4, - -11, -7, -7, -11, -7, -11, -7, -10, - -4, -7, -3, -4, -3, -5, 3, 2, - -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -3, -5, -5, -5, -3, -3, - -12, -12, -3, -3, -5, -5, -2, -3, - -2, -3, -2, -2, -2, -2, -2, -2, - 3, 3, 3, 3, -4, -4, -4, -4, - -4, 3, -18, -18, -3, -3, -3, -3, - -3, -18, -18, -18, -18, -23, -23, -3, - -4, -3, -3, -5, -5, -2, -3, -2, - -3, 3, 3, -21, -21, -7, -3, -3, - -3, 3, -3, -3, -3, 9, 3, 3, - 3, -3, 3, 3, -18, -18, -3, -2, - -2, -2, 2, -2, -3, -2, -21, -21, - -3, -3, -3, -3, -3, -3, 3, 3, - -18, -18, -3, -2, -2, -2, 2, -2, - -3, -2, -3, -3, -3, -3, -3, -3, - -3, -3 + 0, 1, 0, 2, 0, 0, 0, 3, + 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 10, 0, 11, 0, 0, 0, + 11, 0, 0, 12, 0, 0, 0, 0, + 11, 0, 11, 0, 13, 14, 15, 16, + 17, 18, 19, 20, 0, 0, 21, 0, + 0, 0, 22, 0, 23, 23, 23, 24, + 23, 0, 0, 0, 0, 0, 25, 25, + 26, 25, 23, 27, 28, 29, 30, 31, + 32, 33, 31, 34, 0, 0, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = +/*Kern values between classes*/ +static uint8_t kern_class_values[] = { - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 434, - .glyph_ids_size = 0 + 0, 0, 0, 0, 0, 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 0, 0, 0, + 0, -3, -3, 0, -3, 0, 0, 0, + -3, -4, -4, 0, 0, 0, 0, 0, + 0, 0, 0, -40, 0, 0, 0, -29, + 0, -45, 0, 3, 0, 0, 0, 0, + 0, 0, 0, -6, -4, 0, 0, -4, + -4, 0, 0, -4, -4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 0, 0, 0, -5, 0, + 0, 0, 3, -5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -11, 0, 0, + 0, -5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -4, 0, -4, + -5, 0, 0, 0, -4, -7, -11, 0, + 0, 0, 0, -58, 0, 0, 0, 0, + 0, 0, 0, 3, -11, 0, 0, -47, + -9, -30, -25, 0, -41, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -8, + -23, -16, 0, 0, 0, 0, 0, 0, + 0, 0, -56, 0, 0, 0, -24, 0, + -34, 0, 0, 0, 0, 0, -5, 0, + -4, 0, -2, -2, 0, 0, -2, 0, + 0, 2, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -7, 0, -5, + -3, 0, -6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -14, 0, -3, 0, 0, -8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -7, 0, + 0, 0, 0, -37, -40, 0, 0, -14, + -5, -41, -3, 3, 0, 3, 3, 0, + 3, 0, 0, -19, -17, 0, -19, -17, + -13, -20, 0, -16, -12, -10, -13, -10, + 0, 0, 0, 0, 3, 0, -39, -6, + 0, 0, -13, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, -8, -8, + 0, 0, -8, -5, 0, 0, -5, -2, + 0, 0, 0, 3, 0, 0, 0, 3, + 0, -21, -10, 0, 0, -7, 0, 0, + 0, 2, 0, 0, 0, 0, 0, 0, + 2, -6, -5, 0, 0, -5, -4, 0, + 0, -3, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, -8, 0, 0, + 0, -4, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, -4, 0, 0, + -4, 0, 0, 0, -4, -5, 0, 0, + 0, 0, 0, 0, -5, 3, -8, -36, + -9, 0, 0, -16, -5, -16, -3, 3, + -16, 3, 3, 2, 3, 0, 3, -13, + -11, -4, -7, -11, -7, -10, -4, -7, + -3, 0, -4, -5, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, -4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -4, 0, 0, -4, 0, + 0, 0, -3, -5, -5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -3, 0, 0, -3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -12, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -3, 0, 0, 0, 0, 0, -5, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -2, 0, -3, -3, + 0, 0, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -2, 0, 0, + 0, 0, 0, 0, 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 0, -3, 0, 0, + -3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -3, 0, 0, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -3, 0, 0, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 40, + .right_class_cnt = 35, }; /*-------------------- @@ -3122,8 +2852,8 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 4, .kern_scale = 16, - .kern_dsc = &kern_pairs, - .kern_classes = 0 + .kern_dsc = &kern_classes, + .kern_classes = 1 }; diff --git a/src/lv_font/lv_font_roboto_28.c b/src/lv_font/lv_font_roboto_28.c index 2cd21f6a7613..55edad88ac87 100644 --- a/src/lv_font/lv_font_roboto_28.c +++ b/src/lv_font/lv_font_roboto_28.c @@ -3,7 +3,7 @@ /******************************************************************************* * Size: 28 px * Bpp: 4 - * Opts: --no-compress --no-prefilter --bpp 4 --size 28 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_28.c + * Opts: --no-compress --no-prefilter --bpp 4 --size 28 --font ./Roboto-Regular.woff -r 0x20-0x7F --font FontAwesome.ttf -r 61441,61448,61451,61452,61453,61457,61459,61460,61461,61465,61468,61473,61478,61479,61480,61502,61504,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61671,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62099 --format lvgl -o lv_font_roboto_28.c --force-fast-kern-format ******************************************************************************/ #ifndef LV_FONT_ROBOTO_28 @@ -3750,513 +3750,243 @@ static const lv_font_fmt_txt_cmap_t cmaps[] = *----------------*/ -/*Pair left and right glyphs for kerning*/ -static const uint8_t kern_pair_glyph_ids[] = +/*Map glyph_ids to kern left classes*/ +static uint8_t kern_left_class_mapping[] = { - 1, 53, - 3, 3, - 3, 8, - 3, 34, - 3, 66, - 3, 68, - 3, 69, - 3, 70, - 3, 72, - 3, 78, - 3, 79, - 3, 80, - 3, 81, - 3, 82, - 3, 84, - 3, 88, - 8, 3, - 8, 8, - 8, 34, - 8, 66, - 8, 68, - 8, 69, - 8, 70, - 8, 72, - 8, 78, - 8, 79, - 8, 80, - 8, 81, - 8, 82, - 8, 84, - 8, 88, - 9, 55, - 9, 56, - 9, 58, - 13, 3, - 13, 8, - 15, 3, - 15, 8, - 16, 16, - 34, 3, - 34, 8, - 34, 32, - 34, 36, - 34, 40, - 34, 48, - 34, 50, - 34, 53, - 34, 54, - 34, 55, - 34, 56, - 34, 58, - 34, 80, - 34, 85, - 34, 86, - 34, 87, - 34, 88, - 34, 90, - 34, 91, - 35, 53, - 35, 55, - 35, 58, - 36, 10, - 36, 53, - 36, 62, - 36, 94, - 37, 13, - 37, 15, - 37, 34, - 37, 53, - 37, 55, - 37, 57, - 37, 58, - 37, 59, - 38, 53, - 38, 68, - 38, 69, - 38, 70, - 38, 71, - 38, 72, - 38, 80, - 38, 82, - 38, 86, - 38, 87, - 38, 88, - 38, 90, - 39, 13, - 39, 15, - 39, 34, - 39, 43, - 39, 53, - 39, 66, - 39, 68, - 39, 69, - 39, 70, - 39, 72, - 39, 80, - 39, 82, - 39, 83, - 39, 86, - 39, 87, - 39, 90, - 41, 34, - 41, 53, - 41, 57, - 41, 58, - 42, 34, - 42, 53, - 42, 57, - 42, 58, - 43, 34, - 44, 14, - 44, 36, - 44, 40, - 44, 48, - 44, 50, - 44, 68, - 44, 69, - 44, 70, - 44, 72, - 44, 78, - 44, 79, - 44, 80, - 44, 81, - 44, 82, - 44, 86, - 44, 87, - 44, 88, - 44, 90, - 45, 3, - 45, 8, - 45, 34, - 45, 36, - 45, 40, - 45, 48, - 45, 50, - 45, 53, - 45, 54, - 45, 55, - 45, 56, - 45, 58, - 45, 86, - 45, 87, - 45, 88, - 45, 90, - 46, 34, - 46, 53, - 46, 57, - 46, 58, - 47, 34, - 47, 53, - 47, 57, - 47, 58, - 48, 13, - 48, 15, - 48, 34, - 48, 53, - 48, 55, - 48, 57, - 48, 58, - 48, 59, - 49, 13, - 49, 15, - 49, 34, - 49, 43, - 49, 57, - 49, 59, - 49, 66, - 49, 68, - 49, 69, - 49, 70, - 49, 72, - 49, 80, - 49, 82, - 49, 85, - 49, 87, - 49, 90, - 50, 53, - 50, 55, - 50, 56, - 50, 58, - 51, 53, - 51, 55, - 51, 58, - 53, 1, - 53, 13, - 53, 14, - 53, 15, - 53, 34, - 53, 36, - 53, 40, - 53, 43, - 53, 48, - 53, 50, - 53, 52, - 53, 53, - 53, 55, - 53, 56, - 53, 58, - 53, 66, - 53, 68, - 53, 69, - 53, 70, - 53, 72, - 53, 78, - 53, 79, - 53, 80, - 53, 81, - 53, 82, - 53, 83, - 53, 84, - 53, 86, - 53, 87, - 53, 88, - 53, 89, - 53, 90, - 53, 91, - 54, 34, - 55, 10, - 55, 13, - 55, 14, - 55, 15, - 55, 34, - 55, 36, - 55, 40, - 55, 48, - 55, 50, - 55, 62, - 55, 66, - 55, 68, - 55, 69, - 55, 70, - 55, 72, - 55, 80, - 55, 82, - 55, 83, - 55, 86, - 55, 87, - 55, 90, - 55, 94, - 56, 10, - 56, 13, - 56, 14, - 56, 15, - 56, 34, - 56, 53, - 56, 62, - 56, 66, - 56, 68, - 56, 69, - 56, 70, - 56, 72, - 56, 80, - 56, 82, - 56, 83, - 56, 86, - 56, 94, - 57, 14, - 57, 36, - 57, 40, - 57, 48, - 57, 50, - 57, 55, - 57, 68, - 57, 69, - 57, 70, - 57, 72, - 57, 80, - 57, 82, - 57, 86, - 57, 87, - 57, 90, - 58, 7, - 58, 10, - 58, 11, - 58, 13, - 58, 14, - 58, 15, - 58, 34, - 58, 36, - 58, 40, - 58, 43, - 58, 48, - 58, 50, - 58, 52, - 58, 53, - 58, 54, - 58, 55, - 58, 56, - 58, 57, - 58, 58, - 58, 62, - 58, 66, - 58, 68, - 58, 69, - 58, 70, - 58, 71, - 58, 72, - 58, 78, - 58, 79, - 58, 80, - 58, 81, - 58, 82, - 58, 83, - 58, 84, - 58, 85, - 58, 86, - 58, 87, - 58, 89, - 58, 90, - 58, 91, - 58, 94, - 59, 34, - 59, 36, - 59, 40, - 59, 48, - 59, 50, - 59, 68, - 59, 69, - 59, 70, - 59, 72, - 59, 80, - 59, 82, - 59, 86, - 59, 87, - 59, 88, - 59, 90, - 60, 43, - 60, 54, - 66, 3, - 66, 8, - 66, 87, - 66, 90, - 67, 3, - 67, 8, - 67, 87, - 67, 89, - 67, 90, - 67, 91, - 68, 3, - 68, 8, - 70, 3, - 70, 8, - 70, 87, - 70, 90, - 71, 3, - 71, 8, - 71, 10, - 71, 62, - 71, 68, - 71, 69, - 71, 70, - 71, 72, - 71, 82, - 71, 94, - 73, 3, - 73, 8, - 76, 68, - 76, 69, - 76, 70, - 76, 72, - 76, 82, - 78, 3, - 78, 8, - 79, 3, - 79, 8, - 80, 3, - 80, 8, - 80, 87, - 80, 89, - 80, 90, - 80, 91, - 81, 3, - 81, 8, - 81, 87, - 81, 89, - 81, 90, - 81, 91, - 83, 3, - 83, 8, - 83, 13, - 83, 15, - 83, 66, - 83, 68, - 83, 69, - 83, 70, - 83, 71, - 83, 72, - 83, 80, - 83, 82, - 83, 85, - 83, 87, - 83, 88, - 83, 90, - 85, 80, - 87, 3, - 87, 8, - 87, 13, - 87, 15, - 87, 66, - 87, 68, - 87, 69, - 87, 70, - 87, 71, - 87, 72, - 87, 80, - 87, 82, - 88, 13, - 88, 15, - 89, 68, - 89, 69, - 89, 70, - 89, 72, - 89, 80, - 89, 82, - 90, 3, - 90, 8, - 90, 13, - 90, 15, - 90, 66, - 90, 68, - 90, 69, - 90, 70, - 90, 71, - 90, 72, - 90, 80, - 90, 82, - 91, 68, - 91, 69, - 91, 70, - 91, 72, - 91, 80, - 91, 82, - 92, 43, - 92, 54 + 0, 1, 0, 2, 0, 0, 0, 0, + 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 6, 7, 8, 9, 10, 11, + 0, 12, 12, 13, 14, 15, 12, 12, + 9, 16, 17, 18, 0, 19, 13, 20, + 21, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 27, 28, 0, 29, 30, + 0, 31, 0, 0, 32, 0, 31, 31, + 33, 27, 0, 34, 0, 35, 0, 36, + 37, 38, 36, 39, 40, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/* Kerning between the respective left and right glyphs - * 4.4 format which needs to scaled with `kern_scale`*/ -static int8_t kern_pair_values[] = +/*Map glyph_ids to kern right classes*/ +static uint8_t kern_right_class_mapping[] = { - -9, -23, -23, -26, -11, -13, -13, -13, - -13, -4, -4, -13, -4, -13, -17, 2, - -23, -23, -26, -11, -13, -13, -13, -13, - -4, -4, -13, -4, -13, -17, 2, 4, - 4, 5, -37, -37, -37, -37, -49, -26, - -26, -13, -2, -2, -2, -2, -28, -4, - -19, -15, -21, -3, -4, -2, -11, -7, - -11, 3, -6, -5, -12, -6, -6, -3, - -4, -22, -22, -5, -6, -5, -5, -9, - -5, 4, -4, -4, -4, -4, -4, -4, - -4, -4, -6, -5, -6, -51, -51, -37, - -58, 4, -7, -5, -5, -5, -5, -5, - -5, -6, -5, -5, -5, 4, -6, 4, - -6, 4, -6, 4, -6, -5, -14, -7, - -7, -7, -7, -6, -6, -6, -6, -5, - -5, -6, -5, -6, -5, -9, -14, -9, - -73, -73, 4, -14, -14, -14, -14, -60, - -12, -38, -31, -52, -10, -29, -20, -29, - 4, -6, 4, -6, 4, -6, 4, -6, - -22, -22, -5, -6, -5, -5, -9, -5, - -71, -71, -30, -44, -7, -6, -2, -3, - -3, -3, -3, -3, -3, 3, 3, 3, - -9, -6, -4, -8, -17, -4, -10, -9, - -48, -51, -48, -17, -6, -6, -52, -6, - -6, -3, 4, 4, 3, 4, -25, -22, - -22, -22, -22, -24, -24, -22, -24, -22, - -16, -25, -21, -16, -12, -17, -16, -13, - -5, 4, -49, -8, -49, -16, -3, -3, - -3, -3, 4, -10, -10, -10, -10, -10, - -10, -10, -7, -6, -2, -2, 4, 3, - -27, -13, -27, -9, 3, 3, -7, -7, - -7, -7, -7, -7, -7, -5, -4, 3, - -10, -5, -5, -5, -5, 3, -6, -6, - -6, -6, -5, -6, -5, -7, -7, -7, - 4, -11, -46, -11, -46, -21, -6, -6, - -21, -6, -6, -3, 4, -21, 4, 4, - 3, 4, 4, -16, -14, -14, -14, -5, - -14, -9, -9, -14, -9, -14, -9, -13, - -5, -9, -4, -5, -4, -7, 4, 3, - -6, -6, -6, -6, -5, -5, -5, -5, - -5, -5, -4, -6, -6, -6, -4, -4, - -15, -15, -3, -3, -6, -6, -2, -3, - -2, -3, -2, -2, -3, -3, -3, -3, - 4, 4, 4, 4, -5, -5, -5, -5, - -5, 4, -23, -23, -4, -4, -4, -4, - -4, -23, -23, -23, -23, -30, -30, -3, - -5, -3, -3, -6, -6, -2, -3, -2, - -3, 4, 4, -27, -27, -9, -4, -4, - -4, 3, -4, -4, -4, 11, 4, 4, - 4, -4, 3, 3, -23, -23, -3, -3, - -3, -3, 3, -3, -3, -3, -27, -27, - -4, -4, -4, -4, -4, -4, 3, 3, - -23, -23, -3, -3, -3, -3, 3, -3, - -3, -3, -3, -3, -3, -3, -3, -3, - -4, -4 + 0, 1, 0, 2, 0, 0, 0, 3, + 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 10, 0, 11, 0, 0, 0, + 11, 0, 0, 12, 0, 0, 0, 0, + 11, 0, 11, 0, 13, 14, 15, 16, + 17, 18, 19, 20, 0, 0, 21, 0, + 0, 0, 22, 0, 23, 23, 23, 24, + 23, 0, 0, 0, 0, 0, 25, 25, + 26, 25, 23, 27, 28, 29, 30, 31, + 32, 33, 31, 34, 0, 0, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0 }; -/*Collect the kern pair's data in one place*/ -static lv_font_fmt_txt_kern_pair_t kern_pairs = +/*Kern values between classes*/ +static uint8_t kern_class_values[] = { - .glyph_ids = kern_pair_glyph_ids, - .values = kern_pair_values, - .pair_cnt = 434, - .glyph_ids_size = 0 + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -23, 0, 0, 0, + 0, 0, 0, 0, -26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -11, -13, 0, -4, -13, 0, -17, 0, + 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 4, 0,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, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -5, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -14, 0, 0, + 0, -7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -6, 0, -5, + -6, 0, 0, 0, -5, -9, -14, 0, + 0, 0, 0, -73, 0, 0, 0, 0, + 0, 0, 0, 4, -14, 0, 0, -60, + -12, -38, -31, 0, -52, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -10, + -29, -20, 0, 0, 0, 0, 0, 0, + 0, 0, -71, 0, 0, 0, -30, 0, + -44, 0, 0, 0, 0, 0, -7, 0, + -6, 0, -2, -3, 0, 0, -3, 0, + 0, 3, 0, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -9, 0, -6, + -4, 0, -8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + -17, 0, -4, 0, 0, -10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -9, 0, + 0, 0, 0, -48, -51, 0, 0, -17, + -6, -52, -3, 4, 0, 4, 3, 0, + 4, 0, 0, -25, -22, 0, -24, -22, + -16, -25, 0, -21, -16, -12, -17, -13, + 0, 0, 0, 0, 4, 0, -49, -8, + 0, 0, -16, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, -10, -10, + 0, 0, -10, -7, 0, 0, -6, -2, + 0, 0, 0, 4, 0, 0, 0, 3, + 0, -27, -13, 0, 0, -9, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, + 3, -7, -7, 0, 0, -7, -5, 0, + 0, -4, 0, 0, 0, 0, 3, 0, + 0, 0, 0, 0, 0, -10, 0, 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, 0 +}; + + +/*Collect the kern class' data in one place*/ +static lv_font_fmt_txt_kern_classes_t kern_classes = +{ + .class_pair_values = kern_class_values, + .left_class_mapping = kern_left_class_mapping, + .right_class_mapping = kern_right_class_mapping, + .left_class_cnt = 40, + .right_class_cnt = 35, }; /*-------------------- @@ -4272,8 +4002,8 @@ static lv_font_fmt_txt_dsc_t font_dsc = { .bpp = 4, .kern_scale = 16, - .kern_dsc = &kern_pairs, - .kern_classes = 0 + .kern_dsc = &kern_classes, + .kern_classes = 1 }; diff --git a/src/lv_misc/lv_txt.c b/src/lv_misc/lv_txt.c index d8fc24e4f5eb..0fdbf22bccca 100644 --- a/src/lv_misc/lv_txt.c +++ b/src/lv_misc/lv_txt.c @@ -14,21 +14,6 @@ *********************/ #define NO_BREAK_FOUND UINT32_MAX -/* If a character is at least this long, will break wherever "prettiest" */ -#ifndef LV_TXT_LINE_BREAK_LONG_LEN -#define LV_TXT_LINE_BREAK_LONG_LEN 12 -#endif - -/* Minimum number of characters of a word to put on a line before a break */ -#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 -#endif - -/* Minimum number of characters of a word to put on a line after a break */ -#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN -#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 -#endif - /********************** * TYPEDEFS **********************/ From 622c5deada8d5076f9de869c537b8acd7f9ea843 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 16 Jun 2019 07:51:36 +0200 Subject: [PATCH 522/590] minor fixes --- src/lv_core/lv_indev.c | 18 ++++++++++++++++-- src/lv_font/lv_symbol_def.h | 3 --- src/lv_objx/lv_page.c | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lv_core/lv_indev.c b/src/lv_core/lv_indev.c index 398de855bd73..0f2381144d3d 100644 --- a/src/lv_core/lv_indev.c +++ b/src/lv_core/lv_indev.c @@ -858,7 +858,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) if(indev_reset_check(proc)) return; } /* The simple case: `act_obj` was not protected against press lost. - * If it is already not pressed then was `indev_proc_press` would set `act_obj = NULL`*/ + * If it is already not pressed then `indev_proc_press` would set `indev_obj_act = NULL`*/ else { indev_obj_act->signal_cb(indev_obj_act, LV_SIGNAL_RELEASED, indev_act); if(indev_reset_check(proc)) return; @@ -922,6 +922,21 @@ static void indev_proc_release(lv_indev_proc_t * proc) } if(indev_reset_check(proc)) return; + + /*Send LV_EVENT_DRAG_THROW_BEGIN if required */ + /*If drag parent is active check recursively the drag_parent attribute*/ + lv_obj_t * drag_obj = indev_obj_act; + while(lv_obj_get_drag_parent(drag_obj) != false && drag_obj != NULL) { + drag_obj = lv_obj_get_parent(drag_obj); + } + + if(drag_obj) { + if(lv_obj_get_drag_throw(drag_obj) && proc->types.pointer.drag_in_prog) { + lv_event_send(drag_obj, LV_EVENT_DRAG_THROW_BEGIN, NULL); + if(indev_reset_check(proc)) return; + } + } + proc->types.pointer.act_obj = NULL; proc->pr_timestamp = 0; proc->longpr_rep_timestamp = 0; @@ -1125,7 +1140,6 @@ static void indev_drag_throw(lv_indev_proc_t * proc) { if(proc->types.pointer.drag_in_prog == 0) return; - /*Set new position if the vector is not zero*/ lv_obj_t * drag_obj = proc->types.pointer.last_obj; /*If drag parent is active check recursively the drag_parent attribute*/ diff --git a/src/lv_font/lv_symbol_def.h b/src/lv_font/lv_symbol_def.h index ff6f84a0b797..8555f013961e 100644 --- a/src/lv_font/lv_symbol_def.h +++ b/src/lv_font/lv_symbol_def.h @@ -25,9 +25,6 @@ extern "C" { #define LV_SYMBOL_DRIVE "\xef\x80\x9c" #define LV_SYMBOL_REFRESH "\xef\x80\xa1" #define LV_SYMBOL_MUTE "\xef\x80\xa6" - - - #define LV_SYMBOL_VOLUME_MID "\xef\x80\xa7" #define LV_SYMBOL_VOLUME_MAX "\xef\x80\xa8" #define LV_SYMBOL_IMAGE "\xef\x80\xbe" diff --git a/src/lv_objx/lv_page.c b/src/lv_objx/lv_page.c index eb2210f1bfb9..fe3bc11934f5 100644 --- a/src/lv_objx/lv_page.c +++ b/src/lv_objx/lv_page.c @@ -1073,7 +1073,7 @@ static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event) if(event == LV_EVENT_PRESSED || event == LV_EVENT_PRESSING || event == LV_EVENT_PRESS_LOST || event == LV_EVENT_RELEASED || event == LV_EVENT_SHORT_CLICKED || event == LV_EVENT_CLICKED || event == LV_EVENT_LONG_PRESSED || event == LV_EVENT_LONG_PRESSED_REPEAT || event == LV_EVENT_FOCUSED || - event == LV_EVENT_DEFOCUSED) { + event == LV_EVENT_DEFOCUSED || event == LV_EVENT_DRAG_BEGIN || event == LV_EVENT_DRAG_END || event == LV_EVENT_DRAG_THROW_BEGIN) { lv_event_send(page, event, lv_event_get_data()); } /*clang-format on*/ From b8c35308f21d0cdaa7b2a10f7d9cf59581ee9ce2 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 16 Jun 2019 09:16:20 +0200 Subject: [PATCH 523/590] minor fixes --- src/lv_misc/lv_anim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lv_misc/lv_anim.c b/src/lv_misc/lv_anim.c index 88ee70057550..1cf64b7c742d 100644 --- a/src/lv_misc/lv_anim.c +++ b/src/lv_misc/lv_anim.c @@ -73,7 +73,9 @@ void lv_anim_init(lv_anim_t * a) { memset(a, 0, sizeof(lv_anim_t)); a->time = 500; + a->start = 0; a->end = 100; + a->path_cb = lv_anim_path_linear; } /** * Create an animation From 760359fd5a800448a7361f573a0393e591f68f7c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 16 Jun 2019 09:24:10 +0200 Subject: [PATCH 524/590] lv_fs: add 'lv_fs_drv_t * drv' as first paramter to the dirver funnction --- src/lv_core/lv_obj.h | 2 -- src/lv_misc/lv_fs.c | 36 ++++++++++++------------- src/lv_misc/lv_fs.h | 62 +++++++++++++++++++++----------------------- 3 files changed, 48 insertions(+), 52 deletions(-) diff --git a/src/lv_core/lv_obj.h b/src/lv_core/lv_obj.h index a9de823cf18b..9e66d161e69a 100644 --- a/src/lv_core/lv_obj.h +++ b/src/lv_core/lv_obj.h @@ -101,7 +101,6 @@ enum { LV_SIGNAL_REFR_EXT_DRAW_PAD, LV_SIGNAL_GET_TYPE, - _LV_SIGNAL_FEEDBACK_SECTION_START, /*Input device related*/ LV_SIGNAL_PRESSED, LV_SIGNAL_PRESSING, @@ -116,7 +115,6 @@ enum { LV_SIGNAL_FOCUS, LV_SIGNAL_DEFOCUS, LV_SIGNAL_CONTROL, - _LV_SIGNAL_FEEDBACK_SECTION_END, LV_SIGNAL_GET_EDITABLE, }; typedef uint8_t lv_signal_t; diff --git a/src/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c index 252f59a440d7..7a9b2acf65de 100644 --- a/src/lv_misc/lv_fs.c +++ b/src/lv_misc/lv_fs.c @@ -73,7 +73,7 @@ bool lv_fs_is_ready(char letter) if(drv->ready == NULL) return true; /*Assume the driver is always ready if no handler provided*/ - return drv->ready(); + return drv->ready(drv); } /** @@ -100,7 +100,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo } if(file_p->drv->ready != NULL) { - if(file_p->drv->ready() == false) { + if(file_p->drv->ready(file_p->drv) == false) { file_p->drv = NULL; file_p->file_d = NULL; return LV_FS_RES_HW_ERR; @@ -119,7 +119,7 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = file_p->drv->open(file_p->file_d, real_path, mode); + lv_fs_res_t res = file_p->drv->open(file_p->drv, file_p->file_d, real_path, mode); if(res != LV_FS_RES_OK) { lv_mem_free(file_p->file_d); @@ -145,7 +145,7 @@ lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p) return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->close(file_p->file_d); + lv_fs_res_t res = file_p->drv->close(file_p->drv, file_p->file_d); lv_mem_free(file_p->file_d); /*Clean up*/ file_p->file_d = NULL; @@ -170,13 +170,13 @@ lv_fs_res_t lv_fs_remove(const char * path) drv = lv_fs_get_drv(letter); if(drv == NULL) return LV_FS_RES_NOT_EX; if(drv->ready != NULL) { - if(drv->ready() == false) return LV_FS_RES_HW_ERR; + if(drv->ready(drv) == false) return LV_FS_RES_HW_ERR; } if(drv->remove == NULL) return LV_FS_RES_NOT_IMP; const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = drv->remove(real_path); + lv_fs_res_t res = drv->remove(drv, real_path); return res; } @@ -196,7 +196,7 @@ lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t if(file_p->drv->read == NULL) return LV_FS_RES_NOT_IMP; uint32_t br_tmp = 0; - lv_fs_res_t res = file_p->drv->read(file_p->file_d, buf, btr, &br_tmp); + lv_fs_res_t res = file_p->drv->read(file_p->drv, file_p->file_d, buf, btr, &br_tmp); if(br != NULL) *br = br_tmp; return res; @@ -223,7 +223,7 @@ lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, u } uint32_t bw_tmp = 0; - lv_fs_res_t res = file_p->drv->write(file_p->file_d, buf, btw, &bw_tmp); + lv_fs_res_t res = file_p->drv->write(file_p->drv, file_p->file_d, buf, btw, &bw_tmp); if(bw != NULL) *bw = bw_tmp; return res; @@ -245,7 +245,7 @@ lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos) return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->seek(file_p->file_d, pos); + lv_fs_res_t res = file_p->drv->seek(file_p->drv, file_p->file_d, pos); return res; } @@ -268,7 +268,7 @@ lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->tell(file_p->file_d, pos); + lv_fs_res_t res = file_p->drv->tell(file_p->drv, file_p->file_d, pos); return res; } @@ -289,7 +289,7 @@ lv_fs_res_t lv_fs_trunc(lv_fs_file_t * file_p) return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->trunc(file_p->file_d); + lv_fs_res_t res = file_p->drv->trunc(file_p->drv, file_p->file_d); return res; } @@ -309,7 +309,7 @@ lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size) if(size == NULL) return LV_FS_RES_INV_PARAM; - lv_fs_res_t res = file_p->drv->size(file_p->file_d, size); + lv_fs_res_t res = file_p->drv->size(file_p->drv, file_p->file_d, size); return res; } @@ -333,7 +333,7 @@ lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname) } if(drv->ready != NULL) { - if(drv->ready() == false) { + if(drv->ready(drv) == false) { return LV_FS_RES_HW_ERR; } } @@ -342,7 +342,7 @@ lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname) const char * old_real = lv_fs_get_real_path(oldname); const char * new_real = lv_fs_get_real_path(newname); - lv_fs_res_t res = drv->rename(old_real, new_real); + lv_fs_res_t res = drv->rename(drv, old_real, new_real); return res; } @@ -378,7 +378,7 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path) } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = rddir_p->drv->dir_open(rddir_p->dir_d, real_path); + lv_fs_res_t res = rddir_p->drv->dir_open(rddir_p->drv, rddir_p->dir_d, real_path); return res; } @@ -401,7 +401,7 @@ lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn) return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = rddir_p->drv->dir_read(rddir_p->dir_d, fn); + lv_fs_res_t res = rddir_p->drv->dir_read(rddir_p->drv, rddir_p->dir_d, fn); return res; } @@ -422,7 +422,7 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p) if(rddir_p->drv->dir_close == NULL) { res = LV_FS_RES_NOT_IMP; } else { - res = rddir_p->drv->dir_close(rddir_p->dir_d); + res = rddir_p->drv->dir_close(rddir_p->drv, rddir_p->dir_d); } lv_mem_free(rddir_p->dir_d); /*Clean up*/ @@ -455,7 +455,7 @@ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) } else { uint32_t total_tmp = 0; uint32_t free_tmp = 0; - res = drv->free_space(&total_tmp, &free_tmp); + res = drv->free_space(drv, &total_tmp, &free_tmp); if(total_p != NULL) *total_p = total_tmp; if(free_p != NULL) *free_p = free_tmp; diff --git a/src/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h index 8fa7ada685c4..ffc7dffa9c41 100644 --- a/src/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -50,50 +50,48 @@ enum { }; typedef uint8_t lv_fs_res_t; -struct __lv_fs_drv_t; - -typedef struct -{ - void * file_d; - struct __lv_fs_drv_t * drv; -} lv_fs_file_t; - -typedef struct -{ - void * dir_d; - struct __lv_fs_drv_t * drv; -} lv_fs_dir_t; - enum { LV_FS_MODE_WR = 0x01, LV_FS_MODE_RD = 0x02, }; typedef uint8_t lv_fs_mode_t; -typedef struct __lv_fs_drv_t +typedef struct _lv_fs_drv_t { char letter; uint16_t file_size; uint16_t rddir_size; - bool (*ready)(void); - - lv_fs_res_t (*open)(void * file_p, const char * path, lv_fs_mode_t mode); - lv_fs_res_t (*close)(void * file_p); - lv_fs_res_t (*remove)(const char * fn); - lv_fs_res_t (*read)(void * file_p, void * buf, uint32_t btr, uint32_t * br); - lv_fs_res_t (*write)(void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - lv_fs_res_t (*seek)(void * file_p, uint32_t pos); - lv_fs_res_t (*tell)(void * file_p, uint32_t * pos_p); - lv_fs_res_t (*trunc)(void * file_p); - lv_fs_res_t (*size)(void * file_p, uint32_t * size_p); - lv_fs_res_t (*rename)(const char * oldname, const char * newname); - lv_fs_res_t (*free_space)(uint32_t * total_p, uint32_t * free_p); - - lv_fs_res_t (*dir_open)(void * rddir_p, const char * path); - lv_fs_res_t (*dir_read)(void * rddir_p, char * fn); - lv_fs_res_t (*dir_close)(void * rddir_p); + bool (*ready)(struct _lv_fs_drv_t * drv); + + lv_fs_res_t (*open)(struct _lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); + lv_fs_res_t (*close)(struct _lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*remove)(struct _lv_fs_drv_t * drv, const char * fn); + lv_fs_res_t (*read)(struct _lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); + lv_fs_res_t (*write)(struct _lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); + lv_fs_res_t (*seek)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos); + lv_fs_res_t (*tell)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + lv_fs_res_t (*trunc)(struct _lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*size)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * size_p); + lv_fs_res_t (*rename)(struct _lv_fs_drv_t * drv, const char * oldname, const char * newname); + lv_fs_res_t (*free_space)(struct _lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p); + + lv_fs_res_t (*dir_open)(struct _lv_fs_drv_t * drv, void * rddir_p, const char * path); + lv_fs_res_t (*dir_read)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn); + lv_fs_res_t (*dir_close)(struct _lv_fs_drv_t * drv, void * rddir_p); } lv_fs_drv_t; +typedef struct +{ + void * file_d; + lv_fs_drv_t * drv; +} lv_fs_file_t; + +typedef struct +{ + void * dir_d; + lv_fs_drv_t * drv; +} lv_fs_dir_t; + /********************** * GLOBAL PROTOTYPES **********************/ From 51878e65dcb3f0b131fd448bd590f5b8af206029 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 16 Jun 2019 09:48:41 +0200 Subject: [PATCH 525/590] add user data to lv_fs_drv_t --- lv_conf_template.h | 4 ++++ src/lv_conf_checker.h | 3 +++ src/lv_misc/lv_fs.c | 2 +- src/lv_misc/lv_fs.h | 14 +++++++++++++- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lv_conf_template.h b/lv_conf_template.h index 0d341408f5f3..b3935963ad01 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -143,6 +143,10 @@ typedef void * lv_group_user_data_t; /* 1: Enable file system (might be required for images */ #define LV_USE_FILESYSTEM 1 +#if LV_USE_FILESYSTEM +/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/ +typedef void * lv_fs_drv_user_data_t; +#endif /* 1: Enable indexed (palette) images */ #define LV_IMG_CF_INDEXED 1 diff --git a/src/lv_conf_checker.h b/src/lv_conf_checker.h index 627be4c0127b..79ce8b624185 100644 --- a/src/lv_conf_checker.h +++ b/src/lv_conf_checker.h @@ -197,6 +197,9 @@ #ifndef LV_USE_FILESYSTEM #define LV_USE_FILESYSTEM 1 #endif +#if LV_USE_FILESYSTEM +/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/ +#endif /* 1: Enable indexed (palette) images */ #ifndef LV_IMG_CF_INDEXED diff --git a/src/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c index 7a9b2acf65de..3e0084711951 100644 --- a/src/lv_misc/lv_fs.c +++ b/src/lv_misc/lv_fs.c @@ -469,7 +469,7 @@ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) * @param drv_p pointer to an lv_fs_drv_t structure which is inited with the * corresponding function pointers. The data will be copied so the variable can be local. */ -void lv_fs_add_drv(lv_fs_drv_t * drv_p) +void lv_fs_drv_register(lv_fs_drv_t * drv_p) { /*Save the new driver*/ lv_fs_drv_t * new_drv; diff --git a/src/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h index ffc7dffa9c41..9d74df8fe6b8 100644 --- a/src/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -78,6 +78,10 @@ typedef struct _lv_fs_drv_t lv_fs_res_t (*dir_open)(struct _lv_fs_drv_t * drv, void * rddir_p, const char * path); lv_fs_res_t (*dir_read)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn); lv_fs_res_t (*dir_close)(struct _lv_fs_drv_t * drv, void * rddir_p); + +#if LV_USE_USER_DATA + lv_fs_drv_user_data_t user_data; +#endif } lv_fs_drv_t; typedef struct @@ -101,12 +105,20 @@ typedef struct */ void lv_fs_init(void); +/** + * Initialize a file system driver with default values. + * It is used to surly have known values in the fields ant not memory junk. + * After it you can set the fields. + * @param drv pointer to driver variable to initialize + */ +void lv_fs_drv_init(lv_fs_drv_t * drv); + /** * Add a new drive * @param drv_p pointer to an lv_fs_drv_t structure which is inited with the * corresponding function pointers. The data will be copied so the variable can be local. */ -void lv_fs_add_drv(lv_fs_drv_t * drv_p); +void lv_fs_drv_register(lv_fs_drv_t * drv_p); /** * Test if a drive is rady or not. If the `ready` function was not initialized `true` will be From abae15ab7c6d05538fcbc7ee26e4b2178911c59d Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 16 Jun 2019 10:01:26 +0200 Subject: [PATCH 526/590] add '_cb' suffix to callback in lv_fs_drv_t --- src/lv_misc/lv_fs.c | 87 ++++++++++++++++++++++++++------------------- src/lv_misc/lv_fs.h | 34 +++++++++--------- 2 files changed, 67 insertions(+), 54 deletions(-) diff --git a/src/lv_misc/lv_fs.c b/src/lv_misc/lv_fs.c index 3e0084711951..084a03a585d9 100644 --- a/src/lv_misc/lv_fs.c +++ b/src/lv_misc/lv_fs.c @@ -71,9 +71,9 @@ bool lv_fs_is_ready(char letter) if(drv == NULL) return false; /*An unknown driver in not ready*/ - if(drv->ready == NULL) return true; /*Assume the driver is always ready if no handler provided*/ + if(drv->ready_cb == NULL) return true; /*Assume the driver is always ready if no handler provided*/ - return drv->ready(drv); + return drv->ready_cb(drv); } /** @@ -99,8 +99,8 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo return LV_FS_RES_NOT_EX; } - if(file_p->drv->ready != NULL) { - if(file_p->drv->ready(file_p->drv) == false) { + if(file_p->drv->ready_cb != NULL) { + if(file_p->drv->ready_cb(file_p->drv) == false) { file_p->drv = NULL; file_p->file_d = NULL; return LV_FS_RES_HW_ERR; @@ -114,12 +114,12 @@ lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mo return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ } - if(file_p->drv->open == NULL) { + if(file_p->drv->open_cb == NULL) { return LV_FS_RES_NOT_IMP; } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = file_p->drv->open(file_p->drv, file_p->file_d, real_path, mode); + lv_fs_res_t res = file_p->drv->open_cb(file_p->drv, file_p->file_d, real_path, mode); if(res != LV_FS_RES_OK) { lv_mem_free(file_p->file_d); @@ -141,11 +141,11 @@ lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p) return LV_FS_RES_INV_PARAM; } - if(file_p->drv->close == NULL) { + if(file_p->drv->close_cb == NULL) { return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->close(file_p->drv, file_p->file_d); + lv_fs_res_t res = file_p->drv->close_cb(file_p->drv, file_p->file_d); lv_mem_free(file_p->file_d); /*Clean up*/ file_p->file_d = NULL; @@ -169,14 +169,14 @@ lv_fs_res_t lv_fs_remove(const char * path) drv = lv_fs_get_drv(letter); if(drv == NULL) return LV_FS_RES_NOT_EX; - if(drv->ready != NULL) { - if(drv->ready(drv) == false) return LV_FS_RES_HW_ERR; + if(drv->ready_cb != NULL) { + if(drv->ready_cb(drv) == false) return LV_FS_RES_HW_ERR; } - if(drv->remove == NULL) return LV_FS_RES_NOT_IMP; + if(drv->remove_cb == NULL) return LV_FS_RES_NOT_IMP; const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = drv->remove(drv, real_path); + lv_fs_res_t res = drv->remove_cb(drv, real_path); return res; } @@ -193,10 +193,10 @@ lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t { if(br != NULL) *br = 0; if(file_p->drv == NULL) return LV_FS_RES_INV_PARAM; - if(file_p->drv->read == NULL) return LV_FS_RES_NOT_IMP; + if(file_p->drv->read_cb == NULL) return LV_FS_RES_NOT_IMP; uint32_t br_tmp = 0; - lv_fs_res_t res = file_p->drv->read(file_p->drv, file_p->file_d, buf, btr, &br_tmp); + lv_fs_res_t res = file_p->drv->read_cb(file_p->drv, file_p->file_d, buf, btr, &br_tmp); if(br != NULL) *br = br_tmp; return res; @@ -218,12 +218,12 @@ lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, u return LV_FS_RES_INV_PARAM; } - if(file_p->drv->write == NULL) { + if(file_p->drv->write_cb == NULL) { return LV_FS_RES_NOT_IMP; } uint32_t bw_tmp = 0; - lv_fs_res_t res = file_p->drv->write(file_p->drv, file_p->file_d, buf, btw, &bw_tmp); + lv_fs_res_t res = file_p->drv->write_cb(file_p->drv, file_p->file_d, buf, btw, &bw_tmp); if(bw != NULL) *bw = bw_tmp; return res; @@ -241,11 +241,11 @@ lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos) return LV_FS_RES_INV_PARAM; } - if(file_p->drv->seek == NULL) { + if(file_p->drv->seek_cb == NULL) { return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->seek(file_p->drv, file_p->file_d, pos); + lv_fs_res_t res = file_p->drv->seek_cb(file_p->drv, file_p->file_d, pos); return res; } @@ -263,12 +263,12 @@ lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) return LV_FS_RES_INV_PARAM; } - if(file_p->drv->tell == NULL) { + if(file_p->drv->tell_cb == NULL) { pos = 0; return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->tell(file_p->drv, file_p->file_d, pos); + lv_fs_res_t res = file_p->drv->tell_cb(file_p->drv, file_p->file_d, pos); return res; } @@ -285,11 +285,11 @@ lv_fs_res_t lv_fs_trunc(lv_fs_file_t * file_p) return LV_FS_RES_INV_PARAM; } - if(file_p->drv->tell == NULL) { + if(file_p->drv->tell_cb == NULL) { return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = file_p->drv->trunc(file_p->drv, file_p->file_d); + lv_fs_res_t res = file_p->drv->trunc_cb(file_p->drv, file_p->file_d); return res; } @@ -305,11 +305,11 @@ lv_fs_res_t lv_fs_size(lv_fs_file_t * file_p, uint32_t * size) return LV_FS_RES_INV_PARAM; } - if(file_p->drv->size == NULL) return LV_FS_RES_NOT_IMP; + if(file_p->drv->size_cb == NULL) return LV_FS_RES_NOT_IMP; if(size == NULL) return LV_FS_RES_INV_PARAM; - lv_fs_res_t res = file_p->drv->size(file_p->drv, file_p->file_d, size); + lv_fs_res_t res = file_p->drv->size_cb(file_p->drv, file_p->file_d, size); return res; } @@ -332,17 +332,18 @@ lv_fs_res_t lv_fs_rename(const char * oldname, const char * newname) return LV_FS_RES_NOT_EX; } - if(drv->ready != NULL) { - if(drv->ready(drv) == false) { + if(drv->ready_cb != NULL) { + if(drv->ready_cb(drv) == false) { return LV_FS_RES_HW_ERR; } } - if(drv->rename == NULL) return LV_FS_RES_NOT_IMP; + if(drv->rename_cb == NULL) return LV_FS_RES_NOT_IMP; const char * old_real = lv_fs_get_real_path(oldname); const char * new_real = lv_fs_get_real_path(newname); - lv_fs_res_t res = drv->rename(drv, old_real, new_real); + + lv_fs_res_t res = drv->rename_cb(drv, old_real, new_real); return res; } @@ -373,12 +374,13 @@ lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path) return LV_FS_RES_OUT_OF_MEM; /* Out of memory */ } - if(rddir_p->drv->dir_open == NULL) { + if(rddir_p->drv->dir_open_cb == NULL) { return LV_FS_RES_NOT_IMP; } const char * real_path = lv_fs_get_real_path(path); - lv_fs_res_t res = rddir_p->drv->dir_open(rddir_p->drv, rddir_p->dir_d, real_path); + + lv_fs_res_t res = rddir_p->drv->dir_open_cb(rddir_p->drv, rddir_p->dir_d, real_path); return res; } @@ -397,11 +399,11 @@ lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn) return LV_FS_RES_INV_PARAM; } - if(rddir_p->drv->dir_read == NULL) { + if(rddir_p->drv->dir_read_cb == NULL) { return LV_FS_RES_NOT_IMP; } - lv_fs_res_t res = rddir_p->drv->dir_read(rddir_p->drv, rddir_p->dir_d, fn); + lv_fs_res_t res = rddir_p->drv->dir_read_cb(rddir_p->drv, rddir_p->dir_d, fn); return res; } @@ -419,10 +421,10 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p) lv_fs_res_t res; - if(rddir_p->drv->dir_close == NULL) { + if(rddir_p->drv->dir_close_cb == NULL) { res = LV_FS_RES_NOT_IMP; } else { - res = rddir_p->drv->dir_close(rddir_p->drv, rddir_p->dir_d); + res = rddir_p->drv->dir_close_cb(rddir_p->drv, rddir_p->dir_d); } lv_mem_free(rddir_p->dir_d); /*Clean up*/ @@ -437,7 +439,7 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p) * Get the free and total size of a driver in kB * @param letter the driver letter * @param total_p pointer to store the total size [kB] - * @param free_p pointer to store the free size [kB] + * @param free_p pointer to store the free size_cb [kB] * @return LV_FS_RES_OK or any error from lv_fs_res_t enum */ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) @@ -450,12 +452,12 @@ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) lv_fs_res_t res; - if(drv->free_space == NULL) { + if(drv->free_space_cb == NULL) { res = LV_FS_RES_NOT_IMP; } else { uint32_t total_tmp = 0; uint32_t free_tmp = 0; - res = drv->free_space(drv, &total_tmp, &free_tmp); + res = drv->free_space_cb(drv, &total_tmp, &free_tmp); if(total_p != NULL) *total_p = total_tmp; if(free_p != NULL) *free_p = free_tmp; @@ -464,6 +466,17 @@ lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p) return res; } +/** + * Initialize a file system driver with default values. + * It is used to surly have known values in the fields ant not memory junk. + * After it you can set the fields. + * @param drv pointer to driver variable to initialize + */ +void lv_fs_drv_init(lv_fs_drv_t * drv) +{ + memset(drv, 0, sizeof(lv_fs_drv_t)); +} + /** * Add a new drive * @param drv_p pointer to an lv_fs_drv_t structure which is inited with the diff --git a/src/lv_misc/lv_fs.h b/src/lv_misc/lv_fs.h index 9d74df8fe6b8..b65c7d14e1a8 100644 --- a/src/lv_misc/lv_fs.h +++ b/src/lv_misc/lv_fs.h @@ -61,23 +61,23 @@ typedef struct _lv_fs_drv_t char letter; uint16_t file_size; uint16_t rddir_size; - bool (*ready)(struct _lv_fs_drv_t * drv); - - lv_fs_res_t (*open)(struct _lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); - lv_fs_res_t (*close)(struct _lv_fs_drv_t * drv, void * file_p); - lv_fs_res_t (*remove)(struct _lv_fs_drv_t * drv, const char * fn); - lv_fs_res_t (*read)(struct _lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); - lv_fs_res_t (*write)(struct _lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - lv_fs_res_t (*seek)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos); - lv_fs_res_t (*tell)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); - lv_fs_res_t (*trunc)(struct _lv_fs_drv_t * drv, void * file_p); - lv_fs_res_t (*size)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * size_p); - lv_fs_res_t (*rename)(struct _lv_fs_drv_t * drv, const char * oldname, const char * newname); - lv_fs_res_t (*free_space)(struct _lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p); - - lv_fs_res_t (*dir_open)(struct _lv_fs_drv_t * drv, void * rddir_p, const char * path); - lv_fs_res_t (*dir_read)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn); - lv_fs_res_t (*dir_close)(struct _lv_fs_drv_t * drv, void * rddir_p); + bool (*ready_cb)(struct _lv_fs_drv_t * drv); + + lv_fs_res_t (*open_cb)(struct _lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); + lv_fs_res_t (*close_cb)(struct _lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*remove_cb)(struct _lv_fs_drv_t * drv, const char * fn); + lv_fs_res_t (*read_cb)(struct _lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); + lv_fs_res_t (*write_cb)(struct _lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); + lv_fs_res_t (*seek_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos); + lv_fs_res_t (*tell_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + lv_fs_res_t (*trunc_cb)(struct _lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*size_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t * size_p); + lv_fs_res_t (*rename_cb)(struct _lv_fs_drv_t * drv, const char * oldname, const char * newname); + lv_fs_res_t (*free_space_cb)(struct _lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p); + + lv_fs_res_t (*dir_open_cb)(struct _lv_fs_drv_t * drv, void * rddir_p, const char * path); + lv_fs_res_t (*dir_read_cb)(struct _lv_fs_drv_t * drv, void * rddir_p, char * fn); + lv_fs_res_t (*dir_close_cb)(struct _lv_fs_drv_t * drv, void * rddir_p); #if LV_USE_USER_DATA lv_fs_drv_user_data_t user_data; From 7fe458229d029ae62a20ce63d362ebb049df5f22 Mon Sep 17 00:00:00 2001 From: Themba Dube Date: Sun, 16 Jun 2019 14:41:58 -0400 Subject: [PATCH 527/590] Minor fix when LV_LABEL_TEXT_SEL is 0 --- src/lv_objx/lv_ta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lv_objx/lv_ta.c b/src/lv_objx/lv_ta.c index 68db1af48e17..408260679df0 100644 --- a/src/lv_objx/lv_ta.c +++ b/src/lv_objx/lv_ta.c @@ -111,7 +111,9 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, const lv_obj_t * copy) ext->cursor.type = LV_CURSOR_LINE; ext->cursor.valid_x = 0; ext->one_line = 0; +#if LV_LABEL_TEXT_SEL ext->text_sel_en = 0; +#endif ext->label = NULL; ext->placeholder = NULL; From 3088849b63c0450df9b11b7c7df542713dc42854 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 17 Jun 2019 16:05:30 +0200 Subject: [PATCH 528/590] minor API changes --- src/lv_objx/lv_bar.c | 29 ++++++++++++++++++++ src/lv_objx/lv_bar.h | 14 ++++++++++ src/lv_objx/lv_btnm.c | 56 +++++++++++++++++++++++++++------------ src/lv_objx/lv_btnm.h | 30 +++++++++++++-------- src/lv_objx/lv_calendar.c | 9 +++++-- src/lv_objx/lv_canvas.c | 52 ++++++++++++++++++++++++++++++++++++ src/lv_objx/lv_canvas.h | 45 +++++++++++++++++-------------- src/lv_objx/lv_cb.h | 10 +++++++ src/lv_objx/lv_chart.h | 19 ++++++++++--- src/lv_objx/lv_ddlist.c | 21 ++++++++++----- src/lv_objx/lv_ddlist.h | 8 +++--- src/lv_objx/lv_gauge.c | 8 +++--- src/lv_objx/lv_mbox.c | 2 +- src/lv_objx/lv_roller.h | 10 +++---- src/lv_objx/lv_slider.h | 10 +++++++ src/lv_objx/lv_tabview.c | 10 +++---- 16 files changed, 253 insertions(+), 80 deletions(-) diff --git a/src/lv_objx/lv_bar.c b/src/lv_objx/lv_bar.c index 853a6383d4d3..165343ffc7d8 100644 --- a/src/lv_objx/lv_bar.c +++ b/src/lv_objx/lv_bar.c @@ -213,6 +213,20 @@ void lv_bar_set_sym(lv_obj_t * bar, bool en) ext->sym = en ? 1 : 0; } +/** + * Set the animation time of the bar + * @param bar pointer to a bar object + * @param anim_time the animation time in milliseconds. + */ +void lv_bar_set_anim_time(lv_obj_t * bar, uint16_t anim_time) +{ +#if LV_USE_ANIMATION == 0 + anim_time = 0; +#endif + lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + ext->anim_time = anim_time; +} + /** * Set a style of a bar * @param bar pointer to a bar object @@ -285,6 +299,21 @@ bool lv_bar_get_sym(lv_obj_t * bar) return ext->sym ? true : false; } +/** + * Get the animation time of the bar + * @param bar pointer to a bar object + * @return the animation time in milliseconds. + */ +uint16_t lv_bar_get_anim_time(lv_obj_t * bar, uint16_t anim_time) +{ +#if LV_USE_ANIMATION + lv_bar_ext_t * ext = lv_obj_get_ext_attr(bar); + return ext->anim_time; +#else + return 0; +#endif +} + /** * Get a style of a bar * @param bar pointer to a bar object diff --git a/src/lv_objx/lv_bar.h b/src/lv_objx/lv_bar.h index a90525f13d08..e081f2c04729 100644 --- a/src/lv_objx/lv_bar.h +++ b/src/lv_objx/lv_bar.h @@ -103,6 +103,13 @@ void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max); */ void lv_bar_set_sym(lv_obj_t * bar, bool en); +/** + * Set the animation time of the bar + * @param bar pointer to a bar object + * @param anim_time the animation time in milliseconds. + */ +void lv_bar_set_anim_time(lv_obj_t * bar, uint16_t anim_time); + /** * Set a style of a bar * @param bar pointer to a bar object @@ -143,6 +150,13 @@ int16_t lv_bar_get_max_value(const lv_obj_t * bar); */ bool lv_bar_get_sym(lv_obj_t * bar); +/** + * Get the animation time of the bar + * @param bar pointer to a bar object + * @return the animation time in milliseconds. + */ +uint16_t lv_bar_get_anim_time(lv_obj_t * bar, uint16_t anim_time); + /** * Get a style of a bar * @param bar pointer to a bar object diff --git a/src/lv_objx/lv_btnm.c b/src/lv_objx/lv_btnm.c index b9ca57fbd524..adfb041b331b 100644 --- a/src/lv_objx/lv_btnm.c +++ b/src/lv_objx/lv_btnm.c @@ -260,12 +260,8 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]) * length of the array and position of the elements must match * the number and order of the individual buttons (i.e. excludes * newline entries). - * The control bits are: - * - bit 5 : 1 = inactive (disabled) - * - bit 4 : 1 = no repeat (on long press) - * - bit 3 : 1 = hidden - * - bit 2..0: Relative width compared to the buttons in the - * same row. [1..7] + * An element of the map should look like e.g.: + * `ctrl_map[0] = width | LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_TGL_ENABLE` */ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[]) { @@ -345,19 +341,29 @@ void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en) * Set the attributes of a button of the button matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. (Not counting new lines) - * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl, bool en) +void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + + if(btn_id >= ext->btn_cnt) return; + + ext->ctrl_bits[btn_id] |= ctrl; + invalidate_button_area(btnm, btn_id); +} + +/** + * Clear the attributes of a button of the button matrix + * @param btnm pointer to button matrix object + * @param btn_id 0 based index of the button to modify. (Not counting new lines) + */ +void lv_btnm_clear_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); if(btn_id >= ext->btn_cnt) return; - if(en) { - ext->ctrl_bits[btn_id] |= ctrl; - } else { - ext->ctrl_bits[btn_id] &= (~ctrl); - } + ext->ctrl_bits[btn_id] &= (~ctrl); invalidate_button_area(btnm, btn_id); } @@ -365,16 +371,32 @@ void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t * Set the attributes of all buttons of a button matrix * @param btnm pointer to a button matrix object * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. + */ +void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl) +{ + lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); + uint16_t i; + for(i = 0; i < ext->btn_cnt; i++) { + lv_btnm_set_btn_ctrl(btnm, i, ctrl); + } +} + + +/** + * Clear the attributes of all buttons of a button matrix + * @param btnm pointer to a button matrix object + * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en) +void lv_btnm_clear_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl) { lv_btnm_ext_t * ext = lv_obj_get_ext_attr(btnm); uint16_t i; for(i = 0; i < ext->btn_cnt; i++) { - lv_btnm_set_btn_ctrl(btnm, i, ctrl, en); + lv_btnm_clear_btn_ctrl(btnm, i, ctrl); } } + /** * Set a single buttons relative width. * This method will cause the matrix be regenerated and is a relatively @@ -1048,9 +1070,9 @@ static void make_one_button_toggled(lv_obj_t * btnm, uint16_t btn_idx) /*Save whether the button was toggled*/ bool was_toggled = lv_btnm_get_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); - lv_btnm_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE, false); + lv_btnm_clear_btn_ctrl_all(btnm, LV_BTNM_CTRL_TGL_STATE); - if(was_toggled) lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE, true); + if(was_toggled) lv_btnm_set_btn_ctrl(btnm, btn_idx, LV_BTNM_CTRL_TGL_STATE); } #endif diff --git a/src/lv_objx/lv_btnm.h b/src/lv_objx/lv_btnm.h index fb02a23f0290..bcbc494eaf14 100644 --- a/src/lv_objx/lv_btnm.h +++ b/src/lv_objx/lv_btnm.h @@ -107,12 +107,8 @@ void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]); * length of the array and position of the elements must match * the number and order of the individual buttons (i.e. excludes * newline entries). - * The control bits are: - * - bit 5 : 1 = inactive (disabled) - * - bit 4 : 1 = no repeat (on long press) - * - bit 3 : 1 = hidden - * - bit 2..0: Relative width compared to the buttons in the - * same row. [1..7] + * An element of the map should look like e.g.: + * `ctrl_map[0] = width | LV_BTNM_CTRL_NO_REPEAT | LV_BTNM_CTRL_TGL_ENABLE` */ void lv_btnm_set_ctrl_map(const lv_obj_t * btnm, const lv_btnm_ctrl_t ctrl_map[]); @@ -140,21 +136,33 @@ void lv_btnm_set_style(lv_obj_t * btnm, lv_btnm_style_t type, const lv_style_t * void lv_btnm_set_recolor(const lv_obj_t * btnm, bool en); /** - * Set/clear an attribute of a button of the button matrix + * Set the attributes of a button of the button matrix + * @param btnm pointer to button matrix object + * @param btn_id 0 based index of the button to modify. (Not counting new lines) + */ +void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl); + +/** + * Clear the attributes of a button of the button matrix * @param btnm pointer to button matrix object * @param btn_id 0 based index of the button to modify. (Not counting new lines) - * @param ctrl attribute(s) to change from `lv_btnm_ctrl_t`. Values can be ORed. - * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl, bool en); +void lv_btnm_clear_btn_ctrl(const lv_obj_t * btnm, uint16_t btn_id, lv_btnm_ctrl_t ctrl); /** * Set the attributes of all buttons of a button matrix * @param btnm pointer to a button matrix object * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. + */ +void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl); + +/** + * Clear the attributes of all buttons of a button matrix + * @param btnm pointer to a button matrix object + * @param ctrl attribute(s) to set from `lv_btnm_ctrl_t`. Values can be ORed. * @param en true: set the attributes; false: clear the attributes */ -void lv_btnm_set_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl, bool en); +void lv_btnm_clear_btn_ctrl_all(lv_obj_t * btnm, lv_btnm_ctrl_t ctrl); /** * Set a single buttons relative width. diff --git a/src/lv_objx/lv_calendar.c b/src/lv_objx/lv_calendar.c index ed889260ff54..d5ceac9f8ff4 100644 --- a/src/lv_objx/lv_calendar.c +++ b/src/lv_objx/lv_calendar.c @@ -466,6 +466,7 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * lv_point_t p; lv_indev_get_point(indev, &p); + /*If the header is pressed mark an arrow as pressed*/ if(lv_area_is_point_on(&header_area, &p)) { if(p.x < header_area.x1 + lv_area_get_width(&header_area) / 2) { if(ext->btn_pressing != -1) lv_obj_invalidate(calendar); @@ -478,10 +479,14 @@ static lv_res_t lv_calendar_signal(lv_obj_t * calendar, lv_signal_t sign, void * ext->pressed_date.year = 0; ext->pressed_date.month = 0; ext->pressed_date.day = 0; - } else if(calculate_touched_day(calendar, &p)) { + } + /*If a day is pressed save it*/ + else if(calculate_touched_day(calendar, &p)) { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); ext->btn_pressing = 0; - } else { + } + /*ELse set a deafault state*/ + else { if(ext->btn_pressing != 0) lv_obj_invalidate(calendar); ext->btn_pressing = 0; ext->pressed_date.year = 0; diff --git a/src/lv_objx/lv_canvas.c b/src/lv_objx/lv_canvas.c index e221981660aa..cba7bf9deba3 100644 --- a/src/lv_objx/lv_canvas.c +++ b/src/lv_objx/lv_canvas.c @@ -549,6 +549,58 @@ void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord lv_refr_set_disp_refreshing(refr_ori); } +/** + * Draw an image on the canvas + * @param canvas pointer to a canvas object + * @param src image source. Can be a pointer an `lv_img_dsc_t` variable or a path an image. + * @param style style of the image (`image` properties are used) + */ +void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, const lv_style_t * style) +{ + lv_img_dsc_t * dsc = lv_canvas_get_img(canvas); + + /* Create a dummy display to fool the lv_draw function. + * It will think it draws to real screen. */ + lv_area_t mask; + mask.x1 = 0; + mask.x2 = dsc->header.w - 1; + mask.y1 = 0; + mask.y2 = dsc->header.h - 1; + + lv_img_header_t header; + lv_res_t res = lv_img_decoder_get_info(src, &header); + if(res != LV_RES_OK) { + LV_LOG_WARN("lv_canvas_draw_img: Couldn't get the image data."); + return; + } + + lv_area_t coords; + coords.x1 = x; + coords.y1 = y; + coords.x2 = x + header.w - 1; + coords.y2 = y + header.h - 1; + + lv_disp_t disp; + memset(&disp, 0, sizeof(lv_disp_t)); + + lv_disp_buf_t disp_buf; + lv_disp_buf_init(&disp_buf, (void *)dsc->data, NULL, dsc->header.w * dsc->header.h); + lv_area_copy(&disp_buf.area, &mask); + + lv_disp_drv_init(&disp.driver); + + disp.driver.buffer = &disp_buf; + disp.driver.hor_res = dsc->header.w; + disp.driver.ver_res = dsc->header.h; + + lv_disp_t * refr_ori = lv_refr_get_disp_refreshing(); + lv_refr_set_disp_refreshing(&disp); + + lv_draw_img(&coords, &mask, src, style, LV_OPA_COVER); + +} + + /** * Draw a line on the canvas * @param canvas pointer to a canvas object diff --git a/src/lv_objx/lv_canvas.h b/src/lv_objx/lv_canvas.h index 29925887eb44..a14a3870d1c6 100644 --- a/src/lv_objx/lv_canvas.h +++ b/src/lv_objx/lv_canvas.h @@ -71,8 +71,7 @@ lv_obj_t * lv_canvas_create(lv_obj_t * par, const lv_obj_t * copy); * @param canvas pointer to a canvas object * @param w width of the canvas * @param h height of the canvas - * @param cf color format. The following formats are supported: - * LV_IMG_CF_TRUE_COLOR, LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, LV_IMG_CF_INDEXES_1/2/4/8BIT + * @param cf color format. `LV_IMG_CF_...` */ void lv_canvas_set_buffer(lv_obj_t * canvas, void * buf, lv_coord_t w, lv_coord_t h, lv_img_cf_t cf); @@ -142,13 +141,13 @@ const lv_style_t * lv_canvas_get_style(const lv_obj_t * canvas, lv_canvas_style_ * @param canvas pointer to a canvas object * @param to_copy buffer to copy. The color format has to match with the canvas's buffer color * format - * @param w width of the buffer to copy - * @param h height of the buffer to copy * @param x left side of the destination position * @param y top side of the destination position + * @param w width of the buffer to copy + * @param h height of the buffer to copy */ -void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t w, lv_coord_t h, lv_coord_t x, - lv_coord_t y); +void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, + lv_coord_t y, lv_coord_t w, lv_coord_t h); /** * Rotate and image and store the result on a canvas. @@ -198,6 +197,15 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, const lv_style_t * style, const char * txt, lv_label_align_t align); + +/** + * Draw an image on the canvas + * @param canvas pointer to a canvas object + * @param src image source. Can be a pointer an `lv_img_dsc_t` variable or a path an image. + * @param style style of the image (`image` properties are used) + */ +void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, const lv_style_t * style); + /** * Draw a line on the canvas * @param canvas pointer to a canvas object @@ -236,20 +244,17 @@ void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_ #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_SIZE / 8) * w * h) #define LV_CANVAS_BUF_SIZE_TRUE_COLOR_ALPHA(w, h) (LV_IMG_PX_SIZE_ALPHA_BYTE * w * h) -#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) \ - ((((w / 8) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) /*4 * 2: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) \ - ((((w / 4) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) /*4 * 4: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) \ - ((((w / 2) + 1) * h)) /*(w / 8) + 1): to be sure no fractional row; LV_COLOR_SIZE / 8) * 2: palette*/ -#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) /*4 * 16: palette*/ - -#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h)) -#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) /*4 * 256: palette*/ +/*+ 1: to be sure no fractional row*/ +#define LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) ((((w / 8) + 1) * h)) +#define LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) ((((w / 4) + 1) * h)) +#define LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) ((((w / 2) + 1) * h)) +#define LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) ((w * h)) + +/*4 * X: for palette*/ +#define LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2) +#define LV_CANVAS_BUF_SIZE_INDEXED_2BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_2BIT(w, h) + 4 * 4) +#define LV_CANVAS_BUF_SIZE_INDEXED_4BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_4BIT(w, h) + 4 * 16) +#define LV_CANVAS_BUF_SIZE_INDEXED_8BIT(w, h) (LV_CANVAS_BUF_SIZE_ALPHA_8BIT(w, h) + 4 * 256) #endif /*LV_USE_CANVAS*/ diff --git a/src/lv_objx/lv_cb.h b/src/lv_objx/lv_cb.h index 35abbb3492fa..f061cbd1a049 100644 --- a/src/lv_objx/lv_cb.h +++ b/src/lv_objx/lv_cb.h @@ -141,6 +141,16 @@ static inline bool lv_cb_is_checked(const lv_obj_t * cb) return lv_btn_get_state(cb) == LV_BTN_STATE_REL ? false : true; } +/** + * Get whether the check box is inactive or not. + * @param cb pointer to a check box object + * @return true: inactive; false: not inactive + */ +static inline bool lv_cb_is_inactive(const lv_obj_t * cb) +{ + return lv_btn_get_state(cb) == LV_BTN_STATE_INA ? false : true; +} + /** * Get a style of a button * @param cb pointer to check box object diff --git a/src/lv_objx/lv_chart.h b/src/lv_objx/lv_chart.h index 0ef9e645b880..f4189edd34fd 100644 --- a/src/lv_objx/lv_chart.h +++ b/src/lv_objx/lv_chart.h @@ -35,6 +35,7 @@ extern "C" { /*Chart types*/ enum { + LV_CHART_TYPE_NONE = 0x00, /*Don't draw the series*/ LV_CHART_TYPE_LINE = 0x01, /*Connect the points with lines*/ LV_CHART_TYPE_COLUMN = 0x02, /*Draw columns*/ LV_CHART_TYPE_POINT = 0x04, /*Draw circles on the points*/ @@ -43,10 +44,10 @@ enum { }; typedef uint8_t lv_chart_type_t; -/*Chart update mode*/ +/*Chart update mode for `lv_chart_set_next`*/ enum { - LV_CHART_UPDATE_MODE_SHIFT, - LV_CHART_UPDATE_MODE_CIRCULAR, + LV_CHART_UPDATE_MODE_SHIFT, /*Shift old data to the left and add the new one o the right*/ + LV_CHART_UPDATE_MODE_CIRCULAR, /*Add the new data in a circular way*/ }; typedef uint8_t lv_chart_update_mode_t; @@ -240,7 +241,7 @@ static inline void lv_chart_set_style(lv_obj_t * chart, lv_chart_style_t type, c void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin); /** - * Set the x/y-axis ticks of a chart + * Set the y-axis ticks of a chart * @param chart pointer to a chart object * @param list_of_values list of string values, terminated with \n, except the last * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis @@ -252,6 +253,16 @@ void lv_chart_set_margin(lv_obj_t * chart, uint16_t margin); void lv_chart_set_x_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, uint8_t minor_tick_len, lv_chart_axis_options_t options); +/** + * Set the y-axis ticks of a chart + * @param chart pointer to a chart object + * @param list_of_values list of string values, terminated with \n, except the last + * @param num_tick_marks if list_of_values is NULL: total number of ticks per axis + * else step in ticks between two value labels + * @param major_tick_len the length of the major tick, AUTO if 0 + * @param minor_tick_len the length of the minor tick, AUTO if 0 + * @param options extra options + */ void lv_chart_set_y_ticks(lv_obj_t * chart, const char * list_of_values, uint8_t num_tick_marks, uint8_t major_tick_len, uint8_t minor_tick_len, lv_chart_axis_options_t options); diff --git a/src/lv_objx/lv_ddlist.c b/src/lv_objx/lv_ddlist.c index 54d538782099..93e4c4f75b46 100644 --- a/src/lv_objx/lv_ddlist.c +++ b/src/lv_objx/lv_ddlist.c @@ -210,11 +210,12 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt) lv_obj_invalidate(ddlist); } - lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &ext->sel_opt_id); + uint32_t id = ext->sel_opt_id; /*Just to use uint32_t in event data*/ + lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &id); } /** - * Set the fix height for the drop down list + * Set a fix height for the drop down list * If 0 then the opened ddlist will be auto. sized else the set height will be applied. * @param ddlist pointer to a drop down list * @param h the height when the list is opened (0: auto size) @@ -230,13 +231,18 @@ void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h) } /** - * Enable or disable the horizontal fit to the content + * Set a fix width for the drop down list * @param ddlist pointer to a drop down list - * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) + * @param w the width when the list is opened (0: auto size) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit) +void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w) { - lv_cont_set_fit2(ddlist, fit, lv_cont_get_fit_bottom(ddlist)); + if(w == 0) { + lv_cont_set_fit2(ddlist, LV_FIT_TIGHT, lv_cont_get_fit_bottom(ddlist)); + } else { + lv_cont_set_fit2(ddlist, LV_FIT_NONE, lv_cont_get_fit_bottom(ddlist)); + lv_obj_set_width(ddlist, w); + } lv_ddlist_refr_size(ddlist, false); } @@ -811,7 +817,8 @@ static lv_res_t release_handler(lv_obj_t * ddlist) ext->sel_opt_id_ori = ext->sel_opt_id; } - lv_res_t res = lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &ext->sel_opt_id); + uint32_t id = ext->sel_opt_id; /*Just to use uint32_t in event data*/ + lv_res_t res = lv_event_send(ddlist, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return res; if(ext->stay_open == 0) { diff --git a/src/lv_objx/lv_ddlist.h b/src/lv_objx/lv_ddlist.h index c9253c30d10b..29103b0b0a78 100644 --- a/src/lv_objx/lv_ddlist.h +++ b/src/lv_objx/lv_ddlist.h @@ -97,7 +97,7 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options); void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt); /** - * Set the fix height for the drop down list + * Set a fix height for the drop down list * If 0 then the opened ddlist will be auto. sized else the set height will be applied. * @param ddlist pointer to a drop down list * @param h the height when the list is opened (0: auto size) @@ -105,11 +105,11 @@ void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt); void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h); /** - * Enable or disable the horizontal fit to the content + * Set a fix width for the drop down list * @param ddlist pointer to a drop down list - * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) + * @param w the width when the list is opened (0: auto size) */ -void lv_ddlist_set_hor_fit(lv_obj_t * ddlist, lv_fit_t fit); +void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w); /** * Set arrow draw in a drop down list diff --git a/src/lv_objx/lv_gauge.c b/src/lv_objx/lv_gauge.c index f2adcf72c72a..7abea87332e1 100644 --- a/src/lv_objx/lv_gauge.c +++ b/src/lv_objx/lv_gauge.c @@ -455,10 +455,10 @@ static void lv_gauge_draw_needle(lv_obj_t * gauge, const lv_area_t * mask) style_neddle_mid.body.radius = LV_RADIUS_CIRCLE; lv_area_t nm_cord; - nm_cord.x1 = x_ofs - style->body.padding.top; - nm_cord.y1 = y_ofs - style->body.padding.top; - nm_cord.x2 = x_ofs + style->body.padding.top; - nm_cord.y2 = y_ofs + style->body.padding.top; + nm_cord.x1 = x_ofs - style->body.radius; + nm_cord.y1 = y_ofs - style->body.radius; + nm_cord.x2 = x_ofs + style->body.radius; + nm_cord.y2 = y_ofs + style->body.radius; lv_draw_rect(&nm_cord, mask, &style_neddle_mid, lv_obj_get_opa_scale(gauge)); } diff --git a/src/lv_objx/lv_mbox.c b/src/lv_objx/lv_mbox.c index c240b5918d58..c4e84b59a628 100644 --- a/src/lv_objx/lv_mbox.c +++ b/src/lv_objx/lv_mbox.c @@ -156,7 +156,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char ** btn_map) } lv_btnm_set_map(ext->btnm, btn_map); - lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT, true); + lv_btnm_set_btn_ctrl_all(ext->btnm, LV_BTNM_CTRL_CLICK_TRIG | LV_BTNM_CTRL_NO_REPEAT); lv_obj_set_parent_event(ext->btnm, true); mbox_realign(mbox); diff --git a/src/lv_objx/lv_roller.h b/src/lv_objx/lv_roller.h index a9a80e9fc272..ffc8b5163eaa 100644 --- a/src/lv_objx/lv_roller.h +++ b/src/lv_objx/lv_roller.h @@ -98,13 +98,13 @@ void lv_roller_set_selected(lv_obj_t * roller, uint16_t sel_opt, lv_anim_enable_ void lv_roller_set_visible_row_count(lv_obj_t * roller, uint8_t row_cnt); /** - * Enable or disable the horizontal fit to the content - * @param roller pointer to a roller - * @param fit fit mode from `lv_fit_t` (Typically `LV_FIT_NONE` or `LV_FIT_TIGHT`) + * Set a fix width for the drop down list + * @param roller pointer to a roller obejct + * @param w the width when the list is opened (0: auto size) */ -static inline void lv_roller_set_hor_fit(lv_obj_t * roller, lv_fit_t fit) +static inline void lv_roller_set_fix_width(lv_obj_t * roller, lv_coord_t w) { - lv_ddlist_set_hor_fit(roller, fit); + lv_ddlist_set_fix_width(roller, w); } /** diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 5511eec4e5d9..9d503c549b7b 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -92,6 +92,16 @@ static inline void lv_slider_set_range(lv_obj_t * slider, int16_t min, int16_t m lv_bar_set_range(slider, min, max); } +/** + * Set the animation time of the slider + * @param slider pointer to a bar object + * @param anim_time the animation time in milliseconds. + */ +static void lv_slider_set_anim_time(lv_obj_t * slider, uint16_t anim_time) +{ + lv_bar_set_anim_time(slider, anim_time); +} + /** * Set the 'knob in' attribute of a slider * @param slider pointer to slider object diff --git a/src/lv_objx/lv_tabview.c b/src/lv_objx/lv_tabview.c index 9e7de29768ea..5bce0205724e 100644 --- a/src/lv_objx/lv_tabview.c +++ b/src/lv_objx/lv_tabview.c @@ -274,7 +274,7 @@ lv_obj_t * lv_tabview_add_tab(lv_obj_t * tabview, const char * name) btnm_ext->map_p = NULL; lv_btnm_set_map(ext->btns, ext->tab_name_ptr); - lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT, true); + lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_NO_REPEAT); /*Modify the indicator size*/ const lv_style_t * style_tabs = lv_obj_get_style(ext->btns); @@ -341,7 +341,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t an if(id != ext->tab_cur) res = lv_event_send(tabview, LV_EVENT_VALUE_CHANGED, &id); if(res != LV_RES_OK) return; - lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, false); + lv_btnm_clear_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE); ext->tab_cur = id; @@ -441,7 +441,7 @@ void lv_tabview_set_tab_act(lv_obj_t * tabview, uint16_t id, lv_anim_enable_t an #endif } - lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE, true); + lv_btnm_set_btn_ctrl(ext->btns, ext->tab_cur, LV_BTNM_CTRL_TGL_STATE); } /** @@ -935,8 +935,8 @@ static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event) uint16_t btn_id = lv_btnm_get_active_btn(tab_btnm); if(btn_id == LV_BTNM_BTN_NONE) return; - lv_btnm_set_btn_ctrl_all(tab_btnm, LV_BTNM_CTRL_TGL_STATE, false); - lv_btnm_set_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_TGL_STATE, true); + lv_btnm_clear_btn_ctrl_all(tab_btnm, LV_BTNM_CTRL_TGL_STATE); + lv_btnm_set_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_TGL_STATE); lv_obj_t * tab = lv_obj_get_parent(tab_btnm); lv_tabview_set_tab_act(tab, btn_id, true); From b9692ee798970f0654d4c02d7b98e9af94df84f0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 17 Jun 2019 16:07:34 +0200 Subject: [PATCH 529/590] add missing 'iniline' --- src/lv_objx/lv_slider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_objx/lv_slider.h b/src/lv_objx/lv_slider.h index 9d503c549b7b..5ca12903b607 100644 --- a/src/lv_objx/lv_slider.h +++ b/src/lv_objx/lv_slider.h @@ -97,7 +97,7 @@ static inline void lv_slider_set_range(lv_obj_t * slider, int16_t min, int16_t m * @param slider pointer to a bar object * @param anim_time the animation time in milliseconds. */ -static void lv_slider_set_anim_time(lv_obj_t * slider, uint16_t anim_time) +static inline void lv_slider_set_anim_time(lv_obj_t * slider, uint16_t anim_time) { lv_bar_set_anim_time(slider, anim_time); } From c46f64c6d5f52f1fc14f32921e85b02582441155 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 18 Jun 2019 05:40:21 +0200 Subject: [PATCH 530/590] lv_img_decoder fix memory leak --- src/lv_draw/lv_img_decoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lv_draw/lv_img_decoder.c b/src/lv_draw/lv_img_decoder.c index 5d539864e3b0..a3e2bb5a8981 100644 --- a/src/lv_draw/lv_img_decoder.c +++ b/src/lv_draw/lv_img_decoder.c @@ -447,7 +447,10 @@ static void lv_img_decoder_built_in_close(lv_img_decoder_t * decoder, lv_img_dec lv_img_decoder_built_in_data_t * user_data = dsc->user_data; if(user_data) { #if LV_USE_FILESYSTEM - if(user_data->f) lv_mem_free(user_data->f); + if(user_data->f) { + lv_fs_close(user_data->f); + lv_mem_free(user_data->f); + } #endif if(user_data->palette) lv_mem_free(user_data->palette); From b9081cacef369feac1327c65aa61bad99f694a7e Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Tue, 18 Jun 2019 06:08:44 +0200 Subject: [PATCH 531/590] lv_group: fix typo in comment --- src/lv_core/lv_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lv_core/lv_group.c b/src/lv_core/lv_group.c index 5b173b149537..af3e1639a9e8 100644 --- a/src/lv_core/lv_group.c +++ b/src/lv_core/lv_group.c @@ -384,7 +384,7 @@ void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t p /** * Set whether focus next/prev will allow wrapping from first->last or last->first. * @param group pointer to group - * @param en: true: enable `click_focus` + * @param en: true: enable `wrap` */ void lv_group_set_wrap(lv_group_t * group, bool en) { From 6cfcc3fa5510f009b1122b97786e3326ed0218eb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 19 Jun 2019 00:35:35 +0200 Subject: [PATCH 532/590] minor API changes --- .gitignore | 1 + scripts/Doxyfile | 2455 +++++++++++++++++++++++++++++++++++++++ src/lv_conf_checker.h | 1 + src/lv_objx/lv_btn.h | 12 +- src/lv_objx/lv_ddlist.c | 38 +- src/lv_objx/lv_ddlist.h | 20 +- src/lv_objx/lv_img.c | 18 - src/lv_objx/lv_img.h | 21 - src/lv_objx/lv_label.c | 14 +- src/lv_objx/lv_label.h | 4 +- src/lv_objx/lv_list.c | 56 +- src/lv_objx/lv_list.h | 39 +- src/lv_objx/lv_page.c | 42 +- src/lv_objx/lv_page.h | 20 +- src/lv_objx/lv_roller.c | 20 +- src/lv_objx/lv_win.c | 25 +- src/lv_objx/lv_win.h | 19 +- 17 files changed, 2625 insertions(+), 180 deletions(-) create mode 100644 scripts/Doxyfile diff --git a/.gitignore b/.gitignore index 8ea2e138ed46..0d4f282ca924 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ **/*.swp **/*.swo tags +docs/api_doc diff --git a/scripts/Doxyfile b/scripts/Doxyfile new file mode 100644 index 000000000000..df15bdb0c44d --- /dev/null +++ b/scripts/Doxyfile @@ -0,0 +1,2455 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "LittlevGL" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ../docs/api_doc + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "WARNING: $file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /